# Hierarchical Coordinated Predictive Control of Multiagent Systems for Process Industries
## 3 Methodology
### Game-Based Priority Coordinating
#### 3.2.1 Independent Solving of Process Control Schemes  
Based on the MAS considered in Section 2 and the prediction models given in Section 3.1, we assume that each agent \(v_{i}\) independently presents its process control scheme. Therefore, the cost function of agent \(v_{i}\) in the PC phase is the integration of system outputs, the agent \(v_{i}\)'s control inputs and its increments, which is expressed as  
\[J_{i}^{\text{PC}}(k)=J_{i}^{\text{PC1}}(k)+J_{i}^{\text{PC2}}(k)+J_{i}^{\text{ PC3}}(k) \tag{17}\]  
where the 'PC' in the superscript represents priority coordinating.The cost function \(J_{i}^{\text{PC1}}(k)\) impacts the deviation between the system outputs and their targets, and the larger \(J_{i}^{\text{PC1}}(k)\) is, the larger the deviation, which is shown as Equation (18). The cost function \(J_{i}^{\text{PC2}}(k)\) is the cost corresponding to the magnitude of change in control inputs, the larger \(J_{i}^{\text{PC2}}(k)\) means the larger the magnitude of change in control inputs, which will affect the smoothness of the control, and it is shown as Equation (19). The cost function \(J_{i}^{\text{PC3}}(k)\) affects the control inputs, the larger \(J_{i}^{\text{PC3}}(k)\) means the larger the control inputs, which is shown as Equation (20)\[J_{i}^{\text{PC1}}(k) =\left\|\mathbf{y}_{t}(k)\otimes\mathbf{I}_{y}-\mathbf{y}_{p_{i}^{\text{PC}}}^{ \text{PC}}(k)\right\|_{\mathbf{Q}^{\text{PC1}}}^{2}=\left\|\mathbf{y}_{t}(k)\otimes\mathbf{I }_{y}-\hat{\mathbf{y}}_{\text{Pol},i}(k)-\mathbf{R}_{i}\Delta\mathbf{u}_{p_{i}^{\text{PC}}} ^{\text{PC}}(k)\right\|_{\mathbf{Q}^{\text{PC1}}}^{2} \tag{18}\] \[J_{i}^{\text{PC2}}(k) =\left\|\Delta\mathbf{u}_{p_{i}^{\text{PC}}}^{\text{PC}}(k)\right\|_{ \mathbf{Q}^{\text{PC2}}}^{2}\] (19) \[J_{i}^{\text{PC3}}(k) =\left\|\mathbf{u}_{p_{i}^{\text{PC}}}^{\text{PC}}(k)\right\|_{\mathbf{Q }^{\text{PC3}}_{i}}^{2}=\left\|u_{i}(k-1)\otimes\mathbf{I}_{u}+\mathbf{M}_{u,i}\Delta \mathbf{u}_{p_{i}^{\text{PC}}}^{\text{PC}}(k)\right\|_{\mathbf{Q}^{\text{PC3}}_{i}}^{2} \tag{20}\]  
where \(\mathbf{y}_{p_{i}^{\text{PC}}}^{\text{PC}}(k)\) is agent \(v_{i}\)'s closed-loop prediction to the system outputs in PC phase at time step \(k\), which is of the same form as \(\mathbf{y}_{p_{i}^{\text{PC}}}(k)\). \(\Delta\mathbf{u}_{p_{i}^{\text{PC}}}^{\text{PC}}(k)\) is agent \(v_{i}\)'s independent process control scheme at time step \(k\), which is in fact also a sequence of the same form as \(\Delta\mathbf{u}_{p_{i}^{\text{P}}}(k)\) and containing control output increments for the current and future \(N_{\text{C}}-1\) time steps. \(\mathbf{u}_{p_{i}^{\text{PC}}}^{\text{PC}}(k)=u_{i}(k-1)\otimes\mathbf{I}_{u}+\Delta \mathbf{u}_{u,i}\Delta\mathbf{u}_{p_{i}^{\text{PC}}}^{\text{PC}}(k)\) is the sequence of agent \(v_{i}\)'s control inputs for time step \(k\) and future \(N_{\text{C}}-1\) time steps in PC phase, and in which \(u_{i}(k-1)\) is agent \(v_{i}\)'s actual control input at time step \(k-1\). The vector \(\mathbf{I}_{u}= \begin{bmatrix}1&1&\cdots&1\end{bmatrix} _{1\times\text{N}_{\text{C }}}^{\text{T}}\) is used to tensor the vectors about control inputs into tensors dimensioned in terms of the control horizon. Matrix \(\mathbf{M}_{u,i}\) is used to add elements from the independent control scheme \(\Delta\mathbf{u}_{p_{i}^{\text{PC}}}^{\text{PC}}(k)\) to \(u_{i}(k-1)\otimes\mathbf{I}_{u}\) to obtain \(\mathbf{u}_{p_{i}^{\text{PC}}}^{\text{PC}}(k)\) and its form is provided in Appendix A. \(\mathbf{Q}^{\text{PC1}}\), \(\mathbf{Q}^{\text{PC2}}_{i}\) and \(\mathbf{Q}^{\text{PC3}}_{i}\) are the output deviation weighting matrix and control weighting matrices in PC phase, respectively, and \(\mathbf{Q}^{\text{PC2}}_{i}\) weights agent \(v_{i}\)'s control input increments while \(\mathbf{Q}^{\text{PC3}}_{i}\) weights agent \(v_{i}\)'s total control input. The forms of the three aforementioned weighting matrices are provided in Appendix B.