Frequency Improvement in Microgrids Through Battery Management System Control Supported by a Remedial Action Scheme

In this work, we propose a battery management system control (BMSC) for primary frequency regulation. In many operational scenarios, the microgrid (MG) results in a weak frequency due to the low inertia of the renewable energy sources and the highly dynamic loads. The proposed BMSC improves the operation and control of the MG by managing the energy stored in the battery storage systems (BESS) through the battery management system (BMS); continuous frequency control of the MG is achieved, preserving the energy availability of BESS. The proposed system performs frequency control actions in real time in the MG operation through BMSC, and it is not required to know the insolation and wind speed forecasts, due to the high uncertainty in the forecasts. Frequency regulation is achieved by evaluating the energy required by the MG, and by controlling the charging and discharging operations that ensure that the BESS resource is available. Due to the highly dynamic MGs, the contribution of the battery in each period is limited to a percentage of its capacity, avoiding deep discharges and the loss of premature energy provided by the battery. The control will apply a remedial action scheme to keep the frequency within the operating margins if the BMS cannot regulate the frequency. The system proposed here is evaluated using an MG system in an island operation. The results show the feasibility of the proposed system under different operating conditions and the compliance with the technical operational specifications of the BESS.


I. INTRODUCTION
The increase in demand for energy, the integration of renewable energy sources (RES), and the depletion of fossil fuels have all contributed to the recent technological development of microgrids (MGs). This has enabled the rapid growth of RES and storage systems to improve the operation of MGs. However, this increase in non-controlled sources has made it necessary to use bidirectional active sources, such as storage systems and power control systems, to provide inertia, balance the total power of the system, and keep the frequency within the operating margins.
Due to the high integration of RES in MGs, it is necessary to implement a battery management system control (BMSC) to meet these new criteria and requirements. The control criteria in a battery management system (BMS) must consider both the frequency and voltage controls to create a suitable communication system for the operation of the system in VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ real-time, whether for a connected utility or isolated mode operation. In addition, the communication and control structure must be held in an intelligent network to ensure that measurements and switch statuses are available.

A. LITERATURE REVIEW
The operation of electrical networks has been analyzed with heuristic algorithms to control variations in the voltage and frequency [1], [2]. Examinations of various storage technologies and control methods are presented in [3]- [5]. In [6], an experiment on primary frequency control systems and centralized control models is presented, taking into consideration the storage characteristics of the problem [7]. Metaheuristic methods have been used to address the issue of frequency control [8]. Alternative methods of frequency control have been proposed using a virtual synchronous generator [9], a stochastic non-integer controller [10], and robust control [11]. A battery energy storage system supports the frequency control process within microgrids with a high penetration of RES active power response to frequency deviations by combining a conventional droop control method with a virtual inertia function to improve the system's stability [12].
In some investigations, it has been shown that a MG central controller (MGCC) [13] can be used for voltage and frequency control when the electrical grid is in interconnected or island mode, to comply with the policies of the grid interconnection code and to optimize the loss of active power with linear algorithms [14]. Alternatively, where appropriate, it can be used with linear predictive control models to minimize operating costs. The authors of [15] proposed a MGCC for frequency control for domestic freight and microdistributed generation. One of the issues that has been studied in recent years is the monitoring of residential demand response [16], [17] in relation to the interconnection of RES such as wind power, which can interact with storage systems and allow for frequency regulation through feedback control systems based on the battery charge and discharge states [18]. The coordination of suitable demand-response support (DRS) and virtual-inertia support (VIS) systems are used to mitigate the intermittency and low inertia of microgrids with renewable resources [19].
Since BESS have a relatively good response to frequency deviations [20], they have been helpful in supporting MGs [21], [22] and in combining them with conventional and renewable sources [23]; battery-related technologies have advanced in giant strides.
The use of batteries is different for transmission systems and MGs. In transmission networks, frequency disturbances are infrequent and a large part or all the battery energy is used for each contingency. On the other hand, in isolated MGs there is a greater incidence of energy imbalance due to RES, which can quickly discharge the batteries and, thus, exhaust the number of discharge operations. That is why, in this work, the battery control is discreetly established; within each control interval, the bounded variations of frequency will be allowed, executing control actions at the end of each interval to avoid an energetic waste of the batteries and increasing availability. However, the frequency monitoring is continuous and, in the case of detecting an imbalance outside the tolerance defined in the same control at any moment, remedial actions are activated.
In this research, the battery control is established in 5minute periods, according to the frequency limit for the interconnection of distributed generation (UL 1741). Furthermore, there is 24-hour access to the operation, control, and energy of the batteries, which allows for power regulation of the system. The constraints on the dynamics of the BESS are also considered, such as the power limits on each charge/discharge operation and the number of operations over a full cycle of one day. In addition, the time required for charge/discharge operations and the electrical power are evaluated over a complete cycle of one day, based on the specifications in the data sheet for the battery. It is also essential to consider the behavior of all the nodes in the MG for frequency control when a BESS is interconnected at a specific node, since the frequency in the entire electrical system (MG) is being monitored. If a node requires more energy than the batteries have stored, and the frequency cannot be maintained within the limits allowed by the standard, the BMSC will decide on a corrective or remedial action scheme (RAS). The operation of the MG is carried out without considering a forecast of RES due to the high intermittency, so the proposed control evaluates the energy deviation that occurs in each time interval.

