## 5 Numerical Simulation
\begin{cases}\ddot{x}=(\cos(\phi)\sin(\theta)\cos(\psi)+\sin(\phi)\sin(\psi)) \dfrac{u_{1}}{m}\\ \dot{y}=(\cos(\phi)\sin(\theta)\sin(\psi)-\sin(\phi)\cos(\psi))\dfrac{u_{1}}{m} \\ \dot{z}=-g+(\cos(\phi)\cos(\theta))\dfrac{u_{1}}{m}\\ \ddot{\phi}=\dot{\phi}\dot{\psi}\dfrac{(I_{y}-I_{z})}{I_{x}}-\dfrac{I_{R}}{I_{ x}}\dot{\omega}_{d}+\dfrac{l}{I_{x}}u_{2}\\ \ddot{\theta}=\dot{\phi}\dot{\psi}\dfrac{(I_{z}-I_{x})}{I_{y}}+\dfrac{I_{R}}{I_ {y}}\dot{\phi}\omega_{d}+\dfrac{l}{I_{y}}u_{3}\\ \ddot{\psi}=\dot{\phi}\dot{\theta}\dfrac{(I_{x}-I_{y})}{I_{z}}+\dfrac{l}{I_{z} }u_{4}\end{cases} . \tag{73}\]  
It is possible to describe the model in the state-space form, where  
\[\mathbf{u}= \begin{bmatrix}u_{1}&u_{2}&u_{3}&u_{4}\end{bmatrix} ^{T} \tag{74}\]  
is the control vector, and \(\mathbf{x}\in\mathbb{R}^{12}\) is the state vector  
\[\mathbf{x}= \begin{bmatrix}x&\dot{x}&y&\dot{y}&z&\dot{z}&\phi&\phi&\theta&\theta& \psi&\psi\end{bmatrix} ^{T}= \begin{bmatrix}x_{1}&x_{2}&\ldots&x_{12}\end{bmatrix}  ^{T}. \tag{75}\]  
To present the influence on the system, weight matrices were changed during this experiment. There were three different configurations:  
\[ \begin{split}\mathbf{Q}&=1\cdot\left[\mathbf{I}_{6 \times 6}\right],\qquad\mathbf{R}=100\cdot\left[\mathbf{I}_{3\times 3}\right],\\ \mathbf{Q}&=1\cdot\left[\mathbf{I}_{6\times 6} \right],\qquad\mathbf{R}=1\cdot\left[\mathbf{I}_{3\times 3}\right],\\ \mathbf{Q}&=100\cdot\left[\mathbf{I}_{6\times 6} \right],\qquad\mathbf{R}=1\cdot\left[\mathbf{I}_{3\times 3}\right].\end{split}  \tag{81}\]  
The values of parameters used in modeling of the object are presented below in Table 1 [40]. Initial state and velocities were set as  
\[\mathbf{x}_{0}= \begin{bmatrix}\pi/4\\ \pi/2\\ 3\pi/4\\ 0\\ 0\\ 0\\ 0\end{bmatrix}\begin{bmatrix}\text{rad}\\ \text{rad}\\ \text{rad}\\ \text{rad}/\text{s}\\ \text{rad}/\text{s}\\ \text{rad}/\text{s}\\ \text{rad}/\text{s}\\ \text{rad}/\text{s}\\ \end{bmatrix} . \tag{82}\]  
Simulation time was 5s and time step was \(1\times 10^{-3}\)s.  
The aim of the control process is stabilization at \"zero\" point. The comparison of the execution time for both methods (Table 2) shows that the proposed method reduces computational effort, which can be seen in the shortened time of computation below. The computations were executed on Windows 7 Professional, 64-bit Intel(r) Core(tm) i5-5200M CPU @ 2.40 GHz. Simulation results for configuration \(\mathbf{R}_{1},\mathbf{Q}_{100}\) are presented. Differences between classical and modified SDRE method for next two configurations are unnoticeable. In every case of \(\mathbf{Q}\) and \(\mathbf{R}\) matrices configuration after a short transition phase, all angles are stabilized at a required point (Figures 2-4). The waveforms for both methods are \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Value** & **Unit** \\ \hline \(g\) & 9.81 & \(\frac{\text{m}}{\text{s}^{2}}\) \\ \(m\) & 0.5 & kg \\ \(l\) & 0.3 & m \\ \(l_{x}\) & 0.0081 & kgm\({}^{2}\) \\ \(l_{y}\) & 0.0081 & kgm\({}^{2}\) \\ \(l_{z}\) & 0.0162 & kgm\({}^{2}\) \\ \(J_{R}\) & 0.01 & \(N\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameters used in simulation. \begin{table}
\begin{tabular}{c c} \hline \hline  & **Comparison of Simulation Time** \\ \hline  & classical SDRE \\ \hline \(\mathbf{R}_{1},\mathbf{Q}_{100}\) & 11.276407 s \\ \(\mathbf{R}_{1},\mathbf{Q}_{1}\) & 11.978995 s \\ \(\mathbf{R}_{100},\mathbf{Q}_{1}\) & 11.224440 s \\ \hline  & modified SDRE \\ \hline \(\mathbf{R}_{1},\mathbf{Q}_{100}\) & **2.893052 s** \\ \(\mathbf{R}_{1},\mathbf{Q}_{1}\) & **2.433471 s** \\ \(\mathbf{R}_{100},\mathbf{Q}_{1}\) & **2.590412 s** \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Simulation time. **Author Contributions:** Writing--original draft preparation, S.S. and P.S. All authors have read and agreed to the published version of the manuscript. **Institutional Review Board Statement:** Not applicable. **Informed Consent Statement:** Not applicable. **Data Availability Statement:** Not applicable.