# Nonlinear Control Design of a Half-Car Model Using Feedback Linearization and an LQR Controller
## 3 Modelling
### Feedback Linearization  
System can be converted to equivalent linear system by using Feedback Linearization. This method uses appropriate control law and alteration of variables so that the new malformed system is invertible. Considering the specific Multiple Input Multiple Output (MIMO) system of the following form [29]:  
\[\dot{x}=f(x)+\sum_{i}^{m}g_{i}(x)u_{i} \tag{9}\]  
\[y_{1}=h_{1}(x) \tag{10}\]  
\[y_{m}=h_{m}(x) \tag{11}\]  
In which  
\(f(x)\), \(g_{1}(x)\),...,\(g_{m}(x)\) are smooth vector fields and  
\(h_{1}(x)\),..., \(h_{m}(x)\) are smooth functions, defined on an open set of \(R^{n}\). where  
\(f:D\to R^{n}\) and \(G:D\to R^{n\times p}\) are defined on a domain \(D\subset R^{n}\) which encloses the origin, and trick the question if there survives a state feedback control or not [29]. State feedback control Law is:  
\[u=\alpha(x)+\beta(x)v \tag{12}\] \[u=-E^{-1}(x)S+E^{-1}(x)v \tag{13}\]  
and change of new variables such that the diffeomorphism  
\[z=T(x) \tag{14}\]  
that adapts the specific system into an equivalent linear system and derive the conditions which permits us to transmute the system such that the map between input and output is linear. Here, it is assumed that values of all the state variables and process disturbances are available at any instant of time and besides it no any particular assumption is considered. Outputs of the system are  
\[y_{1}=z=x_{1} \tag{15}\] \[y_{2}=\theta=x_{3} \tag{16}\]  
Figure 3: Nonlinear System of Half Car ASS  
Simplify the system in a expedient equation form, where  
\[W= \begin{bmatrix}0&0\\ \frac{1}{m_{s}}&\frac{1}{m_{s}}\\ 0&0\\ \frac{-acosx_{3}}{ly}&\frac{bcosx_{3}}{ly}\\ 0&0\\ \frac{-1}{m_{uf}}&0\\ 0&0\\ 0&\frac{-1}{m_{uf}}\\ \end{bmatrix} \]  
\[O= \begin{bmatrix}0&0\\ \frac{K_{tf}}{m_{s}}&\frac{K_{tr}}{m_{s}}\\ 0&0\\ \frac{K_{tf}}{ly}&\frac{K_{tr}}{ly}\\ 0&0\\ \frac{K_{tf}}{m_{uf}}&0\\ 0&0\\ \frac{K_{tr}}{m_{uf}}&0\\ 0&0\\ \frac{K_{tr}}{m_{uf}}&0\\ \end{bmatrix} \]  
while \(f(x)\) is the matrix of all other other terms except inputs and road disturbance terms. the overall state equations representation in Matrix form will be as:  
\[\dot{x}=f(x)+W \begin{bmatrix}f\\ f_{r}\\ \end{bmatrix} +O \begin{bmatrix}z_{rf}\\ z_{rr}\\ \end{bmatrix}  \tag{17}\]  
Matrices (E & S) in Equation (13) are as under:  
\[E= \begin{bmatrix}L_{g1}L_{f}h_{1}(x)&L_{g2}L_{f}h_{1}(x)\\ L_{g1}L_{f}h_{2}(x)&L_{g2}L_{f}h_{2}(x)\\ \end{bmatrix} \]  
\[S= \begin{bmatrix}S_{1}\\ S_{2}\\ \end{bmatrix} \]  
\[S= \begin{bmatrix}L_{f}^{2}h_{1}(x)\\ L_{f}^{2}h_{2}(x)\\ \end{bmatrix} \]  
Therefore, after taking derivatives the following values are obtained:  
\[E= \begin{bmatrix}\frac{1}{m_{s}}&\frac{1}{m_{s}}\\ \frac{-acosx_{3}}{ly}&\frac{bcosx_{3}}{ly}\\ \end{bmatrix} \]Now the decomposition of \(S\) matrix are as under:  
\[S_{1} =\frac{1}{m_{s}}[-(B_{f}+B_{r})x_{2}+(aB_{f}-bB_{r})x_{4}cosx_{3}-K_ {f}x_{5}\] \[+B_{f}x_{6}-K_{r}x_{7}+B_{r}x_{8}] \tag{18}\] \[S_{2} =\frac{1}{J_{y}}[(aB_{f}-bB_{r})x_{2}cosx_{3}-(a^{2}B_{f}+b^{2}B_ {r})x_{4}cos^{2}x_{3}\] \[+aK_{f}x_{5}cosx_{3}-aB_{f}x_{6}cosx_{3}-bK_{r}x_{7}cosx_{3}+bB_{ r}x_{8}\] \[cosx_{3}] \tag{19}\]  
Similarly, taking inverse of \(E\) matrix will be as:  
\[-E^{-1}(x)= \begin{bmatrix}-\frac{m_{s}b}{b+a}&\frac{-I_{y}}{(b+a)\cos(x_{3})} \\ -\frac{m_{s}a}{b+a}&\frac{-I_{y}}{(b+a)\cos(x_{3})}\end{bmatrix} \]  
\[u=(\frac{1}{b+a}) \begin{bmatrix}-m_{s}b(S_{1})+m_{s}b(v_{1})+I_{y}(S_{2})-I_{ y}(v_{2})\\ -m_{s}a(S_{1})+m_{s}a(v_{1})-\frac{I_{y}S_{2}}{\cos(x_{3})}-\frac{I_{y}v_{2}}{ \cos(x_{3})}\end{bmatrix} \]  
where \(v_{1}\) and \(v_{2}\) are linear control inputs. As the control law is now developed, so for doing feedback linearization the system is now converted in to normal form i.e., zeta(\(\acute{\zeta}\)) and eta(\(\eta\)) form ([PERSON] et al., 2011)  
\[\acute{\zeta}=A\zeta+Bv+Z \tag{20}\]  
\[y=C\zeta \tag{21}\]  
In normal form, after putting the values in Equation (19) the system can be represented in the state space form as:  
\[\acute{\zeta}= \begin{bmatrix}0&1&0&0\\ 0&0&0&0\\ 0&0&0&1\\ 0&0&0&0\end{bmatrix}