Research on Multi-Mode Operation and Coordinated Control Strategy of Grid-Connected Photovoltaic/Biogas/Energy-Storage System for Rural Ecological Breeding

Driven by the rural revitalization strategy and the carbon neutrality goals, the grid-connected photovoltaic/biogas/energy-storage (PV/biogas/ES) system is increasingly widely used in rural China. In this paper, a coordinated operation and control strategy of grid-connected PV/biogas/ES system for rural ecological breeding is proposed. Biogas, ES, and controllable load can adjust their operation state based on meeting constraint conditions to prevent overload from affecting the distribution transformer service life. The line voltage and load can adjust the ES control strategy. The peak shaving and valley filling can be realized through orderly charge/discharge control, in normal operation. Based on virtual synchronous generator (VSG) control, the ES has a certain frequency modulation ability. Meanwhile, overcharge, and over discharge can be avoided by detecting the state of charge (SOC) and adjusting the output power. When the line voltage drops suddenly, VSG can be switched to reactive power compensation mode. The battery energy storage system (BESS) and grid-connected inverter constitute a STATCOM/BESS, which can provide continuous reactive current to the grid to raise the line voltage and improve the system reliability. The effectiveness of the proposed strategy is verified by MATLAB/Simulink simulation.


INTRODUCTION
Recently, due to the low-cost and high-revenue characteristics of the breeding industry and the support of relevant policies, the quantities, and scales of rural livestock farms are increasing rapidly (Sayed et al., 2020). However, the breeding industry helps farmers grow their income, and brings environmental problems such as soil, water, and air pollution, which hinders the sustainable development of rural economy and society (Mottet and Tempio, 2017). Using livestock manure to produce biogas for generation can effectively reduce pollution and fossil energy consumption and has been widely used on farms (Scarlat et al., 2018). Driven by the reform trend of the world energy industry, many PV/biogas/ES systems are connected to the grid, which has a broad application prospect in rural ecological breeding. Studying the energy management strategy and control strategy of grid-connected PV/biogas/ES system are significance (Colmenar-Santos et al., 2015;Deng et al., 2022).
The control strategy of PV/biogas/ES combined system for rural ecological breeding needs to consider two aspects, including the operation strategy in different conditions and the coordinated control strategy of each component (Bär et al., 2020;Li et al., 2022). Scholars from various countries have conducted studies on the above-mentioned aspects. In terms of the operation strategy of the hybrid generation system, literature (Al-Masri et al., 2022) introduces a power management method for the PV/biogas hybrid system. However, it does not consider the application of the ES in the system. Literature (Liu et al., 2019) designs a power allocation method for the AC/DC hybrid microgrid, which smooths renewable energy and load power fluctuation by formulating the DC side ES operation strategy. However, applying to a small rural capacity AC grid-connected system would be difficult. Literature (Vivas et al., 2017;Bhattacharjee et al., 2021) introduces the energy management strategy of a hybrid renewable energy grid-connected system, which switches the energy supply mode according to the changes in operating conditions to maintain the balance between supply and demand. Yet, it only focuses on the strategy in normal operation and does not explicitly consider the energy management strategy in abnormal conditions such as distribution transformer overload and grid voltage drop.
Regarding the grid-connected coordinated control strategy of renewable energy and ES hybrid system, literature (Gai et al., 2019;Merahi et al., 2021) introduce the control modes of the distributed generation and ES in the hybrid energy supply and consumption system. Among them, the AC/DC converter adopts P/Q control during the grid-connected operation and V/F control during island operation. It can supply power stably during the normal system operation, but it has a poor ability to participate in system fault regulation. Literature (Li and Yuan, 2020) proposes a grid connection control strategy for PV/ES systems based on VSG, which can realize the friendly grid connection of PV and ES. However, it only considers that the ES is connected in parallel on the DC side of the PV system and cannot be used to adjust biogas generation.
To sum up, the current research on the coordinated control of PV/biogas/ES system for rural ecological breeding can be improved in the following aspects: (1) Operation strategy: it is necessary to comprehensively consider the different operation states such as normal and overload of the system and formulate the coordinated power management strategy of distribution source, load, and ES to maintain the balance between supply and demand.
(2) Coordinated control strategy: the ES can participate in power regulation by improving the control, and be used for voltage support to improve the reliability of the power supply system.
This paper proposes a multi-mode coordinated control strategy of a grid-connected PV/biogas/ES combined generation system for rural ecological breeding. Firstly, a multi-mode operation strategy is presented by analyzing the different operating system conditions and the constraint conditions of each component. Secondly, the flexible grid connection control strategy of the PV/biogas/ES system is proposed. Each unit can adjust the output power based on the multi-mode operation command to balance the supply and demand in the system. Then, considering the impact of failure, a voltage support control based on ES is proposed. Finally, a simulation model is built in MATLAB/Simulink to verify the reliability of the proposed strategy.

OPERATION ANALYSIS OF TYPICAL GRID-CONNECTED PV/BIOGAS/ES SYSTEM
Taking a rural pig farm in Jiangxi Province of China as the research object, its energy supply and consumption system are shown in Figure 1. The system includes PV, biogas and BESS, which cooperate with the grid to supply power to the AC loads in the pasture. In the figure, the load power of users and pig farms is the total power of all electric loads.

Operation Analysis of PV System
The equivalent model of PV generation can be expressed as Eq. 1 (Tang et al., 2016).
where I PV (t) and V PV (t) are the output current and voltage of the PV system at time t, respectively. Moreover, I SC (t) and V OC (t) express the system short-circuit current and open-circuit voltage at time t, in respect. Other parameters including, C 1 and C 2 are intermediate constants.
To improve the energy efficiency, the PV system adopts the maximum power point tracking (MPPT) control to maximize the output of the system. If the output power tracked by MPPT is P MPPT , PV (P PV ) power shall meet the condition Eq. 2 The PV system should generally work in MPPT mode to improve energy efficiency and reduce carbon emission. The mentioned mode is to maximize the system output and realize local accommodation of renewable energy as much as possible. Moreover, the excess electric energy shall be absorbed by ES or flow into the grid in MPPT mode. It is worth noting that once the output power is higher than the overall demand of the system, it should be reduced to avoid failure. As the PV capacity in the proposed scene is small, the system operation in MPPT mode will be considered later.

Operation Analysis of Biogas Generation
The biogas generation system is directly connected to the grid through a synchronous generator, regarded as a stable voltage source. It is put into operation during the peak load period to avoid overload of the distribution transformer. Moreover, it exits the operation during the low load period to store biogas for power generation. The power of biogas generation (P BG ) can be expressed as Eq. 3 where b BG can be either 0 or 1, used to control the biogas generation to put into/out of operation. b BG = 0 means that it is closed, and b BG = 1 means that it is open. P BG,N is the rated power of biogas generation.
Assuming that the capacity of the biogas storage tank is C BS and the biogas reserve at time t is S BG (t), it shall meet the condition Eq. 4 where p BS,max , and p BS,min are the upper and lower boundaries of the proportion of biomass reserves, respectively. In Figure 1, the value of the proposed parameters are: C BS = 300kg, p BS,min = 0.2, p BS,max = 0.9.

Operation Analysis of ES
Due to the flexible and adjustable characteristics of ES, it can effectively improve the stability of a high proportion renewable energy system. The BESS includes a buck/boost converter for battery charging/discharging control. Its topology is shown in Figure 2 (Helling et al., 2019).
Owing to the battery capacity constraints, its charge/discharge power shall not exceed the specified range in actual operation. In addition, to prevent the battery from overcharging or discharging, its state of charge (SOC) should be kept within a safe range. In the selected scene, the BESS should meet the constraints Eq. 5 where P ES is the discharge power of BESS; P ESc,max , and P ESd,max are the maximum charging and discharging power allowed for BESS, respectively, and both values in this paper are 80kW. SOCb is the SOC of the battery; SOCb max and SOCb min are the upper and lower boundaries of the SOC, usually 80% and 20%, respectively.

Operation Analysis of Adjustable Load
According to the operation characteristics, the loads can be divided into adjustable and non-adjustable loads. It is regarded as a non-adjustable load because the user load is small and difficult to adjust. The adjustable load of the farm mainly includes warehouse handling equipment and a sewage system. It can be cut off when the distribution transformer is overloaded and put into operation outside the peak load period. The load distribution in the breeding plant is presented in Table 1, in which the adjustable load accounts for 6%. At time t, the adjustable load power of the system (P adj ) can be expressed as Eq. 6 where b HE (t) and b SS (t) can be 0 or 1, which respectively represent the switching state of warehouse handling equipment and sewage system at time t. If the value is 0, it indicates the prohibited

FLEXIBLE RESOURCE OPERATION STRATEGY OF PV/BIOGAS/ES SYSTEM
The flexible resources of grid-connected PV/biogas/ES system include biogas generation, ES, and adjustable load. By formulating the operation strategy of flexible resources in different conditions, the orderly control of the system can be realized, which is vital for the stable operation of the system.

Operation Strategy of Biogas Generation
Typically, the amount of biogas storage restricts biogas generation. The biogas reserves decrease in the operation state of biogas generation, and they rise after exiting the operation. Therefore, the biogas storage data can be obtained for on/off control of biogas generation. Generally, when the transformer load rate reaches 80% of its capacity, it is called the overload operation state. In this condition, the transformer aging will accelerate, and the system operation will be at risk. Consequently, to prevent the power supply transformer from running in the overload state, reasonably controlling the state of biogas generation is necessary. Based on whether the load power (P load ) reaches 75% of the capacity of the distribution transformer (S T ), the biogas generation operation is divided into two modes, including normal operation and overload prevention modes. To prevent the biogas reserves (S BG ) from exceeding the limit and reserve a certain amount of biogas for peak load, the biogas generator is set to operate when S BG >0.8pu and out of operation when S BG <0.6pu. In the overload prevention mode, the biogas generator is set to operate when S BG >0.3pu and out of operation when S BG <0.2pu. The operation strategy of biogas generation is shown in Figure 3.

Operation Strategy of ES System
The ES operation process is mainly constrained by capacity and SOC of battery (SOCb). It is mainly used for peak shaving and valley filling, and grid fault response in this paper (Wu et al., 2021). During normal operation, the battery works in the peak shaving and valley filling mode, prioritizing discharge in the peak load period and charging in the low load period. Subsequently, when the grid voltage drops to the limit value, it switches to the reactive power compensation mode, and the BESS and VSC constitute a STATCOM/BESS to achieve voltage rise. The operation strategy of ES is shown in Figure 4.
To avoid the impact of voltage drop on the system, the reactive power compensation mode has higher priority with respect to the peak shaving and valley filling mode. When a fault is detected, the latter mode is activated immediately to provide reactive power to the grid. In normal conditions, the ES operation strategy is as follows:  (1) When P load <50%S T , the ES prioritizes absorbing power from the grid. If 0.2 ≤ SOCb < 0.75, it is charged at the rated power. If 0.75 ≤ SOCb ≤ 0.8, it exits the charging mode and waits for operation. If SOCb < 0.2 or SOCb > 0.8, it would be out of operation.
(2) When 50%S T ≤ P load ≤70%S T , the ES is in the waiting operation state to prevent the overload of the transformer caused by the charging of the battery. (3) When P load >70%S T , the ES prioritizes output power to the grid. If 0.25 ≤ SOCb < 0.8, it is discharged at the rated power. If 0.2 ≤ SOCb ≤ 0.25, it exits the discharging mode and waits for operation. If SOCb < 0.2 or SOCb > 0.8, it would be out of operation.

Operation Strategy of Adjustable Load
When the distribution transformer is overloaded, it is necessary to cut off a part of the loads to prevent failure. Removing the adjustable load has the least loss to the system, so it is of great significance in participating in system power regulation. Therefore, the proposed strategy focuses on adjustable load, and non-adjustable load is not considered. The operation state of adjustable load can be realized by controlling binary variables b HE and b SS . In this case, if the transformer power (P T ) is greater than 80%S T , b HE and b SS are set to 0, and if P T is less than 70%S T , b HE and b SS are set to 1. The operation strategy of adjustable load is shown in Figure 5.

COORDINATED CONTROL STRATEGY OF PV/BIOGAS/ES SYSTEM
The coordinated control strategy is proposed to realize the stable operation of the PV/biogas/ES system based on the operation strategy. The flexible resources can adjust the operation mode according to the real-time control instructions to maintain the system reliability. Through the proposed coordinated operation and control strategy, the system can have the following functions: (1) Maintain the balance between supply and demand of energy, (2) Avoid long-term heavy load operation of distribution transformer, (3) The system has reactive power compensation capability and certain frequency modulation capability.

Control Strategy of PV System
Generally, the capacity of a distributed PV system in a rural grid is small, and it only operates in the grid-connected state. Thus, it does not participate in the system power regulation. In this paper, MPPT and dq decoupling controls are used to realize the grid connection of the PV system (Hassaine et al., 2014;Jiang et al., 2021). The control strategy of the PV system is illustrated in Figure 6.

Control Strategy of Biogas Generation
The biogas generation can provide constant and reliable power to the load when it operates stably. According to the analysis in  Section 3.1, the state of biogas generation can be formulated based on the system operation. Therefore, its operating mode can be formulated by collecting real-time data on biogas reserve (S BG ) and load power (P load ), as shown in Figure 7. In this figure, M 1 represents the normal operation mode, and M 2 represents the overload prevention mode. The output characteristics of the hysteresis comparator selected for control are: if S BG ≥ S on , b BG = 1, and if S BG ≤ S off , b BG = 0.

Control Strategy of ES System
The control strategy of ES includes VSC control and charge/ discharge control of the battery. According to different operating states, it can be divided into four working modes as: (1) charging, (2) discharging, (3) waiting for an operation, (4) reactive power compensation.
When the ES works in the charging or discharging mode, it absorbs or sends power to the grid at the rated power, respectively. In this situation, VSG control is used to realize the grid connection. Compared with traditional PQ control, the ES has a certain frequency and voltage regulation ability, which are helpful to improve the system stability. When the ES works in the waiting operation mode, it exits the current operation mode and waits for the following control command. When the ES works in reactive power compensation mode, ES operates as a STATCOM to provide reactive power to the grid. The control strategy of ES is shown in Figure 8. Figure 9 depicts the control strategy of an adjustable load which is similar to biogas generation control. The P T is collected in realtime for the state control of the adjustable load. When P T is higher than the limit value, the control system leads the adjustable load   to exit the operation and allows it to operate when it is lower than the set range.

SIMULATION ANALYSIS
The grid-connected PV/biogas/ES system model is built in MATLAB/Simulink, as shown in Figure 1. Firstly, the operation processes of PV, biogas generation, and ES in different conditions are simulated. Then, the overall operation of the system is considered. The main parameters are shown in Table 2.

Simulation of PV Generation
The PV system model is simulated based on Figure 6. Moreover, the sudden change of light intensity is modeled by setting a step change to verify the reliability of the grid connection strategy of the PV system. The simulation results are presented in Figure 10. The simulation results show that with the change of light intensity, MPPT can track the maximum power point and maximize the power output of the AC bus.

Simulation of Biogas Generation
To simplify the biogas generation process, it is assumed that when biogas generation is out of operation, the biogas reserves (S BG ) increase at the speed of 0.2pu/h. Furthermore, when the biogas generation is put into operation, it is reduced at the speed of 0.4pu/h. The initial amount of S BG is defined as 0.7pu, and the load power (P load ) increases with time, which reaches 80%S T in the 3 rd hour. The simulation results are shown in Figure 11. As can be seen, when the P load is lower than the limit, the biogas generation works in the normal operation mode to prevent the biogas reserves from exceeding the limit. When the load is higher than the limit, biogas generation works in the overload prevention mode, and biogas reserves are used to generate power to avoid the overload of the distribution transformer.

Simulation of ES System
The operation process of the ES in different modes is simulated.
In the reactive power compensation mode, the bus voltage must drop to 0.6pu at 0.1s. The compensation transient process can be observed when the ES system is set into operation at 0.2s. In the normal operation mode, the ES is set to discharge at rated power in 0-0.5s, charge at rated power in 0.5-1s, work in the waiting operation mode in 1-1.5s, and discharge at rated power in 1.5-3s. The system frequency drops to 49.8Hz at 2s and returns to 50Hz at 2.5s. The simulation results in the two modes are shown in Figure 12.

Simulation of the Whole System
The output power of each component in different conditions can be obtained by simulating the change of PV power (P PV ) and load power with time. The changes of P PV with time are as follows: P PV = 0kW in 0-0.5s, 10kW in 0.5-1s, 30kW in 1-1.5s,  50kW in 1.5-2s, 40kW in 2-2.5s, 20kW in 2.5-3s, and 5kW in 3-3.5s. The changes of P load over the time are set to: P load = 86kW in 0-0.5s, 186kW at 0.5-1.5s, 336kW at 1.5-2.5s, 500kW at 2.5-3.5s and 600kW at 3.5s. The output power of PV, load, biogas generation, ES, and transformer are shown in Figure 13. As can be seen in the results, the biogas generation, ES, and adjustable load can switch the working modes according to the operating conditions to prevent overloading of the distribution transformer due to the load increase.

CONCLUSION
In this paper, a multi-mode operation and coordinated control strategy of the PV/biogas/ES system was proposed to realize its orderly control, aiming at the energy supply and consumption system of a rural ecological breeding scene. The main conclusions are as follows: (1) The biogas generation state can be adjusted according to the load condition to prevent the biogas reserves from exceeding the limit and leave a margin for operation during the peak load period. Using a hysteretic comparator can prevent the harm caused by frequent switching of the biogas generation.
(2) In terms of the operation and control strategy of the ES, two operation modes are set, including normal operation and reactive power compensation. During normal operation, the  control method based on VSG and quasi-PR is adopted for considering a certain frequency modulation and voltage regulation ability in the ES. In case of bus voltage drop, it can operate as STATCOM/BESS to provide voltage support to the grid. (3) The adjustable load can change its operation mode based on the load power to improve the power supply reliability of the system.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.