{'fraction_non_alphanumeric': 0.03548223350253807, 'fraction_numerical': 0.006802030456852792, 'mean_word_length': 4.706154960173787, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Distributed and Localized Model Predictive Control. Part I: Synthesis and Implementation

The increasing presence of large-scale distributed systems highlights the need for scalable control strategies where only local communication is required. Moreover, in safety-critical systems it is imperative that such control strategies handle constraints in the presence of disturbances. In response to this need, we present the Distributed and Localized Model Predictive Control (DLMPC) algorithm for large-scale linear systems. DLMPC is a distributed closed-loop model predictive control (MPC) scheme wherein only local state and model information needs to be exchanged between subsystems for the computation and implementation of control actions. We use the System Level Synthesis (SLS) framework to reformulate the centralized MPC problem, and show that this allows us to naturally impose localized communication constraints between sub-controllers. The structure of the resulting problem can be exploited to develop an Alternating Direction Method of Multipliers (ADMM) based algorithm that allows for distributed and localized computation of closed-loop control policies. We demonstrate that computational complexity of the subproblems solved by each subsystem in DLMPC is independent of the size of the global system. To the best of our knowledge, DLMPC is the first MPC algorithm that allows for the scalable distributed computation as well as implementation of distributed closed-loop control policies, and seemingly deals with additive disturbances. In our companion paper, we show that this approach enjoys recursive feasibility and asymptotic stability.


Introduction
Model Predictive Control (MPC) has seen widespread success across many applications. However, the need to control increasingly large-scale, distributed, and networked systems has limited its applicability. Largescale distributed systems are often impossible to control with a centralized controller, and even when such a centralized controller can be implemented, the high computational demand of MPC renders it impractical. Thus, efforts have been made to develop distributed MPC (DMPC) algorithms, wherein sub-controllers solve a local optimization problem, and potentially coordinate with other sub-controllers in the network.
Prior work: The majority of DMPC research has focused on cooperative setting, where sub-controllers exchange state and control action information in order to coordinate their behavior so as to optimize a global objective, typically through distributed optimization [1][2][3][4][5][6][7][8]. Most of these approaches rely on nominal openloop approaches, and while nominal MPC enjoys some intrinsic robustness [9], the resulting closed-loop can be destabilized by an arbitrary small disturbance [10]. Thus, to maintain robustness in the presence of additive disturbances, closed-loop policies are desirable.
Two main closed-loop MPC approaches are used. The first approach, which we use here, is to compute dynamic structured closed-loop policies using suitable parameterizations. This strategy was introduced in the by Goulart et al. [11], and showed that disturbance-based parameterizations allow for distributed policies to be synthesized via convex optimization. A more recent method exploits Quadratic Invariance [12] and the Youla parameterization [13]. These methods allow distributed closed-loop control policies to be synthesized via convex optimization; however, the resulting optimization problem lacks structure to be amenable to distributed optimization techniques, and thus these methods do not scale to large systems. Similarly, recent works exploit the System Level Synthesis (SLS) parametrization to design robust MPC controllers [14,15]; however, it is unclear how these can be applied in the distributed setting. The alternative approach is to extend centralized methods (i.e. constraint tightening, tube MPC). This is computationally efficient but requires pre-computed stabilizing controllers, and often relies on strong assumptions, such as the existence of a static structured stabilizing controller (as in [16]) which can be NP-hard to compute [17], or decoupled subsystems (as in [18]).
Overall, though many closed-loop formulations exist, they rely on strong assumptions and/or are unsuited for distributed computation. We seek a closed-loop DMPC algorithm that (i) computes structured feedback policies via convex optimization and (ii) can be solved at scale via distributed optimization. To the best of our knowledge, no such algorithm exists.
Contributions: In this paper we address this gap and present the Distributed Localized MPC (DLMPC) algorithm for linear time-invariant systems, which allows for the distributed computation of structured feedback policies with recursive feasibility and asymptotic stability guarantees. We leverage the SLS framework [19][20][21] to define a novel parameterization of distributed closed-loop MPC policies such that the resulting synthesis problem is both convex and structured, allowing for the natural use of distributed optimization techniques. Thanks to the nature of the SLS parametrization, this approach deals with disturbances in a straightforward manner with no additional assumptions. We show that by exploiting the sparsity of the underlying distributed system and resulting closed-loop system, as well as the separability properties [20] of commonly used objective functions and constraints, we are able to distribute the computation via ADMM [22], thus allowing the online computation of closed-loop MPC policies to be carried out in a scalable localized manner. Our results apply to the nominal case (as presented in [23]) as well as the robust case, and provide a unifying algorithm that applies to all cases and does not rely on simplifying approximations. In the resulting implementation each sub-controller solves a low-dimensional optimization problem requiring only local communication of state and model information. Through numerical experiments, we validate these results and confirm that the complexity of the subproblems solved at each subsystem scales as O(1) relative to the state dimension of the full system for both the nominal as well as the robust case.
Paper structure: In §II we present the problem formulation. In §III, we introduce the SLS framework and show how to recast MPC as an optimization problem over system responses for nominal and robust case. We also highlight the differences between SLS and the disturbance based feedback method proposed in [11]. In §IV we define and analyze the DLMPC algorithm. In §V, we present a numerical experiment and we end in §VI with conclusions and directions of future work. In our companion paper [24], we provide theoretical guarantees for convergence, recursive feasibility and asymptotic stability of this approach, and extend the algorithm to deal with coupling through cost and constraints.
Notation: Lower-case and upper-case letters such as x and A denote vectors and matrices respectively, although lower-case letters might also be used for scalars or functions (the distinction will be apparent from the context). Bracketed indices denote time-step of the real system, i.e., the system input is u(t) at time t, not to be confused with x t which denotes the predicted state x at time t. Superscripted variables, e.g.
x k , correspond to the value of x at the k th iteration of a given algorithm. Square bracket notation, i.e., [x] i denotes the components of x corresponding to subsystem i. Calligraphic letters such as S denote sets, and lowercase script letters such as c denote a subset of Z + , e.g. c = {1, ..., n} ⊂ Z + . Boldface lower and upper case letters such as x and K denote finite horizon signals and block lower triangular (causal) operators, respectively: where each x i is an n-dimensional vector, and each K i [j] represents the value of matrix K at the j th timestep computed at time i. K(r, c) denotes the submatrix of K composed of r rows and c columns respectively. We denote the block columns of K by K{1},...,K{T }, i.e.

Problem Formulation
Consider a discrete-time linear time invariant (LTI) system with dynamics: where x(t) ∈ R n is the state, u(t) ∈ R p is the control input, and w(t) ∈ W ⊂ R n is an exogenous disturbance. We study the case where the control input is a model predictive controller optimizing a nominal objective and is subject to constraints on the state and the input. As is standard, at each time step τ the controller solves an optimal control problem over a finite prediction horizon of length T using the current state as the initial condition: min xt,ut,γt s.t.
where f t (·, ·) and f T (·) are closed, proper, and convex and γ t (·) is a measurable function of its arguments. In the nominal case, i.e., w t = 0 ∀t, X t and U t are closed and convex sets containing the origin. When noise is present, we restrict ourselves to polytopic sets: and W t is considered to be norm-bounded or a polytopic set. Our goal is to define an algorithm that allows us to solve the MPC problem (2) in a distributed manner while respecting local communication constraints. To achieve this goal, we impose that information exchange -as defined by the graph G (A,B) (E, V) -is localized to a subset of neighboring sub-controllers. In particular, we use the notion of a d-local information exchange constraint [20] to be one that restricts sub-controllers to exchange their state and control actions with neighbors at most d-hops away, as measured by the communication topology G (A,B) . This notion is captured by the d-outgoing and d-incoming sets of subsystem.
for all d ≥ 0, and dist(v i → v j ) denotes the distance between v i and v j i.e., the number of edges in the shortest path connecting subsystems i and j.
Hence, we can enforce a d-local information exchange constraint on the MPC problem (2) -where the size of the local neighborhood d is a design parameter -by imposing that each sub-controllers policy respects for all t = 0, . . . , T and i = 1, . . . , N , where γ i,t is a measurable function of its arguments. This means that the closed-loop control policy at sub-controller i can be computed using only states, control actions, and system models collected from d-hop incoming neighbors of subsystem i in the communication topology G (A,B) . Given such an interconnection topology, suitable structural compatibility assumptions between the cost function and state, input, and information exchange constraints are necessary for both the synthesis and implementation of a localized control action at each subsystem.
) for f i local functions, and the constraint sets are such that t for all i and t ∈ {0, ..., T } for X i local sets, and idem for U t .
Assumption 1 imposes that whenever two subsystems are coupled through either the constraints or the objective function, they then must be within the d-local regions -d-incoming and d-outgoing sets -of one another. This is a natural assumption for large structured networks where couplings between subsystems tend to occur at a local scale. We will show that under these conditions, DLMPC allows for both a localized (a convex) synthesis and implementation of a control action at each subsystem by imposing appropriate d-local structural constraints on the closed-loop system responses of the system. For the remainder of this paper we focus on developing a distributed and localized algorithmic solution and defer the design of a terminal cost and set that provide theoretical guarantees to our companion paper [24].

