An Adaptive Parameter-Based Control Technique of Virtual Synchronous Generator for Smooth Transient Between Islanded and Grid-Connected Mode of Operation

This paper deals with the development of a control technique for the control of voltage source converters (VSCs) as an interface between renewable energy sources (RESs) and power grids. The lack of inertia in converter-based generators and their unconventional dynamic behavior increase the negative impacts on the power grid, unlike the operation of the conventional synchronous generators (SGs). In this sense, the proposed control technique emulates the behavior of SGs in the control loop of the interfaced converter acting as a grid-forming power generator. Thus, supportive functionalities for enhancing electric grid stability (e.g., frequency oscillation damping) will be provided by interfaced converter as a virtual synchronous generator (VSG). The main targets of the proposed control technique include virtual inertia emulation, frequency oscillation damping, primary and secondary frequency regulation, and voltage regulation. The main contribution of this work over the existing methods is that the optimal values for swing equation parameters are employed to ensure well-designed damping feature of the VSG-based converter which adapts grid-connected and islanded operating modes, enabling a smooth resynchronizing to the grid as its plug-and-play capability requirement. The control structure is evaluated through simulation in MATLAB/Simulink.


I. INTRODUCTION
The growing demand for clean electric energy has revealed the necessity of increasing integration of renewable energy sources (RESs)-based generators to the grids/loads, due to their eco-friendly characteristics [1], [2]. However, the high penetration of these generators caused a change in power systems from the conventional ones dominated by synchronous generators (SGs) to the modern converter-based ones, which has emerged as a challenge to modern power systems. While providing inertia and damping are inherent features of SGs, converter-based generators possess neither The associate editor coordinating the review of this manuscript and approving it for publication was Chandan Kumar .
inertia nor damping features of SGs. Displacing SGs in conventional power systems by converter-based generators and the resulting loss of inertia makes the modern power grid subjected to instability issues under the occurrence of dynamic events [3]- [5]. This issue can be solved by modifying the control scheme of interfaced converters through emulating the characteristics of SGs [6], [7].
Numerous control techniques have been proposed to address the issue in converter-based generators both as grid-following and grid-forming units [8]- [27]. The proposed techniques are generally divided into two groups, namely high-order and low-order virtual synchronous generator (VSG) techniques depend on whether they possess all dynamics of SGs or just some of the most important features, e.g., inertia and damping property [28]. The VSG techniques based on swing equation is the focus of current research. A comprehensive comparison between low-order swing-based and fully-detailed high-order VSG control algorithms has been presented in [29], which declares that the low-order VSG techniques are more stable than the highorder techniques. Besides, they are not as complex as the high-order ones to implement as they do not incorporate detailed equations.
A low-order VSG topology based on frequency-power response is presented in [8] in which the frequency measured by Phase Locked Loop (PLL) and its derivative term is used to implement the frequency-power equation. This concept has been also employed in [9], [10] to provide inertia for a PV and wind-diesel autonomous power system through energy storage. The main problem of this method is that the derivative term in the control structure introduces noise to the system, leading to the unstable operation of the converter. The concept of distributed virtual inertia is presented in [11], [12] for grid-following converters in which the energy stored in the dc-link capacitor is used for frequency support. However, the virtual inertia in this method is limited based on some parameters of the converter. Besides, in such methods in which the power setpoint for current or power controller is a function of the measured frequency by PLL, the operation of converters in weak grids is quite challenging, because the operation of grid-following converters is dependent on the strength of the power grid, and control can become unstable when it is expected to provide more inertia [13], [14]. As a result, relying on grid-following converters is not an appropriate solution for a fully converterbased system, and inertia emulation on voltage source-based converters with grid forming ability has received increasing attention [15].
Various control techniques have been proposed for gridforming converters, to emulate dynamics and functionalities of SGs. The concept of synchronverter has been proposed in [16] in which all the electrical and mechanical equations of SGs are considered in the control structure of the converter. The swing equation, including the essential features of SGs, is the most important equation [17]. Inertia emulation by simply using the swing equation was implemented in [18]. An open-loop control scheme has been employed for the grid-forming converter, in which the swing equation provides voltage phase reference and the reactive power controller directly defines the voltage amplitude reference. This open-loop structure is not able to provide overcurrent protection and other supportive functionalities which are required in the control design of interfaced converters. A virtual synchronous machine control concept is proposed in [19], [20] in which a cascaded voltage and current control loop is applied to address the deficit of the concept with the open-loop control technique. The paper mostly focused on the small-signal modeling and parametric sensitivity. In this paper, the idea of virtual impedance is employed in the control of the VSG to improve the decoupling effect of active and reactive power. The reason for the limited decoupling of the virtual inductor is mentioned in [21], and a power decoupling control method is proposed based on q-axis voltage drop. In this paper, the d-axis voltage drop across the virtual inductor is neglected. This method is simply implemented and can improve the decoupling of active and reactive power. A similar control structure as introduced in [20] with a little change in cascaded control design is proposed in [22] to consider the potential resonance in the output LC filter of the converter and improve the control functionalities. The idea of the alternating moment of inertia in VSG is proposed in [23]. In this paper, the appropriate moment of inertia is chosen based on the virtual angular velocity and acceleration or deceleration of oscillation caused by a disturbance. The same idea is employed in [24], considering a mathematical equation for extracting the adaptive virtual inertia. In this equation, the direct frequency derivative action is avoided to enhance the stability. An adaptive inertia and damping combination control is proposed for VSG in [25], [26]. In [26] the impact of controlling parameters on the frequency and power of the VSG is investigated in detail. The two degrees of freedom control parameters provide the better performance in suppressing oscillation caused by a disturbance. The impact of VSG parameters on both acand dc-grid dynamics of a VSC-based multi-terminal direct current (VSC-MTDC) is investigated in [27]. In this paper, singular value decomposition analysis and modal analysis are considered for this purpose and a parameter alternating VSG is proposed based on this analysis.
However, all the proposed VSG topologies for the grid-forming converters considered the stand-alone or gridconnected operating mode of the converters. Resynchronizing to the grid as an important feature of grid-forming converters that ensures the plug and play ability has not been considered in the existing works. For the future converterbased power grid where the grid-forming converters realize the possibility of large integration of RESs, it is important to enhance the VSG topologies of grid-forming converters to provide all the required characteristics. Hence, this paper considers this shortage and enhances the control of VSGbased converter to realize a smooth resynchronization to the power grid.
In this paper, a control method is presented for a gridforming converter in which inertia and damping are emulated in the control structure to ensure frequency stability of the power grid under a large share of renewable energies. This control method also guarantees achieving other control objectives, i.e., primary and secondary frequency regulation, and voltage regulation. So, it is a grid-supporting gridforming converter acting as a VSG and with the ability to work in parallel with other grid-forming converters, making a fully converter-based power system possible [15], [30]. The control method does not rely on PLL to implement control in the dq synchronous reference frame and is based on internally generated mechanical phase angle. The PLL is just employed to implement the swing equation. As a grid-forming converter, it needs to be able to work in both islanded and grid-tied operating modes as well as the transition between these modes as its plug-and-play requirements. So, in this paper, adaptive damping factor is proposed in employing swing equation for generation of the mechanical phase angle which can ensure welldesigned inertia and damping features in both operation modes and transition between them and provide a smooth resynchronization to the grid. The main contributions of this paper are as follow: • We first construct the small-signal model of a VSGbased grid-supporting grid-forming converter in both islanded and grid-connected operating modes.
• Then, the small signal analyses reveal that the optimal value of the damping factor is not the same in different modes of operation, and the idea of adaptive oscillation damping is proposed.
• Finally, it is proved that the proposed adaptive oscillation damping technique can guarantee the best performance of the VSG in each mode of operation and enable a smooth transition between these modes. The rest of the paper is organized as follows: Section 2 includes the description of the converter control method. The proposed adaptive oscillation damping is provided in Section 3. Results and discussion are presented in Section 4 to verify the performance of the proposed control method under grid-tied and stand-alone operating modes as well as transient between these two modes of operation. Finally, Section 5 concludes this study. Fig. 1 shows the schematic diagram of the used model, i.e., a grid supporting grid-forming converter for providing power from the integration of renewable energies. An LC filter is employed to filter out the injected power of the interfaced converter. Filter inductance and capacitance are described by L f and C f , respectively. The converter is connected to a power grid with grid impedance of R g + jL g when the breaker is closed, or it works in stand-alone operating mode when the breaker is open. The control structure for the converter includes two control loops, i.e., inner voltage and current control loop and outer frequency-power control loop, each one is responsible for achieving specific targets.

II. PRESENTATION OF THE CONVERTER CONTROL METHOD
As a grid-supporting grid-forming unit, the fundamental purpose of the power converter is to regulate the AC voltage amplitude and frequency by controlling its active and reactive power injection. Thus, the control structure includes primary and secondary frequency regulation as well as voltage regulation. As a VSG, the main objective of the proposed control technique is to provide frequency stability, inertia, and frequency oscillation damping. These objectives are achievable through applying the swing equation on the outer frequency-power control loop, in which the power of the VSG changes based on grid frequency changes. Both the inner and outer control loops are presented in detail in the following subsections.

A. INNER VOLTAGE AND CURRENT CONTROL LOOP
This section presents the inner current and voltage control loops that are embedded for the control of the interfaced converter. As mentioned earlier, the inner control loop gives the chance to implement overcurrent protection in the control structure [19]. The AC-side dynamics of the voltage source converters are presented as a basis for developing the conventional vector current and voltage controllers.
According to Fig. 1, the equations representing AC-side dynamics of the VSCs can be expressed in the dq reference frame as: where ω is the angular frequency provided by the outer control loop. u dq and v dq represent the command voltage for modulating the converter and the AC output voltage of the converter, and i m,dq and i dq are the converter output current before and after LC filter, respectively. The inner control loop, including voltage and current controls, can be embedded in the control loop of VSC as depicted in Fig. 2. In the current control loop, the converter output current tracks its reference (i * m ) through a proportionalintegral (PI) controller. Hence, the current controllers in the dq reference frame are defined by: The current references can be obtained by AC voltage control loop as: As shown in Fig. 2, PI controllers are also employed to regulate the AC output voltage to its reference provided by the Q-V droop control, which will be described in the following subsection. By assuming the direction of the d-axis vector in the park transformation in the direction of the AC output voltage vector, the q-axis component of the output voltage is zero (v q = 0). Therefore, the Q-V droop controller defines the reference for the d-component of AC output voltage and the q-component one is set to zero value.

