#### Abstract

This paper focuses on the lane departure avoidance system for a four in-wheel motors’ drive electric vehicle, aiming at preventing lane departure under dangerous driving conditions. The control architecture for the lane departure avoidance system is hierarchical. In the upper controller, the desired yaw rate was calculated with the consideration of vehicle-lane deviation, vehicle dynamic, and the limitation of road adhesion. In the middle controller, a sliding mode controller (SMC) was designed to control the additional yaw moment. In the lower layer, the yaw moment was produced by the optimal distribution of driving/braking torque between four wheels. Lane departure avoidance was carried out by tracking desired yaw response. Simulations were performed to study the effectiveness of the control algorithm in Carsim®/Simulink® cosimulation. Simulation results show that the proposed methods can effectively confine the vehicle in lane and prevent lane departure accidents.

#### 1. Introduction

In the last decade, a large portion of highways traffic accidents lead to heavy casualties [1] due to drivers’ inattention, drowsiness, or fatigue. In particular, Unintended Lane departure accidents exceed 15% of traffic accidents that occurred over the last 10 years in Germany [2]. Moreover, road departure accounted for 28% of fatal traffic accidents that occurred in 2005 in USA [3]. To prevent unintended lane departure accidents, various lane keeping assistance systems (LKAS) or lane departure avoidance systems (LDAS) [4] have been developed to automatically adjust vehicle’s dynamics or trajectory to confine the vehicle in its driving lane.

To realize LKAS or LDAS, several types of control inputs have been pursued in literature. According to active control means, the LDAS can be classified into three types, that is, systems using steering control, systems using differential braking control, and systems using differential driving/braking control.

The steering control, which overlaid a steering torque or a steering angle by a DC motor mounted on steering column, has been deeply and widely investigated [5–9]. As the steering wheel is controlled by LDAS and drivers simultaneously, the interferences and conflicts between the driver and control system are the major challenges of the lane departure avoidance control with only front steering wheel angle/torque input [10]. Lane departure avoidance control with four-wheel steering has two independent inputs, namely, front- and rear-steering angles. Four-wheel steering provides superior lane departure avoidance performance in lateral and yaw motions to the only front steering angle/torque input [11]. However, four-wheel steering has not been widely used in passenger cars.

The control of vehicle’s lateral dynamics using differential braking technique was proposed by Pilutti et al. in 1995 [12]. Nissan is the first to offer a LDAS using differential braking control [13]. The LDAS using this way has been theoretically investigated in authors’ previous works [14–16]. The LDAS with differential braking input can provide satisfactory lane departure avoidance performance and resolve the conflicts between the driver and control system. To keep the vehicle in the lane and avoid drivers’ discomfort a lane departure assistance system by the coordinated control of steering and differential braking control was developed in previous researches [9, 17–19].

The third technique is that differential driving/braking control by the output torque of each wheel motor is individually controlled. A wheel motor can provide more accurate and faster torque response compared with hydraulic system. The distributing driving torque between rear wheels has been used to fulfill the lane keeping functions [20]. For the four in-wheel motors drive electric vehicle is able to adopt either driving or braking torque generated by the in-wheel motors, and the torque of each in-wheel motor can be independently and precisely controlled [21]. It means an improved lane departure avoidance control with high performance can be achieved.

In this paper, a new lane departure avoidance control method using differential driving/braking control for enhancing the active safety of electric vehicles is proposed. In Section 2, the architecture of lane departure avoidance system is introduced. In Section 3, decision-making and vehicle dynamics planning are studied. In Section 4, a sliding mode controller (SMC) is designed to follow the desired dynamics. In Section 5, an optimal allocation algorithm is developed for torque allocation between the wheels. In Section 6, the simulation of the proposed methods is performed. The contribution of this research and introduction of future works are summarized in Section 7.

#### 2. Structure of Lane Departure Avoidance System

The control architecture for lane departure avoidance system is hierarchical, as shown in Figure 1. The upper controller is composed of decision-making and vehicle dynamic planning. Decision-making is conducted by the time to line cross (), the distance to lane center (), and driver’s intention. The desired vehicle dynamic planning is carried out by a preview driving model and a 2-DOF linear vehicle model. The error () between actual dynamic () and desired dynamic () is input into middle controller, which tracks the desired dynamic through differential driving/breaking. In the lower controller, an optimal torque allocation method is used to coordinate output torque of all wheels.

#### 3. Upper Controller

