Switched Control Strategies of Aggregated Commercial HVAC Systems for Demand Response in Smart Grids

This work proposes three switched control strategies for aggregated heating, ventilation, and air conditioning (HVAC) systems in commercial buildings to track the automatic generation control (AGC) signal in smart grid. The existing control strategies include the direct load control strategy and the setpoint regulation strategy. The direct load control strategy cannot track the AGC signal when the state of charge (SOC) of the aggregated thermostatically controlled loads (TCLs) exceeds their regulation capacity, while the setpoint regulation strategy provides flexible regulation capacity, but causes larger tracking errors. To improve the tracking performance, we took the advantages of the two control modes and developed three switched control strategies. The control strategies switch between the direct load control mode and the setpoint regulation mode according to different switching indices. Specifically, we design a discrete-time controller and optimize the controller parameter for the setpoint regulation strategy using the Fibonacci optimization algorithm, enabling us to propose two switched control strategies across multiple time steps. Furthermore, we extend the switched control strategies by introducing a two-stage regulation in a single time step. Simulation results demonstrate that the proposed switched control strategies can reduce the tracking errors for frequency regulation.


Introduction
As smart grid construction is rapidly executed and large-scale intermittent renewable energy resources are being integrated, demand response programs enable consumers to schedule loads in order to save energy, reduce costs, and help grid operation [1].Ancillary service, which is required to support the reliable delivery of electricity and the operation of transmission systems, is an important component of electric service.Ancillary service includes voltage control, black start, spinning reserve, replacement, load following, and frequency regulation [2].
In the power grid, the imbalance between the generation and the load often results in mismatches in frequency [3].Traditionally, rapidly responding generators and grid-scale energy storage units have provided frequency regulation [4].Since the schedulable electrical loads are popular in commercial buildings and residences, they have become promising candidates in enhancing the property of power systems.As the main components of schedulable electrical loads, thermostatically-controlled loads (TCLs), which include heat pumps, chillers, and air conditioners, are suitable for regulating their aggregate power to serve for the demand response [5][6][7][8].A simple TCL, such as a frequency-fixed air conditioner, usually has two operation states, i.e., on/off, each of which corresponds to one output power level, P rated or 0. The simple on/off state transition makes it possible for the TCLs to participate in ancillary service.When the generation is in surplus, the TCLs can "charge" by turning on, and during the periods of scarcity, they "discharge" by turning off [9].The dynamic modeling of TCLs was first studied in [10] and applied in cold load pickup.A variation of the alternating direction method of multipliers (ADMM) algorithm was proposed to achieve the distributed optimization of aggregated TCLs [11].
As a representative type of TCLs, the heating, ventilation, and air conditioning (HVAC) units, which are widely installed in commercial buildings, are studied and analyzed widely in terms of different aspects.It is essential to study the load dynamics, the model parameters, the temperature evolution, and the power consumption of HVAC units.The control of the air pressure and temperature for HVAC units was considered to keep rooms in desired conditions by the authors of [12][13][14].The energy management of HVAC units was developed to remove the peak load and match supply with demand by the authors of [15][16][17].
The HVAC units are usually regulated by turning them on or off directly.A state queuing model and a temperature priority list strategy were presented in [18] to control the on/off states of the HVAC units.A centralized control framework of the HVAC units was presented in [19][20][21] to provide continuous regulation services, and the operational characteristics were analyzed under different system states and communication models.A novel two-level scheduling method was proposed in [22] to minimize the energy imbalance cost.In [23], the authors modeled the aggregated HVAC units as a generalized energy storage battery and proposed a temperature-priority control strategy to control the power consumption to track the frequency regulation signal to serve for the grid, and the tracking errors were reduced by controlling the on/off states directly.The temperature setpoint and the deadband are not regulated in this control mode, which limits the HVAC units' ability to "store" or "release" energy.Furthermore, the tracking error is extremely large when the synchronization of loads occurs.
Setpoint regulation is another control strategy to regulate the HVAC units [24].The authors of [25][26][27][28] proposed several types of controllers, such as the internal model controller, the linear quadratic controller and the Lyapunov stable controller to achieve peak shaving or load shifting by regulating the temperature setpoint.A heuristic algorithm based on the setpoint regulation was developed for decentralized implementation in [29].Regulating the temperature setpoint enlarges the energy storage capacity, but the setpoint regulation causes large chattering effects and tracking errors.
To reduce the errors when tracking the automatic generation control (AGC) signal, we combine the two types of control strategies and develop three switched control strategies.Specifically, the direct load control strategy is used when the energy capacity is sufficient, and the setpoint regulation strategy is adopted when the capacity is insufficient.To implement the switching control strategies, we must first address two problems: What is the optimal control law for temperature setpoint regulation?What is the best method for switching between the two control strategies?This study deals with these problems and achieves the following contributions:

