Human–Machine Cooperative Control of Intelligent Vehicles for Lane Keeping—Considering Safety of the Intended Functionality

: Reasonably foreseeable misuse by persons, as a primary aspect of safety of the intended functionality (SOTIF), has a signiﬁcant effect on cooperation performance for lane keeping. This paper presents a novel human–machine cooperative control scheme with consideration of SOTIF issues caused by driver error. It is challenging to balance lane keeping performance and driving freedom when driver error occurs. A safety evaluation strategy is proposed for safety supervision, containing assessments of driver error and lane departure risk caused by driver error. A dynamic evaluation model of driver error is designed based on a typical driver model in the loop to deal with the uncertainty and variability of driver behavior. Additionally, an extension model is established for determining the cooperation domain. Then, an authority allocation strategy is proposed to generate a dynamic shared authority and achieve an adequate balance between lane keeping performance and driving freedom. Finally, a model predictive control (MPC)-based controller is designed for calculating optimal steering angle, and a steer-by-wheel (SBW) system is employed as an actuator. Numerical simulation tests are conducted on driver error scenarios based on the CarSim and MATLAB/Simulink software platforms. The simulation results demonstrate the effectiveness of the proposed method.


Introduction
Intelligent vehicle and automated driving technologies have attracted growing attention for their significant advantages, including improved security, better convenience, and greatly reduced congestion costs [1][2][3]. Automated driving technology is classified into six levels by the Society of Automotive Engineers (SAE) [4,5]. Fully automatic driving technology has the challenges of legal restrictions, accident responsibility, and perception difficulties. As a feasible transition for automated driving at the present stage, cooperative driving possesses vital academic value. Meanwhile, cooperative driving for lane keeping has been developed to reduce the driver's workload and satisfy driver intentions [6][7][8][9].
However, driver error has become an important issue of road safety around the world [10,11]. According to statistics from the National Highway Traffic Safety Administration (NHTSA), there are approximately 60,000 traffic accidents that take place due to driver sleepiness-related problems every year [12]. In addition, driver errors contribute entirely or partially to nearly 90% of road accidents [13]. Reasonably foreseeable misuse by persons is a principal aspect of SOTIF [14]. Meanwhile, driver error due to distractions or drowsiness is a critical factor that leads to lane departure [15].
Many cooperative control methods have been developed to prevent lane departure and reduce traffic accidents, including integrated control of steering and braking [16], a shared authority allocation strategy [17,18], a fuzzy logic approach [19], a multi-state model-based end-to-end method [20], a sliding mode (SM) control algorithm [21], and an active disturbance rejection control (ADRC) algorithm [22]. Nevertheless, these studies only emphasize lane keeping performance through continuous intervention and neglect driving freedom.
Benloucif et al. [23] considered driving freedom in a lane keeping task and proposed a cooperative trajectory-planning method according to driver actions and intentions. Wang et al. [24] developed a novel lane keeping system, and a single-point preview model is utilized to describe driver steering behavior. Sentouh et al. [25] introduced a control authority allocation method based on energy spent by the driver, driver satisfaction level, and contradiction level between the driver and autonomous controller. The above studies emphasize driving freedom and neglect the effect of driver error on lane keeping performance.
Therefore, a proper balance between lane keeping performance and driving freedom is a challenge when driver error takes place. The evaluation of driver error is one premise for achieving the balance. Zhang et al. [26] proposed a novel shared-control scheme and tested the method in a driver error scenario. Guo et al. [27] designed an MPC-based sharedsteering control method. The controller took over control when the driver released the steering wheel. Merah et al. [28] used a fuzzy controller to describe driver behaviors, such as when the driver reacted badly. However, the above studies lack a theoretical analysis of driver manipulation error. Driver manipulation error evaluation is challenging due to the dynamic variation in driver behaviors and driving scenarios. The cooperative control system (CCS) contains two basic categories based on the control framework, including coupled shared control and uncoupled shared control [29]. Coupled shared control is relevant to haptics feedback control, and the human-machine interacts through force feedback [30]; human-machine conflicts come out due to physical coupling. Uncoupled shared control is also known as indirect shared control, which works by integrating the outputs of the driver and the CCS using weighted summation. The SBW system is suitable for implementing indirect shared control without direct physical conflicts [31,32]. Accordingly, the driver's control authority depends on how we design the cooperative controller. Based on this, the indirectly shared control framework is employed in our scheme.
The cooperative control authority allocation is the crucial point for achieving the balance. Zhang et al. [26] proposed a shared control scheme for lane keeping with a fixed authority. Guo et al. [27] designed an MPC-based shared steering control method. This method ensures seamless control transfer between the system and the driver. Nguyen et al. [33] developed a dynamic authority for shared lateral control, with the authority factor being a bell-shaped function with respect to driver activity. Li et al. [34] developed a dynamic authority related to driving risk; driver authority rises with increases in driving risk in this design principle. However, driver authority should be reduced in a timely manner if driver error caused the driving risk.
To resolve the above shortcomings, we develop a novel cooperative control scheme for lane keeping with consideration of driver error. The highlights of this paper are: (1) A cooperative control scheme achieves a proper balance between lane keeping performance and driving freedom. (2) Dynamic driver error, as a primary aspect of SOTIF, is assessed by the proposed model based on a typical driver model in the loop. (3) A dynamic authority allocation method adapts to variations in driver error, lane departure, and velocity.
This paper is divided into five sections. Section 2 presents related dynamic models. Section 3 introduces the proposed cooperative control method; the safety evaluation strategy is designed and, additionally, the dynamic authority allocation method and an MPC-based controller are presented. In Section 4, the results are detailed and analyzed. Section 5 provides the conclusions of this study.