##### 3.1. Decision-Making

The rotational torque applied by the driver to the steering wheel and the state of vehicle’s steering switch can be combined to identify driver’s intention. If steering torque was greater than 2 Nm or steering switch was turned on, control system will assume that the driver has a clear intention to manipulate vehicle.

Time to line cross (TLC) and distance to lane center (DLC) are used jointly to decide whether to turn on lane departure avoidance control or not.

Lane departure avoidance control will be turned on when either of the following conditions is satisfied: ① ≥ 0.75 m. ② ≤ 0.75 s.

Lane departure avoidance control will be turned off when either of the following conditions is satisfied: ① < 0.3 m, and > 2 s. ② Driver’s intention is obvious. ③ ≤ 65 km/h. ④ The lane identification failure.

##### 3.2. Desired Vehicle Dynamic Planning

###### 3.2.1. Preview Driving Model and Vehicle Dynamics Model

The desired vehicle dynamics to prevent lane departure is planned by a preview driving model and a 2-DOF linear vehicle model.

Assuming that the motion of the vehicle is constrained by Ackerman geometry, an optimal preview model is used to calculate the desired steering angle () required for eliminating vehicle-lane deviation [14]. where is the wheel base, is the side slip angle, is the longitudinal velocity, is the preview time, and is the lateral deviation at the preview point.

A linear 2-DOF vehicle model is considered as a reference vehicle model for lane departure avoidance control. where is the vehicle mass, is the front (rear) axle equivalent cornering stiffness, is the longitudinal distance between front (rear) axle and center of gravity, is the additional yaw moment, is the yaw moment of inertia, and is the steering angle of the front wheel.

According to the kinemics relations of the vehicle, the slip angles of front wheel () and rear wheel () are as follows:

###### 3.2.2. Tire Model

At large slip angles, the tire model can be no longer linear. The lateral tire force depended on slip angle , the normal tire load (), the tire-road friction coefficient (), and the longitudinal tire force. To calculate lateral tire force for a wide range of operating conditions considering large slip angle and slip ratios, a simplified magic formula is adopted, which can be expressed aswhere subscript denotes the index indicating front left tire /front right tire (fr)/rear left tire (rl) and rear right tire (rr); is the lateral tire force of each wheel; is the vertical tire force of each wheel; , , and are fitting coefficients and can be obtained by curve fitting.

Under different vertical loads and tire-road friction coefficients, the calculated lateral forces are compared with test data, as shown in Figure 2. The results show that the simplified magic formula tire model can describe the nonlinear characteristics of tires with acceptable accuracy.

Then, the equivalent cornering stiffness of each tire can be given bywhere is the slip angle of each wheel.

###### 3.2.3. Desired Yaw Rate Response

The peak lateral acceleration must be bounded by the tyre-road friction coefficient as follows:where is the friction coefficient, is the gravity unit, and is the safety factor (in this paper, the value of is set as 0.85).

The maximum yaw rate must be limited by the friction coefficient of the road. Thus, the desired yaw rate response () and the desired steering angle () can be described by

#### 4. Middle Controller

##### 4.1. Yaw Rate Tracking

To make a vehicle follow the desired yaw rate, a sliding mode controller is adopted to calculate the additional yaw moment (), which is required by dynamics tracking. The sliding surface is defined by

Differentiating the above equation:

Setting yields the control lawwhere is the control parameter of SMC and is greater than zero.

##### 4.2. Speed Tracking

The deviation between actual speed and desired speed is determined by current throttle opening. It can be expressed as

A PI controller is designed to determine the sum of longitudinal forces () required to follow current throttle opening, as follows:where is the proportional gain and is the integral gain.

#### 5. Lower Controller

The lower controller determines the output torque of the in-wheel-motor at each wheel, so as to meet driver’s desired speed and generate a net yaw moment that tracks the desired value for additional yaw moment determined by the middle controller. Control allocation technology is utilized in this study for torque allocation.

When the condition of front wheel is small, the total longitudinal force and additional yaw moment can be expressed aswhere

The primary objective of the lower controller is to track the desired yaw response and make minimum allocation error. Another objective of the lower controller is to minimize the energy consumption of the in-wheel-motors.

