## 4 Coordinated Predictive Controller Design
### Generalized Predictive Control  
Consider the following controlled auto-regressive integrated moving average (CARIMA) model:  
\[A(z^{-1})y_{t}=B(z^{-1})u_{t-1}+e_{t}/\Delta \tag{8}\]  
where \(t\) represents the discrete time, \(z^{-1}\) represents the post-shift operator, \(\Delta=1-z^{-1}\) represents the difference operator, \(e_{t}\) represents noise, and \(A(z^{-1})\) and \(B(z^{-1})\) are polynomials in the shift operator \(z^{-1}\) with \(A(z^{-1})=1+a_{1}z^{-1}+a_{2}z^{-2}+\ldots+a_{n}z^{-n}\), \(B(z^{-1})=b_{0}+b_{1}z^{-1}+b_{2}z^{-2}+\ldots b_{n_{2}}z^{-n_{b}}\).  
Ignoring the noise term \(e_{t}\), the Equation (8) can be written as follows:  
\[y_{t}+a_{1}y_{t-1}+\cdots+a_{n}y_{t-n}=b_{0}u_{t-1}+\cdots+b_{n_{b}}u_{t-n_{b} -1} \tag{9}\]  
which then can be expressed as  
\[y_{t+j}=-a_{1}y_{t+j-1}-\cdots-a_{n}y_{t+j-n}+b_{0}u_{t+j-1}+\cdots+b_{n_{b}}u_ {t+j-n_{b}-1} \tag{10}\]  
Consider the following Diophantine equation:  
\[1=E_{j}(z)A\Delta+z^{-1}F_{j}(z) \tag{11}\]  
where \(E_{j}(z)\) and \(F_{j}(z)\) are polynomials in the shift operator \(z^{-1}\) with \(E_{j}(z^{-1})=e_{j,0}+e_{j,1}z^{-1}+\cdots+e_{j,j-1}z^{-(j-1)}\), \(F_{j}(z^{-1})=f_{j,0}+f_{j,1}z^{-1}+\cdots+f_{j,n}z^{-n}\).  
Combining the Equations (8) and (11), through some mathematical transformations, we can get the system output prediction value \(\hat{y}_{t+j}\) at time \(t+j\):  
\[\hat{y}_{t+j}=E_{j}B\Delta u_{t+j-1}+F_{j}y_{t} \tag{12}\]  
In GPC algorithm, the optimization performance indicator at time \(t\) takes the following form:  
\[\min J(t)=q\sum_{j=1}^{P}\left(\omega_{t+j}-\hat{y}_{t+j}\right)^{2}+r\sum_{j =1}^{M}\Delta u_{t+j-1}^{2} \tag{13}\]  
where \(P\) represents prediction horizon, \(M\) represents control horizon, \(q\) represents the error weight coefficient, \(r\) represents the control weight coefficient, and \(\omega_{t+j}\) represents the expected reference value of the system output.  
Define polynomial \(G_{j}\):  
\[G_{j}=E_{j}B=g_{j,0}+g_{j,1}z^{-1}+\cdots+g_{j,n_{b}+j-1}z^{-(n_{b}+j-1)} \tag{14}\]  
Then (12) can be rewritten as follows:  
\[\hat{y}_{t+j}=G_{j}\Delta u_{t+j-1}+F_{j}y_{t}=g_{j,0}\Delta u_{t+j-1}+g_{j,1} \Delta u_{t+j-2}+\cdots+g_{j,j-1}\Delta u_{t}+l_{j}(t) \tag{15}\]  
where \(l_{j}(t)=(G_{j}-g_{j,0}-g_{j,1}z^{-1}-\cdots-g_{j,j-1}z^{-(j-1)})\Delta u_{t+j -1}+F_{j}y_{t}\).  
According to (15) we can easily get the following formula:  
\[Y=G\Delta U+L \tag{16}\]  
where:  
\[Y=\left[\begin{array}{c}\hat{y}_{t+1}\\ \vdots\\ \hat{y}_{t+P}\end{array}\right],\;\Delta U=\left[\begin{array}{c}\Delta u_{ t}\\ \vdots\\ \Delta u_{t+M-1}\end{array}\right],\;L=\left[\begin{array}{c}l_{1}(t)\\ \vdots\\ l_{P}(t)\end{array}\right],\;G=\left[\begin{array}{cccc}g_{1,0}&\cdots&g_{1,0 }&0&0\\ \vdots&&\ddots&0\\ g_{M,M-1}&&\cdots&&g_{1,0}\\ \vdots&&&\vdots\\ g_{P,P-1}&&\cdots&&g_{P,P-M}\end{array}\right].\]  
Because of the influence of model error and disturbance, the output prediction value of the system needs to be corrected by the actual output error on the basis of the output of the prediction model:  
\[Y=G\Delta U+L+he_{t}=G\Delta U+L+h\Big{(}y_{t}-\hat{y}_{t|t-1}\Big{)} \tag{17}\]  
where \(e_{t}\) is the prediction error, \(y_{t}\) is the actual output of the object, and \(\hat{y}_{t|t-1}\) is the predicted output of the object. According to (13) and (17), the following can be obtained:  
\[\min J(t)=(W-G\Delta U-L-he_{t})^{T}Q(W-G\Delta U-L-he_{t})+\Delta U^{T}R \Delta U \tag{18}\]  
where \(W=\left[\begin{array}{cccc}\omega_{t+1}&\cdots&\omega_{t+P}\end{array} \right]^{T}\!\!,Q=q\cdot I_{P\times P}\) represents the error weighting matrix, \(R=r\cdot I_{M\times M}\) represents the control weight matrix, and \(I\) represents the unit matrix.  
The output variable of the GPC algorithm is obtained according to (18):  
\[u_{t}=u_{t-1}+\Delta u_{t}=u_{t-1}+\left[\begin{array}{cccc}1&0&\cdots&0 \end{array}\right](G^{\mathrm{T}}QG+R)^{-1}G^{\mathrm{T}}(W-L-he_{t}) \tag{19}\]