Next Article in Journal
Comparative Analysis of National Policies for Electric Vehicle Uptake Using Econometric Models
Next Article in Special Issue
Engineering Concept of Energy Storage Systems Based on New Type of Silicon Photovoltaic Module and Lithium Ion Batteries
Previous Article in Journal
Capacity Planning of Distributed Wind Power Based on a Variable-Structure Copula Involving Energy Storage Systems
Previous Article in Special Issue
Evaluation of the Effective Active Power Reserve for Fast Frequency Response of PV with BESS Inverters Considering Reactive Power Control
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Model for Energy Management Strategy in Smart Building with Energy Storage Systems and Electric Vehicles

by
Francisco David Moya
1,*,
José Luis Torres-Moreno
2,* and
José Domingo Álvarez
2
1
GESETIC Research Group, School of Electrical Engineering, Universidad Distrital Francisco José de Caldas, 111711 Bogotá, Colombia
2
CIESOL Joint Center University of Almería-CIEMAT, 04120 Almería, Spain
*
Authors to whom correspondence should be addressed.
Submission received: 8 June 2020 / Revised: 3 July 2020 / Accepted: 7 July 2020 / Published: 13 July 2020
(This article belongs to the Special Issue Assessment of Photovoltaic-Battery Systems)

Abstract

:
The aim of this work was to develop an optimal model for an energy management strategy in a real micro-grid, which involves a smart building, a photovoltaic system with storage, and a plug-in full electric vehicle. A controller based on a mathematical algorithm was the core of each strategy, which directly acted on a relay board managing the interconnection between the different elements comprising the micro-grid. The development of an optimization model involving binary variables required an efficient code that achieved solutions in a short time. The analyzed case-study corresponded to the solar energy research center (CIESOL) smart building, a bioclimatic building, that is located at the University of Almería (Spain), designated to research in renewable energies. Using the methodologies described in this work, the total cost of the smart building energy consumption was minimized by decreasing the power supplied from the grid, especially at peak hours. Highlighting the use of a simple model that provided better performance than the current state of the art methodologies. The optimal model for energy management strategy demonstrated the advantages of using classical optimization techniques to solve this specific optimization problem, compared to a rule-based controller. The linear modeling was capable of producing a simple algorithm with less code development and a reduction in the computational effort.

Graphical Abstract

1. Introduction

With the apparition of new trends in electricity production and consumption, the development of optimal energy management strategies is an emerging field of research. These strategies, which must accomplish the new regulatory policies, might be evaluated by means of different metrics like self-consumption or self-efficiency, reporting the share of energy that is directly consumed in a building’s grid-connected photovoltaic (PV) system [1]. A review of the different PV self-consumption criteria in residential buildings is presented in [1], where energy storage and load management arise as the main strategies to increase the self-consumed energy.
With the development of smart grids and the establishment of an advanced communications infrastructure, users can have the opportunity to manage the electrical energy consumed, with the aim of reducing costs in energy consumption [2]. Electric companies in different countries are adopting different prices for the value of electric energy at different times, with the aim that users can have their own energy resources [3], which generates and: (a) reduces the cost of energy consumption, and (b) decreases load peaks [4]. Electric power prices are usually high during peak hours, especially early in the evening, when most users turn on the lights and their appliances. On the other hand, in off-peak hours (lower demand, especially in the early morning hours), energy prices are the lowest of the day.
Different types of components, such as hardware, algorithms, software, communications, sensors, and so on, are requirements to collaborate with each other, in order to provide different services in a smart building. Since electric energy cannot be charged in large quantities, the prices of such energy in the energy market, due to competition between generators, for example, usually fluctuate between days and between hours of low demand and hours of high consumption. Thus, it is widely studied in energy management in smart buildings, with the aim of (1) adapting the prices of the kilowatt hour to a lower price established at different times of the day, so that the end user decreases the value of the electric bill, which (2) allows the end user to manage their resources and loads. Consequently, the peak of electricity demand in the hours of high consumption in electricity grids is also reduced. As an additional aspect, with an increase in the use of electric vehicles, building energy management systems (BEMS) becomes crucial, in relation to the response to demand, helping to control and reduce peaks in demand, which have major problems in electrical grids, such as overloading on distribution transformers. Thus, it is necessary to develop a methodology for the proper performance of energy management in smart buildings.
This work presents an alternative approach to that we developed in [5], which illustrated the control strategy aimed at efficient management of micro-grids, by using a rule-based controller in charge of managing the power flows between the different elements that compose a micro-grid, including an electric vehicle. The aim of this work was to develop a model for building energy management strategies involving a PV system with energy storage, and a plug-in fully electric vehicle. The proposed model in this work replaced the rule-based controller presented in [5], which manages the power flows. A controller based on a mathematical algorithm was at the core of each strategy, which directly acted on a relay board managing the interconnection between the different elements that compose a micro-grid. The selected testbed focused on a single laboratory, although the proposed methodology was applicable to the entire building. The rest of the paper is structured as follows, Section 2 deals with the state of the art. Section 3 presents the attached problem. In Section 4, the proposed methodology is presented. Section 5 describes the case study input dates. Section 6 deals with the result analysis. Finally, conclusions are provided in Section 7.

2. State of the Art

