## 4 Hydropneumatic Suspension Controller's Design and Parameter Optimization
### Sliding-Mode Control  
Before diving into the design of the Sliding-Mode Controller (SMC), it is essential to lay the groundwork by setting up a reference model. In this study, an ideal Skyhook model [21] is shown in Figure 6. The core idea behind sliding-mode control is to craft a controlled force that effectively guides the spring-loaded mass in the two-degree-of-freedom system to mirror the behavior of its counterpart in the reference Skyhook model. The reference model's differential equation is as follows:  
Figure 4: Road surface grade identification model’s structure. Figure 5: Controller’s design and parameter optimization framework. The equation describing the reference model reads as follows:  
\[ \begin{split}& m_{s}\ddot{x}_{sr}+k_{s}(x_{sr}-x_{ur})+c_{s}(\dot{x }_{sr}-\dot{x}_{ur})=F_{sk}\\ & m_{u}\dot{x}_{ur}+k_{u}(x_{ur}-x_{r})=k_{s}(x_{sr}-x_{ur})+c_{s}( \dot{x}_{sr}-\dot{x}_{ur})\end{split}  \tag{9}\]  
where \(x_{sr}\) represents the vehicle body's reference displacement, \(x_{ur}\) denotes the wheel's reference displacement, \(c_{sk}\) is the Skyhook damping coefficient, and \(F_{sk}\) is the Skyhook damping force, \(F_{sk}=-c_{sk}\ddot{x}_{sr}\). The reference state vector is defined as follows:  
\[y= \begin{bmatrix}y_{1}&y_{2}&y_{3}&y_{4}\end{bmatrix} ^{T}= \begin{bmatrix}x _{sr}&\dot{x}_{sr}&x_{ur}&\dot{x}_{ur}\end{bmatrix} ^{T} \tag{10}\]  
Based on the body mass displacement's integral error, the displacement error, and the velocity error of the vehicle model with a two-degree-of-freedom active suspension, as well as the suspension model with ideal Skyhook damping, the error vector (\(e\)) for the hydrodynamic suspension system is expressed as follows:  
\[e= \begin{bmatrix}e_{1}&e_{2}&e_{3}\end{bmatrix} ^{T}= \begin{bmatrix}\dot{x}_{s} -\dot{x}_{sr}&x_{s}-x_{sr}&\int x_{s}-x_{sr}\end{bmatrix} ^{T} \tag{11}\]  
The derivative of the error:  
\[\dot{e}= \begin{bmatrix}\dot{e}_{1}&\dot{e}_{2}&\dot{e}_{3}\end{bmatrix} ^{T}= \begin{bmatrix}\dot{x}_{s}-\dot{x}_{sr}&\dot{x}_{s}-\dot{x}_{sr}&x_{s}-x_{sr} \end{bmatrix}  \tag{12}\]  
The error state equation:  
\[\dot{e}=De+Ex+Fy+Gu \tag{13}\]  
where system matrices D, E, F, and G:  
\[D= \begin{bmatrix}-\frac{c_{s}}{m_{s}}&-\frac{k_{s}}{m_{s}}&0\\ 1&0&0\\ 0&1&0\end{bmatrix} ,E= \begin{bmatrix}0&0&\frac{k_{s}}{m_{s}}&\frac{c_{s}}{m_{s} }\\ 0&0&0&0\\ 0&0&0&0\end{bmatrix} ,F= \begin{bmatrix}0&0&-\frac{k_{s}}{m_{s}}&-\frac{c_{s}}{m _{s}}\\ 0&0&0&0\\ 0&0&0&0\end{bmatrix} ,G= \begin{bmatrix}\frac{1}{m_{s}}\\ 0\\ 0\\ 0\end{bmatrix} \]  
The sliding surface (s) is expressed as an error-weighted sum as follows:  
\[s=ce=c_{1}e_{1}+c_{2}e_{2}+c_{3}e_{3} \tag{14}\]  
Figure 6: Reference model. where the \(c\) values are coefficient matrices selected based on the pole placement. All the states of the sliding mode's dynamics must exhibit satisfactory transient performance and maintain asymptotic stability throughout the reaching phase to the switching manifold. The characteristic equation of the sliding mode, denoted as \(D(\lambda)\), is as follows:  
\[D(\lambda)=c_{1}\lambda^{2}+c_{2}\lambda+c_{3}\]  
To ensure the minimal oscillation when the closed-loop system possesses conjugate complex poles in the left half-plane, the following design specifications are imposed: an overshoot of \(\sigma\leq 10\%\), a peak time of \(t_{p}\leq 1s\), a natural frequency of \(\omega_{n}=6.32\) rad/s, and a damping ratio of \(\xi=0.8\). These yield the system's eigenvalues (\(\lambda=-5\pm 3.9j\)), consequently determining the control gain vector \(c=[1,10,40]\). The derivative of the sliding surface is as follows:  
\[\dot{s}=\bigg{(}c_{2}-\frac{c_{s}c_{1}}{m_{s}}\bigg{)}e_{1}+\bigg{(}c_{3}-\frac {k_{s}c_{1}}{m_{s}}\bigg{)}e_{2}+\frac{k_{s}c_{1}}{m_{s}}(x_{u}-x_{ur})+\frac{ c_{s}c_{1}}{m_{s}}(\dot{x}_{u}-\dot{x}_{ur})+\frac{c_{1}}{m_{s}}u \tag{15}\]  
The speed of the convergence is selected as follows:  
\[\dot{s}=-k\cdot\text{sgn}(s) \tag{16}\]  
where \(k>0\) is a gain parameter.