Localized MPC via System Level Synthesis
We introduce the SLS framework [19][20][21] and justify its utility in MPC problems. We show how SLS naturally allows for locality constraints [20] to be imposed on the system responses and corresponding controller implementation, and discuss how state and input constraints can be imposed in the presence of disturbances extending the results from [25], leading to the formulation of the Distributed and Localized MPC problem.

Time domain System Level Synthesis
The following is adapted from §2 of [21]. Consider the dynamics of system (1) and let u t be a causal linear time-varying state-feedback controller, i.e., u t = K t (x 0 , x 1 , ..., x t ) where K t is some linear map to be designed. 1 Let Z be the block-downshift matrix, 2 and defineÂ := blkdiag(A, ..., A) andB := blkdiag(B, ..., B, 0). Using the signal (bold) notation, we can compactly write the closed-loop behavior of system (1) under the feedback law u = Kx, over the horizon t = 0, ..., T , which can be entirely characterized by the system responses Φ x and Φ u : Here x, u and w are the finite horizon signals corresponding to state, control input, and disturbance respectively. By convention, we define the disturbance to contain the initial condition, i.e., The approach taken by SLS is to directly parameterize and optimize over the set of achievable system responses {Φ x , Φ u } from the exogenous disturbance w to the state x and the control input u, respectively.

For any block lower-triangular matrices
The SLS framework relies on part 1 of Theorem 1 to reformulate optimal control problems as a search over system responses Φ lying in subspace (5), rather than an optimization problem over states and inputs {x, u}. Using parametrization (4), we reformulate the MPC subroutine (2) in terms of the system responses as where the polytopes W := ⊗ T t=0 W t and the polytope P is defined so that Φw ∈ P if and only if x t ∈ X t , and u t ∈ U t , for all t = 0, ..., T − 1. Notice that W is defined so that it does not restrict x 0 . The objective function f is defined consistent with objective function of problem (2). Note that Assumption 1 directly translates to the objective function and constraint set of the SLS reformulation (6). We emphasize that Φ{1}x 0 appears in the objective function as it corresponds to the nominal (noise-free) state and input responses.
The equivalence between the the MPC SLS problem (6) and the original MPC problem (2) stems from the well known fact -restated in terms of the SLS parameterization -that linear time-varying controllers are as expressive as nonlinear controllers over a finite horizon, given a fixed initial condition and noise realization. In fact, for a fixed initial condition and noise realization w, any control sequence u(w) := [u 0 , . . . , u T −1 ] can be achieved by a suitable choice of feedback matrix K(w) such that u(w) = K(w)x (that such a matrix always exists follows from a dimension counting argument). As this control action can be achieved by a linear-time-varying controller K(w), Theorem 1 states that there exists a corresponding achievable system response pair {Φ x , Φ u } such that u(w) = Φ u w. Thus the SLS reformulation introduces no conservatism relative to open-loop MPC. We discuss the closed-loop setting at the end of this section, and show that the disturbance based parametrization [11] is a special case of ours.
Why use SLS for Distributed MPC: In the centralized setting, where both the system matrices (A, B) and the system responses {Φ x , Φ u } are dense without information constraints, the SLS parameterized problem (6) is slightly more computationally costly than the original MPC problem (2), as there are now n(n + p)T decision variables, as opposed to (n + p)T decision variables. However, under suitable localized structural assumptions on f t , and constraint sets X t , and U t , lifting to this higher dimensional parameterization makes the problem becomes decomposable since it allows to take advantage of the the structure of the underlying system. This allows for not only the convex synthesis of a distributed closed-loop control policy (as is similarly done in [11,13]), but also for the solution of this convex synthesis problem to be computed using distributed optimization.
This latter feature is one of the main contributions of this paper, and in particular, we show that the resulting number of optimization variables in the local subproblems solved at each sub-system scales as O(d 2 T ), where d is the size of the neighborhood for each subsystem as per Definition 1 (usually d n) and T is the time horizon, hence independent of the global system size n. To the best of our knowledge, this is the first distributed closed-loop MPC algorithm with such properties.

