Modelling battery energy storage systems for active network management—coordinated control design and validation

Control of battery energy storage systems (BESS) for active network management (ANM) should be done in coordinated way considering management of different BESS compo-nents like battery cells and inverter interface concurrently. In this paper, a detailed and accurate lithium-ion battery model has been used to design BESS controls, thereby allowing improved overall power system control design optimisation studies by simultaneously considering both component and system-level aspects. This model is utilised to develop a multi-objective ANM scheme (a) to enhance utilisation of wind power generation locally by means of active power ( P )- control of BESSs; (b) to utilise distributed energy resources (i.e. BESS and wind turbine generators) to maintain system voltage within the limits of grid code requirements by reactive power/voltage ( QU )- and active power/voltage ( PU )- controls. BESS control strategies to implement the ANM scheme, are designed and validated through real-time simulation in an existing smart grid pilot, Sundom Smart Grid (SSG), in Vaasa, Finland.

ANM principles in [4][5][6] were modelled to dispatch flexibilities in the distribution system for the day-ahead market through mathematical optimisation techniques. Whereas, [7,8] consider voltage regulation by means of reactive power control considering DER power capability curve limits and grid codes in an existing MV grid. Such studies provide details on the overall Pand Q-optimal dispatch for RESs and BESSs in the LV/MV distribution systems. However, network management studies considering the effect of such optimal dispatch on the operation of DERs and their grid-side and/or component level controllers are minimal. Considering the economic and technical aspects of DERs, especially BESSs, it is imperative to model their performance characteristics in detail.
BESSs because of their fast and controllable dynamics have the potential to provide multiple different flexibility services in stationary grid applications, especially in the ANM schemes acting as a buffer, to manage flexibilities in the distribution systems. From transmission and distribution system operators (TSO/DSOs) point of view, an effective way to utilise BESSs for ANM, will be to place them in an HV/MV substation or the MV distribution for example at MV/LV substations. Their benefits [9] include, 1. Increase the capacity to transfer active power by storing the energy at times of higher RES generation, avoiding the cost for additional transfer capacity 2. Secure reliable LV-network distribution to all or the most critical customers in cases of MV-network fault by utilising intended island operation 3. The storage capacity of MV/LV substations can be increased in a modular way for example, when customer reliability requirements or RES integration in LV network increase 4. Local compensation of reactive power produced by underground cables by decreasing the reactive power exchange in the MV network, thereby reducing network losses and increasing active power flow 5. Continuously control reactive power flow through the distribution system to minimise frequent tap changes in OLTC when the amount of flexibilities is higher in a system [10] In addition to local flexibility services, BESSs can also provide a variety of system-level technical ancillary/flexibility services [9]. The utilisation of BESSs for single purpose such as improving electricity supply reliability (intended islanded or microgrid operation) or increasing RES penetration in the distribution network may not be economically viable, considering its robust ability to participate in multi-use case scenarios [11]. Hence, the developed ANM scheme is based on the multi-use capability of BESSs.
Lithium-ion (Li-ion) BESSs are capable of acting as flexible energy sources and providing multiple technical ancillary/flexibility services including frequency support by controlling active power injection and voltage regulation by reactive power control [12][13][14]. Ability to react fast, higher energy and power density, longer cycle and shelf life, low self-discharge rate, high round trip efficiency and improved safety performance have favoured Li-ion based BESSs for stationary grid applications. However, Li-ion batteries are intercalation-based energy storage systems, which operate as a closed system [15] with very few measurable state variables, which makes it difficult to monitor the states of the battery properly. Therefore, it is required to understand model precisely the Li-ion BESS behaviour under various operating conditions, unlike in recent research [16][17][18], where generic or most basic Li-ion battery models are considered.
In this paper, the equivalent circuit model (ECM) is developed for nickel-manganese-cobalt-oxide (NMC) cathode based Li-ion battery and used to design BESS control topologies. In terms of performance, ECMs are highly accurate than the kinetic battery models (KBM)/modified KBMs [19,20] and mathematical models [21]. ECMs [22][23][24][25][26] are computationally less intensive compared to the Physics-based electrochemical models [27]. In this study, second-order equivalent circuit (SOEC) of Li-ion BESSs has been proposed and placed strate-gically in the MV distribution grid harnessing its utilisation for multi-objective ANM scheme.
In order to maximise the multi-use capabilities of BESSs for distribution systems, controllers such as reactive power/voltage (QU-), active power/voltage (PU-) and active power (P-) controls are designed to act in co-ordination with each other. In previous research [28,29], BESS integration to the MV bus of SSG was studied in detail considering the fast dynamics of the power systems, where the grid was modelled in EMT mode capturing the power system fast transients in detail. However, the slow dynamics that is control of voltages over an extended time will be modelled in the scope of this paper. Overall, in this paper, the focus was laid on, 1. Development of ANM architecture with QU-, PUand Pcontrollers for managing available flexibilities of various DERs, especially to generate control signals for the BESS and wind turbine generator (WTG) inverters in the MV distribution system 2. The utilisation of accurate ECM for Li-ion BESS controller development in grid integration studies 3. Studying the effects of BESS inverter operation on the Li-ion BESS performance, including the thermal effects of Li-ion batteries 4. Understanding the interaction of BESS inverter controller with the grid side controllers in the distribution system In this paper, the SOEC model for Li-ion BESS grid integration studies includes SoC, temperature, current rate and ageing effects explained in Section 2. The ANM architecture to manage flexible energy sources and its underlying controller design for a stable MV distribution system is presented in Section 3. Validation of the developed ANM scheme is implemented in Section 4, by managing the available flexibilities in MV distribution system in SSG network.

