In the context of modern power systems, energy storage technologies have become increasingly vital for ensuring grid stability, integrating renewable energy sources, and providing ancillary services. Among these, the battery energy storage system stands out due to its rapid response, high power density, and flexibility in deployment. Traditionally, low-voltage battery energy storage systems are connected to the grid through step-up transformers, which can introduce losses and complexity. However, a transformative approach involves directly connecting a large-capacity battery energy storage system to medium- or high-voltage grids using cascaded H-bridge converters, eliminating the need for bulky transformers. This configuration, known as a high-voltage direct-connection battery energy storage system, offers significant advantages such as modularity, high efficiency, and scalability. Despite its promise, the real-time simulation and control of such systems, especially when accounting for battery external characteristics, remain underexplored. In this article, I present a comprehensive study on the real-time simulation and control strategies for a high-voltage direct-connection large-capacity battery energy storage system, leveraging a CPU-FPGA co-simulation platform to validate performance under various operational scenarios.
The core of this system is the cascaded H-bridge topology, where multiple power modules are connected in series per phase to achieve the required voltage level. Each module comprises a battery pack, an H-bridge converter, filtering components, and pre-charging circuitry. This modular design not only enhances reliability but also enables direct grid integration at voltages like 35 kV, facilitating single-unit large-capacity applications. The control of such a battery energy storage system involves intricate strategies for power regulation, state-of-charge balancing, and modulation, which must be rigorously tested to ensure operational efficacy. Real-time simulation plays a crucial role in this process, allowing for hardware-in-the-loop testing without the risks and costs associated with physical prototypes. I have developed a real-time model that integrates detailed battery dynamics using a second-order RC equivalent circuit, enabling accurate representation of state-of-charge variations and external characteristics. This model, implemented on an OPAL-RT platform with RT-LAB software and OP5707XG hardware, supports up to 56 cascaded modules per phase at a 1 μs simulation step on the FPGA, making it the first of its kind to address both high-voltage and battery-specific aspects in real-time simulation.

