# Analytical MPC Algorithm Using Steady-State Process Model
## 2 Materials and Methods
### Efficient SSDMC Algorithm
Then, after assuming the coefficient \(\lambda_{k}=K_{k}^{2}\cdot\lambda\) (which is crucial for obtaining a compact control law), the following relation is obtained:  
\[\left(\mathbf{A}_{k}^{T}\cdot\mathbf{A}_{k}+\lambda_{k}\cdot\mathbf{I}\right)=K_{k}^{2} \cdot\left(\mathbf{A}^{T}\cdot\mathbf{A}+\lambda\cdot\mathbf{I}\right). \tag{28}\]  
Therefore, after substituting Equations (22)-(24) into (27), along with performing the appropriate mathematical transformations, one obtains the following result:  
\[\Delta\mathbf{u}=\frac{1}{K_{k}}\cdot\mathbf{K}\cdot\left(\overline{\mathbf{y}}- \overleftarrow{\mathbf{y}}+K_{k}\cdot\overleftarrow{\mathbf{A}}\cdot\Delta \overleftarrow{\mathbf{u}}\right)\,, \tag{29}\]  
where the matrix \(\mathbf{K}=\left(\mathbf{A}^{T}\cdot\mathbf{A}+\lambda\cdot\mathbf{I}\right)^{-1}\cdot\mathbf{A}^ {T}\) has the same form as in the classical DMC algorithm. Then, as in the classical DMC algorithm, the main part of the calculations in the SSDMC algorithm can be efficiently performed once at the algorithm design stage (in the offline phase). This approach allows for a significant reduction in the computational demand required by the algorithm during its execution. After further transformations, one obtains the following formula, which describes the current increment of the manipulated variable:  
\[\Delta u_{k|k}=\frac{1}{K_{k}}\cdot K_{1}\cdot\left(\overline{\mathbf{y}}- \overleftarrow{\mathbf{y}}-K_{k}\cdot\overleftarrow{\mathbf{A}}\cdot\Delta \overleftarrow{\mathbf{u}}\right)=\frac{1}{K_{k}}\cdot\mathbf{K}_{1}\cdot\left( \overline{\mathbf{y}}-\overleftarrow{\mathbf{y}}\right)-\mathbf{K}_{1}\cdot\left( \overleftarrow{\mathbf{A}}\cdot\Delta\overleftarrow{\mathbf{u}}\right). \tag{30}\]  
Then, if a constant reference trajectory as in Equation (where \(r_{0,k}=\dfrac{1}{K_{k}}\cdot r_{0}\) and \(r_{0},r_{1},\ldots,r_{p_{d}}\) are derived in the same way as in the control law presented in Equation (19) of the analytical DMC algorithm. Although the control law obtained in the SSDMC algorithm is very close to that of the standard Dynamic Model Control algorithm, it is important to note that the SSDMC algorithm offers considerably better control quality when applied to nonlinear processes compared to its predecessor. Tuning of the parameters of the SSDMC controller can be achieved in the same way as in the case of the DMC controller. The sampling period should be chosen in such a way that the delay or inverse response is included in the step-response model. The prediction horizon can be chosen to be equal to the dynamics horizon; tjos is the safest approach, and in the case of the SSDMC algorithm, the control law is obtained. Therefore, the length of the prediction horizon (and also the control horizon) has no influence on the online computational demand of the controller. Both horizons can thus be chosen during offline simulation experiments without any limitations. Moreover, the SSDMC algorithm was designed in such a way that the \(\lambda\) parameter has a similar influence on the behavior of the control system as in the case of the standard DMC algorithm.