# HVAC-Based Cooperative Algorithms for Demand Side Management in a Microgrid

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Microgrid Structure

## 3. Preliminaries

#### 3.1. Graph Theory

#### 3.2. Consensus Algorithm

- $D{1}_{n}={1}_{n}$ and ${1}_{n}{}^{T}D={1}_{n}{}^{T}$, where ${1}_{n}$ is a column vector of all ones.
- $D$ is a nonnegative, doubly stochastic matrix with the condition 1. Based on the definition in [28], $1$ is spectral radius of matrix $D$, with the rest of eigenvalues being positive.
- The average consensus is achievable based on initial conditions of all agents, if the graph is strongly connected. The consensus state is calculated by $\underset{k\to \infty}{\mathrm{lim}}{x}_{i}\left(k\right)=\frac{1}{n}{{\displaystyle \sum}}_{i=1}^{n}{x}_{i}\left(0\right)$ and ${x}_{i}\left(0\right)$ denotes initial condition for agent $i$ $\left(i=1,2,\dots ,n\right)$.

## 4. HVAC-Based DSM Problem Formulation

## 5. Distributed Algorithm for DSM

#### 5.1. Under Fixed Topology

**Remark**

**1.**

**Theorem**

**1.**

**Proof of Theorem**

**1.**

#### 5.2. Under Time-Varying Topology

**Theorem**

**2.**

**Remark**

**2.**

**Lemma**

**1.**

**Proof of Theorem**

**2.**

#### 5.3. Algorithm Implementation

## 6. Simulation Results

#### 6.1. Case Study 1: Without HVAC Power Constraints

#### 6.2. Case Study 2: With HVAC Power Constraints

#### 6.3. Case Study 3: Time-Varying Power Generation

#### 6.4. Case Study 4: Anti-Damage Test

#### 6.5. Case Study 5: Under the Time-Varying Topology

## 7. Conclusions

- i
- The aggregated HVAC devices effectively solve the supply-demand imbalance in the microgrid system whilst alternatively alleviate the capacity and quantity of energy storage devices.
- ii
- An advanced consensus algorithm has been developed for the time-varying topology with more relaxed graphic conditions than the consensus condition under the fixed topology.
- iii
- The relationship between the state feedback gain and convergence time is investigated in order to obtain an optimal feedback gain to be applied in the case studies.
- iv
- The simulation results demonstrate the feasibility, dynamic and robustness of the proposed distributed control algorithms.

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## Abbreviations

MAS | Multi-agent system |

HVAC | Heating ventilation air conditioning |

DSM | Demand side management |

TCL | Thermostatically controlled load |

BESS | Battery energy storage system |

DG | Distributed generator |

PFC | Power factor control |

IPM | Intelligent power module |

PWM | Pulse width modulation |

COP | Coefficient of Performance |

## References

- Hug, G.; Kar, S.; Wu, C. Consensus + Innovations Approach for Distributed Multiagent Coordination in a Microgrid. IEEE Trans. Smart Grid
**2015**, 6, 1893–1903. [Google Scholar] [CrossRef] - Palensky, P.; Dietrich, D. Demand Side Management: Demand Response, Intelligent Energy Systems, and Smart Loads. IEEE Trans. Ind. Inform.
**2011**, 7, 381–388. [Google Scholar] [CrossRef] - Guerrero, J.; Castilla, M.; Vasquez, J.C.; Miret, J.; De Vicuna, L.G. Hierarchical Control of Intelligent Microgrids. IEEE Ind. Electron. Mag.
**2010**, 4, 23–29. [Google Scholar] - Deng, R.; Yang, Z.; Chow, M.-Y.; Chen, J. A Survey on Demand Response in Smart Grids: Mathematical Models and Approaches. IEEE Trans. Ind. Inform.
**2015**, 11, 570–582. [Google Scholar] [CrossRef] - He, M.-F.; Zhang, F.-X.; Huang, Y.; Chen, J.; Wang, J.; Wang, R. A Distributed Demand Side Energy Management Algorithm for Smart Grid. Energies
**2019**, 12, 426. [Google Scholar] [CrossRef] - Nikmehr, N.; Najafi-ravadanegh, S.; Khodaei, A. Probabilistic optimal scheduling of networked microgrids considering time-based demand response programs under uncertainty Time of Use. Appl. Energy
**2017**, 198, 267–279. [Google Scholar] [CrossRef] - Castillo-Cagigal, M.; Matallanas, E.; Caamaño-Martín, E.; Martín, Á.G. SwarmGrid: Demand-Side Management with Distributed Energy Resources Based on Multifrequency Agent Coordination. Energies
**2018**, 11, 2476. [Google Scholar] [CrossRef] - Heydari, R.; Khayat, Y.; Naderi, M.; Anvari-Moghaddam, A.; Dragicevic, T.; Blaabjerg, F. A Decentralized Adaptive Control Method for Frequency Regulation and Power Sharing in Autonomous Microgrids. In Proceedings of the IEEE 28th International Symposium on Industrial Electronics (ISIE), Vancouver, BC, Canada, 12–14 June 2019; pp. 2427–2432. [Google Scholar]
- Anvari-Moghadam, A.; Shafiee, Q.; Vasquez, J.C.; Guerrero, J.M.; Anvari-Moghaddan, A. Optimal adaptive droop control for effective load sharing in AC microgrids. In Proceedings of the IECON 2016-42nd Annual Conference of the IEEE Industrial Electronics Society, Florence, Italy, 24–27 October 2016; pp. 3872–3877. [Google Scholar]
- Vahedipour-Dahraie, M.; Najafi, H.R.; Anvari-Moghaddam, A.; Guerrero, J.M. Optimal scheduling of distributed energy resources and responsive loads in islanded microgrids considering voltage and frequency security constraints. J. Renew. Sustain. Energy
**2018**, 10, 025903. [Google Scholar] [CrossRef] [Green Version] - Zhang, W.; Lian, J.; Chang, C.-Y.; Kalsi, K. Aggregated Modeling and Control of Air Conditioning Loads for Demand Response. IEEE Trans. Power Syst.
**2013**, 28, 4655–4664. [Google Scholar] [CrossRef] - Hlava, J.; Zemtsov, N. Aggregated control of electrical heaters for ancillary services provision. In Proceedings of the 2015 19th International Conference on System Theory, Control and Computing (ICSTCC), Cheile Gradistei, Romania, 14–16 October 2015; pp. 508–513. [Google Scholar]
- Tindemans, S.H.; Trovato, V.; Strbac, G. Decentralized Control of Thermostatic Loads for Flexible Demand Response. IEEE Trans. Control Syst. Technol.
**2015**, 23, 1685–1700. [Google Scholar] [CrossRef] - Wu, X.; He, J.; Xu, Y.; Lu, J.; Lu, N.; Wang, X. Hierarchical Control of Residential HVAC Units for Primary Frequency Regulation. IEEE Trans. Smart Grid
**2018**, 9, 3844–3856. [Google Scholar] [CrossRef] - Wang, R.; Li, Q.; Zhang, B.; Wang, L. Distributed Consensus Based Algorithm for Economic Dispatch in a Microgrid. IEEE Trans. Smart Grid
**2019**, 10, 3630–3640. [Google Scholar] [CrossRef] - Yang, S.; Tan, S.; Xu, J.-X. Consensus Based Approach for Economic Dispatch Problem in a Smart Grid. IEEE Trans. Power Syst.
**2013**, 28, 4416–4426. [Google Scholar] [CrossRef] - Zhang, Z.; Chow, M.-Y. Incremental cost consensus algorithm in a smart grid environment. In Proceedings of the 2011 IEEE Power and Energy Society General Meeting, Detroit, MI, USA, 24–28 July 2011; pp. 1–6. [Google Scholar]
- Xu, Y.; Zhang, W.; Hug, G.; Kar, S.; Li, Z. Cooperative Control of Distributed Energy Storage Systems in a Microgrid. IEEE Trans. Smart Grid
**2015**, 6, 238–248. [Google Scholar] [CrossRef] - Zhao, T.; Ding, Z. Cooperative Optimal Control of Battery Energy Storage System under Wind Uncertainties in a Microgrid. IEEE Trans. Power Syst.
**2018**, 33, 2292–2300. [Google Scholar] [CrossRef] - Thomas, M.; Hredzak, B.; Agelidis, V. Distributed Cooperative Control of Microgrid Storage. IEEE Trans. Power Electron.
**2015**, 30, 2780–2789. [Google Scholar] - Rahman, M.; Oo, A. Distributed multi-agent based coordinated power management and control strategy for microgrids with distributed energy resources. Energy Convers. Manag.
**2017**, 139, 20–32. [Google Scholar] [CrossRef] - Vahedipour-Dahraie, M.; Rashidizaheh-Kermani, H.; Najafi, H.R.; Anvari-Moghaddam, A.; Guerrero, J.M. Coordination of EVs Participation for Load Frequency Control in Isolated Microgrids. Appl. Sci.
**2017**, 7, 539. [Google Scholar] [CrossRef] - Shao, S.; Shi, W.; Li, X.; Chen, H. Performance representation of variable-speed compressor for inverter air conditioners based on experimental data. Int. J. Refrig.
**2004**, 27, 805–815. [Google Scholar] [CrossRef] - Park, Y.C.; Kim, Y.C.; Min, M.-K. Performance analysis on a multi-type inverter air conditioner. Energy Convers. Manag.
**2001**, 42, 1607–1621. [Google Scholar] [CrossRef] - Ma, K.; Hu, G.; Spanos, C.J. Energy Management Considering Load Operations and Forecast Errors With Application to HVAC Systems. IEEE Trans. Smart Grid
**2018**, 9, 605–614. [Google Scholar] [CrossRef] - Ma, J.; Ma, X. A review of forecasting algorithms and energy management strategies for microgrids. Syst. Sci. Control Eng.
**2018**, 6, 237–248. [Google Scholar] [CrossRef] - Ren, W.; Beard, R.W. Distributed Consensus in Multi-Vehicle Cooperative Control; Springer: Berlin, Germany, 2008. [Google Scholar]
- Horn, R.; Johnson, C. Matrix Analysis; Cambridge University Press: Cambrige, UK, 1985. [Google Scholar]
- Cai, K.; Ishii, H. Average consensus on general strongly connected digraphs. Automatica
**2012**, 48, 2750–2761. [Google Scholar] [CrossRef] [Green Version] - Cai, K.; Ishii, H. Average Consensus on Arbitrary Strongly Connected Digraphs With Time-Varying Topologies. IEEE Trans. Autom. Control
**2014**, 59, 1066–1071. [Google Scholar] [CrossRef] [Green Version]

**Figure 2.**The schematic diagram of a typical AC inverter HVAC (heating ventilation air conditioning) system.

**Figure 3.**COP, power consumption and cooling capacity of the HVAC against the compressor operating frequency [24].

**Figure 6.**Results without power constraints: (

**a**) Frequency; (

**b**) HVAC power consumption; (

**c**) Estimated power mismatch and (

**d**) Power balance. Note that legend in (

**c**) is also valid for (

**a**,

**b**).

**Figure 7.**Results with power constraints: (

**a**) Frequency; (

**b**) HVAC power consumption; (

**c**) Estimated power mismatch and (

**d**) Power balance. Note that legend in (

**c**) is also valid for (

**a**,

**b**).

**Figure 8.**Results of time-varying power generation: (

**a**) Frequency; (

**b**) HVAC power consumption; (

**c**) Estimated power mismatch and (

**d**) Power balance. Note that legend in (

**c**) is also valid for (

**a**,

**b**).

**Figure 9.**Results of anti-damage test: (

**a**) Frequency; (

**b**) HVAC power consumption; (

**c**) Estimated power mismatch and (

**d**) Power balance. Note that legend in (

**c**) is also valid for (

**a**,

**b**).

**Figure 11.**Convergence performance of consensus algorithm under dynamic topology: (

**a**) Frequency; (

**b**) HVAC power consumption; (

**c**) Estimated power mismatch and (

**d**) Power balance. Note that legend in (

**c**) is also valid for (

**a**,

**b**).

Bus i | ${\mathit{u}}_{\mathit{i}}$ | ${\mathit{v}}_{\mathit{i}}$ | ${\overline{\mathit{P}}}_{\mathit{A}\mathit{C},\mathit{i}}\text{}\left(\mathbf{kW}\right)$ | ${\underset{\_}{\mathit{P}}}_{\mathit{A}\mathit{C},\mathit{i}}\text{}\left(\mathbf{kW}\right)$ | ${\mathit{P}}_{\mathit{G},\mathit{i}}\left(0\right)\text{}\left(\mathbf{kW}\right)$ |
---|---|---|---|---|---|

1 | 0.057 | −0.995 | 2 | 0.5 | 0.943 |

2 | 0.07 | −1.12 | 4.8 | 2 | 2.64 |

3 | 0.04 | −0.75 | 3.5 | 0.2 | 3.25 |

4 | 0.06 | −1.06 | 4 | 1.6 | 1.64 |

5 | 0.035 | −0.558 | 4.5 | 1 | 3.08 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Ma, J.; Ma, X.; Ilic, S.
HVAC-Based Cooperative Algorithms for Demand Side Management in a Microgrid. *Energies* **2019**, *12*, 4276.
https://doi.org/10.3390/en12224276

**AMA Style**

Ma J, Ma X, Ilic S.
HVAC-Based Cooperative Algorithms for Demand Side Management in a Microgrid. *Energies*. 2019; 12(22):4276.
https://doi.org/10.3390/en12224276

**Chicago/Turabian Style**

Ma, Jie, Xiandong Ma, and Suzana Ilic.
2019. "HVAC-Based Cooperative Algorithms for Demand Side Management in a Microgrid" *Energies* 12, no. 22: 4276.
https://doi.org/10.3390/en12224276