The Lateral Tracking Control for the Intelligent Vehicle Based on Adaptive PID Neural Network

The intelligent vehicle is a complicated nonlinear system, and the design of a path tracking controller is one of the key technologies in intelligent vehicle research. This paper mainly designs a lateral control dynamic model of the intelligent vehicle, which is used for lateral tracking control. Firstly, the vehicle dynamics model (i.e., transfer function) is established according to the vehicle parameters. Secondly, according to the vehicle steering control system and the CARMA (Controlled Auto-Regression and Moving-Average) model, a second-order control system model is built. Using forgetting factor recursive least square estimation (FFRLS), the system parameters are identified. Finally, a neural network PID (Proportion Integral Derivative) controller is established for lateral path tracking control based on the vehicle model and the steering system model. Experimental simulation results show that the proposed model and algorithm have the high real-time and robustness in path tracing control. This provides a certain theoretical basis for intelligent vehicle autonomous navigation tracking control, and lays the foundation for the vertical and lateral coupling control.

Automatic driving is a complex process, and it is also a process of self-learning which includes environmental recognition, real time localization, path planning and motion tracking control [18][19][20][21][22].In this case, soft computing techniques provide the advantage of representing expert knowledge for controlling complex and nonlinear processes, such as autonomous driving.Several control strategies have been developed in the literature: in reference [23], the output feedback self-tuning controller proposed for the vehicle lateral control problem is developed.H ∞ controller [24] based on the loop shape procedure for control, and widely use adaptive tracking control system in references [25][26][27].The PID control method is a typical representative of classical control algorithms, PID controllers were proposed in [28][29][30] and used these for the experimental evolution of control.Sliding mode controllers [31,32] are used for trajectory tracking.The fuzzy logic control [33] is used for a skid steering vehicle.The neural network controller is used for the steering vehicle in [34], and it is widely used in machine learning for nonlinear patterns [35,36].The above methods are independently used, and there are some shortcomings in terms of system control.Combining the above methods for the control system is more widely in practical application, and the control effect is better in [37][38][39][40][41].Other techniques are too numerous to be listed here.
These methods consider the problem of trajectory tracking for nonlinear systems state change process.However, for intelligent vehicles at different speeds, the computation time (for optimization algorithm) becomes very difficult for real-time operation.Different methods showed that the class of adaptive controllers represents a very promising technique for such uncertain and nonlinear application [19].
The neural networks PID controller can achieve good results in controlling an intelligent vehicle, and provide safe driving.This control technique has proven to be robust against system parameter variations.Zhang et al. [40,41] applied to keep and track the pre-given trajectory in the lateral control.This control strategy is well suited for driving applications.In addition, an algorithm of vehicle lateral adaptive PID control with neural network was proposed.The parameters of PID control are tuned by back propagation neural networks.In the tuning process, the plant predictive output is used to modify the weights of neural networks; it is nonlinear prediction which improves the predictive accuracy.
This paper focuses on motion tracking control, which is mostly dedicated to the lateral control.Lateral control is concerned with steering the vehicle automatically in order to follow the reference path.First, the vehicle model is established according to the vehicle parameters.Second, according to the vehicle steering control system and the CARMA model, a second-order control system model is established, and system identification is used to adjust the model parameters.Finally, based on the previous research [42,43] in the path planning adopting behavior dynamics method, using the established neural network PID controller, the intelligent vehicle planning tracing controlling is realized.
This paper is organized as follows: Section 2 describes the analysis of vehicle model and dynamics.The vehicle steering system equivalent to the actual model and the model parameter identification is introduced in Section 3. In Section 4, the design of the lateral BP (Back Propagation) neural network PID controller of the autonomous vehicle for path tracking is presented; simulation results of illustration examples and discussion are also presented.Finally, the conclusion and further discussion is given in Section 5.

Vehicle Dynamics Analysis and Modeling
Vehicles can be treated as a multiple rigid body systems including components, motion pair, mechanical elements, etc. Vehicle model is a highly complicated nonlinear system; it is often difficult to use one or more of the mathematical formulas to accurately describe.Therefore, the dynamic model of vehicle should be simplified to derivate the model of vehicle in order to calculate and analyze its dynamic characteristic.This design uses a simplified vehicle model, which converts four-wheel vehicle models to two rounds of vehicle models [20].

Vehicle Model
The four-wheel vehicle model and two rounds of vehicle model are shown in Figures 1 and 2. According to the simplified two-wheel vehicle model, the vehicle system model is established, which is shown in Figure 3.
Four-whe e l ve hicle mode l.

Vehicle Dynamics Analysis
According to the simplified two-wheel vehicle model for vehicle dynamics analysis, the two degrees of freedom vehicle kinematics equation is set up: Side-slip Angle and yawing angular velocity: In Equations ( 1) and (2) for Laplace transform: .

Vehicle Steering System Control Modeling
In the control system, it is necessary to find a system equivalent to the actual model in order to facilitate the practice test.Therefore, it is import that the model is chosen from a set of models, according to certain principles and the best fitting of the concern of dynamic or static characteristics of the actual system.The main tasks of Identification include determining model structure, the estimated model parameters and the unknown test model results [44,45].

Identification Signal
In the intelligent vehicle system, the vehicle steering system is a slow change of a strongly nonlinear system, and this feature will often bring great difficulty in vehicle dynamics research.The steering system is mainly composed of a steering mechanism, steering gear and a transmission mechanism, etc., so the vehicle's steering system can be at least a second order system model.The steering wheel angle with the number of input pulses is one-to-one correspondence.However, when the number of input pulses is the same, the steering wheel angle is different, with the noise of the mathematical model of the system given.
In engineering, generally, the longest linear shift register sequence (such as M sequence) is chosen as the identification input signal.Four order M sequences are used as input signals, which is the input voltage signal of the steering stepper motor controller in the actual physical significance.

Identification and Analysis of Vehicle Steering System
The vehicle steering system and driving system are graded as a strongly nonlinear system.When the vehicle is in normal operation, the vehicle steering system can be approximately described by a two order system.The vehicle steering system is described as the output signal of the steering servo motor, driven by the drive as the front wheel steering structure, and driven by the front wheel rotation.The transfer function is the relationship between the motor input pulse number and the lateral angular velocity.
In the experimental process, the model of identification of the vehicle steering system is the CARMA (Controlled Auto-Regression and Moving-Average) model of using the least squares identification algorithm.However, the ordinary least squares identification method can elicit the "data saturation" phenomenon and lose correction ability, and for the time-varying system, it will lead to the change of the parameter estimates as it cannot track the time-varying parameters.The forgetting factor recursive least squares algorithm (FFRLS) is used to estimate time-varying parameters.The transfer function of the steering system by the bilinear transformation can get its discrete form: Based on the CARMA model of difference Equation (8): u(k) and z(k) are the input and output system, ε(k) is the mean to 0,for constant unrelated noise variance, A(z −1 ), B(z −1 ) and C(z −1 ) polynomials parameter.The CARMA model Equation ( 7) can be converted to the least square of parameter identification problems Equation ( 9): The input and output value and unknown parameter vector θ, respectively.
can get the parameters of the algorithm as shown in Equation (11).
According to the above theory, under the CARMA model, the establishment of an intelligent vehicle steering model system of second order differential Equation (12):

Identification of Simulation Calculation
Using the above algorithm identification, there was a sampling time of 0.01 s, the number of iterations is 100 times.The fourth-order inverse M sequence input signal, and the simulation output of steering wheel Angle and the actual output are shown in Figure 4. Selection criterion function , can get the parameters of the algorithm as shown in Equation (11).
According to the above theory, under the CAR MA m odel, the establishment of an intelligent vehicle steering model system of second order differential Equation ( 12):

