## 4 Control-Law Design
### Design of Active Disturbance Rejection Controller
#### 4.2.1 N-Order Active Disturbance Rejection Control  
Combining the expressions for our research subject in Equations (3), (5) and (20), a disturbed N-order system and an extended-state variable can be represented as:  
\[\left\{ \begin{array}{l}z^{(n)}=\Gamma\Big{(}t,z(t),\hat{z}(t),\dots,z^{(n-1) }(t)\Big{)}+b_{0}u\\ \\ \left\{\begin{array}{l}\theta_{1}=z,\theta_{2}=\hat{z},\dots,\theta_{n}=z^{( n-1)}\\ \\ \theta_{n+1}=\Gamma\Big{(}t,z(t),\hat{z}(t),\dots,z^{(n-1)}(t)\Big{)}\end{array} \right.\end{array} \right., \tag{23}\]  
where, \(u\), \(b_{0}\), and \(z(t)\) are the control input, coefficient, and output, respectively, of the N-order disturbed system, respectively. The \(\Gamma\) denotes differentiable total disturbance. The \(\theta_{n+1}\) is an extended-state variable. The linear ESO equation in the state-space form (Equation (24)) can be obtained by the state reconstruction of the linear extended-state observer using Equation (23), where \(\theta_{i}\) is the actual value of the state variable. The observer's estimated value is \(\hat{\theta}_{i}\). The gain matrix of the observer is \(E\). Incorporating the transformation \(\widetilde{z}=\widehat{\theta}=\theta-\hat{\theta}=z-\hat{z}\), we can derive the error equation for the LESO. The error equation establishes that the LESO operates within a bounded input and output framework, and that the upper limit of the error is adjustable via \(\beta_{\omega_{0}}(i)\). By judiciously selecting the appropriate values for \(E\), the observer's estimated value \(\hat{\theta}_{i}\) approximates the actual value of the state variable \(\theta_{i}\), where \(\theta_{i}\approx\hat{\theta}_{i}\):  
\[\left\{ \begin{array}{l}\dot{\hat{\theta}}=\hat{z}=A\hat{\theta}+Bu+E(z-\hat{ z})\\ \\ A=\left(\begin{array}{ccccc}0&1&\dots&0&0\\ 0&0&1&\dots&0\\ \dots&\dots&\dots&\dots&\dots\\ 0&0&0&0\end{array}\right),B=\left(\begin{array}{c}0\\ \cdots\\ b_{0}\\ 0\end{array}\right),A\in R^{(n+1)\times(n+1)}\\ \\ E=\left(\beta_{\omega_{o}}(1)&\beta_{\omega_{o}}(2)\dots&\beta_{\omega_{o}}(n) \;\beta_{\omega_{o}}(n+1)\right)^{T}\end{array} \right., \tag{24}\]  
To determine the expanded observer gain coefficient \(\beta_{\omega_{o}}(i)\), we set the poles of the characteristics in Equation (25) (derived from Equation (24)) in the left-half plane. This method can reduce the adjustment parameters to bandwidth \(\omega_{o}\) of the LESO. By modulating the observer's bandwidth, we gain the flexibility to alter the overshooting behavior of the system:  
\[\left\{\begin{array}{l}L_{LESO}(s)=s^{n+1}+\beta_{\omega_{o}}(1)s^{n}+\beta _{\omega_{o}}(2)s^{n-1}+\dots+\beta_{\omega_{o}}(n-1)=(s+\omega_{o})^{n+1}\\ \beta_{\omega_{o}}(i)=C_{n+1}^{i}\omega_{o}^{i} \begin{array}{c}(i=1,2,3 \dots,n+1)\end{array} \right., \tag{25}\]  
Figure 2: Block diagram of MPC and SMC comparison scheme. in the LADRC loop. \(\hat{\theta}_{i}\) is the estimated value of the LESO in the LADRC loop, and \(\theta_{1d}\) is the reference input of the two schemes:  
\[ \begin{split}\overset{*}{\theta}_{1d}=\left\{\begin{array}{l} \theta_{1d},\ \ \text{Switch to}\ CD\\ u_{2 LADRC}=-\frac{1}{b_{0}}\cdot\left(\beta_{\omega_{c}}(1)\big{(}\hat{\theta }_{1}-\theta_{1d}\big{)}+\sum\limits_{i=2}^{3}\beta_{\omega_{c}}(i)\hat{\theta }_{i}\right),\ \ \text{Switch to}\ CE\end{array}\right.,\end{split}  \tag{28}\]  
where \(\overset{*}{\theta}_{1d}\) denotes the reference input for the SMC control loop. Switching to CD, which represents the SMC scheme, then \(\overset{*}{\theta}_{1d}\) equals \(\theta_{1d}\). Switching to CE, representing the LADRC-SMC scheme, then \(\overset{*}{\theta}_{1d}\) equals \(u_{2 LADRC}\). System delay was not considered here. Based on the robotic single-leg dynamic model (Equation (5)), we set order N of the LADRC to 2. This configuration allows for the optimal utilization of their respective advantages, further enhancing system performance and stability.