## 3 Results
### Stage 3
#### 3.3.2 Control Ackermann--Calculation of Gains  
When we are faced with a control problem in state variables, one of the ways to find the gain matrix \(k\) of the state feedback is by using Ackermann formula. This formula allows direct calculation of the feedback-gain matrix in the state space, starting from the following equation if the system is in the controllable form; see Figure 3.  
For the calculation of Ackermann gains, the following equation is used; see Equation (33). \[k=(0\ 0\ldots\ldots\ldots 1)(C)^{-1}\varnothing(A) \tag{33}\]  
where matrix \(C\) is the controllability matrix of the system and \(\varnothing(A)\) can be expressed as the following equation; see Equation (34). \[\varnothing(A)=\lambda^{n}+\alpha_{1}\lambda^{n-1}+\alpha_{2}\lambda^{n-2}+ \ldots+\alpha_{n-1}\lambda+\alpha_{n} \tag{34}\]  
In this equation, \(\alpha_{1}\alpha_{2},\ldots,\alpha_{n}\) are the coefficients of the desired characteristic equation. Where the desired poles of the system are already available for the research carried out, the desired characteristic equation is calculated from these; see Equation (35). \[(s+0.0187)(s+0.0453)(s+0.0128) \tag{35}\]  
By multiplying the three poles, the desired equation, Equation (36),  
\[\Delta(\lambda)=s^{3}+0.07681s^{2}+0.00166s+1.084*10^{-5} \tag{36}\]  
is obtained. Figure 3: Ackermann control in state space. \[\varnothing(A) =\left( \begin{array}{ccc}-0.008541&0&0\\ 0.008541&-0.037147&0\\ 0&0.037147&-0.02786\\ \end{array} \right)^{3} \tag{37}\] \[+0.07681\left( \begin{array}{ccc}-0.008541&0&0\\ 0.008541&-0.037147&0\\ 0&0.037147&-0.02786\\ \end{array} \right)^{2}\] \[+0.00166\left( \begin{array}{ccc}-0.008541&0&0\\ 0.008541&-0.037147&0\\ 0&0.037147&-0.02786\\ \end{array} \right)+1.084\] \[*10^{-5}\left( \begin{array}{ccc}-0.008541&0&0\\ 0.008541&-0.037147&0\\ 0&0.037147&-0.02786\\ \end{array} \right)\]  
By performing the matrix operations and adding each of the operations, Equation (38) is obtained. \[\varnothing(A)=10^{-5}\left( \begin{array}{ccc}0.1592&0&0\\ -0.0623&0.3681&0\\ 0.1035&-0.5055&0.2417\\ \end{array} \right) \tag{38}\]  
We proceed to obtain the controllability matrix of the system; see Equation (39). \[C=\left(b\;Ab\;A^{2}b\right) \tag{39}\]  
where, by replacing and performing the operations in each of the positions of the matrix, the result is as follows; see Equation (40). \[ \begin{array}{ccc}C=\left(\begin{array}{ccc}0.008541&-0.0001&0.0062*10^{-4 }\\ 0.028606&-0.0010&0.3614*10^{-4}\\ -0.009287&0.0013&-0.0001\\ \end{array}\right)\\ K=\left[0\;0\;1\right]\left(\begin{array}{ccc}0.008541&-0.0001&0.0062*10^{- 4}\\ 0.028606&-0.0010&0.3614*10^{-4}\\ -0.009287&0.0013&-0.0001\\ \end{array}\right)\\ *10^{-5}\left(\begin{array}{ccc}0.0921&0&0\\ -0.0067&0.1147&0\\ 0.0104&-0.0528&0.1015\\ \end{array}\right)\end{array}  \tag{40}\]  
The following vector of Ackermann k, of \(1\times 3\), is obtained by having three columns and one row; see Equation (41). \[k=\left(0.4431\right.\left.-0.0666\right.\left.-0.1495\right) \tag{41}\]  
To get the new Ak, it is substituted into the feedback equation; see Equation (42). \[\left( \begin{array}{ccc}-0.0123&0.0006&0.0013\\ -0.0041&-0.0352&0.0043\\ 0.0041&0.0365&-0.0292\\ \end{array} \right) \tag{42}\]  
To obtain a model with different inputs and that follows a reference, block \(N\) is added at the input of the pole protection block diagram; a control is carried out by following a reference, for this case a gain of precompensation, whose deduction is as follows; see Figure 4.  
The formula that represents the value of the precompensation gain is given under the following equation; see Equation (43). \[N=\frac{1}{C(A-Bk)^{-1}B} \tag{43}\]  
Plugging the data into the above equation, we get a gain of \(N=1.2269\) for the precompensation gain. The transfer function for the new pole assignment including the regulation gain for a reference remains as follows; see Equation (44).