Identification of Simulation Calculation
Using the above algorithm identification, there was a sampling time of 0.01 s, the number of iterations is 100 times.The fourth-order inverse M sequence input signal, and the simulation output of steering wheel Angle and the actual output are shown in Figure 4. .FFRLS algorithm is adopted to the parameter estimation, system parameter estimation process is shown in Figure 5, When K=1000,  5, d1 and d2 parameters converge slower, and other parameters converge, which is caused by inaccuracy in the white noise estimation.In practice, however, increasing the simulation steps can improve the parameter estimation accuracy.Using forgetting factor recursive least squares estimation (FFRLS), the forgetting factor value is 0.98, the theoretical value of equations of each factor is θ (0) = 0 0 0 0 0 0 T , P(0) = 10 6 × I 6×6 .FFRLS algorithm is adopted to the parameter estimation, system parameter estimation process is shown in Figure 5, When K=1000, â1 = −1.79559,â2 = 0.84126, b1 = 0.000654, b2 = 0.000354, d1 = 0.202272, d2 = 0.27674.The parameter error is shown in Figure 6, the parameters estimation error of d1 and d2also exhibit slower convergence, which is caused by inaccurate white noise estimation.The other parameter error tends to zero finally.Thus, we get the transfer function Equations ( 13) and ( 14): b z b 0.0002399z 0.0008576 H(z) ˆẑ a z a z 1.716z 0.7596 Equations ( 7) and ( 13) are connected as a controlled object.In Figure 5, d 1 and d 2 parameters converge slower, and other parameters converge, which is caused by inaccuracy in the white noise estimation.In practice, however, increasing the simulation steps can improve the parameter estimation accuracy.
The parameter error is shown in Figure 6, the parameters estimation error of d 1 and d 2 also exhibit slower convergence, which is caused by inaccurate white noise estimation.The other parameter error tends to zero finally.Thus, we get the transfer function Equations ( 13) and ( 14): The parameter error is shown in Figure 6, the parameters estimation error of d1 and d2also exhibit slower convergence, which is caused by inaccurate white noise estimation.The other parameter error tends to zero finally.Thus, we get the transfer function Equations ( 13) and ( 14): b z b 0.0002399z 0.0008576 H(z) ˆẑ a z a z 1.716z 0.7596 Equations ( 7) and ( 13) are connected as a controlled object.Equations ( 7) and ( 13) are connected as a controlled object.

The Neural Network PID Control Structure
PID controller is a feedback loop in industrial control applications.The collected data and a reference value are compared to input of the controller; the error value is used to calculate the new input values.This experiment proves that other control methods may cause the system to create unstable error or shocks, and PID feedback loop can retain the stability of the system.
The BP (Back-Propagation) neural network can approximate arbitrary nonlinear systems and the structure and learning algorithm are simple.Through neural network self-learning ability, Kp, Ki, Kd parameters can find an optimal control law.Based on the BP neural network, the PID (Proportion Integral Derivative) controls system structure is shown in Figure 7: Sensors 2017, 17 , 1244 8 of 15

The Neural Network PID Control Structure
PID controller is a feedback loop in industrial control applications.The collected data and a reference value are compared to input of the controller; the error value is used to calculate the new input values.This experiment proves that other control methods may cause the system to create unstable error or shocks, and PID feedback loop can retain the stability of the system.
The BP (Back-Propagation) neural network can approximate arbitrary nonlinear systems and the structure and learning algorithm are simple.Through neural network self-learning ability, Kp, Ki, Kd parameters can find an optimal control law .Based on the BP neural network, the PID (Proportion Integral Derivative) controls system structure is shown in Figure 7 The controller is described using the incremental PID control algorithm and three layer neural network.The PID control equation is as follows Equation (15): x (k) e(k) e(k 1), x (k) e(k), x (k) e(k) 2e(k 1) e(k 2) Kp w (k), Ki w (k), Kd w (k) Kp, Ki, Kd is the proportion, integral, differential coefficient .The control algorithm is summarized as follows:


Step1: The determined system structure of the BP network is 1-3-1, the given system weight coefficients initial value, learning rate and inertia coefficient, the iteration times k = 1.


Step3: According to calculate input and output of NN neurons in each layer by, the output of the NN is PID controller parameters Kp, Ki, Kd.


Step4: According to the Equation ( 15) to calculate the output of the PID cont roller u(k) .


Step5: Neural network learning, online adjust the weighting coefficient to realize the adaptive adjustment of PID control parameters.

The Heading Angular Control
To verify the effectiveness of the proposed control algorithms, let us consider a two-wheeled vehicle as shown in Figure 2. In the simulation, the vehicle parameters are given Table 1.Moreover, in the neural network PID closed-loop system, two neural network PID controllers are used to The controller is described using the incremental PID control algorithm and three layer neural network.The PID control equation is as follows Equation (15): Kp, Ki, Kd is the proportion, integral, differential coefficient.The control algorithm is summarized as follows: • Step1: The determined system structure of the BP network is 1-3-1, the given system weight coefficients initial value, learning rate and inertia coefficient, the iteration times k = 1.

•
Step3: According to calculate input and output of NN neurons in each layer by, the output of the NN is PID controller parameters K p , K i , K d .

•
Step4: According to the Equation ( 15) to calculate the output of the PID controller u(k) .

•
Step5: Neural network learning, online adjust the weighting coefficient to realize the adaptive adjustment of PID control parameters.

The Heading Angular Control
To verify the effectiveness of the proposed control algorithms, let us consider a two-wheeled vehicle as shown in Figure 2. In the simulation, the vehicle parameters are given Table 1.Moreover, in the neural network PID closed-loop system, two neural network PID controllers are used to control the longitudinal and angular subsystem separately, and the separated subsystems are of the second-order form independently.Then, the neural network PID controller can be changed to a single-input single-output (SISO) direct estimator.The following shows the test simulation model and controller.The experimental testing process is implemented according to Figure 8.
Sensors 2017, 17 , 1244 9 of 15 control the longitudinal and angular subsystem separately, and the separated subsystems are of the second-order form independently.Then, the neural network PID controller can be changed to a single-input single-output (SISO) direct estimator.The following shows the test simulation model and controller.The experimental testing process is implemented according to Figure 8.

Adaptive PID Neural Network Controller Stability Analysis
A mathematical model of adaptive PID neural network controller is above the Equation ( 15): Through the Lyapunov [46] stability analysis is as follows Equation ( 16): The BP neural network learning process leads to the change of v(k) as follows: ( e (i) e (i)) (e (i 1) e (i)) 22 If e(0) 0  , then Due to BP the learning process, the change of the error is Equation (19): The objective function is Equation (20): In order to J(k) and w(k) is the negative gradient direction, we have the following Equation (21): By Equations ( 20) and (21), Equation ( 22) can be obtained:

Adaptive PID Neural Network Controller Stability Analysis
A mathematical model of adaptive PID neural network controller is above the Equation ( 15): Through the Lyapunov [46] stability analysis is as follows Equation ( 16): The BP neural network learning process leads to the change of v(k) as follows: If e(0) = 0, then Due to BP the learning process, the change of the error is Equation ( 19): The objective function is Equation (20): In order to J(k) and w(k) is the negative gradient direction, we have the following Equation ( 21): By Equations ( 20) and (21), Equation ( 22) can be obtained: By bringing Equation ( 23) to (17), Equation ( 24) is derived: Based on the Lyapunov stability theory, when ∆v(k) < 0, the whole control system is stable, so By bringing Equation ( 23) to (17), Equation ( 24) is derived: Based on the Lyapunov stability theory, when v(k) 0   , the whole control system is stable, so   With these design parameters, the practical tracking trajectory for the curve trajectory is in Figure 10a, and the heading direction angle is shown in Figure 10b.The tracing curve point is in Figure 10c, X direction and Y direction error is also shown in Figure 10d.With these design parameters, the practical tracking trajectory for the curve trajectory is in Figure 10a, and the heading direction angle is shown in Figure 10b.The tracing curve point is in Figure 10c, X direction and Y direction error is also shown in Figure 10d.The simulation results deduce that the intelligent vehicle can track planning trajectory very well with the proposed design control model.It observes that there exists a drastic regulation process on the turning place, because heading direction angle change is larger on the turning place and results upright for vehicle body.However, from the partially enlarged drawing in Figure 10c, the tracking errors x e and y e are explicitly demonstrated to an acceptable bound within m, and the tracking heading angle errors e  is ±3°, they are also shown in Figure 10d.
Judging by the simulation results, the intelligent vehicle can track planning trajectory very well with a barrier using the proposed design control model.The trajectory, tracking and heading angle of the intelligent vehicle are also shown in Figure 9a-c.The tracking errors x e , y e and the heading errors e  are also shown in Figure 9d.The experimental results show that the method is more general.

Tracking the Overtaking Behavior
By the simulation results, the intelligent vehicle can track planning trajectory based on overtaking behavior using the proposed design control model in Figure 11.In Figure 12, the intelligent vehicle can track planning trajectory based on overtaking behavior using the Fuzzy-PID model.The trajectory, tracking and heading angle of the intelligent vehicle are also shown in Figures 11a-c and 12a-c.The tracking errors x e , y e and the heading errors e  are also shown in Figures 11d and 12d.The experimental results show smaller error, smoother for heading angle changes, and there is no appearance of a sharp turn.The simulation results deduce that the intelligent vehicle can track planning trajectory very well with the proposed design control model.It observes that there exists a drastic regulation process on the turning place, because heading direction angle change is larger on the turning place and results upright for vehicle body.However, from the partially enlarged drawing in Figure 10c, the tracking errors e x and e y are explicitly demonstrated to an acceptable bound within ±2 m, and the tracking heading angle errors e θ is ±3 • , they are also shown in Figure 10d.
Judging by the simulation results, the intelligent vehicle can track planning trajectory very well with a barrier using the proposed design control model.The trajectory, tracking and heading angle of the intelligent vehicle are also shown in Figure 9a-c.The tracking errors e x , e y and the heading errors e θ are also shown in Figure 9d.The experimental results show that the method is more general.

Tracking the Overtaking Behavior
By the simulation results, the intelligent vehicle can track planning trajectory based on overtaking behavior using the proposed design control model in Figure 11.In Figure 12, the intelligent vehicle can track planning trajectory based on overtaking behavior using the Fuzzy-PID model.The trajectory, tracking and heading angle of the intelligent vehicle are also shown in Figures 11a-c and 12a-c.The tracking errors e x , e y and the heading errors e θ are also shown in Figures 11d and 12d.The experimental results show smaller error, smoother for heading angle changes, and there is no appearance of a sharp turn.

Conclusions
This work designs a lateral control dynamic model of the intelligent vehicle, which is used for lateral tracking control.This control model comprises PID control for heading angle and BP Neural network control for the PID parameters adjustment.Experiments show that this method can effectively adapt to the dynamic road environments, and at the same time can be dynamically adjusted to the heading angle of the sharp change process according to the planning path, and the comfort of the vehicle lateral control process can be improved.Compared to the classic fuzzy PID in the process of the dynamic path tracking, the improved model has better robustness.The research results are obtained to demonstrate: (1) The results of the pre-study behavioral dynamics motion planning are applied to the current motion tracking controller.
(2) The model of intelligent vehicle steering system is built by using CARMA model and the parameters of steering system is trained by using FFRLS identify method.The vehicle model is set up according to the parameters of intelligent vehicle.The vehicle steering system model and vehicle model is connected to estimable a second-order control system.(3) The planning of the heading angle is input to the designed controller and output practices heading angle.An error between the planning path and tracing trajectory is calculated before feedback to the controller.The controller calculated the tracing heading angle in order to achieve zero path error.(4) The experimental results show that the identification algorithm and the BP neural network PID control model have real-time performance and reliability in path tracing, and the heading direction angle tracking effect is good; x, y direction and heading angle error is controllable and is close to zero.The method will lay a foundation for the lateral and the longitudinal coupling control.

Figure 4 .
Figure 4. Re sponse curve of angular fre que ncy of ste e ring whe e l.

Figure 4 .
Figure 4. Response curve of angular frequency of steering wheel.

Figure 7 .
Figure 7. BP neural network PID control system.

Figure 8 .
Figure 8.The control system model.
the increase of k, the e(k) is tend to zero, the learning algorithm convergence.From what has been discussed above, the effect of the adaptive PID neural network algorithm has a relation with the selection of the adjustable parameters K(xiteP, xiteI, xiteD), Kp, Ki, Kd, etc.

4. 4 .Figure 9 .
Figure 9.The curve behavior tracking trajectory with barrie r.(a) Path tracing trajectory; (b) He ading dire ction angle ; (c) Planning path and tracing path; (d) X and Y dire ction and he ading angle e rror.

Figure 9 .
Figure 9.The curve behavior tracking trajectory with barrier.(a) Path tracing trajectory; (b) Heading direction angle; (c) Planning path and tracing path; (d) X and Y direction and heading angle error.

Figure 10 .
Figure 10.The curve be havior tracking trajectory without barrie r.(a) Path tracing trajectory; (b) He ading direction angle ; (c) Planning path and tracing path; (d) X and Y dire ction and heading angle e rror.

Figure 10 .
Figure 10.The curve behavior tracking trajectory without barrier.(a)Path tracing trajectory; (b) Heading direction angle; (c) Planning path and tracing path; (d) X and Y direction and heading angle error.

Figure 12 .
Figure 12.Overtaking behavior Fuzzy-PID tracing trajectory.(a) Path tracing trajectory; (b) Heading direction angle; (c) Planning path and tracing path; (d) X and Y direction and heading angle error.