# Improved ADRC-Based Autonomous Vehicle Path-Tracking Control Study Considering Lateral Stability
## 4 The Path-Tracking Controller Design
### Braking Force Distributor Design  
In the previous section, we obtain the external yaw moment by the IADRC controller; the next step is to study how to achieve this external yaw moment. Usually, two forms are available, differential braking and differential driving. Differential braking is chosen in this paper. The CA method can be expressed as follows [26; 27; 28; 29]:  
\[\left\{ \begin{array}{l}v=B_{2}u_{2}\\ s.t.u_{2\text{min}}\leq u_{2}\leq u_{2\text{max}}\end{array} \right. \tag{35}\]  
where \(v\) is the generalized control force, in this paper it is the external yaw moment; \(B_{2}\) denotes the matrix of control efficiency; \(u_{2}\) denotes the matrix of control inputs; and \(u_{2\text{max}}\). \(u_{2\text{min}}\) is the upper and lower limit matrix for the matrix of control inputs. According to Equation (35), the braking force distribution problem described in this paper can be expressed as the control distributor decides the braking torque of each wheel under the constraint. This is decided by the vehicle and the road, thus achieving differential braking and generating external yaw moment, which can improve the yaw stability of the vehicle. Translated into a mathematical expression, Equation (36) is solved subject to \(u_{2\text{min}}\leq u_{2}\leq u_{2\text{max}}\). \[B_{2}u_{2}-v{=}0 \tag{36}\]  
For Equation (36), if there is more than one solution in the constraint range, the solution with the smallest control input is taken, aiming to make the control energy minimum; if there is no solution within the constraint, \(u_{2}\) is taken under the constraint that \(B_{2}u_{2}\) is closest to \(v\). Therefore, the braking force distribution problem in this paper is equivalent to the optimization problem of error minimization and braking force minimization. The two-norm is chosen to evaluate the merit of the solution or the closeness of the solution, so the control allocation problem can be transformed into  
\[\left\{ \begin{array}{l}\text{min}\;\omega\|W(u_{b}-u_{d})\|_{2}^{2}+(1- \omega)\|(B_{2}u_{b}-v)\|_{2}^{2}\\ s.t.u_{\text{min}}\leq u_{b}\leq u_{\text{max}}\end{array} \right. \tag{37}\]where \(\omega\) is the weighting factor for error minimization and control input minimization; \(u_{b}\) is the braking torque of each wheel; and \(u_{d}\) is the desired braking torque, expectation \(|u_{d}|\) is minimal, thus taking \(u_{d}=0\) here. \(W\) is the weight matrix of individual wheel braking forces, and can be defined as  
\[W{=}\operatorname{diag}(w_{L1},w_{L2},w_{R1},w_{R2}) \tag{38}\]  
We know that during the movement of the vehicle, the vertical load of each wheel changes, so the maximum braking force that can be achieved by each wheel is different; thus, to obtain a better braking effect, we define the weighting coefficients as follows [12]:  
\[\left\{ \begin{array}{l}w_{L1}=\frac{mg/4}{T_{z12}},w_{R1}=\frac{mg/4}{T_{z12 }}\\ w_{L2}=\frac{mg/4}{T_{z12}},w_{R2}=\frac{mg/4}{T_{zR2}}\end{array} \right. \tag{39}\]  
where \(g\) is the acceleration of gravity. According to the vehicle dynamics properties, we can obtain  
\[\Delta M_{z}=F_{xbL1}(-\frac{t_{w1}}{2}\cos\delta_{\mathrm{f}}+l_{f}\sin\delta _{\mathrm{f}})+F_{xbR1}(\frac{t_{w1}}{2}\cos\delta_{\mathrm{f}}+l_{f}\sin \delta_{\mathrm{f}})+(F_{xbR2}-F_{xbL2})\frac{t_{w2}}{2} \tag{40}\]  
Thus, the control input matrix of Equation (37) can be expressed as  
\[B_{2}=\left[ \begin{array}{cc}-\frac{t_{w1}}{2}\cos\delta_{\mathrm{f}}+l_{f} \sin\delta_{\mathrm{f}}&\frac{t_{w1}}{2}\cos\delta_{\mathrm{f}}+l_{f}\sin \delta_{\mathrm{f}}&-\frac{t_{w1}}{2}&\frac{t_{w1}}{2}\end{array} \right] \tag{41}\]  
Considering  
\[ \begin{array}{l}J=\omega\|(B_{2}u_{b}-v)\|_{2}^{2}+(1-\omega)\|W(u_{b}-u_{d} )\|_{2}^{2}\\ =\|\left(\begin{array}{c}\sqrt{\omega}B_{2}\\ \sqrt{(1-\omega)}W\end{array}\right)u_{b}-\left(\begin{array}{c}\sqrt{ \omega}v\\ \sqrt{(1-\omega)}Wu_{d}\end{array}\right)\|_{2}^{2}\end{array}  \tag{42}\]  
Let \(\overline{B}_{2}=\left( \begin{array}{c}\sqrt{\omega}B_{2}\\ \sqrt{(1-\omega)}W\end{array} \right)\), \(\overline{v}=\left(