## 3 Control Strategy
### MPC Close Loop Structure
The values \(n_{y}\), \(p\), \(s_{j}^{y}\), and \(w_{i,j}^{y}\) are constant controller specifications. The controller receives \(r_{j}(k+i|k)\) for the entire prediction horizon and uses the state observer to predict the plant outputs, \(y_{j}(k+i|k)\), which depend on manipulated variables (MV) adjustments \((u_{k})\) (goals (\(u_{8}\)) and expected points (\(u_{9}\))), measured disturbances (MD), and state estimates. At interval \(k\), the state estimates and MD values are available. Therefore, \(J_{y}\) is a function of \(z_{k}\) only. The second cost function is:  
Figure 7.0  
where:  
* \(n_{u}\) is the number of MV;
* \(u_{j,target}(k+i|k)\) is the target value for \(j\)th MV at the \(i\)th prediction horizon step;
* \(s_{j}^{il}\) is the scale factor for the \(j\)th MV;
* \(w_{i,j}^{u}\) is the tuning weight for the \(j\)th MV at the \(i\)th prediction horizon step (dimensionless). The values \(n_{u}\), \(p\), \(s_{j}^{ul}\) and \(w_{i,j}^{u}\) are constant controller specifications. The controller receives \(u_{j,target}(k+i|k)\)--values for the entire horizon. The controller uses the state observer to predict the plant outputs. Thus, \(J_{u}\) is a function of \(z_{k}\) only. An MPC controller uses the subsequent scalar performance metric to suppress the movement of manipulated variables (see Equation (22)),  
Figure 7.1  
and the partial cost function for the slack variable \(\epsilon_{k}\) (see Equation (23)). In practical applications, constraint violations can sometimes be inevitable. Soft constraints ensure a feasible QP solution even under such conditions. An MPC controller utilizes a slack variable, \(\epsilon_{k}\), which is non-negative (greater than or equal to zero) and dimensionless, to measure the worst-case constraint violation. Figure 7.2  
where:  
* \(\epsilon_{k}\) is the slack variable at control interval k (dimensionless);
* \(\rho_{\epsilon}\) is the constraint violation penalty weight (dimensionless). The slack variable \(\epsilon_{k}\) represents the amount by which the system state variables can deviate from their setpoints at each control interval. The value of \(\epsilon_{k}\) is used to ensure that the constraints are satisfied within the given tolerance levels. On the other hand, the weight assigned to the constraint violation penalty, \(\rho_{\epsilon}\), is a scalar value that determines the trade-off between achieving a lower cost function and satisfying the constraints. A higher value of \(\rho_{\varepsilon}\) indicates a greater penalty for violating the constraints, which can lead to a more conservative controller. MPC constraints are limited as shown below. \[ \begin{split} y_{min}\leq\frac{y_{j}(k+i|k)}{s_{j}^{y}}\leq y_{max},\ \ i=1:p,\ j=1:n_{y}\\ u_{min}\leq\frac{u_{j}(k+i-1|k)}{s_{j}^{u}}\leq u_{max},\ \ i=1:p,\ j=1:n_{u}\\ \Delta u_{min}\leq\frac{\Delta u_{j}(k+i-1|k)}{s_{j}^{u}}\leq, \Delta u_{max}\ \ i=1:p,\ j=1:n_{u},\end{split}  \tag{24}\]  
where:  
\[ \begin{split} y_{min}=\frac{y_{j,min}(i)}{s_{j}^{y}}-\varepsilon _{k}V_{j,min}^{y}(i)\\ y_{max}=\frac{y_{j,max}(i)}{s_{j}^{y}}+\varepsilon_{k}V_{j,max} ^{y}(i)\\ u_{min}=\frac{u_{j,min}(i)}{s_{j}^{u}}-\varepsilon_{k}V_{j,min} ^{u}(i)\\ u_{max}=\frac{u_{j,max}(i)}{s_{j}^{u}}+\varepsilon_{k}V_{j,max} ^{u}(i)\\ \Delta u_{min}=\frac{\Delta u_{j,min}(i)}{s_{j}^{u}}-\varepsilon _{k}V_{j,min}^{\Delta u}(i)\\ \Delta u_{max}=\frac{\Delta u_{j,max}(i)}{s_{j}^{u}}+\varepsilon _{k}V_{j,max}^{\Delta u}(i).\end{split}  \tag{25}\]  
Here, \(V_{j}\) parameters correspond to the Equal Concern for Relaxation parameter (ECR), which specifies the relative importance of satisfying constraints versus achieving performance goals in a control problem. They are dimensionless controller constants analogous to the cost function weights and used for constraint softening (zero implies a hard constraint). A more significant positive ECR value means that the controller is willing to compromise the satisfaction of the constraint to achieve the goals.