Next Article in Journal
A Data Mining Approach to Identify NBA Player Quarter-by-Quarter Performance Patterns
Previous Article in Journal
TACO: Adversarial Camouflage Optimization on Trucks to Fool Object Detectors
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Home Electricity Sourcing: An Automated System to Optimize Prices for Dynamic Electricity Tariffs

by
Juan Felipe Garcia Sierra
1,*,
Jesús Fernández Fernández
1,
Diego Fernández-Lázaro
2,
Ángel Manuel Guerrero-Higueras
1,
Virginia Riego del Castillo
1 and
Lidia Sánchez-González
1
1
Department of Mechanical, Informatics and Aerospace Engineering, Universidad de León, 24071 León, Spain
2
Department of Cellular Biology, Genetics, Histology and Pharmacology, Faculty of Health Sciences, Universidad de Valladolid, Campus de Soria, 42004 Soria, Spain
*
Author to whom correspondence should be addressed.
Big Data Cogn. Comput. 2025, 9(4), 73; https://doi.org/10.3390/bdcc9040073
Submission received: 3 December 2024 / Revised: 19 February 2025 / Accepted: 19 March 2025 / Published: 21 March 2025

Abstract

Governments are focusing on citizen participation in the energy transition, e.g., with dynamic electricity tariffs, which pass part of the wholesale price volatility to end users. While often the cheapest alternative, these tariffs require micromanagement for optimization. In this research, an automated system capable of supplying electricity for home use at minimal cost called Smart Relays and Controller (SRC) is presented. SRC scrapes prices online, charges a battery system during the cheapest time slots and supplies electricity to the home energy system from the cheapest source, either the battery or the grid, while optimizing battery life. To validate the system, a comparison is made between SRC, a programmable scheduler and PVPC (Spain’s dynamic tariff) using twenty-eight months of hourly historical data. SRC is shown to be superior to both the scheduler and PVPC, with the scheduler performing worse than SRC but better than PVPC (T.T., p < 0.001). SRC achieves a 36.16% discount over PVPC, 13.89% when factoring in battery life. The savings are 44.24% higher with SRC than with a scheduler. Neither inflation nor incentives to reduce costs are considered. While we studied Spain’s tariff, SRC would work in any country offering dynamic electricity tariffs, with benefit margins dependent on their particularities.

1. Introduction

Governments all around the globe have established climate change policies and regulations to minimize the human footprint on the planet, such as those in Europe [1]. These general frameworks and directives directly translate into country-specific measures: for instance, in Spain, this results in specific regulations for the electricity market [2]. These regulations put the focus on all of us as individual citizens, so that we become active participants in the energy transition [3], taking advantage of new technologies to reduce our bills and actively participating in the market. At the same time, governments pay special attention to protecting vulnerable consumers.
With electrical energy prices on the rise, we try to minimize our electric bills, either by opting for the most advantageous tariffs on the market or (and) by installing renewable-energy-based home systems intended for self-consumption, either as a complement to grid electricity or as the sole energy supply mechanism. In this research, we do not consider the latter, since its use is still marginal around the world and in Europe, even in Spain (with many daily sun hours), where barely 0.1% of residential properties benefit from them [4] (we may note, however, that some authors suggest this situation may change in the near future [5,6], despite the challenges to overcome [7]). Instead, we focus exclusively on electrical grid energy, as it statistically accounts for most of the energy used in residential settings.
While all tariffs of countries belonging to the European Union (EU) must comply with EU regulations, and despite significant efforts in market integration and regulatory harmonization, electrical supply regulation still varies depending on each country to adapt to its energy generation particularities and the climate and weather impact on them, resulting in different prices for consumers [8,9]. In this regard, the EU periodically publishes statistics on electricity prices for household consumers in Europe (for instance, see [10] for the first half of 2023) and general reports on European electricity markets [11] (also see [12] for Q4 2022). Given the above, we focus on Spanish regulation, which is almost identical to Portugal’s.
In Spain, there are free and regulated market tariffs. For both markets, the government sets the base rate for the electricity supply, which is either directly paid by the user in the regulated case or baked into the company’s expenses offering free market tariffs. While specific analysis of the market, individual households and consumption habits is necessary, opting for the regulated market and directly paying for the government rate, intended to protect the most vulnerable consumers and users, is usually the cheapest alternative for household electricity use, even if eventual offers look attractive in the short term. As of November 2023, the name for this regulated tariff is Precio Voluntario para el Pequeño Consumidor 2.0 TD (voluntary price for the small consumer; PVPC from now on). It is a market-linked and, since June 2021, hour-dependent tariff that accounts for the amount of variable energy consumed during each billing period (usually one to two months). It was introduced in 2013, and, since April 2014, Red Eléctrica (the national electricity grid operator) calculates these prices for the next day and publishes them daily on its website at around 20:15 [13]. Several alternative websites can be used to gather this very same information, such as Tarifaluzhora [14] or Energía Gurú [15]. As we previously stated, this tariff is often the most economical alternative even if the user does not restrict all their electrical consumption to the cheapest hours of the day and has no incentive if most energy usage is concentrated in these periods, which is not always easy, since those periods usually encompass night and early morning hours.
In this study, we present a fully functional prototype capable of managing and supplying electricity for home use at its minimum daily cost. Our system scrapes hourly tariff prices for the next day directly from the official channel (Red Eléctrica website in the case of Spain), charging a battery system only during the cheapest hours for that day and supplying electricity to the home energy system from the cheapest hourly source, either the battery or the main grid. The battery system is designed to have enough capacity and power output to supply energy for a whole day of use. We also establish a comparison between our prototype and a simpler scheduler to operate and charge the battery system.

Related Work

To the best of our knowledge, there is neither a direct equivalent nor a similar fully functional system to the one we propose in our research. Refs. [5,6] discuss multi-energy systems (MESs) and evaluation models, respectively. However, ref. [5] lacks real-time adaptability or a focus on residential BESS, and ref. [6] does not provide implementation details. This work addresses these gaps by focusing on automated, real-time energy management within a home energy system.
The aforementioned regular programmable scheduler, often found with hybrid inverter chargers in BESS (to allow for batteries to store energy from the grid when there is no photovoltaic energy generation), is the closest available technology [16,17,18]. However, they focus on schedulers for energy systems. Ref. [16] emphasizes fixed-time schedulers without adapting to hourly energy prices. Ref. [17] introduces day-ahead management but omits battery cost considerations. Ref. [18] requires user intervention for manual scheduling. All of these systems require manual (daily) calculations and reprogramming to match the next day’s cheapest hours, which is a daunting task at best. Our work uniquely automates scheduling while considering both energy prices and battery life economics.
Also somewhat related are storage heaters, heat-retention electric radiators that charge at night and then slowly release the stored heat during the day [19,20]. These devices also have a programmer to set up the charge/release cycle to run on cheaper night-time electricity. However, this solution only stores heat, so it is not a general-purpose system like ours, which stores electricity. Additionally, the programmer must be manually set up, which would again require daily online price checking and device reprogramming to accommodate the cheapest hours of the day.
Finally, proposals for multi-energy systems (MESs) integration with a central controller that schedules energy use exist [20]. The most relevant examples are hybrid heating technologies [21,22], which involve investment models for heat integration via residential hybrid heating systems. Although these proposals minimize the economic cost of energy and use smart controllers, they focus only on heating (i.e., they demonstrate cost and strategic benefits, especially when using heat pump–gas boiler systems). Moreover, they do not actually implement the smart controller but only describe it as a requirement for the system. Even if implemented, such a controller would still require manual programming to obtain real-time electricity pricing and adapt to market conditions [21,23].
Table 1 summarizes the key differences between the existing studies and our proposed system (SRC), highlighting how our system overcomes them by providing fully automated scheduling and real-time adaptability for general-purpose energy management.
Table 1. Comparison of existing energy management systems and SRC.
Table 1. Comparison of existing energy management systems and SRC.
StudyFocus AreaKey LimitationContribution of SRC
[5]Hybrid heating systems (MES)No real-time adaptability, no BESS focusReal-time pricing adaptability, focus on BESS
[6]MES evaluation modelsLack of implementation detailsImplementation of automated energy management
[16]Fixed-time schedulers for BESSNo adjustment to hourly energy pricesAutomated dynamic scheduling based on price
[17]Day-ahead energy managementNo integration of battery cost considerationsConsiders both battery life and energy economics
[18]Manual schedulers for residential useRequires user interventionFully automated, user-free optimization
[19]Storage heatersOnly stores heat; requires manual setup for daily schedulingGeneral-purpose energy storage and automation
[20]Heat-retention electric radiatorsSame as [19]; limited to thermal energyReal-time adaptability, general-purpose storage
[21]Hybrid heating technologies (heat pump/gas)Focuses only on heating; no implementation of smart controllersGeneral-purpose system with implemented automation
[22]Hybrid heating cost minimization modelsRequires manual programming to adapt to pricing conditionsFully automated energy optimization and control
In the following sections, we detail our proposal, present our results and analysis, summarize our conclusions and outline the potential directions for future work.

2. Materials and Methods

Our smart electrical system has two main functionalities: storing electrical energy at its cheapest daily rate and allowing the user to use electricity at its lowest instant price, either from the energy stored in the battery or directly from the grid.
It may seem surprising that drawing energy directly from the battery, which is charged at the cheapest daily rate, can be more expensive than obtaining it directly from the grid. However, there are three scenarios in which this can occur (we elaborate on these further in the System Architecture section):
  • When the battery is charging: During battery charging time slots (where a slot is equivalent to one hour), electricity is already at its minimum price; therefore, it is more efficient to cover any instant demand directly from the grid.
  • When efficiency losses offset the energy price difference: Even if the instant energy cost from the grid is theoretically higher than when the battery is charging, not all energy stored in the battery can be retrieved. This results in a higher actual cost for battery-stored energy. The percentage of energy stored in a battery that can later be recovered is known as round-trip efficiency.
  • When the battery energy cost offsets the grid energy cost: Batteries have a limited life (they lose capacity over time), which is typically measured in charge cycles (a full cycle meaning discharging from 100% to 0% and then recharging to 100%). Therefore, using energy from the battery (and consuming part of its life) may turn out to be more expensive than drawing energy from the grid.
These are the reasons why a system like ours is necessary to make this proposal financially viable, as a simpler solution, like a regular programmable scheduler for off-peak charging and free on-demand use (similar to the ones used with a hybrid inverter charger in backup-only or time-based control modes [16,17,18]), would not suffice.

2.1. System Architecture

Our system encompasses several key subsystems: the system core (called SRC, consisting of three AC smart relays and a network-enabled electronic microcontroller), a (usually pre-existing) local network with internet access and an AC-coupled battery energy storage system (BESS).
Smart relays are electronic switches that allow energy to flow from the electrical grid into the storage system (for battery charging), from the storage system to the household electrical system (for battery energy use) and from the city grid to the household electrical system (for grid energy use). We call them the battery charging relay (BCR), battery use relay (BUR) and grid use relay (GUR). The term “relay” could also be substituted with “contactor”, since we are working with high loads (above 15 A).
To ensure the reliability of the system, we can use relays rated for up to 100,000 electrical cycles at full load [24,25], which exceed the operational requirements of the system. Features such as arc suppression are implemented to minimize contact wear and optimize longevity.
The electronic controller directly operates all three relays, and the main innovation of our system lies precisely in how it does so: On the one hand, to allow for battery charging, it closes the BCR during the n-cheapest hours and keeps it open for the rest of the day. The value of n can be set up, allowing us to balance savings from obtaining the cheapest prices (lower n value) with the costs of more peak power needed (the shorter the charging period, the more power is required to fully charge the battery).
On the other hand, to allow for stored energy usage, the controller closes the BUR only when using stored electricity is truly cheaper than taking it directly from the grid. To do so, the controller uses the grid’s hourly energy cost, its corrected efficiency cost and the battery energy cost (see the System Costs section for definitions). If this condition is not met, the BUR remains open, and the GUR is closed to allow for direct grid energy use. Table 2 summarizes the logic states of the relays.
The electronic controller obtains the cheapest energy rates for the day from the website of the national energy provider (there are also third-party websites that publish this information in case the former is unavailable for any reason) [14,15,26]. It then performs calculations to establish BCR, BUR and GUR scheduling for that day:
  • BCR is closed (energy can flow from the grid to the battery, charging it up; note that the battery will only charge if its current capacity is lower than its maximum capacity) during the n cheapest energy hours. n is the number of time slots (each slot equals one hour) required to fully charge the battery from 0 to 100%. It depends on the battery pack and can be set by the user. We elaborate on this further in the following sections, as several aspects need to be considered (economic benefit, peak power, impact on battery life, etc.). BCR remains open (energy flow from the grid to the battery is interrupted) during all other time slots.
  • BUR is closed (energy can be recovered from the batteries and converted back to AC for home use) during time slots (remember, 1 slot = 1 h) when the corrected efficiency cost plus battery energy cost are lower (cheaper) than the current energy price. The corrected efficiency cost is the official energy cost for that time slot (as obtained from the energy authority website) adjusted (increased) to account for losses due to the process of storing and retrieving energy to/from the batteries. The battery energy cost is the cost to battery life incurred during this store/retrieve process. Both costs are added together and must be lower than the current grid energy cost for that slot (otherwise, we would be losing money). BUR remains open (energy flow from the battery to the home electrical system is interrupted) if this condition is not met.
  • GUR is mutually exclusive with BUR (logically and electrically): It is closed (energy flows from the city grid to the home energy system) when the BUR closing condition is not met, that is, when the corrected efficiency cost plus battery energy cost are higher (more expensive) than the current energy price. It is also closed when battery reserves are insufficient, regardless of energy cost. It is open otherwise. See the System Costs and System Benefits sections for more details regarding the logic behind the BUR and GUR relays.
  • To ensure uninterrupted electricity supply, the system will prioritize direct grid usage when battery reserves fall below a predefined threshold or during battery charging, as outlined in Table 2.
BCR, BUR, GUR and the controller are encapsulated in a single device that we call Smart Relays and Controller (SRC) and form the core of our system (note: SRC also stands for “source”, hence the wordplay in the manuscript’s title). SRC is connected to the grid and to both the input and output of the BESS. The AC-coupled BESS system is not directly connected to our household grid, as SRC now properly regulates energy flow.
Figure 1 shows a simple internal wiring diagram of SRC and its relays. Other components, including the controller, power electronics and their connections, are not depicted. All connections shown are AC: 1 goes to Hybrid inverter AC in, 2 comes from inverter AC out, 3 connects to the city grid, and 4 connects to home electrical systems. Please note that GUR and BUR cannot be closed at the same time, as they control different power sources for the house wiring.
Figure 2 depicts the integration of our proposal with the typical home wiring (solar panels are optional). SRC is ready for installation by a qualified electrician without modification of any other component of the electrical system.

2.2. Implementation

We implemented the controller using an ESP32 board equipped with a Wi-Fi module to connect to a local network with internet access, but other boards or manufacturers (such as Raspberry Pi) would suffice. Since the rates are published once a day and are valid for the entire following day, only one connection per day is necessary to obtain this information.
BCR, BUR and GUR are dry-contact, high-power (63 A), latching smart relays. Their communication with the controller is established via the I2C wire protocol, and the controller connects to the user’s local network via ethernet or Wi-Fi (we discarded other low-power, short-range connectivity protocols like Bluetooth to minimize connection range issues). An internet connection is mandatory for the system to function, as it must download the electricity prices to operate properly.
Local network credentials and the URL for obtaining daily electrical rates can be set up using our app. They can also be manually configured by editing the main .xml configuration file if the user has technical knowledge, but this is not recommended.
The AC-coupled BESS is the last component of our system. A BESS consists of battery cells arranged in modules that form a battery pack and an energy center encompassing a charger module (with a step-down converter, a rectifier and other components) to convert AC to DC, along with a charge controller to charge the batteries and a DC-AC inverter to make stored energy usable again through the home electrical network. The term “AC-coupled” refers to the fact that the BESS is ready for use with an existing AC infrastructure, meaning it has AC inputs/outputs and works as a “plug-and-play” solution for the existing home AC network.
The BESS must be properly sized to provide enough electric power for a whole day of average use. This makes it dependent on each user’s particular situation. From an economic point of view, this is the key component of the system, as it is the most expensive part, and its high price has been the reason why systems like ours have never been profitable in the long run—until now.
The BESS can also be used to benefit from renewable energies (e.g., solar panels) if available, although this is not the focus of our research. In fact, both the BESS and the network infrastructure may already be part of the user’s home infrastructure, in which case the SRC unit would be the only necessary component for integration.

2.3. System Costs

To assess the economic feasibility of our system, the AC-coupled BESS (which includes the batteries and the required energy center with the electric and electronic devices needed to make it usable) is the key element due to its high cost (the cost of all other components is negligible in comparison and is amortized even during the first few months of using our solution). Additionally, most of the cost comes from the battery pack itself, which is also the component most likely to fail first (with a specified number of charging cycles under warranty and a 25+ years life expectancy). As previously mentioned, the BESS must be properly sized to provide enough electric power for a full day of average use.
Current advances, especially due to the electric car and renewable energy use, have flooded the market with several viable solutions [27]. Any technology for energy storage is valid as long as it has no memory effect (which would heavily degrade battery life due to partial charging cycles like those experienced in a home-use setting).
To assess BESS technical specifications and cost, we must first establish what we consider the standard home electricity requirements to be—that is, how much electric power we use during the day and the maximum peak power needed [28,29,30]. We set these values as the required amount to cover all daily electrical needs of a 90 sqm home with an electric water heater, electric cooker and oven, where 3 adults or 2 adults and 2 children live together. After performing calculations using several online tools offered by electrical energy providers and other third parties [31,32,33,34], we concluded that we would need a maximum of 4526 kWh/year, or 12.4 kWh/day. For peak power, according to those same tools, a value between 4.6 kW and 5.75 kW is recommended; therefore, we took 4.7 kW, which is already on the lower end of the interval.
Table 3 and Table 4 show details of several off-the-shelf AC-coupled BESSs that meet these requirements, including their warranty and cost (data are split into two tables for readability) [35,36,37,38]. We originally obtained these data after performing quick Google searches in June 2022, but we updated the prices to reflect the current market value (which is around 20% higher than what we originally found). Please note that this list is not exhaustive; the tables contain just a selection of BESS solutions that fit our requirements based on the first few pages of results that Google offered when searching for “battery system for home”.
Once we know we have several BESS options to choose from, and in order to properly assess and analyze our system costs, we must consider efficiency losses and battery life.
Regarding efficiency losses, energy is lost when charging the batteries—specifically when converting AC to DC (charging efficiency), when retrieving energy from the batteries (round-trip efficiency; not all stored energy can be retrieved) and when converting retrieved DC energy back to usable AC energy (inverter efficiency) [39].
According to product vendors, all the presented (and most commercial high-end) BESSs offer a total round-trip efficiency slightly above 90% and charging and inverter efficiency above 97.5%. These values are Euro Efficiency, an average operating efficiency over a yearly power distribution corresponding to a middle-European climate, and are the referenced value on almost any inverter/hybrid inverter datasheet. It is considered a more useful metric than peak efficiency [40].
While these values have been verified to be realistic in several studies [41,42,43,44], we propose to follow a “worst-case scenario” approach to analyze the economic viability of our system. As such, we are considering values lower than those: 96% for battery round-trip efficiency, 97% for both charging and inverter efficiency, and thus a total system efficiency of 90%.
Regarding battery life, it is well known that battery capacity degrades with each charge cycle, and degradation is accelerated with fast charging or when charging/discharging the battery beyond certain thresholds. Conversely, slow and partial charging can significantly extend battery life [45,46,47].
Battery life is measured by the maximum capacity retained after n cycles (one cycle being a full discharge and a full charge). Vendors provide these values in their product datasheets and offer warranties (i.e., a replacement for the failing battery pack) if any of these values are not met under normal usage conditions, which are also specified in the warranty (usually limited to one cycle per day).
By applying our worst-case policy, we strictly follow the vendor’s warranty regarding battery life and assess our system’s validity (i.e., the battery retains enough capacity) and profitability assuming the battery pack fails right after the warranty period expires. Furthermore, we do not consider any optimization techniques (other than those already implemented by the vendor and considered when offering their warranties). This approach ensures that if the battery fails during the warranty period, we are fully covered, and if it fails afterward, our system will have already (at least) paid for itself. Any extra time the battery lasts for while retaining sufficient capacity, or any additional battery life optimization techniques we use, will only increase the profitability of the system.
To achieve this, we define a battery cycle cost (EUR/cycle) as the total cost of the battery pack (EUR) divided by the number of cycles covered by the vendor’s warranty. This value allows us to establish a metric called the battery energy cost, measured in EUR/kWh, which is calculated by dividing the battery cycle cost (EUR/cycle) by the battery’s maximum usable capacity (kWh). Costs related to electrical installation or the acquisition of a hybrid inverter are not included in our calculations, as, unlike batteries, these should be a one-time payment due to their significantly higher life expectancy [16]. Table 4 shows the warranty details for each BESS depicted in Table 3 and calculates these metrics for each of them.
We are also not considering any European or national subsidies or incentives to reduce BESS acquisition and installation costs [48,49,50,51], as these are usually tied to photovoltaic or concentrated solar power (CSP) installations [52,53]. However, we mention them, as their existence could make our proposal even more attractive in such situations, as costs could be reduced by 30–40% in some cases [54,55].
Additionally, we do not account for any potential discounts from the manufacturer when purchasing several battery modules for a BESS. This could be a very interesting option for a building of apartments, where the roof could be equipped with solar panels, and the whole community could benefit from a hybrid solar–grid electricity supply.
In the next section, we establish a comparison between the battery energy costs and the energy savings offered by our proposal over time (in years) to assess the validity of the system. We also compare our system’s economic performance with that of a simple scheduler (timer) used with a hybrid inverter charger.

2.4. System Benefits

The most straightforward benefit of our system is economic: if we can gather cheap energy from the grid and use it when energy is more expensive, we will (or should) be saving money. There are also several side benefits, such as keeping us green (off-peak energy comes mostly from renewable sources that have minimal environmental cost compared to fossil fuels or nuclear energy) or increasing the electrical resilience of our system (offering increased protection against short circuits, overloading or supply interruption).
The economic benefit is the most relevant for our research; therefore, we must prove that our system is really economically viable. We have to consider both energy and power as described for the PVPC tariff [26].

2.4.1. Energy

The main objective of our system is being able to store cheaper and greener energy from the grid during the cheapest off-peak time slots (one slot equals one hour) to later use it during peak (more expensive) time slots. Most (if not all) benefits of our proposal will come from this feature alone, but implementing it is not as straightforward as it seems.
PVPC establishes three time frames for energy prices: peak (most expensive, 8 h a day Monday to Friday, from 10:00 to 14:00 and from 18:00 to 22:00), flat (8 h a day Monday to Friday, from 8:00 to 10:00, from 14:00 to 18:00 and from 22:00 to 0:00) and valley (cheaper, Monday to Friday, from 0:00 to 8:00, and every hour of weekends and public holidays) [26]. For a given day, the peak hourly energy prices in EUR/kWh are always higher than flat prices, and flat prices are higher than valley prices.
However, we must consider several pitfalls:
  • There can be a wide difference between prices within each of these time frames for a given day (e.g., electricity can cost EUR 0.05/kWh at 3:00 and twice that amount at 4:00—or the other way around—even if both slots belong to the valley period).
  • Cheaper energy prices occur at different times depending on the day (e.g., electricity may be cheapest at 5:00 a.m. on a given Saturday and at 18:00 the following one).
  • Electricity prices can vary a lot from day to day, both within a period (i.e., peak prices for one day can be much cheaper or more expensive than peak prices for the previous day) and between periods (i.e., peak prices for one day can actually be lower than off-peak prices for the previous day).
Additionally, it is important to consider that off-peak energy stored in batteries and subsequently recovered does not necessarily have to be cheaper than peak energy costs, as explained in the previous section: we incur losses when converting energy from AC to DC for storage (charger), losses when recovering energy from the battery (round-trip) and losses when converting DC back to AC (inverter). This means that we cannot simply compare off-peak and peak prices directly; we have to account for these losses, which is what our system does.
These are the reasons why a regular timer or scheduler (store energy in batteries at valley slots, use it until drained during peak and flat slots) may not suffice and the reason why we include calculations for it in our experiments to establish a comparison with our system.

2.4.2. Power

In Spain, users must pay a fixed amount depending on the maximum power they are able to instantly draw from the grid during a billing period. In the PVPC tariff, the user chooses (and pays) for peak power during two different periods: off-peak periods (Monday to Friday from 0:00 to 8:00 and all hours during weekends and public holidays) and peak periods (the rest of the time). The more power they want or need, the more they pay [26].
We can save money by properly adjusting peak and off-peak power to meet our actual needs. To do so, we must first understand that instant maximum power is not really an instantaneous (say, milliseconds) measurement of the power used but the average power during a given time frame. The current smart meters follow Spanish UNE 20.317 [56], which establishes by how much time the user can exceed their maximum power before supply is interrupted. For instance, power can be 1.5 times higher for an interval of 10 s to almost 2 min (depending on the company), and it can be 1.15 times higher even for hours. On top of that, companies also check for maximum quarter-hourly power, which is the average maximum power in 15 min intervals, starting at 0:00. There will be no additional interruptions as long as this value is not above the maximum power. Users can check the maximum power they really used during a given billing period (this is included in the monthly bill) and try to manually adjust (lower) the maximum power they pay for.
In our experiments, we will consider all of these factors to optimize maximum power during both peak and off-peak periods. We can empirically obtain the real maximum peak and off-peak power for a relevant period of time (more than two years) and adjust the maximum power we pay for accordingly. This directly translates into our system needing lower peak power (since we optimize it to real values) and much higher off-peak power (which we need to top up batteries, but it is much cheaper than peak power). The possible losses or savings in this regard will be much lower than those of energy, but they must be accounted for nonetheless.

2.5. Experiments

To properly assess the validity of our proposal, we compared the real costs and savings of our system with those of the PVPC tariff for as long as it has been in place (from June 2021 to September 2023). To do so, the first thing we needed was real and accurate historical hourly data for both prices and demand from the electricity market.
For the price, we obtained the historical hourly PVPC 2.0 TD tariff (in EUR/kWh) for this period of time from the eSios website [57] (eSios is Red Eléctrica’s system that performs information and process management tasks specifically related to the electricity market in Spain).
Regarding demand, this website also offers hourly data for real electrical energy demand (in MWh) along with its associated PVPC cost, but it does so for the entire Spanish electricity market with regulated prices, and we are interested in consumption patterns just for the average home user with the PVPC 2.0 TD tariff. While it is impossible to establish a universal hourly electric demand for homes in Spain due to their heterogeneity, we can greatly benefit from the way Red Eléctrica estimates next-day prices by using electricity consumption profiles.
Such consumption profiles represent the percentage of total (yearly) energy consumed for the average tariff user in a reference time slot (one hour) and are used to estimate the hourly electricity demand of consumers of a certain type (we are interested in data for PVPC 2.0 TD exclusively) based on non-hourly measurement records (daily, monthly or yearly readings). This information is published in the Publicación de los perfiles finales de consumo (PERFF) files and is freely available for consultation and download at [58]. The explanation, method of calculation and market value for these metrics are beyond the scope of this publication but are detailed in [44].
After downloading these files for the studied period, obtaining detailed hourly demand using this method was as straightforward as multiplying the hourly profile values by the total yearly electricity demand of the user [44], which we established to be 4526 kWh/year (see the System Costs section for details).
To account for the savings of our proposal, we calculated the real cost of both the PVPC 2.0 tariff and that of our proposal from the detailed price and demand data we gathered. In both cases, we considered energy and power-related costs, and for our system, its real operational logic was taken into account (i.e., comparing prices to establish energy consumption and relay operation patterns for battery charge/use). We also calculated the cost of using a regular programmable scheduler for off-peak charging and free on-demand use during the rest of the time.
To account for the costs of our proposal and those of the scheduler, we considered the BESSs presented in the System Costs section. Specifically, we used the battery cycle cost (EUR/cycle) and the battery energy cost (EUR/kWh) metrics applied to the energy usage data we obtained from the savings calculations for our system.
In order for our system to be economically viable, the costs must be lower than savings. Since, as previously mentioned, we always considered the worst-case scenario (battery failing as soon as the warranty expires) when obtaining these costs, our proposal’s validity will be assured. From that point on, we could even make it more profitable if battery packs from BESSs last longer than their warranted life (i.e., we can increase the lifetime of current commercial batteries if the optimization charge/discharge patterns are implemented [59,60,61], although that is not part of our research).

2.6. Optimization Problem Formulation and Solution

In this section, we formally define the optimization problem that governs the operation of the SRC system. The objective is to minimize the total electricity cost by optimally deciding whether to consume energy from the battery or the grid in each time slot while accounting for battery efficiency losses and recharging and degradation costs.

2.6.1. Decision Variables

d t   : Total household energy demand at hour t (kWh).
p t : Electricity price at hour t (EUR/kWh).
g t : Energy drawn from the grid at hour t (kWh).
b t : Energy drawn from the battery at hour t (kWh).
s t : Battery state of charge at hour t (kWh).
η : Battery efficiency ( 0 < η     1 ) set at 0.90, as per Table 4 (worst-case battery scenario).
B C : Maximum battery capacity (kWh).
B c c : Battery cycle cost, calculated as the total battery pack cost divided by the number of cycles covered under the vendor’s warranty (EUR/cycle).
B e c : Battery energy cost, B c c divided by B C (EUR/kWh).
P m i n 3 : Average of the three lowest electricity prices of the day (EUR/kWh).
B e c ( t ) : Cost per unit of energy drawn from the battery at hour t (EUR/kWh), considering acquisition and degradation costs ( B e c ) and recharging costs.
T : Optimization time horizon (24 h).

2.6.2. Objective Function

The goal is to minimize the total cost of electricity consumption over a 24 h period:
m i n t = 1 T ( p t g t + B e c ( t ) b t )
where
B e c ( t ) = B e c + 1 η   P m i n 3
B e c is 0.0534 EUR/kWh, the fixed battery energy cost (taken from Table 4).
P m i n 3 is the average of the three lowest hourly electricity prices for the day.

2.6.3. Constraints

I. Energy balance equation
s t = s t 1 + η g t b t , t = 1 , , T
This ensures that the battery charge is updated correctly based on the energy drawn from the grid and used from the battery.
II. Battery charge limits
0 b t s t , t = 1 , , T
This guarantees that the battery’s state of charge never exceeds its maximum capacity.
III. Battery discharge constraint
g t + b t = d t , t = 1 , , T
This ensures that the battery never discharges more energy than it has stored.
IV. Energy demand satisfaction
g t + b t = d t , t = 1 , , T
This ensures that the household energy demand dtd_tdt is always met.
V. Optimal energy source selection
b t > 0   i f   a n d   o n l y   i f B e c ( t ) < p t
This guarantees that the battery is only discharged when its energy cost is lower than the grid price.

2.6.4. Solution Approach

We solved this optimization using linear programming (LP) with the HiGHS solver, ensuring an optimal allocation of grid and battery energy over a 24 h period. The results demonstrate that the system correctly selects the most cost-effective energy source at each hour of the day, balancing between grid electricity and stored battery power. The total optimized daily cost is EUR 4.72/day compared to EUR 5.13/day without the system, representing an approximate 8% cost reduction. Future research could integrate stochastic programming techniques, such as Markov decision processes (MDPs) or Monte Carlo simulations, to further refine the optimization strategy under uncertain price scenarios.
Given the significant variability in electricity prices (as shown by their large standard deviation), a deterministic LP approach only provides a theoretical baseline for decision making. In practice, the achieved cost savings could be significantly higher, particularly on days with extreme price fluctuations. Because our system dynamically adjusts energy usage in real time based on market conditions, it inherently benefits from market volatility. This makes it more effective when price disparities between peak and off-peak hours are larger. This suggests that, under real-world conditions, the system’s impact may extend beyond the estimated savings obtained theoretically.
For real-world application, instead of relying solely on static optimization, the system employs a real-time rule-based control strategy, dynamically adjusting energy consumption based on updated electricity prices (see Section 2.1 and Section 2.5 for details on system operation). This approach ensures that the system remains adaptable to market fluctuations and maximizes energy savings on a daily basis while also reducing the reliance on long-term forecasts.
Our methodology aligns with established rule-based control strategies in energy management systems, where decision making is guided by predefined cost thresholds and updated in real time. The implemented strategy effectively integrates theoretical optimization with practical system constraints, ensuring both cost effectiveness and operational feasibility.
All the information we gathered and the calculations performed on it are included as Supplementary Information for this research. In the following sections, we present our results, conclusions and recommendations.

3. Results

Figure 3 and Figure 4 show the average and standard deviation of electricity prices (PVPC 2.0 TD) for the studied period, respectively. As previously mentioned, peak prices will always be higher than flat and valley prices, and flat prices will always be higher than valley prices for a given day. However, variations can occur between days. This is why the average valley price in July, August and September 2022 is so close to the average flat price and even higher in July and August: electricity prices on all-valley days (weekends) were very high during those months, causing the average valley price to surpass the average flat prices. Figure 3 also includes the average of the three minimum daily prices to give a visual clue about the kind of savings we are striving for when using our proposal. Figure 4 makes it clear that valley prices are also the ones presenting a higher degree of monthly variation (monthly as per the data shown, but also daily upon inspecting all data presented in S1), especially for the aforementioned months. Our system can dynamically adapt to price changes and use the battery system only when economically beneficial; therefore, this situation does not affect it. However, this will make the regular scheduler solution even detrimental, as we will explain further in this section.
Figure 5 shows the average energy price and the energy demand for the standard home (as presented in the System Costs section) over the analyzed time frame. Even though demand affects energy prices, they do not fluctuate following the same pattern (e.g., winter 2022 energy demand increases while energy price drops), as demand is not the only factor to consider.
Table 5 summarizes the results for the real maximum (quarter-hourly) energy demands for the different PVPC periods over the analyzed time frame, as well as the peak and valley power required during those periods.
Table 6 shows the peak and off-peak power from Table 5, corrected to account for the 15 kWh battery when working with n-charging slots (one charging slot means we charge the battery in one hour). Peak power is actually lowered, considering the smart meter peculiarities explained in the previous section, and off-peak power takes into account simultaneous real demand plus battery charging requirements.
As expected, off-peak power is high to accommodate for battery charging (especially if we want to achieve faster and thus cheaper charging), but peak power can be optimized compared to the PVPC tariff (4.7 kW), as introduced in the System Costs section. We do not consider battery usage during peak time frames (and thus, its beneficial effect in lowering peak power), since we are following a worst-case scenario policy (i.e., it may not be economically feasible to use the battery on a given day, as the battery energy cost may be even higher than peak grid electricity for that day). The PVPC 2.0 TD tariff allows for a maximum power of 10 kW [26]; therefore, the one-slot charging option is not valid for us, as it requires almost 15 kW of power.
Given that all these calculations are based exclusively on real data analysis and are not dynamic (our system does not vary the power depending on any future published data regarding energy costs or based on energy use other than past data), we will consider them as valid for both our proposal (SRC system) and a regular scheduler. Therefore, there would be no economic difference between them regarding power costs and savings compared to PVPC.
After we establish the power requirements for every n-charging slot configuration, we can calculate the total cost of our system, which is the sum of power costs and energy costs, as explained in the System Benefits section. The fewer the charging slots, the less we pay for energy (since we can charge the battery in fewer slots and thus at cheaper prices), and the more we pay for power (more maximum power is needed to charge the battery in a narrower time span). Since the energy cost weighs more than the power cost for a regular home using the PVPC tariff, the total cost of our system is lower the fewer slots we need to top up our batteries, with two being the minimum we can use with the PVPC tariff. Table 7 summarizes our results for the entire studied time frame, from June 2021 to September 2023.
In the remainder of this section, we also take battery life into consideration and compare our proposal with both PVPC and a regular scheduler. All the presented data correspond to the three-slot charging results (batteries are charged for a maximum of 3 h using the three minimum electricity prices for that day), since this was the most profitable setup we could afford, taking into account the power limitations of both the studied batteries and the PVPC tariff. However, all configurations (1, 2, 3, 4, 6 and 8 charging slots) were studied, and all of them were profitable (cheaper than PVPC, with total savings above the battery energy cost). The full study and tables with detailed hourly granularity are not directly included in the paper due to their length and are instead attached as Supplementary Material.
Figure 6 shows the daily total cost (power and energy) of SRC (blue) compared to PVPC (red) for the studied period (please see S1 for a more readable version, as it requires zooming in to properly appreciate the labels). For PVPC, the minimums in energy cost occur on all-valley energy cost days (weekends and public holidays). For SRC, they correspond to the first regular day after an all-valley day (i.e., a Monday): on that day, the energy cost for our system is very low, since the battery is full (it was likely not used the previous all-valley day and does not start recharging until the next day). For SRC, we always observed large spikes compared to PVPC at regular intervals; these correspond to the days preceding all-valley days (i.e., Saturday), since on those days, the energy use includes both battery charging and almost 100% energy usage directly from the grid (since it is cheaper).
Figure 7 shows the same data but in stacked format, which makes it more straightforward to appreciate. Both figures are intended to be studied at high resolution due to the amount of information they contain. Upon inspection, it is clear that PVPC is more costly than our proposal: PVPC is only better (cheaper) on the days before all-valley days (that is, Fridays).
Figure 8 depicts the monthly savings achieved by SRC compared to PVPC (the monthly SRC cost minus the monthly PVPC cost; in blue) during the studied time frame and the battery energy cost (as described in Materials and Methods) for all the proposed BESS alternatives. Our system is thus economically viable (savings are greater than the battery energy cost) in all months for all batteries, except for the Tesla Power Wall 2. As expected, the greater the difference between minimum and maximum electricity prices, the more beneficial our system becomes (i.e., during the end of summer–autumn 2022).
Figure 9 shows the same results (net balance compared to PVPC) for the regular scheduler. It can be appreciated that we can also obtain benefits with it, but they are always lower than those of SRC. Additionally, there are several months in which the system is, in fact, not viable (the balance is positive compared to PVPC alone, but savings are lower than the battery energy cost, meaning we are losing money).
Figure 10 and Figure 11 show the costs for PVPC, SRC and the regular scheduler. Figure 10 only shows the energy costs, while Figure 11 represents the final cost of the system: total energy cost plus battery energy cost when using the best battery pack according to our calculations, the SMILE-BAT-13.3P + ESS SMILE 5 5000W HYBRID I/C BESS.
Finally, Table 8 numerically summarizes the previous figures: our proposal (SRC) allows for a 44.24% higher economic benefit (net gains after subtracting the battery energy cost) and would pay for the battery pack 30.67% faster than a scheduler used with a hybrid inverter charger. It would also be economically viable in all months for the BESS included in it.

Statistical Significance

Upon statistical analysis of all our results, we can conclude that both our solution and a regular scheduler offer an economically viable (cheaper average daily and monthly prices) solution over PVPC (paired T.T.; p < 0.001; monthly costs, including battery degradation: M_src = EUR 101.47, s_src = EUR 36.18; M_sch = EUR 106.49, s_sch = EUR 39.61; M_pvpc = EUR 117.84, s_pvpc = EUR 40.29; respectively) for the average home (4526.00 kWh/year electricity consumed, average 90 sqm home with electric water heater, electric cooker and oven, where three adults or two adults and two children live together) during the studied period (from June 2021 to September 2023). We can also state that our system (SRC) is better than the regular scheduler when analyzing both hourly costs and final monthly costs (billing period; paired T.T.; p < 0.001).
Considering the studied period, using our proposal, we achieved an average monthly savings of 13.89% over PVPC (EUR 16.37 +/−EUR 5.99), while using a regular scheduler, the savings were 9.63% (EUR 11.35 +/−EUR 4.85), which makes our solution 44.24% better than a regular scheduler. If we only consider raw energy savings (monthly bills) and disregard battery life hidden costs, our solution would offer a 36.16% average discount over PVPC (average monthly saving of EUR 31.30 +/−EUR 6.80), while a regular scheduler would be limited to 23.17% (average monthly saving of EUR 22.17 +/−EUR 5.60).
We also calculated the 99.9% confidence intervals for our key results. For SRC’s total monthly savings over PVPC, the interval was [EUR 12.19, EUR 20.55], while for the scheduler, it was [EUR 7.97, EUR 14.74]. Similarly, the interval for SRC’s raw energy cost savings was [EUR 26.56, EUR 36.03], and for the scheduler, it was [EUR 18.26, EUR 26.08]. These intervals further reinforce the statistical significance and reliability of our conclusions, demonstrating that the observed savings are consistent and not merely a result of random fluctuations. The chosen 99.9% confidence level aligns with the rigorous thresholds used in our hypothesis testing (p < 0.001), ensuring the robustness of our findings.
In addition to confidence intervals, we conducted an uncertainty analysis to enhance the robustness of our results. Uncertainty was estimated using the standard error of the mean (SEM). For the raw energy cost savings, the uncertainty for SRC was EUR +/−1.29, while for the scheduler, it was EUR +/−1.06. For SRC’s total monthly savings over PVPC, the propagated uncertainty was estimated to be EUR +/−1.13, and for the scheduler, it was EUR +/−0.92. These values provide further insight into the variability of the results and reinforce the robustness of our conclusions, confirming that the observed savings are not only statistically significant but also robust to variations in input factors. Future studies could extend this analysis by incorporating Monte Carlo simulations to explore scenarios with even greater variability in inputs and market dynamics, providing further confidence in the scalability and robustness of our approach.
As previously mentioned, the costs related to electrical installation or hybrid inverter acquisition are not included in our calculations, since, unlike batteries, these should be a one-time payment, given their much higher life expectancy. However, even if we include the hybrid inverter acquisition cost as part of the battery energy cost, both the scheduler and our solution would still be superior to PVPC when using the best BESS (paired T.T.; p < 0.001; monthly costs, including battery degradation: M_src = EUR 107.49, s_src = EUR 36.40; M_sch = EUR 110.86, s_sch = EUR 39.88; respectively). In this case, the average monthly savings over PVPC would drop down to 8.78% (EUR 10.35 +/−EUR 5.81) and 5.92% (EUR 6.99 +/−EUR 4.63), respectively. Also, SRC would still be a better option than the regular scheduler for all studied BESSs.
It is also worth noting that, even if the regular scheduler was statistically better than PVPC overall, there were some months in which this solution was detrimental (the monthly bill was actually higher; see Figure 9), while this never occurred with our proposal for any of the considered scenarios. This is a direct result of our software’s ability to calculate real profits by factoring in both grid energy and battery life costs.

4. Discussion

In this research, we presented Smart Relays and Controller (SRC), an automated IT system capable of managing and supplying electricity for home use at its minimum daily costs. Our system scrapes hourly tariff prices for the next day directly from the official channel (the Red Eléctrica website), charging a battery energy storage system (BESS) only during the cheapest hours for that day and supplying electricity to the home energy system from the cheapest hourly source, either the battery or the main grid.
To validate our system, we established a three-way comparison between it, a regular programmable scheduler (both of them coupled with a hybrid inverter charger to operate and charge a battery system) and the regular PVPC tariff. We studied the energy cost we would incur with all of them when applied to the average home (4526.00 kWh/year electricity consumed, 90 sqm home with electric water heater, electric cooker and oven, where three adults or two adults and two children live together) over a 27-month period from June 2021 to September 2023. The electricity demand and prices were taken from the eSios website (Red Eléctrica’s system that performs information and process management tasks specifically related to the electricity market in Spain).
We found that our system (SRC) is economically better than both the regular scheduler and the PVPC tariff, with the regular scheduler performing worse than SRC but also better than PVPC (paired T.T., p < 0.001; monthly costs, including battery degradation: M_src = EUR 101.47, s_src = EUR 36.18; M_sch = EUR 106.49, s_sch = EUR 39.61; M_pvpc = EUR 117.84, s_pvpc = EUR 40.29; respectively).
For the studied period, our solution would have saved us EUR 876.29 compared to PVPC, which accounts for an average 36.16% discount on PVPC electricity bills and 13.89% when factoring in battery life costs. Savings can be expected to be 44.24% higher with our solution than with a regular scheduler.
Although the system faced a period of unusually high electricity prices, it performed well despite the unfavorable conditions. This demonstrates the resilience of the system in scenarios that deviate from typical market conditions.
Our prototype also optimizes battery use (and thus battery life) to always be covered by the manufacturer’s warranty. We obtained these results without considering any European or national subsidies or incentives to potentially reduce BESS acquisition and installation costs.
Since the battery specifications, energy hourly demand and its price are based on real data, as published by battery manufacturers and eSios, respectively, and as we always followed a worst-case scenario approach, we can assure that our system would have been economically reliable and warranty-covered for the whole time frame studied for the aforementioned BESS. We also did not consider inflation, which would make our proposal even more reliable.
The validation of the SRC system relies on a detailed analysis using real-world data, including historical electricity prices and household energy demand. A prototype of the SRC system was developed as a proof of concept, demonstrating the system’s logical and electrical feasibility.

Future Work

Regarding energy price fluctuations (past or future), the maximum and minimum energy costs, in absolute terms, are not important for the system; we are only affected by the difference between them, since we only need to calculate how much money we can save on a daily basis to cover the costs of construction and deployment of our system. Future work will explore the scalability of the system in multi-user scenarios, considering how the adoption of the technology could impact energy prices and market dynamics.
We also plan to explore the system’s adaptability to future policy changes, particularly in relation to electricity pricing policies, including potential regulatory shifts that may alter the cost structure and economic feasibility of the system.
Considering that our system is economically feasible only if a combination of circumstances is maintained for long enough, and keeping in mind the volatile nature of the electricity market, it may be risky to advise the installation of a whole system like ours if one’s current home does not have a working BESS. However, for renewable–grid hybrid systems that already include a BESS (since batteries are an essential part of these systems), our solution could offer significant savings as long as the user opts for PVPC-like tariffs.
Regarding the future viability of our proposal, after years of price drops, the lithium-ion battery pack has remained stable over the last three years (2021–2023), currently sitting at around USD 152/kWh [62]. However, it is expected to continue dropping in the long term, reaching as low as USD 62/kWh by 2030 [63,64], which will further reduce BESS prices, making our solution even more viable.
The European and national regulations for the electric market and the existence of market-linked and hour-dependent tariffs should remain in place until at least 2030 [1,2,3,48]; therefore, our proposal should be valid until at least that year. Some changes to the PVPC tariff for 2024 have already been approved to protect consumers from rare but extreme market volatility, but the hourly discrimination remains [50]; its effect on the price difference between peak and off-peak energy costs and how this affects our prototype is part of our future work.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/bdcc9040073/s1.

Author Contributions

All authors made substantial contributions to the research. Their specific contributions are as follows: J.F.G.S.: Main author. Conception and design of the study, acquisition of data, analysis and interpretation of data. Software design and development. Drafting and critical revision of the article for important intellectual content; J.F.F.: Acquisition of data, analysis and interpretation of data. Software design and development. Drafting and critical revision of the article for important intellectual content; D.F.-L.: Analysis and interpretation of data. Critical revision of the article for important intellectual content; Á.M.G.-H.: Analysis and interpretation of data. Critical revision of the article for important intellectual content. Funding; V.R.d.C.: Analysis and interpretation of data. Software design and development. Critical revision of the article for important intellectual content; L.S.-G.: Analysis and interpretation of data. Critical revision of the article for important intellectual content. All listed authors approved the version to be published and agreed to be accountable for all aspects of the work in ensuring that questions related to the accuracy or integrity of any part of the work are appropriately investigated and resolved. All authors have read and agreed to the published version of the manuscript.

Funding

This initiative was executed within the framework of the Recovery, Transformation and Resilience Plan funds financed by the European Union (Next Generation).

Data Availability Statement

The authors confirm that the data supporting the findings of this study are available within the article and its Supplementary Materials.

Conflicts of Interest

The authors declare no conflicts of interest. All authors certify that they have no affiliations with or involvement in any organization or entity with any financial interest or non-financial interest in the subject matter or materials discussed in this manuscript.

References

  1. Framework Strategy for a Resilient Energy Union with a Forward-Looking Climate Change Policy, European Commission. Available online: https://eur-lex.europa.eu/resource.html?uri=cellar:1bd46c90-bdd4-11e4-bbe1-01aa75ed71a1.0001.03/DOC_1&format=PDF (accessed on 5 November 2024).
  2. European Parliament Directive 2019/944, Common Rules for the Internal Electricity Market, Modification of Directive 2012/27/UE. 5 June 2019. Available online: https://eur-lex.europa.eu/legal-content/ES/TXT/?uri=CELEX%3A32019L0944 (accessed on 5 November 2024).
  3. Cantarero, M.M.V. Of renewable energy, energy democracy, and sustainable development: A roadmap to accelerate the energy transition in developing countries. Energy Res. Soc. Sci. 2020, 70, 101716. [Google Scholar]
  4. Forján, P.E. Análisis de Normativa y Rentabilidad del Autoconsumo Eléctrico en el Mundo: Aplicación en el Sector Residencial. Doctoral Dissertation, Universidad de La Rioja, Logroño, Spain, 2022. [Google Scholar]
  5. Kleinebrahm, M.; Weinand, J.M.; Naber, E.; McKenna, R.; Ardone, A.; Fichtner, W. Two million European single-family homes could abandon the grid by 2050. Joule 2023, 7, 2485–2510. [Google Scholar]
  6. Fedorczak-Cisak, M.; Radziszewska-Zielina, E.; Nowak-Ocłoń, M.; Biskupski, J.; Jastrzębski, P.; Kotowicz, A.; Varbanov, P.S.; Klemeš, J.J. A concept to maximise energy self-sufficiency of the housing stock in central Europe based on renewable resources and efficiency improvement. Energy 2023, 278, 127812. [Google Scholar] [CrossRef]
  7. Camargo, L.R.; Nitsch, F.; Gruber, K.; Dorner, W. Electricity self-sufficiency of single-family houses in Germany and the Czech Republic. Appl. Energy 2018, 228, 902–915. [Google Scholar] [CrossRef]
  8. Weber, C.; Möst, D.; Fichtner, W. Electricity Markets in Europe. In Economics of Power Systems: Fundamentals for Sustainable Energy; Springer International Publishing: Cham, Switzerland, 2022; pp. 315–355. [Google Scholar]
  9. Cassetta, E.; Nava, C.R.; Zoia, M.G. EU electricity market integration and cross-country convergence in residential and industrial end-user prices. Energy Policy 2022, 165, 112934. [Google Scholar] [CrossRef]
  10. Electricity Prices for Household Consumers, First Half 2023. Eurostat. Available online: https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Electricity_price_statistics#Electricity_prices_for_household_consumers (accessed on 5 November 2024).
  11. Reports on EU Gas and Electricity Markets. European Commission. Available online: https://energy.ec.europa.eu/data-and-analysis/market-analysis_en (accessed on 5 November 2024).
  12. Quarterly Report on European Electricity Markets Q4 2022 European Comission. Available online: https://energy.ec.europa.eu/system/files/2023-05/Quarterly%20Report%20on%20European%20Electricity%20Markets%20Q4%202022%20v2C_0.pdf (accessed on 5 November 2024).
  13. González Landeras, N. Estudio Sobre el Coste de la Electricidad Desde la Aparición del PVPC en 2014-15. Trabajo Fin de Carrera. Ingeniero Técnico Industrial, Especialidad en Electricidad. Escuela Técnica Superior de Ingenieros Industriales y de Telecomunicación. Bachelor’s Thesis, Universidad de Cantabria, Santander Spain, 2015. [Google Scholar]
  14. Tarifaluzhora. Available online: https://tarifaluzhora.es (accessed on 5 November 2024).
  15. Energía Gurú. Available online: https://www.energia.guru (accessed on 5 November 2024).
  16. Nepal, S.; Shakya, A.; Fourney, R.; Sternhagen, J.; Tonkoski, R. Development of real-time control of Commercial Off-The-Shelf inverter/charger for Energy Management of microgrids. 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]
  17. Hybrid Inverter Charger. Tienda Solar. Available online: https://tienda-solar.es/en/1929-hybrid-inverter-charger (accessed on 5 November 2024).
  18. Hybrid Inverter Charger. WccSolar. Available online: https://www.wccsolar.net/product-page/5KW-48v-regulador-mppt-80a-cargador-60a (accessed on 5 November 2024).
  19. Farid, M.M.; Husian, R.M. An electrical storage heater using the phase-change method of heat storage. Energy Convers. Manag. 1990, 30, 219–230. [Google Scholar] [CrossRef]
  20. The Benefits of High Heat Retention Storage Heaters. Available online: https://www.storageheatersdirect.com/news/the-benefits-of-high-heat-retention-storage-heaters/ (accessed on 5 November 2024).
  21. Heinen, S.; Burke, D.; O’Malley, M. Electricity, gas, heat integration via residential hybrid heating technologies–An investment model assessment. Energy 2016, 109, 906–919. [Google Scholar] [CrossRef]
  22. Näslung, M. Hybrid Heating Systems and Smart Grid; Danish Gas Technology Centre: Hørsholm, Denmark, 2013. [Google Scholar]
  23. Mancarella, P. MES (multi-energy systems): An overview of concepts and evaluation models. Energy 2014, 65, 1–17. [Google Scholar] [CrossRef]
  24. Schneider Electric, Zelio-Relay RPF2AB7 Datasheet. Available online: https://www.se.com/my/en/product/download-pdf/RPF2AB7?filename=Schneider+Electric_Zelio-Relay_RPF2AB7.pdf (accessed on 5 February 2025).
  25. TE Connectivity, Power Relay T92P7D22-12. Available online: https://www.te.com/en/product-6-1393211-9.datasheet.pdf (accessed on 5 February 2024).
  26. Término de Facturación de Energía Activa del PVPC, eSios, Red Eléctrica de España. Available online: https://www.esios.ree.es/es/pvpc (accessed on 5 November 2024).
  27. Hu, X.; Zou, C.; Zhang, C.; Li, Y. Technological developments in batteries: A survey of principal roles, types, and management needs. IEEE Power Energy Mag. 2017, 15, 20–31. [Google Scholar] [CrossRef]
  28. Escobar, P.; Martínez, E.; Saenz-Díez, J.C.; Jiménez, E.; Blanco, J. Modeling and analysis of the electricity consumption profile of the residential sector in Spain. Energy Build. 2020, 207, 109629. [Google Scholar] [CrossRef]
  29. Santiago, I.; Lopez-Rodriguez, M.A.; Trillo-Montero, D.; Torriti, J.; Moreno-Munoz, A. Activities related with electricity consumption in the Spanish residential sector: Variations between days of the week, Autonomous Communities and size of towns. Energy Build. 2014, 79, 84–97. [Google Scholar] [CrossRef]
  30. Palacios-Garcia, E.J.; Chen, A.; Santiago, I.; Bellido-Outeiriño, F.J.; Flores-Arias, J.M.; Moreno-Munoz, A. Stochastic model for lighting’s electricity consumption in the residential sector. Impact of energy saving actions. Energy Build. 2015, 89, 245–259. [Google Scholar] [CrossRef]
  31. Optimizador Luz Naturgy. Available online: https://www.naturgy.es/hogar/ayuda/simuladores_ahorro_de_consumo (accessed on 5 November 2024).
  32. Herramienta Cálculo de luz Online Iberdrola. Available online: https://www.iberdrola.es/luz/calcular-potencia-electrica (accessed on 5 November 2024).
  33. Tarifasgasluz: Calcular Potencia Eléctrica Recomendada. Available online: https://tarifasgasluz.com/faq/potencia-contratada (accessed on 5 November 2024).
  34. Selectra: Comparador Tarifas de luz y Consumo. Available online: https://estimacion.selectra.es/ (accessed on 5 November 2024).
  35. Tesla Powerwall Technical Specifications. Available online: https://www.tesla.com/en_ie/powerwall (accessed on 5 November 2024).
  36. Ontility BESS Tech Specs. Available online: https://renovablesdelsur.com/baterias-litio/1128-bateria-litio-ontility-eb-15kwh-48v-8437026190033.html (accessed on 5 November 2024).
  37. Huawei Solar Market Products. Available online: https://solar.huawei.com/en/professionals/all-products (accessed on 5 November 2024).
  38. Alpha Ess SMILE-S5/B5 Residential Series. Available online: https://www.alphaess.com/Public/Uploads/uploadfile/files/20230612/Datasheet_EN_SMILE-S5-B5_V03.01062023.pdf (accessed on 5 November 2024).
  39. Song, S.; Munk-Nielsen, S.; Knap, V.; Uhrenfeldt, C. Performance evaluation of lithium-ion batteries (LiFePO4 cathode) from novel perspectives using a new figure of merit, temperature distribution analysis, and cell package analysis. J. Energy Storage 2021, 44, 103413. [Google Scholar] [CrossRef]
  40. Sanduleac, M.; Ciornei, I.; Albu, M.; Toma, L.; Sturzeanu, M.; Martins, J.F. Resilient prosumer scenario in a changing regulatory environment—The UniRCon solution. Energies 2017, 10, 1941. [Google Scholar] [CrossRef]
  41. Bellini, E. Single-Phase Inverters for Residential PV. PV Magazine, 28 September 2022. [Google Scholar]
  42. Gupta, U. Wall-Mountable Inverters for Residential Solar. PV Magazine, 11 October 2022. [Google Scholar]
  43. Marinescu, C. Progress in the development and implementation of residential EV charging stations based on renewable energy sources. Energies 2022, 16, 179. [Google Scholar] [CrossRef]
  44. BOE 311/2022; Perfil de Consumo y el Método de Cálculo a Efectos de Liquidación de Energía. Spain, 28 December 2022. Available online: https://www.ree.es/sites/default/files/12_CLIENTES/Documentos/Documentacion-Simel/BOE-A-2022-22693.pdf (accessed on 2 December 2024).
  45. Dunlop, J.P.; Farhi, B.N. Recommendations for maximizing battery life in photovoltaic systems: A review of lessons learned. In International Solar Energy Conference; American Society of Mechanical Engineers: New York NY, USA, 2001; Volume 16702, pp. 275–280. [Google Scholar]
  46. Hoke, A.; Brissette, A.; Maksimović, D.; Kelly, D.; Pratt, A.; Boundy, D. Maximizing lithium ion vehicle battery life through optimized partial charging. In Proceedings of the 2013 IEEE PES Innovative Smart Grid Technologies Conference (ISGT), Washington, DC, USA, 24–27 February 2013; pp. 1–5. [Google Scholar]
  47. Salas-Puente, R.; Marzal, S.; Gonzalez-Medina, R.; Figueres, E.; Garcera, G. Practical analysis and design of a battery management system for a grid-connected dc microgrid for the reduction of the tariff cost and battery life maximization. Energies 2018, 11, 1889. [Google Scholar] [CrossRef]
  48. DGEG. Integrated National Energy and Climate Plan 2021–2030; DGEG: Madrid, Spain, 2020. [Google Scholar]
  49. Next Generation EU. Recovery Plan for Europe. Available online: https://commission.europa.eu/strategy-and-policy/recovery-plan-europe_en (accessed on 5 November 2024).
  50. BOE 142/2022; Ley 10/2022, de 14 de Junio, de Medidas Urgentes para Impulsar la Actividad de Rehabilitación Edificatoria en el Contexto del Plan de Recuperación, Transformación y Resiliencia. Spain, 15 June 2022. Available online: https://www.boe.es/buscar/doc.php?id=BOE-A-2022-9838 (accessed on 2 December 2024).
  51. Fondo de Recuperación Next Generation EU; Plan de Recuperación, Transformación y Resiliencia. Gobierno de España. Available online: https://planderecuperacion.gob.es/ (accessed on 5 November 2024).
  52. Ayudas y Subvenciones Para Placas Solares y Baterías. Isla Solar. Available online: https://islasolar.com/subvenciones (accessed on 5 November 2024).
  53. Subvenciones de Placas Solares: Cuáles hay y Cómo se Piden. Selectra. Available online: https://selectra.es/autoconsumo/info/normativa/subvenciones (accessed on 5 November 2024).
  54. BOE-A-2021-10824; Real Decreto 477/2021. Spain. 29 June 2021.
  55. Subvenciones y Ayudas Para Placas Solares en 2023, Eniplenitude. Available online: https://eniplenitude.es/blog/autoconsumo/subvenciones-y-ayudas-para-placas-solares-y-autoconsumo/ (accessed on 5 November 2024).
  56. UNE 20317:2005. Interruptores Automáticos Magnetotérmicos, Para Control de Potencia, de 1.5 A a 63 A. Available online: https://www.une.org/encuentra-tu-norma/busca-tu-norma/norma?c=N0032934 (accessed on 5 November 2024).
  57. Red Eléctrica eSios (Sistema de Información del Operador del Sistema). Available online: https://www.esios.ree.es (accessed on 5 November 2024).
  58. Consulta los Perfiles de Consumo. Red Eléctrica. Available online: https://www.ree.es/es/clientes/generador/gestion-medidas-electricas/consulta-perfiles-de-consumo (accessed on 5 November 2024).
  59. Beltran, H.; Ayuso, P.; Pérez, E. Lifetime expectancy of Li-ion batteries used for residential solar storage. Energies 2020, 13, 568. [Google Scholar] [CrossRef]
  60. Aitio, A.; Howey, D.A. Predicting battery end of life from solar off-grid system field data using machine learning. Joule 2021, 5, 3204–3220. [Google Scholar] [CrossRef]
  61. Lee, M.; Park, J.; Na, S.I.; Choi, H.S.; Bu, B.S.; Kim, J. An analysis of battery degradation in the integrated energy storage system with solar photovoltaic generation. Electronics 2020, 9, 701. [Google Scholar] [CrossRef]
  62. Lithium-ion Battery Price Worldwide from 2013 to 2022, with a Forecast for 2023. Statista. Available online: https://www.statista.com/statistics/883118/global-lithium-ion-battery-pack-costs/ (accessed on 5 November 2024).
  63. Penisa, X.N.; Castro, M.T.; Pascasio, J.D.A.; Esparcia, E.A., Jr.; Schmidt, O.; Ocon, J.D. Projecting the price of lithium-ion NMC battery packs using a multifactor learning curve model. Energies 2020, 13, 5276. [Google Scholar] [CrossRef]
  64. Average Annual Prices of Lithium-ion Battery Packs from 2010 to 2022, Statista (From BloombergNEF). June 2022. Available online: https://www.statista.com/statistics/1042486/india-lithium-ion-battery-packs-average-price/ (accessed on 5 November 2024).
Figure 1. Main internal and external connections of SRC and its relays.
Figure 1. Main internal and external connections of SRC and its relays.
Bdcc 09 00073 g001
Figure 2. Main components of SRC and its integration with the electrical grid and home energy system.
Figure 2. Main components of SRC and its integration with the electrical grid and home energy system.
Bdcc 09 00073 g002
Figure 3. Average energy price (PVPC) for the studied period.
Figure 3. Average energy price (PVPC) for the studied period.
Bdcc 09 00073 g003
Figure 4. Standard deviation of energy price (PVPC) for the studied period.
Figure 4. Standard deviation of energy price (PVPC) for the studied period.
Bdcc 09 00073 g004
Figure 5. Average PVPC 2.0 TD energy price and energy demand for a standard home.
Figure 5. Average PVPC 2.0 TD energy price and energy demand for a standard home.
Bdcc 09 00073 g005
Figure 6. Daily energy cost: SRC vs. PVPC. Two charging slots. Line chart.
Figure 6. Daily energy cost: SRC vs. PVPC. Two charging slots. Line chart.
Bdcc 09 00073 g006
Figure 7. Daily energy cost: SRC vs. PVPC. Two charging slots. Stacked diagram.
Figure 7. Daily energy cost: SRC vs. PVPC. Two charging slots. Stacked diagram.
Bdcc 09 00073 g007
Figure 8. SRC net savings vs. battery packs’ life cost.
Figure 8. SRC net savings vs. battery packs’ life cost.
Bdcc 09 00073 g008
Figure 9. Regular scheduler gains vs. battery energy cost.
Figure 9. Regular scheduler gains vs. battery energy cost.
Bdcc 09 00073 g009
Figure 10. Energy costs for PVPC, SRC and regular scheduler.
Figure 10. Energy costs for PVPC, SRC and regular scheduler.
Bdcc 09 00073 g010
Figure 11. Total cost for PVPC, SRC and regular scheduler.
Figure 11. Total cost for PVPC, SRC and regular scheduler.
Bdcc 09 00073 g011
Table 2. Possible supported (in bold) and unsupported relay states.
Table 2. Possible supported (in bold) and unsupported relay states.
BCRBURGURDescription
openopenopenNot supported. Home supply interrupted
openopencloseDirect grid energy use. Not one of the cheapest slots, so battery does not recharge
opencloseopenBattery energy use. Grid energy is expensive, so it is used neither directly nor for recharging. Changes to open–open–close if battery reserves fall below a predefined threshold
closeopenopenNot supported. Home supply interrupted
openclosecloseNot supported. Electric hazard (two different power sources)
closeopencloseDirect grid energy use. One of the cheapest slots, so batteries charge up
closecloseopenShould not occur. If grid energy is at its cheapest (batteries are charging), it should also be directly used for home
closeclosecloseNot supported. Electric hazard (two different power sources)
Table 3. Off-the-shelf BESSs. Electric details.
Table 3. Off-the-shelf BESSs. Electric details.
BESSMAXIMUM USABLE CAPACITY (kWh)DEPTH OF DISCHARGE (DoD)BATTERY PACK NOMINAL VOLTAGE (if Interval, Minimum Value; V)MAXIMUM WARRANTED POWER (if Interval, Minimum Value; kW)HOURS NEEDED FOR FAST CHARGINGHYBRID INVERTER EFFICIENCYWHOLE SYSTEM EFFICIENCY (ROUND-TRIP)
TESLA POWERWALL 2 AC COUPLED13.50100.00%230.005.002.70Not specified0.920
LUNA2000-15-S0 +
BMS LUNA 2000-5KW-C0 +
SUN2000-4.6KTL-L1
15.00100.00%230.005.003.000.9770.921
SMILE-BAT-13.3P +
ESS SMILE 5 5000W HYBRID I/C
13.34100.00%48.005.002.780.9700.913
Table 4. Off-the-shelf BESSs. Cost and efficiency.
Table 4. Off-the-shelf BESSs. Cost and efficiency.
BESSBATTERY PACK PRICE (Including Taxes; EUR)ENERGY CENTER PRICE (Including Taxes; 0 if Integrated in Battery Pack; EUR)TOTAL PRICE (Including Taxes; EUR)WARRANTY (Years)CHARGE CYCLES UNDER WARRANTYMAXIMUM CAPACITY AFTER WARRANTYBATTERY CYCLE COST (EUR/cycle)BATTERY ENERGY COST (EUR/kWh)
PERCENTAGEVALUE (kW)
TESLA POWERWALL 2 AC COUPLED6080.001536.007616.0010.003200.000.709.451.90000.1407
LUNA2000-15-S0 +
BMS LUNA 2000-5KW-C0 +
SUN2000-4.6KTL-L1
6800.001540.008340.0010.006000.000.609.001.13330.0756
SMILE-BAT-13.3P +
ESS SMILE 5 5000W HYBRID I/C
5700.002300.008000.0010.008000.000.709.340.71250.0534
Table 5. Peak, flat and valley energy demand and maximum power consumed (real data).
Table 5. Peak, flat and valley energy demand and maximum power consumed (real data).
PEAK MAXIMUM ENERGY DEMAND WITHOUT BATTERY (kWh)FLAT MAXIMUM ENERGY DEMAND WITHOUT BATTERY (kWh)VALLEY MAXIMUM ENERGY DEMAND WITHOUT BATTERY (kWh)PEAK MAXIMUM QUARTER-HOURLY POWER (kW)OFF-PEAK MAXIMUM QUARTER-HOURLY POWER (kW)
0.8540.8570.9303.4283.718
Table 6. Peak and off-peak power required for a 15 kWh BESS implementing our system.
Table 6. Peak and off-peak power required for a 15 kWh BESS implementing our system.
OFF-PEAK SLOT AVAILABLE FOR BATTERY CHARGEPEAK POWER (kW)OFF-PEAK POWER (Required for Charging; Battery Capacity/Slots + Off-Peak Maximum Power; kW)
12.91415.911
22.9149.536
32.9147.411
43.0066.348
63.0065.286
83.0064.754
Table 7. Total costs of our system (SRC) for the studied time frame.
Table 7. Total costs of our system (SRC) for the studied time frame.
OFF-PEAK SLOT AVAILABLE FOR BATTERY CHARGESRC ENERGY COST (EUR)SRC POWER COST (EUR)SRC TOTAL COST (EUR)
1EUR 1753.19Not viableNot viable
2EUR 1768.19EUR 202.52EUR 1,70.71
3EUR 1786.19EUR 201.35EUR 1987.54
4EUR 1807.29EUR 198.02EUR 2005.31
6EUR 1859.41EUR 194.69EUR 2054.10
8EUR 1902.62EUR 195.31EUR 2097.93
Table 8. SRC, scheduler and BESS economic summary.
Table 8. SRC, scheduler and BESS economic summary.
SRCScheduler
BESSLUNA2000-15-S0 +
BMS LUNA 2000-5KW-C0 +
SUN2000-4.6KTL-L1
SMILE-BAT-13.3P +
ESS SMILE 5 5000W HYBRID I/C
LUNA2000-15-S0 +
BMS LUNA 2000-5KW-C0 +
SUN2000-4.6KTL-L1
SMILE-BAT-13.3P +
ESS SMILE 5 5000W HYBRID I/C
ENERGY SAVINGS (EUR)EUR 876.29EUR 620.73
EN. MONTHLY AV. SAVINGS (EUR)EUR 31.30EUR 22.17
EN. MONTHLY STDV. SAVINGS (EUR)EUR 6.80EUR 5.60
BATTERY ENERGY COST (EUR)EUR 591.07EUR 417.83EUR 428.46EUR 302.88
BATTERY CYCLES521.53586.43378.06425.10
CURRENT BATTERY LIFE (%)91.31%92.67%93.70%94.69%
NET GAIN (SAVINGS − COSTS) (EUR)EUR 285.22EUR 458.46EUR 192.27EUR 317.85
AVERAGE YEARLY GAIN (EUR)EUR 122.24EUR 196.48EUR 82.40EUR 136.22
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Sierra, J.F.G.; Fernández, J.F.; Fernández-Lázaro, D.; Guerrero-Higueras, Á.M.; del Castillo, V.R.; Sánchez-González, L. Home Electricity Sourcing: An Automated System to Optimize Prices for Dynamic Electricity Tariffs. Big Data Cogn. Comput. 2025, 9, 73. https://doi.org/10.3390/bdcc9040073

AMA Style

Sierra JFG, Fernández JF, Fernández-Lázaro D, Guerrero-Higueras ÁM, del Castillo VR, Sánchez-González L. Home Electricity Sourcing: An Automated System to Optimize Prices for Dynamic Electricity Tariffs. Big Data and Cognitive Computing. 2025; 9(4):73. https://doi.org/10.3390/bdcc9040073

Chicago/Turabian Style

Sierra, Juan Felipe Garcia, Jesús Fernández Fernández, Diego Fernández-Lázaro, Ángel Manuel Guerrero-Higueras, Virginia Riego del Castillo, and Lidia Sánchez-González. 2025. "Home Electricity Sourcing: An Automated System to Optimize Prices for Dynamic Electricity Tariffs" Big Data and Cognitive Computing 9, no. 4: 73. https://doi.org/10.3390/bdcc9040073

APA Style

Sierra, J. F. G., Fernández, J. F., Fernández-Lázaro, D., Guerrero-Higueras, Á. M., del Castillo, V. R., & Sánchez-González, L. (2025). Home Electricity Sourcing: An Automated System to Optimize Prices for Dynamic Electricity Tariffs. Big Data and Cognitive Computing, 9(4), 73. https://doi.org/10.3390/bdcc9040073

Article Metrics

Back to TopTop