The topology of the high-voltage direct-connection battery energy storage system is based on a three-phase Y-connected configuration, with each phase consisting of N cascaded submodules. Each submodule, as detailed in the structure, includes a lithium-ion battery, an LC filter, a pre-charging unit, and an H-bridge inverter. The H-bridge facilitates bidirectional power flow, enabling the battery energy storage system to operate in both charging and discharging modes. The pre-charging circuit, involving resistors and switches, ensures safe startup by limiting inrush currents during capacitor charging. This design is critical for protecting the battery energy storage system components and extending battery life. The modular nature allows for fault tolerance through bypass switches, which can isolate faulty modules without disrupting the entire system. The overall system can be mathematically modeled by representing each phase as a controllable voltage source, leading to equations that describe the interaction with the grid. For instance, the voltage balance equations in the three-phase stationary frame are given by:
$$ L \frac{di_a}{dt} = -R i_a + e_a – v_a + v_{NO} $$
$$ L \frac{di_b}{dt} = -R i_b + e_b – v_b + v_{NO} $$
$$ L \frac{di_c}{dt} = -R i_c + e_c – v_c + v_{NO} $$
where \( i_a, i_b, i_c \) are the grid currents, \( e_a, e_b, e_c \) are the grid voltages, \( v_a, v_b, v_c \) are the output voltages of the battery energy storage system, and \( v_{NO} \) is the potential difference between the system neutral and grid neutral. Assuming a balanced grid with \( e_a + e_b + e_c = 0 \) and \( i_a + i_b + i_c = 0 \), these equations simplify to:
$$ L \frac{di_a}{dt} = -R i_a + e_a – v_a + \frac{v_a + v_b + v_c}{3} $$
$$ L \frac{di_b}{dt} = -R i_b + e_b – v_b + \frac{v_a + v_b + v_c}{3} $$
$$ L \frac{di_c}{dt} = -R i_c + e_c – v_c + \frac{v_a + v_b + v_c}{3} $$
For control purposes, it is advantageous to transform these equations into the synchronous dq reference frame. By aligning the d-axis with the grid voltage vector, the active and reactive power can be directly controlled through the d- and q-axis currents, respectively. The transformed equations are:
$$ L \frac{di_d}{dt} = -R i_d + \omega L i_q + e_d – V_{dc} S_d $$
$$ L \frac{di_q}{dt} = -R i_q – \omega L i_d + e_q – V_{dc} S_q $$
where \( i_d \) and \( i_q \) are the dq-axis currents, \( e_d \) and \( e_q \) are the dq-axis grid voltages, \( \omega \) is the grid angular frequency, \( V_{dc} \) is the DC-link voltage of each submodule, and \( S_d \), \( S_q \) are the switching functions in the dq frame. This model forms the basis for designing the power control strategy. The power control aims to regulate active and reactive power by generating reference currents. Using a PI controller, the control law is designed to decouple the d- and q-axis dynamics:
$$ V_{dc} S_d = (i_d^* – i_d) H(s) – \omega L i_q + e_d $$
$$ V_{dc} S_q = (i_q^* – i_q) H(s) + \omega L i_d + e_q $$
where \( i_d^* \) and \( i_q^* \) are the reference currents derived from power commands, and \( H(s) \) is the PI controller transfer function. This strategy ensures that the battery energy storage system can accurately track power setpoints while maintaining grid stability.
Modulation is another critical aspect for the cascaded H-bridge battery energy storage system. Given the high number of modules per phase, the nearest level modulation method is preferred over carrier-based techniques due to its efficiency and simplicity. NLM determines the number of modules to be inserted based on the reference voltage waveform, and modules are selected according to sorting algorithms. To achieve state-of-charge balance within a phase, a modified NLM approach is employed, where sorting is based on a composite parameter that incorporates both capacitor voltage and battery SOC. This parameter \( M_{ki} \) for the i-th module in phase k is defined as:
$$ M_{ki} = u_{ki} (1 + \epsilon \Delta SOC_{ki}) $$
where \( u_{ki} \) is the capacitor voltage, \( \epsilon \) is a balancing coefficient, and \( \Delta SOC_{ki} \) is the deviation of the module’s SOC from the phase average. By prioritizing modules with higher \( M_{ki} \) during discharge and lower \( M_{ki} \) during charge, the battery energy storage system can achieve effective SOC balancing while maintaining capacitor voltage consistency. This integrated control strategy enhances the longevity and performance of the battery energy storage system.
The real-time simulation platform is built on the RT-LAB environment, which allows for CPU-FPGA co-simulation. The model partitions the system into three parts: the simulated controller, the high-voltage grid, and the cascaded battery energy storage system. The grid and controller run on the CPU with a 35 μs step, while the power electronics and battery models run on the FPGA with a 1 μs step, enabling high-fidelity simulation of switching dynamics. The battery energy storage system model on the FPGA uses a switch-function approach for the H-bridge converters, treating them as controlled voltage and current sources based on PWM signals. For the lithium-ion batteries, a second-order RC equivalent circuit model is implemented to capture the dynamic behavior. The state-space equations for this model are:
$$ \frac{dV_1}{dt} = -\frac{1}{R_1 C_1} V_1 + \frac{1}{C_1} I_{bat} $$
$$ \frac{dV_2}{dt} = -\frac{1}{R_2 C_2} V_2 + \frac{1}{C_2} I_{bat} $$
with the output voltage given by:
$$ V_{bat} = V_{oc} – V_1 – V_2 – I_{bat} R_0 $$
where \( V_{oc} \) is the open-circuit voltage, \( R_0 \) is the internal resistance, \( R_1, C_1 \) and \( R_2, C_2 \) represent polarization resistances and capacitances, and \( I_{bat} \) is the battery current. The parameters \( V_{oc}, R_0, R_1, C_1, R_2, C_2 \) are dependent on the SOC, which is updated in real-time using ampere-hour integration. A lookup table is used to adjust these parameters based on the SOC, ensuring accurate representation of battery external characteristics. This detailed modeling is essential for validating the control strategies in a realistic environment.
To demonstrate the capabilities of the real-time model, several test cases were conducted, including pre-charging, passive inversion, closed-loop power control, and intra-phase SOC balancing. The system parameters for these tests are summarized in the table below, which provides key details about the grid and battery energy storage system configuration.
| Parameter | Value |
|---|---|
| Grid Voltage | 35 kV |
| Grid Frequency | 50 Hz |
| Filter Resistance | 0.001 Ω |
| Filter Inductance | 20 mH |
| Battery Type | Lithium-ion |
| Battery Rated Voltage | 846 V |
| Battery Capacity | 85 Ah |
| Initial SOC | 50% |
| Modules per Phase | 46 |
| Rated Power | 10 MW |
In the pre-charging test, the submodule capacitors are charged from the batteries through a pre-charging resistor. The process begins by closing switch K1, allowing the battery to charge the capacitor with a limited current. After the capacitor voltage stabilizes, switch K2 is closed to bypass the resistor. The theoretical peak charging current can be estimated as \( I_{peak} = V_{bat} / R_{pre} \), where \( V_{bat} \) is the battery voltage at 50% SOC (approximately 930.62 V from the parameter table) and \( R_{pre} = 10 \Omega \), yielding \( I_{peak} \approx 93 A \). The real-time simulation results show that the capacitor voltage reaches around 930.5 V, matching the expected value, and the current waveform aligns with the theoretical analysis, validating the model’s accuracy.
For passive inversion, the battery energy storage system is disconnected from the grid, and the controller generates a modulation wave in phase with the grid voltage. Using NLM with a modulation index of 1, the output phase voltage peak should be \( V_{peak} = N \times V_{cap} \), where N=46 and \( V_{cap} \approx 930.5 V \), resulting in \( V_{peak} \approx 42.8 kV \). The simulated three-phase output voltages exhibit a staircase waveform with the correct amplitude and phase, demonstrating the effectiveness of the modulation strategy in the real-time environment.
Closed-loop power control tests involve connecting the battery energy storage system to the grid and commanding active power references. Initially, the system operates at zero power. At t=5 s, a discharge command of -10 MW is applied, and at t=10 s, a charge command of +10 MW is applied. The expected grid current amplitude under rated power is calculated as \( I_{grid} = \frac{2P}{3U_{line}} \), with \( P=10 MW \) and \( U_{line}=35 kV \), giving \( I_{grid} \approx 233.28 A \). The per-module battery current during discharge is \( I_{bat} = \frac{P}{3N V_{bat}} \), yielding approximately 77.87 A. Simulation results show that the active power tracks the references precisely, with grid currents matching the theoretical values. Additionally, the battery current ripple and capacitor voltage ripple are within expected limits (e.g., current ripple around 15%, voltage ripple around 2%), confirming the model’s dynamic fidelity.
The state-of-charge balancing test focuses on the intra-phase SOC equalization strategy. Initially, five modules in phase A are set with SOCs of 49.5%, 49.75%, 50%, 50.25%, and 50.5%, while the rest are at 50%. The system operates at rated discharge power without balancing for the first 2 seconds, then balancing is enabled. The results show that modules with higher SOC discharge faster during discharging and charge slower during charging, gradually converging to the average SOC. This behavior is captured by the SOC evolution curves, which demonstrate the effectiveness of the balancing algorithm in maintaining uniformity across the battery energy storage system.
The parameter identification for the second-order RC battery model is crucial for accurate simulation. The open-circuit voltage and RC parameters vary with SOC, as determined through experimental discharge and charge cycles. The table below provides a subset of the SOC-Voc data used in the real-time model, illustrating the nonlinear relationship that affects the battery energy storage system performance.
| SOC (%) | Open-Circuit Voltage (V) |
|---|---|
| 0 | 740.02 |
| 5 | 861.19 |
| 10 | 891.93 |
| 15 | 905.97 |
| 20 | 914.00 |
| 25 | 919.21 |
| 30 | 922.86 |
| 35 | 925.56 |
| 40 | 927.63 |
| 45 | 929.28 |
| 50 | 930.62 |
| 55 | 931.73 |
| 60 | 932.66 |
| 65 | 933.46 |
| 70 | 934.15 |
| 75 | 934.75 |
| 80 | 935.28 |
| 85 | 935.76 |
| 90 | 936.33 |
| 95 | 939.97 |
| 100 | 1009.44 |
In conclusion, the real-time simulation model developed for the high-voltage direct-connection large-capacity battery energy storage system successfully integrates detailed battery dynamics with high-fidelity power electronics modeling. The CPU-FPGA co-simulation platform enables hardware-in-the-loop testing at a 1 μs step, accommodating up to 56 cascaded modules per phase. Through various operational tests, including pre-charging, power control, and SOC balancing, the model demonstrates accurate performance alignment with theoretical expectations. This work provides a robust foundation for designing and optimizing control strategies for such battery energy storage systems, reducing development risks and costs. Future efforts could focus on extending the model to include grid fault scenarios or integrating with renewable energy sources, further enhancing the applicability of real-time simulation in advancing battery energy storage system technologies. The insights gained from this study underscore the importance of comprehensive modeling and validation in realizing the full potential of high-voltage direct-connection battery energy storage systems in modern power grids.