B. OUTER POWER-FREQUENCY CONTROL LOOP
The outer control loop provides the voltage amplitude, phase angle, and angular frequency reference for the inner control loop while allows the realization of some objectives, i.e., primary and secondary frequency regulation, voltage regulation, and inertia and oscillation damping emulation for the system. All control designs to achieve these functionalities are described in this subsection.
Inertia and damping are employed as the most important features of SGs to extract phase angle and angular frequency for the inner control loop, which is depicted in Fig. 3. These features are implemented through the swing equation defined in per unit as follows [17]: where P in_pu and P out_pu are the input and output active power of converter, D is the damping factor, H is the inertia constant, ω m and ω pll represent the mechanical angular frequency and the angular frequency of AC voltage measured by PLL, respectively.
Since the increased penetration of RESs displaced conventional SGs, the appropriate values of H and D should be determined aiming at retaining at least the same equivalent power system inertia and oscillation damping, while the speed of response is still reasonable. The provision of adjustable H and D can be regarded as an ancillary service offered to the power grid, allows them to replace the conventional spinning and non-spinning reserves.
The RES within the power grid is equipped with an active power-frequency (P-f) droop curve to emulate the functionality of the SG primary frequency control [17]. This relationship between frequency and power, shown in (10), makes the frequency adjustable and manages the order of the various RES participation in the primary frequency response, allowing the VSG to operate in parallel with other VSGs and SGs. In this equation, K pf represents the inverse of active power droop coefficient (m p ), P * and ω * are the active power reference and the reference angular frequency, respectively. Term P, as the output of the P-f droop control, is employed as the input active power of the converter (P in_pu ) to impose  the swing equation.
In the stand-alone operation, secondary frequency control for restoring frequency to its nominal value is an advantageous characteristic of SGs. This feature is considered in control of the VSG by applying an integral term as: Therefore, primary and secondary frequency controls are implemented altogether, considering a PI controller expressed by (12), shown in Fig. 4.
An outer Q-V droop control, described in (13), is used to realize voltage regulation which provides the reference voltage for the d-axis of the voltage control loop explained in the previous section [18].
The Q-V droop control is depicted in Fig. 5, where m Q is the reactive power droop coefficient operating on the difference between Q * and Q f which represent the reference reactive power and the filtered out reactive power of converter, respectively. A low pass filter (LPF) with a cutoff frequency of ω c is employed to filter out the measured reactive power of the converter.
In the outer control loop, the swing equation is added to the primary and secondary frequency control and together provide the reference mechanical phase angle and angular frequency for the inner control loop. Mechanical angular frequency is employed to implement the coupling term between the d and q axis in the inner control loop. The dq reference frame and the park transformation are based on the mechanical phase angle provided by the outer control loop. PLL is just employed to measure the real grid frequency to implement frequency regulation. Structure of the PLL, used to measure the frequency at the point of common coupling (PCC), is shown in Fig. 6, and the equations that it holds are shown in (14)- (16). As shown in this structure, δω pll gives the speed deviation between the synchronous reference frame provided by PLL and nominal speed (ω N ).
As the whole control is based on the mechanical phase angle (θ m ) provided by VSG, and PLL is the only structure that uses its internal synchronous reference frame, v pll,q needs to be changed through reference frame transformation in order to have the whole control structure based on synchronous reference frame provided by VSG. Term v pll,q is the q component of voltage at PCC generated by PLL local synchronous reference frame and, (17), (18) show the equivalence of v pll,q in islanded and grid-connected operating modes, respectively.
In grid-connected mode of operation, V * g as the amplitude of the grid voltage defines the vector v g in (19), in which δθ m is the phase displacement between the mechanical phase angle provided by VSG and the grid reference angular frequency because the entire control system should be implemented in the synchronous reference frame defined by VSG.

III. DESCRIPTION OF THE PROPOSED ADAPTIVE OSCILLATION DAMPING
It should be mentioned that the control technique described in the previous section can be applied both in gridconnected and stand-alone modes of operation. However, resynchronization to the grid, as an important plug-andplay requirement of grid-forming converters, has not been considered in the control structure. As the described VSGbased control technique is based on internally generated mechanical phase angle, resynchronizing to the grid is more challenging. So, the described control technique needs to be improved to ensure the best performance of the modern converter-based power systems. Unlike the synchronous generators that include defined inertia and damping features based on their mechanical components, it is possible to consider inertia constant and damping factor in the control of a VSG-based converter, which results in the best inertia and damping features. So, it is even more flexible. However, parameters to guarantee the best inertia and damping features in the islanded mode of operation are not the same as in the grid-connected mode. At the time of connecting the grid-forming converter to the grid, there are large oscillations in frequency, because the synchronization to the grid is based on the mechanical phase angle provided by the frequency-power control loop, and there should be some changes in the process of generating mechanical phase angle at the time of resynchronizing to the grid. Hence, this issue is considered in the proposed control technique by applying different amounts of damping factors for swing equation in the outer power-frequency control loop, i.e., D small to D big values which are well-designed for islanded and grid-connected modes, as shown in Fig.7. So instead of considering a constant D, adaptive damping factors are applied to the outer power-frequency control loop. Consequently, the best oscillation damping features are achievable for both operating modes, resulting in a smooth resynchronization to the grid.
In the proposed technique, D small is the best value of damping factor for the islanded operating mode and D big is the best value of damping factor for the grid-connected mode of operation. In this section, small-signal model and analysis are provided based on the equations in section 2 to identify the best value of damping factor for each mode of operation.

A. LINEARIZED MODEL AND ANALYSIS IN STAND-ALONE OPERATING MODE
The linearized small-signal state-space model of the system for the islanded mode of operation with the general form of (x = Ax + Bu) can be found from the non-linear model in (A.1) provided in Appendix A. The state variables (vector x) and input signals (vector u) of the VSG model for stand-alone operating mode are as follows, which results in a state-space representation of 15 th order.
The corresponding matrices for the linearized state-space model are given in (A.2)-(A.6) in Appendix A, which are used here to analyze the behavior of the proposed control technique in stand-alone operation mode.  Parameters of the test model and its control are summarized in Table 1 which is used for both the stability analysis of this section and simulation in the following section. The eigenvalues of the corresponding A matrix with D = 2 are calculated and listed in Table 2 to identify all modes of the system in islanded operating mode. All 15 modes of the system are on the left side, showing the stability of the system.
To identify the best value of the damping factor, the trajectory of dominant system eigenvalues (λ 13,14 ) with sweeping D from D = 2 to D = 60 is shown in Fig. 8. As shown in this figure, increasing D results in more stability at first as the corresponding slow modes going toward the left side, then more increment of D results in decreasing of stability. Moreover, the system shows an underdamped response in small damping values while its response changes to an overdamped one by increasing in D values. The underdamped and overdamped responses are not favorable because of  oscillated and low-speed responses. The best value for D in islanded operating mode is 38 as the system shows a critical response. Therefore, D = 38 is considered as D small in the proposed control technique.