LI-ION BATTERY MODEL
Thevenin-based SOEC model is a versatile technique [25].
It successfully emulates the model parameters such as multivariable SoC, charge-rate (C-rate), temperature, hysteresis effects, self-discharge and battery ageing. SOEC is considered the benchmark model for Li-ion batteries, as it depicts the charge transfer, diffusion and solid electrolyte interface reactions in the form of resistors and capacitors. Figure 1 shows the proposed dynamic equivalent circuit model for the NMC type Li-ion battery cell. Open circuit voltage (OCV) is modelled as an ideal voltage source, and the internal resistance is modelled as R i . Two RC combinations are suggested for modelling Li-ion battery cell, so that the dynamic behaviour is modelled as R 1 , C 1 , R 2 and C 2 . The hysteresis and polarization effects in the Li-ion cells can be simulated accurately enough with the two RC combinations. The model structure is simpler compared to more RC combinations. The model parameters (OCV, R i , R 1 , C 1 , R 2 and C 2 ) are obtained by hybrid pulse power characterization (HPPC) tests [30].  A closer view of the voltage response from the HPPC profile can be seen in Figure 2. It shows an immediate voltage drop (ΔV 0 ) when the current pulse (I ) is applied. This result is the internal resistance of the cell, which is contributed by resistance of active material, electrolyte and current collector. It can be also observed that there is a time-varying voltage (ΔV 1 and ΔV 2 ), which can be interpreted as a presence of additional elements such as a capacitor in parallel combination with resistance. The time-varying voltage part can be divided into short transient and long transient RC elements due to different time constants (t 1 and t 2 ) in the voltage profile. The output voltage equation for the second order ECM is shown Equation (1). The mathematical representation of the time constants is shown in Equations (2) and (3). OCV is evaluated from the voltage response of the HPPC profile at a given SoC interval, at the end of 1 h pause time.
SoC is estimated by using coulomb counting method (CC) [26]. CC method provided the best accuracy with minimal computational effort in an environment where the measurement noise was minimal [31], such as measurements from battery cyclers. Hence, the SoC calculation from the CC method has been considered as the reference value in this study. The overall performance of the SOEC battery model is depicted in Figure 3 by comparing experimental and simulated voltage curves using the HPPC load current profile. The SOEC modelling technique can be utilised to estimate heat generated by battery cell, which leads to the temperature increase due to Joule heating effect. This temperature change affects the performance of the Li-ion battery considerably [13]. The major highlight between the model developed in [30] and the model presented in this paper is the development of the thermal model, which considers both SoC and inner cell temperature as affecting parameters. The inner cell temperature is considered uniform within the cell and taken as the average temperature inside the cell. Equation (4) represents the irreversible heat generated by the battery cell due to the Joule effect [32]. Therefore, temperature changes during the cell operations are determined providing set points for the thermal cooling system and the battery management system. where,