•
A discrete-time controller is proposed to adjust the setpoints of the HVAC units and the Fibonacci optimization algorithm is used in [30] to obtain the optimal parameter of the controller.

•
The switching indices are established before presenting the switched control strategies to track the AGC signal.

•
A two-stage regulation strategy is proposed in a single time step to improve the tracking performance of the switched control strategies.
The rest of the paper is organized as follows.Section 2 describes the operation characteristics of the HVAC units and the two typical control strategies, and then establishes the switched control model.Section 3 covers the controller design and parameter optimization using the Fibonacci algorithm and presents three switched control strategies across multiple time steps.The simulation results are shown in Section 4 , and the conclusions are summarized in Section 5 .

System Model and Control Strategies
This section introduces the individual HVAC model and the typical control strategies in commercial buildings before establishing a switched control model.

Individual HVAC Model
The coupled equivalent thermal parameters (ETP) model includes two temperature variables, the internal air temperature T and the mass temperature T m [31], while the simplified HVAC model only contains T under the assumption that T m is equal to T [19][20][21].In this work, we use the simplified HVAC model [32].For a system including N HVAC units, the temperature evolution of the i-th HVAC unit in the cooling mode can be expressed as: where, and m i is a binary variable, which represents whether the HVAC unit is on or off.The power consumption of the aggregated HVAC units can be calculated by:

Typical Control Strategies
The typical control strategies of the aggregated HVAC units in commercial buildings can be classified into two categories: the direct load control strategy and the setpoint regulation strategy.The specific control processes are described below.
The first type of control strategies is based upon the on/off state control, namely the direct load control.According to the state information, the control center decides which loads should be turned on or off based on certain strategies, such as the temperature priority control strategy [23].Specifically, the internal air temperatures order the aggregated loads.The "on" loads with lower indoor temperatures have a higher priority to turn off, and the "off" loads with higher indoor temperatures have a higher priority to turn on in the cooling mode.Then the loads will be turned on or off in sequence until the desired objective is achieved, and the on/off operations in sequence can make full use of the reserve capacity of the HVAC units.It was suggested that the direct load control strategy is restricted by the state of charge (SOC) of the aggregated loads [23].When the SOC exceeds the capacity limits, the aggregated loads cannot track the AGC signal anymore.
The second type of control strategies is based on setpoint regulation.For instance, a bilinear system model was derived in [33] to approximate the dynamics of the aggregate HVACs, and a sliding-mode control strategy in the continuous-time form was developed to regulate the setpoint.It was concluded that the aggregated loads cannot track the AGC signal when the stability condition is not satisfied [33].

Control Strategy Comparison
The main difference between the two control strategies is the temperature range of the loads to be scheduled.One is to control all the loads directly in the whole deadband, except for the loads which must be on or off due to the temperature limits.The other is to regulate the loads near the edges indirectly by their self-operations.The tracking performance is better under the temperature priority control strategy when the energy capacity is enough.The loads are only turned on or off with one more or less load than the control objective under the temperature priority control strategy.Although the energy capacity is enlarged dynamically by adjusting the setpoint in the sliding-mode control strategy, it will cause a larger tracking error.
We use a Monte Carlo method and MATLAB R2009a (MathWorks, Natick, MA, USA) to evaluate the performances of 1000 HVAC units under the two control strategies and give the simulation parameters in Table 1 [9,34], where R, C, and P are assumed to follow Gaussian distributions.These parameters can be obtained based on the methods in [35,36], e.g., the short-term energy monitoring (STEM) method.The averages of R, C, and P are shown in Table 1, and the standard deviations are 0.1.The initial load temperatures are assumed to be distributed uniformly in the deadband.The baseline power P BL is set as: The AGC signal within two hours is randomly chosen from the Pennsylvania-New Jersey-Maryland Interconnection (PJM) electricity markets to demonstrate the tracking performance [37].The power deviation is defined as the difference between the aggregated power and the baseline power.The tracking performances during 2 h are shown in Figures 1 and 2. The figure with 1000 HVAC units contains a lot of data and occupies large storage space.Without loss of generality, we randomly choose 100 out of them.
As shown in Figure 1, the tracking performance is good when the stored energy is still in the capacity bounds.However, when the loads are centered at the temperature edges, the synchronization occurs and the loads cannot track the signal.At the same time, the AGC signal exceeds the energy capacity so that the loads cannot track the regulation signal.It can be concluded that the centering at the temperature limits of HVAC units corresponds to the situation that the available energy capacity is depleted.Due to the temperature limits, some of the HVAC units must be turned on or off, so there are not enough HVAC units to be scheduled.It means that the energy is fully discharged or charged.In that case, the loads are turned on or off frequently, and the wear of the HVAC units is severe.
In Figure 2, the tracking error is caused by the chattering effects and is much larger than that in Figure 1 when the loads are not centering at edges, but the temperature distribution of loads is almost uniform.The energy storage capacity is enlarged, and the aggregated HVAC units can charge or discharge sustainedly.Moreover, since the scheduled loads are near the temperature edges, the "short-cycling" problem is avoided and the wear of the HVAC units is reduced.However, the change of the setpoint reduces the thermal comfort of consumers and the satisfaction levels.Remark 1. Figure 1 and Figure 2 are given to show the tracing performances of the temperature priority control strategy and the sliding-mode control strategy, respectively.It can be observed that the AGC signal within 2 h is enough to show the chattering effects and the case that the AGC signal exceeds the energy capacity.