Locality in System Level Synthesis
Here we illustrate how to enforce the information sharing constraint (3) in the SLS framework, and how localized system responses result in a localized controller implementation.
A key advantage of using the SLS framework is that the system responses not only parametrize the closed-loop map but also provide a controller realization. In particular, the controller achieving the system responses (4) can be implemented as wherex is the nominal state trajectory, andŵ = Zw is a delayed reconstruction of the disturbance. The advantage of this controller implementation, as opposed to u = Φ u Φ −1 x x, is that any structure imposed on the system response {Φ u , Φ x } translates directly to structure on the controller implementation (7). This is particularly relevant for imposing locality constraints, and we will show how locality in system responses translates into locality of the controller implementation.
We begin by defining the notion of d-localized system responses, which follows naturally from the notion of d-local information exchange constraints (3). They consist of system responses with suitable sparsity patterns such that the information exchange needed between subsystems to implement the controller realization (7) is limited to d-hop incoming and outgoing neighbors.
The definition for d-localized Φ u is analogous but with disturbance to control action [u] i .
When the system responses are d-localized, then so is the controller implementation (7). In particular, by enforcing d-localized structure on Φ x , only a local subset [ŵ] j∈in i (d) ofŵ are necessary for subsystem i to compute its local disturbance estimate [ŵ] i , which ultimately means that only local communication is required to reconstruct the relevant disturbances for each subsystem. Similarly, if d-localized structure is imposed on Φ u , then only a local subset [ŵ] j∈in i (d) of the estimated disturbancesŵ is needed for each subsystem to compute its control action [u] i . Hence, each subsystem only needs to collect information from its d-incoming set to implement the control law (7), and it only needs to share information with its d-outgoing set to allow for other subsystems to implement their respective control laws. Furthermore, such locality constraints are enforced via an affine subspace constraint in the SLS formulation (6). system (A, B) is then d-localizable if the intersection of L d with the affine space of achievable system responses (5) is non-empty. Remark 1. Although d-locality constraints are always convex subspace constraints, not all systems are dlocalizable. The locality diameter d can be viewed as a design parameter, and for the remainder of the paper, we assume that there exists a d n such that the system (A, B) to be controlled is d-localizable. Notice that the parameter d is tuned independently of the horizon T , and captures how "far" in the interconnection topology a disturbance striking a subsystem is allowed to spread -as described in detail in [20], localized control is a spatio-temporal generalization of deadbeat control.
While it was not possible to incorporate locality (3) into the classical MPC formulation (2) in a convex and computationally tractable manner, it is straightforward to do so via the affine constraint (Φ x , Φ u ) ∈ L d as per Definition 2, with the only requirement that some mild compatibility assumptions as per Assumption 1 between the cost functions, state and input constraints, and d-local information exchange constraints are satisfied. In the remainder of this section we exploit this fact when tackling robust state and input constraints, which in turn results in a problem structure that is amenable to using distributed optimization for computing the resulting control policies using only local information.