The role of smart buildings is crucial for the proper use of energy. Due to automation systems, smart buildings can save important information about the habits of their occupants and, therefore, their energy consumption. On the other hand, smart buildings can interact automatically and dynamically with the distribution grids, achieving a reduction in grid energy consumption, thanks to load management, and it supplements supplying energy to the grid, if possible, when they have their own generation sources [6].
A smart building usually incorporates renewable energy sources, namely solar panel systems or small wind generation systems. The BEMS can then take these own generation systems into account, when carrying out an energy management [7]. Our work in [8] describes the basic architecture in a smart residential building.
To obtain a total economic benefit within the dynamic energy-pricing scheme, it is imperative that the different devices in smart buildings incorporate automatic connection–disconnection mechanisms, which require minimal human operation. With this goal, smart connectors are being developed [9]. A smart socket can be installed between devices (energy store system (ESS), electrical loads, PV system, etc.) along with power outlets, which monitors the energy use in the building. These elements should also communicate with the operators and smart meters that can monitor the electrical state of different devices.
Modern buildings are now equipped with digital control systems in their infrastructure. This allow users to benefit from dynamic energy rates, controlling each piece of equipment that is either producing, consuming, or storing energy in their electrical system. Modern control in smart buildings is aimed at performing optimal control of household appliances, control of the maximum load demanded, supervision for the improvement of the lighting system, control of the window blinds, and measurement and disaggregation of energy use, among other applications. Model predictive control is widely used in microgrid and smart building management [10]. Compared with other heuristic techniques, it was proved to be more efficient in applications like comfort control and natural ventilation [11]. In this field, in which the model accuracy plays an important role for optimal control, the use of transfer neural network arises as an interesting alternative, for solving the problem of dealing with such an extremely complex model and reducing the number of required data for the network training [12]. The suitability of reinforcement learning for operation optimization in smart microgrids is demonstrated in [13]. As optimization tools, genetic algorithms were proven to be effective under similar scenarios [14]. Examples of control architectures for smart buildings, which are operated by a BEMS, are illustrated in the works of [15,16]. A BEMS is designed for the optimal monitoring and operation of household appliances and other loads installed in smart buildings. The BEMS must program the use of household appliances, in association with smart meters, smart appliances, electric vehicles, small-distributed generation units, and ESS. The work in [17] illustrates a compilation of technologies and components for BEMS. This work also performs an analysis of various solutions for the BEMS, considering measurement infrastructure, types of connectors for electrical loads, and display systems for users. A wireless control system for the BEMS is illustrated in [16].
Different algorithms were developed to operate the BEMS, depending on different factors, like user requirements, user comfort, environmental and social restrictions, etc. The work in [2] describes an extensive compilation of related works on demand management from the user’s point of view. Various hardware applications for BEMS are proposed in [18] and [19]. Several works in the technical literature focus on BEMS modeling through linear and non-linear programming, as illustrated in [20,21,22]. Several studies illustrate the programming of energy resources through heuristic methods, mostly with high computational development, as shown in [23,24,25]. Several works point to the reduction of energy costs considering the price dynamics in the grid [17,22,25], whereas other works consider user requirements, comfort, and external, environmental, and social variables [23,26].

3. The Attached Problem

The analyzed case-study corresponds to the CIESOL smart building. This bioclimatic building (schematized in Figure 1) was designed and built for renewable energy research purposes. It is located at the University of Almería, Spain, and its coordinates are 36.83N, 2.40W. Here the annual average sunshine duration is close to 3000 h. Hence, the CIESOL smart building, which incorporates both active solar heating and cooling [27], is a very suitable building for solar energy applications. Several previous works analyzed and characterized the overall power consumption of the building [28,29]. However, this work dealt with the control and optimization of a single laboratory, while the extrapolation of the proposed methodology to the entire building was straightforward. The normalized profile of demand, previously determined in [30], was considered as the model input. This consumption corresponded to artificial lighting, computers, and other laboratory instruments.
The laboratory under study in the CIESOL smart building could be configured both as a stand-alone and grid-tied installation, by simply acting on interrupts. When operating in a grid-tied mode, the power obtained from the public grid was to be minimized. The battery was connected before the DC/AC converter (as can be seen in Figure 2), where the input power was represented by green bonds. These inputs come from the public grid, as well as from the electric vehicle, the photovoltaic panels, and the batteries. To achieve this, the output power provided by the charger/inverter was represented by red bonds and comprised the energy consumed in balancing the demand and charging both the batteries and the electric vehicle (EV). Moreover, the MPPT (maximum power point tracking) element in Figure 2 was in charge to obtain the maximum power from the solar panels; this allowed them to always work at the point of maximum power. On the other hand, a general-purpose instrumentation bus (GPIB) was used to exchange data between the micro-grid and the electronic devices and, finally, the board circuit at the center of the figure was in charge to activate/deactivate the different relays.
The CIESOL smart building is composed of four photovoltaic panels performing a nominal power of 260 W each, controlled by a maximum power point tracker connected to a DC link, along with two modules of stationary LiFePO4 batteries, with a rated capacity of 4.9 kWh. A grid-connected inverter with a nominal power of 5000 W was in charge of extracting or providing energy to the DC link, exchanging energy with the public grid, and supplying the AC loads. For the sake of ensuring accuracy in the experiments, these loads might be either the real building consumption or that simulated by a programmable AC electronic load. Finally, the electric vehicle might provide or consume energy according to the desired energy control strategy. It incorporates a pack of batteries, with a capacity of 210 Ah. Regarding the communications, a gateway was used to manage the different devices through the controller area network (CAN) bus and the VE-direct bus, and published all collected information by using the Modbus protocol.
As was pointed out previously, thanks to the development of a dedicated software architecture, it was possible to get real-time access to the data provided by the sensors incorporated on the different devices of the micro-grid, by using the Modbus protocol. While the manufacturer provides a gateway in charge of registering these data and publishing them in a web server, it was necessary to count with our own data monitoring, consequently ensuring the robustness, synchronization, and accuracy of this information on the precise time interval, for control purposes.
Regarding the power flows priority management, it was decided to rescind from the default modes implemented in the gateway. This made it possible to take our controller in charge of making the decision on the operating devices, by using the relays.
The load was connected to the output of the charger/inverter, which could be connected or disconnected from the public grid by means of a relay, referred to as R1 in Figure 2. Parallel to the electronic load, another power line fed an EV charging station, controlled by a second relay (R2 in Figure 2). Finally, another power line connected to the inverter’s second AC input, which enabled an EV to inject energy to the micro-grid when needed, by acting on a third (R3 in Figure 2). Moreover, the MPPT (maximum power point tracking) element in Figure 2 was in charge of obtaining the maximum power from the solar panels, which allowed them to always work at the point of maximum power. On the other hand, a general-purpose instrumentation bus (GPIB) was used to exchange data between the micro-grid and the electronic devices and, finally, the board circuit at the center of the figure was in charge of activating/deactivating the different relays.
The attached problem consisted of minimization of the energy costs associated with consumption from the public grid. This was achieved by means of an energy management strategy, based on a mathematical algorithm which would set the state of the relays labeled in Figure 2 as R1, R2, and R3, taking into account the PV production, the instantaneous demand, the ESS, the electricity costs and others details about the smart building, which are provided in Section 4.

