# Demand Flexibility Management for Buildings-to-Grid Integration with Uncertain Generation

^{*}

## Abstract

**:**

## 1. Introduction

#### Research Contributions

## 2. Buildings-to-Grid System Modeling

#### 2.1. Wind Integrated TSO Model Dynamics

**Remark**

**1.**

#### 2.2. DSO Model Dynamics

#### 2.3. Building and Storage Model Dynamics

#### 2.3.1. Building Thermal Comfort Model

#### 2.3.2. Electrical Energy Storage Model

**Remark**

**2.**

## 3. Ancillary Service Deployment

#### 3.1. Reserve Scheduling Formulation

#### 3.2. Building Flexibility Formulation

#### 3.3. Reserve Scheduling Together with Building Flexibility

## 4. Stochastic MPC Formulation

- TSO deterministic frequency model dynamics:$$\begin{array}{c}\hfill {x}_{t}^{f}(\ell +1|k)={f}_{t}\left(\right)open="("\; close=")">{x}_{t}^{f}(\ell |k),{P}_{\mathrm{GR}}(\ell |k),{P}_{\mathrm{LD}}(\ell |k),{P}_{w}^{f}(\ell |k).\end{array}$$
- TSO generation, ramping, line, and balance constraints:$$\begin{array}{c}\begin{array}{cc}\phantom{\rule{1.em}{0ex}}\hfill & {P}_{\mathrm{GR}}^{min}\le {P}_{\mathrm{GR}}(\ell |k)\le {P}_{\mathrm{GR}}^{max},\hfill \\ \phantom{\rule{1.em}{0ex}}\hfill & {P}_{\mathrm{GR}}^{\mathrm{down}}\le {P}_{\mathrm{GR}}(\ell +1|k)-{P}_{\mathrm{GR}}(\ell |k)\le {P}_{\mathrm{GR}}^{\mathrm{up}},\hfill \\ \phantom{\rule{1.em}{0ex}}\hfill & {L}^{\mathrm{min}}\le {\tilde{L}}^{\mathrm{TSO}}\left(\right)open="["\; close="]">{x}_{t}^{f}(\ell +1|k)\le {L}^{\mathrm{max}},\hfill \end{array}\hfill \phantom{\rule{1.em}{0ex}}& {\left(\right)}^{\Gamma}\top {\mathbf{1}}_{{n}_{t}}=0,\hfill \hfill \end{array}$$
- DSO deterministic frequency dynamics, $\forall i\in \mathcal{D}$:$$\begin{array}{cc}\hfill \phantom{\rule{1.em}{0ex}}& {x}_{d}^{f,i}(\ell +1|k)={f}_{d}^{i}\left(\right)open="("\; close=")">{x}_{d}^{f,i}(\ell |k),{P}_{\mathrm{IMP}}^{i}(\ell |k),{P}_{\mathrm{BD}}^{i}(\ell |k)\phantom{\rule{0.166667em}{0ex}}.\hfill \end{array}$$
- DSO power line and balance constraints, $\forall i\in \mathcal{D}$:$$\begin{array}{c}\hfill \begin{array}{cc}\hfill \phantom{\rule{1.em}{0ex}}& {L}^{i,\mathrm{min}}\le {\tilde{L}}^{\mathrm{DSO},\mathrm{i}}\left(\right)open="["\; close="]">{x}_{d}^{f,i}(\ell +1|k)\le {L}^{i,\mathrm{max}},\hfill \end{array}\hfill \phantom{\rule{1.em}{0ex}}& {\left(\right)}^{{P}_{\mathrm{IMP}}^{i}}\top {\mathbf{1}}_{{n}_{d}^{i}}=0,\hfill \end{array}$$
- Buildings deterministic thermal comfort dynamics:$$\begin{array}{c}\hfill {x}_{b}^{f}(\ell +1|k)={f}_{b}({x}_{b}^{f}(\ell |k),{P}_{\mathrm{hvac}}(\ell |k))\phantom{\rule{0.166667em}{0ex}}.\end{array}$$
- Buildings thermal comfort, power balance, and HVAC usage constraints:$$\begin{array}{c}\hfill \begin{array}{cc}\hfill \phantom{\rule{1.em}{0ex}}& {x}_{b}^{min}\le {x}_{b}^{f}(\ell +1|k)\le {x}_{b}^{max},\hfill \\ \hfill \phantom{\rule{1.em}{0ex}}& {\sum}_{i=1}^{{n}_{d}}{P}_{\mathrm{BD}}^{i}(\ell |k)={P}_{\mathrm{hvac}}(\ell |k)+{P}_{\mathrm{stor}}(\ell |k)+{P}_{\mathrm{misc}}(\ell |k),\hfill \\ \hfill \phantom{\rule{1.em}{0ex}}& {P}_{\mathrm{hvac}}^{min}\le {P}_{\mathrm{hvac}}(\ell |k)\le {P}_{\mathrm{hvac}}^{max},\hfill \end{array}\end{array}$$
- Buildings electrical storage unit dynamics:$$\begin{array}{c}\hfill {x}_{s}^{f}(\ell +1|k)=\mathrm{\Xi}{x}_{s}^{f}(\ell |k)+\mathrm{\Omega}\left({P}_{\mathrm{stor}}(\ell |k)\right)\phantom{\rule{0.166667em}{0ex}},\end{array}$$
- Buildings storage capacity and power usage constraints:$$\begin{array}{c}\hfill \begin{array}{cc}\hfill \phantom{\rule{1.em}{0ex}}& {x}_{s}^{min}\le {x}_{s}^{f}(\ell +1|k)\le {x}_{s}^{max},\hfill \\ \hfill \phantom{\rule{1.em}{0ex}}& {P}_{\mathrm{stor}}^{min}\le {P}_{\mathrm{stor}}(\ell |k)\le {P}_{\mathrm{stor}}^{max},\hfill \end{array}\end{array}$$
- Probabilistic constraint:$$\begin{array}{c}\hfill \begin{array}{cc}\hfill \mathbb{P}\{{\mathsf{P}}_{{w}_{k}}\in \mathcal{W}\phantom{\rule{4pt}{0ex}}|\phantom{\rule{4pt}{0ex}}\phantom{\rule{1.em}{0ex}}& {L}^{\mathrm{min}}\le {\tilde{L}}^{\mathrm{TSO}}\left(\right)open="["\; close="]">{x}_{t}(\ell +1|k)\le {L}^{\mathrm{max}},\hfill \end{array}\hfill \phantom{\rule{1.em}{0ex}}& {L}^{i,\mathrm{min}}\le {\tilde{L}}^{\mathrm{DSO},\mathrm{i}}\left(\right)open="["\; close="]">{x}_{d}^{i}(\ell +1|k)\le {L}^{i,\mathrm{max}},\hfill & \hfill \phantom{\rule{1.em}{0ex}}& {P}_{\mathrm{GR}}^{min}\le {P}_{\mathrm{GR}}(\ell |k)+R(\ell |k)\le {P}_{\mathrm{GR}}^{max},\hfill \\ \hfill \phantom{\rule{1.em}{0ex}}& {\left(\right)}^{{S}_{\mathrm{IMP}}^{i}}\top {\mathbf{1}}_{{n}_{d}^{i}}=0,\hfill \\ \hfill \phantom{\rule{1.em}{0ex}}& {\sum}_{i=1}^{{n}_{d}}{S}_{\mathrm{BD}}^{i}(\ell |k)={S}_{\mathrm{hvac}}(\ell |k)+{S}_{\mathrm{stor}}(\ell |k),\hfill \\ \hfill \phantom{\rule{1.em}{0ex}}& {P}_{\mathrm{hvac}}^{min}\le {P}_{\mathrm{hvac}}(\ell |k)+{S}_{\mathrm{hvac}}(\ell |k)\le {P}_{\mathrm{hvac}}^{max},\hfill \\ \hfill \phantom{\rule{1.em}{0ex}}& {P}_{\mathrm{stor}}^{min}\le {P}_{\mathrm{stor}}(\ell |k)+{S}_{\mathrm{stor}}(\ell |k)\le {P}_{\mathrm{stor}}^{max},\hfill \\ \hfill \phantom{\rule{1.em}{0ex}}& -a(\ell |k)\le b(\ell \left|k\right)\le c(\ell |k)\phantom{\rule{0.166667em}{0ex}},\hfill \\ \hfill \phantom{\rule{1.em}{0ex}}& \phantom{\rule{2.em}{0ex}}\phantom{\rule{1.em}{0ex}}\forall i\in \mathcal{D}\phantom{\rule{4pt}{0ex}}\mathrm{and}\phantom{\rule{4pt}{0ex}}\forall \ell \in {\mathcal{N}}_{h}\}\ge 1-\epsilon \phantom{\rule{0.166667em}{0ex}},\hfill \end{array}$$

## 5. Tractable Robust MPC Reformulation

**Lemma**

**1.**

**Proof.**

**Proposition**

**1.**

**Proof.**

## 6. Numerical Case Study

#### 6.1. Simulation Setup

#### 6.2. Simulation Results

## 7. Conclusions

- First of all, we did not consider the impact of imperfect communication between the TSO, DSOs, and buildings, and other sources of uncertainty than the wind power, such as demand uncertainty, were left out of scope. Hence, in a more sophisticated BtG integration framework, multiple sources of uncertainty should be incorporated.
- Second, the BtG framework in the current work is formulated as a centralized MPC framework. Although the current centralized implementation runs in reasonable time for hundreds of buildings, we believe that it is worth exploring decentralized control frameworks, e.g., [39], in order to reduce the computational complexity of the problem.
- Finally, part of our current work focuses on integrating the psychological impact of end-users for participating in the ancillary service market, by providing demand-side flexibility to the grid. We are interested in constructing models to simulate the willingness of end-users to participate in the ancillary service market, in order to study how different stimuli can influence the psychological behavior of consumers.

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Rostampour, V.; Ter Haar, O.; Keviczky, T. Distributed Stochastic Reserve Scheduling in AC Power Systems With Uncertain Generation. IEEE Trans. Power Syst.
**2018**, 34, 1005–1020. [Google Scholar] [CrossRef] [Green Version] - Lawrence, T.M.; Boudreau, M.C.; Helsen, L.; Henze, G.; Mohammadpour, J.; Noonan, D.; Patteeuw, D.; Pless, S.; Watson, R.T. Ten questions concerning integrating smart buildings into the smart grid. Build. Environ.
**2016**, 108, 273–283. [Google Scholar] [CrossRef] [Green Version] - U.S. Department of Energy. Buildings Energy Data Book: Buildings Technologies Program, Energy Efficiency and Renewable Energy; US Department of Energy: Washington, DC, USA, 2011.
- Roossien, B. Mathematical Quantification of Near Real-Time Flexibility for Smart Grids; Energy Research Centre (NL): Sint Maartensvlotbrug, The Netherlands, 2011; pp. 1–34. Available online: http://www.flexines.org/publicaties/eindrapport/BIJLAGE14a.pdf (accessed on 9 December 2020).
- Pavlak, G.S.; Henze, G.P.; Cushing, V.J. Optimizing commercial building participation in energy and ancillary service markets. Energy Build.
**2014**, 81, 115–126. [Google Scholar] [CrossRef] - Liu, Y.; Yu, N.; Wang, W.; Guan, X.; Xu, Z.; Dong, B.; Liu, T. Coordinating the operations of smart buildings in smart grids. Appl. Energy
**2018**, 228, 2510–2525. [Google Scholar] [CrossRef] [Green Version] - Eurelectric. Active Distribution System Management a Key Tool for the Smooth Integration—Findings and Recommendations. Technical Report. 2013. Available online: https://www.eurelectric.org/media/1781/asm_full_report_discussion_paper_final-2013-030-0117-01-e.pdf (accessed on 9 December 2020).
- Andersson, G. Modelling and Analysis of Electric Power Systems; EEH—Power Systems Laboratory, ETH Zurich: Zürich, Switzerland, 2008; pp. 1–183. Available online: https://www.yumpu.com/en/document/read/4227429/modelling-and-analysis-of-electric-power-systems-eeh-eth-zurich (accessed on 9 December 2020).
- ENTSO-E. Towards Smarter Grids: Developing TSO and DSO Roles and Interactions for the Benefit of Consumers. 2015, pp. 1–8. Available online: https://eepublicdownloads.entsoe.eu/clean-documents/Publications/Position%20papers%20and%20reports/150303_ENTSO-E_Position_Paper_TSO-DSO_interaction.pdf (accessed on 9 December 2020).
- Bahmanyar, A.; Estebsari, A.; Ernst, D. The impact of different COVID-19 containment measures on electricity consumption in Europe. Energy Res. Soc. Sci.
**2020**, 68, 101683. [Google Scholar] [CrossRef] [PubMed] - NG ESO. Optional Downward Flexibility Management (ODFM) Service Documents; National Grid ESO: Warwick, UK, 2020; Available online: https://www.lexology.com/library/detail.aspx?g=cc311166-d06d-43e2-8ac8-474a8f8b5278 (accessed on 9 December 2020).
- Commission Regulation (EU). Establishing a Network Code on Requirements for Grid Connection of Generators. Off. J. Eur. Union
**2016**. Available online: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=OJ%3AJOL_2016_112_R_0001 (accessed on 9 December 2020). - Bruendlinger, R. Review and Assessment of Latest Grid Code Developments in Europe and Selected International Markets with Respect to High Penetration PV. In Proceedings of the 6th Solar Integration Workshop, Vienna, Austria, 14–17 November 2016. [Google Scholar]
- Short, J.; Infield, D.; Freris, L. Stabilization of Grid Frequency Through Dynamic Demand Control. IEEE Trans. Power Syst.
**2007**, 22, 1284–1293. [Google Scholar] [CrossRef] [Green Version] - Blum, D.H. Improving the Use of Commercial Building HVAC Systems for Electric Grid Ancillary Services. Ph.D. Thesis, Massachusetts Institute of Technology, Cambridge, MA, USA, 2016. [Google Scholar]
- Lin, Y.; Barooah, P.; Mathieu, J.L. Ancillary Services Through Demand Scheduling and Control of Commercial Buildings. IEEE Trans. Power Syst.
**2017**, 32, 186–197. [Google Scholar] [CrossRef] - Taha, A.F.; Gatsis, N.; Dong, B.; Pipri, A.; Li, Z. Buildings-to-Grid Integration Framework. IEEE Trans. Smart Grid
**2017**, 10, 1237–1249. [Google Scholar] [CrossRef] [Green Version] - Dong, B.; Taha, A.F.; Gatsis, N.; Li, Z.; Pipri, A. Impact of Occupancy-Based Buildings-to-Grid Integration on Frequency Regulation in Smart Grids. Proc. Am. Control Conf.
**2018**, 5399–5405. [Google Scholar] [CrossRef] - Anwar, M.B.; Cabrera, C.A.; Neu, O.; O’Malley, M.; Burke, D.J. An integrated Building-to-Grid model for evaluation of energy arbitrage value of Thermal Storage. In Proceedings of the 2016 International Conference for Students on Applied Engineering, ICSAE 2016, Newcastle Upon Tyne, UK, 20–21 October 2016; pp. 64–69. [Google Scholar]
- Razmara, M.; Bharati, G.R.; Hanover, D.; Shahbakhti, M.; Paudyal, S.; Robinett, R.D. Enabling Demand Response programs via Predictive Control of Building-to-Grid systems integrated with PV Panels and Energy Storage Systems. Proc. Am. Control Conf.
**2017**, 56–61. [Google Scholar] [CrossRef] - Badings, T.S.; Rostampour, V.; Scherpen, J.M. Distributed Building Energy Storage Units for Frequency Control Service in Power Systems. IFAC Control Smart Grid Renew. Energy Syst. (CSGRES)
**2019**, 52, 228–233. [Google Scholar] [CrossRef] - Rostampour, V.; Badings, T.S.; Scherpen, J.M.A. Buildings-to-Grid Integration with High Wind Power Penetration. In Proceedings of the 2019 IEEE 58th Conference on Decision and Control (CDC), Nice, France, 11–13 December 2019. [Google Scholar] [CrossRef]
- Trip, S.; Burger, M.; De Persis, C. An internal model approach to frequency regulation in inverter-based microgrids with time-varying voltages. In Proceedings of the IEEE Conference on Decision and Control, Los Angeles, CA, USA, 15–17 December 2014; pp. 223–228. [Google Scholar]
- Conejo, A.J.; Baringo, L. Power System Operations; Springer: Cham, Switzerland, 2018. [Google Scholar]
- Badings, T.S. Buildings-to-Grid Integration for Demand-Side Flexibility in Power Systems with Uncertain Generation. Master’s Thesis, University of Groningen, Groningen, The Netherlands, 2019. [Google Scholar]
- Dong, B. Integrated Building Heating, Cooling and Ventilation Control. Tesis
**2010**, 1–174. [Google Scholar] [CrossRef] - Razmara, M.; Bharati, G.R.; Shahbakhti, M.; Paudyal, S.; Robinett, R.D. Bilevel optimization framework for smart building-to-grid systems. IEEE Trans. Smart Grid
**2018**, 9, 582–593. [Google Scholar] [CrossRef] - Danza, L.; Belussi, L.; Meroni, I.; Salamone, F.; Floreani, F.; Piccinini, A.; Dabusti, A. A Simplified Thermal Model to Control the Energy Fluxes and to Improve the Performance of Buildings. Energy Procedia
**2016**, 101, 97–104. [Google Scholar] [CrossRef] - Sincovec, R.F.; Erisman, A.M.; Yip, E.L.; Epton, M.A. Analysis of Descriptor Systems Using Numerical Algorithms. IEEE Trans. Autom. Control
**1981**, 26, 139–147. [Google Scholar] [CrossRef] - Papaefthymiou, G.; Klockl, B. MCMC for wind power simulation. IEEE Trans. Energy Convers.
**2008**, 23, 234–240. [Google Scholar] [CrossRef] [Green Version] - Rostampour, V.; Keviczky, T. Probabilistic Energy Management for Building Climate Comfort in Smart Thermal Grids with Seasonal Storage Systems. IEEE Trans. Smart Grid
**2018**, 10, 3687–3697. [Google Scholar] [CrossRef] - Hong, L.J.; Huang, Z.; Lam, H. Learning-based Robust Optimization: Procedures and Statistical Guarantees. arXiv
**2017**, arXiv:1704.04342. [Google Scholar] - Calafiore, G.C.; Campi, M.C. The scenario approach to robust control design. IEEE Trans. Autom. Control
**2006**, 51, 742–753. [Google Scholar] [CrossRef] - Rostampour, V.; Keviczky, T. Robust randomized model predictive control for energy balance in smart thermal grids. In Proceedings of the European Control Conference (ECC), Aalborg, Denmark, 29 June–1 July 2016; pp. 1201–1208. [Google Scholar]
- Tesla. Website Support—Tesla Model S Specifications. 2018. Available online: https://www.tesla.com/models (accessed on 9 December 2020).
- Löfberg, J. YALMIP: A toolbox for modeling and optimization in MATLAB. In Proceedings of the International Symposium on Computer Aided Control Systems Design, Taipei, Taiwan, 2–4 September 2004; pp. 284–289. [Google Scholar]
- Gurobi Optimization. Gurobi Optimizer Reference Manual. 2019. Available online: https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/9.0/refman.pdf (accessed on 9 December 2020).
- Zimmerman, R.D.; Murillo-Sánchez, C.E.; Thomas, R.J. MATPOWER: Steady-state operations, planning, and analysis tools for power systems research and education. IEEE Trans. Power Syst.
**2011**, 26, 12–19. [Google Scholar] [CrossRef] [Green Version] - Patel, N.R.; Risbeck, M.J.; Rawlings, J.B.; Wenzel, M.J.; Turney, R.D. Distributed economic model predictive control for large-scale building temperature regulation. Proc. Am. Control Conf.
**2016**, 895–900. [Google Scholar] [CrossRef]

**Figure 3.**Network topology of the MPC problem, indicating the grid structure, generators (GR) buildings (BLD) and wind farm (WF).

**Figure 4.**Power balance in the TSO network, showing the wind-power forecast (lower solid line), actual wind power (purple bars), and reserve and flexibility deployment in bright red and yellow, respectively. Other colored bars represent production by conventional generators.

**Figure 6.**Wind-power error for Case 3, and distribution of reserve and flexibility dispatch. Flexibility dispatch comprises 44.37% of all wind-power error compensation.

**Figure 7.**Case 3—Actual reserve (per generator) and flexibility (per building cluster connected to the same DSO) dispatch per hour compared to the reserve and flexibility scheduled.

**Figure 8.**Monte Carlo empirical violation levels (note the double break in the Y-axis and the limited time span of the plot).

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2020 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**

Rostampour, V.; Badings, T.S.; Scherpen, J.M.A.
Demand Flexibility Management for Buildings-to-Grid Integration with Uncertain Generation. *Energies* **2020**, *13*, 6532.
https://doi.org/10.3390/en13246532

**AMA Style**

Rostampour V, Badings TS, Scherpen JMA.
Demand Flexibility Management for Buildings-to-Grid Integration with Uncertain Generation. *Energies*. 2020; 13(24):6532.
https://doi.org/10.3390/en13246532

**Chicago/Turabian Style**

Rostampour, Vahab, Thom S. Badings, and Jacquelien M. A. Scherpen.
2020. "Demand Flexibility Management for Buildings-to-Grid Integration with Uncertain Generation" *Energies* 13, no. 24: 6532.
https://doi.org/10.3390/en13246532