Switched Control Model
The switched control model is established based upon the two control strategies described in Section 2.2.The diagram of the switched control model across multiple time steps is shown in Figure 3.The control center uses the SOC or the stability condition of the control gain as the switching indices and calculates them by collecting the state information of the HVAC units.Different control strategies are used to perform the tracking according to the values of the switching indices.The switched control strategies are achieved through the following steps: (1) First, we design a discrete-time sliding-mode controller to regulate the temperature setpoint and search for the optimal control gain by the Fibonacci optimization algorithm.(2) Second, we present a pair of switched control strategies according to two switching indices, which are then used to decide which control strategy should be applied across multiple time steps.(3) Third, we introduce a two-stage regulation in a single control cycle, which means that the loads are regulated twice in one time step.The third switched control strategy is then developed to further improve the tracking performance.
The specific description of the switched strategies is shown in Section 3 .We obtain the optimal parameter of the sliding-mode controller, design two switching indices, and consequently present three switched strategies.

Controller Design and Optimization
For a population of aggregated HVAC units, the average temperature deadband is divided uniformly into n bins, in which each bin contains the "on" loads and "off" loads.In that case, there are 2n states and any given HVAC unit corresponds to a certain state.The continuous-time model in [33] can be discretized into: where x(k) is a 2n × 1 vector that represents the numbers of loads in each state, y(k) is the total power consumption, and u(k) is the average change of the temperature setpoint in the kth step.H = [0, ..., 0| n , P/η, ...P/η] is a 1 × 2n vector, I is the identity matrix, and A is the state matrix: The input matrix B is given by: The parameters in A are detailed as, The sliding-mode controller u in the discrete-time form is defined as, where ρ is the control gain, e (k) = P AGC (k) − y (k), and P AGC (k) is the AGC power signal in time step k.
It was proven in [38] that the systems ( 7)-( 8) are globally asymptotically stable with the sliding-mode controller (13) if ρ satisfies a robustness condition: where ∆P AGC (k) = P AGC (k + 1) − P AGC (k), ϕ = H Ax(k), and ψ = HBx(k).The robustness condition specifies the lower bound of the control gain.Due to the high frequency switching of the signum function, the chattering effect of the sliding mode controller is inevitable.It causes larger tracking errors and results in more meaningless state transitions of the HVAC units.To reduce the passive impact of the chattering effect on tracking performance, we applied the boundary layer-based method.This method is accomplished by substituting the signum function with a tunable saturation function, i.e., where s = e(k), and ζ is the width of boundary layer.The introduction of the boundary layer leads to the effective convergence of the tracking error to a zone bounded by ζ.Therefore the final control input is: When ρ < ρ, the Lyapunov stability is not satisfied and the tracking error is large [33].The state information (T i and m i ) of the HVAC units should be measured in real time, and the parameters (R i , C i , and P i ) of the HVAC units should be collected to the controller.This depends on the advanced metering infrastructure (AMI) and the information processing capability of the control centers.
Remark 2. In this control mode, the upper and lower temperature bounds are regulated along with the setpoints of the TCLs according to (4), and the deadband of each TCL is fixed.

