LQR-Based Adaptive Virtual Inertia for Grid Integration of Wind Energy Conversion System Based on Synchronverter Model

: This paper proposes adaptive virtual inertia for the synchronverter model implemented in a wind turbine generator system integrated into the grid through a back-to-back converter. A linear dynamic system is developed for the proposed adaptive virtual inertia, which employs the frequency deviation and the rotor angle deviation of the synchronverter model as the state variables and the virtual inertia and frequency droop gain as the control variables. In addition, the proposed adaptive virtual inertia uses a linear quadratic regulator to ensure the optimal balance between fast frequency response and wind turbine generator system stress during disturbances. Hence, it minimizes frequency deviations with minimum effort. Several case simulations are proposed and carried out in MATLAB/Simulink software, and the results demonstrate the effectiveness and feasibility of the proposed adaptive virtual inertia synchronverter based on a linear quadratic regulator. The maximum and minimum frequency, the rate change of the frequency, and the integral of time-weighted absolute error are computed to quantify the performance of the proposed adaptive virtual inertia. These indexes are reduced by 46.61%, 52.67%, 79.41%, and 34.66%, in the worst case, when the proposed adaptive model is compared to the conventional synchronverter model.


Introduction
Renewable energy resources based on wind and photovoltaic plants are promising energy sources in the transformation of the power system. This transformation is focused on the continuous reduction of greenhouse gas emissions to the atmosphere by fossil fuels by replacing these power plants with green sources [1]. At the end of the last decade, i.e., during 2019, the wind energy generation supported around 6% of the global electric energy requirements; if wind power growth continues at the same rate, then by 2030, wind power is expected to cover around 29% of electricity consumption worldwide. The integration of wind turbine generator systems (WTGSs) in power grids has important challenges due to the wind energy resource variability, including power quality, system stability, and grid expansion planning. The current design of WTGS is currently dominated by the usage of wind turbines with horizontal rotational axis connected with a three-blade rotor [2]. The WTGSs are built with wind turbine generators that convert the wind movement energy into mechanical power after this power is transformed into electrical power via electrical machines. These machines can be connected directly to the electrical networks or connected through the power electronic devices [3,4]. This connection depends on the configuration type employed. They have some limitations or disadvantages, such as high capital cost, a constant fluctuation of generation, sound pollution, and the fact that they can be damaged with large variation in wind speed (e.g., hurricanes or tornadoes) [3,5].
In this research, we consider a type-IV wind turbine model, which can be interconnected into an electrical grid by an induction machine or a permanent magnet synchronous generator (PMSG) [2]. Typically, the PMSG is connected to the power system with a complete converter, i.e., back-to-back voltage source converter [6]. The usage of PMSG instead of induction machine has some advantages: (i) there are no copper losses; (ii) the PMSG is smaller in comparison with an induction motor with the same rated power capability, which implies that the energy density of the PMSG is larger than the induction motor; (iii) the PMSG does not require reactive power from the converter due to its self-excitation, which allows providing higher power factors; and (iv) a WTGS integrated into the network system with a PMSG can work with low-speed rates, which implies that the gearbox can be removed. This entails that the reliability of the entire system increases.
Even if a WTGS can take advantage of the usage of a permanent magnet machine instead of induction generators, the control task of this device is not easy, since the WTGS continues to be a nonlinear plant that requires advanced control techniques to operate correctly under strong operative conditions such as large disturbances on the power system and sudden wind speed variations. In the specialized literature, multiple control methodologies applied to WTGS can be found, some of which are listed in Table 1.  [24] Note that most of the works reported in Table 1 focus on solving the MPPT and shaft speed problem with linear and nonlinear control techniques. However, these techniques require a phase-locked loop (PLL) unit to work properly, which may significantly affect the system stability [25]. The slow response of the PLL unit affects the control performance degrading its system stability [26]. To solve this problem, various approaches have been proposed in which the power electronic converter is modeled as a virtual synchronous generator that avoids using the PLL unit and simultaneously emulates the inertia and damping. In the current literature, power electronic converters' operation as a synchronverter has been introduced in [27]. The main idea in [27] is to mimic the synchronous generators' dynamic behavior regarding the classical frequency-and voltage-drooping mechanisms [6]. The synchronverter machine model has become a promising control technique in several applications, such as integration of renewable energy resources [28,29], high voltage direct current transmission [30], and modular multilevel converter [31]. In [28], a synchronverter-based control technique was applied to a configuration of a back-to-back converter where both converters were controlled using a synchronverter model. In [26], a self-synchronization of a wind farm based on the synchronverter machine model was studied. In [29], the authors analyzed the usage of renewable energy resources as virtual inertia supporters for integrating a grid-photovoltaic plant in a low-voltage distribution network. In [32], the authors presented the power-sharing concept in DC microgrids using the adaptive virtual inertia concept; numerical results demonstrate the advantages of using an adaptive drop control gain to support the grid voltage compared with the static control case. In [33], the authors proposed the synchronverter concept for damping inter-area oscillations in two-area power systems. The main problem of the synchronverter model is the tuning of its parameters, since, in the application as wind or photovoltaic power, it cannot be directly computed with the conventional methods. In order to improve the performance of the synchronverter, methods for the adaptive virtual inertia have been implemented that allow adjusting at the operation point of the system. However, these methods use artificial intelligence, which requires constantly learning. To avoid this, we propose using a linear quadratic regulator (LQR) to provide adaptive virtual inertia (AVI) support with the WTGS to the grid using the power electronic converter as a virtual synchronous generator. Note that the proposed AVI allows power electronic converters to support voltage and frequency in weak power systems when a large disturbance occurs. Even currently in the literature, therthe adaptive virtual inertia and the synchronverter concepts in power systems are present, but there are no applications that work with a type-4 WTGS that provides AVI to power systems using an LQR controller, which is a gap in the literature that this research tries to fulfill. The following are the main contributions of this paper: An AVI model based on linear dynamic systems is proposed. The proposed linear dynamic system's state variables are the frequency deviation and the rotor angle deviation, and the control inputs are the virtual inertia and frequency droop gain. The proposed AVI model is computed with an LQR control in order to minimize frequency deviations with minimum effort and, therefore, to manage an optimal balance between fast frequency response and WTGS stress during disturbances. The performance of the proposed AVI model is evaluated in three different cases of wind speed considering a short-circuit. Furthermore, the proposed AVI model is compared with the conventional synchronverter model (SM), where, in all cases, the proposed AVI model has a better performance.
This study is organized as follows: Section 2 presents the main characteristics of the WTGS integrated with a permanent magnet machine and each one of its components; Section 3 describes the virtual synchronous machine modeling that allows working with a power electronic converter such as a dynamic frequency compensator; Section 4 presents the proposed linear quadratic regulator to provide adaptive virtual inertia to power systems using WTGS; Section 5 presents all the computational validation of the proposed control methodology using three different simulation cases: (i) short-circuit event with constant wind speed, (ii) short-circuit event with wind speed decreasing after fault, and (iii) the wind speed decreasing when short-circuit fault is presented. Finally, Section 6 presents the concluding remarks derived from this work.

Wind Energy Conversion System
The wind energy conversion system (WTGS) integrated into the grid through a backto-back converter is depicted in Figure 1. The WTGS is composed of a wind turbine drive train, a permanent magnet synchronous machine (PMSG), a back-to-back converter, an RL-filter, and a transformer. The most important component of the WTGS is described in this section.

Wind Turbine Model
The wind turbine transforms the kinetic energy of the wind into mechanical kinetic energy in rotational form. Therefore, it is possible to obtain a relationship between mechanical power and aerodynamic wind turbine as follows, where ρ is the air density, A is the area covered by the turbine blades (A = Rπ 2 , where R denotes the radius of the area covered by the blades), C p (λ, β) is the power coefficient, and V is the wind speed.
The power coefficient C p (λ, β) is a function of the pitch angle β and speed ratio λ [3] as follows, where ω T is the angular speed in the wind turbine.
The pitch angle β is maintained at zero and is only controlled if V overpasses the rated wind speed so that the PMSG continues delivering its rated active power [16].
On the other hand, combining (1)-(4), it is possible to obtain the turbine output power as follows Figure 2 depicts the relationship between the angular speed ω T and turbine output power τ t . This figure shows that the maximum power output can be achieved at a particular angular speed while the pitch angle is zero. Therefore, the speed ratio λ must be in its optimum values λ opt to maximize the power extracted from the wind energy system [3].