B. CONTRIBUTIONS
Regardless of the different approaches and methods raised in the literature, the main contributions of this paper are enumerated below.
• BMSC is proposed to consider the charge/discharge operations over a full cycle of one day of BESS and continuous frequency control of MG is carried out, preserving the energy availability of BESS.
• The proposed system performs frequency control actions in the MG operation through BESS control, it is not required to know the insolation and wind speed forecasts. The proposed BMSC does not depend on virtual machines.
• RAS is activated when the contribution of BESS is insufficient for frequency control. In this paper, a study of the optimal location and economic analyses of the BESS is not carried out. With more BESS, the frequency control will be better, but the cost will be higher.
The location of the BESS is already defined and the proposed system manages the energy available at each node or at the point of common coupling (PCC), only evaluating operating conditions. Primary frequency control at remote nodes, including the sensitivity factors of the electrical network, can be achieved with the proposed method; however, it is necessary to evaluate the energy availability of the BESS when performing remote functions. The control scheme proposed in this work can be applied to any MG. This paper is presented as follows: Section II focuses on the problem statement of BMS control for microgrids. In Section III, the methodology of the proposed scheme is described in detail. In Section IV, the test systems used are described. In Section V, the simulation results and discussion are presented and analyzed. Finally, Section VI summarizes the general conclusions.

II. MICROGRID OPERATIONS WITH BMS CONTROL
The frequency and voltage in an MG are affected by the intermittency of the renewable sources, a high-impedance connection or islanded operation, which result in more difficult conditions. Stand-alone operation requires an energy management system that can monitor and control the energy generated by the sources and the storage of this energy in batteries, to supply the power required in the network over the time intervals in which variations occur. Using a BESS to protect against variations in frequency is an option for minimizing the active power imbalance that originates, mainly from the RES.
During operation, the BMSC monitors the variables to be controlled, such as the power of the distributed generation (DGs), the frequency of the power system, and any BMSs installed locally on optimal nodes. The BMSC actuates the BESSs every 5 minutes, according to the power requirements, while at the same time, continuously monitoring the frequency every second within the interval defined above. In this research, it was considered that the microturbines (MT) will regulate the frequency within five-minute intervals. Communication between the BMSC and each node is carried out via a network that collects the data gathered by the phasor measurement units (PMU), Figure 1. For optimum operation, it is essential to use a telecontrol and telecommunications system that allows for dynamic interaction in real-time with all the components of the MG.
The communication technologies currently used in smart controllers for the operation of MGs are local area networks or ethernet networks. Their low acquisition cost and the expansion of their use in communication networks have been of great interest regarding control systems. However, since this type of communication technology was not designed for connectivity in real-time feedback control systems, they have been the subject of recent research due to their latency in the transmission of data packets between remote stations. This latency has been greatly improved of late, which has made the use of ethernet for smart grids possible [24], since the operability of the system could otherwise be affected, depending on the type of control process in question. Another aspect that must be considered is data mining for processing in control systems. Dominant operating variables are used in dimensional reduction, which involves identifying the dominant variables; however, this condition is less critical in an MG. since the electrical network is generally small.
In this work, real-time measurements of demand data, the energy generated by MTs, and the energy profiles of wind power (PW) and photovoltaic sources (PV) are used in a simulation. The proposed control system regulates the primary frequency of a MG that activates a BESS, based on the restrictions on battery dynamics and a 24-hour horizon.
Renewable sources are modeled by considering energy losses and their efficiencies. In this paper, the converters are not modeled, since we assume that the system is not being evaluated in a transitory state, and only the power output is considered for simulation purposes. However, in future work, it will be important to consider the modeling of the inverters in detail, since one of the requirements considered in the IEEE 1547 and UL 1741 standards is that the converters must remain connected for a specific time and then trip after a contingency. In addition, converters also support the grid with active and reactive power to allow for frequency and voltage regulation [25]. An analysis of the performance of the proposed BMSC is carried out for its operation in real-time.
The insolation and wind curves are statistically processed to estimate the behavior in different periods in one year. In the performance evaluation of the proposed BMSC, only an injection of power to the electrical network is required; the specific behavior of the PV or WP is not of interest here. The models used to transfer insolation and wind speed to electric power are presented in the next section. Thus, the same model of the MT is presented because, together with the BESS, it is an element that provides inertia to the MG.