Related Dynamic Models
The related dynamic models used for cooperative control contain a vehicle dynamics model and an SBW system model.

Vehicle Dynamics Model
The vehicle dynamics model is shown in Figure 1. By applying Newton's law to the vehicle's center of gravity, the dynamic model can be written as [35]: x cos ϕ −  X are the vehicle lateral and longitudinal velocities in the inertial frame, and ϕ is the vehicle orientation (yaw angle) in the inertial fame. Equation (1) can be rewritten in the following compact form: where the state and input vectors are ξ = . y, .

Steer-by-Wire System Model
The architecture of the SBW system is illustrated in Figure 2. The steering wheel angle sensor can detect the actual driver steering angle, and the steering angle can be transmitted to the front wheel subsystem. The function of the front wheel subsystem is to track the expected front wheel steering angle. The differential equation of the front wheel steering motor can be written as [36]: where T m , δ m , J m , and G m are the steering motor output torque, angular position, moment of inertia, and reduction ratio, respectively. B m is the steering motor shaft damping, k f is the steering actuator assembly stiffness, x r is the rack displacement, and r p is the pinion radius. The front wheel steering angle δ f = δ m /G m can be obtained. The steering motor goal is to track the front wheel steering angle by generating output torque. The steering motor's output torque can be expressed as The equation of the steering motor can be written as: where U m , R m , I m , L m and k m are the voltage, resistance, current, inductance and electromotive force constant, respectively. The differential equation of the rack can be expressed as: where M r and B r are the rack mass and damping, and F r is the resistance force equivalent to the rack. The resistance force can be shown as: where T l and T r are the self-aligning moments of the left and right kingpins, and l l and l r are the lengths of the left and right steering arms.

Human-Machine Cooperative Control Method Design
In this section, first, a novel human-machine cooperative control scheme is presented. In the following, a safety evaluation strategy is designed. Then, a dynamic authority allocation method is proposed for achieving a proper balance between lane keeping performance and driving freedom. Besides, an MPC-based controller is developed to generate an optimal steering angle for lane keeping.

Human-Machine Cooperative Control Scheme
As shown in Figure 3, the cooperative control scheme contains two intelligent agents (driver and CCS). The actual driver steering behavior is detected by a sensor. At the same time, an MPC-based CCS controller is developed for lane keeping. Additionally, a safety evaluation strategy is proposed for safety supervision, containing real-time assessments of driver error and lane departure risk. Then, a dynamic authority allocation method is designed to weigh lane keeping performance and driving freedom. Finally, the SBW system is used as an actuator, and a feedback PID is employed to reduce the deviation of the cooperative steering angle and actual steering angle.

Safety Evaluation Strategy
The main objective of this section is to assess driver manipulation error and the effect of driver manipulation error on lane keeping performance.

Safety Evaluation Model of Lane Departure Risk
This section is used to evaluate the lane departure risk caused by driver error and determine a basic cooperative domain by weighing lane departure risk and driving freedom. The lane departure risk can be evaluated based on the extension model [37,38]. The design process of the extension model contains the extraction of characteristic variables, division of the extension set, calculation of the correlation degree, and decision of the measure model.
(1) Extraction of characteristic variables As for the depiction of lane departure status, the lateral position deviation y L and the direction deviation ψ L are extracted as characteristic variables, which are used to form a two-dimensional extension set.
(2) Division of the extension set The extension set includes a classical domain, an extensive domain, and a non-domain, as shown in Figure 4a. The classical domain describes a relatively safe state with small lateral position and direction deviations. The extensive domain represents a relatively dangerous state with a large lane departure risk. The non-domain describes an extreme state, in which the vehicle will collide with the curb. (3) Calculation of the correlation degree The correlation degree refers to the correlation function value based on current characteristic variables. It is assumed that the permitted ranges of the lateral position deviation and direction deviation are y LI and ψ LI (I = 1, 2). The optimal point is origin point O. As shown in Figure 4a, Q is the current system state point. The intersections of OQ and the classical domain and extensive domain are Q 1 , Q 2 , Q 3 , and Q 4 . Thus, the two-dimensional extension set is transformed into a one-dimensional set, as depicted in Figure 4b.
It is assumed that the classical domain is < Q 2 , Q 3 >= X j and the extensive domain The extensive distances of Q and the classical and extensive domains are ρ(Q, X j ) and ρ(Q, X k ). For example, ρ(Q, X k ) is given by: The correlation function K(S) is written as: (4) Decision of the measure model The measure model can be divided by the correlation function and the decision principle, shown as follows: Classical domain: The correlation function K(S) describes the correlation degree to the above three domains. Additionally, the correlation function reflects the lane departure risk; for example, the lane departure risk increases when the correlation function value decreases.

Safe Evaluation Model of Dynamic Driver Error
A typical driver model in the loop is developed to supervise actual driver behavior to deal with uncertainty and variability. The typical driver model is written as: where δ * d is the expected front wheel steering angle controlled by the typical driver, X p and Y p are the longitudinal and lateral positions of the preview point, and P, X c and Y c are the longitudinal and lateral positions of the center of mass of the vehicle in the inertial frame.
The deviation between the actual driver steering angle and the expected one changes; normal change cannot result in lane departure. To reduce the impact of changing deviation on the evaluation of driver error, the steering angle deviation E d is calculated in a period of time and written as follows: where δ SW is the actual steering wheel angle controlled by the actual driver, i s is the steering gear ratio, and ∆t is the manipulation error updated time.
The evaluation of the driver manipulation error degree is defined as: where δ thd is the deviation threshold of the steering angle. The driver manipulation error changes from light to severe with increases in the error value. γ = 1 is defined as the full driver manipulation error.

Dynamic Authority Allocation Method
This section aims to generate a dynamic shared authority to achieve an adequate balance between lane keeping performance and driving freedom. To this end, the safety assessment results proposed above are employed for authority allocation. Concretely, in the classical domain, lateral deviations are minor, and the vehicle is in a safe region. Therefore, the driver has complete driving freedom, and the dynamic CCS authority function is written as: The control authority is adjusted according to the lane departure risk and driver manipulation error degree in the extensive domain. As for a regular driver, a small lane departure risk is frequent because the driver cannot keep the vehicle in the lane centerline all the time. Thus, the driver has complete driving freedom if the driver has no manipulation error, and the lane departure risk is small. The dynamic CCS authority function is written as: The CCS assists the driver in lane keeping if the driver has manipulation errors or the correlation function value is less than 0.8. Unlike the constant control authority allocation method, the driver manipulation error, lane departure risk, and relative velocity are related to the CCS control authority weight. The dynamic CCS authority function is defined as: where the relative velocity is defined as λ = .
With CCS continuous intervention, the lane departure risk declines, and the CCS control authority weight goes down to zero. However, lateral deviations increase due to driver manipulation error γ(t) > 0, and the CCS intervenes again quickly. For avoiding frequent interventions, the dynamic CCS authority function is: In the non-domain, the vehicle can collide with the curb. The CCS has complete control authority and adopts emergency manipulation, which will be researched in our future work. The dynamic CCS authority function is: The driver control authority Γ d (t) is shown as: The cooperative steering angle is written as: The pseudocode of the cooperative control authority allocation approach is depicted in Algorithm 1. The dynamic CCS authority function is shown in Figure 5a,b. The CCS authority adapts to variations in driver error, lane departure risk, and relative velocity. For dealing with the lane departure risk caused by driver manipulation error, the CCS allocation function value rises with increases in the degree of driver manipulation error. Furthermore, the lane departure risk is important for authority allocation. The CCS authority is negatively related to lane departure risk. It should be noted that relative velocity is also a vital factor for cooperative design. As for same driver steering error, the CCS authority rises with increases in relative velocity to rapidly correct driver error and adapt to variations in steering sensitivity of the vehicle. if γ(t) = 0 and K(S) ≥ 0.8 5: then Γ a (t) ← 0 6: Cooperative control steering angle  21: return δ * The vehicle dynamics model used as the predictive model for the MPC-based controller has been expressed in Equation (2). The nonlinear model needs to be linearized because of the strict real-time requirement. By applying the control sequence u(t) = u * (t) to Equation (2), the state equation is shown as: where u * (t) is the optimal control vector, and ∧ ξ(t) are the state vectors.
For expanding Equation (2) in Taylor series around the point ( ∧ ξ(t), u * (t)), and discarding the high-order terms, it can be depicted as: The subtraction of Equation (20) from Equation (21) is: where the Jacobian matrix A t and B t are calculated as: For discretizing the data, the first-order difference quotient is used and the expression is: and T is the system sampling time.
The control variables u( k|t) convert into the control increment ∆u( k|t) to limit the control increment; the state equation is described as: where , 0 m×n is a matrix with nm zeros, 0 m is a column vector of m zeros, and I m is an identity matrix of dimension m. Assuming: The output vector η( k|t) of the predictive model is: To reduce the computation complexity of the controller, the following assumptions are made: A k,t = A t,t , B k,t = B t,t , C k,t = C t,t and k = 1, · · · , H p .
The objective function is: where x P = √ x Px and P ∈ R n×n is positive definite, H c and H p are the control horizon and the prediction horizon, η re f ( t + k|t) is the reference path, Q is the weight matrixes, R and ρ are the weight coefficients, and ε is a slack variable.
The optimization problem is described as: The controller output is an optimal control sequence, and the first control vector in this sequence is the optimal front steering angle δ * a , which is sent to the cooperative control module for the cooperative control.

