# Energy Flexibility Management Based on Predictive Dispatch Model of Domestic Energy Management System

^{1}

^{2}

^{3}

^{4}

^{5}

^{*}

## Abstract

**:**

## 1. Introduction

#### 1.1. Aims and Motivation

#### 1.2. Literature Review

#### 1.3. Contributions

## 2. Interval-Stochastic Method

#### 2.1. Data

#### 2.2. Interval Model

#### 2.3. Stochastic Model

## 3. Domestic Energy Management Problem

#### 3.1. Day-Ahead Stage

#### Energy Storage Systems

#### 3.2. Real-Time Stage

#### 3.2.1. PV System

#### 3.2.2. Energy Storage Systems

#### 3.3. Electrical Loads

#### 3.3.1. Space Heater

#### 3.3.2. Storage Water Heater

#### 3.3.3. Pool Pump

#### 3.3.4. Must-Run Services

## 4. Simulation Results

#### 4.1. Case Study

#### 4.2. Impact of Energy Flexibility

#### 4.3. Impact of Prediction Accuracy

#### 4.4. Impact of Demand Response

#### 4.5. Impact of Uncertainty Modeling

## 5. Conclusions

- Increasing the energy flexibility increases the total, day-ahead and real-time expected profits of the system.
- The EV can provide more energy flexibility than the battery in the proposed system.
- The increment of $\alpha $ increases the PV power produced in the day-ahead stage and day-ahead expected profit. However, $\alpha $ has a negative impact on the amounts of the real-time expected profit.
- The increment of the prediction accuracy has a smooth negative impact on the expected profit.
- For the considered case study, the demand response program has a positive effect on the amount of the DEMS’s total expected profit. Furthermore, the demand response program decreases the domestic electrical energy load.
- The amount of the total expected profit in the worst case of InterStoch is less than its amount in the worst case of the MSPB method. Hence, the InterStoch method is more robust than the MSPB method to model uncertainty in the proposed domestic energy management problem.

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## Nomenclature

Indices | |

t | Index of time periods |

j | Index of electrical loads |

k | Index of energy storage systems |

$\omega $ | Index of PV power scenarios |

Variables | |

$EP$ | Expected profit |

$E{P}^{da}$ | Day-ahead expected profit |

$E{P}^{rt}$ | Real-time expected profit |

${P}_{p{v}_{t}}^{da}$ | Day-ahead total power generation for the PV system in period t |

${P}_{pv,ou{t}_{t}}^{da}$ | Day-ahead power generation for the PV system that is injected to the power grid in period t |

${P}_{pv,i{n}_{t}}^{da}$ | Day-ahead power generation for the PV system that is injected to the home in period t |

${P}_{di{s}_{t}}^{da}(k)$ | Day-ahead total discharged power for energy storage system k in period t |

${P}_{dis,ou{t}_{t}}^{da}(k)$ | Day-ahead discharged power for energy storage system k that is injected to the power grid in period t |

${P}_{dis,i{n}_{t}}^{da}(k)$ | Day-ahead discharged power for energy storage system k that is injected to the home in period t |

${P}_{c{h}_{t}}^{da}(k)$ | Day-ahead charged power for energy storage system k that is injected to the home in period t |

${P}_{ne{t}_{t}}^{da}$ | Day-ahead power generation that is bought from the local electricity market in period t |

${L}_{{j}_{t}}^{da}$ | Day-ahead electrical load j in period t |

${L}_{s{h}_{t}}^{da}$ | Day-ahead electrical load of the space heater in period t |

${L}_{sw{h}_{t}}^{da}$ | Day-ahead electrical load of the storage water heater in period t |

${L}_{p{p}_{t}}^{da}$ | Day-ahead electrical load of the pool pump in period t |

${L}_{mr{s}_{t}}^{da}$ | Day-ahead electrical load of the must-run services in period t |

${C}_{t}^{da}(k)$ | Day-ahead state of charge for energy storage system k in period t |

${u}_{t}^{da}$ | Day-ahead discharging commitment binary variable for energy storage system k in period t |

${P}_{p{v}_{t}}^{rt}(\omega )$ | Real-time total power generation for the PV system in period t and in scenario $\omega $ |

${P}_{pv,ou{t}_{t}}^{rt}(\omega )$ | Real-time power generation for the PV system that is injected to the power grid in period t and in scenario $\omega $ |

${P}_{pv,i{n}_{t}}^{rt}(\omega )$ | Real-time power generation for the PV system that is injected to the home in period t and in scenario $\omega $ |

${P}_{di{s}_{t}}^{rt}(k,\omega )$ | Real-time total discharged power for energy storage system k in period t and in scenario $\omega $ |

${P}_{dis,ou{t}_{t}}^{rt}(k,\omega )$ | Real-time discharged power for energy storage system k that is injected to the power grid in period t and in scenario $\omega $ |

${P}_{dis,i{n}_{t}}^{rt}(k,\omega )$ | Real-time discharged power for energy storage system k that is injected to the home in period t and in scenario $\omega $ |

${P}_{c{h}_{t}}^{rt}(k,\omega )$ | Real-time charged power for energy storage system k that is injected to the home in period t and in scenario $\omega $ |

${P}_{ne{t}_{t}}^{rt}(\omega )$ | Real-time power generation that is bought from local electricity market in period t and in scenario $\omega $ |

${L}_{{j}_{t}}^{rt}$ | Real-time electrical load j in period t and in scenario $\omega $ |

${L}_{{j}_{t}}^{shed}(\omega )$ | Load shedding for load j in period t and in scenario $\omega $ |

${S}_{p{v}_{t}}(\omega )$ | Spillage amount for PV in period t and in scenario $\omega $ |

${P}_{pv,{p}_{t}}^{rt}(\omega )$ | Potential power generation for PV in real time in period t and in scenario $\omega $ |

${L}_{s{h}_{t}}^{rt}(\omega )$ | Real-time electrical load of the space heater in period t and in scenario $\omega $ |

${L}_{sw{h}_{t}}^{rt}(\omega )$ | Real-time electrical load of the storage water heater in period t and in scenario $\omega $ |

${L}_{p{p}_{t}}^{rt}(\omega )$ | Real-time electrical load of the pool pump in period t and in scenario $\omega $ |

${L}_{mr{s}_{t}}^{rt}(\omega )$ | Real-time electrical load of the must-run services in period t and in scenario $\omega $ |

${C}_{t}^{rt}(k,\omega )$ | Real-time state of charge for energy storage system k in period t and in scenario $\omega $ |

${u}_{t}^{rt}(\omega )$ | Real-time discharging commitment binary variable for energy storage system k in period t and in scenario $\omega $ |

${L}_{s{h}_{t}}^{shed}(\omega )$ | Load shedding for the space heater in period t and in scenario $\omega $ |

${L}_{sw{h}_{t}}^{shed}(\omega )$ | Load shedding for the storage water heater in period t and in scenario $\omega $ |

${L}_{p{p}_{t}}^{shed}(\omega )$ | Load shedding for the pool pump in period t and in scenario $\omega $ |

${L}_{mr{s}_{t}}^{shed}(\omega )$ | Load shedding for the must-run services in period t and in scenario $\omega $ |

${\theta}_{i{n}_{t}}(\omega )$ | Indoor temperature in period t and in scenario $\omega $ |

${z}_{t}(\omega )$ | Commitment binary variable for the pool pump k in period t and in scenario $\omega $ |

Parameters | |

${P}_{p{v}_{t}}^{pred}$ | Central forecasting of the PV power generation in period t |

${\sigma}_{p{v}_{t}}^{down}$ | Down deviation of the PV power prediction in period t |

${\sigma}_{p{v}_{t}}^{up}$ | Up deviation of the PV power prediction in period t |

${\alpha}_{pv}$ | Optimistic coefficient related to the PV power prediction |

${P}_{p{v}_{t}}^{mean}$ | Mean of the PV power prediction in period t |

${\Delta}_{p{v}_{t}}$ | Mean deviation of the PV power prediction in period t |

$\pi (\omega )$ | Probability of the PV power generation in scenario $\omega $ |

${\lambda}_{t}^{{}^{\prime}}$ | Sold electricity price to the local electricity market in period t |

${\lambda}_{ne{t}_{t}}$ | Bought electricity price from the local electricity market in period t |

${\gamma}_{k}$ | Participation factor for energy storage system k |

${S}_{max}$ | Maximum power capacity for the line |

${L}_{{j}_{t}}^{pred}$ | Predicted electrical load j in period t |

${\eta}_{B2V}$ | Charging efficiency for energy storage systems j |

${\eta}_{V2B}$ | Discharging efficiency for energy storage systems j |

${C}_{i}$ | Initial state of charge for energy storage systems |

${w}^{max}$ | Maximum charging/discharging for energy storage systems |

${w}^{min}$ | Minimum charging/discharging for energy storage systems |

$VOL{L}_{j}$ | Value of loss load for electrical load j |

${V}_{pv}^{s}$ | Spillage cost for the PV system |

${\theta}_{0}$ | Initial indoor temperature |

${\theta}_{des}$ | Desired indoor temperature |

${\theta}_{ou{t}_{t}}^{pred}$ | Predicted outdoor temperature |

${L}_{sh}^{max}$ | Maximum electrical consumption for the space heater |

${L}_{sh}^{min}$ | Minimum electrical consumption for the space heater |

R | Thermal resistance of the building shell |

${L}_{swh}^{max}$ | Maximum electrical consumption for the storage water heater |

${L}_{swh}^{min}$ | Minimum electrical consumption for the storage water heater |

${U}_{swh}$ | Energy consumption for the storage water heater |

${L}_{pp}^{max}$ | Maximum electrical consumption for the pool pump |

${L}_{pp}^{min}$ | Minimum electrical consumption for the pool pump |

${T}_{on}$ | Maximum running hours for the pool pump |

${L}_{mr{s}_{t}}^{pred}$ | Predicted electrical load of the must-run services in period t |

## References

- Abrishambaf, O.; Gomes, L.; Faria, P.; Afonso, J.L.; Vale, Z. Real-time simulation of renewable energy transactions in microgrid context using real hardware resources. In Proceedings of the 2016 IEEE/PES Transmission and Distribution Conference and Exposition (T&D), Dallas, TX, USA, 3–5 May 2016; pp. 1–5. [Google Scholar]
- Vale, Z.; Morais, H.; Faria, P.; Ramos, C. Distribution system operation supported by contextual energy resource management based on intelligent SCADA. Renew. Energy
**2013**, 52, 143–153. [Google Scholar] [CrossRef] - Abrishambaf, O.; Ghazvini, M.A.F.; Gomes, L.; Faria, P.; Vale, Z.; Corchado, J.M. Application of a Home Energy Management System for Incentive-Based Demand Response Program Implementation. In Proceedings of the 2016 27th International Workshop on Database and Expert Systems Applications (DEXA), Porto, Portugal, 5–8 September 2016; pp. 153–157. [Google Scholar]
- Manic, M.; Wijayasekara, D.; Amarasinghe, K.; Rodriguez-Andina, J.J. Building Energy Management Systems The Age of Intelligent and Adaptive Buildings. IEEE Ind. Electron. Mag.
**2016**, 10, 25–39. [Google Scholar] [CrossRef] - Shokri Gazafroudi, A.; de Paz, J.F.; Prieto-Castrillo, F.; Villarrubia, G.; Talari, S.; Shafie-khah, M.; Catalão, J.P.S. A Review of Multi-agent Based Energy Management Systems. In Proceedings of the ISAmI 2017: Ambient Intelligence—Software and Applications—8th International Symposium on Ambient Intelligence (ISAmI 2017), Porto, Portugal, 21–23 June 2017; pp. 203–209. [Google Scholar]
- Monteiro, V.; Pinto, J.G.; Afonso, J.L. Operation Modes for the Electric Vehicle in Smart Grids and Smart Homes: Present and Proposed Modes. IEEE Trans. Veh. Technol.
**2016**, 65, 1007–1020. [Google Scholar] [CrossRef] [Green Version] - Zhao, C.; Dong, S.; Li, F.; Song, Y. Optimal Home Energy Management System with Mixed Types of Loads. CSEE J. Power Energy Syst.
**2015**, 1, 1–11. [Google Scholar] [CrossRef] - Pratt, A.; Krishnamurthy, D.; Ruth, M.; Wu, H.; Lunacek, M.; Vaynshenk, P. Transactive Home Energy Management Systems: The Impact of Their Proliferation on the Electric Grid. IEEE Electrif. Mag.
**2016**, 4, 8–14. [Google Scholar] [CrossRef] - Wang, Z.; Paranjape, R. Optimal Residential Demand Response for Multiple Heterogeneous Homes with Real-Time Price Prediction in a Multiagent Framework. IEEE Trans. Smart Grid
**2017**, 8, 1173–1184. [Google Scholar] [CrossRef] - Paterakis, N.G.; Erdinç, O.; Bakirtzis, A.G.; Catalão, J.P.S. Optimal Household Appliances Scheduling under Day-Ahead Pricing and Load-Shaping Demand Response Strategies. IEEE Trans. Ind. Inform.
**2015**, 11, 1509–1519. [Google Scholar] [CrossRef] - Erdinc, O.; Paterakis, N.G.; Mendes, T.D.P.; Bakirtzis, A.G.; Catalão, J.P.S. Smart Household Operation Considering Bi-Directional EV and ESS Utilization by Real-Time Pricing-Based DR. IEEE Trans. Smart Grid
**2015**, 6, 1281–1291. [Google Scholar] [CrossRef] - Sarker, M.R.; Ortega-Vazquez, M.A.; Kirschen, D.S. Optimal Coordination and Scheduling of Demand Response via Monetary Incentives. IEEE Trans. Smart Grid
**2015**, 6, 1341–1352. [Google Scholar] [CrossRef] - Althaher, S.; Mancarella, P.; Mutale, J. Automated Demand Response From Home Energy Management System Under Dynamic Pricing and Power and Comfort Constraints. IEEE Trans. Smart Grid
**2015**, 6, 1874–1883. [Google Scholar] [CrossRef] - Althaher, S.; Mancarella, P.; Mutale, J. Equivalence of Multi-Time Scale Optimization for Home Energy Management Considering User Discomfort Preference. IEEE Trans. Smart Grid
**2017**, 8, 1876–1887. [Google Scholar] - Huang, Y.; Wang, L.; Guo, W.; Kang, Q.; Wu, Q. Chance Constrained Optimization in a Home Energy Management System. IEEE Trans. Smart Grid
**2016**, PP, 1-1. [Google Scholar] [CrossRef] - Yoon, S.; Choi, Y.; Park, J.; Bahk, S. Stackelberg Game based Demand Response for At-Home Electric Vehicle Charging. IEEE Trans. Veh. Technol.
**2016**, 65, 4172–4184. [Google Scholar] [CrossRef] - Wu, X.; Hu, X.; Yi, X.; Moura, S. Stochastic Optimal Energy Management of Smart Home with PEV Energy Storage. IEEE Trans. Smart Grid
**2016**, PP, 1-1. [Google Scholar] [CrossRef] - Shokri Gazafroudi, A.; Pinto, T.; Prieto-Castrillo, F.; Prieto, J.; Corchado, J.M.; Jozi, A.; Vale, Z.; Venayagamoorthy, G.K. Organization-based Multi-Agent Structure of the Smart Home Electricity System. In Proceedings of the 2017 IEEE Congress on Evolutionary Computation (CEC), San Sebastian, Spain, 5–8 June 2017. [Google Scholar]
- Shokri Gazafroudi, A.; Prieto-Castrillo, F.; Corchado, J.M. Residential Energy Management Using a Novel Interval Optimization Method. In Proceedings of the 4th International Conference on Control, Decision and Information Technology 2017 (CoDIT 2017), Barcelona, Spain, 5–8 April 2017. [Google Scholar]
- GAMS Release 2.50. A User’s Guide. GAMS Development Corporation, 1999. Available online: http://www.gams.com (accessed on 2 August 2017).

**Figure 1.**Impact of energy flexibility on the amounts of total, day-ahead and real-time expected profits.

**Figure 2.**Impact of prediction accuracy on the total expected profit of the system. OC, Optimistic Coefficient.

**Table 1.**Predicted data of uncertain variables [18].

t | ${\mathit{P}}_{{\mathit{pv}}_{\mathit{t}}}^{\mathit{pred}}$ (kW) | ${\mathit{\sigma}}_{\mathit{pv}}^{\mathit{down}}$ (kW) | ${\mathit{\sigma}}_{\mathit{pv}}^{\mathit{up}}$ (kW) | ${\mathit{\theta}}_{{\mathit{out}}_{\mathit{t}}}^{\mathit{pred}}$ (${}^{\circ}$C) | ${\mathit{L}}_{{\mathit{mrs}}_{\mathit{t}}}^{\mathit{pred}}$ (kW) |
---|---|---|---|---|---|

1 | 0 | 0.00 | 0.00 | 5.5 | 0.005 |

2 | 0 | 0.00 | 0.00 | 5.5 | 0.005 |

3 | 0 | 0.00 | 0.00 | 5.2 | 0.005 |

4 | 0 | 0.00 | 0.00 | 5.2 | 0.005 |

5 | 0 | 0.00 | 0.00 | 4.8 | 0.005 |

6 | 0 | 0.00 | 0.00 | 5.5 | 0.005 |

7 | 0.10 | 0.01 | 0.02 | 6.5 | 0.005 |

8 | 0.20 | 0.02 | 0.04 | 7.5 | 0.005 |

9 | 0.42 | 0.03 | 0.07 | 9.8 | 0.005 |

10 | 0.76 | 0.08 | 0.26 | 10 | 0.005 |

11 | 1.1 | 0.12 | 0.23 | 11 | 0.005 |

12 | 1.32 | 0.13 | 0.26 | 12 | 0.005 |

13 | 1.91 | 0.10 | 0.19 | 12 | 0.005 |

14 | 0.85 | 0.02 | 0.04 | 12 | 0.005 |

15 | 0.29 | 0.02 | 0.04 | 11 | 0.005 |

16 | 0.31 | 0.02 | 0.03 | 10 | 0.005 |

17 | 0.06 | 0.01 | 0.01 | 9 | 0.005 |

18 | 0 | 0.00 | 0.00 | 8.5 | 0.005 |

19 | 0 | 0.00 | 0.00 | 8 | 0.005 |

20 | 0 | 0.00 | 0.00 | 7.5 | 1.218 |

21 | 0 | 0.00 | 0.00 | 7 | 0.262 |

22 | 0 | 0.00 | 0.00 | 6.5 | 0.14 |

23 | 0 | 0.00 | 0.00 | 6.2 | 0.127 |

24 | 0 | 0.00 | 0.00 | 6 | 0.005 |

Time (hour) | Price ($/MW) | |
---|---|---|

${\mathit{\lambda}}_{\mathit{i}}$ | ${\mathit{\lambda}}_{\mathit{net}}$ | |

23–7 | 2.2 | 0.0814 |

8–14 | 2.2 | 0.1408 |

15–20 | 2.2 | 0.3564 |

21–22 | 2.2 | 0.1408 |

**Table 3.**Value of Loss Load (VOLL) and spillage costs. SH, Space Heater; SWH, Storage Water Heater; PP, Pool Pump.

Time (hour) | VOLL ($/MW) | Spillage Cost ($/MW) | |||
---|---|---|---|---|---|

SH | SWH | PP | MRS | PV | |

22–7 | 1 | 1 | $-0.5$ | 2.2 | 4 |

8–21 | 1 | 1 | 0.25 | 2.2 | 4 |

**Table 4.**Impact of demand response program on the amount of expected profit of the system and sold/bought electrical energy to/from the local electricity market. DRP, Demand Response Program.

Demand Response Scenarios | $\mathit{\alpha}=1$ | ||||
---|---|---|---|---|---|

${\mathit{EP}}_{\mathit{total}}$ | ${\mathit{EP}}_{\mathit{da}}$ | ${\mathit{EP}}_{\mathit{rt}}$ | ${\mathit{E}}_{\mathit{sold}}$ | ${\mathit{E}}_{\mathit{bought}}$ | |

With DRP (Flexible VOLL + ToU) | 47.571 | 40.003 | 7.568 | 18.605 | 43.033 |

With Only Flexible VOLL | 47.775 | 42.409 | 5.365 | 14.406 | 37.995 |

With Only ToU Price | 42.071 | 40.003 | 2.068 | 15.236 | 49.432 |

Without DRP | 42.275 | 40.409 | $-0.135$ | 13.847 | 47.842 |

**Table 5.**Impact of uncertainty modeling on day-ahead, real time and total expected profits under the optimistic case. InterStoch, Interval-Stochastic; MSPB, Modified Stochastic Predicted Band.

Expected Profit ($) | InterStoch ($\mathit{\alpha}$ = 1) | MSPB ($\mathit{\alpha}$ = 1) | ||
---|---|---|---|---|

With Uncertainty | Without Uncertainty | With Uncertainty | Without Uncertainty | |

$E{P}_{total}$ | 12.798 | 10.549 | 51.707 | 51.618 |

$E{P}_{da}$ | 7.234 | 4.836 | 49.232 | 49.232 |

$E{P}_{rt}$ | 5.564 | 5.713 | 2.475 | 2.386 |

**Table 6.**Impact of uncertainty modeling on day-ahead, real time and total expected profits under the conservative case.

Expected Profit ($) | InterStoch ($\mathit{\alpha}$ = 0) | MSPB ($\mathit{\alpha}$ = 0.4) | ||
---|---|---|---|---|

With Uncertainty | Without Uncertainty | With Uncertainty | Without Uncertainty | |

$E{P}_{total}$ | 10.569 | 10.549 | 11.449 | 51.618 |

$E{P}_{da}$ | 4.836 | 4.836 | 4.836 | 49.232 |

$E{P}_{rt}$ | 5.733 | 5.713 | 6.613 | 2.386 |

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

Gazafroudi, A.S.; Prieto-Castrillo, F.; Pinto, T.; Prieto, J.; Corchado, J.M.; Bajo, J.
Energy Flexibility Management Based on Predictive Dispatch Model of Domestic Energy Management System. *Energies* **2017**, *10*, 1397.
https://doi.org/10.3390/en10091397

**AMA Style**

Gazafroudi AS, Prieto-Castrillo F, Pinto T, Prieto J, Corchado JM, Bajo J.
Energy Flexibility Management Based on Predictive Dispatch Model of Domestic Energy Management System. *Energies*. 2017; 10(9):1397.
https://doi.org/10.3390/en10091397

**Chicago/Turabian Style**

Gazafroudi, Amin Shokri, Francisco Prieto-Castrillo, Tiago Pinto, Javier Prieto, Juan Manuel Corchado, and Javier Bajo.
2017. "Energy Flexibility Management Based on Predictive Dispatch Model of Domestic Energy Management System" *Energies* 10, no. 9: 1397.
https://doi.org/10.3390/en10091397