1. Introduction
The development of renewable energy technologies, accompanied by financial support systems available in different countries, contributes to the development of prosumer power generation [
1,
2]. The number of installed renewable energy sources (RESs) in end-user installations has grown steadily. The most common RES used in these installations are photovoltaic panels (PV) [
3].
According to EU policies and applicable Polish laws [
4], a prosumer is an end-user who produces electricity exclusively from RESs for their own use to cover local demand. The generation of electricity cannot be the purpose of business activities. The energy produced in the sources is consumed in loads according to the demand profile. However, PV-generated power is randomly varying and non-dispatchable, so the generation profile cannot be matched to the load profile. During periods when demand exceeds generation, missing energy is drawn from the supply network. Otherwise, surplus energy must be introduced into the network.
Better matching PV generation to demands and the more effective local use of renewable energy require active power management within the prosumer installation. This can be achieved by applying an energy storage system (ESS). Typically, an ESS stores the surplus energy generated by the PV panels during periods of low power demand and releases it when the demand is high. Various strategies of active power control can be developed for the ESS inverter to increase the savings resulting from reduced energy import from the grid. They depend on the type of energy tariff assigned to the prosumer. The control strategy defines an appropriate ESS charging and discharging schedule.
In Poland, in prosumer installations commissioned in the past, energy that was unbalanced locally and fed into the grid was billed in the form of rebates. This method, called net-metering, assumes that prosumers can draw energy from the grid at no cost, up to 80% of the excess energy fed into the grid. Since July 2022, the so-called net-billing method has been introduced, according to which energy fed into the grid is settled by value, not quantity, and the basis for billing is market electricity prices. For the first two years of the new system’s operation, surplus energy was settled based on the average market price of electricity from the previous calendar month. Starting in July 2024, electricity suppliers in Poland must offer end users contracts with dynamic energy prices, also known as dynamic tariffs. These tariffs are based on hourly prices (RCE) established on the day-ahead energy market of the Polish Power Exchange (TGE). The new regulations apply to new prosumer installations or installations launched after July 2022; the net-billing method remains in effect for earlier existing prosumer installations.
The introduction of dynamic tariffs is in line with Directive (EU) 2019/944 of the European Parliament and of the Council of 5 June 2019 on common rules for the internal electricity market [
5]. The goal of this regulation is to raise consumer awareness and enable them to participate in the market operations in response to market signals to maximize benefits from low energy prices. Dynamic price contracts allow end-users to provide the power system with flexibility. For consumers, this means shifting electricity consumption from peak hours, when energy shortages occur in the system, to low-demand hours, when energy surpluses occur. For prosumers with ESS, this means the appropriate energy management to limit the amount of energy fed into the grid during periods of energy surplus and its consumption from the grid during peak load hours. Such behaviors are expected to be incentivized by differences in energy prices. Prices during peak hours can be several times higher than those in fixed-price contracts. During low-demand hours, prices can be close to zero or even negative, especially on sunny days.
As mentioned above, to leverage the benefits of a dynamic tariff system, prosumers must manage the energy in their installation using energy storage devices. In addition to energy management, it is worth noting that ESSs can also be used to mitigate power quality disturbances, thus ensuring the effective integration of RESs with the power grid. Detailed developments on this topic are provided in
Section 2. Combining these functions into one device should increase interest in the use of ESSs among both prosumers and distribution network operators (DSOs).
The authors developed a novel strategy and original control system for the ESS in the prosumer installation based on the above belief. They considered dynamic tariffs used in settlements between the prosumer and the energy supplier. The primary goal of the system is to minimize the daily costs incurred by the prosumer by responding to time-varying electricity prices. Additionally, the system can cooperate with a superior control system to reduce the amount of power fed into the grid in response to an appropriate control signal. For example, this could occur in the event of an overvoltage at the connection point or a power limitation request from the DSO. This opens up the possibility of regulatory services provided by prosumers.
The novelty of this work can be defined by the system’s features:
It provides prosumers with significant reductions in energy costs under various types of energy tariffs and different operating conditions;
It enables the DSO with the ability to influence the power fed into the supply grid, allowing prosumers to provide ancillary services for the DSO and participate in power grid management;
It uses an original, simple simulation-based algorithm to determine the ESS charging and discharging schedule. This enables reductions in prosumer energy costs by fully utilizing the energy storage capacity and the inverter’s power range. It also takes into account the limitation of power exchanged with the grid resulting from the connection power of the prosumer installation.
This paper is arranged as follows. The first two sections are devoted to a review of the relevant literature.
Section 2 addresses the use of ESSs in low-voltage (LV) distribution networks and prosumer installations in the broad context of RES integration and energy management issues. It demonstrates the functional capabilities of ESSs and the proposed control strategies, highlighting their role in grid stabilization and limiting the negative impact of RESs on the network operation.
Section 3 presents a review of studies on the use of dynamic tariffs, considering social, economic, and technical aspects. It highlights the importance of management systems in the increasingly complex environment of energy networks and microgrids. Next,
Section 4 presents the proposed control algorithm for the ESS in a prosumer installation.
Section 5 describes a simulation model of a prosumer installation with ESSs controlled according to the proposed algorithm and selected simulation results. It compares the control vectors and prosumer energy costs determined using the proposed algorithm and the standard optimization algorithm available in Excel.
Section 6 covers the aspects of algorithm’s practical feasibility and future work plans. This paper ends with conclusions in
Section 7.
2. ESSs Applications in a Distribution Network with RES—Literature Review
According to Polish grid connection codes [
6], installing RESs with a capacity up to the customer’s contracted power does not require the permission of the DSO. If so, the hosting capacity of the LV power supply network is not considered before the source’s connection. Consequently, with a large number of sources, phenomena may occur that deteriorate the quality of electric power (PQ) and negatively affect the operation of the network. While power generation is high, reverse power flows may occur. This results in a negative voltage drop in the network’s impedance and an excessive voltage increase in the network’s nodes. In addition, phenomena such as voltage variations caused by primary energy variability, voltage unbalance occurring in the case of single-phase sources and loads, and harmonics resulting from the presence of non-linear elements in the power grid have become a real problem for the DSO, which is responsible for the proper operation of the network [
7]. These problems are also known to prosumers and energy consumers who experience consequences of poor power quality, such as, e.g., disruptions in the operation of equipment or disconnections of PV sources. The literature to date has reported that excessive voltage increases are the most serious problem [
8,
9,
10] and require control measures to be applied.
A commonly used method is indirect voltage regulation, which involves changing the reactive power flow in the network using PV inverters. This change should lead to an increase in the reactive component of the voltage drop, resulting in lowering the node voltages. It should be noted that such regulation may be ineffective due to the low value of the X/R ratio, typical for impedances of the LV networks. In such conditions, limiting overvoltage requires reducing PV power generation [
11,
12,
13,
14,
15,
16].
Similar regulations can be performed by ESSs installed in a prosumer system. The ESS inverter controls both reactive and active power fed into the grid; therefore, it better influences the voltage values. The regulation can be more flexible and does not affect the active power generated by the PV source. Examples of overvoltage reduction using ESSs are presented in [
17,
18].
It is worth noting that the design of ESS inverters makes it possible to separate current waveform shaping in each phase of the system. Researchers, including authors, proved that this function can be implemented in parallel with active and reactive power control. Waveform shaping allows for the compensation of higher harmonics and balancing currents in the prosumer installation, thus mitigating PQ disturbances introduced to the grid. Combined with the additional compensation of reactive power, this makes the installation an ideal receiver for the DSO—a purely resistive, symmetrical, and linear element [
19,
20].
A literature review demonstrates that the ESSs in prosumer installations are an effective way to mitigate negative phenomena and support the integration of RESs into the grid. However, without appropriate economic incentives, prosumers, as investors, may be reluctant to purchase such devices solely for regulatory purposes, as these activities primarily benefit the DSO. It is clear that prosumers will be more interested in increasing the efficiency of renewable energy use and minimizing their costs. Therefore, it can be concluded that energy management will be a priority for them in the context of storage applications.
Different methods for energy management control using ESSs are reported in the literature. They refer to single prosumer installations of different structures with uncontrollable and controllable appliances, if any, and they differ with respect to applied approaches and assumptions.
A three-stage strategy involving energy monitoring, demand management using smart appliances, and ESS management to align with forecasted generation is illustrated in [
21]. The authors present the effectiveness of developed schemes in improving the utilization of locally generated energy. However, it should be noted that due to the complexity of implementation and the need for accurate forecasting models to ensure optimal performance, practical system implementation might be challenging.
In [
22], the authors propose a rule-based control strategy for the battery ESS in a prosumer installation to maximize the prosumer’s economic gain. This strategy considers electricity market information and daily production/consumption curves. It assumes that the ESS can only reduce the power exchanged with the grid. The applied approach reduces computational costs; thus, it is suitable for large-scale implementation in renewable energy communities (RECs). The drawbacks include potential limitations in flexibility and adaptability compared to more sophisticated optimization algorithms. Rule-based systems are typically rigid. If the user’s load/generation profile or the electricity tariff structure changes significantly, the predefined rules may need to be manually modified. It is not clear how the proposed system will behave in such situations (ideal load and PV generation forecasts were assumed for the presented tests). A further review of research works on demand response optimization using ESS can be found in [
23]. The comparison of several energy storage management techniques is included in [
24]. The authors compare the following: rule-based control, model predictive control (MPC), and optimization-based methods. According to the authors, MPC and optimization-based approaches generally outperform rule-based strategies in terms of cost savings and self-consumption. The study highlights the trade-off between computational complexity and performance. It indicates that simpler rule-based methods may be suitable for less demanding applications.
Some publications show ESS control strategies combining energy management and voltage regulation functions. A combined method of voltage regulation involving the reactive power of PV inverters and active power of the cooperating ESS is presented in [
25]. The ESS’s main task is to manage PV active power generation to increase prosumers’ profits. At the same time, voltage regulation is performed by reactive power. When the range of voltage regulation is exhausted, the schedule of the battery (its charging and discharging pattern) is modified, and the battery is charged to reduce the voltage value in the node. The authors’ previous publication [
26] introduces the concept of strategy for controlling ESS in prosumer installations based on the principle of ancillary services provided by prosumers to the DSO. Under normal operation conditions, the ESS performs the function of energy management according to prosumer needs. The regulation option is turned on only when there is any PQ disturbance that exceeds the allowed value.
Prosumers’ use of ESSs with extended functionality, including network services to DSOs, may be a promising future option. However, this requires further clarification of the principles for implementing the functions within a single algorithm and resolving the technical issues related to providing this service.
A summary of the related literature is provided in
Table 1. In this context, the control strategy developed by the authors is presented.
3. Applications, Benefits, and Challenges of Using Dynamic Tariffs
The concept of incorporating dynamic tariffs (DTs) into the management of the prosumer installation operation is a current topic of academic study. The challenges and recent developments in this field were grouped and summarized below.
Publications [
27,
28] investigate the impact of dynamic electricity pricing on consumer behavior and its implications for grid stability and financial outcomes. The effect varies depending on the tariff structure and consumer adaptability. The findings include the potential for significant load shifting by flexible consumers in response to dynamic prices. This could lead to reduced peak demand and improved grid efficiency. However, the findings highlight the potential for financial risks due to price volatility. Paper [
29] reviews the implementation of dynamic tariffs in various countries, identifying key issues such as prerequisites, implementation, and effects. It emphasizes the challenges faced by electricity consumers, distribution system operators, and regulatory authorities. Paper [
30] investigates leveraging demand flexibility in microgrids by using prosumer responses to price signals to improve microgrid stability and reduce its operational costs. The authors propose a model that takes into account prosumer responsiveness to dynamic pricing. They indicate that price signals effectively engage prosumers in demand flexibility.
Articles [
31,
32] investigate the design of optimal electricity tariffs, considering the interaction between energy retailers and prosumers. These tariffs aim to balance retailer profits and prosumer welfare. The need for a complex and advanced metering infrastructure to accurately track and respond to dynamic pricing could make it difficult to implement proposed solutions in real networks.
Some publications are concerned with the technical aspect of energy management in implementing dynamic tariff systems. Paper [
33] addresses the challenge of managing energy flows in building microgrids while considering battery degradation. The authors propose a market-based energy management model that optimizes battery dispatch based on real-time market prices and battery health data. Paper [
34] deals with the challenge of balancing data privacy concerns with the benefits of dynamic electricity tariffs enabled by smart meters. The author analyzes consumer preferences and the willingness to adopt smart meters under different privacy and tariff scenarios. Although dynamic tariffs can lead to significant cost savings, privacy concerns are a major barrier to adoption. This suggests the need for robust privacy protections to increase consumer acceptance.
The development of energy management systems (EMSs) for prosumer installations and building microgrids that incorporate PV and battery storage devices, while considering dynamic tariffs, is a significant challenge. Recent studies on EMS highlight the critical role of optimization algorithms, dynamic tariff models, forecasting techniques, and demand response strategies in enhancing system efficiency and cost-effectiveness. Furthermore, integrating these systems with advanced control strategies that apply optimization and machine learning algorithms is proving to be a promising approach to addressing the challenges of fluctuating electricity prices and intermittent renewable energy generation. As the market for prosumer energy systems continues to evolve, further research on regulatory frameworks, policy incentives, and the economic impacts of such systems will be crucial for fostering widespread adoption.
It seems that mutually beneficial cooperation between prosumers using RES and DSOs is highly desirable today. A properly selected ESS installed at a prosumer’s facility should enable unlimited energy production from their RES and reduce energy costs. At the same time, it should provide the prosumer with the ability to participate in network services, as requested by the DSO. The use of autonomous devices controlling the ESS inverter, without prosumer involvement, is essential, especially with variable energy prices in dynamic tariffs. The following section proposes an ESS inverter control system that meets these expectations.
4. Proposed ESS Inverter Control Strategy
4.1. Assumptions
The infrastructure being considered is a prosumer installation connected to the LV distribution network (
Figure 1), consisting of a load, grid-integrated PV panels and a battery ESS interfaced with the installation via a controlled DC/AC inverter. It is assumed that the PV source operates at its maximum available power, and the ESS is primarily implemented to minimize the prosumer’s daily energy costs. This is ensured by the ESS control system, which schedules the charging and discharging of the energy storage to perform the following functions:
Manages energy in the prosumer installation according to the prosumer’s requirements;
Ensures inverter power limitation in the event of exceeding the installation’s connection capacity;
Provides an ancillary service upon request from the DSO;
The parameters of the prosumer installation include the connection power of the installation Pmax, rated capacity , and rated power of the ESS. The control system input data are daily profiles of the following:
Total prosumer’s load demanded power ;
PV-generated power ;
Imported and exported energy tariff: and .
The load and generation profiles are available in advance. They are determined on the basis of measurements or weather forecasts and are updated online on an hourly basis. Similarly, energy tariffs are known from forecasts updated by the DSO with the same time resolution.
It was assumed that the problem of reactive power compensation in the prosumer installation had been resolved and that it had no impact on energy costs.
4.2. ESS Control System
The ESS control system that performs the assumed tasks is shown in
Figure 2. The system operates online in a daily cycle. It begins by loading parameters of the prosumer’s installations. Next, the forecasted power profiles for the load and PV, as well as imported and exported energy tariffs, are loaded for the next 24 h. This data allows us to formulate an optimization problem for which its solution is a control vector, i.e., the hourly power profile of the ESS charging and discharging powers. The profile value corresponding to the first hour is, after any corrections required by the DSO, sent to the ESS inverter as its power setpoint. Calculations are repeated for the next time interval, starting with updated load power profiles and forecasted tariffs. Such online control allows taking into account changes resulting from dynamic tariffs and, at the same time, carrying out regulatory services upon request from the DSO.
4.3. Formulation of the Optimization Problem
As was mentioned above, energy management in a prosumer installation aims to optimize the energy costs incurred by the prosumer. The optimization task is to find a control vector, i.e., a charging and discharging schedule for the ESS that minimizes the prosumer’s daily energy costs,
Ktot. Under the assumptions formulated above, the objective function is described by the following equations:
where
denotes the costs of energy exchanged with the public grid in the i-th time interval , and m is the number of time intervals in the considered time horizon (;
denotes the active power exchanged with the public grid in the i-th time interval (negative value if power is exported to the grid);
denotes the price of energy purchased from the public grid;
denotes the price of energy sold to the public grid.
In each time interval
i, the power exchanged with the grid is defined by the following equation:
where
denotes the average active power output of the PV source;
denotes the average total active power of the loads;
denotes the active power of the ESS inverter.
The optimization problem is both linearly and non-linearly constrained. The linear constraints include the permissible power exchange range resulting from the connection power of the prosumer installation and the min and max operating power of the ESS inverter resulting from its rated power:
The non-linear constrains are the min and max energy stored in the storage device and the equality of energy stored at the beginning and end of the optimization process, as written below:
whereby
where
denotes the energy stored in the storage unit during the period (i − 1) × ∆t;
denotes the energy efficiency of the of the charging and discharging processes;
denotes the energy stored at the beginning of the optimization process;
denotes the energy stored at the end of the optimization process;
denotes the allowable difference.
The solution of the optimization problem is the vector forming the inverter control power profile PESS = (t), for which its components are the ESS inverter powers calculated for each of the m time interval ∆t within the scheduling time horizon. To find a solution to this problem, one of the optimization methods available with standard optimization tools (such as MS Excel SOLVER for Office 365) can be used.
4.4. Control Algorithm
The authors decided to verify the proposed ESS control system concept by simulating its operation on a prosumer installation simulator. PSCAD V4 Professional is a dedicated tool for building power system simulators and their control, but it lacks a module for solving optimization problems, like SOLVER. PSCAD also lacks an interface for utilizing SOLVER’s capabilities. Therefore, the authors decided to develop a simulation-based algorithm that solves the optimization problem using only modules defined in PSCAD. Then, they compare the results obtained with this algorithm and SOLVER. After successful verification, it was possible to implement the algorithm in a prosumer installation simulator and examine the operation of the ESS inverter controlled according to the proposed strategy.
It is worth emphasizing that simulation methods are particularly useful for studying the behavior of real-world objects. Simulations not only provide recommendations for actions in a specific situation but also allow users to determine how the simulated system responds to various inputs, thus providing a better understand of how it works.
The proposed simulation-based control algorithm is described below.
The authors adopted the principle that an ESS can only be profitable when it operates and fully utilizes the energy storage capacity and power range of its inverter. The greatest benefits can be expected if the following is the case:
The basic task of the ESS is to balance the power in the prosumer installation in such a way that the power exchanged with the supplying network is equal to zero;
ESS utilizes periods of low imported energy prices to charge the storage and periods of high exported energy prices to discharge it, with the inverter operating at its rated power;
The charging process brings the ESS energy storage to the state and the discharging process to the state .
In all these cases, the algorithm must limit the inverter power if it is required to meet any of the constraints listed in the optimization problem formulation.
The algorithm uses a model of the prosumer installation to find the ESS inverter power profile that satisfies these rules. A solution is found through trial and error by varying parameters and repeating the calculations in the way described below. The algorithm’s flowchart is shown in
Figure 3.
On the basis of the forecasted power and energy tariff profiles, 24 h prosumer energy cost profiles are calculated (block B) for two separate cases of continuous ESS operation:
Assuming the maximum cost level —below which the inverter loads the energy storage and the minimum cost level and above which the inverter discharges the storage as criteria—for the specified initial values of these quantities (block C), it is possible to build, in accordance with the functions in block D, a power profile of the ESS inverter. This profile indicates the hours within which the inverter performs the power balancing of the prosumer installation and the hours within which it operates by loading or discharging the storage with rated power. It should be added that PV power is included in the power balance as a negative load.
The profile is adjusted (block E), taking into account the limitations resulting from the inverter’s rated power and the connection power. The adjusted profile is the input signal to the energy storage model. The model incorporates the efficiency of the EES storage’s charging and discharging processes in the calculation of the stored energy (block F). If, in the i-th ∆t interval, it exceeds the permissible values (block G), then the inverter is switched off in this ∆t interval (block I). The resulting ESS inverter power profile corresponds to the forecasted power and tariff profiles and the adopted cost criteria.
The output of the storage model (block F) is a curve of the stored energy changes during charging and discharging processes. The shape of this curve determines the end of the calculations. This occurs if the dependencies in block H are met. Otherwise, the cost criteria should be changed (block J) and the calculations repeated. The 24 h inverter power profile obtained in the last calculation is the result of the proposed algorithm for the forecasted 24 h power profiles and tariffs.
5. Simulation Studies
5.1. Research Program
The main objective of the research was to verify the proposed ESS inverter control system. Specifically, the following issues were considered:
Effectiveness of the proposed simulation-based control algorithm in various scenarios of prosumer system operation;
Correctness of calculations in the running window mode;
Effectiveness of the DSO’s influence on the prosumer system operation;
Economic effects of the ESS operation with different tariffs.
The tests were carried out using a simulator of a real prosumer installation built from modules defined in the PSCAD program. They were used to reproduce the operation of the following installation elements:
Power exchange measurement system at the prosumer’s connection point (for the energy billing);
Power measurement systems of the load and PV;
Components of the ESS, i.e., the energy storage and the AC/DC inverter, together with the proposed ESS control system;
The load and PV generation models were implemented as generators of numerical values corresponding to the assumed power profiles of loads and PV sources.
The following parameters of the prosumer installation were adopted:
Rated inverter power
= 6 kW;
Rated energy storage capacity (safe range, available for prosumer) = 36 kWh;
Energy efficiency of the ESS charging and discharging processes = 90%;
Connection power of the prosumer installation = 8 kW.
The operation of the prosumer installation was simulated for a period of three days. To improve data readability, the load and PV profiles were the same for each day. On the first day, the energy tariff was known in advance as a stationary “day-ahead tariff”. This allowed the simulation algorithm to utilize a stationary 24 h window in a calculation cycle. The same tariff profiles were applied on the second day, but the tariff values were provided hourly (“dynamic tariff 1”), and the running-window mode was used. On the third day, the control system also operated in the running-window mode. However, the tariff profiles were altered (“dynamic tariffs 2”), and in addition, the system response to an external signal from the DSO was examined.
The import
and export
energy prices (RCE) are illustrated in
Figure 4. The profiles were imported from the Polish Power Exchange for randomly selected days. Purchasing energy prices were higher than selling prices by a varying ratio (approximately 1,7) that includes the seller’s margin, tax, VAT, and distribution and transmission fees.
In the early afternoon, when sunlight is at its strongest, energy prices are at their lowest. During this period, PV generation is high, while demand is usually low. However, during peak hours, when energy demand is typically high while solar generation is limited, energy prices are higher.
The daily power profiles of the loads
PL(t) and PV generation
PPV(t) are presented in
Figure 5. The load profile is typical for the residential household (consisting of regular loads and an additional air conditioning system and EV charging station). The PV profile comes from a real photovoltaic system of 6 kWp.
5.2. Simulation Results
The daily power profiles of the prosumer’s active power changes,
Pex(t), and ESS inverter control power,
PESS(t), are presented in
Figure 5. It can be observed that the ESS charging and discharging profiles on the first and second days of the simulation are consistent. This confirms that for the same input data, the algorithm operating in the running window mode gave the same results as in the stationary variant (the same control vectors). This demonstrates the correctness of the algorithm operating in the running window mode.
The ESS control schedule from the third simulation day shows that, although the prosumer installation operated autonomously, the algorithm reacted to the commands received from the DSO to reduce the inverter’s power. Specifically, ESS power was reduced by 25% from 59 h to 60 h and by 50% from 65 h to 66 h. In real life, this option would be used as an emergency solution in cases of problems related to power quality or technical constraints. Here, the DSO commands were executed arbitrarily.
The state of charge (SOC) of ESS during the operation of the system, in a simulated period of time, is presented in
Figure 6. The simulation started each day with an SOC of 5%. This value was set arbitrarily and can be adjusted to individual needs. The control algorithm ensured that the state of charge was close to this value at the end of the day. In addition, to effectively use the available storage, the algorithm was allowed to charge and discharge the ESS to its full allowed capacity (considering the capacity available for the prosumer that is recommended by the manufacturer of ESS regarding safety and estimated lifetime). Typically, this range is between 20% and 80% of the nominal capacity.
The changes in prosumer costs with and without operating ESS are shown in
Figure 7. The value at the end of each day is the total daily cost of the prosumer. It is assumed that the cost of the energy is equal to zero at the beginning of each day.
The comparison of prosumer daily energy costs for installation with and without the ESS (controlled with the developed control algorithm) for day-ahead tariff, dynamic tariff 1, and dynamic tariff 2 is presented in
Table 2. The negative value of energy costs means that it was possible not only to reduce daily energy costs but also to generate some revenue. Note that the possibility of such income, while welcome, should be reviewed for legal compliance, as it may not be permitted by law.
The cost results obtained on the simulator for the stationary tariff (Day 1) were additionally verified using the optimisation method available in the SOLVER tool (MS Office). The calculation problem is non-linear, so the generalised reduced gradient (GRG) optimization algorithm was used. The GRG calculates the gradient (rate of change) of the objective function with respect to the decision variables and uses this information to iteratively adjust the variables until a solution is found where the gradient is close to zero (indicating a potential optimum). To enable result comparisons, the objective of the optimisation was to minimize the cost of prosumer energy, and the output was the ESS charging and discharging schedule. The same constraints as in the simulation-based method were applied regarding the maximum connection power of the prosumer installation, the min and max operating power of the ESS inverter, and the maximum and minimum SOC.
The consistency of the results obtained with both methods confirms the accuracy of the simulation-based algorithm. The 5% difference is insignificant and can be ignored, considering that the cost for a given day was already reduced by 100% (the 5% difference is for potential profit). The difference itself may result from the way that GRG finds a solution. If the objective function has multiple local extrema, GRG could simply stop at one of them and not necessarily at the global optimum.
Also, it should be highlighted that the main advantage of the simulation-based algorithm, besides its effectiveness, is its readiness for implementation in controllers without the need to use potentially expensive optimisation engines.
The potential benefits for prosumers were further assessed for different types of tariffs and different scenarios of prosumer installation operation:
With no generation from PV;
With load turned off;
With ESS-only operation;
With load, PV, and ESS on.
In each test, the algorithm was allowed to fully charge and discharge the ESS. The daily cycle had to end with ESS charged to the initial SOC.
The three types of tariffs, currently used in Poland, were considered (note that tariff type C applies to all new customers):
Type A—energy purchase and sell prices are fixed;
Type B—the price of imported energy is fixed, and the export price changes hourly (the value and the profile of export prices are the same for every day of the month);
Type C—the energy import and export prices change hourly every day (“dynamic tariff 1”, the same as in previous tests).
Table 3 summarizes the energy costs obtained for these cases. In all test cases, the algorithm proved to be beneficial to the prosumer. As expected, the use of an ESS at a fixed tariff is significantly less beneficial than with dynamic tariffs.
As mentioned earlier, some scenarios may be legally unacceptable, particularly when the energy storage is the only component of the installation and is used to generate profit from energy price differences.
5.3. Impact of Initial Battery Storage SOC on Energy Costs
The proposed simulation tool was also used to determine the impact of the initial battery SOC on the prosumer’s daily energy costs for tariff types A, B, and C (see
Section 5.2).
The results included in
Table 4 show the following:
For tariff types A and B, the influence of the initial SOC on total energy cost is relatively weak. The lowest costs are achieved for the SOC value in the range of 0–50%.
For the highly variable type C tariff (target variant), the optimal initial SOC is narrower (0–30%). Setting it above ~30% leads to a significant increase in energy costs (from −2.4 pu income to +11.4 pu loss in the worst analyzed case).
These findings highlight that, while the control algorithm itself is robust, the economically optimal initial storage SOC value depends on tariff dynamics and should be adjusted seasonally or when tariff conditions change substantially.
6. Feasibility, Practical Implementation and Future Work
The algorithm uses standard mathematical functions and typical logic elements, eliminating the need for costly external optimization solvers that can be difficult to implement. The algorithm can be implemented with a broader range of controllers.
The algorithm accepts power and tariff profiles of any shape. However, incorrect inverter control power values may be determined when the auxiliary profiles (prosumer energy cost profiles for charging and discharging the storage at the inverter’s rated power) calculated by the algorithm contain multiple sections with slightly different values. Further analysis of this problem is needed.
A significant benefit of the presented solution is that the controller operates locally, using data collected within the prosumer’s installation (PV generation and load profiles). Therefore, the power of loads can be accessed from an internal energy meter, while data from PV inverter and ESS can be collected using standard communication protocols such as Sunspec Modbus for IEEE 1547-2018.
To access the forecasts and updates of current energy prices, an Internet connection is required. In Poland, current tariff data are available through the Application Programming Interface of the Polish Power Exchange (API TGE). Possible loss of connection may affect the results achieved because the daily variability of energy prices on the Power Exchange is very high (often exceeding 100%), incomparably greater than on other financial instrument exchanges, such as the Warsaw Stock Exchange (WSE).
Potentially, the main technical challenge is transmitting external control signals to initiate the regulatory service for the DSO. Currently, network operators lack a standardized technical link to directly control appliances in prosumer installations, despite the fact that the inverters are ready for such control. In the future, operators are expected to develop or agree upon a standard, reliable, and secure communication solution. Various dedicated solutions are currently being tested, but their wider adoption is limited. Nevertheless, such control is feasible. An example of a technical and legislative solution developed by the authors and implemented by the DSO in a real low-voltage (LV) network is presented in [
26].
The presented control algorithm and architecture have been deliberately designed for a single-prosumer configuration, in which all components (PV system and energy storage system—ESS, loads, and metering infrastructure) belong to one prosumer and are located behind a single billing meter. This setup is essential for two reasons: (1) current prosumer billing schemes (net-metering or net-billing) are defined at the level of a single connection point, and (2) the controller with the proposed algorithm requires direct, real-time access to measurements and control capabilities of ESS within the prosumer’s installation.
Nevertheless, the solution is scalable, as by default, each prosumer operates autonomously using its own local controller. No interaction between individual installations is required. Therefore, the approach can be deployed simultaneously for numerous prosumers without modification of the algorithm.
When the distribution network operator needs to control the prosumer’s ESS, an external (DSO-side) supervisory controller is needed. This supervisory layer decides which prosumers (and to what extent) should adjust their ESS power at a given moment. This supervisory controller is completely independent of the local prosumer controllers and lies within the responsibility and infrastructure of the DSO.
For future extensions beyond individual prosumers, a community or collective of prosumers sharing common PV and storage installations can be considered. In this case, the aggregated consumption profile would be the sum of individual household loads. Although this would greatly simplify control on the DSO side (fewer controllable devices), it introduces additional complexity in internal financial settlements among co-owners, which is outside the scope of the current paper but represents an interesting direction for future research.
A separate issue related to the implementation of the system is the long-term economic evaluation of the investment. The analysis should consider the cost of battery degradation specified for the selected ESS system. Additional operating revenues for regulatory services under the DSO contract should also be considered.
Taking the above considerations into account, we envisage taking up the following topics to further develop the presented work:
A systematic sensitivity analysis of the control strategy robustness and economic performance with respect to large variations in tariffs, load profiles, and PV generation, focused on algorithm implementation using Software-in-the-Loop techniques and RTDS simulators;
Economic assessment of the control system over a longer timeframe by taking into account battery degradation costs.
7. Conclusions
The integration of PV with ESSs and the incorporation of dynamic electricity tariffs and generation forecasts into prosumers’ energy management systems are expected to be the next steps in the transition toward decentralized, sustainable, and economically efficient energy systems. Local management systems enable prosumers to actively influence energy costs. Dynamic hourly tariffs, in which energy is billed according to current market rates, complicate the operation of these systems and require solutions that enable the continuous updating of changing data.
This article presents an ESS control system designed for energy management in a prosumer installation under dynamic tariff conditions. The proposed control strategy effectively reduces daily energy costs for prosumers by establishing an appropriate ESS charging and discharging schedule over a 24 h period. A running window mode ensures ongoing control updates in response to dynamic tariffs. Simultaneously, the system allows the DSO to influence the power exchange with the grid, thus enabling the prosumer to provide regulation services. Embedded in centralized grid control systems, it can respond to appropriate control signals in the event of supply voltage disturbances.
The simulation-based algorithm is relatively simple and easy to apply in practice. The method used allows for a better understanding of how the operation of the simulated system works and, consequently, easier evaluation and validation of the algorithm. Its effectiveness was confirmed by comparing energy costs determined using this algorithm to those determined using the SOLVER optimization tool. The correctness of calculations in the running window mode was verified by comparing the ESS power profile determined for the day-ahead tariff using the simulation-based algorithm and the SOLVER optimization tool.
The control system benefits both prosumers and DSOs. Prosumers can use ESS to adapt their energy management to changing conditions throughout the day, enhancing the economic benefits of installing PV systems based on real-time data. From the DSO perspective, dynamic price contracts allow end-users to provide the power grid with flexibility. In turn, the provision of ancillary services enables prosumers to contribute to the improvement of grid power quality and stability. Such a strategy is in line with the vision of future smart grids, where prosumers and consumers are encouraged to actively influence the network operation.