# A Mixed Binary Linear Programming Model for Optimal Energy Management of Smart Buildings

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Literature Review

_{2}) emissions. The EU committed itself to reducing emissions by up to 25% by the present year of 2020. As a result, the spotlight on EVs on the world stage is increasing, which gives rise to works related to this technology. Thus, many studies took advantage of the large penetration of DGs ventures to reduce electricity costs, peak load demand, and CO

_{2}emissions and to optimize the scheduling of charging and discharging of EVs and BESS [1,6].

_{2}emissions. In this way, a model was proposed that involves the manager of the building in the decisions of the renewable energy use acceptability, even though the energy from non-renewable sources is cheaper. The formulation of the problem was done by linear programming (LP) with the goal of minimizing the energy cost by assigning weights to each type of source. Weights corresponding to the renewable energy, non-renewable energy, Energy from diesel Generator, energy stored from renewable grid, energy stored from non-renewable grid and Energy Discharged from Storage unit are used, properly achieved by an implemented algorithm, to support decisions related to: energy amount that it is required to buy from providers and the energy amount that it is required to withdraw from the storage unit to meet consumers’ demand. Balance constraints related to the energy system, renewable and non-renewable sources limits, minimum and maximum limits of BESS energy storage capacity, and the limit of energy supplied by a diesel generator were proposed.

- The proposed mathematical formulation was implemented using mixed binary linear programming;
- It is considered that all customers and common property installations do not have a fixed contracted power. In Portugal, currently, this approach it is not permitted by law. However, this work points to a future direction and business plan that can be followed within the scope of electricity consumption optimization in the context of buildings.

## 3. Methodology

#### 3.1. Objective Function

#### 3.2. Constraints

#### 3.2.1. Electric Vehicles Constraints

#### 3.2.2. BESS Constraints

#### 3.2.3. Load Grid Constraints

## 4. Results

#### 4.1. Case Study

- In the first scenario, or base scenario, the EVs start their charging process as soon as they are plugged in to the building and the process is stopped as soon as their SOC reaches 65% of its total capacity. Note that, in this case, the discharge process does not occur and the BESS it is not considered.
- In the second scenario, the schedule of the charging and discharging process for each of the EVs is optimized. As the first scenario, the BESS is not considered.
- The last scenario is similar to the second one, but, in this case, a BESS with a storage capacity of 50 kWh is added to the model.

#### 4.2. Base Scenario: EV Charge up to 65% of its Maximum SOC Capacity

_{SB}the power from BESS, and ${P}_{PV}$ the power from solar PV generation.

#### 4.3. Scenario 2: Scheduling of the EVs Charging and Discharging Processes

#### 4.4. Scenario 3: Scheduling of the EVs and BESS Charging and Discharging Processes

#### 4.5. Economic Analysis

#### 4.5.1. Comparison between Scenarios 1 and 2

#### 4.5.2. Comparison between Scenarios 1 and 3

## 5. Conclusions and Future Work

#### Future Work

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Joench, R.L.; Soares, J.; Lezama, F.; Ramos, S.; Gomes, A.; Vale, Z. A Short Review on Smart Building Energy Resource Optimization. In Proceedings of the 2019 IEEE PES GTD Grand International Conference and Exposition Asia (GTD Asia), Bangkok, Thailand, 19–23 March 2019; pp. 440–445. [Google Scholar]
- Jiménez, V. Eco-Economy Indicators—World Sales of Solar Cells Jump 32 Percent|EPI. Available online: http://www.earth-policy.org/indicators/index/solar_power_2004 (accessed on 12 February 2020).
- International Energy Agency 100,000 Roofs Solar Power Programme—Policies. Available online: https://www.iea.org/policies/3476-100-000-roofs-solar-power-programme (accessed on 12 February 2020).
- REN21 Renewables 2018 Global Status Report. Available online: http://www.ren21.net/gsr-2018/ (accessed on 12 February 2020).
- Santos, P.M.C. O Automóvel Híbrido Como Elemento Fornecedor-Consumidor de Electricidade. Ph.D. Thesis, Dissertação de Mestrado, Instituto Superior Técnico, Lisbon, Portugal, 2009. [Google Scholar]
- Soares, J.; Pinto, T.; Lezama, F.; Morais, H. Survey on Complex Optimization and Simulation for the New Power Systems Paradigm. Complexity
**2018**, 2018, 2340628. [Google Scholar] [CrossRef] [Green Version] - Lezama, F.; Soares, J.; Vale, Z.; Rueda, J. Optimal Scheduling of Distributed Energy Resources Considering Uncertainty of Renewables, EVs, Load Forecast and Market Prices. Smart Grid Appl.
**2018**, 1–19. Available online: http://www.gecad.isep.ipp.pt/WCCI2018-SG-COMPETITION/files/WCCI2018_Guidelines_CISG.pdf (accessed on 2 April 2020). - Enhanced Velocity Differential Evolutionary Particle Swarm Optimization for Optimal Scheduling of a Distributed Energy Resources with Uncertain Scenarios—IEEE Journals & Magazine. Available online: https://ieeexplore.ieee.org/document/8974284 (accessed on 9 March 2020).
- Haidar, N.; Attia, M.; Senouci, S.-M.; Aglzim, E.-H.; Kribeche, A.; Asus, Z.B. New consumer-dependent energy management system to reduce cost and carbon impact in smart buildings. Sustain. Cities Soc.
**2018**, 39, 740–750. [Google Scholar] [CrossRef] - Molina, D.; Hubbard, C.; Lu, C.; Turner, R.; Harley, R. Optimal EV charge-discharge schedule in smart residential buildings. In Proceedings of the IEEE Power and Energy Society Conference and Exposition in Africa: Intelligent Grid Integration of Renewable Energy Resources (PowerAfrica), Johannesburg, South Africa, 9–13 July 2012; pp. 1–8. [Google Scholar]
- Thomas, D.; Deblecker, O.; Bagheri, A.; Ioakimidis, C.S. A scheduling optimization model for minimizing the energy demand of a building using electric vehicles and a micro-turbine. In Proceedings of the 2016 IEEE International Smart Cities Conference (ISC2), Trento, Italy, 12–15 September 2016; pp. 1–6. [Google Scholar]
- Thomas, D.; Deblecker, O.; Genikomsakis, K.; Ioakimidis, C.S. Smart house operation under PV and load demand uncertainty considering EV and storage utilization. In Proceedings of the IECON 2017—43rd Annual Conference of the IEEE Industrial Electronics Society, Beijing, China, 29 October–1 November 2017; pp. 3644–3649. [Google Scholar]
- Thomas, D.; Ioakimidis, C.S.; Klonari, V.; Vallée, F.; Deblecker, O. Effect of electric vehicles’ optimal charging-discharging schedule on a building’s electricity cost demand considering low voltage network constraints. In Proceedings of the 2016 IEEE PES Innovative Smart Grid Technologies Conference Europe (ISGT-Europe), Ljubljana, Slovenia, 9–12 October 2016; pp. 1–6. [Google Scholar]
- Sabillón, A.C.F.; Franco, J.F.; Rider, M.J.; Romero, R. A MILP model for optimal charging coordination of storage devices and electric vehicles considering V2G technology. In Proceedings of the 2015 IEEE 15th International Conference on Environment and Electrical Engineering (EEEIC), Rome, Italy, 10–13 June 2015; pp. 60–65. [Google Scholar]
- Deepak Mistry, R.; Eluyemi, F.T.; Masaud, T.M. Impact of aggregated EVs charging station on the optimal scheduling of battery storage system in islanded microgrid. In Proceedings of the 2017 North American Power Symposium (NAPS), Morgantown, WV, USA, 17–19 September 2017; pp. 1–5. [Google Scholar]
- Balasubramaniam, K.; Saraf, P.; Hazra, P.; Hadidi, R.; Makram, E. A MILP formulation for utility scale optimal demand side response. In Proceedings of the 2016 IEEE Power and Energy Society General Meeting (PESGM), Boston, MA, USA, 17–21 July 2016; pp. 1–5. [Google Scholar]
- Chandra Mouli, G.R.; Kefayati, M.; Baldick, R.; Bauer, P. Integrated PV Charging of EV Fleet Based on Energy Prices, V2G, and Offer of Reserves. IEEE Trans. Smart Grid
**2019**, 10, 1313–1325. [Google Scholar] [CrossRef] - Van der Meer, D.; Chandra Mouli, G.R.; Morales-España Mouli, G.; Elizondo, L.R.; Bauer, P. Energy Management System with PV Power Forecast to Optimally Charge EVs at the Workplace. IEEE Trans. Ind. Inform.
**2018**, 14, 311–320. [Google Scholar] [CrossRef] [Green Version] - Erdinc, O.; Paterakis, N.G.; Mendes, T.D.P.; Bakirtzis, A.G.; Catalão, J. 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] - Calvillo, C.F.; Czechowski, K.; Söder, L.; Sanchez-Miralles, A.; Villar, J. Vehicle-to-grid profitability considering EV battery degradation. In Proceedings of the 2016 IEEE PES Asia-Pacific Power and Energy Engineering Conference (APPEEC), Xi’an, China, 25–28 October 2016; pp. 310–314. [Google Scholar]
- BMW i3: Tecnical Data Visão Geral. Available online: https://www.bmw.pt/pt/all-models/bmw-i/i3/2017/visao-geral.html (accessed on 12 February 2020).
- Battery Storage Power Station. Available online: https://www.enfsolar.com/pv/storage-system-datasheet/4062 (accessed on 30 March 2020).
- Su Eletricidade. Available online: https://sueletricidade.pt/pt-pt/home (accessed on 12 February 2020).

**Figure 3.**Amount of grid and PV system power needed to feed the building load and the EVs charging in the base scenario.

**Figure 4.**Specification of each type of source that feeds the building and the EVs charging process in scenario 2.

**Figure 6.**Specification of each type of source that feeds the building and the EVs charging process in scenario 3.

Indices | |

$i$ | Index of time periods |

$j$ | Index of EVs |

Parameters | |

$\tau $ | The length of interval in each period $i$ |

${P}_{g}^{i}$ | Active power extracted from the grid in period $i$ (kW) |

${c}^{i}$ | Penalty factor based on the available PV versus the consumption in period $i$ |

${P}_{sb}^{i}$ | Active power related to the smart building load expected in period $i$ (kW) |

${P}_{pv}^{i}$ | Active power related to the photovoltaic generation foreseen in period $i$ (kW) |

${P}_{ch\_evj}$ | Active power related to the charging process of the EV $j$ (kW) |

${P}_{dis\_evj}$ | Active power related to the discharging process of the EV $j$ (kW) |

${\sigma}_{j}^{i}$ | Binary parameter based on the forecasted EVs’ trips, which represents the connection of the EV $j$ in period $i$ |

${P}_{ch\_B}$ | Active power related to the charging process of the BESS (kW) |

${P}_{dis\_B}$ | Active power related to the discharging process of BESS (kW) |

$SO{C}_{j}^{max}$ | Maximum SOC that EV $j$ can assume in period $i$ |

$SO{C}_{j}^{min}$ | Minimum SOC that EV $j$ can assume in period $i$ |

$SO{C}_{j}^{min\_final}$ | Minimum SOC that EV $j$ can assume at the end of the period |

$SO{C}_{B}^{max}$ | Maximum SOC that BESS can assume in period $i$ |

$SO{C}_{B}^{min}$ | Minimum SOC that BESS can assume in period $i$ |

${P}_{g}^{max}$ | Maximum power that the grid can feed to the building (kW) |

Variables | |

${\alpha}_{j}^{i}$ | Binary variable that represents the EV $j$ charging process in period $i$ |

${\beta}_{j}^{i}$ | Binary variable that represents the EV $j$ discharging process in period $i$ |

${\alpha}_{B}^{i}$ | Binary variable that represents the BESS charging process in period $i$ |

${\beta}_{B}^{i}$ | Binary variable that represents the BESS discharging process in period $i$ |

$SO{C}_{j}^{i}$ | SOC of the EV $j$ at the start of period $i$ |

$SO{C}_{B}^{i}$ | SOC of the BESS at the start of period $i$ |

Type of Batteries | Storage Capacity (kWh) | Charge Power (kW) | Discharge Power (kW) |
---|---|---|---|

BMW i3 94 Ah | 27.2 | 3.7 | 3.33 |

BESS-1000L | 50 | 6.3 | 5.67 |

$\mathit{S}\mathit{O}{\mathit{C}}_{\mathbf{1}}^{\mathbf{0}}$ | $\mathit{S}\mathit{O}{\mathit{C}}_{\mathbf{2}}^{\mathbf{0}}$ | $\mathit{S}\mathit{O}{\mathit{C}}_{\mathbf{3}}^{\mathbf{0}}$ | $\mathit{S}\mathit{O}{\mathit{C}}_{\mathbf{4}}^{\mathbf{0}}$ | $\mathit{S}\mathit{O}{\mathit{C}}_{\mathbf{5}}^{\mathbf{0}}$ |

$38{\%\mathrm{SOC}}_{1}^{max}$ | $40{\%\mathrm{SOC}}_{1}^{max}$ | $37{\%\mathrm{SOC}}_{1}^{max}$ | $70{\%\mathrm{SOC}}_{1}^{max}$ | $40{\%\mathrm{SOC}}_{1}^{max}$ |

$\mathit{S}\mathit{O}{\mathit{C}}_{\mathbf{6}}^{\mathbf{0}}$ | $\mathit{S}\mathit{O}{\mathit{C}}_{\mathbf{7}}^{\mathbf{0}}$ | $\mathit{S}\mathit{O}{\mathit{C}}_{\mathbf{8}}^{\mathbf{0}}$ | $\mathit{S}\mathit{O}{\mathit{C}}_{\mathbf{9}}^{\mathbf{0}}$ | $\mathit{S}\mathit{O}{\mathit{C}}_{\mathbf{10}}^{\mathbf{0}}$ |

$47{\%\mathrm{SOC}}_{1}^{max}$ | $80{\%\mathrm{SOC}}_{1}^{max}$ | $37{\%\mathrm{SOC}}_{1}^{max}$ | $40{\%\mathrm{SOC}}_{1}^{max}$ | $43{\%\mathrm{SOC}}_{1}^{max}$ |

$\mathit{S}\mathit{O}{\mathit{C}}_{\mathbf{11}}^{\mathbf{0}}$ | $\mathit{S}\mathit{O}{\mathit{C}}_{\mathbf{12}}^{\mathbf{0}}$ | $\mathit{S}\mathit{O}{\mathit{C}}_{\mathit{B}}^{\mathbf{0}}$ | $\mathit{S}\mathit{O}{\mathit{C}}_{\mathit{B}}^{\mathit{m}\mathit{a}\mathit{x}}$ | ${\mathit{P}}_{\mathit{g}}^{\mathit{m}\mathit{a}\mathit{x}}$ |

$78{\%\mathrm{SOC}}_{1}^{max}$ | $56{\%\mathrm{SOC}}_{1}^{max}$ | $80{\%\mathrm{SOC}}_{B}^{max}$ | $100\%\mathrm{Capacity}$ | $70$ |

Scenario | 14:00–15:00 | 15:00–16:00 | 16:00–17:00 | 17:00–18:00 | 18:00–19:00 | 17:00–18:00 (Peak) | Obj. Fun. | Cost |
---|---|---|---|---|---|---|---|---|

1 | 29.50 | 36.13 | 37.24 | 44.86 | 47.60 | 49.99 | 292.72 | € 46.85 |

2 | 29.50 | 43.53 | 48.34 | 55.96 | 41.68 | 23.35 | 274.25 | € 42.38 |

3 | 23.83 | 37.86 | 42.670 | 50.29 | 36.01 | 17.68 | 234.61 | € 36.05 |

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

Foroozandeh, Z.; Ramos, S.; Soares, J.; Lezama, F.; Vale, Z.; Gomes, A.; L. Joench, R.
A Mixed Binary Linear Programming Model for Optimal Energy Management of Smart Buildings. *Energies* **2020**, *13*, 1719.
https://doi.org/10.3390/en13071719

**AMA Style**

Foroozandeh Z, Ramos S, Soares J, Lezama F, Vale Z, Gomes A, L. Joench R.
A Mixed Binary Linear Programming Model for Optimal Energy Management of Smart Buildings. *Energies*. 2020; 13(7):1719.
https://doi.org/10.3390/en13071719

**Chicago/Turabian Style**

Foroozandeh, Zahra, Sérgio Ramos, João Soares, Fernando Lezama, Zita Vale, António Gomes, and Rodrigo L. Joench.
2020. "A Mixed Binary Linear Programming Model for Optimal Energy Management of Smart Buildings" *Energies* 13, no. 7: 1719.
https://doi.org/10.3390/en13071719