## 3 Results
### Stage 2
#### 3.2.3 State Equation and Output Vector  
We have the input and output equations of the representation in state variables in the following equations; see Equations (2) and (3). To obtain matrix \(A\) in its representation in state variables, we must obtain the partial derivatives in each of the equations with respect to the variable of the differential equation. Then, these partial derivatives are organized into a matrix as follows; see Equation (19).  
\[A=\begin{pmatrix}-k1&0&0\\ k1&-k2&0\\ 0&k2&-k3\end{pmatrix} \tag{19}\]  
This matrix is known as the Jacobian matrix and is the matrix \(A\) of the representation in state variables.  
Matrix \(B\) in the representation in state variables is calculated as follows. The system input variable is identified (in this case, it is the \(u(t)\) variable). The partial derivatives of each of the state equations are taken with respect to the input variable. These partial derivativesare placed in a column of matrix \(B\). This column is multiplied by the common system input factor. In this investigation, the input variable of the system is \(u(t)=72\); see Equation (20).  
\[B=\begin{pmatrix}k1\\ k2-k1\\ k3-k2\end{pmatrix} \tag{20}\]  
Equation (20) indicates that output \(C\) is equal to the third state variable, so it can be represented as: where \([x1,x2,x3]\) is the state variable vector. Then, the output derivative can be obtained with respect to time, which is equal to the derivative of the third state variable (\(x3\)).  
Therefore, the output equation in the representation in state variables is as follows; see Equation (21).  
\[C=\begin{pmatrix}0&0&1\end{pmatrix} \tag{21}\]  
Variable \(D\) represents the direct-transmission matrix (also known as the direct-gain matrix) in the space-state representation of a system. This matrix is used to represent the direct relationship between the input and output of the system, bypassing system dynamics. In some cases, as in the system represented in the SD, the matrix \(D\) becomes unnecessary since the output of the system only depends on the state variable and not on the input. In such cases, matrix \(D\) is set to zero. This simplifies the representation of the system and reduces the number of calculations needed for analysis and control.  
After calculating matrices, \(A\), \(B\), \(C\) and \(D=0\), the representation in system-state variables can be written as follows; see Equations (22) and (23).  
\[\dot{x}=\begin{pmatrix}-0.008541&0&0\\ 0.008541&-0.037147&0\\ 0&0.037147&-0.02786\end{pmatrix}\begin{pmatrix}x1\\ x2\\ x3\end{pmatrix}+\begin{pmatrix}0.008541\\ 0.028606\\ -0.009287\end{pmatrix}\begin{pmatrix}u1\\ u2\\ u3\end{pmatrix} \tag{22}\]  
\[y=\begin{pmatrix}0&0&1\end{pmatrix}\begin{pmatrix}y1\\ y2\\ y3\end{pmatrix}+0 \tag{23}\]  
where:  
\(x\) is the state vector (\(x1,x2,x3\));  
\(\dot{x}\) is the time derivative of the state vector;  
\(u\) is the input vector of the system (\(u1\)) and is the output vector of the system (\(y1\));  
\(A\) is the state matrix (\(3\times 3\));  
\(B\) is the input matrix (\(3\times 1\));  
\(C\) is the output matrix (\(1\times 3\));  
\(D\) is the direct transmission matrix, which in this case is zero.