Fuzzy control based adaptive rotational inertia VSG grid integration research

Compared with the traditional inverter grid-connected control strategy, virtual synchronous generator (VSG) has received attention because it can effectively reduce the current shock to the grid caused by load fluctuation during grid-connected process by adding rotational inertia and damping parameters. A fuzzy control scheme is added to the rotor equation of motion of VSG to establish fuzzy rules by finding the relationship between frequency fluctuation and rotational inertia during grid connection. To improve the immunity of the frequency converter to interference during grid connection, and then improve the stability of the output power in the grid-connection process. The feasibility of the proposed method is verified by simulink model construction for simulation and comparison with the conventional virtual synchronous generator system.


Introduction
Renewable energy sources has effectively alleviated the environmental pollution caused by exhaust emissions on the one hand, and slowed down the energy crisis caused by non-renewable energy sources on the other [1] .Therefore, it is crucial to improve the stability of the power system, in which the inverter plays a key role in the stability of the power system.Inverters play a crucial role in connecting and disconnecting distributed power sources to the main electricity grid via several control strategies.These popular control strategies include constant power control (PQ control), constant voltage and frequency control (VF control), and droop control have been proposed by experts and scholars to ensure the smooth grid connection of inverters [2] .These traditional control strategies ensure the stability of grid connection by controlling parameters such as active and reactive power [3] , However, the lack of inertia in the gridconnected inverter can cause a rapid transient response, which poses a threat to the protection of the entire system.This paper employ a control strategy for the virtual synchronous motor (VSG).whichcan provide the microgrid with characteristics similar to the inertia of a synchronous generator to prevent sudden power changes and solve the hazards caused by missing inertia parameters [4] .
Compared with the three previously mentioned control strategies, VSG control has great advantages in the process of grid integration of the inverter, The proposed method in this paper is to simulate the equations governing the primary frequency regulation and rotor motion of a synchronous generator to modify the interface inverter's output characteristics and manage the system's disturbance. [5]The application of this technology can effectively improve the inertia and damping level of power systems with high penetration of new energy sources, so this control is now getting a lot of attention from scholars and experts.
This paper employs the virtual synchronous motor control strategy, we study the active power overshoot problem caused in the process of grid connection, firstly, we find the relationship between the output frequency and the rotational inertia in the virtual synchronous motor control, and then adjust the value of rotational inertia by changing the frequency at different time points to realize the real-time change of rotational inertia, and then stabilize the frequency through the adaptive rotational inertia to realize the smooth switching of power in the process of grid connection [6] .The frequency is stabilized by the adaptive rotational inertia to achieve smooth power switching during grid connection.Thus, the purpose of grid-connected stability of the inverter is achieved.Finally, the simulink simulation results prove the superiority of this method in the grid-connected stability of the inverter [7] .

Introduction of VSG control strategy
As early as 1997, the concept of synchronous generators was proposed by IEEE TASK FORCE, indicating that a new control strategy could be used to apply the advantages of synchronous generators to power electronics [8] , but since the functions of synchronous generators could not really be realized, the technology was called virtual synchronous generators.The first person to propose the VSG technology was an academic from the Netherlands, from the project virtual synchronous machines, VSYNC, in which he proposed the idea of the VSG technology and conducted simulations to confirm the feasibility of the idea.VSG voltage type.However, the specific control structure is modeled after that of a synchronous generator, as shown in Figure 1.The entire control system consists of a three-phase inverter circuit, a power calculation module, a VSG control module, and a voltage and current double closed-loop control module after the distributed power supply.The power calculation module calculates the output power of the circuit from the collected voltage and current, the VSG control module adjusts and calculates the power value by comparing the artificially given power reference value with the actual output power value of the circuit, and the voltage and current double closed-loop module receives the voltage value from the VSG module and further controls and calculates it.After PWM control, a specific PWM signal waveform is obtained for activating the IGBT switch.The switching tubes, turned on and off by the obtained signal waveform, control the output of the entire grid-connected inverter.forming a closed-loop control of the entire grid.Transferred from the mechanical equation as T m refers to the mechanical torque of the generator, T D and T e denote the generator's electromagnetic and damping torque, respectively.Where J is the rotational inertia of the whole synchronous generator and D is the damping factor w-w0 representing the difference between the actual generator rotor angular velocity and the reference generator rotor motion angular velocity.When this rotor equation of motion is satisfied, the whole generator operation remains stable.

Virtual governor modeling
In the whole control system, the frequency fluctuation caused by the load change needs to be adjusted in the control system because the load size will not remain stable all the time.The virtual synchronous generator control system can correct the frequency output by adjusting the input power, and hence, we propose the modeling of a virtual governor.Additionally, since the control system follows the principle of droop control, the frequency and power relationship follows the droop control characteristics, and the droop equation of frequency and active power of synchronous generator is 1 0 p 0 1 ( ) From this, the equation of the virtual governor can be established: ( ) Here, is the given power reference value, denotes the actual output power value, represents the regulation factor (equivalent to the droop factor in droop control), stands for the rated angular velocity, and denotes the actual angular velocity of the system output.The virtual governor model is constructed according to the virtual governor equation as shown in Figure 2.

Establishment of fuzzy rules
In a conventional virtual synchronous motor, the rotational inertia is a constant value, so the whole control system does not change in real time according to different situations when there are disturbances in the grid and load.This leads to an unstable response of the virtual synchronous generator in different situations, making the frequency oscillation time longer, which in turn leads to active power oscillation.This situation is more obvious when the inverters are connected to the grid.Before the sub-microgrid side is connected to the grid, the pre-synchronization module has synchronized and tracked the output frequency of the inverter side of the sub-microgrid with the frequency of the grid side to reach the same, but after the connection, the frequency oscillation of the inverter side still occurs due to the disturbance brought by the grid, so when the inverter is connected to the grid and the overall load changes, the active power overshoot phenomenon will occur before the active power change stabilizes.To solve this problem, based on the relationship between frequency and active power in the control system, the theory of designing fuzzy rules to adjust the real-time rotational inertia to keep the frequency stable is proposed.

Fuzzy rule analysis
The Figure 3 shows the relationship between the rotational inertia parameters and the output frequency.a. J=0.3 frequency waveform graph b.J=0.8 frequency waveform graph Figure 3. frequency waveform graph When the grid connection switch is turned on and the inverter side starts to connect to the grid, the rate of frequency shift up and down is slower and the response time is longer when the rotational inertia is 0.8 compared with that when the rotational inertia is 0.3, so it takes longer time to synchronize the inverter side frequency with the large grid.When the rotational inertia is 0.3 for grid-connected operation, the offset rate of the output frequency is significantly faster and the response time is shorter, so the inverter-side frequency can approach the grid-side frequency faster.However, since the rotational inertia parameter is only 0.3, it lacks the inertia control, so the frequency itself keeps oscillating up and down around the steady-state value until it reaches the steady-state value and keeps approaching it, which will lead to the output active power also oscillating infinitely around the steady-state value instead of achieving a smooth transition.In summary, a larger rotational inertia increases the response time of the system and reduces the rate of change of frequency, but is more stable for the whole system.Smaller rotational inertia increases the rate of change of frequency and response time, However, the incessant oscillations that occur before reaching steady state can undermine the overall system stability.Consequently, it is imperative to implement adaptive rotational inertia for frequency control in diverse conditions.

Fuzzy VSG modeling and fuzzy rule building
After finding the relationship between frequency and rotational inertia, this section designs fuzzy rules by observing the dynamic change of frequency, and adjusts the real-time output frequency by outputting dynamic rotational inertia through fuzzy rules.The block diagram of rotor mechanics controlled by fuzzy VSG is shown in Figure 4.The fuzzy rule used here is a dual input and single output, where the two input quantities are the difference of frequency ∆f and the first order derivative of frequency df/dt, and the output quantity is the adaptive rotational inertia.Both inputs and outputs are divided into seven subsets, {NB,NM,NS,ZE,PS,PM,PB}, and a total of 49 fuzzy rules are designed.According to the waveform analysis of the model, the variable ranges of the inputs are set as asymmetric variable ranges.The asymmetric fuzzy rule input ranges can better adjust the real-time changing rotational inertia for the frequency change of the experimental model, and the variable ranges of the two fuzzy inputs are set as follows:-17≤df/dt≤3,-0.2≤∆f≤0.4 .The output inertia setting range is 0.1<J<0.8 .To ensure the rapid recovery of frequency, the gbellmf function is chosen in the NS range of the and the rest of the affiliation functions are all set to triangle function.The main idea of writing fuzzy rules is: when the frequency shift occurs, increase the value of rotational inertia to suppress the frequency shift as the offset increases.When the frequency is recovering toward the stable frequency, reduce the value of rotational inertia so as to accelerate the rapid recovery of frequency.The fuzzy control table is shown in

Simulation analysis
This simulation test uses Simulink for module building of the main circuit of the three-phase inverter and other functional modules, and the frequency waveform changes and active-reactive power waveform changes of the VSG controlled by fuzzy and the conventional VSG at the moment of grid connection are compared, respectively, under the same conditions set, so as to demonstrate the superiority brought by the addition of adaptive rotational inertia of fuzzy control to the grid connection of the inverter.The specific parameters are shown in the Table 2.  Evidently, the conventional VSG control strategy induces conspicuous frequency oscillation.when the inverter is connected to the grid, while the fuzzy VSG significantly reduces the frequency oscillation due to the continuous adjustment of the rotational inertia, and the latter frequency is stabilized at 50Hz faster than the traditional VSG, which achieves the synchronization with the grid side frequency after the grid connection.

Comparison of active power reactive power variation
As can be seen in the Figure 6, both active and reactive power under the traditional VSG control strategy oscillate significantly at the beginning of the grid connection operation, and there is a large amount of overshoot, while the fuzzy VSG makes the active and reactive power oscillation less due to the realtime change in rotational inertia for adjustment, and the power of the fuzzy VSG can reach the steady state value faster than the traditional VSG, so the fuzzy VSG has a greater advantage in terms of both the time to reach the steady state and the power oscillation, and the simulated waveforms also achieve the expected results.

Conclusion
In this paper, we focus on the problem of frequency and power overshoot caused by the oscillation of frequency and power when the VSG control strategy is connected to the grid, and find that frequency oscillation causes oscillation of active and reactive power.The frequency can reach the steady-state value faster by the real time change of rotational inertia, and then the active and reactive power can reduce the oscillation when connected to the grid, and the stabilization time is greatly shortened, and the control strategy is optimized so that the steady-state performance of the whole control system is greatly improved.

4. 1
Comparison of frequency changes Under the same conditions, the conventional fixed inertia VSG model and the fuzzy adaptive inertia VSG model were simulated with a simulation time of 1s, The respective waveforms are shown in Figure 5. a. Conventional VSG frequency waveform b.Fuzzy VSG frequency waveform Figure 5. Frequency waveform comparison graph 0 a. Conventional VSG Power waveform b.Fuzzy VSG Power waveform Figure 6.Power waveform comparison graph

Table 1 Table 1 .
Fuzzy rule control table J

Table 2 .
Fuzzy VSG parameter table