Integrated Longitudinal and Lateral Control System Design and Case Study on an Electric Vehicle

*is paper presents the design of an integrated longitudinal and lateral controller for autonomous vehicle and field tests with an electric vehicle. First, the longitudinal design was studied which includes the spacing policy as the upper level controller and throttle and brake control as the lower level controller. A safety spacing policy was proposed considering both the vehicle states and the vehicle capability. A coordinated throttle and brake controller was also designed to ensure the vehicle pursuing the desired acceleration. Second, a multimodel lateral controller was proposed which can perform the lane tracking and lane changing manoeuvres. *en, an integrated control structure was proposed to manage both the longitudinal and lateral controller. Finally, simulation and visualization works were carried out to validate the proposed solutions. An electric vehicle experiment platform was also built, and field tests showed encouraging results.


Introduction
With the increasing demands of traffic safety, efficiency, environment protection etc., the automated vehicle and electric vehicle have been the hot topics for researchers and automobile manufactures. Normally, automated vehicle and electrified vehicle belong to different research fields, and significant progresses have been made in both fields separately in the past decades. However, progress regarding the integration of the two fields is still insufficient. Combining the two technologies within one vehicle appears to be an attractive and promising solution to cope with the many challenges of the future transportation [1,2]. e concept of vehicle automation was introduced by the General Motors Futurama exhibited at the 1940 New York World's Fair [3]. As summarized by Shladover [4], four waves of R&D on an automated road vehicle have been undertaken in the past decades, especially the many researches and projects in 1980s and 1990s till today, which form the main stream of today's vehicle automation. More recently, the SAE International released six levels of automation for on-road vehicles from level 0 (no automation) to level 5 (full automation), which help not only the public to distinguish and to be not puzzling from the massive emerging technologies but also the researchers and manufactures to draw the road map of development [5].
Longitudinal and lateral controls are the two main aspects in automated vehicle control. e longitudinal control system needs to handle several challenges, such as vehicle safety, fuel economy, string stability and traffic flow stability, and riding comfort. e longitudinal control system can be designed to be hierarchical with upper and lower levels, where the upper level controller determines the desired acceleration of the controlled vehicle, while the lower level controller decides the operations of the accelerate and brake actuators to pursuit the desired acceleration [6]. e spacing policy and its associated control law constitute the upper level controller, where the vehicle is considered a mass point, and the vehicle powertrain dynamic is neglected. Constant (velocity independent) as well as variable spacing policies (velocity dependent) have been proposed by Rajamani et al. [7], Wang and Rajamani [8], and Zhou and Peng [9]. It was shown that, for a velocitydependent intervehicle spacing policy, the wireless communication link enables driving at small intervehicle distances, whereas the string stability can be guaranteed. For a constant velocity-independent spacing policy, string stability cannot be guaranteed [10]. Lu et al. [11,12] indicated the cumulative time delay in the vehicle platoon will lead unstable string, and intervehicle communication was proposed to cope with this problem. e lower level controller within the longitudinal control system is closely associated with the vehicle powertrain dynamics. Fixed gain and gain scheduling PID controllers and a multiple surface sliding control method were proposed and validated through simulation and field test for the traditional powertrain vehicles [13,14]. However, the above model-based approaches require the exact engine and brake system dynamic models as a premise. Researches have shown that the fuel economy can be improved since the longitudinal system can smooth the vehicle velocity and coordinate between the throttle and brake paddles compared with the human drivers [15]. Besides, studies on hybrid and electric vehicles have also shown the improvements on fuel economy and mileage due to the longitudinal control algorithms [16].
Lateral control research is also a challenging issue to be further studied to improve traffic safety, mobility, and efficiency. Lane keep and lane change are the basic functions of the lateral control system. Similarly, the control architecture can also be designed to be hierarchical with two levels: strategy level and control level. Regarding the strategy level, different approaches have been proposed, such as trapezoidal acceleration trajectory for the lane change manoeuvers in [17,18], MOBIL (Minimizing Overall Braking Induced by Lane Change) method for both discretionary and mandatory lane change in [19], and a dynamic model that reflects driver control strategy of lane change behaviour and trajectory planning in [20].
In the control level, for the traditional Ackermann steering system, many results have been given in former researches. In [7], a gain scheduling scheme was incorporated into the lane keeping control algorithm and infrastructure guided lane change and automated free lane change were both realized. In [21], an optimization approach was used to design a velocity-adaptive lateral controller. e resulting controller, which is nonlinear with velocity, requires full-state feedback, and thus an observer is included. A PI controller was designed to minimize the error between the reference yaw rate and the measured one in [22]. ree vision-based lateral control strategies: lead-lag control, fullstate feedback, and input-output linearization, were introduced and compared through a series of experiments in [23]. Although these unique model-based approaches can lead to acceptable control results, their performance may be too sensitive to model mismatch and unmodeled dynamics. However, for the type of in-wheel-motor-drive electric vehicles, issues about torque and velocity assignments should be further studied.
Integrated longitudinal and lateral control is also a challenging issue. In [24], sliding mode control and backstepping control methods have been proposed for the automated vehicles in the low-speed operations (V < 60 km/h).
In [25], a T-S model based fuzzy control law, which considers the coupling between both the longitudinal and lateral models, was proposed. e "virtual drawbar" strategy was used in the longitudinal and lateral controller design. Simulation results showed that the longitudinal spacing error was less than 5% of safety distance; however, the orientation error was more than 40%. More recently, an optimal linear quadratic regulator (LQR) controller for integrated longitudinal and lateral closed loop vehicle/driver dynamics was proposed to follow the desired path in various driving manoeuvres in [26], the designed controller imposed corrected steering angle and torque on the wheels to keep the vehicle on the desired trajectory, and it was also compared with a PID controller.
In this work, at first, we propose a longitudinal control system including a safety spacing policy and a coordinate accelerate and decelerate controller to improve vehicle safety and efficiency. Second, a vehicle velocity-adaptive lateral control system is proposed, which does not need the exact vehicle model and can deal with vehicle model uncertainty.
en, the integration of longitudinal and lateral control system is proposed. Finally, simulation works are carried out to verify the proposed control method, and a case study on a low-speed electric vehicle platform is also demonstrated. Figure 1 shows the longitudinal control system architecture, which is designed to be hierarchical with an upper level and a lower level controller. e performance of the lower level controller is assumed to be a first-order system [6,28]:

