Distributed Model Predictive Control based on Goal Coordination for Multi zone Building Temperature Control
Roja Eini Sherif Abdelwahed

	
	
	Exploiting Population Activity Dynamics to Predict Urban Epidemiological Incidence
    Anastasios Noulas
    

==================================================================================

empty
	empty
	
	
	
	
		In this paper, a distributed Model Predictive Control (DMPC) strategy is developed for a multi-zone building plant with disturbances. The control objective is to maintain each zone’s temperature at a specified level with the minimum cost of the underlying HVAC system. The distributed predictive framework is introduced with stability proofs and disturbances prediction, which have not been considered in previous related works. 
		The proposed distributed MPC performed with 48% less computation time, 25.42% less energy consumption, and less tracking error compared with the centralized MPC. The controlled system is implemented in a smart building test bed.
		
 Keywords: Distributed Model Predictive Control; Multi-zone building; Temperature control; HVAC; Smart building.
	  
	
	
	

§ INTRODUCTION

	
	Heating, ventilation and air conditioning (HVAC) systems in buildings currently account for 57% of the US energy consumption, and 50% of the world energy use. Thus, nowadays finding proper control systems in HVAC plants to reduce energy usage in the building sectors is of crucial importance.
 Model Predictive Control (MPC) strategy has been under significant attention for management of building plants recently [1-5]. However, using the centralized MPC approaches for controlling temperature of a multi-zone building system is impractical for several reasons. First, since there is a large number of system inputs and outputs for a building model with a large number of zones, it requires large centralized computational effort. Second, there are centralized modeling issues associated with global data collection and control actuation by a centralized agent. Third, when the centralized controller fails, the whole system is out of control and control integrity cannot be guaranteed.
 Distributed approaches come into play to deal with the above problems. The idea behind distributed approaches is to split the centralized system into subsystems whose control is assigned to a certain number of local controllers. Depending on the degree of interaction between the subsystems, the agents may need to communicate to coordinate themselves [6-7]. Several studies [8-10] have addressed the building temperature regulation problem using distributed MPC approach. In [8], a small temperature control model of a three-zone building does not include the open door situation and only one information per time step is being exchanged. In [9], a simplified two-masses system is considered as the plant model, but did not take into account the pressure and temperature dynamics. The authors in [10] focused on the modular distributed control of building temperature considering thermal and electrical energy sources, without considering the environment temperature predictions. None of these works considered the closed-loop system feasibility and stability.
 In this paper, a distributed MPC controller is designed and applied on a building's thermal model consisting of six rooms with the open/close door/window conditions. The objective is tracking the rooms' temperature set-points with minimum energy consumption considering the outdoor disturbances. The couplings between zones' states and inputs are also included in the model. Besides, a centralized MPC controller is developed and compared with the proposed distributed MPC. From the simulation results, the distributed MPC approach showed better performance in terms of desired set-point tracking, system cost minimization, and computation time compared with the centralized MPC. In contrast with previous works, this paper considers the disturbances predictions as part of the system model in the predictive approach and addresses the feasibility and stability aspect of the problem by the proposed coordination strategy. 
 The rest of the paper is organized as follows. Section II introduces the models and parameters of the six-room system. Section III introduces the centralized and Distributed Model Predictive Control approaches. In the next section, the simulation results are shown. Section V provides a conclusion and discusses future research.
	
	