According to the objectives of torque allocation, the optimization problem can be described by Sequence Least Squares (SLS). It is expressed as follows:where is the weighting matrix, which shows the importance of each generalized force. is the desired longitudinal tire force. To minimize the energy consumption, is set as . and are decided, respectively, by the tyre-road friction coefficient constraint and actuator constraint, which is the maximum torque range of in-wheel-motors. is the diagonal weighting matrix, which shows the different of vertical load between each wheel, and the elements arewhere is the vertical load of each wheel. consists of static loads and dynamic loads caused by load transfer:

A weighting factor is used in this study. Then the SLS problem can be transformed into a Weighted Least Squares problem (WLS):

To minimize the allocation error, * η* is usually set to be very large. This optimization problem is solved by an active set method [22].

Considering the dynamics of each wheel, the relationship between tyre longitudinal force () and driving/braking torque () can be expressed as follows:where is the wheel radius, is the wheel inertia, and is the angular speed of each wheel.

The output torque of the in-wheel-motor is limited by motor speed. The relationship of the output torque and motor speed is shown in Figure 3.

The dynamic response of the in-wheel-motor can be described as a first-order lag:where is a time constant obtained through experiments.

#### 6. Simulation Results

In order to verify the effectiveness of the proposed method, a high-fidelity four-wheel-independent-drive electric vehicle (4WID-EV) model developed in Carsim and Matlab/Simulink is applied in this study. The single lane change test is chosen as the simulation test maneuver. The target road is designed according to ISO-3888-2-2002 and is shown in Figure 4. Table 1 shows the main vehicle parameters and their values.

**(a) Coordinate**

**(b) Curvature**

To evaluate the work load of each tyre, tyre usage () is defined as

*Maneuver 1. *The vehicle is driven on the target road at the speed of 80 Km/h. The width of lane is 3.5 m and tyre-road friction coefficient is 0.8. To simulate an unintended lane departure, the steering wheel is not operated during 25 s. The vehicle will deviate from lane center gradually.

The decision-making is shown in Figure 5. At 2.21 s, ≤ 0.75 s, LDAS is activated. At 3.08 s, > 2 s and ≥ 0.75 m; it means that the vehicle has not returned to the center zone of the lane; thus LDAS maintain output. At 4.87 s, < 0.3 m, and > 2 s, LDAS is deactivated. After 5 s, the driver restored from inattention, drowsiness, or fatigue to control the vehicle. The decision logic of LDAS is shown in Figure 5(c). “1” indicates LDAS is activated. “0” indicates LDAS is deactivated.

**(a) TLC**

**(b) DLC**

**(c) Decision logic**

The control results of Maneuver 1 are shown in Figure 6. The output torque of the in-wheel-motor at each wheel is illustrated in Figure 6(a). During LDAS activation, the proposed method can allocate optimal torque to each wheel in time with the consideration of tyre loads, the tyre-road friction coefficient constraint, and actuator constraint. As seen in Figure 6(b), the vehicle is able to track the desired yaw response accurately and quickly when LDAS is activated. The peak lateral acceleration is 0.33 g, which is far less than the upper bound defined by (7). It indicates that the vehicle has enough lateral stability margin. The tyre usage of each wheel is illustrated in Figure 6(d). During LDAS activation, the tyre usage of each wheel is within a reasonable range. Although the output torque of front in-wheel-motors is larger than rear in-wheel-motors, the tyre usage is on the contrary. The difference is caused by the distribution of the center of gravity and load transfer. Figure 6(e) shows the corresponding side slip angle of the vehicle. The side slip angle is at a small value (the minimum value is −0.024 rad). It means that the vehicle is able to track the desired trajectory. As shown in Figure 5(b), the maximum is 0.818 m. It means that the LDAS can prevent lane departure effectively.

**(a) Driving/braking torque**

**(b) Yaw rate tracking**

**(c) Lateral acceleration response**

**(d) Tyre usage**

**(e) Side slip angle**

*Maneuver 2. *The simulation conditions are the same as Maneuver 1 except the tyre-road friction coefficient which is only 0.4.

The decision-making is shown in Figure 7. During 25 s, LDAS is activated twice. The maximum is 1.4 m, as shown in Figure 5(b). It means that the LDAS can still prevent lane departure effectively even in the condition that the tyre-road friction coefficient is lower (e.g., wet road).

**(a) TLC**

**(b) DLC**

**(c) Decision logic**