A. WIND TURBINE MODEL
The electrical power of the wind system [26] is determined within the wind limits given by the power coefficient. The expression used to convert the wind profile to the electrical power injected into the electrical network is as follows: where C pr is the coefficient of performance at the rated speed v r (t), η mr is the transmission efficiency at nominal power, η gr is the generator efficiency at the rated power, ρ is the air density, and A is the swept area of the turbine blades. VOLUME 10, 2022

B. PHOTOVOLTAIC MODEL
The power output of the mathematical model of the photovoltaic module [27] is represented as: where n PV is the number of PV modules, P ratePV is the nominal power of the array, G(t) is the global irradiation falling on the arrangement of PV panels, G o is the standard value for the insolation capacity of the photovoltaic modules, T A is the ambient temperature, T CO is the temperature coefficient of the maximum power of PV, η rel is the relative efficiency of the PV modules, and η inv is the efficiency of the inverter.

C. MICROTURBINE MODEL
MT have been classified as DG sources with lower pollution emissions than conventional, centralized generating plants and have been used in the operation of MGs to support renewable sources [28]. A simplified model of an MT providing active power is shown in (3)(4)(5): where P gT is the output power of the turbine within the period t, Q MT is the waste heat from the exhaust MT, η e is the generation efficiency of the MT, η l is the coefficient of heat loss, Q he is the heat provided by the MT and K he is the heat coefficient of the cooler. Equation (5) represents the equation of the state of the rotor angle (δ) as a function of the kinetic inertia constant (H ) of the MT rotor. P (t) = P m − P e is the difference of the mechanical and electrical power of the generator, while ω 0 is the electrical rated speed.
The dynamics of the RES, together with the MT, will be evaluated in the proposed control system because the RES is not controllable. The objective of the proposed system is to maintain frequency control in the first instance and to maintain the energy availability of the batteries.

III. PROPOSED BMS CONTROL
MGs are currently driving an increase in renewable and sustainable energy, meaning that conventional power generation contributes a lower percentage to the power supply to MGs. These MGs can operate in interconnected mode or island mode. In interconnected mode, they can operate in different areas where the utility attenuates the frequency and voltage regulation. In island mode, the MG operates without a connection to the utility. This means that the choice of RES in an MG depends on its geographical location, weather conditions, and availability of conventional sources. The operation of these MGs involves management of the energy supply, protection of the generation equipment, security, and continuity to users. This is achieved by monitoring the demand and generation through a BMSC, which controls the parameters and variables to maintain the stability of the network.
An analysis of the system is carried out to establish the operability in different scenarios over time, considering the sources of GD, intermittent generation, the number of operations and the battery charge / discharge limits and the frequency limits allowed by the IEEE 1547.2-2008 standard. [29].
The operation of a MG is proposed through a BMSC that controls the BESS located in the optimal nodes of the network, and the injection of energy from the sources in each (five-minute) period are then the new inputs for the next period and the actions of the BMSC are carried out. The energy reserve in the batteries, within a 5 minute interval, will then be available for the next interval.
As shown in Figure 2, in the presence of a large disturbance when there is limited operations or no availability of power in the batteries or a high frequency of continuous imbalance, the control activates RAS. Otherwise, when the variation is within the parameters allowed by the standard, the BMSC activates the batteries to discharge or charge power. Each BESS at the optimal node is made up of a BMS and its storage in a battery. The BMS receives directions from the control for its operation at each instant of time, including the amount of power to discharge/charge depending on the frequency state of the node at that moment.
The energy state in the batteries is important data for each time interval, as it indicates the amount of stored energy. The energy of the batteries is, therefore, considered as a state variable and is calculated as in (6). The BESS model used in this investigation was adapted from [30] and [31]. The purpose of the model is to consider a discretized event in the dynamics of the batteries every five minutes since, during the continuous operation of the MG, it would not be advisable to simulate the dynamics of the continuous-time discharge of the battery in each interval because the BESS contribution is controlled.

A. FREQUENCY LIMITS ACCORDING TO IEEE STD
The amount of power absorbed or released in each BESS is calculated based on the difference between the power stored in two consecutive intervals. The intervals used here are five minutes over a 24-hour horizon. Hence, in a state t, the amount of power in each defined time interval is represented as follows: where τ = (t2 − t1) is the charge/discharge time to the grid within the time interval, P Charge (τ ) is the stored power and P Discharge (τ ) is the released power.  The power available from the BESS at each instant of time is limited by the Eq. (8): where P BESS−min and P BESS−max are the minimum and maximum power from the BESS at each instant of time t.
In this paper, the charge/discharge power of the battery is limited, to ensure the availability of this resource over 24 hours, as indicated by Eq. (9). With this restriction, deep discharges can be avoided and premature aging of the battery is reduced.
where, η D and η C are the discharge and charge efficiencies, respectively, and P BESS−SOC (k) is the state of charge or discharge of the batteries at each time k. The efficiencies are related to the depth of charge and discharge, the internal resistance of the batteries, and the ambient temperature. In this mathematical model, a percentage of the continuous charge/discharge power of the batteries was considered. Each charge (ramp up, Ec)/discharge (ramp down, Ed) count is associated with a time interval τ as the energy obtained by the percentage of continuous power, as indicated in Eq. (10) and (11): The charge and discharge times of a BESS in a 24-hour cycle are: where τ is the time (5 min) at each instant k within the 24-hour cycle, and N charge and N discharge are the charge and discharge operations, according to the rate C, stipulated by the manufacturer.
The capacity of the BESS can be classified in two ways: either based on the nominal power capacity P b or the nominal energy capacity E b . These are defined as the total power and energy that a battery can deliver or absorb, respectively, during a full charge/discharge cycle [32].
The dynamic process of the BESS takes into consideration the different actions of the BMSC in order to balance the network, based on the allowed frequency limits, P pv and P w , the battery capacity, the battery operations (i.e. the number of operations in a full day), and the charge/discharge control of the BESS. The proposed BMSC is updated every 5 min and, within this period, the amount of energy that will be charged or discharged (without exceeding 10% of the battery power, tol) is established. The tolerance was determined as a basis for the control. It could be adapted but the results obtained for the different tests carried out were satisfactory because it was possible to stabilize the frequency for various districts and maintain the availability of the battery resource.

B. REMEDIAL ACTION SCHEME
In this way, the energy provided is limited in each operation, thus avoiding the loss of battery availability. In the case of an abnormal frequency, a detector establishes the action that should be applied: if the imbalance is less than tol, the energy is provided or stored by the battery; otherwise, if the disturbance is greater, the measurement time is activated every 1s, and the operation of the battery is blocked to avoid a deep discharge and the need for remedial action. The frequency is controlled over a wide operating range, to ensure that the battery remains available. The purpose of a battery is not to solve any frequency problem; therefore, the contribution of the battery is limited to avoid the loss in the availability of the resource. Likewise, a sensitivity analysis, to establish how much energy is required to control the frequency is not included, since this mode of operation will quickly wear down the battery.
The frequency limits adapted to this work are stipulated in the IEEE 1547 standard. In the first two scenarios, the frequency limits used were between 59.8 and 60.5 Hz, where the control action for the frequency regulation in the MG was observed. In the third scenario, the limits with higher ranges (between 57.0 and 58.9 Hz) were used, where the supply of energy from the batteries is provided until exhausted. The control sends a remedial action to regulate the frequency within the allowed limits. This frequency regulation BMS control is flexible and can easily be adapted to any n-node distribution system or any MG made up of industrial or commercial energy users.
The following section shows the test systems, for this paper the evaluation is carried out in an interconnected system to achieve a greater interaction between sources and include the losses and topology of the electrical network.

IV. TEST SYSTEM
As an implementation of our approach, a modified six node system was used to create an island mode MG, with a voltage level of 15 kV. Two 35 kW and 50 kW MTs, a 40 kW photovoltaic source, and a 40 kW wind source were included ( Figure 3). The wind and solar irradiation profiles were taken from meteorological stations. Several data curves, representing a period of a year, were randomly averaged to obtain a single profile for each renewable source. In this work, the location and dimensioning of the batteries in the test system was already determined. In this research, a forecast of the RES was not considered because the control measures monitor and evaluate the energy imbalance that occurs over time. Different demand curves were used for each node. The BESS were located at nodes 2 and 3 and each storage system had a capacity of 68 kW. In the tests carried out here, we used the 950V HR model of lithium-ion-type batteries [31] and it was determined that a maximum limit of 10% on the continuous power gave satisfactory results, in terms of controlling the frequency to within the margins established in [30], thus complying with the factory specifications of the BESS.
The operation of the BMSC, installed in the experimental network, is analyzed for three different operational scenarios. In each case, the PMUs were used to measure the power injected into the MG. The BMSC places generation restrictions on the MT, activating the power and/or energy of the BESS based on the dynamic characteristics of each. When the BMSC detects the amount of active power from the BESS and RES, it controls the power injections for the next period. The demand data, wind profiles, and solar irradiation were the same for all scenarios, and the values of the sources were changed to represent the different modes of operation of the MG. The frequency limits considered in this simulation were those stipulated in the IEEE std 1547.2-2008, for the protection of RES connected to the MG. This allowed band is limited, between 60.5 and 59.8 Hz.
For the evaluation of the algorithm, three testing scenarios are presented, the regulatory action of the batteries is shown as well as the way the proposed BMSC manages to keep the frequency within the operating limits. However, if the disturbance is very large or the number of battery operations is depleted, the proposed logic triggers a remedial action to maintain the energy balance.

A. SCENARIO I
The MT-1 was set at 35 kW and placed at node 1 in this scenario. A wind turbine system was located at node 6 with 40 kW capacity, a photovoltaic system at node 2 at 40 kW, and the MT-2 at node 5 with operating limits between 35-50 kW. The power contribution of both BESSs is considered, connected at node 2 (PB1) and node 3 (PB2), with capacities of 15 kW each. The time for these simulations was every 5 min. Figure 4 shows the results for the micro PMUs measurements and energy management of the system after power injections before entering the BMSC in each period. The restrictions on the MT-2 and the effect of the BESS on the power when entering the next period can be observed. Figure 5 displays the system frequency when MT-2 power generation is restricted. It is observed that, when the restrictions of the power of the MT-2 are in greater quantities, there is greater variability in the frequency and 8086 VOLUME 10, 2022    Figure 6 shows the state of charge and the dynamics of the batteries after the BMSC is triggered [33]. The upward slope of the curve indicates that the batteries have more charging operations. Figure 7 represents the contribution of active power from DG and the charges/discharges of the BESS in each period. Since the MG is supported by two MTs, the energy contribution in the electrical network is observed.
In Figure 8, the frequency attenuated by the action of the proposed BMSC is within the range allowed by IEEE std 1547.2. In this case, the BESS had 92 and 51 charge and discharge operations, respectively, during the 24-hour cycle.

B. SCENARIO II
To simulate a scenario with less energy support (a more critical case), the MT-1 was disconnected. Since the more controllable energy is in the MG, the frequency problem is less. The following power values were applied in the generation sources: for uncontrollable generation (photovoltaic and wind) the power was set at 70 kW each, for the MT-2 a value of 70 kW (bus slack) was used. The charge/discharge power of the batteries was limited to 6.8 kW, which is 10% of the continuous charge power specified for the batteries used in this case. Figure 9 shows that the generation only depends on the DG and batteries, the MG being in island mode. The usable powers for the energy balance in each t is that available VOLUME 10, 2022   from the intermittent sources, the power available in the MT-2 and that available in the batteries.
The variation in the frequency of MG is observable along the 24-hour horizon. In Figure 10, it can be seen that there is more frequency above the acceptable upper limit, i.e. more energy availability.
The dynamics of the state of charge (SoC) of the BESS are depicted in Figure 11. Because the frequency variations that are outside the acceptable range are small, the regulation of the BESS obeys these actions. Figure 12 shows the charges and discharges of the BESS. The number of charge and discharge operations are 56 and 31, respectively, during the 24-hour cycle. In this case, the BMSC sends the control action   to the BESSs to energetically balance the system in each time interval. In Figure 13, the frequency has been attenuated within the specified limits through the proposed BMS control.

C. SCENARIO III
In this third case, the same data were used as in scenario I and the generation in the MT-2 was restricted to create a scenario in which, due to the low generation in the MG and the insufficient capacity of the battery, the BMSC activates the load under a RAS to reach the control frequency [30].
When a system suffers an abrupt change in demand or some disconnection from a generation source, the BMSC needs  to decide frequency control to avoid the unwanted tripping of the PV and PW converters. In Figure 14 the contribution of power generation towards the MG can be observed and the frequency ( Figure 15) undergoes large changes caused by the insufficient capacity of the batteries ( Figure 16). This activates RAS for load disconnection until a balance of the active power is achieved. Figure 17 shows the frequency after the BESS has participated on the optimal nodes; it can be observed that the use of the batteries has reduced the frequency in the system. However, after 20:40, it was not possible to balance the power of the electrical system. Figure 18 shows the charge/discharge power supplied to the BESS.
When a very large frequency variation occurs, the RES will have to disconnect from the MG. The frequency protection ensures that the RES will stop feeding an unintentional islanding [32]. However, after the unwanted tripping of the RES, the power imbalance due to the loss of generation and load will cause the system to be in an uncertain operating condition.
RES units with capacities of less than 30 kW may have a lower impact on the operation of the system and can generally disconnect from the electrical grid area within 10 cycles (0.16 s) of the offset time. On the other hand, units greater than 30 kW can positively affect the reliability of the MG. The IEEE 1547 requirement takes this into account by allowing the electrical grid area operator to specify the frequency settings and a time delay of up to 0.16 seconds for low frequencies (below 57 Hz).
Based on the IEEE standard applied in this scenario, and noting from Figure 17 that there is an energy imbalance in the MG, we analyzed the curves inside and outside the frequency limits established for a RES unit greater than 30 kW. Figure 19 shows the remedial action that activates the BMSC when the frequency undergoes an abnormal change ( Figure 17).
When the frequency is outside the tolerance region below 59.8 Hz, the BMSC actuates the BESS for frequency regulation. However, because the power in the batteries has run out, the compensation time (0.16 s) starts from 57 Hz and, as it has a longer imbalance time, the BMSC takes the corrective action by disconnecting load to regulate the frequency. This RAS results in recovery of the frequency of the network.

VI. CONCLUSION
With the proposed battery management system control, it was possible to efficiently manage the use of batteries, thus increasing the availability of stored energy over a complete 24-hour cycle. Restrictions were formulated to drive the battery storage systems via the battery management system control to give an adequate response, in terms of energy balancing of the network within each period of 5 min. The battery management system control causes the battery management system to use the batteries to carry out a charge/discharge action when a power imbalance occurs within a given period. The battery power in each period is limited to a maximum of 10% of its capacity, to maintain the availability of the storage resource over a period of 24 hours. The amount of charging power, the minimum discharge, the maximum charge, and the number of operations is considered to prevent premature battery aging. In cases I and II, the frequency band is limited between 60.5 and 59.8 Hz. In case III, at 20.00 hr, the battery runs out and the frequency variation is outside the operating limits; the remedial action scheme is then activated.
In the event of a very large power imbalance, for which the battery storage systems cannot supply power, the battery management system control takes action by disconnecting the load and/or the generator. Therefore, in the future, it will be necessary to ensure that the BMSC can not only control the electrical variables but also performs control actions involving the disconnection of loads in blocks or areas classified as main and non-main, and to consider the economic aspects of the electricity market. Also, sensitivity analysis is not included because, for future work, it is desirable to carry out the tests in a real-time simulator.

APPENDIX
Parameters of the proposed system.

BESS SIZING
Location at nodes 2 and 3. 950 V HR model of lithium-ion. Charge and discharge power efficiencies, η D = 1η C = 1 The maximum battery capacity is: 136 KW (1 full Cycle / day).
Continuous Charge/Discharge Power is 68 kW. BMSC The charge/discharge power of each battery was limited to 6.8 kW, which is 10% of the continuous charge power specified for the batteries.
Charge and discharge: the number of operations considered is 96.
τ is the time (5 min). Nominal energy capacity per hour is: E b = 34kWh MG Sizing Island mode operation, with a voltage level of 15 kV. The MT-1 was set at 35 kW placed at node 1. The MT-2 at node 5 with operating limits between 35-50 kW.
PW at node 6 with 40 kW capacity.