ACTIVE NETWORK MANAGEMENT
In [33][34][35][36] extensive research on various ANM schemes to maintain system voltage by control of reactive power flow from the DERs within the reactive power window (RPW) provided by the Finnish TSO, Fingrid and ENTSO-E standards have been studied and validated in a local smart grid pilot SSG. RPW specified by Fingrid at the HV side of the TSO/DSO interface is represented in [36] and the requirement at the MV side is presented in [37]. The maximum active power limits are based on the measured data from year 2016, when imported grid power was 8.3 MW and the exported was 1.975 MW. According to the grid codes, the ANM voltage control is set to a maximum voltage of 1.05 pu, and the minimum voltage limits are set at 0.95 pu (both HV and MV connection points), which is based on the thermal limit for maximum current flow in the system. From previous results, the reactive power control of WTG was adequate to satisfy RPW conditions. However, it was recommended to study multi-use capabilities of BESSs such as, active power control flexibility, primarily to improve RES hosting capacity and reactive power control utilisation to complement WTG Proposed flexibility management schematic for the MV grid of SSG is shown in Figure 4. The ANM architecture developed in Section 3.1, forms the basis to deploy flexibility management in the MV distribution system. The ANM scheme in-turn depends on the functionalities of the energy management system (EMS) and its adjoining controllers to provide technical ancillary services. Details of the ANM architecture, EMS functionalities and the EMS controller design to provide flexibility management is explained further in this section.

Active network management architecture with BESS
BESSs integrated to the SSG MV bus are primarily designed to complement the stochastic nature of wind power generation, that is, store excess wind power generation and discharge during reduced wind power generation. Secondly, they are used to provide technical ancillary services. The WTG primarily caters maintaining the HV side of the grid within the RPW. However, the reactive power (Q WT ) control flexibilities provided by the WTG are dependent on the active power generation (P WT ), which in turn is dependent on the intermittent nature of wind. There by, WTG alone may not be sufficient to provide flexibilities in a power system, especially with respect to the reactive power compensation by the WTG. Hence, BESS placed strategically in the MV distribution grid will be able to complement WTG in providing various technical services in the MV distribution side of the smart grid.
The ANM control architecture described in Figure 5 was designed to implement in SSG to manage flexibilities offered by WTG and Li-ion BESS. Enhancing local utilisation of wind power generation with the aid of BESSs is the primary objective of this ANM architecture. Voltage regulation within the threshold in the MV side of the grid constitutes the secondary objective. Measured MV grid data, that is active power (P GRID,MEAS ), reactive power (Q GRID,MEAS ) and voltages (V GRID,MEAS ) is provided as the input to the control architecture. The first layer in the control architecture consists of different control techniques, capable of providing technical services to enforce ANM. QU-, Pand PU-control methodologies helps in managing different available flexibilities in the power system. In this layer, the total required reactive power control is required to maintain targets for RPW control and QU-control, the Fingrid codes' requirements, thereby defining the overall requirements for QU-control of flexible energy sources. Along with that, the P-control for BESSs is estimated and dispatched to the next layer. PU-control requirements are calculated when QU-control does not satisfy the grid code requirements.
The These control signals are then forwarded to the EMS controllers as Q FLEX (Q BESS and Q WT ) to the QU-controller, P BESS is forwarded to the P-controller and P FLEX is provided to the PU-controller layers. All the three control layers act in tandem to provide Q GRID,Flex and P GRID,Flex to the MV grid, there by controlling the active and reactive power flows in the HV/MV connection point regulating the values based on the RPW control requirements. Figure 6(a-c) shows the design and architecture of the individual control techniques, that is QU-, Pand PUcontrols respectively employed in the ANM management principle defined. Their overall operations are explained as below.

QU-management system
Voltage regulation at the MV side (V MV ) of the HV/MV connection point is the primary objective of this control loop by  Q WT control of WTG system depends on the reactive power output capability. The inverter operating range should be applied accurately before utilising reactive power control strategy in WTGs so that the maximum active power generation from the wind turbine is not disturbed. Therefore, the maximum controllable reactive power from the WTG is calculated by Equation (5). Q WT,min and Q WT,max are the maximum and minimum reactive power output from the WTG. S WT denotes apparent power of the WTG. The negative symbol denotes absorbing reactive power and that of positive symbol to generate reactive power.
P-control of the BESS was set higher in the hierarchy so that its main goal is to enhance wind power penetration by controlling the charging and discharging P BESS as per the grid's requirement. However, the reactive power control of BESS is defined by the phasor relationship between the battery inverter operating parameters as in Equation (6), for several different levels of BESS active power output (P BESS ). When S BESS is larger than P BESS , the inverter can supply or consume reactive power, Q BESS . The BESS inverter can dispatch Q BESS quickly (on the cycle-to-cycle time scale) providing a mechanism for rapid voltage regulation. As the output,P BESS approaches S BESS (apparent power of Li-ion BESS), the range of available Q BESS decreases to zero.