4. Outline of the Methodology

In order to know the correct operation of the relays R1, R2, and R3, we developed the optimal model for energy management strategy (OMEMS), which took real input data as it was, and (a) forecasted data of the electrical load profile as input (carried out through the neural network models developed previously for the CIESOL building in [29,30]), (b) forecasted data of the photovoltaic source, and (c) the grid electricity prices. The OMEMS considered different parameters like, (a) technical smart building characteristics, (b) operational limits, (c) security and reliability constraints, (d) user requirements, and (e) device models installed in smart buildings, among others. In technical smart building characteristics, we took the energy storage system parameters into consideration, like (a) maximum power injection, (b) injection efficiency, (c) maximum capacity of stored energy (d) maximum power recharge, (e) recharging efficiency, and the (f) self-discharge rate. The above parameters were also defined for the electrical vehicles battery. As an output, the OMEMS delivered an answer for each time of the day identified for each of the relays, in terms of whether it should be turned on or off, as illustrated in Figure 3. This allowed us to look for one important challenge to maximize the use of renewable energy. This objective was reached by taking full advantage of the building storage sources and using the electrical vehicle battery, as an energy source for the building’s load.
As mentioned above, the task of the proposed methodology was to minimize the power supplied by the grid, in order to reduce the total cost of the energy consumed by the smart building, Equation (1). The total energy cost could be calculated as the sum of the energy purchased from the grid and the renewable generation cost. This made it possible to compare the costs of the grid, as well as the costs of the renewable energies installed in smart buildings, selecting the most economical option. We define very low costs for renewable energies, with the aim of privileging these technologies. The optimization model proposed in this work was adapted to take into account the various periods of time in a day (we took a sample time of 15 min).
Thus, the optimization problem could be formulated as follows:
m i n [ t Ω t Δ C t * P t g r i d + t Ω t Δ C r e t * P t r e ]
where
P t r e = P t s u n + P t w i n d
Subject to:
P t s u n + P t w i n d + P t g r i d + P t b s + P t e v b i = P t e l + P t b r + P t e v b r   t , j
Equation (2) was used to calculate the power of the renewable energy sources available in the smart building, P t r e . This equation illustrates the sum of the photovoltaic power, P t s u n , and the wind power, which in our micro-grid was equal to zero, since it did not include this kind of renewable energy source, P t w i n d , which could be installed in an intelligent building. Equation (3) provided the typical power balance, where in the left side we have the sum of the available photovoltaic power, P t s u n , the available wind power, P t w i n d , the power supplied by the grid, P t g r i d , the power that could be obtained from the ESS, P t b s , and the power that could be obtained from the electric vehicle battery, P t e v b i . This sum was equal to the power demanded by the smart building, P t e l , the power to recharge the ESS, P t b r , and the power to recharge the electric vehicle battery, P t e v b r . Equations (1)–(3) represent the classical approach to this type of problem studied in many works, such as [31]. However, in this paper, a set of original new considerations is provided, namely (i) a new approach to solve the problem for the optimal operation of the relays R1, R2, and R3, based on the classical optimization tools; (ii) modeling of ESS in smart building; (iii) EV batteries with large storage capacity, and (iv) use of commercial optimization solvers and mathematical programming languages. These features are explained in the following subsections.

4.1. The Methodology to Solve the Problem

The proposed OMEMS defined the appropriate time to connect an electrical relay, in order to meet a specific objective. The model analyzed whether or not a certain electrical relay (R1, R2, or R3) should be connected for each period t. The binary decision variable x j , t related for each relay j, was defined as the output of the proposed optimization model. Therefore, x j , t could have a value of zero (0) or one (1); a zero value meant that the relay j must be turned off (disconnected) at time t, whereas a value of one meant that relay j must be turned on (connected). The model output contained a binary matrix with x j , t values for each period t, where a value of one meant the period of operation for each relay j, e.g., x 1 , t = { 0 , 1 , 1 , 1 , 0 } ; x 2 , t = { 0 , 0 , 0 , 1 , 1 } ; etc. as illustrated in Figure 4. The use of binary variables together with continuous ones required a simple model that allowed the optimization model to deliver solutions in a short time.

4.2. Energy Storage Systems with Large Storage Capacity

In general, batteries are the most common choice for short-term energy storage systems in smart building; in this work, the ESS was composed of a bank of lead-acid batteries. Its main function was to reduce the variability of the storage energy systems and the renewable resources; then, it could be used during periods when the energy supplied by the grid had a higher cost. This work included states where the ESS was recharged and other states where the ESS supplied energy, considering factors like (1) high capacity storage, (2) maximum and minimum power recharging, (3) maximum and minimum power supply, (4) supply efficiency, (5) recharging efficiency, and (6) self-discharge rate. To model the ESS, the methodology proposed in [32] was used. For the scenarios studied in this paper, the ESS parameters showed in Table 1 were used.
The ESS modeling must consider the feasibility in which the energy stored at each moment of the day is considered. The OMEMS model calculated the energy of the ESS, considering (a) the energy stored in ESS in the time analyzed immediately before, (b) the recharge energy obtained from the micro-grid (where the ESS recharge efficiency was taken into account), (c) the energy supplied by the ESS that was delivered to the micro-grid (where the ESS supply efficiency was considered), and (d) the ESS self-discharge energy, which took into account the ESS discharge rate, as illustrated in Equation (4). The feasibility should also consider the established value of both the maximum energy and the minimum energy stored in ESS, as illustrated in Equation (5).
E b t = E b t 1 + σ b r * Δ * P t b r 1 σ b s * Δ * P t b s β b * Δ * E b t
E b m i n E b t E b m a x
To perform the correct ESS mathematical modeling, it was necessary to set the binary variable b s t , which had a value of 0 when the ESS system was in a state of charge, whereas b s t had a value of 1 when ESS was in a power supply state. ESS modeling must consider the technical limits of the maximum and minimum recharge power. These parameters are modeled using Equations (6)–(9).
P b s   m i n * b s t P t b s
P t b s P b s   m a x * b s t
P b r   m i n * ( 1 b s t ) P t b r
P t b r P b r   m a x * ( 1 b s t )