B. LINEARIZED MODEL AND ANALYSIS IN GRID-CONNECTED OPERATING MODE
The linearized small-signal state-space model of the system for the grid-connected mode of operation with the general form of (x = Ax + Bu) can be found from the non-linear model in (B.1) provided in Appendix B. The state variables (vector x) and input signals (vector u) of the VSG model for grid-connected operating mode are as follows, leading to a 16 th order state-space model.
The corresponding matrices for the linearized state-space model are given in (B.2)-(B.6) in Appendix B, which are used here to analyze the behavior of the proposed control technique in grid-connected operation mode.
The eigenvalues of the corresponding A matrix with D = 100 are calculated and listed in Table 3 to identify all modes of the system in grid-connected operating mode. All 16 modes of the system are on the left side, showing the stability of the system. To identify the best value of the damping factor for grid-connected mode, the trajectory of the dominant system eigenvalues (λ 13,14 ) with sweeping D from D = 100 to D = 300 is shown in Fig. 9. As shown in this figure, increasing D results in more stability at first as the corresponding slow modes going toward the left side, then more increment of D decreases the system stability. Besides, the system shows an underdamped response in small damping values while its response changes to an overdamped one by increasing in D values. The underdamped and overdamped responses are not favorable because of oscillated and lowspeed responses. The best value for D in grid-connected mode is 238 as the system shows a critical response. Therefore, D = 238 is considered as D big in the proposed control technique.
Results and discussion in the following section verify the performance of the proposed control technique in providing enough inertia and frequency damping during frequency disturbance, i.e., step-up load change, and the ability of secondary frequency controller in the regulation of frequency, as well as the capability of the proposed adaptive damping factor in resynchronization of the VSG-based converter to the grid.

IV. RESULTS AND DISCUSSION
The general schematic diagram of the used model included by the proposed control technique is shown in Fig. 10. The model is simulated in Matlab/Simulink to verify the performance of the proposed control technique. Parameters of the test model and its control are summarized in Table 1. Performance of the proposed control technique in both islanded and grid-tied operation modes as well as the transition from grid-tied to islanded operating mode and ability of resynchronizing to the power grid is provided by the following simulation results. Moreover, the impact of H and D on providing enough inertia and frequency oscillation damping and reducing frequency nadir (the maximum deviation of frequency from its nominal value following a disturbance) is shown in this section to verify the performance of the VSG.
First, the converter operates in islanded operating mode while supplies a 36 kW + j1.8 kVAR load. As listed in Table 1, the reference active and reactive power of the converter are 40 kW and 2 kVAR, respectively. However, as it operates in islanded operating mode, the output active and reactive power of the converter are the same as the load demand, as shown in Fig. 11 (b) and Fig. 11(c), respectively. This is the reason why frequency and voltage at PCC are more than the nominal values (50 Hz, 327 V maximum phase voltage) at first, as shown in Fig. 11(a) and Fig. 11(d), respectively, which shows the performance of P-f and Q-V droop control. According to Fig. 11(a), frequency has reached its nominal value after 2 seconds due to the secondary frequency control performance. Fig. 12 compares the frequency at PCC with and without secondary frequency control to show the performance of the secondary frequency control. The frequency without secondary frequency control in this operation mode is 50.09 Hz and does not return to its nominal value, while the frequency with secondary frequency control has reached 50 Hz after 2 seconds. This clearly proves the high performance of the secondary frequency control in the regulation of frequency at PCC.
In the proposed control method, different amounts of damping factors from large values to small ones are considered for islanded and connected modes which are     In order to check the ability of the grid-supporting grid-forming converter in resynchronizing to the grid, at t = 6 s, the breaker is closed, and the converter is connected to the grid. The mechanical phase angle generated by the VSG is compared with the grid voltage phase angle in Fig. 13, confirming the synchronism of the VSG with the grid.
The frequency at PCC during the time of resynchronizing to the grid comparing a constant damping factor for both modes of operation with that of the proposed adaptive damping factors for each mode is shown in Fig. 14. As shown in this figure, with the proposed adaptive damping factor technique, frequency does not change fast and with an undesirable undershoot due to the suitable choice of damping factor for the proposed VSG, which adapts to each mode of operation well. While with a constant D for both modes of operation, frequency includes large oscillation at the time of resynchronization to the grid. The figure clearly illustrates the high performance of the proposed control technique and the impacts of the well-designed  The active power of the converter, the reactive power of the converter, and the voltage at PCC at the time of connecting to the grid are shown in Fig. 15. As shown in this figure, before connecting to the grid, the power of the converter is 36 kW + j1.8 kVAR to supply the load demand, while after connecting to the grid, the converter provides the reference active power of 40 kW and reactive power of 2 kVAR.
After 4 seconds of operating in grid-connected mode, the converter is disconnected from the grid at t = 10 s and works in stand-alone operating mode. The frequency at PCC, shown in Fig. 16, indicates the desirable performance of the proposed control technique in transition from grid-connected to the stand-alone mode of operation, while with a constant D, suitable for connected mode, frequency in islanded mode is too slow to be regulated to its nominal value.  The active power of the converter, the reactive power of the converter, and the voltage at PCC at the time of transient from connected to the islanded mode of operation are shown in Fig. 17. In the islanded mode of operation, the VSG does not follow its reference active and reactive power and supplies the load power demand of 36 kW + j1.8 kVAR. So, without secondary frequency control, the frequency cannot be regulated to its nominal value. Finally, as a VSG-based control technique, it is important to examine the role of inertia constant in providing inertia and reducing nadir frequency, i.e., the minimum frequency point, as well as the impact of damping factor in damping frequency oscillations. Therefore, a 10% step-up load change at t = 16 s from 36 kW + j1.8 kVAR to 40 kW + j1.8 kVAR is considered. The frequency of the system comparing two amounts of inertia constant is shown in Fig. 18(a). As shown in this figure, raising the inertia constant from H = 2 s to H = 6 s results in a 42% decrease in nadir frequency which means the frequency stability is enhanced. The frequency under the same scenario is shown in Fig. 18(b) comparing two amounts of damping factors. As can be seen, increasing the damping factor reduces frequency oscillation.
The active power of the converter, the reactive power of the converter, and the voltage at PCC at the time of load change of 4 kW are shown in Fig.19. As shown in this figure, the VSG supplies the load demand of 40 kW +j1.8 kVAR. As there is no change in reactive power demand, the reactive power of the converter remains at 1.8 kVAR.

V. CONCLUSION
A control technique for a VSC acting as a grid-supporting grid-forming converter with the ability to provide inertia and damping has been proposed in this paper to enhance the performance of these converters for the future converterbased power grid. These characteristics have been emulated into the outer control loop of the converter through the swing equation, and the extracted mechanical phase angle and mechanical angular frequency have been employed for implementing inner current and voltage control loops in the dq reference frame. The small-signal model of the VSG in both islanded and grid-connected operating modes have been constructed, and the optimal value of damping factor for each mode of operation has been extracted from small-signal analyses. Based on these analyses, adaptive oscillation damping has been proposed to enable smooth resynchronization to the grid and to guarantee the plug and play capability of the VSG. Finally, simulation results in MATLAB/Simulink indicate the ability of the proposed control technique in providing frequency and voltage regulation. The effect of H and D on reducing the frequency nadir and damping the frequency oscillation is also examined. The high performance of the proposed control technique with the adaptive damping factors in resynchronization to the grid has been verified through simulation. It is proved that the proposed control technique can damp the high frequency oscillation caused by resynchronization to the grid and can provide better dynamic performance in both modes of operation as well as transient between these modes of operation.

APPENDIX A STATE-SPACE REPRESENTATION FOR ISLANDED OPERATING MODE
The non-linear equations of the system in the islanded mode of operation are shown in (A.1), as shown at the bottom of the page, which comes from the provided equations of the system in section 2.
The state matrix, A, and the input matrix, B, for the linearized small-signal state-space model are presented in (A.2) -(A.5), as shown at the bottom of the next page and (A. 6), as shown at the bottom of the next page, respectively.

APPENDIX B STATE-SPACE REPRESENTATION FOR GRID-CONNECTED OPERATING MODE
The non-linear equations of the system in the grid-connected mode of operation are shown in (B.1), as shown at the bottom of the page which comes from the provided equations of the system in section 2. The state matrix, A, and the input matrix, B, for the linearized small-signal state-space model are presented in (B.2), as shown at the bottom of the page,   Since 2005, he has been with Islamic Azad University Firoozkooh Branch, as a Lecturer. Also, he has been working as a Consultant Engineer with Behjosh Electric Factory for designing and producing different types of welding machines, since 2012. He has published more than 20 journals and conference paper in the field of power electronics applications. His current research interests include power electronic circuit design and control, application of power electronic converter in smart grid, photovoltaic, and wind energy harvesting, and electrical machines drivers design and control.