# Analytical MPC Algorithm Using Steady-State Process Model
## 3 Results
### Simulation Results  
The performance of the SSDMC algorithm was compared with the classical DMC algorithm's performance in the chemical reactor's control system. In both algorithms, the following values of parameters were assumed: prediction horizon \(p=70\), control horizon \(s=35\), and coefficient \(\lambda=0.001\). Moreover, a constant reference trajectory on the prediction horizon was assumed. The control systems were simulated in Matlab on a PC equipped with the AMD Athlon II X3 460 processor running at 3.40 GHz. A sampling time equal to \(T_{s}=3.6\) s was assumed. The control plant was simulated using the Dormand-Prince method implemented in the _ode45_ solver. The structure of the control system is shown in Figure 3.  
The responses of control systems with DMC and SSDMC controllers are shown in Figure 4. The response to the change of the setpoint to \(\overline{C}_{B1}=1\) mol/L obtained in the control system with the SSDMC controller (red lines) practically does not have overshoot; therefore, the control time is slightly shorter than in the case when the DMC controller (blue lines) is used. In the case of disturbance response, the SSDMC controller does not generate overshoot, but the maximal temporary control error is slightly higher than in the control system with the DMC controller. Figure 3: Structure of simulated control system. Moreover, the DMC controller compensates the disturbance faster. On the other hand, the control signal achieves much smaller values than with the SSDMC controller, generating the calm control signal. In the case of responses to the change of the setpoint to \(\overline{C}_{B2}=1.25\) mol/L, the SSDMC controller outperforms the DMC controller. It is significantly faster than the DMC controller and generates responses without overshoot. This time, the SSDMC controller compensates the disturbance faster than the DMC controller. However, the maximal temporary control error is slightly bigger in the control system with the SSDMC controller. To improve the operation of the SSDMC controller, experiments with decreasing \(\lambda\) coefficient were conducted; the results are depicted in Figure 5. Initial responses (for \(\lambda=0.001\)) are drawn with red lines; the ones obtained for \(\lambda\) decreased 10 times--with blue lines, and for \(\lambda\)  
Figure 4: Responses of control system to changes in setpoint to \(\overline{C}_{B1}=1\) mol/L and \(\overline{C}_{B2}=1.25\) mol/L and to change in disturbance by 10% in 6 th minute of experiment; \(\lambda=0.001\); SSDMC—red lines, DMC—blue lines. decreased 100 times--with magenta lines. Decreasing \(\lambda\) did not influence the overshoot--it is not present at all in responses to the change of the setpoint to \(\overline{C}_{B1}=1.25\) mol/L and almost not present in responses to the change of the setpoint to \(\overline{C}_{B1}=1\) mol/L. Decreasing \(\lambda\) in all cases brought a decrease in the maximal temporary control error in disturbance responses. Decreasing \(\lambda\) 10 times visibly accelerated the control system's responses. However, the further decrease in \(\lambda\) to \(10^{-5}\) almost did not influence the control time. Moreover, in the latter case and in the case of the change of the setpoint to \(\overline{C}_{B1}=1\) mol/L, oscillations of the control signal at the beginning of the experiment occurred. For the next experiment, \(\lambda=10^{-4}\) was chosen. Figure 5: Responses of the control system with the SSDMC controller to changes in the setpoint to \(\overline{C}_{B1}=1\) mol/L and \(\overline{C}_{B2}=1.25\) mol/L and to the change of the disturbance by 10% in the 6 th minute of the experiment. \(\lambda=10^{-3}\)—red lines; \(\lambda=10^{-4}\)—blue lines; \(\lambda=10^{-5}\)—magenta lines. In addition, experiments with different values of the control horizon \(s\) were performed; the results are shown in Figure 6. The control horizon gradually decreased from \(s=35\). Interestingly, the responses obtained remained unchanged even for \(s=4\) (they are drawn with the red lines).