The control results of Maneuver 2 are shown in Figure 8. The maximum output torque of each wheel is smaller than that shown in Figure 6(a). Figure 8(a) illustrates that the optimal output torque is constrained by the tyre-road friction coefficient. As shown in Figure 8(b), the desired yaw rate reaches the upper bound value, which is bounded by the tyre-road friction coefficient . During LDAS activation, the vehicle can track the desired yaw response accurately and quickly by differential driving/braking control. The peak lateral acceleration is 0.2 g, which is far less than the upper bound defined by (7). It indicates that the vehicle has enough lateral stability margin in spite of the wet road. The tyre usage of each wheel is illustrated in Figure 8(d). According to equation (23), the tyre usage of each wheel will become larger for the lower tyre-road friction coefficient. On the wet road, the tyre usage is less than 1; it indicates that all wheels are not at the risk of saturation. As shown in Figure 8(e), the maximum side slip angle is only 0.015 rad. It means that the vehicle can track the desired trajectory effectively.

**(a) Driving/braking torque**

**(b) Yaw rate tracking**

**(c) Lateral acceleration response**

**(d) Tyre usage**

**(e) Side slip angle**

*Maneuver 3. *The simulation conditions are the same as Maneuver 1 except the speed of 120 km/h.

The decision-making is shown in Figure 9. During 25 s, LDAS is activated thrice. The maximum is 1.62 m, as shown in Figure 9(b). It means that the LDAS can still prevent lane departure in curved roadway with overspeed.

**(a) TLC**

**(b) DLC**

**(c) Decision logic**

The control results of Maneuver 3 are shown in Figure 10. Because the output torque of the in-wheel-motor is constrained by the specification of in-wheel motor (see Figure 3), the maximum output torque of each wheel is smaller than that shown in Figure 6(a). Figure 10(b) indicates that the vehicle can track the desired yaw response quickly when LDAS is activated, although the maximum overshoot of yaw rate is 11.9%. The desired yaw rate is able to reach the upper bound value, which is bounded by the tyre-road friction coefficient and speed . The peak lateral acceleration is 0.35 g less than the upper bound calculated by (7). It indicates that the vehicle has enough lateral stability margin in spite of the high speed. The tyre usage of each wheel is illustrated in Figure 10(d). According to (23), the tyre usage of each wheel will become smaller for output torque of the in-wheel-motor limited by the motor speed. The tyre usage is less than 1; it indicates that all wheels are not at the risk of saturation. As shown in Figure 10(e), the maximum side slip angle is only 0.015 rad. It means that the vehicle can track the desired trajectory, although the lateral displacement of the vehicle is larger compared to low speed maneuver.

**(a) Driving/braking torque**

**(b) Yaw rate tracking**

**(c) Lateral acceleration response**

**(d) Tyre usage**

**(e) Side slip angle**

The maximum side slip angle on wet road is smaller than that on the dry road. The objective of the stability system is to track a desired yaw rate, which is limited by the friction coefficient of the road and vehicle speed. As shown in Figures 6 and 8, the proposed method can track the desired yaw rate by driving/braking torque allocation. On the wet road, the desired yaw rate is limited to ensure vehicle stability. Thus, the amplitude of the output torque of in-wheel-motors is smaller than that on the dry road. This can avoid large side slip angle and prevent vehicle skid and loss of control. However, the deficiency of this control method is that the lateral displacement of the vehicle will increase, as shown in Figures 5(b) and 7(b).

#### 7. Conclusion

In this paper, a hierarchical method for LDAS has been presented on the basis of differential driving/braking control. The proposed method consists of three parts: an upper-level controller, a middle-level controller, and a lower-level controller. The upper-level controller was designed to monitor driver intention and vehicle-lane deviation and to determine whether an intervention is required. Another task of the upper-level controller is to determine the desired dynamics (desired yaw rate). To tack the desired dynamics, sliding mode control method and PI control method were used in the middle-level controller. The lower-level controller was designed to distribute driving/braking torque between each wheel. To achieve optimal allocation of the output torque of the wheel motors, a control allocation method was adopted. The performances of the proposed method were evaluated via three software-in-loop tests. Simulation results show that the presented method can effectively prevent the lane departure by differential driving/braking control.

The proposed method is verified in SIL test, which is different with hardware-in-loop (HIL) and real driving experiment, for example, signal disturb or delay. To this end, the proposed LDAS will be implemented in HIL platform and a prototype vehicle in the future.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

This work was supported by the Natural Science Foundation of Fujian Province, China (2015J01196) and the Scientific Research Foundation of Fuzhou University, China (XRC1430, 2014-XQ-17).