An integrated path-tracking and control allocation method for autonomous racing electric vehicles

In recent years, path-tracking controllers for autonomous passenger vehicles and Control Allocation (CA) methods for handling and stability control have both received extensive discussion in the literature. However, the integration of the path-tracking control with CA methods for autonomous racing vehicles has not attracted much attention. In this study, we design an integrated path-tracking and CA method for a prototype autonomous racing electric vehicle with a particular focus on the maximising the turning speed in tight cornering. The proposed control strategy has a hierarchical structure to improve the computational efficiency: the high-level path-tracking Model Predictive Control (MPC) based on a rigid body model is designed to determine the virtual control forces according to the desired path and desired maximum velocity profile, while the low-level CA method uses a Quadratically Constrained Quadratic Programming (QCQP) formulation to distribute the individual control actuator according to the desired virtual control values. The proposed controller is validated in a high-fidelity simulation vehicle model with the computational time of the optimisation controller presented to demonstrate the real-time control performance.


Introduction
The autonomous vehicle has been considered as the next generation vehicle and has received increased attention in the recent literature.A vital part of the control architecture of an autonomous vehicle is around the path following control, which includes two parts: the high-level motion planner, which uses environmental sensing and perception techniques to determine a desired path and speed profile, and the low-level path-tracking controller which is designed to track the desired path with desired speed and maintain the vehicle dynamics stability.In this study, we focus on the low-level path-tracking controller.
Many of earlier studies about the path-tracking used a driver model to determine the steering control input [1][2][3][4][5], then the study on path-tracking for driver model has been switched to autonomous passenger vehicle application recently [6][7][8][9][10][11].In order to track the desired path and minimise the lateral tracking error, Attia et al. utilised a Nonlinear Model Predictive Control (NMPC) to determine the control input of steering angle [6].In another study, based on the lateral tracking error, the H-infinity technique was applied to design the lateral tracking controller [7].Tagne et al. proposed a higherorder Sliding Mode Controller (SMC) for the reference path-tracking control, since the robustness of SMC can be beneficial to overcome the nonlinear terms of the vehicle model [9].
In recent years, the independent wheel control in an over-actuated vehicle has been widely discussed in the vehicle dynamics and control literature.The independent wheel control provides redundant control actuators and is becoming popular due to the possibility of enhancing the performance of existing controller through the carefully design of Control Allocation (CA) strategy [12].It is also suggested that CA can improve the cornering response by shaping the under-steer characteristics and ensuring stability in limited-handing condition [13].Thus, integrating the CA strategy with pathtracking controller can greatly improve path-tracking and vehicle dynamics performance of autonomous vehicle with in-wheel motor, which has become a very attracting research area.
CA was originally used to control and allocate traction or brake toque of individual tire for the vehicle handling and stability control of traditional human-driving passenger vehicles [14][15][16][17][18].In recent years, quite a few approaches integrate path-tracking with CA based on Direct Yaw Control (DYC) for autonomous passenger vehicles [19,20].Guo et al. proposed a Linear Time Varying (LTV) based MPC as the path-tracking controller to determine the steering angle and required yaw moment, then a low-level CA law is applied to distribute the individual wheel torque to achieve the required yaw moment [19].Wang et al. developed a modified Composite Nonlinear Feedback (CNF) controller to track the desired yaw rate and lateral velocity and then the required yaw moment control value is distributed to longitudinal tire force of individual wheel [20].In [13], a hierarchical structure and a holistic structure of path-tracking controller is suggested and integrated with torque vectoring controller.In the above studies, a distribution of the DYC command on the individual wheel torque (also called torque vectoring) is applied.However, the CA problem can be extended to the distribution of the steering angle, motor driving torque, motor regenerating brake torque and hydraulic brake torque on the individual wheel.In this way, the redundant vehicle control actuators can be fully utilised to achieve the best control performance, but CA problem becomes more complex and requires a carefully designed CA strategy.In our previous study [21], the hierarchical control structure is proposed by including high-level PID based path-tracking controller and low-level CA approach.The CA method can optimally distribute the individual wheel torque and front wheel steering angle.Nevertheless, the simple PID path-tracking controller can only track the desired path with fixed longitudinal speed, which cannot optimise the path-tracking with maximum cornering speed in racing scenario (without the help of MPC).Furthermore, the CA method still has not fully considered the control allocation of front and rear wheel steering angle, motor driving torque, motor regenerating brake torque and hydraulic brake torque of individual wheel.
MPC has been widely applied in the path-tracking control of autonomous passenger vehicles since the control performance can be greatly improved by MPC through the preview of the future road profile [19,[22][23][24][25][26][27].However, there are limited studies on the path-tracking control of the autonomous racing vehicles.Alcala et al. proposed a linear parameter varying (LPV) MPC for autonomous racing vehicles [28].The validation of the controller is based on the scaled electric vehicle and the vehicle speed is relatively low.It is questionable if the proposed controller can achieve good control performance for the high-speed full-sized autonomous racing vehicle.Similarly, Liniger et al. proposed a linearised MPC for the path-tracking of autonomous racing vehicle and an integrated MPC contouring control to achieve the combined path planning and path-tracking control, where the nonlinear bicycle model considering the longitudinal and lateral friction forces is modified as the LTV model [29].In order to improve the internal model accuracy of the MPC, the learning based MPC approaches are proposed in [30].The internal MPC model includes a nominal simple vehicle model and a self-learning model to improve the vehicle model accuracy.The major issue of this data-driven self-learning approach is the uncertain stochastic internal model will render the predicted state a random variable.This uncertainty will propagate throughout the whole prediction horizon, and the prediction model system may be unstable with a longer prediction horizon.Furthermore, the Gaussian Process Regression has been applied to train the self-learning model and the large number of training data points will significantly increase the computational burden.
In summary, in the current literature, the path-tracking controller design for autonomous racing vehicles is mainly based on the linearised MPC approach with simple internal model to improve the computational efficiency and guarantee the controller reliability.Although the self-learning MPC approach has been tried to improve the internal model accuracy, the reliability of this approach is questionable.Although CA and MPC approaches have been extensively applied in the path-tracking control for passenger vehicles, the integration of the path-tracking control and maximum speed control in tight cornering for the racing vehicle is less focused.The optimisation of redundant steering and driving actuators can greatly enlarge the working envelope of racing vehicles and push the racing vehicles close to the friction limit.
The aim of our study is to design an integrated path-tracking and CA method for a prototype autonomous racing electric vehicle in limited handling scenario, with the proposed method being able to satisfy the requirement for real-time implementation.The prototype vehicle under consideration has independent front-and rear-wheel steering, two hub motors with driving/regenerating braking capabilities on the two rear wheels, and one motor on the front axle that through an open differential equally distributes the driving/regenerating torque among the two front wheels.In addition, there are two independent hydraulic brake channels, one on the front axle and one on the rear axle of the vehicle, which is shown in Figure 1.Motivated by the above shortcomings in current literature, a hierarchical control structure of integrated path-tracking and CA method is presented in this study.In the high-level controller, a path-tracking MPC is proposed based on a rigid body vehicle model including the virtual control inputs of the total longitudinal, lateral force and yaw moment on the vehicle, while individual tire friction force and tire model are considered in the low-level controller and decoupled from high-level to improve the computational efficiency.This way a modular strategy is achieved, which can be easily modified and applied to most of the existing actuator structures of an electric vehicle.The major contribution of this study can be summarised as follows.First, the proposed hierarchical controller applies the virtual forces and moment to performance high-level path-tracking motion and effectively move the effect of the actual friction tire forces in the lower CA level which also accounts for the various actuators.Secondly, the path-tracking MPC with prediction horizon is proposed based on a rigid body vehicle dynamics model, and the tire friction circle and maximum yaw moment constraints are included in the highlevel MPC to guarantee the feasibility of the computed commands to be passed on the low-level CA.Furthermore, a two-layer CA method is proposed to control and allocate the various steering and driving actuators: the upper layer CA optimally distributes the individual longitudinal tire force and steering angle according to the desired virtual control values from the path-tracking controller, formulated as a Quadratically Constrained Quadratic Programming (QCQP) problem to improve the computational efficiency, while the lower layer rules-based method is designed to distribute the required individual longitudinal tire force into the individual motor and hydraulic brake torques.Finally, the time-efficient solver generated by Forces Pro is used to solve the high-level path-tracking MPC and optimisation problem of CA in low-level in this study, which can satisfy the requirement for real-time path-tracking control [31].It is noted that our study only focuses on the high-level path-tracking and low-level CA algorithm, and the detailed actuator model of the powertrain system is out of the scope and not considered in our study.The major novelty of our study can be suggested: (1) the path-tracking control and maximum speed control in tight cornering (through the offline pre-calculation of maximum cornering speed and the online speed control in MPC prediction horizon) are integrated together for the autonomous racing vehicle; (2) through more powerful in-wheel motor system and the potent racing tire (tire-road friction coefficient > 1), the proposed controller can fully utilise the potential of the racing vehicle and reach the acceleration limit; (3) in the highlevel MPC path-tracking controller, the virtual total desired tyre force and yaw moment (yaw moment constraint is not well addressed in the literature) are constrained so that the low-level CA can successfully allocate individual actuators.
This paper is organised as follows: the high-level path-tracking MPC is presented in section II, then low-level CA strategy is introduced in section III, and finally simulation examples are used to validate the effectiveness of the proposed integrated control method in section IV.

High-level path-tracking MPC design
The proposed hierarchical controller includes the high-level path-tracking controller and low-level CA method.The high-level path-tracking MPC method tracks the desired path and velocity profile and sends the required virtual control forces into the low-level CA to distribute the individual control actuator value to the vehicle.Vehicle measurements are also used to feed back the necessary vehicle state values to the high-level and lowlevel controllers.The detailed structure of the complete control system is presented in Figure 2.

Vehicle dynamics model for high-level path-tracking MPC
In this section, a three degrees-of-freedom (DOF) rigid-body nonlinear dynamics model considering the combined longitudinal, lateral and yaw dynamics is used to design the path-tracking MPC.The virtual control inputs of total longitudinal tire force, lateral tire force and yaw moment are utilised to simplify the vehicle dynamics model.In addition, the yaw angle error and lateral tracking error are also included in the vehicle model to present the path-tracking performance [20].The 3 DOF vehicle model is presented by the following equations: where v x , v y , r represent the vehicle longitudinal velocity, lateral velocity, and yaw rate, respectively, I z and m are the moment of vehicle inertia in terms of yaw axis and vehicle mass, F xd , F yd , M zd are total longitudinal tire force, lateral tire force and yaw moment, Y e and ψ e are the vehicle lateral deviation and yaw angle error from the reference path and κ is the curvature of desired path.

The design of high-level path-tracking MPC
The general formulation of a nonlinear MPC can be presented as following equations by selecting the best control input to satisfy the cost function J: where N is the horizontal number of predicted time steps, x k is the predicted vehicle state in the prediction horizon and u k is the predicted control input, f (x k , u k , p) in equation ( 2a) is the nonlinear system prediction model, which is the discrete formulation of nonlinear dynamics system (1) and is formulated in (4) and p is the external changing parameters determined outside of MPC.The boundary constraints of vehicle states are presented in (2b) while the initial values x 0 can be determined by the measured feedback state values at current time t.

1) External parameters p
The external parameters of MPC include the curvature of desired path p 1 = κ and desired longitudinal velocity of vehicle in the body-fixed coordinate system p 2 = v xd .Since this study only focuses on the path-tracking controller design, it can be simply assumed the desired path and the curvature of desired path are already known.The desired longitudinal velocity is determined by an optimal velocity profile which can be pre-calculated offline or online as part of the motion planning algorithm.Note that the optimal velocity profile calculated offline and applied in this study can make the autonomous vehicle travel along the desired path with maximum acceleration and minimum time [32].
The MPC design has N steps prediction horizon, determined as: where X d (t) is the vehicle current time (t) travelling distance along the desired path.v x is the feedback vehicle velocity and T s is the sampling time of discrete-time vehicle model (2a). 2

) Nonlinear prediction model
The nonlinear prediction model (2a) is determined by converting the nonlinear continuous dynamics model (1) into discrete form: where the model states ] T , and the control inputs It should be noted that in (4) the control inputs have been revised as the change rate of total desired longitudinal tire force, lateral force and yaw moment to reduce the oscillation of control inputs and improve the stability of control performance.

3) Cost function
The control targets of proposed MPC include the minimisation of yaw angle error and lateral deviation from desired path and achieving the desired target speed.The detailed mathematical presentation of the cost function can be presented as following: where Q v , Q ψ , Q Y are scaling factors corresponding to the cost function terms of the longitudinal velocity tracking error, yaw angle tracking error and lateral deviation tracking error.Q u is a 3-by-3 diagonal matrix which include the relative penalties on the control effort.Q s1 and Q s2 are penalties on the soft constrains s 1 and s 2 .In order to achieve good control performance, all the scaling factors in cost function are normalised and written in discrete-time form: where v xm , ψ em and Y em are nominal values of longitudinal velocity, yaw angle error and lateral deviation, respectively.dF xm , dF ym , dM zm are nominal values of change rate of desired longitudinal force, desired lateral force and yaw moment.s 1m and s 2m are nominal values of soft constraints.q v , q ψ , q Y , q u1−u3 , q s1−s2 are scaling values of each term, which need to be tuned as the following procedure.First the weighting of penalties terms q u1−u3 , q s1−s2 are tuned and fixed.Then q v , q ψ , q Y related to velocity error, yaw angle error and lateral deviation can be tuned individually based on the relative importance of individual term.

4) Constraints
Equations (2b) suggests that states should satisfy certain constraints.Specifically, the total desired longitudinal and lateral tire force should satisfy the friction circle limit: where μ is the tire-road friction coefficient and g is the constant of gravitational acceleration.The tyre-road friction coefficient can be assumed to be known through friction coefficient estimators [33].
The desired yaw moment is also constrained by its upper and lower limit: The total desired yaw moment includes the yaw moment induced by the longitudinal force M xz and lateral force M yz .Since longitudinal and lateral vehicle forces are coupled by friction limit, it is quite hard to determine the analytical solution of total yaw moment limit.Thus, in this study, a look-up table is built to explore the whole working envelope and determine the yaw moment limit, which is presented in Table 1.In Table 1, δ sf and δ sr are the searching increments of front-wheel and rear-wheel steering angle.It is also noticed the soft constraints s 1 and s 2 are applied in constraints (7,8) to prevent the optimisation solver reaching an infeasible solution.
In order to improve the computational efficiency and satisfy the needs of real-time optimisation, the above NMPC problem can be linearised and solved using the fast NLP solver developed by Forces Pro [34], the detailed solving method is explained in Appendix B.

The high-level feedback path-tracking controller
In order to have the comparative study with our proposed MPC strategy, a high-level feedback path-tracking controller is presented here to calculate the desired total tire force and yaw moment [35].The desired total longitudinal tire force can be calculated as: where e 1 = v x − v xd , k 1 > 0. vxd is the desired longitudinal acceleration and can be assumed as zero.Since the specific longitudinal acceleration target is not set in our study, Calculate the side-slip angle of individual wheel s yi 7.
Calculate the lateral tire force of individual wheel F yi 8.
Calculate the maximum available individual longitudinal force we just set the desired longitudinal acceleration as zero to minimise the velocity change and improve the comfort during the desired speed tracking.The desired total lateral tire force can be calculated as: where k 2 > 0 and k 3 > 0. The desired yaw moment can be calculated as: where ṙd is the desired yaw acceleration, which is assumed as 0 to improve the yaw stability of the vehicle.k 4 > 0 and k 5 > 0.

Low-level control allocation design
After the virtual control input u = [F xd ; F yd ; M zd ] has been determined by the upper-level MPC, the low-level CA optimisation algorithm is designed to control and allocate the individual actuator to achieve the desired virtual control force.In this study, the low-level CA algorithm is designed assuming a steer-by-wire and brake-by-wire architecture.The powertrain system includes a motor with an open differential on the front axle and two hub motors attached to the rear wheels.Two independent hydraulic brake channels are also present on the front and rear axle, respectively.Finally, the steering system can control the front-and rear-wheel steering independently.

Vehicle dynamics model for low-level CA
In this study, the design of low-level CA method are based on a two-track vehicle dynamics model.This model is more complex than the rigid-body dynamics model (1) and considers the individual wheel tire forces [36].Note that the suspension and roll and pitch dynamics are neglected, a reasonable assumption for the on-road autonomous vehicle used in this paper.
The longitudinal motion is defined by: the lateral motion: and the yaw motion: where F xij and F yij are longitudinal tire force and lateral tire force of individual wheel in the body-fixed coordinate system, ij = fl, fr, rl, rr represent the front left, front right, rear left and rear right wheels respectively, l f and l r are the front and rear wheel base lengths, while b f and b r are the front and rear track widths.The longitudinal and lateral tire force of individual wheel can be determined by the following equations: where F tij and F sij are tire traction/brake force and side force of individual wheel in the wheel-centred coordinate system.For the front and rear wheel independent steering vehicle, δ fl = δ fr = δ f and δ rl = δ rr = δ r .The individual lateral tire force can be calculated by the following equations: where C αf and C αr are cornering stiffness of front tire and rear tire, respectively.The individual longitudinal tire force can be determined by the wheel dynamics equation, assuming the wheel acceleration is zero: where R ω is the wheel radius and T ij is the traction or brake torque of each wheel.

Low-level CA design
The proposed low-level CA includes two layers: in the first layer, the individual longitudinal force and steering angle are optimally distributed according to desired virtual control input; in the second layer, the distributed individual longitudinal tire forces are mapped to individual motor torque and hydraulic brake torque.When the vehicle is braking, in terms of the energy saving, we would like to try to use the negative motor torque as much as possible.After the negative motor torque reaches the maximum value, the friction brake is used to compensate the remaining required negative brake torque.This mapping strategy in the second layer can be easily achieved by a simple rule-based method.We designed this hierarchical structure to separate the first layer QCQP optimisation and the second layer rule-based method to improve the computational efficiency.
1) The first layer of CA method According to the total virtual control force and based on the vehicle dynamics model ( 10)-( 13), the CA equation can be presented as followings: where the allocated control actuator input u 1 = F tf , u 2 = F trl , u 3 = F trr , u 4 = δ f and u 5 = δ r .It can be noticed from Equation ( 13) that the steering angle in tire force mapping Equation ( 10) is considered as very small value, so F xi ≈ F ti and F yi ≈ F si .α fld , α frd , α rld , α rrd can be determined from (11): where v yd is the desired lateral velocity and is assumed zero to minimise the undesired side-slip angle and v xd and r d are the desired longitudinal and yaw rate, as determined in the high-level MPC.
In addition, the control actuation input u 1−5 should also satisfy the actuation constraints.First, the individual control actuator has its physical constraint, which is mathematically presented as follows: where T dmax represents the maximum driving toque of the individual motor, and θ min , θ max are the minimum and maximum steering angle respectively.Then the friction circle constraint should also be considered to show the maximum available friction force of each tire: where F zfl , F zfr , F zrl , F zrr are the vertical loads on the wheels.Considering load transfer effects, the vertical load of each wheel can be estimated by the following equations [37]: where h is the distance of the vehicle Centre of Gravity (CG) from the ground.It is noted that the accelerations vx and vy and yaw rate r can be obtained from an Inertial Measurement Unit (IMU), and the measurement signals of v x and v y are available through the Global Positioning System (GPS) unit.
In order to solve the CA problem (14)(15)(16)(17)(18), the optimisation problem can be designed to minimise the virtual input error and the cost of using the control actuators: The cost function (19a) can be re-written in the following QCQP form: where Note also that the boundary constraint ( 16) should be satisfied.Q 1 and Q 2 are the diagonal weighting matrices on the virtual control error and control effort respectively.Q 1 = diag[q 11 ; q 12 ; q 13 ], q 11 > 0, q 12 > 0, q 13 > 0, where q 11 is the weighting factor for achieving the desired total longitudinal tire force, q 12 is the weighting factor for achieving the desired total lateral tire force, q 13 is the weighting factor for achieving the desired yaw moment; Q 2 = diag[q 21 ; q 22 ; q 23 ; q 24 ; q 25 ], q 21 > 0, q 22 > 0, q 23 > 0, q 24 > 0, q 25 > 0, where q 21 is the weighting factor for penalising the allocated total front tire longitudinal force, q 22 is the weighting factor for penalising the allocated rear left tire longitudinal force, q 23 is the weighting factor for penalising the allocated rear right tire longitudinal force, q 24 is the weighting factor for penalising the allocate front wheel steering angle, q 25 is the weighting factor for penalising the allocate rear wheel steering angle.In order to achieve the good control performance, the weightings of q 11 , q 12 , q 13 are set as much bigger than the weightings of q 21 , q 22 , q 23 , q 24 , q 25 .
In order to improve the computational efficiency and satisfy the needs for real-time CA optimisation, the above QCQP problem can be solved by the time-efficient solver based on Primal Dual Interior Point (PDIP) method in Forces Pro [38] in appendix A.
2) The second layer of CA method In the second layer of CA, the allocated individual longitudinal force from first layer is mapped into the individual motor torque or hydraulic brake torque.The mapping strategies of front axle and rear axle are presented in Figure 3(a,b), respectively.The main idea of the mapping strategy is trying to use the electric motor as much as possible (as electric motor can generate both traction torque and regenerated brake torque).If the electric motor cannot generate enough brake torque, the hydraulic brake will compensate the brake torque.In Figure 3(a), T mf and T bf represent the electric motor torque and hydraulic brake torque on the front axle respectively.T min mf and T max mf are the motor torque limit.In Figure 3(b), T mrl and T mrr are electric motors of rear left and rear right wheel and T br is the hydraulic brake torque on the rear axle.T min mrl ,T max mrl , T min mrr and T max mrr are the motor torque limits.It is noted that constraints (16a) in first layer of CA has guaranteed u 1 ≤ R ω , which is the precondition in Figure 3.

Simulation results
In this section, the proposed hierarchical path-tracking controller is validated using a high-fidelity vehicle dynamics model in CarMaker.The vehicle model is built based on an autonomous test platform developed by Delta Motorsport Limited.Specifically, the The simulation scenario chosen on the Silverstone racetrack, and the autonomous vehicle is trying to track the road center-line.The velocity profile with minimum-time solution along the whole racetrack is pre-calculated offline.Both the desired path and velocity profile are inputted into the hierarchical controller, and the controller distributes the steering and driving control inputs into the CarMaker vehicle model.The CarMaker model also provides the necessary information on the state values which can be then fed back to the hierarchical controller.The main vehicle parameters are presented in Table 2.A particular s-curve section of Silverstone track is selected to present the control performance of proposed controller.In order to find out the best sampling time and prediction horizon of the proposed high-level path-tracking MPC, the sensitivity analysis on different sampling time and prediction horizons (sampling time = 0.05, 0.075 s; prediction time = 2s, 4s, 6s) is carried out by comparing the path-tracking performance and velocity-tracking performance.When sampling time and prediction time are 0.05 and 2 s. respective, the best control performance can be achieved.Thus, the simulation results below are presented by using sampling and prediction time of 0.05 and 2 s.The control performance of the proposed CA ('MPC + CA') in the low-level is compared with two other, simpler vehicle configurations: the CA method without rear-wheel steering is simply presented as 'MPC + CA without RS' and the CA method without torque vectoring is presented as 'MPC + CA without TV'.It is noted that for the 'MPC + CA without RS', the weighting value related to rear-wheel steering angle in Q 2 is adjusted to disable the rearwheel steering in (19).For the 'MPC + CA without TV', the B matrix is adjusted to assume the motor torque is equally distributed among two rear wheels in (19).In order to show the advantage of proposed high-level MPC, the simulation results of a high-level feedback path-tracking controller in (8) and proposed low-level CA method are also presented as 'FB + CA' in following figures.Figure 4(a) shows the desired path.Figure 4(b) presents the path-tracking performance and Figure 4(c) shows velocity tracking performance of different methods.According to Figure 4(b), 'MPC + CA' has the smallest lateral tracking error compared with 'MPC + CA without TV', 'MPC + CA without RS' and 'FB + CA'. Figure 4(c) demonstrates that 'MPC + CA' and 'FB + CA' can fast track the desired longitudinal velocity profile though the online optimisation and achieve the maximum cornering speed, while other two methods both show a certain level of delay.Figure 5 shows the total normalised acceleration, which is calculated by the following equation: where a x and a y are actual longitudinal and lateral acceleration, respectively.It can be observed from Figure 5 that the 'MPC + CA' and the 'MPC + CA without TV' have larger normalised acceleration than 'MPC + CA without RS', which means that CA and CA without TV can take greater usage of tire force to achieve the limit-handling performance.The normalised acceleration of 'FB + CA' shows big spike, which causes the sudden increase  of tracking error in Figure 4(b) and suggests the less stability of high-level feedback controller compared with MPC.It should be noted that the normalised acceleration limit is larger than 1 in this study because a more 'potent' tire model is assumed.
In Figure 6, the simulation results of robustness analysis on proposed 'MPC + CA' controller are presented.First, it is assumed that the friction coefficient can not be estimated accurately. Figure 6 compares the path-tracking error and longitudinal velocity tracking error when the estimated friction coefficient is 1 and 0.7, respectively (the actual value is 1).When the friction coefficient is wrongly estimated as 0.7, the path-tracking error is relatively larger.This is because the actual total acceleration is larger than the wrongly estimated friction limit in low-level CA and the control allocation performance is compromised.Nevertheless, the path-tracking error is still acceptable as it is smaller than 0.5 m.Secondly, the measurement white noise of the longitudinal acceleration (variance is 0.03 m/s 2 ), lateral acceleration (variance is 0.06 m/s 2 ) and yaw rate (variance is Figure 6.The robustness analysis of the proposed control strategy 0.0003 rad/s) are considered in the simulation and the control performance is similar as the results when the measurement noise is not considered.In general, Figure 6 suggests that the proposed 'MPC + CA' controller has good robustness performance.
Figure 7 shows the tire forces and yaw moment performance for different controllers.It can be seen in Figure 7 that the desired longitudinal force and yaw moment are tracked quite well.The desired lateral force is much smaller than actual values.This is because the desired lateral tire force is calculated based on the lateral position tracking error, the small desired lateral force suggests that the vehicle has good lateral tracking performance.Figure 7(a) suggests that the total longitudinal tire forces of 'MPC + CA without RS' are much smaller than 'MPC + CA' and 'MPC + CA without TV', which can be the reason why 'MPC + CA without RS' have worse longitudinal velocity tracking performance compared to the other two strategies.According to Figure 7(b), the 'MPC + CA without RS' shows smaller total lateral tire force since the vehicle can only achieve front-wheel steering and the total available lateral tire force that can be generated is reduced.Figure 7 (d) shows that 'MPC + CA without TV' cannot generate additional torque-vectoring yaw moment.Figures 7(a,b,d) demonstrate that the total forces and the additional torque-vectoring yaw moment in the case of the 'MPC + CA' are larger than the other methods and consequently the overall path-tracking and velocity-tracking performance is the best amongst the controllers.The CA without TV disables the torque vectoring function and cannot generate additional controlled yaw moment when the vehicle is making the sharp turning as shown in Figure 7(d), so the tracking performance is compromised as shown in Figure 4.The CA without RS disables the rear-wheel steering function and limits the available total lateral tire force so the tracking performance is also compromised (as shown also in Figure 4).Finally, Figure 7(a-d) suggest that tire forces and yaw moment of 'FB + CA' method shows big spike during the sharp turning, which cause the compromised path-tracking performance.
Figure 8 compares the torque outputs of the three motors.The torques from two rear hub motors of 'MPC + CA' and 'FB + CA' in Figures 8(a,d) and 'MPC + CA without RS' in Figure 8(c) show obvious torque vectoring performance.Figure 9 suggests that the steering angles from the 'MPC + CA' and 'MPC + CA without TV' are larger than 'MPC + CA without RS', which is consistent with the results for the total lateral force in Figure 7(b).In Figure 9(c), the rear wheel steering angle of 'MPC + CA without RS' is zero.Figure 9(d) shows the steering angles of 'FB + CA' is much bigger than other methods, which impairs the stability of the vehicle.
In order to validate the real-time performance of the proposed hierarchical controller, the solving time of high-level path-tracking MPC and low-level CA method are presented in Figure 10.Since the sampling time of the proposed controller is 0.05s, the solving time in Figure 10 is smaller than 0.05 s and demonstrates that the real-time computational requirement can be satisfied.It is noted that the high-level MPC solver takes longer time to find a solution around 2, 5.5, 17, 19 and 21.5 s.The reason behind this is more iterations are required for the solver to find the optimal solution, or even the optimal solution cannot be found within the max iteration and only the sub-optimal solution is found.It is also noted that unlike the high-level MPC controller which required to solve the MPC optimisation problem in prediction steps, the low-level CA controller only need to solve the standard   including the Brush tyre model and the analysis on the computational efficiency is carried out [40].They set the sampling time as 50 ms (The execution time is close to 50 ms) with the time steps of 14.For our designed two-layer MPC, the execution time is around 20 ms with time steps of 40, which shows better computational efficiency compared with above two holistic MPC approaches.

Conclusion
In this study, a hierarchical two-level integrated path-tracking and CA controller is designed.The high-level path-tracking controller is composed by on a nonlinear rigid body dynamics model and low-level CA is designed using a QCQP formulation.The major findings can be summarised as follows: (1) By selecting the best sampling time of 0.05 s and prediction time of 2 s, and reduce the lateral tracking error within 0.5 m with maximum cornering speed during limit handling scenario in the suggested simulation platform, and shows better performance than a benchmark feedback path-tracking controller.(2) The proposed low-level CA method fully utilizes torque vectoring of two rear motors and front and rear-wheel independent steering, and the path-tracking and velocitytracking performance are improved when compared with a controller without torque vectoring or a controller without rear-wheel steering.(3) The total solving time of high-level MPC and low-level CA is smaller than the sampling time for the whole strategy, which shows that the proposed method can be implemented in real-time.
In future work, the real-time performance will be tested on a real-time target machine (such as dSpace or Speedgoat) before deploying the final solution on the autonomous test platform.

Figure 1 .
Figure 1.The structure diagram of the complete control system.

Figure 2 .
Figure 2. The structure diagram of the complete control system.

Figure 3 .
Figure 3.The allocation of motor torque and hydraulic brake toque (a) front axle (b) rear axle.

Figure 4 .
Figure 4.The tracking performance in the simulation (left) desired path (middle) lateral path-tracking error (right) velocity-tracking performance.

Figure 5 .
Figure 5.The normalised acceleration in the simulation.

Figure 7 .
Figure 7.The actual tire force and yaw moment in the simulation (a) total longitudinal force (b) total lateral force (c) total yaw moment (d) torque vectoring yaw moment.

Figure 8 .
Figure 8.The motor torque in the simulation (a) MPC + CA (b) MPC + CA without TV (c) MPC + CA without RS (d) FB + CA.

Figure 9 .
Figure 9.The wheel steering angle in the simulation (a) MPC + CA (b) MPC + CA without TV (c) MPC + CA without RS (d) FB + MPC.

Figure 10 .
Figure 10.The solving time of CA in the simulation.

Table 1 .
Algorithm to calculate the yaw moment limit.Assume feedback values v x , v y , r, a x , a y , μ, F zi (For i = fl, fr, rl, rr) are already available 1.For δ f

Table 2 .
Main parameters of Carmaker model.