State and input constraints in System Level Synthesis
Here we extend the method to deal with robust state and input constraints. We emphasize that the resulting SLS reformulation retains the locality structure of the original problem, which is key to enabling a distributed solution to the problem.
Lemma 1. Let the noise signal belong to a separable local norm-bounded set W σ . Then, problem (6) with additional localization constraints has the following convex reformulation where e j are vectors of the standard basis, and · * the dual norm of · p .
Proof. The proof follows from a simple duality argument on the robust polytopic constraint Φw ∈ P ∀w ∈ W. In particular, Φ has to satisfy where the maximization over δ and the inequality are element-wise. Since Φ is localized and the disturbance set is separable and local, this can be equivalently written as:  Proof. The reformulation of the robust polytopic constraint follows from duality. In particular, Φ has to satisfy HΦ{1}x 0 + max Gδ≤g HΦ{2 : T }δ ≤ h.
We study this constraint row-wise and focus on the second term on the left-hand side, which can be seen as a linear program (LP) in δ for each row of H. Since strong duality holds, we have that each of the LPs can equivalently be replaced by its corresponding dual problem. In particular, we can solve for the k th row of the the second term on the left-hand side as where the matrix operator Ξ results from stacking the dual variables from the row-wise dual LPs. Hence, the robust polytopic constraint can be replaced by where Ξ ≥ 0 (satisfied component-wise) becomes a decision variable of the MPC problem. Furthermore, the constraint HΦ{2 : T } = ΞG allows for a sparse structure on Ξ. In particular, ΞG has to have the same sparsity as HΦ{2 : T }. When G is block-diagonal, it immediately follows that if k H(i, k)Φ{2 : T }(k, j) = 0, then Ξ(i, j) = 0. Hence, Ξ lies in L d H , and together with the dual reformulation of the robust polytopic constraint Gδ ≤ g, gives rise to problem (9).
Remark 4. By Assumption 1, the subspace L d H contains matrices with sparsity such that subsystems at most 2d-hops away are coupled.
These results allow us to solve the DLMPC problem (6) using standard convex optimization methods, and further preserves the locality structure of the original problem under the given assumptions. Imposing d-local structure on the system responses, coupled with an assumption of compatible d-local structure on the objective functions and constraints of the MPC problem (2), leads to a structured SLS MPC optimization problem (6). This structural compatibility in all optimization variables, cost functions, and constraints is the key feature that we exploit in Section 4 to apply distributed optimization techniques to scalably and exactly solve problem (6). 4 Why previous methods are not amenable to distributed solutions: While previous methods [11,13] allow for similar structural constraints to be imposed on the controller realization through the use of either disturbance feedback or Youla parameterizations (subject to Quadratic Invariance [12] conditions), the resulting synthesis problems do not enjoy the structure needed for distributed optimization techniques to be effective. We focus on the method defined in [11], as a similar argument applies to the synthesis problem in [13]. Intuitively, the disturbance based feedback parameterization of [11] only parameterizes the closed-loop map Φ u from w → u, and leaves the state x as a free variable. Hence, regardless as to what structure is imposed on the objective functions, constraints, and the map Φ u , the resulting optimization problem is strongly and globally coupled because the state variable x is always dense. This can be made explicit by noticing that the disturbance feedback parameterization of [11] can be recovered from the SLS parameterization of Theorem 1, and we present a formal derivation in the Appendix. A similar coupling arises in the Youla based parameterization suggested in [13]. This limits their usefulness to smaller scale examples where centralized computation of policies is feasible. In contrast, by explicitly parameterizing the additional system response Φ x from w → x, we can naturally enforce the structure needed for distributed optimization techniques to be fruitfully applied.

Distributed AND Localized MPC based on ADMM
We now show that ADMM [22] can be used to distribute the DLMPC problem (10). We exploit the separability (Assumption 1), locality constraints, and the notion of row/column-wise separability (to be defined next), to solve each of the local subproblems in parallel and with d-local information only. In what follows we restrict Assumption 1 to the case where only dynamical coupling is considered. In our companion paper [24]we extend these results to all cases considered in Assumption 1 i.e., constraints and objective functions that introduce d-localized couplings. Hence, all cost function and constraints have structure: where P = P 1 × · · · × P N . By definition of the SLS system responses (4), we can equivalently write these conditions in terms of Φ as where r i is the set of rows in Φ corresponding to subsystem i, i.e., those that parametrize [x] i and [u] i . These separability features are formalized as follows: Definition 5. Given the partition {r 1 , ..., r k }, a functional/set is row-wise separable if: • For a functional, g(Φ) = k i=1 g i Φ(r i , :) for some functionals g i for i = 1, ..., k.
• For a set, Φ ∈ P if and only if Φ(r i , :) ∈ P i ∀i for some sets P i for i = 1, ..., k.
When the objective function and all the constraints of an optimization problem are separable with respect to a partition of cardinality k, then the optimization trivially decomposes into k independent subproblems. However, this is not the case for the localized DLMPC problem (6), since some elements are row-wise separable while others are column-wise. To make it amenable to a distributed solution, we propose the following reformulation, which applies to the noise-free case as well as to both noisy cases (locally normbounded and polytopic) considered in the previous section: -When noise is polytopic: The matrices Ψ and Ω are simply duplicates of Φ, and Ξ is the dual variable as introduced in Lemma 2. The advantage of introducing these variables and creating the augmented variablesΦ andΨ is that all components of problem (10) involvingΦ are row-wise separable, and all components involvingΨ are column-wise separable. We can easily separate these two computations via ADMM using the relationship between both variablesHΦ =Ψ. Furthermore, we take advantage of the structure of these subproblems and separate them with respect to a row and column partition induced by the subsystem-wise partitions of the state and control inputs, [x] i and [u] i for each subsystem i. Each of these row and column subproblems resulting from the distribution across subsystems can be solved independently and in parallel, where each subsystem solves for its corresponding row and column partition. Moreover, since locality constraints are imposed, the decision variablesΦ,Ψ have a sparse structure. This means that the length of the rows and columns that a subsystem solves for is much smaller than the length of the rows and columns of Φ. For instance, when considering the column-wise subproblem evaluated at subsystem i, the j th row of the i th column partitions of Φ x and Φ u is nonzero only if j ∈ ∪ k∈out i (d) r k and j ∈ ∪ k∈out i (d+1) r k respectively. 5 Thus, the subproblems that subsystem i solves for are: where the scalar ρ is the ADMM multiplier, operator Λ is the dual variable associated with ADMM, and where * indicates i r or i c depending on the context. To simplify notation we denote as [Φ] ir the submatrix of Φ formed by the nonzero components of the relevant rows for subsystem i, r i , and as [Φ] ic the submatrix of Φ formed by the nonzero components of the relevant columns for subsystem i, c i . We use a similar bracket notation for the vectors and matrices that multiply the decision variables to indicate that those are composed from the relevant components of their global versions. In subroutine (11), the computation of iterate (11b) can be sped up by virtue of Lemma 3 (Appendix) using the closed-from solution Notice that the number of nonzero components for both the rows and the columns is much smaller 5 An algorithm to find the relevant components for each subsystem rows and columns can be found in Appendix A of [20].
than the size of the network N since it is determined by the size of the local neighborhood d through the locality constraints. In turn, this implies that the subsystem only requires small submatrices of the system and constraint matrices A, B, H, etc, to perform the computations. Therefore, the DLMPC subroutine (11) can be solved in parallel in a distributed manner across the subsystems of the network, where each solves for a local patch of the system responses using local information only. In Algorithm 1 we present the DLMPC algorithm that each sub-controller executes, and where only local information exchanges (within d-hop neighbors) take place.
] ir , and return to step 1. else: Set k ← k + 1, return to step 3.
Computational complexity of Algorithm 1: The complexity of the algorithm is determined by update steps 3, 5 and 7. In particular, steps 5 and 7 can be directly solved in closed form, reducing their evaluation to the multiplication of matrices of dimension O(d 2 T 2 ) in the noisy case, and O(d 2 T ) in the noise-free case. In general, step 3 requires an optimization solver where each local iterate sub-problem is over O(d 2 T 2 ) optimization variables in the noisy case, and O(d 2 T ) in the noise-free case, subject to O(dT ) constraints. In certain cases, step 3 can also be computed in closed form if a proximal operator exists for the formulation [22]. For instance this is true if it reduces to a quadratic convex cost function subject to affine equality constraints, in which case complexity reduces to O(d 2 T ) since piece-wise closed form solutions can be computed [26]. Notice that the complexity of the subproblems is largely dependent on whether noise is considered. The reason for this is that in the noise-free case only the first block-column of Φ is considered, whereas in the presence of noise all T block-columns have to be computed. Regardless, the use of locality constraints leads to a significant computational saving when d n. The communication complexity -as determined by steps 2, 4 and 6 -is limited to the local exchange of information between d-local neighbors.

Simulation Experiments
We now apply the DLMPC algorithm to a power system inspired example. After introducing the simplified model, we present simulations under different noise realizations and validate the algorithm correctness and optimal performance by comparing to a centralized algorithm, as well as its ability to achieve constraint satisfaction in the presence of noise. We further demonstrate the scalability of the proposed method by verifying different network and problem parameters (locality, network size and time horizon), and in particular show that runtime stays steady as network size increases. Code needed to replicate these experiments is available at https://github.com/unstable-zeros/dl-mpc-sls; this code makes use of the SLS toolbox [27], which includes ready-to-use MATLAB implementations of all algorithms presented in this paper and its companion paper [24].

System model
We begin with a two-dimensional square mesh, where we randomly determine whether each node connects to each of its neighbors with a 40% probability. The expected number of edges is 0.8 * n * (n − 1). Each node represents a two-state subsystem that follows linearized and discretized swing dynamics [u] i are the phase angle deviation, frequency deviation, and control action of the controllable load of bus i. The dynamic matrices are In simulations, we start with a randomly-generated initial condition, and we study three noise scenarios: noise-free, polytopic noise, and locally-bounded noise. Noise follows a uniform distribution, and in the locally-bounded case it is scaled appropriately to meet the local bounds at each patch (see code for details). The baseline parameter values are d = 3, T = 5, N = 16 (4 × 4 grid).

Optimal performance
We observe the trajectories of the closed-loop system when using DLMPC for the different noise realizations. We compare these results with the solution to the corresponding centralized MPC problem (using CVX [28]). For a randomly chosen initial condition and network topology, we plot the evolution of the two states of subsystem 4 under the different noise conditions. We use a quadratic cost and polytopic constraints on both angle and frequency, and impose upper and lower bounds.
Results from simulations are summarized in Fig. 1. In all cases, the centralized solution coincides with the solution achieved by the DLMPC algorithm, validating the optimality of the algorithm proposed. It is worth noting that in the absence of noise, both nominal and robust DLMPC yield the same result, illustrating that the robust formulation of DLMPC is a generalization of the nominal case, but the former is more computationally efficient. In the noisy cases, the nominal DLMPC leads to bound violations, illustrating the need for a robust approach. It is worth noting the conservativeness of the algorithm in the locally-bounded case is much more apparent than in the polytopic noise case. The reason for this is that in general there does not exist a noise realization that is worst-case for every local patch at the same time. This is in contrast with polytopic noise where there does exist a worst-case noise. Therefore locally-bounded noise formulations inherently introduce some conservativeness as they anticipate a worst-case that is not mathematically possible in general. This is because it assumes a worst-case local disturbance at each patch; however, patches overlap, and the worst-case disturbance at some node i is different for each patch containing i.

Computational complexity
To asses the scalability of the algorithm, we measure runtime 6 while varying different network and problem parameters: locality d, network size N 7 and time horizon T . We run 5 different simulations for each of the parameter combinations, using different realizations of the randomly chosen parameters as to provide a consistent estimation of runtimes.
We study the scalability of the DLMPC algorithm for each of the different computation strategies presented: noiseless, locally-bounded noise, and polytopic noise. For the sake of comparison, we include an additional computation strategy based on explicit MPC that reduces the overhead in the noiseless case by replacing the optimization solver by a piece-wise solution. Interested readers are referred to [26] for details. We observe the behavior for these four different strategies in Fig. 2, and we note that the computation strategy determines the order of magnitude of the runtime, ranging from 10 −3 − 10 −2 s in the noiseless casedepending on whether or not explicit solutions are used -to 10 −1 s in the locally-bounded case, and around 1 − 10s when polytopic noise is considered. This difference is expected, and is explained by the size of the decision variables across different scenarios, i.e.Φ has a much larger dimension in the polytopic case than in the noiseless case. Despite this difference in order of magnitude, the trends observed are the same for each of the different scenarios. In particular, runtime barely increases with the size of the network, and the slight increase in runtime -likely due to the larger coordination needed -does not seem to be significant and appears to level off for sufficiently large networks. These observations are consistent with those of [29] where the same trend was noted. In contrast, runtime appears to increase with time horizon, and more notably with locality region size. This is also expected, as according to our complexity analysis the number of variables in a DLMPC subproblem scales as O(d 2 T 2 ) for the robust cases and as O(d 2 T ) for the nominal case. It is well-known that a larger time horizon, while providing an improvement in performance, can be detrimental for computational overhead. The same is true for locality size, which is much smaller than the size of the network. Although a larger localized region d can lead to improved performance, as a broader set of subsystems can coordinate their actions directly, it also leads to an increase in computational complexity and communication overhead. Thus by choosing the smallest localization parameter d such that acceptable performance is achieved, the designer can tradeoff between computational complexity and closed-loop performance in a principled way. This further highlights the importance of exploiting the underlying structure of the dynamics, which allow us to enforce locality constraints on the system responses, and consequently, on the controller implementation.

Conclusion
We defined and analyzed a closed-loop Distributed and Localized MPC algorithm. By leveraging the SLS framework, we were able to enforce information exchange constraints by imposing locality constraints on the system responses. We further showed that when locality is combined with mild assumptions on the separability structure of the objective functions and constraints of the problem, an ADMM based solution to the DLMPC subproblems can be implemented that requires only local information exchange and system models, making the approach suitable for large-scale distributed systems. This is the first DMPC algorithm that allows for the distributed synthesis of closed-loop policies. In our companion paper [24], we provide recursive feasibility and asymptotic stability guarantees for our approach, as well as scalable synthesis and implementations for the terminal constraint set and cost. Given that the presented algorithm relies on multiple exchanges of information between the subsystems, how communication loss affects the closed-loop performance of the algorithm is an interesting question. Although a formal analysis is left as future research, the work done in [30] suggests that it would be possible to slightly modify the proposed ADMM-based scheme to make it robust to unreliable communication links. Finally, it is of interest to extend these results to information exchange topologies defined in terms of both sparsity and delays -while the SLS framework naturally allows for delay to be imposed on the implementation structure of a distributed controller, it is less clear how to incorporate such constraints in a distributed optimization scheme.
Proof. The proof follows directly from applying the KKT conditions to the optimization problem. By the stationarity condition, M M z − M v + P µ = 0, where z is the solution to the optimization problem and µ the optimal Lagrange multiplier vector. From the primal feasibility condition, P z = q. Hence, z and µ are computed as the solution to this system of two equations.