# Vehicle Lateral Control Based on Augmented Lagrangian DDPG Algorithm
## 3 Problem Formulation  
### The Dynamic Model of the Four-Wheel Steering Vehicle  
Vehicle dynamics modeling is the foundation of vehicle trajectory tracking control. The four-wheel independent steering vehicle is a highly coupled, nonlinear, and uncertain system. To simplify the vehicle modeling problem, we assume that the vehicle's longitudinal dynamics are negligible, focusing solely on lateral and yaw dynamics while ignoring vertical dynamics. For four-wheel independent steering vehicles, the following dynamic equations hold:  
\[\begin{split} m(\dot{v}_{x}-v_{y}w)=\sum F_{x}\\ m(\dot{v}_{y}+v_{x}w)=\sum F_{y}\\ I_{z}\dot{w}=\sum M_{z}\end{split} \tag{2}\]  
where \(m\) is the vehicle mass, \(v_{x}\) and \(v_{y}\) are the longitudinal and lateral velocities, \(w\) is the yaw rate, \(I_{z}\) is the vehicle's yaw inertia, \(F_{x}\) and \(F_{y}\) are the longitudinal and lateral forces, and \(M_{z}\) is the yaw moment. To simplify the vehicle dynamics, we assume that the longitudinal velocity \(v_{x}\) is constant, i.e., \(\dot{v}_{x}=0\), and \(\sum F_{x}=0\). The lateral force and yaw moment dynamics are as follows:  
\[\begin{split} m(\dot{v}_{y}+v_{x}w)=&\sum F_{y}=F_{ y,fl}+F_{y,fr}+F_{y,rl}+F_{y,rr}\\ I_{z}\dot{w}=&\sum M_{z}\\ =& a(F_{y,fl}+F_{y,fr})-b(F_{y,rl}+F_{y,rr})\\ &+\frac{B_{f}}{2}(F_{y,fr}-F_{y,fl})+\frac{B_{r}}{2}(F_{y,rr}-F_{ y,rl}).\end{split} \tag{3}\]  
Based on the small angle assumption, the vehicle's tire model can be simplified as a linear model, i.e., \(F_{y,i}=C_{i}\alpha_{i}\). The lateral slip angles of the vehicle's tires are expressed as follows:  
\[\begin{split}\alpha_{fl}=\delta_{fl}-\frac{v_{y}+aw-\frac{B_{f}}{ 2}w}{v_{x}}\\ \alpha_{fr}=\delta_{fr}-\frac{v_{y}+aw+\frac{B_{f}}{2}w}{v_{x}}\\ \alpha_{rl}=\delta_{rl}-\frac{v_{y}-bw-\frac{B_{r}}{2}w}{v_{x}}\\ \alpha_{rr}=\delta_{rr}-\frac{v_{y}-bw+\frac{B_{r}}{2}w}{v_{x}} \end{split}\]  
where \(\delta_{fl}\), \(\delta_{fr}\), \(\delta_{rl}\), and \(\delta_{rr}\) are the steering angles of the vehicle's front left, front right, rear left, and rear right wheels, respectively, \(C_{i}\) is the tire's lateral stiffness, \(a\) and \(b\) are the vehicle's front and rear axle distances, and \(B_{f}\) and \(B_{r}\) are the vehicle's front and rear track widths.  
Based on the above assumptions, the vehicle dynamics model with 6 degrees of freedom (DOF) as shown in Figure 1 was established, including the lateral motion along the y-axis, the yaw motion around the z-axis, and the rotation of the four wheels.  
The state space representation of the 6 DOF model of a four-wheel vehicle is as follows:  
\[\begin{bmatrix}v_{y}\\ \dot{w}\end{bmatrix}=A\begin{bmatrix}v_{y}\\ w\end{bmatrix}+B\begin{bmatrix}\delta_{fI}\\ \delta_{fr}\\ \delta_{rl}\\ \delta_{rr}\end{bmatrix} \tag{4}\]  
where \(A\) is the system matrix:  
\[A=\begin{bmatrix}-\frac{2(C_{f}+C_{r})}{mv_{x}}&-v_{x}-\frac{2(aC_{f}-bC_{r})}{mv _{x}}\\ -\frac{2(aC_{f}-bC_{r})}{I_{z}v_{x}}&-\frac{2(aC_{f}+b^{2}C_{r})+B_{f}B_{r}(C_ {f}+C_{r})/2}{I_{z}v_{x}}\end{bmatrix}\]  
and \(B\) is the input matrix:  
\[B=\begin{bmatrix}\frac{\frac{C_{f}}{m}}{\frac{m}{L_{z}}}&\frac{C_{f}}{m}&\frac {C_{r}}{m}\\ \frac{aC_{f}-B_{r}C_{r}/2}{I_{z}}&\frac{aC_{f}+B_{f}C_{r}/2}{I_{z}}&\frac{-bC_ {r}-B_{r}C_{r}/2}{I_{z}}&\frac{-bC_{r}+B_{r}C_{r}/2}{I_{z}}\end{bmatrix}.\]