# A Speed Tracking Method for Autonomous Driving via ADRC with Extended State Observer
## 3 Longitudinal Speed Tracking Controller Design
### ADRC Controller Design  
Active disturbance rejection is a design concept intended to accommodate external disturbances and unknown internal dynamics in such a way that control can be exerted in the absence of a detailed mathematical model [30]. In ADRC, the vehicle dynamics are simplified as a second-order system, and all other dynamic processes that differ from those that affect the vehicle in practice (e.g., variations in rolling resistance, air resistance, and the gravitational force) are treated as a single total disturbance. The total disturbance is then treated as an additional vehicle state that is computed in real-time (by the ESO) and corrected for in the feedback process. The vehicle longitudinal dynamic system is simplified to a second-order system:  
\[\ddot{v}=f\Big{(}v,\dot{v},w,t\Big{)}=-k_{1}\dot{v}-k_{2}v+w+b\theta_{thr} \tag{13}\]  
where \(v\) denotes the vehicle speed, \(k_{1}\) and \(k_{2}\) are coefficients, \(k_{2}\) is the unknown system disturbances, and \(\theta_{thr}\) is the control system input throttle angle. For a certain physical system, the parameter \(b\) can be estimated according to the known system information, and the estimated value of \(b\) is \(b_{0}\). Thus, we can get:  
\[\ddot{v}=-k_{1}\dot{v}-k_{2}v+w+(b-b_{0})\theta_{thr}+b_{0}\theta_{thr}=f+b_{ 0}\theta_{thr} \tag{14}\]  
where the term \(f=-k_{1}\dot{v}-k_{2}v+w+(b-b_{0})\theta_{thr}\) represents the system total disturbances. Then, combining Equations (10) and (11), we can get:  
\[\ddot{v}(t)=\frac{\dot{T}_{e}i_{e}i_{0}\eta_{T}}{mR_{w}}-\frac{\dot{F}_{z}}{m} \tag{15}\]  
Figure 3: Block diagram of the longitudinal control algorithm. where \(F_{z}=F_{i}+F_{w}+F_{r}\), and we the function \(g(\cdot)\) represents the MVEM, which describes the relationship between engine throttle angle and engine indicated torque. Equation (15) can be rewritten as:  
\[\ddot{v}(t)=\frac{(\dot{g}(\theta_{thr})-\dot{T}_{fric,e}-J_{e}\ddot{\omega}_{e })i_{g}i_{0}\eta_{T}}{mR_{w}}-\frac{\dot{F}_{z}}{m} \tag{16}\]  
where \(J_{e}\) denotes the rotational inertia of engine and \(\omega_{e}\) is the angular velocity of engine crankshaft. In the framework of ADRC [31], Equation (16) can be rewritten in the form of Equation (14):  
\[\ddot{v}(t)=\frac{(\dot{g}(\theta_{thr})-\dot{T}_{fric,e}-J_{e}\ddot{\omega}_{e })i_{g}i_{0}\eta_{T}}{mR_{w}}-\frac{\dot{F}_{z}}{m}=b_{0}\theta_{thr}+f \tag{17}\]  
It can be seen that the value of \(b_{0}\) is associated with the physical system information, and it is the reason we need to establish a simplified vehicle model. With a relatively precise estimated value of \(b_{0}\), the calculation burden of the ESO can be reduced [32]. The system disturbance term \(f\) is extended as a new system state variable to construct the extended state observer (ESO). The new system state vector is defined as:  
\[X=\left[ \begin{array}{cccc}x_{1}&x_{2}&x_{3}\end{array} \right]^{T}=\left[ \begin{array}{cccc}v&\dot{v}&f\end{array} \right]^{T} \tag{18}\]  
and Equation (17) is rewritten in the form of state equation:  
\[\left\{ \begin{array}{l}\dot{x}_{1}=x_{2}\\ \dot{x}_{2}=x_{3}+b_{0}\theta_{thr}\\ \dot{x}_{3}=h=\dot{f}\\ y=x_{1}\end{array} \right. \tag{19}\]  
The state space Equation (19) is:  
\[\left\{ \begin{array}{l}\dot{X}=AX+B\theta_{thr}+Eh\\ y=CX\end{array} \right. \tag{20}\]  
where \(y\) denotes the system output, and the coefficient matrix are \(A=\left[ \begin{array}{cccc}0&1&0\\ 0&0&1\\ 0&0&0\end{array} \right]\), \(B=\left[ \begin{array}{c}0\\ b_{0}\\ 0\end{array} \right]\), \(C=\left[ \begin{array}{c}1\\ 0\\ 0\end{array} \right]^{T}\). According to the state observer theory, the ESO can be designed as:  
\[\left\{ \begin{array}{l}\dot{z}_{1}=z_{2}+\beta_{1}(y-\hat{y})\\ \dot{z}_{2}=z_{3}+b_{0}\theta_{thr}+\beta_{2}(y-\hat{y})\\ \dot{z}_{3}=\beta_{3}(y-\hat{y})\\ \dot{y}=z_{1}\end{array} \right. \tag{21}\]  
where \(\left[ \begin{array}{cccc}z_{1}&z_{2}&z_{3}\end{array} \right]\) denotes the estimated value of system state variable \(\left[ \begin{array}{cccc}x_{1}&x_{2}&x_{3}\end{array} \right]\).