§ SYSTEM DEFINITION

	The system considered is a building consisting of six rooms (subsystems) with the thermal exchange through the inner wall and inner door between them. The rooms also have thermal exchanges with the environment. The physical system layout is shown in Fig. <ref> [11-12]. 

	
	In Fig. <ref>, the rooms are considered next to each other with all the windows and the exit door closed, and the internal doors between two rooms are open. Also, each room has one heater (AC). The control variables are the heater switches, temperature, and airflow settings. The general model can be developed based on the convection and conduction equations  (<ref>) and (<ref>) for the heat transfer. 

	
    dQ_flow/dt=M× C_air(T_adjacent-T_room)
 
	
    dQ_conduction/dt=(T_adjacent-T_room)/R
  Table <ref> parameters are used in this section's equations. Thus, the thermal exchange rate of a convection-based component q_f,i is described based on (<ref>) and the thermal exchange rate of the conduction-based component q_c,j is described based on (<ref>). Then, the room heat exchange would be described as (<ref>). 

	
	
	
	
    dQ_room/dt=∑_i∈ F^w_f,i q_f,i+∑_j∈ C^w_c,j q_c,j
   
 In (<ref>), w_f,i is the binary weight and can be 0 or 1; 0 when the door/window is closed and 1 otherwise.  w_c,j is also a binary weight and can be 0 or 1; 1 when the door/window is closed and 0 otherwise.
 Eventually, (<ref>) illustrates the total heat exchange in a general format for each room. 

	
    dT_room/dt=1/m_i× C_air×dQ_room/dt
 
	Therefore, the temperature of room i,        i=1, ⋯, 6 in general is built as (<ref>). 

	
	
		
    [b]
    		   dx_i/dt =(1/m_i× C)[ T_o-x_i/R_walls-outi + T_roomi-j-x_i/R_walls-ini +wc_outdooriT_o-x_i/R_outdoori
       + wf_outdoori M_outdoori C (T_o-x_i)+ wc_indooriT_roomi-j-x_i/R_indoori
       +wf_indoori M_indoori C (T_roomi-j-x_i) +wc_windowi(T_o-x_i)/R_windowi
       + wf_windowi  M_windowi  C  (T_o-x_i) +wf_ac M_ac C (T_ac-x_i)]

	
	In (<ref>),  x_i is the temperature of room i, and T_o is the outside temperature as the disturbance. R_indoors, R_outdoors, R_walls-outi, and R_walls-ini are the total heat resistivity of indoors, outdoors, and the heat resistivity of walls from the outside and inside layers of room i, respectively. wc_indoor and wc_outdoor are the conduction weight between two rooms, and the conduction weight between the rooms and outside, respectively. Also, T_roomi-j is the heat exchange between room i and j. M_outdoor , M_indoor , and M_window are the amount of airflow from outside to inside, the amount of airflow indoors, and the amount of airflow from the windows respectively. M_ac is the amount of airflow of the heater. The numerical values used for the system simulations are stated in Table <ref>; i=1,2, ⋯, 6. Note that the model is developed modular to be modifiable if the system components' status change.
	

§ THE MODEL PREDICTIVE APPROACH

	A centralized Model Predictive Controller is first applied on the model to compare its results with the proposed distributed MPC approach.
	

 §.§ Centralized MPC

	The state space model MPC approach is chosen as the centralized MPC framework [5]. By discretization of the system state space model (<ref>), the states predictions P steps ahead of the current time are stated as (<ref>).

	
		
    [b] 
    		x̂(k|k)   =Ax̂(k|k-1)+Bu(k-1)+Ed(k-1)+L(ŷ(k)-ŷ(k|k-1))
    Y(k|k)   =THx̂(k|k)+TGΔU(k|k)+TFu(k-1)+TVW(k|k)

	   In (<ref>), A, B, and E are the state space representation matrices of the system. d is the disturbance, and Y, G, T, F, H, V, W are defined as follows. 

	
    Y^T(k)=
    	[ y(k+1|k)^T y(k+2|k)^T          ⋯ y(k+P|k)^T ]

	
	
	
    G=
    	[                 B                 0                 ⋯                 0;            (A+I)B                 B                 ⋯                 0;                 ⋮                 ⋮                 ⋯                 ⋮;     ∑_i=1^MA^i-1B   ∑_i=1^M-1A^i-1B                 ⋯                 B;   ∑_i=1^M+1A^i-1B     ∑_i=1^MA^i-1B                 ⋯            (A+I)B;                 ⋮                 ⋮                 ⋯                 ⋮;     ∑_i=1^PA^i-1B   ∑_i=1^P-1A^i-1B                 ⋯ ∑_i=1^P-M+1A^i-1B ]
    	T= 
    	[ C 0 ⋯ 0; 0 C ⋱ ⋮; ⋮ ⋱ ⋱ 0; 0 ⋯ 0 C ]


	
    F^T=
    	
    	[               B          (A+I)B               ⋯   ∑_i=1^MA^i-1B ∑_i=1^M+1A^i-1B               ⋯   ∑_i=1^PA^i-1B ]
    
	
	
    H^T=
    	[   A A^2   ⋯ A^P ]             
    	V=
    	[      E      0      ⋯      0;     AE      E      ⋯      0;      ⋮      ⋮      ⋯      ⋮; A^p-1E A^p-2E      ⋯      E ]

	
	
    W^T(k)=
    	[     d(k|k)^T   d(k+1|k)^T            ⋯ d(k+P-1|k)^T ]
  

	Moreover, the cost function J(k) in (<ref>) penalizes deviations of the predicted outputs ŷ(k+i|k) from a reference trajectory y_r(k+i|k),       i=1,2,⋯ , P.
	  
		
    [b] 
    		J(k)   =∑_i=1^P‖(ŷ(k+i|k)-y_r(k+i|k))‖_Q^2+∑_i=1^M‖Δu(k+i-1|k)‖_R^2

	 
	In (<ref>), P and M are the prediction and the control horizons respectively. Q and R are the weight matrices, y_r and Δu_i are the reference trajectory and the input increment vector respectively. Thus, to minimize the cost function (<ref>) subject to the system model description and the prediction equations, the centralized MPC algorithm would be as follows. 
	

	Step 0: Get the system model at the current time. 
 Step 1: at k=0; measure y(0), determine Y_r(0) and solve the optimization problem to calculate Δu(0), and then substitute u(0) by the calculated Δu(0).
 Step 2: at time k>0; measure y(k), determine Y_r(k) and solve the optimization problem to calculate Δu(k), and then substitute u(k) by the calculated Δu(k).
 Step 3: k=k+1 and go back to step 2.
 Hence, the whole system is monolithic using the centralized MPC, and only one MPC controller is assigned to the system. Therefore, there is one complicated large optimization problem with various variables being calculated at each time step.  

 §.§ Distributed MPC
  Distributed MPC approach is known to be effective specifically in building management systems since large building plants consist of various subsystems. Using a distributed MPC, one or more local MPCs are assigned to each subsystem of the whole plant, and they coordinate together to achieve a specific global performance of the entire system [13-15]. A simple block diagram of distributed MPC for a plant with n zones (subsystems) is presented in Fig. <ref>.
	  The distributed MPC algorithm proposed in this paper considers not only the future output and manipulated input predictions of the neighbor zones but also the disturbances predictions in each local controller. The goal is to attain a satisfactory global performance of the entire system with minimum computation demand [8].
 To begin with, MPC controllers and the coordination mechanism are required to be specified. Each MPC controller itself has composed of three prominent parts: a state predictor, an interaction predictor, and an optimizer. Each local MPC controller has one or more objective function as (<ref>) containing the tracking error (between the future output (ŷ_̂î) and the determined reference signal y_i^d) and the control effort increments (Δu). 
	
	  
		
    [b] 
    		J_i(k)   =∑_l=1^P‖(ŷ_i(k+l)-y_i^d(k+l))‖_Q_i^2+∑_l=1^M‖Δu_i(k+l-1)‖_R_i^2

	 In (<ref>), P and M are the prediction and the control horizons respectively. Q_i and R_i are the weight matrices, y_i^d and Δu_i are the reference trajectory and the input increment vector of subsystem i respectively. y_i^d is obtained by a smooth approximation from the current value of output y_i(k) towards the known reference r_i(k) by (<ref>).  

	
	
    y_i^d(k)=y_i(k),       y_i^d(k+l)=α_iw_i(k+l-1)+(1-α_i)r_i(k+l)
       l=1 ⋯ P

	To obtain the values of future control laws u_i(k+l|k) for each subsystem i, the local objective function of (<ref>) should be minimized at each time step k. Then, the global objective function of the whole plant at each time step k would be defined as (<ref>). 
	
	
		
    J(k)=∑_i=1^mJ_i(k)

	  
 In the above, m is the total number of subsystems. The values of the system's predicted outputs and states are calculated through (<ref>), and then substituted in the cost function. 
	
	  
    [b] 
    		x̂_i(k+l|k)   =A_ii^lx̂_i(k|k)+∑_s=1^lA_ii^s-1B_iiu_i(k+l-s|k)
       +∑_s=1^lA_ii^s-1ŵ_̂î(k+l-s|k-1)
    ŷ_i(k+l|k)   =C_iix̂_i(k+l|k)+v̂_i(k+l|k-1)

	 

	Moreover, the states and inputs interaction equations between the subsystems can be stated as (<ref>). Note that the disturbances are included in the input vector of the model.
	
	  
		
    [b] 
    		w_i(k)   =∑_j=1^mA_ijx_j(k)+∑_j=1^mB_iju_j(k)         v_i(k)=∑_j=1^mC_ijx_j(k)

	 
	
	
	Dual decomposition method based on Lagrangian function is proposed through the coordination mechanism in this work. The idea is to impose the interconnecting constraints into the objective function by the Lagrangian multipliers and approximately solve the dual cost function (duality theory is explained in [5]).
	Thus, the augmented function for each subsystem i is stated as (<ref>).
	
	
		
    [b] 
    		L_i(k)   = J_i(k) + ∑_j∈ N_i [λ_ij(k)^T (z_ij(k)-ẑ_ij(k)) + ρ/2‖ z_ij(k)-ẑ_ij(k) ‖_2^2]  
    
    		z_ij(k)    = [w_ij(k)     v_ij(k)]^T                  
    		N_i : Neighborhood    of    subsystem    i

	
	Note that the subsystems only communicate with their neighbors in N_i to get the interconnecting information from them and to send their last updated variables (states and inputs) to them at each time step.
	Therefore, the optimization problem for each local controller is the minimization of (<ref>) subject to constraints (<ref>). Consider that the duality function coefficients λ and ρ should be optimized as well as the input signal in each iteration. λ is updated through (<ref>). 

	
		
    [b] 
    		λ_ij^s+1(k)    = λ_ij^s(k)+ α ^s (z_ij^s(k)-ẑ_ij^s(k))

	 
   Defining the following matrices; 

	
    Ã_i= 
    	[   diag_P{A_i,1}               ⋯ diag_P{A_i,i-1}               0 diag_P{A_i,i+1}               ⋯   diag_P{A_i,m} ]

	
    B̃_i= 
    	[   diag_P{B_i,1}               ⋯ diag_P{B_i,i-1}               0 diag_P{B_i,i+1}               ⋯   diag_P{B_i,m} ]

	
    C̃_i= 
    	[   diag_P{C_i,1}               ⋯ diag_P{C_i,i-1}               0 diag_P{C_i,i+1}               ⋯   diag_P{C_i,m} ]

	
    Γ̃_i=
    	
    	[ 0_(M-1)n_ui*n_ui     I_(M-1)*n_ui; 0_n_ui*(M-1)n_ui           I_n_ui;                ⋮                ⋮; 0_n_ui*(M-1)n_ui           I_n_ui ]         Γ̃=   
    	diag{Γ̃_1⋯Γ̃_m}      B̃_̃ĩ=   
    	B̃̃̃_̃̃̃ĩ̃Γ̃
 
	
	Interaction predictions of subsystem i  would be as (<ref>). 

	
	
		
    [b]   
    		Ŵ_̂î(k,P|k-1)   =Ã_̃ĩX̂(k,P|k-1)+B̃_̃ĩU(k-1,M|k-1)
    V̂_̂î(k,P|k-1)   =Ĉ_̂îX̂(k,P|k-1)

	   
 The state and output predictions would be defined as (<ref>).
	
	
		
    [b]   
    		X̂_̂î(k+1,P|k)   =S̅_̅i̅[A̅_̅i̅x̂_̂î(̂k̂|̂k̂)̂+B̅_̅i̅U_i(k,M|k)+Ŵ_̂î(k,P|k-1)]
    Ŷ_̂î(k,P|k-1)   =C̅_̅i̅[X̂_̂î(k+1,P|k)+T_iV̂_̂î(k,P|k-1)]

	  
	where matrices T_i, S̅_̅i̅, A̅_̅i̅, B̅_̅i̅, and C̅_̅i̅ are stated as (<ref>).
	
	
    T_i=  
    	[ 0_(P-1)n_yi*n_yi      I_(P-1)n_yi; 0_n_yi*(P-1)n_yi           I_n_yi ]        S̅_̅i̅= 
    	[   A_ii^0        ⋯        0;        ⋮        ⋱        ⋮; A_ii^P-1        ⋯   A_ii^0 ]
 
	
    A̅_̅i̅= 
    	[         A_ii; 0_Pn_yi*n_yi ]        B̅_̅i̅T= 
    	[ diag_M{B_ii}                          ;       0_n_ui            ⋯       0_n_ui         B_ii;            ⋮            ⋱            ⋮            ⋮;       0_n_ui            ⋯       0_n_ui         B_ii ]
 
	
    C̅_̅i̅= diag_P{ C_ii}
 

	Therefore, the control solution for the optimization problem would be as (<ref>). 

	
    U_i(k,M|k) = Γ_1^'u_i(k-1)+Γ̅_̅i̅K̅_̅i̅[Y_i^d(k+1,P|k)-Ẑ_̂î(k+1,P|k)]

	where K_i, and Ẑ_̂î are defined in (<ref>). 

	
	
		
    [b]  
    		Ẑ_̂î(k+1,P|k)   = S_i[B̅_̅i̅Γ_i^' u_i(k-1)+A̅_̅i̅x̂_̂î(k|k)+Ŵ_̂î(k,P|k-1)] 
       +T_iV̂_̂î(k,P|k-1)

	  

	
    K̅_̅i̅= H_i^-1N_i^TQ̅_̅i̅               
    	H_i=N_i^TQ̅_̅i̅N_i+R̅_̅i̅               
    	S_i=C̅_̅i̅S̅_̅i̅

	
    Q̅_̅i̅=diag_P{Q_i}               R̅_̅i̅=diag_P{R_i}               
    	N_i=S_iB̅_̅i̅Γ̅ ̅_̅i̅
 
	
    Γ_i^'= 
    	[ I_n_ui;      ⋮; I_n_ui ]             Γ̅_̅i̅= 
    	[ I_n_ui      ⋯      0;      ⋮      ⋱      ⋮; I_n_ui      ⋯ I_n_ui ]
  
	
  Thus, the following distributed MPC strategy is proposed for the building plant.
	
	Step 1: 
	 
  * Send U_i(k-1,M|k-1) and X̂_i(k,P|k-1) to its neighboring controller C_j (coordination mechanism). 
		
  * Estimate the future state trajectories X̂_j(k,P|k-1) and control inputs U_j(k-1,M|k-1) from its neighboring controller through information exchange (Goal coordination method [5]).
		
  * Determine the desired trajectory Y_d(k+1,P|k) based on MPC's configuration.
		
  * Observe the values of x_i(k).
		
  * Build the x̂(k,P|k-1) and U(k,P|k) by adding the subsystem's state estimations x̂_i(k,P|k-1) and control input U_i(k,P|k), and the subsystem's neighbor information x̂_j(k,P|k-1) and U_j(k-1,M|k-1) to attain the predictions of Ŵ_̂î(k,P|k-1) and V̂_̂î(k,P|k-1) (from (<ref>)).
	
	
	Step 2:  
	 
		
  * Calculate the optimal control law U_i(k,M|k) from (<ref>).
		
  * Apply the first element of the optimal control U_i(k,M|k) (u_i(k)) to the system.
		
  * Update λ from (<ref>).
	
	
	Step 3: 
	 
		
  * Compute the estimation of the future state trajectory of ith subsystem over the horizon P from (<ref>).
	
	
	Step 4:  
	 
		
  * change k to k+1 and go back to step 1 and repeat the algorithm.
	 
	The coordination strategy in the proposed distributed algorithm based on goal coordination avoids global communication in the whole network and enhances the closed-loop system stability and feasibility [5]. Assuming the existence of a feasible input sequence for each subsystem i at k=0, the optimization problem has a feasible solution for each subsystem i at all k≥ 0. For stability analysis, (<ref>) is defined as the Lyapunov function which will be solved off-line. 

	
    A^TPA-P=-F,              P=
    	[ P_11 P_12    ⋯ P_1m; P_21 P_22    ⋯ P_2m;    ⋮    ⋮    ⋱    ⋮; P_m1 P_m2    ⋯ P_mm ]
 
	
    F= diag(F_1,F_2,⋯,F_m),          F_i(0)=F_i(1)=⋯=F_i(N-1)=F_i
  Having relationship (<ref>) from [5],
	
    J(k)(x(k))≤ J(0)(x(0))- ∑_k=0^K-1∑_i=0^m J_i(k)(x_i(k),u_i(k))≤ J(0)(x(0))
 
	(<ref>) is attained.
	
		
    [b]
    		1/2λ _min(F)‖ x(k)‖^2     ≤ J(k)(x(k)) 
    
    		J(k)(x(k))≤ J(k)(x(0))=1/2x(0)^TPx(0)    ≤1/2λ_max(P)‖ x(0)‖^2

	  

	
	Thus, it is proved that ‖ x(k)‖≤√(λ_max(P)/λ _min(F))‖ x(0)‖, which shows that the closed-loop system is asymptotically stable under the distributed algorithm.
	
 Moreover, the disturbances predictions are considered as part of the system model through the proposed algorithm. In result, less computation and complication, and better overall performance are attained using the proposed framework.  
	

§ SIMULATION AND RESULTS

	The desired trajectory for each room's temperature is between 5 to 25 C in 5 different time periods (0-6 AM, 6-12 AM, 12-6 PM, 6-9 PM, and 9-12 PM) regarding the occupancy condition. To maintain occupant comfort, temperature set points during occupied hours (0-6 AM and 6-12 PM) are higher than the vacant periods (6-12 AM and 0-6 PM). The environment temperatures as the disturbances are also assumed to be between -6 to 4 C.
 In the centralized case, the discrete-time state space equation of the system is considered and the cost function is a monolithic global function as (<ref>) for the whole system.
	
    J(k)=∑_i=1^6{‖(x_i(k)-x_i^d(k))‖_Q_i^2+‖u_i(k)‖_R_i^2}
 

	where x_is and x_i^ds are the rooms' temperatures and the reference trajectories of room i respectively. Note that the control variables for centralized MPC are T_aci, M_aci, and wf_aci.
 The diagonal weighting matrices Q_i and R_i are chosen as (<ref>), associated with the set-point errors' and inputs' weightings respectively.
	
    Q_i=1.5×I_12×12,         R_i=(1/1600)×I_6×6
 
 At each time instant, the optimization problem is solved using a MATLAB optimization solver, then the optimum input is considered as the current input for the next step. The attained input at each step also builds the actual system output y. 
 In the distributed case, six subsystems with their own objective functions and at least one neighbor share their inputs, disturbances, and states information with their neighbors. 
 Thus, the equation for subsystem i,      i=1,2,⋯, 6  is (<ref>), with objective function (<ref>). 
	  
		
    [b]
    		J_i(k)   =‖x_i(K)‖_P_i^2+  ( ‖(x_i(k)-x_i^d(k))‖_Q_i^2 + ‖z_i(k)‖_S_i^2+‖(U(k))‖_R_i^2)

	   Note that the control variables T_aci, M_aci, wf_aci, and the energy consumption are considered in controller i of room i. Furthermore, the subsystems' interactions are included in the objective functions using the Goal coordination algorithm [5], such that the subsystems' dynamic constraints with weighting coefficients are imposed in the cost function. Moreover, each state or input constraint can be regarded separately in the algorithm using the diagonal weighting matrices.
	
	  
		
    [b]
    		M_i(P)    = min {‖x_i(K)‖_P_i^2+ ∑_k=0^K-1 ( ‖(x_i(k)-x_i^d(k))‖_Q_i^2 + ‖z_i(k)‖_S_i^2
       + ‖(T_ac(k))‖^2_R_i  + P_i^T(k)[A_ix_i(k)+B_iu_i(k)+C_iz_i(k)
       -x_i(k+1)]+  λ _i^T(z_i-∑_j=1^m L_ijx_j)             )  }

	
	

	where L_ijs are the coefficients used for connecting the states of neighboring subsystems. λ _i and  P_i^T are the interactions and system model constraints respectively. Using the Hamiltonian function H_i defined in (<ref>), (<ref>) can be converted to (<ref>). 

	
	  
    [b]
    		H_i(x_i, u_i, z_i, k)    = ‖(x_i(k)-x_i^d(k))‖_Q_i^2 + ‖z_i(k)‖_S_i^2+ ‖(T_ac(k))‖_R_i^2
       + P_i^T(k)[A_ix_i(k)+B_iu_i(k)+C_iz_i(k)-x_i(k+1)]
       +  λ _i^T(z_i-∑_j=1^m L_ijx_j)

	
	   
    [b]
    		M_i(P)    = min {‖x_i(K)‖_P_i^2 - P_i(K-1)^Tx_i(K)
       + ∑_k=0^K-1 (H_i(k)-P_i(k-1)x_i(k)) )  }

	
	
	In each instant, the following proposed three-level algorithm is being applied iteratively up to the prediction horizon until the optimum input is attained.   
	
		
  * k=0; minimize H_i(x_i(0),u_i(0),z_i(0)) with partial derivatives with respect to u_i(0) and z_i(0).
		
  * k=1,2,...,K-1; minimize H_i(x_i(k),u_i(k),z_i(k),k)-P_i(k-1)^Tx_i(k)) with respect to x_i(k), u_i(k) and z_i(k).
		
  * k=K; minimize ‖(x_i(K))‖_P_i^2-P_i^T(K-1)x_i(K) with respect to x_i(K). 
	 
	
	Fig.s <ref> and <ref> show the six rooms' temperatures using the centralized and distributed MPC respectively. Fig. <ref> illustrates the control trajectory results from the centralized and distributed MPC respectively. Table <ref> compares the numerical values of the two rooms' temperatures and their control trajectory characteristics using  centralized and distributed MPC cases.  
	
	  
	From Fig.s <ref> and <ref>, the distributed MPC functions better compared with the centralized MPC strategy in terms of reference tracking performance. From Table <ref>, the overshoots and peak values of room 1 and 2 temperatures using distributed MPC are significantly smaller than the same values in centralized case. 
 From Fig. <ref>, the distributed MPC control signal shows lower overshoot and stabilizes sooner than the centralized MPC control trajectory. Comparing the areas under the control signals (Table <ref> 7th column), the energy consumption using distributed MPC is 25.42% lower than that of the centralized one. Besides, the optimization time using the DMPC and centralized MPC in a Corei7, 3.2GHz computer are shown in the last column of Table <ref>. Hence, DMPC controller performs 60 times faster than the centralized MPC. As the plant gets larger, the computation time using the centralized framework gets relatively high which makes the real-time control of the system impossible. Another important innovation of the proposed DMPC algorithm is that it considers the disturbances predictions and it owns stability and feasibility properties. The implemented controlled system is being applied in an IOT project. In fact, using the proposed scheme for the IOT building sector, not all the agents need to be connected to each other, therefore the communication effort is significantly lower compared to the centralized scheme.
	
	

