## 3 Methodology
### Distributed MPC  
The low-level control layer is a DMPC in which agent \(i\in\{1,2,3,4\}\) negotiates with its neighbours in a pairwise manner. Local models are defined as:  
\[x_{i}(t+1)=A_{i}x_{i}(t)+B_{ii}u_{i}(t)+B_{d_{i}}d_{i}(t)+w_{i}(t), \tag{8}\]  
where \(t\in\mathbb{N}_{0}+\) denotes the time instant; \(x_{i}\in\mathbb{R}^{q_{i}}\), \(u_{i}\in\mathbb{R}^{r_{i}}\), and \(d_{i}\in\mathbb{R}^{d_{i}}\) are, respectively, the state, input and disturbance vectors of each subsystem \(i\in\mathcal{N}\), constrained in the convex sets containing the origin in their interior \(\mathcal{X}_{i}=\left\{x_{i}\in\mathbb{R}_{q_{i}}:A_{x_{i}}x_{i}\leq p_{x_{i}}\right\}\), \(\mathcal{U}_{i}=\left\{u_{i}\in\mathbb{R}_{r_{i}}:A_{u_{i}}u_{i}\leq b_{u_{i}}\right\}\), respectively; and \(A_{i}\in\mathbb{R}^{q_{i}:\mathbf{x}q_{i}}\), \(B_{ii}\in\mathbb{R}^{q_{i}:\mathbf{x}r_{i}}\) and \(B_{d_{i}}\) are matrices of proper dimensions and can be seen in [30]. The vector \(w_{i}\in\mathbb{R}^{q_{i}}\) represents the coupling with other subsystems \(j\) belonging to the set of neighbors \(\mathcal{N}_{i}=\left\{j\in\mathcal{N}\smallsetminus\left\{i\right\}:B_{ij} \
eq 0\right\}\), i.e,  
\[w_{i}(t)=\sum_{j\in\mathcal{N}_{i}}B_{ij}u_{j}(t), \tag{9}\]  
where \(u_{j}\in\mathbb{R}^{r_{j}}\) is the input vector of subsystem \(j\in\mathcal{N}_{i}\), and matrix \(B_{ij}\in\mathbb{R}^{q_{i}\times r_{j}}\) models the input coupling between \(i\)\(j\)\(j\). Moreover, \(w_{i}\) is bounded in a convex set \(\mathcal{W}_{i}\triangleq\oplus_{j\in\mathcal{N}}B_{ij}\mathrm{U}_{j}\) due to the system constraints. The linear discrete-time state-space model is  
\[\widetilde{x}_{\mathcal{N}}(t+1)=A_{\mathcal{N}}\widetilde{x}_{\mathcal{N}}(t )+B_{\mathcal{N}}\widetilde{u}_{\mathcal{N}}(t)+B_{\widetilde{d}_{\mathcal{N }}}\widetilde{d}_{\mathcal{N}}(t), \tag{10}\]  
where \(\widetilde{x}_{\mathcal{N}}\) and \(\widetilde{u}_{\mathcal{N}}\) are the state vector and the input vector respectively, \(\widetilde{d}_{\mathcal{N}}\) is the disturbance vector, and \(A_{\mathcal{N}}\), \(B_{\mathcal{N}}\), and \(B_{\widetilde{d}_{\mathcal{N}}}\) are the corresponding matrices of the global system. The low-level control layer performs the FL-DMPC algorithm for multiple agents. Specifically, fuzzy-based negotiations are made in pairs considering the couplings with their neighboring subsystems, which are assumed to hold their current trajectories. To this end, it a shifted sequence of agent \(i\) is used, which is defined by adding \(K_{i}x_{i}(t+N_{\mathrm{p}})\) on the sequence chosen at the previous time step \(U_{i}(t-1)\):  
\[U_{i}^{\mathrm{s}}(t)= \begin{bmatrix}u_{i}(t+1|t-1)\\ u_{i}(t+2|t-1)\\ \vdots\\ u_{i}(t+N_{\mathrm{p}}-1|t-1)\\ K_{i}x_{i}(t+N_{\mathrm{p}}|t-1)\end{bmatrix} = \begin{bmatrix}u_{i}^{\mathrm{s} }(t)\\ u_{i}^{\mathrm{s}}(t+1)\\ \vdots\\ u_{i}^{\mathrm{s}}(t+N_{\mathrm{p}}-2)\\ u_{i}^{\mathrm{s}}(t+N_{\mathrm{p}}-1)\end{bmatrix} . \tag{11}\]  
To make the paper self-contained, a brief description of the FL-DMPC algorithm [30] is presented here (Algorithm 2):  
At each time step \(t\) for each agent \(i\)  
1. Firstly, agent \(i\) measures its local state \(\widetilde{x}_{i}(t)\) and disturbance \(\tilde{d}_{i}\). 2. Agent \(i\) calculates its shifted trajectory \(U_{i}^{\mathrm{s}}(t)\) and sends it to its neighbors. 3. Agent \(i\) minimizes its cost function considering that neighbor \(j\in\mathcal{N}_{i}\) applies its shifted trajectory \(U_{j}^{\mathrm{s}}(t)\). It is assumed that the rest of the neighboring subsystems \(l\in\mathcal{N}_{i}\setminus j\) follows their current control trajectories \(U_{l}^{\mathrm{s}}(t)\). Specifically, agent \(i\) solves\[U_{i}^{*}(t)=\arg\min_{U_{i}(t)}J_{i}\big{(}x_{i}(t),U_{i}(t),U_{j}^{ \mathrm{s}}(t),U_{l}^{\mathrm{s}}(t)\big{)},\] (12) subject to \[ \begin{array}{l}x_{i}(t+k+1)=A_{i}x_{i}(t+k)+B_{ii}u_{i}(t+k)+\\ B_{ij}u_{j}(t+k)+B_{d_{i}}d_{i}(t+k)+\sum\limits_{l\in\mathcal{N}_{i}\setminus \{j\}}B_{il}u_{l}(t+k),\end{array} \] (13) Constraints \[