4.3. Electrical Vehicles Batteries with Large Storage Capacity

With the increased use of EVs, it is necessary to analyze its impact on the smart building. In this work, we consider obtaining the energy stored in the EV through the action of relay 3, to be supplied to the micro-grid, according to what was illustrated in Section 3. Therefore, the battery of each available EV was considered to be one more source of ESS. Agreeing to Section 4.2, the procedure used by the OMEMS for the modeling of the ESS, was also used for the EV battery. Therefore, the OMEMS model calculated the energy of the EV battery considering (a) the energy stored in EV battery in the time analyzed immediately before, (b) the recharge energy obtained from the micro-grid, where the EV battery recharge efficiency was taken into account, (c) the energy supplied by the EV battery that was delivered to the micro-grid, where the EV battery supply efficiency was considered, and (d) the EV battery self-discharge energy, which took into account the EV battery discharge rate, as illustrated in Equation (10). The feasibility should also consider the established value of both the maximum energy and the minimum energy stored in ESS, as illustrated in Equation (11).
In this work, we considered additional factors to improve the real conditions in a smart building, such as (1) hours available to recharge the car batteries according to a schedule when the vehicle is at building, (2) use of maximum power charging to maximize recharge during the time when the vehicle is at building, and (3) maximized storage capacity of the battery. As established by Equation (12), in which ρ defined the percentage of battery storage for the end of the period, if ρ = 100, the algorithm must schedule the battery to be fully charged at end of period evf, because the EV would be used immediately after this period.
E e v t = E e v t 1 + σ e v r * Δ * P t e v r 1 σ e v s * Δ * P t e v s β e v * Δ * E e v t
E e v m i n E e v t E e v m a x
E e v e v f ρ · E e v m a x
For the scenarios studied in this paper, we used the EV battery parameters shown in Table 2.
To perform the correct EV battery mathematical modeling, it was necessary to set the binary variable e v s t , which had a value of 0 when the system was in a state of charge whereas e v s t had a value of 1 when the EV battery was in a power supply state. EV battery modeling must consider the technical limits of the maximum and minimum recharge power. These parameters were modeled using Equations (13)–(16).
P e v s   m i n * e v s t P t e v s
P t e v s P e v s   m a x * e v s t
P e v r   m i n * ( 1 e v s t ) P t e v r
P t e v r P e v r   m a x * ( 1 e v s t )

4.4. Use of Classical Optimization Techniques which Give an Optimal Solution

One option for solving the OMEMS problem was to employ heuristic methods to find a feasible and good solution, but not necessarily optimal ones, as shown in [33]. In this work, a model that used classical convex optimization methods, which guarantee the optimal solution, was developed. As mentioned previously, an optimization model with binary and continuous variables require a simple code that delivers solutions in a short time. Therefore, the model was implemented using the mathematical programming language (AMPL) [34] and solved via a commercial solver (CPLEX) [35], where all equations used were linear.
Therefore, OMEMS dealt with a mixed-integer linear programming (MILP) problem, which involved continuous variables used for modeling the power flow and integer variables, in this case, binary ones, used to define the state of the relays. This kind of problems comprises challenging tasks in the field of mathematical optimization and do not lead to a unique procedure for its resolution. In our case, the use of AMPL for modeling the problem allowed us to deal with complex mathematical problems, which could be extended to large-scale mathematical problems. Thus, a mix of imperative and declarative programming style could be used. This allowed the formulation of optimization models to be addressed through the elements of declarative language, like sets, scalar and multidimensional parameters, decision variables, and objects and constraints, which allow a concise description of a vast majority of the problems involved in the field of mathematical optimization. Once the problem is formulated by using AMPL, it is solved by means of CPLEX, which receives its name from the fact that it implements the simplex method in the C language. This optimizer allows the resolution of high complexity MILPs. This ensures that an optimal solution can be found, which even if it was not the global optimal solution, would be suitable enough in all cases, considering the constraints. As a result, OMEMS takes into account optimization issues that are not implemented by simple rule-based controllers.

4.5. Other Technical Smart Building Characteristics

The OMEMS establishes other additional features, as well as the limit of active power that can be taken from the electrical grid. This value was the limit established by the feeder of the building electrical connection, illustrated in Equation (17) as FL. Since the electric grid was taken as an infinite power source, it was very important to set the FL value to bring the model close to reality, as much as possible. We established this value at 15 kW, according to the characteristics of the case study.
P t g r i d F L   kW

5. Case Study Input Dates

The OMEMS considered the following inputs, forecasting data of the electric load profile, forecasting data of the photovoltaic source and grid time-of-day rates, as discussed in Section 4 (Figure 1). Figure 5a shows the power profile of the PV system in CIESOL on 11 December 2019. Figure 5b illustrates the demand curves, also for 11 December 2019. The proposed optimization model was adapted to consider a sample time of 15 min, along a day.
The law 24/2013 published in the Spanish Official State Gazette on 26 December [36] had the purpose of establishing the regulation of the electricity sector, in order to guarantee the supply of electricity, and to adapt it to the needs of consumers in terms of safety, quality, efficiency, objectivity, and transparency, at minimum cost. The main novelties of the law concern the economic and financial balance of the electricity sector and the remuneration of production, grids, and marketing activities.
One of these novelties is the economic and financial sustainability of the power electric system as a guiding principle of the actions of the public administrations and other subjects included in the scope of the law application. Thus, a time-of-use pricing scheme was established, where the price of electricity was tied to specific time-periods, aiming to reduce the energy consumption in the peak hours and to encourage the management of demand. According to this law, different periods could be identified as (i) peak and (ii) off-peak. The day-ahead price (DAP) of the electricity for the Spanish market was supplied by Iberian energy market operator (OMIE). OMIE is a company that manages the entirety of the electricity markets (daily and intraday) for the Iberian Peninsula [37]. The operating model provided by OMIE was similar to the one that can be found in several other European markets. Therefore, from its website the data of an hourly-based mean energy price for the Spanish market could be collected.
For the simulation of different scenarios, we used the data on the used cost of energy, illustrated in Figure 6, which corresponded to the price defined by one of the utilities in Almeria city [38].

6. Result Analysis

For the case study, the operation of relay 1 (which allowed the connection to the grid), is illustrated in Figure 7b. It was obtained as the OMEMS output, as discussed in Section 4 (Figure 1). Figure 7a illustrates the active power supplied from the grid for each time of day. In Figure 7a, it can be seen that greatest power from the grid was obtained in periods where the grid electricity rate was cheaper. For example, between 04:00 and 06:00, energy was taken from the grid to recharge the batteries, at their maximum recharge capacity, as in this period, the cost per kWh was the lowest. In this way, the batteries were recharged considerably, to be used later. In the period between 11:00 and 12:00 h, the maximum peak from the grid was reached, to recharge not only the ESS, but also the batteries of the electric vehicle, as well as the loads connected in that period. This period saw the highest demands in the smart building. This action was justified because not only does the price of grid energy skyrocket after 12:00, but also because it was the closest period to the use of both the ESS and electric vehicles as energy sources. In periods where the cost of energy from the grid was higher, the OMEMS avoided obtaining energy from that grid. Figure 7b illustrated that the relay 1 was turned-off between 12:00 and 22:15, as the price of the grid energy was expensive in this period. In the period between 22:15 and 0:15 of the next day, the smart building obtained power from the grid as little as possible, not only for low demand during these hours, but to also keep the batteries charged at the minimum value that the user was assigned, which in this study case was 10 kWh.
Figure 8a shows the operation of the ESS, in which it can be seen that ESS was only charged in the hours when the energy cost from the grid was low-priced. Additionally, in this figure it was possible to highlight that, the energy stored in the ESS was mostly extracted at times when the cost of energy from the grid was more expensive. Figure 8b illustrates the ESS state of charge, in which the optimal modeling of the ESS was verified, since the energy of the storage system in some determined period must respect the state of the energy in the previous period. In other words, a battery cannot supply power that it did not have stored, nor can it charge energy beyond its storage capacity.
Figure 9a illustrates the operation of the EV battery. In this figure, it is possible to verify that battery was charged in periods when the grid price was low, and also that energy was obtained from the EV battery in the periods when the grid rates were high. It is important to highlight that, the EV battery was only available when the EV vehicle was plugged into the building grid, i.e., during working hours, from 8:15 AM to 5:15 PM, since it was used to take the building’s user to his/her home. This was the reason for the sudden increase in the morning when the user arrived at the building and the EV was available, and the drop in the afternoon, when the user left the building driving the EV to his/her home. In accordance with the above, Figure 10a illustrates the operation of relay 2, which allowed connection for charging the EV battery. Figure 9b illustrates the state of charge of the EV battery, confirming the correct modeling in this device, since it was observed that, for each period analyzed, the state of charge in a given period, respected the state of previous charge. In accordance with the above, Figure 10b shows the operation of Relay 3, which allowed the connection to obtain the energy stored in the EV battery.
The OMEMS determined the consumption from the public grid, considering the hourly tariff, which allowed the obtainment of energy at off-peak hours. This can be seen in Figure 7a, where the consumption peak occurred around noon. This consumption allowed charging both the ESS and the EV battery, before a significant increase of the tariff, as illustrated in Figure 6. According to the results shown in Figure 7a, the electricity cost of the analyzed period was €0.72, considering the value for a 24-h period in 11 December 2019. With regards to the hypothetical case of obtaining energy without considering the off-peak cost reduction, the electricity cost would be €1.51 (considering a tariff of €0.159/kWh). Hence, the OMEMS was able to reduce the electricity cost by 48.1%.
In contrast, the rule-based controller developed in [5] was based on the assignment (in each time step) of the power flow needed to satisfy the demand, and in case of excess of power, to charge the batteries. This was achieved by means of control structures, which compared the resource states and the power demand. The sequence of these comparisons was carried out as follows, first, if the photovoltaic power exceeded the demand, this demand was entirely satisfied by using the photovoltaic power and the excess was designated to charge the ESS. If this excess was greater than the maximum charging power, or its state of charge (SOC) was above its maximum value, the remaining power was designated to charge the EV battery. If this power was greater than the maximum charging power or its batteries had plenty of charge, the remaining power was sold to the public grid. This sequence was invariable and hence, the controller did not consider issues like the feed-in tariff or the possible benefits of charging the EV within a given period of time. For its part, if the photovoltaic power was not able to entirely satisfy the demand, the deficit was provided by the ESS, when its SOC is above the minimum. When needed, an extra power is provided by the EV battery, if its SOC was above the minimum. If all these sources were not able to satisfy the demand, the power deficit was obtained from the public grid. Again, these rules were invariable and did not consider the possibility of prioritizing the use of grid energy over the batteries during off peak periods, in order to minimize the total energy costs throughout a given time horizon.
Therefore, after taking a look at the results obtained with the proposed OMEMS, it was possible to conclude that, the OMEMS was an alternative to the rule-based controller methodology that we previously developed in our work in [5]. Specifically, these methods differed in the following aspects:
  • The methodology based on a rule controller was a mere approximation to the solution of the problem. OMEMS works based on classical simplex optimization, which allows finding an exact answer to solve the problem.
  • The OMEMS use binary variables, which required a simple algorithm with less code development and a reduction in the computational cost that delivers solutions in a short time.
  • Both, the modeling of the EV battery like the modeling of the ESS, were much closer to reality, since it considered variables like self-discharge rate, efficiency in the charging phase, efficiency in the energy injection phase, minimum values of stored energy, and the maximum capacity of stored energy.
  • The OMEMS used a time-of-use pricing scheme, where the price of electricity was tied to specific time periods, aiming to reduce the energy consumption in the peak hours and to encourage management of demand.
  • OMEMS can include the use of other energy renewable technologies like wind, as illustrated in Equation (2). This technology was not included in this work since the CIESOL smart building did not yet have a wind turbine.
  • The user could assign a percentage value of the charge of the EV battery for a specific one, indicating the amount of energy stored for the following day, or in case the user wanted to use the EV (it should be charged preferably to its maximum capacity). In Figure 9b, it can be seen that at the end of the work hours, the EV battery was fully charged.

7. Conclusions

In this work, the development of an optimization model with binary and continuous variables is shown. This model required a simple code that delivered solutions in a short time. The CIESOL smart building, a bioclimatic building located at the University of Almería (Spain), was used a case-study to test the goodness of the proposed optimization model.
Analysis of the simulation results showed the stability of the OMEMS, when solving the problem. Maximization of the use of renewable energy was achieved, as well as minimization of the use of the grid, which also led to a reduction in electricity costs.
The OMEMS successfully scheduled relay 1, relay 2, and relay 3, improving the optimization process, achieving all objectives and surpassing the current state-of-the-art methodologies. Minimizing the total cost of the energy consumed by the smart building, in order to use less power supplied by the grid was carried out by using the methodologies described in this work, highlighting the use of a simple model that provided a better performance than the current state–of-the-art methodologies.
The OMEMS demonstrated the advantages of using classical optimization techniques to solve this specific optimization problem, compared to a rule-based controller. The linear modeling was capable of producing a simple algorithm with less code development and a reduction in the computational cost.

Author Contributions

Conceptualization, F.D.M.; software, F.D.M.; formal analysis, F.D.M.; investigation, F.D.M.; resources, J.L.T.-M. and J.D.Á.; writing—original draft preparation, F.D.M.; writing—review and editing, J.L.T.-M. and J.D.Á.; supervision, J.L.T.-M. and J.D.Á.; funding acquisition, J.L.T.-M. and J.D.Á. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National R+D+i Plan Project DPI2017-85007-R of the Spanish Ministry of Science, Innovation, and Universities, and by ERDF funds.

Conflicts of Interest

The authors declare no conflict of interest.

Acronyms

The abbreviations of common terms used in this paper are presented below.
BEMSbuilding energy management system
DAPday-ahead price
ESSenergy store system
EVelectrical vehicles
GPIBgeneral purpose instrumentation bus
MPPTmaximum power point tracking
OMEMSoptimal model for energy management strategy
PVphotovoltaic

Nomenclature

The notation used throughout this paper is reproduced below for quick reference.
Sets
Ωtset of time from analyzed period
Constants
Δdiscretization time t
Δ t i initial time from period analyzed
Δ t f end time from period analyzed
σ b r energy storage system supply efficiency [%]
σ b s energy storage system recharging efficiency [%]
σ e v r electric vehicle supply efficiency [%]
σ e v s electric vehicle system recharging efficiency [%]
ρpercentage of battery storage from electric vehicle [%]
βevenergy storage system self-discharge rate [%]
βbenergy storage system self-discharge rate [%]
C t cost of utility electricity— t     Ω t   [ $ / kWh ]
E b m a x maximum stored energy from energy storage system [kWh]
E b m i n minimum stored energy from energy storage system [kWh]
E e v m a x maximum stored energy from electric vehicle [kWh]
E e v m i n minimum stored energy from electric vehicle [kWh]
evfperiod where electric vehicle battery is fully charge
P t e l active power from electrical loads— t   Ω t   [ kW ]
P b r   m a x maximum power charging from ESS in Δt
P b r   m i n minimum power charging from ESS in Δt
P b s   m a x maximum power supply from ESS in Δt
P b s   m i n minimum power supply from ESS in Δt
P e v r   m a x maximum power charging from electric vehicle in Δt
P e v r   m i n minimum power charging from electric vehicle in Δt
P e v s   m a x maximum power supply from electric vehicle in Δt
P e v s   m i n minimum power supply from electric vehicle in Δt
P t s u n active power from photovoltaic system— t     Ω t   [ kW ]
P t w i n d active power from wind turbines— t     Ω t   [ kW ]
Continuous Variables
E b t stored energy from energy storage systems installed at smart building [kWh]
E e v t stored energy from electric vehicle [kWh]
P t g r i d active power consumed from the grid— t     Ω t
P t b r rechargeable active power from building battery— t     Ω t   [ kW ]
P t b s supply of active power from building battery— t     Ω t   [ kW ]
P t e v b i power that can be obtained from the electric vehicle battery— t     Ω t   [ kW ]
P t e v r rechargeable active power from electric vehicle battery— t     Ω t   [ kW ]
P t e v s supply of active power from electric vehicle battery— t     Ω t   [ kW ]
Binary Variables
b s t related for ESS, b s t = 0 in charging state or s t = 1 when ESS supply energy
e v s t related for EV battery, e v s t = 0 in charging state or e v s t = 1 in supplying state
x j , t related for each relay j

References

  1. Luthander, R.; Widén, J.; Nilsson, D.; Palm, J. Photovoltaic self-consumption in buildings: A review. Appl. Eng. 2015, 142, 80–94. [Google Scholar] [CrossRef] [Green Version]
  2. Amer, M.; Naaman, A.; M’Sirdi, N.; El-Zonkoly, A. Smart home energy management systems survey. In Proceedings of the International Conference on Renewable Energies for Developing Countries (REDEC), Beirut, Lebanon, 26–27 November 2014; pp. 167–173. [Google Scholar]
  3. Chen, X.; Wei, T.; Hu, S. Uncertainty-aware household appliance scheduling considering dynamic electricity pricing in smart home. IEEE Trans. Smart Grid 2013, 4, 932–941. [Google Scholar] [CrossRef]
  4. Lee, E.; Arbor, A.; Bahn, H. A genetic algorithm based power consumption scheduling in smart grid buildings. In Proceedings of the International Conference on Information Networking (ICOIN2014), Phuket, Thailand, 10–12 February 2014; pp. 469–474. [Google Scholar]
  5. Torres-Moreno, J.L.; Gimenez-Fernandez, A.; Perez-Garcia, M.; Rodriguez, F. Energy Management Strategy for Micro-Grids with PV-Battery Systems and Electric Vehicles. Energies 2018, 11, 522. [Google Scholar] [CrossRef] [Green Version]
  6. Bettinazzi, G.; Nacci, A.; Sciuto, D. Methods and algorithms for the interaction of residential smart buildings with smart grids. In Proceedings of the IEEE 13th International Conference on Embedded and Ubiquitous Computing, Washington, DC, USA, 21–23 October 2015; pp. 469–474. [Google Scholar]
  7. Wei, T.; Zhu, Q.; Yu, N. Proactive demand participation of smart buildings in smart grid. IEEE Trans. Comput. 2015, 65, 1392–1406. [Google Scholar] [CrossRef] [Green Version]
  8. Moya, F.; Da Silva, L.; Amezquita, J. Model for smart building electrical loads scheduling. In Proceedings of the 16 IEEE International Conference on Environment and Electrical Engineering, Florence, Italy, 7–10 June 2016. [Google Scholar]
  9. Fanti, M.; Mangini, A.; Roccotelli, M. A petri net model for a building energy management system based on a demand response approach. In Proceedings of the 22nd Mediterranean Conference on Control and Automation (MED), Palermo, Italy, 16–19 June 2014; pp. 816–821. [Google Scholar]
  10. Bordons, C.; Garcia-Torres, F.; Ridao, M.A. Model Predictive Control of Microgrids. In Advances in Industrial Control; Springer International Publishing: Cham, Switzerland, 2020; ISBN 978-3-030-24569-6. [Google Scholar]
  11. Chen, Y.; Tong, Z.; Wu, W.; Samuelson, H.; Malkawi, A.; Norford, L. Achieving natural ventilation potential in practice: Control schemes and levels of automation. Appl. Energy 2019, 235, 1141–1152. [Google Scholar] [CrossRef]
  12. Chen, Y.; Tong, Z.; Zheng, Y.; Samuelson, H.; Norford, L. Transfer learning with deep neural networks for model predictive control of HVAC and natural ventilation in smart buildings. J. Clean. Prod. 2020, 254. [Google Scholar] [CrossRef]
  13. Foruzan, E.; Soh, L.K.; Asgarpoor, S. Reinforcement Learning Approach for Optimal Distributed Energy Management in a Microgrid. IEEE Trans. Power Syst. 2018, 33, 5749–5758. [Google Scholar] [CrossRef]
  14. Wang, Y.; Huang, Y.; Wang, Y.; Li, F.; Zhang, Y.; Tian, C. Operation Optimization in a Smart Micro-Grid in the Presence of Distributed Generation and Demand Response. Sustainability 2018, 10, 847. [Google Scholar] [CrossRef] [Green Version]
  15. Tajika, Y.; Saito, T.; Teramoto, K.; Oosaka, N.; Isshiki, M. Networked home appliance system using Bluetooth technology integrating appliance control/monitoring with Internet service. IEEE Trans. Consum. Electron. 2003, 49, 1043–1048. [Google Scholar] [CrossRef]
  16. Pipattanasomporn, M.; Kuzlu, M.; Rahman, S. An Algorithm for Intelligent Home Energy Management and Demand Response Analysis. IEEE Trans. Smart Grid 2012, 3, 2166–2173. [Google Scholar] [CrossRef]
  17. Zhao, Z.; Lee, W.; Shin, Y.; Song, K. An Optimal Power Scheduling Method for Demand Response in Home Energy Management System. IEEE Trans. Smart Grid 2013, 4, 1391–1400. [Google Scholar] [CrossRef]
  18. De Angelis, F. Optimal home energy management under dynamic electrical and thermal constraints. Ind. Inform. IEEE Trans. 2013, 9, 1518–1527. [Google Scholar] [CrossRef]
  19. Tsui, E. Demand response optimization for smart home scheduling under real-time pricing. Smart Grid IEEE Trans. 2012, 3, 1812–1821. [Google Scholar] [CrossRef]
  20. Pawar, P.; Sampath, S. Load Scheduling Algorithm Design for Smart Home Energy Management System. In Proceedings of the IEEE 7th International Conference on Power and Energy (PECon), Kuala Lumpur, Malaysia, 3–4 December 2018; pp. 304–309. [Google Scholar]
  21. Kalogridis, S. PEHEMS: Privacy enabled hems and load balancing prototype. In Proceedings of the IEEE Third International Conference on Smart Grid Communications (SmartGridComm), Tainan, Taiwan, 5–8 November 2012; pp. 486–491. [Google Scholar]
  22. Yoza, A.; Uchida, K.; Yona, A.; Senjyu, T. Optimal operation of controllable loads in dc smart house with EV. In Proceedings of the International Conference on Renewable Energy Research and Applications (ICRERA), Nagasaki, Japan, 11–14 November 2012; pp. 1–6. [Google Scholar]
  23. Ozturk, E. An intelligent home energy management system to improve demand response. IEEE Trans. Smart Grid 2013, 4, 694–701. [Google Scholar] [CrossRef]
  24. Qinran, H.; Fangxing, L. Hardware design of smart home energy management system with dynamic price response. IEEE Trans. Smart Grid 2013, 4, 1878–1887. [Google Scholar]
  25. Squartini, S. Optimization algorithms for home energy resource scheduling in presence of data uncertainty. In Proceedings of the Intelligent Control and Information Processing (ICICIP), Beijing, China, 9–11 June 2013; pp. 323–328. [Google Scholar]
  26. Sagi, M.; Telvent, D. Smart home automation. In Proceedings of the Telecommunications Forum (TELFOR), Belgrade, Serbia, 20–22 November 2012; pp. 1512–1515. [Google Scholar]
  27. Rosiek, S.; Batlles, F.J. Renewable energy solutions for building cooling, heating and power system installed in an institutional building: Case study in southern Spain. Renew. Sustain. Energy Rev. 2013, 26, 147–168. [Google Scholar] [CrossRef]
  28. Khosravani, H.R.; Castilla, M.; Berenguel, M.; Ruano, A.E.; Ferreira, P.M. A Comparison of Energy Consumption Prediction Models Based on Neural Networks of a Bioclimatic Building. Energies 2016, 57. [Google Scholar] [CrossRef] [Green Version]
  29. Mena, R.; Rodríguez, F.; Castilla, M.; Arahal, M.R. A prediction model based on neural networks for the energy consumption of a bioclimatic building. Energy Build. 2014, 82, 142–155. [Google Scholar] [CrossRef]
  30. Alamin, Y.I.; Castilla, M.; Alvarez, J.D.; Ruano, A.E.; Perez, M. Mathematical modelling of the electric load profile of a low energy laboratory building in Spain. In proceeding of EUROSUN 2016, Palma, Spain, 11–14 October 2016. [Google Scholar]
  31. Bozchalui, M.; Ahsan Hashmi, S.; Hassen, H.; Cañizares, C.; Bhattacharya, K. Optimal Operation of Residential Energy Hubs in Smart Grids. IEEE Trans. Smart Grid 2012, 3, 1755–1766. [Google Scholar] [CrossRef]
  32. Macedo, L.; Franco, J.; Rider, M.; Romero, R. Optimal Operation of Distribution Networks Considering Energy Storage Devices. IEEE Trans. Smart Grid. 2015, 6, 2825–2836. [Google Scholar] [CrossRef]
  33. Moya, F.; Da Silva, L.; Amezquita, J. GRASP model for smart home energy load scheduling. In Proceedings of the Farmingdale State College International Energy and Sustainability Conference, Farmingdale, NY, USA, 12–13 November 2015; pp. 1–6. [Google Scholar]
  34. Fourer, R.; Gay, D.; Kernighan, B. AMPL: A Modeling Language for Mathematical Programming, 2nd ed.; Brooks/Cole-Thomson Learning: Pacific Grove, CA, USA, 2003. [Google Scholar]
  35. CPLEX. Optimization Subroutine Library Guide and Reference, Version 11.0; CPLEX Division: Incline Village, NV, USA, 2008. [Google Scholar]
  36. Spanish Law 24/2013 of 26 December of the Electric Sector. 2013. Available online: https://www.boe.es/diario_boe/txt.php?id=BOE-A-2013-13645 (accessed on 22 December 2019).
  37. OMIE. 2019. Available online: http://www.omie.es/en. (accessed on 22 December 2019).
  38. Holaluz. 2019. Available online: https://www.holaluz.com/tarifas-electricidad/ (accessed on 22 December 2019).
Figure 1. The smart building used as case study. On the left, the core of the microgrid. On the right, a schematic of the building, including an electric vehicle.
Figure 1. The smart building used as case study. On the left, the core of the microgrid. On the right, a schematic of the building, including an electric vehicle.
Energies 13 03605 g001
Figure 2. R1, R2, and R3 in the smart building under study.
Figure 2. R1, R2, and R3 in the smart building under study.
Energies 13 03605 g002
Figure 3. OMEMS propose model.
Figure 3. OMEMS propose model.
Energies 13 03605 g003
Figure 4. Output matrix x j , t .
Figure 4. Output matrix x j , t .
Energies 13 03605 g004
Figure 5. OMEMS input data. Power profile of the PV system in CIESOL (a) and the CIESOL load profile (b) on 11 December 2019.
Figure 5. OMEMS input data. Power profile of the PV system in CIESOL (a) and the CIESOL load profile (b) on 11 December 2019.
Energies 13 03605 g005
Figure 6. Grid time-of-day rates in Almeria (€ in 2019) [38].
Figure 6. Grid time-of-day rates in Almeria (€ in 2019) [38].
Energies 13 03605 g006
Figure 7. Grid interaction. Power taken from the grid (a) and relay 1 operation (b).
Figure 7. Grid interaction. Power taken from the grid (a) and relay 1 operation (b).
Energies 13 03605 g007
Figure 8. ESS interaction. ESS charging and discharging (a). ESS state of charge (b).
Figure 8. ESS interaction. ESS charging and discharging (a). ESS state of charge (b).
Energies 13 03605 g008
Figure 9. EV battery interaction. EV battery charging and discharging (a). EV battery state of charge (b).
Figure 9. EV battery interaction. EV battery charging and discharging (a). EV battery state of charge (b).
Energies 13 03605 g009
Figure 10. Relays states. Relay 2 operation (a). Relay 3 operation (b).
Figure 10. Relays states. Relay 2 operation (a). Relay 3 operation (b).
Energies 13 03605 g010
Table 1. Energy storage system parameters.
Table 1. Energy storage system parameters.
ParameterUnitVariable
Maximum capacity of stored energy100 kWh E b m a x  
Minimum capacity of stored energy10 kWh E b m i n
Maximum power injection2 kW P b   m a x
Maximum power recharge2 kW P b   m i n
Supply efficiency95% σ b r
Recharging efficiency95% σ b s
Self-discharge rate0.525%βb
Table 2. EV battery parameters.
Table 2. EV battery parameters.
ParameterUnitVariable
Maximum capacity of stored energy100 kWh E e v m a x
Minimum capacity of stored energy10 kWh E e v m i n
Maximum power injection2 kW P e v   m a x
Minimum power recharge2 kW P e v   m i n
Supply efficiency95% σ e v r
Recharging efficiency95% σ e v s
Self-discharge rate0.525%βev

Share and Cite

MDPI and ACS Style

Moya, F.D.; Torres-Moreno, J.L.; Álvarez, J.D. Optimal Model for Energy Management Strategy in Smart Building with Energy Storage Systems and Electric Vehicles. Energies 2020, 13, 3605. https://0-doi-org.brum.beds.ac.uk/10.3390/en13143605

AMA Style

Moya FD, Torres-Moreno JL, Álvarez JD. Optimal Model for Energy Management Strategy in Smart Building with Energy Storage Systems and Electric Vehicles. Energies. 2020; 13(14):3605. https://0-doi-org.brum.beds.ac.uk/10.3390/en13143605

Chicago/Turabian Style

Moya, Francisco David, José Luis Torres-Moreno, and José Domingo Álvarez. 2020. "Optimal Model for Energy Management Strategy in Smart Building with Energy Storage Systems and Electric Vehicles" Energies 13, no. 14: 3605. https://0-doi-org.brum.beds.ac.uk/10.3390/en13143605

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop