Control Strategy of Distributed Battery Energy Storage System with Harmonic Compensation

Based on the distributed battery energy storage system (BESS), a grid-connection strategy considering harmonic restraint is investigated. It can compensate the harmonic current to the grid by measuring the grid harmonics, then harmonic compensation is implemented to reduce the total harmonic distortion (THD) of the grid current. In this paper, the method of measuring harmonics in the grid and the control principle of providing power supply and harmonic compensation based on BESS are described. On this basis, the control flow is designed. Firstly, the energy storage grid-connected system is built in MATLAB/Simulink and the uncontrolled rectifier with inductive and resistance load is used for testing. The simulation results show that the grid current contains many harmonics, and the grid current THD decreases significantly by controlling BESS for harmonic compensation, which validates that the control method proposed in this paper is accurate and feasible.


Introduction
In recent decades, with increasing concerns about resource depletion, climate change and environmental pollution, the proportion of installed renewable energy has gradually increased.However, clean energy, such as wind and solar power, is unstable and difficult to predict.The time-shift characteristics of BESS energy can effectively alleviate the load peak and compensate the load valley for the output of renewable energy, and effectively adjust the power supply of the grid to avoid resource waste.At the same time, with the large use of nonlinear load, many harmonics will be generated in the grid.This will increase the loss in the transmission lines and make the energy storage components overheat and aging.In order to solve the above problems, many researchers have carried out relevant research.At present, many methods of harmonic suppression have been invented, the most widely used of which is the use of filters to effectively control harmonics in the grid [1].For example, the passive power filter (PPF) in parallel to the power system or active power filter (APF) produces a compensation current which is opposite to the harmonic current in the grid.PPF has been studied a lot, which is a mature technology and widely used [2][3][4][5], but its disadvantage is that it can only suppress harmonics of lower frequency and it is difficult to achieve dynamic harmonic suppression.Only a few major harmonics can be selected for suppression.In view of the defects of PPF, the researchers propose that APF can achieve ideal harmonic suppression [6][7][8][9][10], but due to the hardware limitations, APF is more expensive to build separately.
In this paper, based on BESS, a control strategy with grid connection and harmonic suppression is proposed, the current harmonics of the grid are detected by the analog filter, and the corresponding dynamic harmonic compensation for the grid.The organizational structure of this paper is as follows.The method of measuring harmonics in the grid and the control principle of providing power supply and harmonic compensation based on BESS are shown in II.Simulation details are presented and analysed in III.Conclusions are summarized in IV.

Harmonic Current Detection Method
The applied grid-connected energy storage inverter and harmonic compensation network is shown in Figure 1.Firstly, a phase-locked loop (PLL) is used to obtain sinusoidal wave sinωt and -cosωt with the same frequency and phase as the A phase grid voltage e a .The nonlinear load electrically flows through the transformation matrix C 32 to the α-β coordinate axis to obtain i α , i β .The matrix C 32 is: Then through the transformation matrix C, they are converted to p-q coordinates to obtain i p and i q .The matrix C is: sin cos cos sin Nonlinear load current on the d-axis i p is: where p i is the DC component of an electric current, and i h is the high frequency component of current.
The high frequency is filtered out to get p i .p i subtracts the actual output current of energy storage to get the reference current ' p i .Then, the harmonic component i h can be obtained by transferring ' p i to a three-term coordinate axis and then subtracting it with the asymmetric load current.The matrix C 32 used for coordinate transformation is:

Harmonic Compensation
As shown in Figure 1, the coordinate component i p of the actual output current value of the inverter under the p-q axis is adjusted by two PI controllers i p and i q reaching the reference values i * p and i * q .i * p and i * q are the p-q axis component obtained by i h after transformation matrix C 32 and C. On the other hand, the actual voltage of the grid e abc is also decomposed by the change matrix C 32 to get e p and e q .The output values i ' d and i ' q of the PI controller are calculated through Formulas (2-5) to obtain u d and u q .Through the transformation matrix C, u d and u q are converted to u α and u β .u α and u β are fed into the SVPWM module to modulate PWM signals, and the IGBTs are controlled, so that the inverter controls the energy storage to the grid or provides harmonic compensation.' ' A compensating current with the same amplitude and opposite phase as the nonlinear load harmonic current is generated and injected into the grid to compensate or eliminate the harmonic current of the grid.

Simulation and analysis
To verify the practicality of the proposed grid-connected BESS with harmonic compensation control method, a simulation model was built for verification.The line-line voltage of the grid is 380 Vac and the frequency is 50 Hz.The type of battery is lithium-ion.The nominal voltage of the battery is 360 Vdc.The initial state of charge (SOC) of the battery is set as 80%.The rated capacity of the battery is 10 Ah.

Case1 BESS connected to grid with resistance loads
At first, set the power grid load to linear load.The active power is 4 kW and the power factor is 1. Figure 2 reveals that when the system is stable, the current wave output by the inverter is a sinusoidal wave with the same phase as the grid voltage.The output power of the inverter is shown in Figure 3.The yellow and blue curves represent active and reactive power respectively.The active and reactive power generated by the BESS is stable.Figure 4 shows the variation in battery SOC.The distributed BESS supplies the power grid well.

Case2 Harmonic Compensation
In this case, the nonlinear load is connected to the grid.It is composed of an uncontrolled rectifier with resistance and inductance load.The active power is 3.2 kW, the reactive power is 1.5 kVar, and the power factor is 0.9. Figure 5 shows the THD of the grid current when the inverter does not compensate for the harmonic current.It is approximately 16.63%.Figure 6 shows the THD of the grid current after the system is stable when the inverter outputs harmonic compensation.It is reduced to 6.12%.Although it is still greater than the 5% limitation in the national standard, the quality of the grid current is enhanced significantly compared with the grid current without harmonic compensation.

Conclusions
In this paper, the method for BESS to provide harmonic compensation for the power grid is proposed.
The simulation results validate that when the inverter output is active power, it can supply power to the grid normally.When the inverter output is harmonic compensation, the grid current THD is effectively reduced.The harmfulness of harmonic generated by the nonlinear load to the power grid is significantly alleviated.

Figure 1 .
Figure 1.Control block diagram of single source grid-connected energy storage inverter and harmonic compensation.

Figure 2 .
Figure 2. Grid A-phase voltage and inverter output A-phase current diagram.