Permanent Magnet Synchronous Generator Model
The PMSG is installed between the wind turbine and the electrical network through a back-to-back converter, as shown in Figure 1. The mechanical and electrical equations in the dq reference frame that detail the dynamic behavior in values per unit of the PMSG can be written as where v dqw and i dqw represent the stator voltages and currents of the PMSG in dq reference frame, respectively. L w and R w denote the stator winding's inductance and resistance of the electrical machine. In values per unit, ω r is equal to ω ew , ω o is the based rotational speed, and ψ w is constant permanent magnetic flux on the PMSG, which is as a function of the construction and material employed in the rotor of the PMSG [34]. H t is wind-turbine inertia time constant and τ ew is the electrical torque, which is defined as

Virtual Synchronous Machine Model
This section describes the synchronverter model, which was initially proposed in [27] in order to emulate the synchronous machine features using a voltage source converter.
The schematic configuration of the synchronverter model implemented in the WTGS was illustrated in Figure 1. For simplicity, the operation modes of self-synchronized synchronverter were shown in Figure 1. The operation modes can be consulted in [31].
The virtual shaft of the synchronverter model can be represented as follows where ω s and ω s are the synchronous frequency and its set-point, respectively. τ m and τ e are the mechanical and electrical torques, respectively. J and D p are the virtual inertia and the frequency droop gain, respectively, and θ s is the rotor angle. The mechanical and electrical torques are determined as where P is power torque applied to the shaft and P is real power delivered by synchronverter machine, which can be calculated as with where ., . represents the conventional inner product in R 3 . i abc = [i a , i b , i c ] is the output phase currents vector of the synchronverter, while ψ is its virtual flux, and it is calculated as follows, with where Q and Q are the output active power of the synchronverter and its set-point, respectively. v s and v s are the output voltage magnitude of the synchronverter and its set-point, respectively. K ψ denotes the reactive power controller integral, D q is the voltage droop gain, and τ v is its time constant. The output reactive power of the synchronverter can be defined as In steady-state, ω s ≈ ω s , and hence, the mechanical and electrical torques can be approximated as follows In this case, the power torque is computed to control the dc-link voltage, which is determined by a PI controller as presented in Figure 1 and can be given by where R s and L s are the stator winding resistance and inductance matrices, respectively. e abc = [e a , e b , e c ] is the back electromotive force (EMF) of the synchronverter, which is the control input of pulse-width-modulation. The EMF can be written as

Adaptive Virtual Inertia
The adaptive virtual inertia developed in this study is focused on proposing a linear dynamic system that uses the frequency deviation (∆ω) and the rotor angle deviation (∆θ) as the state variables and the virtual inertia and frequency droop gain as the control variables. We consider that the virtual inertia and frequency droop gain can be formulated as where subscript 0 denotes initial values and ∆J and ∆D p represent the adaptive inertia and adaptive frequency droop gain, respectively, which can be represented as where K is the feedback matrix gain. The problem in (22) is to find a relationship between the adaptive values and the state variables to obtain a suitable K matrix. For this purpose, we linearize (8) and (9) as follows, where P 0 , τ m0 , and τ e0 are the initial conditions. The linear system (23) can be rewritten as the state-space model with Observe that we have a relationship between the adaptive values and the state variables described by (24). Next, in order to ensure the optimal balance between fast frequency response and WTGS stress during disturbances, an optimization problem is proposed to minimize frequency deviations with minimum effort as follows where F = diag(F 1 , F 2 ) 0 represents the error penalty matrix and D = diag(D 1 , D 2 ) 0 denotes the control signal penalty matrix. The optimization problem (25) permits finding the optimal feedback matrix gain K = D −1 B G, where G is the solution to the following algebraic Riccati Equation (for more details about the LQR to see [35]): Note in (22) that the frequency deviation can take the positive and negative values. This means that sometimes adaptive inertia and adaptive frequency droop gain can take negative values; hence, the total system inertia will decrease, deteriorating the performance of the system. In order to avoid this, adaptive inertia and adaptive frequency droop gain are computed:

The Test System
A grid-connected WTGS was implemented in Matlab/Simulink 2020b platform with Simscape Electrical in order to demonstrate the effectiveness of the proposed adaptive virtual model. The simulations were run with fixed-step, and the solver used was discrete (no continuous state). The simple time was configured as 5 × 10 −6 s. The test system is illustrated in Figure 4, which consists of a 100-kW type-IV WTGS using a configuration back-to-back converter connected to a 25-kV step down to a 260 V grid. The WTGSside converter had an optimal torque MPPT algorithm, and the grid-side converter was implemented with the synchronverter algorithm described in Section 3. The parameters of WTGS and the synchronverter are presented in Tables 2 and 3

Simulation Cases
Three cases are proposed to demonstrate the effectiveness of the proposed adaptive virtual model. In addition, the proposed model is compared with the conventional synchronverter model (SM). The proposed cases are: • Case 1: The wind speed is constant while a short-circuit at grid-side converter (bus-1) with a period of 100 ms is assumed. • Case 2: A drop in wind speed is considered after a three-phase to ground (bus-1) with a period of 100 ms. • Case 3: A drop in wind speed is considered during a three-phase to ground (bus-1) with a period of 100 ms.  On the other hand, the integral of time-weighted absolute error (I) is also employed to assess the performance of the proposed adaptive virtual inertial (AVI) based on the LQR optimization. The I is computed for the frequency of the synchronverter and dc-link voltage as follows where t f is the total simulation time. The maximum and minimum values are also calculated to quantify the performance of the proposed model. Furthermore, the rate change of the frequency (RoCoF) is employed for the frequency.

Case 1
In this case, the ability of the proposed adaptive virtual inertia was studied when a short-circuit at grid-side converter occurs. Figure 6 shows the dynamic responses of the synchronverter frequency, the active power at bus 1, and dc-link voltage. The performance indexes for case 1 are shown in Table 4   Observe in Figure 6a that the synchronverter frequency stabilizes in a shorter time when the AVI is implemented. This is supported by contrasting I ω for both approaches in Table 4. This index is reduced by 60.42%. Additionally, the maximum and minimum frequency values are lower for the proposed adaptive model than the SM approach, which are reduced by 46.61% and 53.74%, respectively, (see Table 4). The RoCoF also is reduced by 79.41% when the AVI is implemented. Figure 6b shows that the active power delivered by synchronverter at bus 1 presents a better behavior for the proposed adaptive model than the SM approach, since the active power stabilizes in a shorter time. However, this better behavior only occurs after the fault ends since both approaches have the same performance during the fault. Figure 6c shows that the dc-link voltage shows an enhanced response when the adaptive virtual inertia is considered by recovering the dc-link voltage in a shorter time with a lower overpass. This implies that the proposed model helps to improve the dc-link voltage regulation. This improvement is easy to notice in Figure 6, where the proposed model's response is clearer when the approaches are compared. This analysis is supported by comparing I v between the approaches (see Table 4), where this index is reduced by 15.34% for the proposed AVI.