P-management system
Due to its capability in catering both active and reactive power requirements of the SSG, BESS control includes both P-control by regulating P BESS and QU-control by regulating Q BESS , there by satisfying the ANM requirements commanded by the MV distribution system in SSG. Li-ion BESS active power control in the MV distribution system shown in Equation (7), which is primarily designed to charge (P chg ), when the wind power generation exceeds load demand and discharge power (P dis ) during higher demand than its wind power production, which is controlled by the battery's SOC within their threshold SOC min and SOC max . Overall active power discharged by the BESS is defined by Equation (8) and the BESS is charged with a power of 500 kW as with a C-rate of 0.5 C as shown in Equation (9). where, (if SOC min < SOC⟨SOC max and P Load ⟩P WT ) P chg ; (if SOC < SOC min and P WT > P Load ; ) 0 (7) 3.1.3 PU-management system PU-management system is designed to keep in mind the curtailment of renewable energy generation, when the voltage limits exceed 1.05 pu in the system's MV bus. To manage the curtailment droop control referred in Figure 7 is utilised for the curtailment of wind power generation.

RESULTS AND DISCUSSION
Dynamic voltage stability simulation is the key component in control and dynamic security assessment tools. The ultimate goal in this field has always been to perform these To ensure secure functioning of BESSs in smart grids, extensive real-time phasor simulations, where active and reactive power control system design and validation of BESSs over an extended period (i.e. hours to a day) are necessary. They provide accurate setpoints for the battery system controllers. Such simulations are equivalent to developing and verifying secondary and tertiary controllers for BESSs, in a hierarchically controlled power system topology. In this paper, the ANM scheme defining the role of BESS in enhancing wind power generation and MV distribution system voltage control is explored through simulation studies in the ePhasorSim platform by OPAL-RT [38]. ePhasorSim is a real-time transient stability solver used for simulating slow dynamics of large scale power systems in real-time. This tool is interfaced with Matlab/Simulink and compatible with load flow and dynamic data files from Power-Factory simulation software. Hence, for this study SSG model was developed in PowerFactory by the data provided by Local DSO, Vaasan Sähkoverkko and later imported to OPAL-RT to integrate BESSs and design their controllers. Three cases are designed to study the utilisation of available flexibility for ANM of the SSG, predominantly voltage control and better utilisation of wind power generation. None of the flexibilities are utilised in the first case, thereby providing the base case scenario used to compare second (WTG as flexibility source) and third case (WTG and BESS as flexibility sources). All the simulations run for a period of 24 h, mainly in order to evaluate the different controls of flexible energy sources and their planning over a period of one full day. In all the cases, SSG is modelled as a grid-connected microgrid, without on-load tap changer (OLTC) in the HV/MV transformer. Therefore,

Case 1: Without ANM
The real-time simulation environment is presented in Figure 8. SSG is represented in Figure 9, which is a pilot living lab jointly created by ABB, Vaasan Sähköverkko (DSO), Elisa (communications) and University of Vaasa [39]. Real-time voltage and current measurements (IEC 61850 standard) recorded from the MV distribution network, from all four feeders at an HV/MV substation and three MV/LV substations comprising 20 measurement points in total. Measurements are sampled at 80 samples/cycle. In addition measurements of, active and reactive power, frequency, RMS voltages, currents etc. are received by GOOSE messages. Figure 10 represents SSG with Li-ion BESS integrated to the MV grid. The base case scenario where SSG is simulated without BESS in the MV distribution system is shown in Figure 9. This approach enables us to record the active and reactive power flows at the HV/MV interface and active power flow of the WTG. The SSG WTG is of permanent magnet synchronous generator type, thereby allowing it to absorb or inject reactive power to 100% of its rated power. In this case, the reactive power control (QU-control) of the WTG is disabled, to record the original characteristics in the SSG without the operation of any flexible energy resources adhering to IEEE 1547-2018 [40] guidelines. P WT and Q WT generation from the wind turbine is shown in Figure 11(a), where negative symbol denotes power generation. Figure 11(b) shows the active (P HV ) and reactive power (Q HV ) flow from the HV side of the HV/MV transformer. In the early part of the day, grid supplies power due to the reduced wind power generation and later it starts to consume power generated from SSG. The flexibilities provided by the reactive power control of the WTG is unused to record the system parameters in the base case scenario. V HV and V MV , the system voltages measured during the simulation, from the HV and MV side of the transformers respectively. The SSG as a grid-connected microgrid, proves to be a very stiff grid on the HV side with V HV close to 1 pu. Whereas, the voltage in the MV side of the transformer is close to 0.94 pu (Figure 11(c)), which is well under the limitations commanded from the Fingrid's RPW. Hence, there exists a need from flexible energy sources to regulate system voltage at the MV grid, in the absence of OLTC. Hence, the following cases are defined to utilise the available flexibilities to stabilise voltage in the MV distribution system.

Case 2: ANM flexibilities (WTG only)
In this case, the WTG's reactive power flexibility in the SSG is utilised to control voltage at the MV bus, adhering to the modified standards explained in Section 3. P WT of the WTG is the recorded measurement data. However, Q WT control of WTG system depends on the reactive power output capability based on QU-control calculations. The flexibilities of QU-control from the WTG have been utilized to stabilise MV distribution system's voltages. The WTG absorbs reactive power in the system to its maximum possible value as defined by the ANM scheme determined in Section 3. Active and reactive power flows from the WTG is shown in Figure 12(a), where the instantaneous Q WT is determined by Equation (5). The voltages at the HV and MV side of the HV/MV transformer in SSG is presented in Figure 12(b). Despite the maximum flexibility available from the QU-control of WTG, it is observed that the voltages in the MV side of the transformer, does not stay within limits defined by the ANM targets. Hence, further flexibilities are required in the network to regulate voltage at the MV distribution system.

Case 3: ANM flexibilities (WTG and BESS)
Li-ion BESS and its integration in MV grid using power converters (bus J10*) are shown in Figure 10. BESS has been modelled based on the SOEC method as explained in Section 2. Li-ion BESS characteristics are presented in Table 1.
Due to its capability in both catering both active and reactive power requirements of the SSG, BESS controllers should include both P-control by regulating P BESS and QU-control by regulating Q BESS , there by satisfying the ANM requirements commanded by the MV distribution system in SSG. BESS internal control algorithms are described by Equations (7)-(9). Li-ion BESS active power control in the MV the distribution system is shown in Equation (7), which is primarily designed to P chg , when the wind power generation exceeds load demand and P dis during higher demand than its wind power production,  which is controlled by the battery's SoC within their threshold SoC min and SoC max . Overall active power discharged by the BESS is defined by Equation (8) and the BESS is charged with a power of 500 kW as with a C-rate of 0.5 C as shown in Equation (9). Simulations are run by integrating Li-ion BESSs in the MV distribution system and their respective controllers are evaluated. Figure 13(a) presents active and reactive power of the BESS, following the commands set by Equations (7)- (9). During the beginning of the simulation P Load is greater than P WT . Hence, the BESS begins to discharge active power, with any reactive power flow due to the grid's reference set. However, during the course of the day, P WT increases and is able to cater the load demand requirements and also capable of charging the BESS. Over this period, it is noted that the maximum reactive support from BESS is utilised due to its requirement to regulate MV bus voltage except the time during BESS charge. In that  instance, reactive power flow is controlled by Equation (6). MV and HV bus voltages are presented in Figure 13(b), where both the voltages are within the threshold values determined by the ANM control architecture. The primary advantage of adding the SOEC battery model to the SSG to design their controller principles is to understand the way battery as a component responds to the requirements presented by the grid. Figure 14 explains various battery characteristics on the DC side due to the demands exerted by the AC side of the power grid. BESS operates with a range of SoC min and SoC max , which is as shown in Figure 14(a), where it operates between 20% and 90% SoC accurately. Figure 14(b) shows the DC current characteristics on the battery, where P dis operation does not exceed 1MW and P chg happens at 500 kW. BESS voltage characteristics are shown in Figure 14(c), which provides an important set-point  Table 2.
When the BESS is subjected to the current profile in Figure 14(b), the temperature changes in the battery cell due to  It is assumed that the ambient temperature is 25 • C. This result from the battery thermal model provides direct information on the effect of grid current requirements on the BESSs thermal characteristics. Hence, the SOEC battery model provides set points to design battery management systems, that is by considering both thermal and electrical characteristics of battery operation.

CONCLUSION
Li-ion BESSs will play a dominant role as flexible energy sources for stationary grid applications because of their versatile nature, tending multi-objective applications in ANM schemes and their capability to participate in active and reactive power flexibility markets. However, the Li-ion BESSs are highly non-linear in performance with stringent safety requirements due to their characteristics. It is important to include the parameters affecting battery performance while designing grid-scale controllers for BESS to cater to the power system requirements. Hence, in this paper ANM control schemes were developed by utilising the second-order equivalent circuit battery model, an accurate representation of battery operations keeping the battery characteristics in safe operational areas. Li-ion BESS controls were designed to cater effective management of available flexibilities in the MV distribution system. Such studies allow validating the BESS-ANM control schemes and provide a detailed analysis on the impact of such load curves on the BESS performance attribute.
In future, more use cases will be added on to the existing multi-use scenarios of the BESS for managing flexibilities in a medium voltage distribution system, especially with respect to catering system frequency related challenges and the effects of Li-ion BESS aging will be included for smart grid applications.