Results and Discussion
For verifying the effectiveness of the proposed cooperative control method, five different driving scenarios with respect to driver reactions in lane keeping are tested based on a CarSim and Simulink co-simulation platform. The vehicle model is set up in CarSim, and the control algorithm is designed in Simulink. A road adhesion coefficient of 0.85 and a lane width of 3.75 m are set up in CarSim's virtual environment. The vehicle used for tests is an E-class Sedan, which is defined in CarSim. The vehicle parameters used in the simulation can be found in [35,36], as shown in Table 1. The simulation parameters are shown as following: (500, 30, 15), R = 8 * 10 4 , ρ = 1000, τ 1 = 5.6, τ 2 = 6.4, τ 3 = 1.2, σ = 0.8.

Comparison of Different Methods at a Straight Road
This scenario is designed to verify the contributions of the proposed scheme by comparison of different methods. The vehicle travels along the center of a straight road for . x = 20 m/s. The driver generates the manipulation error at time t = 3.5 s, and the erroneous steering wheel angle is δ SW = 10sin(1.57(t − 3.5)) degrees. There are three methods established for comparison in the above same driving scenario; No CCS denotes that the driver controls the vehicle independently. Inspired by the ideas of Zhang et al. [26] and Guo et al. [27], we establish the constant authority method and authority transfer method; CA CCS denotes that the driver and the CCS share constant control authority with respect to the lateral position deviation. The cooperative control authority . SA CCS denotes that authority switches smoothly between the driver and the CCS according to the lateral position deviation. The cooperative control authority is Γ a = 0, i f − 0.4 < y L < 0.4 1, else . A first-order inertial element with time lag t a is used to generate a smooth variation between zero and one. Figure 6a shows that the cooperative steering angle is the optimal output according to the driver steering angle and CCS steering angle. The proposed CCS cannot correct immediately, and the driver has complete control authority when making the wrong steering angle at 3.5 s. At the same time, the lane departure risk (see Figure 6c) and driver manipulation error (see Figure 6d) are evaluated for safety supervision. When the lane departure risk and driver error reach cooperation conditions, intervention by the proposed CCS is triggered. The driver corrects his wrong steering angle, calculated by the reference driver model at 6 s. When the lane departure risk is greater than 0.8, the driver has complete control authority after this time for driving freedom.  Figure 6e. Additionally, the proposed method reduces the maximum lateral deviation by 35.8 percent and 20.4 percent compared to the CA CCS and SA CCS methods, reflecting a good lane keeping performance. From the perspective of driving freedom, the proposed CCS authority is reduced as driver error declines, as shown in Figure 6d. The proposed method decreases cooperative control time by 27.8 percent and 51.6 percent compared to the CA CCS and SA CCS methods. As for yaw stability, according to the vehicle dynamics [39], the modulus of the maximum yaw rate is x and µ is the road adhesion coefficient. The maximum yaw rate is 0.42 rad/s in this scenario. As shown in Figure 6f, the yaw rate of the No CCS method exceeds 0.42 rad/s, and vehicles controlled by other methods are in stable states. It can be concluded that the proposed method achieves a preferable balance between lane keeping performance and driving freedom compared to the other methods in this scenario.

Comparison of Different Velocities on a Straight Road
This scenario shows the robust performance of the proposed method. Three simulation tests are conducted for . x = 10 m/s, . x = 20 m/s and . x = 30 m/s, respectively. The driver error and simulation environment are the same as Section 4.1. Figure 7a shows the cooperative steering angles under different velocity conditions. The corrective angle generates earlier with increasing velocity due to the fast-increasing lateral deviation in the cooperation process. The contrasts in CCS control authority weights are shown in Figure 7b.

Comparison of Different Methods on a Curving Road
To further verify the advantages of the proposed method on a curving road, the No CCS, CA CCS, and SA CCS methods described in Section 4.1 are used for comparison. The road curve equation is Y = − √ −X 2 + 600 2 + 600 m, and the vehicle travels along the center of the curving road. The driver maintains a steering wheel angle δ SW = 15 • due to driver error from 3.5 s. Figure 8a, the proposed CCS cannot immediately correct the error when the driver maintains a wrong steering angle, and the driver has full control authority. Compared with the continuous cooperative control for reducing lateral deviation during the whole driving process, the driver has full driving freedom when the lane departure risk is greater than 0.8, as shown in Figure 8c,d. The angle generated by the proposed method is larger than that of the CA CCS and SA CCS methods at 4.4 s to quickly correct driver error, as shown in Figure 8b. From the perspective of lane keeping performance, the No CCS method results in the vehicle being outside of the lane. The proposed method reduces the maximum lateral position deviation by 46 percent and 31.4 percent compared to the CA CCS and SA CCS methods, as shown in Figure 8e. As for driving freedom, the proposed CCS authority is reduced as driver error declines, as shown in Figure 8d. The proposed method decreases the cooperative control time by 14.4 percent and 18.4 percent compared to the CA CCS and SA CCS methods. As shown in Figure 8f, the yaw rate of the No CCS method exceeds the allowable value 0.42 rad/s, and vehicles controlled by other methods are in stable states.  x = 30 m/s, respectively. The driver manipulation error and simulation environment are the same as in Section 4.3. Figure 9a,b show the cooperative steering angles and cooperative control authority weights under different velocity conditions. The cooperative steering angle is the same as the driver steering angle before 4.32 s because the CCS authority weight is zero. At the cooperative control stage, the controller calculates an optimal angle to correct the driver's manipulation error. Authority weight decreases with the decrease in speed. As shown in Figure 9c, the deviation decreases with reductions in velocity, and the vehicle travels in the lane under three velocity conditions. The yaw rates reflect the stable states of the vehicle, as shown in Figure 9d.

Conclusions
Reasonably foreseeable misuse by persons is a principal aspect of SOTIF. This paper focuses on the effect of driver error on human-machine cooperation for lane keeping. The proposed cooperative control scheme achieves a proper balance between lane keeping performance and driving freedom in driver error scenarios. A safety evaluation strategy is proposed to assess driver error and lane departure risk caused by driver error. A typical driver model in the loop is used for evaluating dynamic driver behavior in real-time. Based on safety evaluation results, an extension model is established and determines the cooperation domain for achieving a basic balance. Furthermore, a dynamic authority allocation strategy is proposed, and the authority adapts to variations in driver manipulation error, lane departure risk, and relative velocity. Meanwhile, an MPC-based controller and SBW actuator are employed for optimal steering angle to correct driver error.
Numerical simulation tests are developed to verify contributions. From the perspective of lane keeping performance, compared with CA CCS and SA CCS methods, the proposed method reduces maximum lateral deviation by 35.8 percent and 20.4 percent on a straight road. It reduces deviation by 46 percent and 31.4 percent on a curving road. As for driving freedom, the proposed method decreases cooperative control time by 27.8 percent and 51.6 percent compared to the CA CCS and SA CCS methods on a straight road. Additionally, the proposed method decreases cooperative control time by 14.4 percent and 18.4 percent compared to the CA CCS and SA CCS methods on a curving road. The results reflect that the proposed scheme achieves a proper balance between lane keeping performance and driving freedom.