# Hierarchical Coordinated Predictive Control of Multiagent Systems for Process Industries
## 3 Methodology
### Implementation of Consistent Open-Loop Prediction
Thus, agent \(v_{i}\) performs \(N_{\rm iter}\) iterations to obtain its consistent open-loop prediction at each time step \(k\) with \(\hat{\mathbf{y}}_{\rm Pol,i}(k+m)=\mathbf{y}_{\rm Pol,i}(k)\) for \(m=0\) as the initial value. If \(\Delta\bar{\mathbf{y}}(k)\leq 0\), the iterative strategy for agent \(v_{i}\) to obtain consistent open-loop prediction is denoted as  
\[\hat{\mathbf{y}}_{\rm Pol,i}(k+m+1)=\left\{ \begin{array}{ll}\hat{\mathbf{y}}_{\rm Pol,i}(k+m),d_{i}(k+m)=\min\!D_{i}(k+m),m=0,1,\cdots,N_{\rm iter}\\ \hat{\mathbf{y}}_{\rm Pol,i}(k+m)+q_{i}(\hat{\mathbf{y}}_{\rm Pol,i}(k+m)-\hat{\mathbf{y}}_ {\rm Pol,i}(k+m)),d_{i}(k+m)\
eq\min\!D_{i}(k+m),m=0,1,\cdots,N_{\rm iter} \end{array} \right. \tag{13}\]  
where \(d_{i}(k+m)\) is the Euclidean distance between the open-loop prediction and the target of agent \(v_{i}\) at the \(m\)-th iteration of time step \(k\), \(\mathbf{D}_{i}(k+m)\) is the set of Euclidean distances of agent \(v_{i}\) and its adjacent agents at the \(m\)-th iteration of time step \(k\), \(q_{i}\) is the weight of the deviation between the open-loop prediction of agent \(v_{i}\) and the open-loop prediction of agent \(v_{j}\) which has the smallest Euclidean distance in \(\mathbf{D}_{i}(k+m)\) and \(\hat{\mathbf{y}}_{\rm Pol,i}(k+m)\) comes from the agent with the smallest Euclidean distance in \(\mathbf{D}_{i}(k+m)\). If \(\Delta\bar{\mathbf{y}}(k)>0\), the iterative strategy for agent \(v_{i}\) to obtain consistent open-loop prediction is denoted as \[\hat{\mathbf{y}}_{\text{Pol},i}(k+m+1)=\left\{ \begin{array}{l}\hat{\mathbf{y}}_{\text{Pol},i }(k+m),d_{i}(k+m)=\text{max}D_{i}(k+m),m=0,1,\cdots,N_{\text{iter}}\\ \hat{\mathbf{y}}_{\text{Pol},i}(k+m)+q_{i}(\hat{\mathbf{y}}_{\text{Pol},j}(k+m)-\hat{ \mathbf{y}}_{\text{Pol},i}(k+m)),d_{i}(k+m)\
eq\text{max}D_{i}(k+m),m=0,1,\cdots, N_{\text{iter}}\end{array} \right. \tag{14}\]  
where \(\hat{\mathbf{y}}_{\text{Pol},i}(k+m)\) comes from the agent with the largest Euclidean distance in \(\mathbf{D}_{i}(k+m)\). Correspondingly, the Euclidean distance during the iteration of time step \(k\) is expressed as  
\[d_{i}(k+m)=\left\|\hat{\mathbf{y}}_{\text{Pol},i}(k+m)-\mathbf{y}_{\text{t}}(k)\otimes \mathbf{I}_{\text{y}}\right\| \tag{15}\]  
Following the open-loop prediction model (9) and the iterative strategies (13) and (14), the closed-loop prediction model (7) is rewritten as  
\[\mathbf{y}_{\text{Pol},i}(k)=\hat{\mathbf{y}}_{\text{Pol},j}(k)+\mathbf{R}_{i}\Delta\mathbf{u} _{\text{P},i}(k) \tag{16}\]  
where \(\hat{\mathbf{y}}_{\text{Pol},i}(k)=\hat{\mathbf{y}}_{\text{Pol},i}(k+N_{\text{iter}}+1)\) is the consistent open-loop prediction of agent \(v_{i}\) in the same form as \(\mathbf{y}_{\text{Pol},i}(k)\). The iterative strategies (13) and (14) actually provide a structure similar to the \"leader-follower\" protocol, with the differences being that in our strategies (i) there is no virtual leader, (ii) the follower may also play the role of the leader at the same time and the follower only receives information from the leader. More specifically, from models (8), (9) and (16) in this section, each agent has to perform the decision-making processes that will be presented in Sections 3.2 and 3.3 relying only on locally available information under a communication topology characterized by a simple noncomplete graph. In other words, each agent must collect the open-loop prediction information of the other agents from its leader agent in a distributed way through iterative strategy (13) or (14), and at the same time, the prediction errors are utilized to estimate the effects caused by the nonadjacent agents and other factors.