Parameter Optimization
The tracking error in the setpoint regulation strategy is related to the control gain of the sliding-mode controller.It is necessary to find the optimal controller gain ρ to improve the tracking performance.The root-mean-square error (RMSE) percentage is used to evaluate the tracking error, i.e., the deviation between the AGC signal and the actual response: Adjusting the control gain ρ according to the robustness condition in real time is a challenging work in practice because the AGC signal is highly unpredictable.In that case, ρ is usually chosen large enough to satisfy (14).However, the large gain ρ can induce the sliding-mode chattering effect, which results from the high frequency switching of the signum function.If ρ is excessively large, the chattering effect is serious and the RMSE will increase significantly.
To find the relationship between RMSE and the gain ρ, we calculated the actual RMSE values at different ρ in Figure 4. From the figure, we can observe that the relationship between them is a unimodal function and there exists a minimum RMSE value.However, the exact analytic expression RMSE = f (ρ) is unknown.In that case, the analytical solution at the minimum RMSE cannot be obtained.However, the numerical solution can be achieved using the Fibonacci optimization Algorithm A1 [30].The detailed description of it is shown in the Appendix A.
According to the diagram shown in Figure 5, ρ * = 8.4 • C/h is calculated based on the historical statistical AGC data and can be used for future control.By utilizing the daily signals for 1 May through 10, 2014, we can observe that the optimal gains in different days are close across the time of day, as shown in Table 2. Thus, it is reasonable to take the mean value of them as the optimal gain.In this case, the mean value ρ * is 8.6 • C/h, and it will be applied in the switched control strategies.)

Switched Control Strategies I and II
In this subsection, two switched control strategies across multiple time steps are proposed to further reduce the tracking error.To achieve a smaller tracking error, we adopt different control strategies according to the operation states of the loads.It is necessary to define the switching indices and decide which control strategy should be applied.
For energy storage devices, an index named SOC is used to denote the state of charge; the index is the ratio of the remaining energy and rated capacity.The populations of HVAC units are represented as generalized battery models to analyze the aggregate flexibility.The SOC of the aggregated HVAC units under the cooling mode can be defined as: If all room temperatures reach their upper limits, the SOC is 0, which means the stored energy is used up; if all room temperatures reach their lower limits, the SOC is 1, which means the stored energy is full.For traditional energy storage devices, the significant deep-discharging and over-charging process will reduce the service time.The same is true for the aggregated HVAC units because when the SOC is 1 or 0, the loads are centered at the edges and turn on or off frequently.We have noted that the loads are never centered at the edges in the setpoint regulation mode, which means that the deep-discharging or over-charging state can be avoided.Thus the SOC can be chosen as a switching index.The lower bound ρ in (14) was selected as another switching index because when ρ > ρ is not satisfied, the tracking error is large.
Four thresholds (a, b, c, d) of the SOC were introduced to establish the switched control strategies.The thresholds represent different energy states of the aggregated HVAC units.We can decide which control strategy should be applied according to whether the SOC reaches the thresholds and which thresholds the SOC reaches.The values of a and b represent that the SOC is close to the lower and upper energy limits, respectively.Once the SOC reaches a or b, the temperature priority control strategy should be switched to the sliding-mode control strategy.c and d represent that the SOC is far enough from the energy limits, and thus the temperature priority control strategy should be used.

Switched Control Strategy III
To further reduce the tracking error, we can utilize the precision tracking character of the temperature priority control and the ability of enlarging energy capacity of the sliding-mode control by adopting the two methods in a single time step.Figure 6 describes this basic idea.Assume that the loads are operating in the temperature region [T min , T max ] on the basis of the initial setpoint.In the first stage, the sliding-mode control strategy is used to increase or decrease the temperature setpoint, and the temperature region is changed to [T min , T max ].After that, the loads are divided into an out-of-region group and an in-region group, namely Part 1 and Part 2. In the second stage, the temperature priority control strategy is used to control the loads in Part 2 to further reduce the tracking error.This two-stage regulation in a time step is detailed as follows.

•
Utilize the sliding-mode control strategy to track the AGC signal and output the tracking error.

•
Divide the loads into Part 1 and Part 2.

•
Control the loads in Part 2 based on the temperature-priority control strategy to compensate for the tracking error.
Combined with the two-stage regulation, the process of the three switched control strategies is shown in Figure 7.In the flow chart, blocks A, B, and C have different meanings under the three switched control strategies.The detailed description is presented in Table 3.

Simulation Results
In the simulation, we are referring to the theoretical HVAC systems described in Section 2. Here, 10 4 HVAC units are used to track the daily AGC signal from the PJM electricity markets [37].The simulation and control parameters are shown in Table 1.The initial upper and lower limits are calculated according to Equation (4), and the initial load temperatures are assumed to be distributed uniformly in the deadband.The switching thresholds were chosen based on the rule in Section 3.3.Their values are defined as a = 0.15, b = 0.85, c = 0.3, d = 0.7, and ρ = ρ * = 8.6 • C/h.The power deviation is defined as the difference between aggregated power and baseline power.
The AGC tracking results, the temperature setpoint trajectories, and the SOC under the three switched control strategies are shown in Figures 8-10, respectively.From the temperature setpoint trajectories in Figures 8b and 9b, it can be observed that the control modes were switched during the simulation.When the setpoint is not changed, the temperature priority mode is active, and otherwise, the sliding-mode strategy is active.Moreover, the switches can also be observed from the SOC results, i.e., Figures 8c and 9c.Once one of the thresholds is reached, the control mode is changed correspondingly.However, the switches under Switched Control III can be only observed by the SOC results in Figure 10c because the temperature setpoint is regulated all the time in Figure 10b.
Furthermore, Table 4 provides comparisons of the RMSE, the variation range of the setpoint, and the number of on/off operations with the related works.The large tracking error associated with the temperature priority control strategy was caused by the energy storage limits of the aggregated HAVC units.In fact, the tracking error is very small when the SOC does not exceed the energy storage limits [23].The following observations were obtained from the simulation and comparison results:

•
The tracking performances of the HVAC units under the three switched control strategies are better than they were when using the temperature priority control or the sliding-mode control individually.This is because that the switched control strategies select the appropriate control methods according to the system states.Hence, the disadvantage of each individual method is mitigated.It is observed that the switched control strategies have smaller RMSE and less stepoint changes, and thus they are promising for the frequency regulation.

•
On the system operator side, the RMSE value is an important factor.A large RMSE means more reserve capacity is needed, which increases the costs.A small RMSE value stands for good AGC tracking performance, and thus Switched Control Strategy III is the best candidate.

•
On the consumer side, the temperature should be maintained in a comfortable region.Thus, the small variation range of the temperature setpoint is preferable.It is observed from Table 4 that the setpoint range of Switched Control Strategy III is the smallest, hence it should be considered first.

•
Considering the computing overhead, Switched Control Strategy III is more complex than the others, which is caused by the two-stage regulation.Therefore, to achieve a tradeoff between the RMSE and the computing overhead, Switched Control Strategy I and II are the better choices.

•
Considering the wear and tear of the HVAC units, greater numbers of on/off state operations result in more severe wear and tear.The on/off state operations of the sliding-mode control strategy is the least, as shown in Table 4. Hence, to prolong the lifespan of the HVAC units, the sliding-mode control strategy is preferred.

Conclusions
In this paper, we proposed three switched control strategies for the HVAC units to support frequency regulation in smart grid.We observed that the tracking errors under the proposed switched control strategies are smaller than that under a single control mode.The variation ranges of setpoint under the three strategies are also smaller, which means the strategies can relieve consumer discomfort.The findings of this research are two-fold: First, the optimal parameter ρ of the sliding-mode controller was obtained using the Fibonacci optimization algorithm.The aggregated HVAC units performed better with the optimal parameter.Second, with the established switching indices and the two-stage control in a time step, three switched control strategies across multiple time steps were designed to track the AGC signal.It is shown that the switched control strategies have smaller tracking errors than the direct load control and sliding-mode control strategies, and the variations of the temperature setpoint and the numbers of on/off operations are acceptable.
For the implementation, the electricity company should sign contracts with consumers in advance to determine the responsibilities and obligations of both parties.Then, according to the contracts, the electricity company choose appropriate methods to regulate the power consumption of the loads, and the regulation can be achieved based on the advanced metering infrastructure.

Figure 1 .
Figure 1.(a) AGC signal tracking under the temperature priority control strategy; (b) Temperature distribution of 100 HVAC units (randomly chosen out of 1000) and (c) State of charge.

Figure 2 .
Figure 2. (a) AGC signal tracking under the sliding-mode control strategy; (b) Temperature distribution of 100 HVAC units (randomly chosen out of 1000).

Figure 3 .
Figure 3. Diagram of the switched control model.

Figure 4 .
Figure 4.The relationship between the RMSE and ρ.

Figure 5 .
Figure 5. Diagram of the Fibonacci optimization algorithm.

Figure 7 .
Figure 7. Flow chart of the switched control strategies.

Table 2 .
The optimal controller gains in different days.

Table 4 .
Comparisons with the related works.