## 4 Case Study: Application for DC Motor Servo Systems
Available values of \(\mathbf{P}_{s}\) in the cases of \(\mathbf{Q}_{\tau}=0\) are shown in Table 2. The weight for \(\boldsymbol{\alpha}_{x}\) is \(\left[ \begin{array}{cccc}10000&10000&0.001&0.001\end{array} \right]^{T}\) and \(\mathbf{P}_{s}\) was calculated by the MATLAB(r) care function. Since the weight for \(\boldsymbol{\alpha}_{\tau}\) is \(\left[ \begin{array}{cccc}100&100&10&10\end{array} \right]^{T}\) and similar calculations can be performed in the cases of \(\mathbf{Q}_{\tau}\
eq 0\), the proposed controller can be implemented by these results. Figure 3 shows the simulation results with \(r=\pi\) and \(\mathbf{x}(0)=0\) without changing \(\mathbf{w}\). The proposed controller was implemented by using Simulink(r) blocks and the ode2 (Heun) fixed-step solver was used for the simulation. The step size was set at 10\(\upmu\)s for smooth results. To verify the performance of the proposed controller, we also implemented an implicit MPC by using MATLAB(r) Model Predictive Control Toolbox(tm) software. A numerical method based on the direct multi-shooting method implemented by using CasADi software [35] was chosen for comparison since it is close to the optimal solution. The sampling time used in both the numerical method and the implicit MPC was set to 100 \(\upmu\)s since lower sampling time causes larger computational loads. The prediction and control horizon of the MPC is set to (100, 10). As shown in Figure 3a-c, the trajectory of the proposed controller and that of the numerical method are very similar, therefore it can be said that the proposed controller is well-approximated. On the other hand, the implicit MPC has different trajectories between 0.2 and 0.4 s though the constraints are maintained. In Figure 3d-e, it seems that the trajectory of the proposed controller has a delay compared to that of the numerical method, but the delay is small enough to be neglected. Since the steady-state LQT controller has similar delay properties [36], it is assumed that the cause of this phenomenon is the steady-state approximation. \begin{table}
\begin{tabular}{c|c c c c c c} \hline \hline \(\boldsymbol{\alpha}_{x}\) & \multicolumn{3}{c}{\(\mathbf{P}_{s}\)} & \(\boldsymbol{\alpha}_{x}\) & \multicolumn{3}{c}{\(\mathbf{P}_{s}\)} \\ \hline \(\left[\begin{array}{c}0\\ 0\\ 0\\ 0\end{array}\right]\) & \(\left[\begin{array}{cccc}0.08&0.02&6.50&0.01\\ *&0&1.46&0\\ *&*&555.69&1\\ *&*&*&0\end{array}\right]\) & \(\left[\begin{array}{cccc}10000\\ 0\\ 0\\ 0\end{array}\right]\) & \(\left[\begin{array}{cccc}12.21&-0.13&6.63&1.29\\ *&0.06&1.56&-0.04\\ *&*&0.20\\ 0\end{array}\right]\) \\ \(\left[\begin{array}{cccc}0\\ 0\\ 0\end{array}\right]\) & \(\left[\begin{array}{cccc}12.21&-0.13&6.63&1.29\\ *&0.06&1.56&-0.04\\ *&*&0.20\\ 0\end{array}\right]\) & \(\left[\begin{array}{cccc}0\\ 0.08&0.02&6.50&0.01\\ *&0&1.46&0\\ *&*&0.555.69&1\\ *&*&0\\ 0\end{array}\right]\) & \(\left[\begin{array}{cccc}0\\ 0.001\\ *&*&0\\ *&0.63&1.29\\ *&0.06&1.56&-0.04\\ *&0.06&1.56&-0.04\\ *&*&0.20\\ \end{array}\right]\) \\ \(\left[\begin{array}{cccc}0\\ 0\\ 0\\ 0\\ 0.001\end{array}\right]\) & \(\left[\begin{array}{cccc}12.21&-0.13&6.63&1.29\\ *&0.06&1.56&-0.04\\ *&*&0.20\\ *&*&0.20\\ \end{array}\right]\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Examples of the solutions of (34). Figure 3: Simulation results of the proposed controller, the numerical method, and the implicit MPC with the first set of \(r\) and **w**: (**a**) motor currents from 0 to 1 s, (**b**) angular speeds of the motor rotor from 0 to 1 s, (**c**) angle of the motor rotor from 0 to 1 s, (**d**) motor currents from 0 to 0.02 s, (**e**) angular speeds of the motor rotor from 0 to 0.02 s.  
Figure 4 shows simulation results with \(r=10\), \(\mathbf{x}(0)=0\), and \(\mathbf{w}=\left[ \begin{array}{cccc}-10&-10&-100&-100\end{array} \right]^{T}\).