§ CONCLUSIONS

	A distributed MPC and a centralized MPC strategy have been developed for a benchmark temperature control problem of a six-zone building system. The aim was to regulate the building's six zones' thermal condition to the desired set-points with minimum energy consumption. The heat exchange between the rooms, and between the outer and inner spaces are all considered in the system model. The control variables are the heat flow amount and the heater temperature in the zones. The proposed distributed predictive controller is able to predict the model inputs, states, thermal exchanges, and disturbances to compensate the system outputs rapidly.
 From the simulation results, the distributed MPC approach showed better performance in signal tracking, energy consumption (25.42% less), and computation time (60 times lower) compared with the centralized MPC. The proposed distributed MPC improved control performance by utilizing the disturbances predictions as part of the system model. Besides, the stability of the closed-loop system using the proposed distributed algorithm is guaranteed through the Lyapunov theory. Moreover, the feasibility of the solution is guaranteed if the initial solution is feasible and the controlled closed-loop system is asymptotically stable at the system's equilibrium point. The distributed MPC method proposed here can be generalized to a larger plant of this kind for future works. 
	
	
	
	 99
		c1 2010/31/EU of the European Parliament and of the Council on the energy performance of buildings. Official Journal of the European Union; 2010.
		c2 T. Zhang, M. P. Wan, B. F. Ng, and S. Yang, “Model Predictive Control for Building Energy Reduction and Temperature Regulation,” 2018 IEEE Green Technologies Conference (GreenTech), Austin, TX, 2018.; 100-106.
		c3 Y. Wen and W. Burke, “Real-Time Dynamic House Thermal Model Identification for Predicting HVAC Energy Consumption,” Green Technologies Conference, 2013; 367-372.
		c4 K. Zvaigznitis, C. Rochas, G. Zogla, and A. Kamenders, “Energy Efficiency in Multi-Family Residential Buildings in Latvia. Cost-Benefit Analysis Comparing Different Business Models,” Energy Procedia 2015; 72:245-249.
		c5 S. Li and Y. Zheng, Distributed model predictive control for plant-wide systems. Wiley; 2015.
		c6 J. Maestre and R. R. Negenborn, Distributed model predictive control made easy (International series on intelligent systems, control and automation, science and engineering; v.69). Springer; 2014.
		c7 R. Eini and S. Abdelwahed, “Indirect Adaptive fuzzy Controller Design for a Rotational Inverted Pendulum,” 2018 Annual American Control Conference (ACC), Milwaukee, WI, USA, 2018, pp. 1677-1682. doi: 10.23919/ACC.2018.8431796.
		c8 P. Morosan, R. Bourdais, D. Dumur, and J. Buisson, “Distributed model predictive control for building temperature regulation,” American Control Conference (ACC), 2010; 3174-3179.
		c9 Y. Ma, G. Anderson, and F. Borrelli, “A distributed predictive control approach to building temperature regulation,” American Control Conference (ACC), 2011; 2089-2094.
		c10 F. A. Barata, N. Felix, and R. Neves-Silva, “Distributed MPC for Green Thermally Comfortable Buildings Based on an Electro-thermal Modular Approach,” Procedia Technology, 17(C), 2014; 772-780.
		c11 S. H. Trapnes, “Optimal Temperature Control of Rooms. Specialization project,” Norwegian University of Science and Technology. 2012. 
		c12 S. Wu and J. Sun, “A Physics-based Linear Parametric Model of Room Temperature in Office Buildings,” Building and Environment Journal. 2012.
		c13 M. D. Doan, T. Keviczky, I. Necoara, M. Diehl, and B. D. De Schutter, “A Distributed Version of Han's Method for DMPC of Dynamically Coupled Systems with Coupled Constraints,” IFAC Proceedings Volumes, 42(20), 240-245. 2009.
		c14 R. Eini, A. Ranjbar Noei, “Identification of Singular Systems under Strong Equivalency,” International Journal of Control Science and Engineering, vol. 5, no. 2, pp. 73-80, 2013.
		c15 S. Li, Y. Zhang Y., and Q. Zhu, “Nash-optimization enhanced distributed model predictive control applied to the Shell benchmark problem,” Information Sciences, 170(2), 329-349. 2005.
	
	
	
