## 4 Model-Assisted Reduced-Order Extended State Observer (ESO) Based Cascade Controller Design
### Cascade Feedback Control Law Design
#### 4.2.2 Feedback Control Law for the Current Loop  
In this section, the aim is to design a feedback control law for the current loop to track the desired current \(I_{v}\), which is the output of the position loop. The desired current \(\eta_{1}\) and its derivative \(\eta_{2}\) are obtained through the following tracking differentiator:  
\[\left\{ \begin{array}{l}\dot{\eta}_{1}=\eta_{2}\\ \dot{\eta}_{2}=\tau^{2}(I_{v}-\eta_{1})-2\tau\eta_{2}\end{array} \right. \tag{44}\]  
where \(\eta_{1}\) is the estimate of \(I_{v}\), \(\eta_{2}\) is the estimate of \(\dot{I}_{v}\). The change rate of current dynamics is designed as  
\[\dot{I}_{d}=\eta_{2}+\beta(\eta_{1}-I),\beta>0 \tag{45}\]  
With the estimate \(\hat{d}_{2}\), inserting (45) into the following electrical subsystem (46)  
\[\dot{x}_{3}=f_{2}(x_{1},x_{2},x_{3})+r_{2}u+d_{2} \tag{46}\]  
So the designed current control law is as follows:  
\[u=r_{2}^{-1}[\eta_{2}+\beta(\eta_{1}-x_{3})-f_{2}(x_{1},x_{2},x_{3})-\hat{d}_ {2}] \tag{47}\]  
where \(\beta\) is a proportion parameter. Define the tracking error \(e_{I}=x_{3}-\eta_{1}\), then taking the derivative yields  
\[ \begin{array}{ll}\dot{e}_{I}&=\dot{x}_{3}-\dot{\eta}_{1}\\ &=f_{2}(x_{1},x_{2},x_{3})+r_{2}r_{2}^{-1}[\eta_{2}+\beta(\eta_{1}-x_{3})-f_{ 2}(x_{1},x_{2},x_{3})-\hat{d}_{2}]+d_{2}-\eta_{2}\\ &=\beta(\eta_{1}-x_{3})+d_{2}-\hat{d}_{2}\\ &=-\beta e_{I}+e_{02}\end{array}  \tag{48}\]Define the Lyapunov function as follows:  
\[V_{I}=\frac{1}{2}e_{I}^{2} \tag{49}\]  
Taking the derivative of \(V_{I}\) along the trajectory of (48) yields  
\[ \begin{array}{ll}\dot{V}_{I}&=e_{I}\dot{e}_{I}\\ &=-e_{I}(\beta e_{I}-e_{o2})\end{array}  \tag{50}\]  
Therefore, within finite time, the tracking error is bounded by:  
\[\|e_{I}\|\leq\frac{\|e_{o2}\|}{\beta} \tag{51}\]  
According to (32), the error \(e_{o2}\) is bounded, so the closed-loop electrical subsystem is asymptotically stable. In conclusion, Figure 5 provides a conceptual block diagram of the whole control algorithm. The discrete realization of the velocity estimator and controller using the forward Euler method are listed below. Taking the velocity estimator from Equations (20) and (21), and integrating the high-precision estimated velocity to obtain the position:  
\[\left\{ \begin{array}{ll}\eta(k)=\left(1+h_{\mathrm{s}}H\right)^{-1}[\eta(k-1 )+h_{\mathrm{s}}\frac{H}{k_{\mathrm{s}}}[U(k)-I(k)R]+h_{\mathrm{s}}\frac{H^{2 }L}{k_{\mathrm{s}}}I(k)]\\ \hat{v}(k)=\eta(k)-\frac{HL}{k_{\mathrm{s}}}I(k)\\ \hat{S}(k)=\frac{k}{\hat{0}}\hat{v}(k)\end{array} \right. \tag{52}\]  
Reduced-order ESO from Equations (24) and (25):  
\[\left\{ \begin{array}{ll}z_{2}(k+1)=z_{2}(k)+h_{\mathrm{s}}\big{\{}-\beta_{1 }z_{2}(k)-\beta_{1}^{2}x_{2}(k)-\beta_{1}[f_{1}(x_{1}(k),x_{2}(k))+r_{1}x_{3}(k )]\big{\}}\\ \hat{d}_{1}(k)=z_{2}(k)+\beta_{1}x_{2}(k),\beta_{1}>0\end{array} \right. \tag{53}\]  
\[\left\{ \begin{array}{ll}z_{3}(k+1)=z_{3}(k)+h_{\mathrm{s}}\big{\{}-\beta_{2 }z_{3}(k)-\beta_{2}^{2}x_{3}(k)-\beta_{2}[f_{2}(x_{1}(k),x_{2}(k),x_{3}(k))+r_{ 2}u(k)]\big{\}}\\ \hat{d}_{2}(k)=z_{3}(k)+\beta_{2}x_{3}(k),\beta_{2}>0\end{array} \right. \tag{54}\]  
Figure 5: Block diagram of the whole control algorithm. Reference trajectory from Equation (33):  
\[\left\{ \begin{array}{l}S_{d}(k+1)=S_{d}(k)+h_{s}v_{d}(k)\\ v_{d}(k+1)=v_{d}(k)+h_{s}a_{d}(k)\\ a_{d}(k)=-{\omega_{n}}^{2}S_{d}(k)-2\xi\omega_{n}v_{d}(k)+{\omega_{n}}^{2}r\\ \end{array} \right. \tag{55}\]  
Feedback control law from Equation (38):  
\[I_{v}(k+1)=\frac{m}{k_{e}}\Big{\{}a_{d}(k+1)+\frac{c}{m}v_{d}(k+1)-h_{1}[\hat{ S}(k)-S_{d}(k)]-h_{2}[\hat{0}(k)-v_{d}(k)]-\hat{d}_{1}(k)\Big{\}} \tag{56}\]  
Tracking differentiator from Equation (44):  
\[\left\{ \begin{array}{l}\eta_{1}(k+1)=\eta_{1}(k)+h_{s}\eta_{2}(k)\\ \eta_{2}(k+1)=\eta_{2}(k)+h_{s}\big{\{}x^{2}[I_{v}(k)-\eta_{1}(k)]-2\tau\eta_{ 2}(k)\big{\}}\\ \end{array} \right.