# Optimal Sliding Mode Control for an Active Suspension System Based on a Genetic Algorithm
## 4 The OSMC Controller Design
### Design of Sliding Surface  
Considering a continuous-time system in the regular form given by Equation (3), a switching function \(S(X)\) is defined as below:  
\[S(X)=C_{T}X=c_{1}x_{1}+c_{2}x_{2}+c_{3}x_{3}+x_{4} \tag{7}\]  
where \(X\) is the state vector, and \(C_{T}\) is the switching matrix \(C_{T}=\left[ \begin{array}{cc}c_{1}&c_{2}&c_{3}&1\\ \end{array} \right]\). According to the design criteria of the sliding surface, the polynomial \(p^{3}+c_{3}p^{2}+c_{2}p+c_{1}\) should satisfy the Hurwitz law [17]. Based on the modern control theory, the controllability of the linear switched systems is found to be invariant for any nonsingular transformation. The nonsingular transformation is applied to \(X\) based on the controllability of matrices \(A\) and \(B\), which is shown from Equation (8) and Equation (9):  
\[\widetilde{X}=T_{s}X \tag{8}\]  
\[\left[ \begin{array}{c}\dot{\widetilde{X}}_{1}\\ \dot{\widetilde{X}}_{2}\\ \end{array} \right]=\left[ \begin{array}{cc}A_{11}&A_{12}\\ A_{21}&A_{22}\\ \end{array} \right]\left[ \begin{array}{c}\widetilde{X}_{1}\\ \widetilde{X}_{2}\\ \end{array} \right]+\left[ \begin{array}{c}0\\ B_{2}\\ \end{array} \right]U+\left[ \begin{array}{c}K_{1}\\ 0\\ \end{array} \right]W \tag{9}\] \begin{table}
\begin{tabular}{c c c} \hline \hline
**Symbol** & **Value** & **Unit** \\ \hline \(n_{0}\) & 0.1 & m\({}^{3}\) \\ \(f_{0}\) & 0.2 & \\ \(\
u\) & 20 & m/s \\ \(G_{0}(n_{0})\) & 0.0005 & m\({}^{-3}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The simulation parameters of the random road. The values of the matrices in Equations (8) and (9) are shown as follows:  
\[ \begin{array}{c}T_{s}=\left[\begin{array}{ccc}1&0&0&0\\ 0&1&0&0\\ 0&0&1&\frac{m_{s}}{m_{u}}\\ 0&0&0&1\end{array}\right],\widetilde{X}_{1}=\left[\begin{array}{ccc}x_{1}&x_{2 }&\dot{x}_{1}+\frac{m_{s}}{m_{i}}\dot{x}_{2}\end{array}\right],\widetilde{X}_{2 }=\left[\dot{x}_{2}\right]\\ A_{11}=\left[\begin{array}{ccc}0&0&1\\ 0&0&0\\ -\frac{k_{s}}{m_{u}}&0&0\end{array}\right],A_{12}=\left[\begin{array}{ccc} -\frac{m_{s}}{m_{u}}\\ 1\\ 0\end{array}\right],A_{21}=\left[\begin{array}{ccc}\frac{k_{s}}{m_{s}}&- \frac{k_{s}}{m_{s}}&\frac{c_{s}}{m_{s}}\end{array}\right]\\ A_{22}=-c_{s}(\frac{1}{m_{u}}+\frac{1}{m_{s}}),B_{2}=-\frac{1}{m_{u}},K_{1}= \left[\begin{array}{ccc}0&0&\frac{k_{s}}{m_{u}}\end{array}\right]^{T}\end{array}  \tag{10}\]  
The switching function can be rewritten after substituting Equation (9) into Equation (7) as follows:  
\[S(X)=\left[ \begin{array}{cc}C_{1}&C_{2}\end{array} \right]\cdot\left[ \begin{array}{c}\widetilde{X}_{1}\\ \widetilde{X}_{2}\end{array} \right]=C_{1}\widetilde{X}_{1}+C_{2}\widetilde{X}_ {2} \tag{11}\]  
The values of the matrix in Equation (11) can be seen as follows:  
\[C_{1}=\left[ \begin{array}{ccc}c_{1}&c_{2}&c_{3}\end{array} \right],C_{2}= \left[\frac{m_{u}}{m_{u}-m_{s}c_{3}}\right],m_{u}-m_{s}c_{3}\
eq 0 \tag{12}\]  
According to the properties of the sliding surface in SMC, it is easy for us to know that the value of Equation (11) should be equal to 0. As a result, Equation (13) is obtained under the condition of the above Equation (12):  
\[ \begin{array}{c}\widetilde{X}_{2}=C_{2}^{-1}C_{1}\widetilde{X}_{1}\\ C_{2}^{-1}=\frac{m_{u}-m_{s}c_{3}}{m_{u}}\end{array}  \tag{13}\]  
Substituting Equation (13) into Equation (11), Equation (14) can be obtained as follows:  
\[\widetilde{X}_{1}=\left(A_{11}-A_{12}C_{2}^{-1}C_{1}\right)X_{1} \tag{14}\]  
The characteristic polynomial of Equation (14) should satisfy the Hurwitz criteria to ensure the stability based on the theory of SMC. The characteristic polynomial of Equation (15) is shown in Equation (16), and Equation (17) can be obtained according to Equations (15) and (16):  
\[\lambda^{3}+\frac{m_{u}c_{2}-m_{s}c_{1}}{m_{u}-m_{s}c_{3}}\lambda^{2}+\frac{k _{t}}{m_{u}-m_{s}c_{3}}\lambda+\frac{k_{t}c_{2}}{m_{u}-m_{s}c_{3}}=0 \tag{15}\]  
\[(\lambda+p)^{3}=\lambda^{3}+3p\lambda^{2}+3p^{2}\lambda+p^{3} \tag{16}\]  
\[\left\{