Case 2
This case investigates the ability of the proposed model to enhance the synchronverter response when there is a high drop in the wind speed immediately after a short circuit occurred. The synchronverter frequency, the active power at bus 1, and dc-link voltage for case 2 are depicted in Figure 7, while Table 4 lists the performance indexes.  improved. This can be verified by comparing the I ω and RoCoF in Table 4 for case 2, where these indexes are reduced by 34.66 % and 84.61 %, respectively. Additionally, the maximum and minimum values of the frequency are also reduced by 67.03 % and 52.67 %, respectively, when the proposed AVI is implemented.
The dynamic response of the active power delivered (see Figure 7(b)) by synchronverter at bus 1 185 has a similar behavior as presented in case 1. In this case, the active power continues stabilizing in a shorter time when the proposed adaptive model is considered. Same as in case 1, this better response only happens after the fault. In Figure 6(c), it can be noted that the dc-link voltage continues to recover faster for the AVI approach than the SM approach. Here, I v continues to be reduced for the proposed AVI (see Table 4), This case analyzes the AVI approach's ability to improve the WTGS response integrated to the grid with the synchronverter model when a high drop in wind speed is considered during a three-phase to ground. Figure 8 illustrates the dynamic responses of the synchronverter frequency, the active power 195 at bus 1, and dc-link voltage. Table 4 shows the performance index.  Figure 7a shows that the proposed AVI continues showing better performance for the frequency compared with the synchronverter model. Hence, the WTGS system's response behavior has been improved. This can be verified by comparing the I ω and RoCoF in Table 4 for case 2, where these indexes are reduced by 34.66% and 84.61%, respectively. Additionally, the maximum and minimum values of the frequency are also reduced by 67.03% and 52.67%, respectively, when the proposed AVI is implemented.
The dynamic response of the active power delivered (see Figure 7b) by synchronverter at bus 1 has a similar behavior as presented in case 1. In this case, the active power continues stabilizing in a shorter time when the proposed adaptive model is considered. As in case 1, this better response only happens after the fault.
In Figure 6c, it can be noted that the dc-link voltage continues to recover faster for the AVI approach than for the SM approach. Here, I v continues to be reduced for the proposed AVI (see Table 4), which is reduced by 22.36%.

Case 3
This case analyzes the AVI approach's ability to improve the WTGS response integrated to the grid with the synchronverter model when a high drop in wind speed is considered during a three-phase to ground. Figure 8 illustrates the dynamic responses of the synchronverter frequency, the active power at bus 1, and dc-link voltage. Table 4 shows the performance index.   Figure 8 that dynamic responses of the synchronverter model with the AVI approach continue presenting an enhanced response for frequency as well as dc-link voltage, even when the wind speed continues to drop compared to the conventional synchronverter model. This demonstrates that the proposed AVI improves the transient response of the system. This is supported by analyzing the performance indexes in Table 4, where I ω and RoCoF are lower for the proposed AVI than the SM approach, with a reduction by 51.32% and 84.61%, respectively. For the dc-link voltage (see Figure 8), observe that the proposed adaptive model continues recovering the dc-link voltage faster than the SM approach, where I v is reduced by 17.16%.

Conclusions and Future Works
An adaptive virtual inertia model for the synchronverter model implemented in a WTGS was proposed to improve the dynamic response under large disturbance. The WTGS was integrated into the grid through a back-to-back converter, and its grid-side converter implemented the synchronverter model with and without the proposed AVI. The proposed AVI was developed under a linear dynamic system that used the frequency deviation and the rotor angle deviation as the state variables, while the virtual inertia and frequency droop gain were used as the control variables. This linear dynamic system was solved with an LQR in order to reduce the proposed AVI frequency deviations with minimum effort. Several case simulations were implemented and compared with the conventional synchronverter model to prove the effectiveness and feasibility of the proposed LQR-based adaptive virtual inertia synchronverter. The maximum and minimum frequency, RoCoF, and I w were used to validate the advantages of the proposed AVI. The frequency response showed better performance and lower frequency oscillations than the synchronverter model with constant inertia. In the worst cases, the maximum and minimum frequency were by 46.61% and 52.67% when the proposed AVI was implemented. At the same time, RoCoF and I w were also reduced by 79.41% and 34.66%.
As future works it will be possible to develop the following research: (i) applying the proposed model in the photovoltaic system; (ii) integrating the proposed model in isolated renewable hybrid power systems; (iii) computing the adaptive inertia and droop gain with other methods as a model-predictive control. Funding: This research received no external funding.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: