# Analytical MPC Algorithm Using Steady-State Process Model
## 2 Materials and Methods
### Efficient SSDMC Algorithm  
The algorithm proposed in this article is formulated in such a way that solving the optimization task online is avoided, because, due to the assumed form of the linear approximation used to obtain the dynamic matrix and the appropriate choice of the tuning parameter \(\lambda\) depending on time, it is possible to simplify the control law. Let us assume that one has a static model of the process and the step response of the process. These models will be used skillfully to formulate the proposed analytical algorithm. Of course, such an algorithm will probably perform worse than an algorithm based on a well-identified model, like the one proposed, e.g., in [26; 27]. However, at a relatively low cost (assuming one has a steady-state process model, which is often developed for the setpoint optimization layer), one can obtain an algorithm that should offer better control quality than the LMPC algorithm; this is especially true when the process has strong static nonlinearity. Assume that in each iteration of the algorithm, for the current operating point, a linear approximation of the process model is obtained using the following formula:  
\[y_{k}^{L}=K_{k}\cdot\left(\sum_{i=1}^{p_{d}-1}a_{i}\cdot\Delta u_{k-i}+a_{p_{d} }\cdot u_{k-p_{d}}\right), \tag{21}\]  
where \(K_{k}\) is the slope of the steady-state characteristic of the process (the gain of the control plant) around the current operating point; it is also assumed that the coefficients of the step response \(a_{i}\) are normalized in such a way that \(a_{p_{d}}\) is equal to \(1\). Due to the form of the adopted linear approximation of the process model, the proposed algorithm is an extension of the DMC algorithm. Thus, it will be abbreviated as the SSDMC algorithm (Steady-State Model-Based DMC--DMC algorithm using the steady-state characteristic of the process). The dynamic matrix obtained in each iteration will thus be given by the following formula:  
\[\mathbf{A}_{k}=K_{k}\cdot\mathbf{A}, \tag{22}\]  
where \(\mathbf{A}\) is described by Equation (9). The free response is calculated using the following formula:  
\[\widetilde{\mathbf{y}}=\overleftarrow{\mathbf{y}}+\overleftarrow{\mathbf{A}}_{k}\cdot \Delta\overleftarrow{\mathbf{u}}\,, \tag{23}\]  
where this time, \(\overleftarrow{\mathbf{A}}_{k}\) changes at each sampling instant but depends on \(\overleftarrow{\mathbf{A}}\) as described by Equation (11):  
\[\overleftarrow{\mathbf{A}}_{k}=K_{k}\cdot\overleftarrow{\mathbf{A}}\,. \tag{24}\]  
Then, using the obtained dynamic matrix described by Equation (22) and the free response given by Equation (23), one obtains the output prediction described by the following formula:  
\[\mathbf{y}=\widetilde{\mathbf{y}}+\mathbf{A}_{k}\cdot\Delta\mathbf{u}=\overleftarrow{\mathbf{y}}+ \overleftarrow{\mathbf{A}}_{k}\cdot\Delta\overleftarrow{\mathbf{u}}+\mathbf{A}_{k}\cdot \Delta\mathbf{u}. \tag{25}\]  
Next, the prediction given by (25) is used to formulate the quadratic optimization problem, with the following performance index:  
\[J_{SSDMC}=\left(\widetilde{\mathbf{y}}+\mathbf{A}_{k}\cdot\Delta\mathbf{u}-\widetilde{\mathbf{ y}}\right)^{T}\cdot\left(\widetilde{\mathbf{y}}+\mathbf{A}_{k}\cdot\Delta\mathbf{u}- \overline{\mathbf{y}}\right)+\lambda_{k}\cdot\Delta\mathbf{u}^{T}\cdot\Delta\mathbf{u}. \tag{26}\]  
As a result of solving the optimization task with the quadratic performance index defined in Equation (26) without constraints, the following result is obtained:  
\[\Delta\mathbf{u}=\left(\mathbf{A}_{k}^{T}\cdot\mathbf{A}_{k}+\lambda_{k}\cdot\mathbf{I} \right)^{-1}\cdot\mathbf{A}_{k}^{T}\cdot\left(\overline{\mathbf{y}}-\widetilde{\mathbf{y}} \right)\,. \tag{27}\]  
It is important to note that in Equation (27), the dynamic matrix \(\mathbf{A}_{k}\) changes at each sampling instant due to the nonlinear nature of the control plant. Therefore, an additional transformation must be made to account for these changes. Note that \(\mathbf{A}_{k}^{T}\cdot\mathbf{A}_{k}=K_{k}^{2}\cdot\mathbf{A}^{T}\cdot\mathbf{A}\).