Structure of Longitudinal Control System.
where α i is the actual acceleration of the controlled vehicle, α i des is the desired acceleration, and τ is a constant time lag.

Safety Spacing Policy (SSP).
When a human driver decides the intervehicle spacing, he considers not only the vehicle states but also the vehicle capability and environment conditions. Inspired by this, we proposed a safety spacing policy (SSP) as follows [27]: where S i is the desired intervehicle spacing for the ith vehicle, L is the constant distance that includes the proceeding vehicle length w i− 1 , t is the time delay of the longitudinal control system, _ x i is the ith vehicle's velocity in the inertial system, and d i is the ith vehicle's braking distance on horizontal and dry pavement. Let j i be the average deceleration value of the ith vehicle during the maximum brake action. en, d i � − _ x 2 /(2j), where _ x is the initial velocity of the ith vehicle braking.
c is the safety coefficient, a parameter that could be selected by a driver, which is relevant to road condition and vehicle role in a platoon. en, the spacing error of SSP is given by 2 Mathematical Problems in Engineering where In order to ensure the error δ i converges to zero, the dynamic of δ i is set as _ δ � − λδ i , where λ is a positive control gain. Differentiating equation (3), the desired acceleration can be obtained as In Figure 2, the intervehicle spacing is shown as a function of velocity under different safety coefficients c. e parameters used are shown in Table 1.

String Stability.
e string stability of a string of vehicles refers to a property in which spacing errors are guaranteed not to amplify as they propagate towards the tail of the string [8]. In this work, the system is string stable if the following condition is satisfied: where H(s) is the transfer function relating the spacing errors of consecutive vehicles, H(s) � (δ i /δ i− 1 )(s). For the linearized systems, the transfer function of the spacing error is the same as that of the velocity variation. en, Taking Laplace transforms of (7) gives erefore, from the requirement of inequality (5), we obtain e inequality constrain is always 0.4, and j i � − 7.32 m/s 2 , string stability is thus guaranteed for all vehicle speed above 1.83 m/s.

Traffic Flow Stability.
e traffic flow stability refers to a macroscopic property associated with speed and density of traffic in a section of a highway. e traffic flow is stable if the gradient of the traffic flow volume with respect to highway vehicle density is positive [8], i.e., where Q is the traffic flow volume and ρ is the traffic density. For the SSP, the traffic density at the steady state is given by We can get the aggregate velocity v in terms of density ρ based on (11): en, the traffic flow is e Q-ρ curve of the SSP is given in Figure 3. One can find that the SSP system holds as stable traffic flow (zQ/zρ > 0) when the density ρ blows a critical density ρ c (about 0.069 vehicle/m).

Coordinated Accelerate and Brake Controller.
e coordinated throttle and brake control system is proposed to realize vehicle longitudinal control, and it contains throttle controller, brake controller, and switching block, as shown in Figure 4. It is well known that the vehicle dynamic is a very complex nonlinear and time-varying system, and it is difficult to build an accurate mathematic model, which leads to the design of conventional modelbased control techniques challengeable and hard to implement on the real-time hardware. In view of this, fuzzy logic control is particularly suitable for this task with its advantage of the knowledge-based control approach [29]. e human driver's thoughts and operations can be expressed as a set of linguistic descriptions containing fuzzy quantities.

2.3.1.
rottle and Brake Fuzzy Controllers. e vehicle speed error E v and acceleration error E acc in the longitudinal direction are designed as where v des and a des are the desired velocity and acceleration values, while a and v are actual velocity and acceleration of the host vehicle, respectively. To imitate human driver's experiences, the vehicle speed error E v and acceleration error E acc are set as inputs of the throttle fuzzy controller, and throttle incremental value ΔTh is designed as the controller output. en, the current throttle value Th(n) can be represented as where Th(n − 1) is the throttle output of the previous time stamp and n denotes the time stamp. Hence, the vehicle longitudinal control task is represented as "IF-THEN" linguistic format, and each of member functions is divided into 5 sets; i.e.,  Figure 5. e centroid method is used for defuzzification. In general, larger error and larger error changing rate need larger compensation value according to driving experience. Hence, the fuzzy logic rules are generated from different combinations between different speed errors and acceleration errors, as represented in Table 2.
e structure of the brake controller is actually the same with the throttle controller, except for the brake incremental value ΔBr is defined as e current brake output becomes where Br(n) is the current brake output, ΔBr is the brake change, Br(n − 1) is the brake output in the previous moment, and n denotes the time step number of process.

Switching Logic for rottle and Brake.
In order to make the separated throttle and brake controller working coordinately, a logic switch block is required. e basic functions of the logic switch are as follows: (i) Avoid simultaneously operations at both throttle and brake pedals (ii) Before stepping down the throttle, step off the brake and vice versa (iii) Avoid frequent switches from one pedal to the other  To achieve these purposes, a switching logic is constructed by the vehicle current status to determine which action should be operated, i.e., throttle output Th(n), braking output Br(n), or no action. Moreover, considering limitation of physical component, frequently switching between throttle pedal and brake pedal should be prohibited. Hence, the threshold value Δh � 0.2 m/s 2 is set to suppress frequently switching [14]. e vehicle can also utilize the air resistance and rolling resistance to decelerate when a soft deceleration is required. Flowchart of switch logic is shown in Figure 6.

Bicycle Model.
A "bicycle model" of the vehicle lateral dynamics with two degrees of freedom is considered. e bicycle model can be represented into the standard state space equation [6]: where X is the state variable, X � e 1 _ e 1 e 2 _ e 2 T , and

Mathematical Problems in Engineering
where e 1 is the distance of the center of gravity (C.G.) of the vehicle from the center line of the lane, e 2 means the orientation error of the vehicle with respect to the lane, δ is the steering angle, ρ denotes the road curvature, m is the vehicle mass, V x /V y represents the longitudinal/lateral velocity, I z is the yaw moment of inertia, l f /l r means the distance between the C.G. and the front/rear wheels, and C af /C ar means the cornering stiffness of the front/real wheels. It can be found that the longitudinal velocity V x is not always constant in the system matrices in (18). en, the vehicle model becomes LTV (linear time variant) model. e variations of vehicle velocity will lead to different vehicle lateral performances.

Multimodel Fuzzy Controller.
Based on the divide-andconquer strategy, the multimodel fuzzy controller is designed to deal with the parameter variations in vehicle lateral dynamics. Multimodel approaches develop local controllers corresponding to typical operating regions. e global control output is obtained by the integration of local ones.
With the consideration of the vehicle velocity in highway operation, we divide the velocity range into four regions. In addition, an overlap of 10 km/h is set for two adjacent regions to avoid the hard switch between the adjacent controllers.
e operating regions are shown as low [0, 35], medium-low [25,65], medium-high [55, 95], and high [85, 120] km/h. e frame of the multimodel lateral control system is illustrated in Figure 7, where y l is the actual lateral yaw angle and trajectory and y d is the desired lateral yaw angle and trajectory.
For each local controller, the fuzzy algorithm with the same structure is used for steering angle control. However, more simple structure is adopted for each local controller, compared with the longitudinal controller, which benefits from the subdivision of vehicle lateral dynamic. e lateral deviation E1 and the orientation error E2 are set as controller inputs, and their linguistic variables are {Left, Center, Right}. e controller output is the steering angle of the front wheel δ, whose linguistic variables are designed as {LeftB, LeftS, Center, RightS, RightB}.
eir membership functions are shown in Figures 8(a)-8(c), respectively. e values of the variables presented in the figures are given in Table 3. e fuzzy rules are established based on expert's knowledge, simulation tests, and limitation of vehicle physical performance, as shown in Table 4. e fusion block is designed to integrate the four local controllers into a global one. In fact, the fusion block determines the weighting coefficient of each local controller. It can be described as where U i (i � l, ml, mh, and h) are the outputs of the corresponding local controllers: low, medium-low, mediumhigh, and high. And f l (V x ), f ml (V x ), f mh (V x ) and f h (V x ) are the weighting coefficient functions for the corresponding local controllers, and they are functions of vehicle velocity. ese four weighting coefficient functions are described in Figure 8(d).

Integrated Longitudinal and Lateral
Control System e longitudinal and lateral controllers have been designed in the previous sections. However, a global control system, which can perform the two control tasks simultaneously, is preferred for vehicle automatic driving. Hence, the integration of longitudinal and lateral controllers is presented in this section. e uncoupled longitudinal and lateral control system has been proposed by Wijesoma et al. [31,32]. However, the coupling effects of vehicle speed on steering angle (and hence angular velocity), and vice versa, was not explicitly accounted for. e uncoupled longitudinal and lateral controllers are demonstrated as Figure 9.
It has been noticed that vehicle velocity can severely impact both longitudinal and lateral dynamics in the previous sections. e velocity is the variable controlled by the longitudinal controller, while it is the input variable of the lateral controller. erefore, the integrated control system, in which the longitudinal and lateral controllers are coupled, is developed to perform better performance, as shown in Figure 10, where a i is the actual acceleration and v i is the actual velocity. In this integrated control structure, the velocity of a vehicle changes when it is turned to more complex manoeuvres requiring simultaneously operations both in longitudinal and lateral directions can be reached.

Simulation for the Longitudinal Controller.
A two-vehicle platoon is considered. e leader is a manually driven vehicle, and the follower is an automatic vehicle equipped with the proposed longitudinal control system which includes the upper and lower controllers, as described in Section 2. e leader performs a series of operations to change its longitudinal speed, and then we test the performances of the longitudinal control system by evaluating the follower's speed, acceleration, and intervehicle spacing, as well as their associated errors. e simulation scenarios are designed to be rather "complex," which include highand low-speed cruise, acceleration, and deceleration operations. Furthermore, since the road grade can be regarded as the external disturbances, extended simulations with inclined road conditions are also carried out to test the robustness of the proposed longitudinal control system.

Horizontal Road Condition.
e horizontal road condition is first considered. e simulation scenario is described as follows: at beginning, the two vehicles run at a constant speed of 10 m/s. And then, the leading vehicle's speed is gradually increased to a high speed of 26 m/s. After that, it begins to decelerate to the speed of 5 m/s. Successionally, the leading vehicle accelerates back to the speed of celeration is detailed in Figures 11(a) and 11(b), respectively. e follower's speed and speed error are shown in Figures 12(a) and 12(b). One can find that good velocity tracking is achieved by the proposed throttle/brake controller during the whole test period. e speed error is always less than 0.15 m/s. Figures 13(a) and 13(b) show the final control results of the throttle and the brake, respectively. We can find that the throttle controller and the brake controller work coordinately.
ere is neither simultaneous operation nor frequent switching between the two actuators during the entire period. e operations of the throttle and brake are   [30]).

Local controllers Low
Medium-low Medium-high High  Figure 9: Uncoupled longitudinal and lateral control system. Mathematical Problems in Engineering rather smooth except several little oscillations in the throttle results. In fact, the main reason for these little oscillations is the gear shift operations in the transmission system.

Inclined Road Condition.
In this test, the road grade is considered. We use the same two-vehicle platoon and the same scenario that we used in the former test. e road grade profile is given in Figure 14(a), which includes downhill and uphill sections like the real road. e results of the following vehicle's speed error are given in Figure 14   e proposed lateral controller is also tested with a bicycle model. e parameters can be found in Table 5. e desired trajectory for the experimental vehicle is shown in Figure 15 Figure 15(d) shows the lateral acceleration curves. We can nd the multimodel controller can ensure good tracking performance in di erent speed scenarios.
Furthermore, the uncertainties of the vehicle parameters are also considered. From equation (18), one can nd that     the vehicle lateral dynamics can also be influenced by vehicle parameters, such as vehicle mass, movement inertia, and wheel cornering stiffness. e variations of the parameters are listed in Table 6. We use the same input trajectory that we used in the former simulation, as shown in Figure 15, and the vehicle speed is set to 60 km/h. Figures 16(a) and 16(b) show the time history of the lateral position error and lateral acceleration, respectively. It can be seen that the differences between these two cases are very small. Hence, the proposed multimodel lateral controller shows a strong adaptability to the uncertainties of vehicle load, moment inertia, and wheel cornering stiffness.

Integrated Longitudinal and Lateral Controls in a Visualization Environment.
e cosimulation with Matlab/ Simulink and AMESIM is also carried out to test the proposed control system with more realistic vehicle models and test environments. Furthermore, the visualization of simulation can also be realized by using AME Animation function, which can facilitate the analysis and demonstration of the results. A vehicle dynamics model with 15 degrees of freedom is established in AMESIM, including suspension module, aerodynamic module, tire, road, sensors, powertrain unit, braking system, and steering system. e testing path is also designed by using the Reference Trajectory Designer APP of AMESIM. e track is 1.54 km long with various road profiles, as shown in Figure 17(a). e reference velocity profile is calculated from the trajectory curvature, as shown in Figure 17

RCP Test on a Low-Speed Electric Vehicle
e Rapid Control Prototype was established based on a modified low-speed electric vehicle using dSPACE Micro-AutoBox II to test the proposed control algorithms. e vehicle is a rear-wheel drive vehicle using a central electric motor, and the front axle is the steering axle. e throttle, brake, and steering system of the vehicle were well modified to perform the autonomous driving task, as shown in Figure 18. Different scenarios of longitudinal and lateral motion control experiments were carried out. e velocity following scenario including acceleration and deceleration operations was performed, as shown in Figure 19(a). e controlled vehicle can follow the desired velocity by operating the throttle and brake pedals. e vehicle lane change experiment was also carried out. e result steering angle is shown in Figure 19(b). e vehicle can follow the desired steering angle to perform the lane changing maneuver.

Conclusion
In this paper, the integrated longitudinal and lateral control system for autonomous vehicles has been studied, and a case study on a low-speed electric vehicle was carried out to validate the proposed solutions. Some conclusions are obtained: (i) A safety spacing policy was proposed, which considers both the vehicle states and vehicle capabilities. A coordinated throttle and brake controller was also designed for the vehicle to pursue the desired acceleration while ensuring smooth operation to reduce energy waste. e proposed fuzzy based controller is not a model-based approach, and it controls only the pedals. erefore, it can be applied in either traditional powertrain or electrified powertrain. (ii) A multimodel fuzzy controller was applied to deal with the vehicle lateral control, which considers the influence of vehicle velocity variations on lateral dynamics. (iii) An integrated control structure was proposed, in which the longitudinal and lateral controllers were coupled for the fully automated vehicle motion control. It is robust to the variations in vehicle speed and coupling effects between longitudinal velocity and lateral dynamics. Simulations and visualization works were carried out to validate the proposed controllers. A low-speed electric vehicle platform was also built to carry out field tests, and the results showed the proposed integrated control system can manage the longitudinal and lateral control task of the electric vehicle.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.