PMSG Control for a Stand-Alone Gas Engine Generator Using Active Rectifier and VSG-Controlled Inverter

The engine generator system with a diode rectifier causes harmonic currents in the generator which can affect generator efficiency and may produce torque oscillations. Using an active rectifier instead of a diode rectifier helps us to improve the current waveforms. In this paper, an active rectifier is used for a stand-alone gas engine generation system with a permanent magnet synchronous generator (PMSG). The generator side converter and the load side converter can be controlled separately to achieve high performance and reliability of the system. In the proposed control framework, the generator side converter is controlled by means of a current vector control method in a cascade structure with the synchronous reference frame (dqframe). In the proposed control scheme, the dc link voltage is controlled by the generator side converter. For load side converter control, the concept of virtual synchronous generator control method is adopted to support a smooth power transient during the load changes. To verify the usefulness of the proposed control structure, using PSCAD software (version 4.2.1), the system transient responses with both a diode rectifier and an active rectifier are investigated under loading and load removal cases. Moreover, for the system with an active rectifier, the transient response of the system with different vector control strategies of PMSG is also investigated.


Introduction
Gas engine generators are mobile electric power generation units that can operate in both stand-alone and grid-connected modes. Therefore, they are widely utilized in many commercial and industrial applications as well as in distributed generation systems [1][2][3][4][5][6]. In gas engine power generation systems, the generated electrical power is supplied to the load or to the grid by using a power electronic system which performs ac-dc-ac power conversion. In industry, two structures of power conversion can be used for the generator side converter. The first one is based on an uncontrolled diode rectifier which is simple and easy for the sake of implementation. The second one is the insulated gate bipolar transistors (IGBTs) based rectifier which can be controlled by the pulse width modulation (PWM) method. In both cases, the voltage source inverter is connected to the load or the power grid. The first technique causes high harmonic distortion in the generator currents. This leads to torque oscillations and overheating in the generator windings. Thus, the generator efficiency may be seriously VSG control on the load side converter. The third objective was to evaluate the performance of the proposed system by using different control strategies on the PMSG side converter. In order to achieve the mentioned objectives, the system responses were studied under loading and load removal cases in a PSCAD software environment. The rest of the paper is organized as follows: The VSG control scheme for the control of load side converter is explained in Section 2. The mathematical model of a PMSG and the CSV control method are presented in Section 3. The simulation results of the system with a diode rectifier and with the proposed active rectifier are discussed in Section 4. The simulations of the proposed PMSG system with different control strategies are performed in Section 5. Finally, this paper is concluded in Section 6.
Energies 2020, 13, x FOR PEER REVIEW 3 of 16 applying the VSG control on the load side converter. The third objective was to evaluate the performance of the proposed system by using different control strategies on the PMSG side converter. In order to achieve the mentioned objectives, the system responses were studied under loading and load removal cases in a PSCAD software environment. The rest of the paper is organized as follows: The VSG control scheme for the control of load side converter is explained in Section 2. The mathematical model of a PMSG and the CSV control method are presented in Section 3. The simulation results of the system with a diode rectifier and with the proposed active rectifier are discussed in Section 4. The simulations of the proposed PMSG system with different control strategies are performed in Section 5. Finally, this paper is concluded in Section 6.

Virtual Synchronous Generator (VSG) Control
The VSG control was used for the control of load side converters. The VSG control scheme proposed in this study is shown in Figure 2. In this figure, the "Swing Equation Function" block emulates the function of the well-known swing equation of an SG as expressed in Equation (1).
where Pin and Pout are input and output powers, respectively; J presents the inertia moment, D shows the damping factor, ωm is the virtual angular velocity, Δωm is the slip between virtual angular frequency and the frequency of inverter output voltage (ωm − ωV-inv), which is used to mimic the dynamics of damper windings during transients. Here, the phase-locked loop (PLL) was used for detecting ωV-inv. As for stand-alone system, ωm determines the frequency of the network and ωV-inv follows it. To obtain ωm over a time step Δt, the swing equation is solved using the fourth-order Runge-Kutta iterative algorithm. By integrating ωm, the phase reference θm for the output voltage of the inverter is calculated. In the block "Power Calculation", the active power Pout is calculated from inverter output voltage and inverter output current using Equation (2). The line-to-line root-meansquare (RMS) value of the inverter output voltage Vinv is calculated by Equation (3). Figure 1. Configuration of the proposed gas engine generator system.

Virtual Synchronous Generator (VSG) Control
The VSG control was used for the control of load side converters. The VSG control scheme proposed in this study is shown in Figure 2. In this figure, the "Swing Equation Function" block emulates the function of the well-known swing equation of an SG as expressed in Equation (1).
where P in and P out are input and output powers, respectively; J presents the inertia moment, D shows the damping factor, ω m is the virtual angular velocity, ∆ω m is the slip between virtual angular frequency and the frequency of inverter output voltage (ω m − ω V-inv ), which is used to mimic the dynamics of damper windings during transients. Here, the phase-locked loop (PLL) was used for detecting ω V-inv . As for stand-alone system, ω m determines the frequency of the network and ω V-inv follows it. To obtain ω m over a time step ∆t, the swing equation is solved using the fourth-order Runge-Kutta iterative algorithm. By integrating ω m , the phase reference θ m for the output voltage of the inverter is calculated. In the block "Power Calculation", the active power P out is calculated from inverter output voltage and inverter output current using Equation (2). The line-to-line root-mean-square (RMS) value of the inverter output voltage V inv is calculated by Equation (3).
Energies 2020, 13, x FOR PEER REVIEW 3 of 16 applying the VSG control on the load side converter. The third objective was to evaluate the performance of the proposed system by using different control strategies on the PMSG side converter. In order to achieve the mentioned objectives, the system responses were studied under loading and load removal cases in a PSCAD software environment. The rest of the paper is organized as follows: The VSG control scheme for the control of load side converter is explained in Section 2. The mathematical model of a PMSG and the CSV control method are presented in Section 3. The simulation results of the system with a diode rectifier and with the proposed active rectifier are discussed in Section 4. The simulations of the proposed PMSG system with different control strategies are performed in Section 5. Finally, this paper is concluded in Section 6.

Virtual Synchronous Generator (VSG) Control
The VSG control was used for the control of load side converters. The VSG control scheme proposed in this study is shown in Figure 2. In this figure, the "Swing Equation Function" block emulates the function of the well-known swing equation of an SG as expressed in Equation (1).
where Pin and Pout are input and output powers, respectively; J presents the inertia moment, D shows the damping factor, ωm is the virtual angular velocity, Δωm is the slip between virtual angular frequency and the frequency of inverter output voltage (ωm − ωV-inv), which is used to mimic the dynamics of damper windings during transients. Here, the phase-locked loop (PLL) was used for detecting ωV-inv. As for stand-alone system, ωm determines the frequency of the network and ωV-inv follows it. To obtain ωm over a time step Δt, the swing equation is solved using the fourth-order Runge-Kutta iterative algorithm. By integrating ωm, the phase reference θm for the output voltage of the inverter is calculated. In the block "Power Calculation", the active power Pout is calculated from inverter output voltage and inverter output current using Equation (2). The line-to-line root-meansquare (RMS) value of the inverter output voltage Vinv is calculated by Equation (3).  Like a typical SG, the automatic voltage regulator (AVR) was used to regulate the actual inverter voltage V inv to match the inverter base voltage V inv * . The output of AVR was the voltage magnitude reference V * for inverter output voltage. The block diagram of AVR is shown in Figure 3. A governor function could also be performed in the VSG control scheme for the control of the load-power as shown in Figure 4. In this study, the time delay of the governor function was omitted and δ was the droop coefficient in percent. However, if load variations occur, the frequency deviates from the base frequency due to the droop characteristics of the governor. Therefore, the load-frequency control (LFC) was incorporated with the governor control in order to maintain the frequency at the inverter base frequency, f inv_0 , in case of load fluctuations.  Like a typical SG, the automatic voltage regulator (AVR) was used to regulate the actual inverter voltage Vinv to match the inverter base voltage Vinv * . The output of AVR was the voltage magnitude reference V * for inverter output voltage. The block diagram of AVR is shown in Figure 3. A governor function could also be performed in the VSG control scheme for the control of the load-power as shown in Figure 4. In this study, the time delay of the governor function was omitted and δ was the droop coefficient in percent. However, if load variations occur, the frequency deviates from the base frequency due to the droop characteristics of the governor. Therefore, the load-frequency control (LFC) was incorporated with the governor control in order to maintain the frequency at the inverter base frequency, finv_0, in case of load fluctuations.

Mathematical Model of PMSG
In the synchronous reference frame (dq-frame), assuming the magnetic flux is aligned with the d-axis, the dynamic model of the surface mounted PMSG can be represented as in Equation (4), where ψm is the flux linkage of the permanent magnet, Rs is the stator resistance, ωe is the rotor speed in electrical degree, vds, vqs, id, iqs, Lds, and Lqs are the d-and q-component of the stator voltage, current, and inductance.
Under the steady-state condition, Equation (4) can be expressed as For a surface mounted type PMSG, the electromagnetic torque, active power, and reactive power can be expressed as Like a typical SG, the automatic voltage regulator (AVR) was used to regulate the actual inverter voltage Vinv to match the inverter base voltage Vinv * . The output of AVR was the voltage magnitude reference V * for inverter output voltage. The block diagram of AVR is shown in Figure 3. A governor function could also be performed in the VSG control scheme for the control of the load-power as shown in Figure 4. In this study, the time delay of the governor function was omitted and δ was the droop coefficient in percent. However, if load variations occur, the frequency deviates from the base frequency due to the droop characteristics of the governor. Therefore, the load-frequency control (LFC) was incorporated with the governor control in order to maintain the frequency at the inverter base frequency, finv_0, in case of load fluctuations.

Mathematical Model of PMSG
In the synchronous reference frame (dq-frame), assuming the magnetic flux is aligned with the d-axis, the dynamic model of the surface mounted PMSG can be represented as in Equation (4), where ψm is the flux linkage of the permanent magnet, Rs is the stator resistance, ωe is the rotor speed in electrical degree, vds, vqs, id, iqs, Lds, and Lqs are the d-and q-component of the stator voltage, current, and inductance.
Under the steady-state condition, Equation (4) can be expressed as For a surface mounted type PMSG, the electromagnetic torque, active power, and reactive power can be expressed as

Mathematical Model of PMSG
In the synchronous reference frame (dq-frame), assuming the magnetic flux is aligned with the d-axis, the dynamic model of the surface mounted PMSG can be represented as in Equation (4), where ψ m is the flux linkage of the permanent magnet, R s is the stator resistance, ω e is the rotor speed in electrical degree, v ds , v qs , i d , i qs , L ds , and L qs are the d-and q-component of the stator voltage, current, and inductance. v Under the steady-state condition, Equation (4) can be expressed as For a surface mounted type PMSG, the electromagnetic torque, active power, and reactive power can be expressed as where p is the number of pole pairs. From the above mathematical expressions of surface mounted PMSG, the PMSG side converter can be controlled in various schemes based on vector control methods to achieve the different control objectives. In PMSG, the induced voltage cannot be controlled as the excitation comes from the permanent magnet. Therefore, the induced voltage is proportional to the generator speed and varies with the speed. In the case of over-speed, the overvoltage occurs in the generator and converter. To overcome this problem, in this study, the constant stator voltage (CSV) control method was adopted for the control of PMSG side converter and the detailed control scheme is explained in the following subsection.

Control Scheme of PMSG Side Converter
In this control scheme, the generator output stator voltage is controlled through the stator current. The control structure is implemented in the stator voltage-oriented reference frame where the stator voltage vector is aligned on the d-axis, and the stator voltage on q-axis is equal to zero. Thus, the active and reactive powers of the PMSG become From Equations (9) and (10), the active power depends on the stator d-axis current and the reactive power depends on the q-axis stator current. Again, the relationship between the ac input power and dc output power of the converter can be expressed as where v dc and i dc are the dc-link voltage and current, respectively. Hence, instead of the active power, the dc-link voltage v dc can be controlled by the stator d-axis current. Moreover, instead of the reactive power, the stator voltage can be controlled by the stator q-axis current. The block diagram of the overall control structure with the CSV control is shown in Figure 5. In this figure, the PMSG side converter control is a cascaded control with an inner current control loop and an outer voltage control loop on the d-and q-axes. Hence, it consists of four proportional integral (PI) controllers in which PI 1 is the dc-link voltage controller, PI 2 is the stator voltage controller, and PI 3 and PI 4 are the d-and q-axis current controllers. In dc-link voltage control, the reference dc-link voltage V dc * and the actual measured voltage V dc are compared and the error is sent to PI 1. The output of PI 1 is the reference d-axis current i ds * . Then, i ds * is compared with the actual measured value i ds and the error is sent to PI 3. The output of PI 3 is the reference voltage signal e d * to the converter. In the stator voltage control loop, the reference stator voltage V gen * is compared with the actual stator voltage V gen which is calculated from the generator output voltage as given in Equation (12). Then, the error is sent to PI 2. The output of PI 2 is the reference q-axis current i qs * . Then, i qs * is compared with the actual measured value i qs and the error is sent to PI 4. The output of PI 4 is the reference voltage signal e q * to the converter. After adding the decoupling terms ω e Li ds , ω e Li qs and the feed forward terms v ds , v qs to the e d * and e q * , these voltages are transformed into αβ values to calculate the reference voltage V * for space vector pulse width modulation (SVPWM). The park transformation method is used to transform the measured three-phase voltages and currents into two-phase voltages and currents in dq-frame. As the control scheme is in the stator voltage-oriented reference frame, the required voltage angle θ PLL for dq-transformation is detected by the PLL circuit. Therefore, an encoder is not necessary in this control method.

Simulation-Based Comparison between a Diode Rectifier and an IGBT Rectifier
Several simulations were performed to examine the response of the proposed control framework in the PSCAD/EMTDC software environment. To show the effectiveness of using an IGBT rectifier, simulations were carried out for two different system topologies for the generator side converter: with a diode rectifier and with an IGBT rectifier. Similar parameters were used for both systems because the IGBT-based rectifier acts as a full-bridge diode rectifier under the gate-blocking condition owing to the diodes connected to the IGBTs in an anti-parallel configuration. For both cases, the load side converter was controlled by the VSG control method. The simulations were performed for the system shown in Figure 6. In the simulation study, the gas engine model was simplified by combining the engine time delay and the settling time of the speed controller. Therefore, a simple PI speed controller shown in Figure 7 represents the engine model. The parameters of the speed controller, the PMSG and the VSG control scheme are listed in Tables 1 and 2, respectively. The circuit parameters and the PI control parameters are listed in Table 3.  The simulation run time was fixed at 20 s. The generator was prepared to operate at speed of 1710 rpm without load. Following 3 s, a resistive load of 40 ohm which was equivalent to a 0.5 pu load (1 kW) was connected to the system and the response to a step load change (0 kW to 1 kW) was analyzed. At 15 s, the load was removed (1 kW to 0 kW) and the response to this disturbance was investigated.

Simulation-Based Comparison between a Diode Rectifier and an IGBT Rectifier
Several simulations were performed to examine the response of the proposed control framework in the PSCAD/EMTDC software environment. To show the effectiveness of using an IGBT rectifier, simulations were carried out for two different system topologies for the generator side converter: With a diode rectifier and with an IGBT rectifier. Similar parameters were used for both systems because the IGBT-based rectifier acts as a full-bridge diode rectifier under the gate-blocking condition owing to the diodes connected to the IGBTs in an anti-parallel configuration. For both cases, the load side converter was controlled by the VSG control method. The simulations were performed for the system shown in Figure 6. In the simulation study, the gas engine model was simplified by combining the engine time delay and the settling time of the speed controller. Therefore, a simple PI speed controller shown in Figure 7 represents the engine model. The parameters of the speed controller, the PMSG and the VSG control scheme are listed in Tables 1 and 2, respectively. The circuit parameters and the PI control parameters are listed in Table 3.

Simulation-Based Comparison between a Diode Rectifier and an IGBT Rectifier
Several simulations were performed to examine the response of the proposed control framework in the PSCAD/EMTDC software environment. To show the effectiveness of using an IGBT rectifier, simulations were carried out for two different system topologies for the generator side converter: with a diode rectifier and with an IGBT rectifier. Similar parameters were used for both systems because the IGBT-based rectifier acts as a full-bridge diode rectifier under the gate-blocking condition owing to the diodes connected to the IGBTs in an anti-parallel configuration. For both cases, the load side converter was controlled by the VSG control method. The simulations were performed for the system shown in Figure 6. In the simulation study, the gas engine model was simplified by combining the engine time delay and the settling time of the speed controller. Therefore, a simple PI speed controller shown in Figure 7 represents the engine model. The parameters of the speed controller, the PMSG and the VSG control scheme are listed in Tables 1 and 2, respectively. The circuit parameters and the PI control parameters are listed in Table 3.  The simulation run time was fixed at 20 s. The generator was prepared to operate at speed of 1710 rpm without load. Following 3 s, a resistive load of 40 ohm which was equivalent to a 0.5 pu load (1 kW) was connected to the system and the response to a step load change (0 kW to 1 kW) was analyzed. At 15 s, the load was removed (1 kW to 0 kW) and the response to this disturbance was investigated.

Simulation-Based Comparison between a Diode Rectifier and an IGBT Rectifier
Several simulations were performed to examine the response of the proposed control framework in the PSCAD/EMTDC software environment. To show the effectiveness of using an IGBT rectifier, simulations were carried out for two different system topologies for the generator side converter: with a diode rectifier and with an IGBT rectifier. Similar parameters were used for both systems because the IGBT-based rectifier acts as a full-bridge diode rectifier under the gate-blocking condition owing to the diodes connected to the IGBTs in an anti-parallel configuration. For both cases, the load side converter was controlled by the VSG control method. The simulations were performed for the system shown in Figure 6. In the simulation study, the gas engine model was simplified by combining the engine time delay and the settling time of the speed controller. Therefore, a simple PI speed controller shown in Figure 7 represents the engine model. The parameters of the speed controller, the PMSG and the VSG control scheme are listed in Tables 1 and 2, respectively. The circuit parameters and the PI control parameters are listed in Table 3.  The simulation run time was fixed at 20 s. The generator was prepared to operate at speed of 1710 rpm without load. Following 3 s, a resistive load of 40 ohm which was equivalent to a 0.5 pu load (1 kW) was connected to the system and the response to a step load change (0 kW to 1 kW) was analyzed. At 15 s, the load was removed (1 kW to 0 kW) and the response to this disturbance was investigated. The simulation run time was fixed at 20 s. The generator was prepared to operate at speed of 1710 rpm without load. Following 3 s, a resistive load of 40 ohm which was equivalent to a 0.5 pu load (1 kW) was connected to the system and the response to a step load change (0 kW to 1 kW) was analyzed. At 15 s, the load was removed (1 kW to 0 kW) and the response to this disturbance was investigated.  Table 3. Circuit parameters and proportional integral (PI) control parameters.
First, the simulation results of generator stator current waveforms in steady state are shown in Figure 8. As can be seen in Figure 8, the current waveform with the diode rectifier was not sinusoidal and contained large harmonic contents that could deteriorate the generator efficiency. The current waveform with the IGBT rectifier was very close to a sinusoidal waveform and the harmonic components were greatly reduced.   First, the simulation results of generator stator current waveforms in steady state are shown in Figure 8. As can be seen in Figure 8, the current waveform with the diode rectifier was not sinusoidal and contained large harmonic contents that could deteriorate the generator efficiency. The current waveform with the IGBT rectifier was very close to a sinusoidal waveform and the harmonic components were greatly reduced. The engine speed response to the step loading case is shown in Figure 9a. With the diode rectifier, due to the applied load, the speed was decreased about 110 rpm. However, after 3 s, the speed returned to its reference value. With the IGBT rectifier, for the connecting of the load, the amount of speed decrease was 90 rpm, about 20 rpm smaller than the case of the diode rectifier. After 2 s, the speed returned to its reference value, properly. In Figure 9b, the engine speed response to the load removal case is shown and the engine speed variations in the case of diode rectifier were larger than the variations of the IGBT rectifier case. For both loading and load removal cases, the recovery The engine speed response to the step loading case is shown in Figure 9a. With the diode rectifier, due to the applied load, the speed was decreased about 110 rpm. However, after 3 s, the speed returned to its reference value. With the IGBT rectifier, for the connecting of the load, the amount of speed decrease was 90 rpm, about 20 rpm smaller than the case of the diode rectifier. After 2 s, the speed returned to its reference value, properly. In Figure 9b, the engine speed response to the load removal case is shown and the engine speed variations in the case of diode rectifier were larger than the variations of the IGBT rectifier case. For both loading and load removal cases, the recovery time in the case of the diode rectifier to reach its steady state was also longer than that of the IGBT rectifier case. time in the case of the diode rectifier to reach its steady state was also longer than that of the IGBT rectifier case.
(a) (b) Figure 9. Results of the engine speed (a) loading case, (b) load removal case.
The generator stator voltage result for the loading case is shown in Figure 10a. With the diode rectifier, at the start of loading, the stator voltage decreased from its rated voltage of 200 V to 187 V, and then recovered to 196 V at steady state. With the IGBT rectifier, at the instant of loading, the stator voltage dropped to 191 V. After 2 s, the stator voltage caught its reference value of 200 V despite of a small overshoot. For the load removal case, as can be seen in Figure 10b, the stator voltage in the case of the IGBT rectifier reached its reference value after load transients. With the diode rectifier, the stator voltage had a small deviation from its rated value of 200 V under a steady state condition. Therefore, the waveforms in Figure 10 show the usefulness of stator voltage controller. The dc link voltage responses to the loading case are shown in Figure 11a. With the diode rectifier, it could be seen that there was a considerable voltage drop of 40 V at the time of loading. Furthermore, the dc link voltage was maintained at around 260 V at the steady state. Since there was no control for both the generator field voltage and the dc link, the voltage could not reach to its noload condition value of 290 V. With the IGBT rectifier, the amount of voltage drop at the start of load connection was about 20 V, and then the dc voltage reached its reference value after 3 s without any overshoot and steady-state error. Figure 11b depicts the dc-link voltage response to the load removal case. With the diode rectifier, the dc-link voltage recovered to its no-load condition value of 290 V for the case of removing the load from the system. With the IGBT rectifier, the dc link voltage rose from 400 V to 420 V when the load was removed from the system. After 2 s, it dropped to its reference value. For both the loading and the load removal cases, the results show the usefulness of dc link voltage controller. As the IGBT rectifier was a boost type converter, the dc link voltage with the IGBT rectifier was higher than that with the diode rectifier and could sufficiently provide the demanded load power. The generator stator voltage result for the loading case is shown in Figure 10a. With the diode rectifier, at the start of loading, the stator voltage decreased from its rated voltage of 200 V to 187 V, and then recovered to 196 V at steady state. With the IGBT rectifier, at the instant of loading, the stator voltage dropped to 191 V. After 2 s, the stator voltage caught its reference value of 200 V despite of a small overshoot. For the load removal case, as can be seen in Figure 10b, the stator voltage in the case of the IGBT rectifier reached its reference value after load transients. With the diode rectifier, the stator voltage had a small deviation from its rated value of 200 V under a steady state condition. Therefore, the waveforms in Figure 10 show the usefulness of stator voltage controller.
Energies 2020, 13, x FOR PEER REVIEW 8 of 16 time in the case of the diode rectifier to reach its steady state was also longer than that of the IGBT rectifier case.
(a) (b) Figure 9. Results of the engine speed (a) loading case, (b) load removal case.
The generator stator voltage result for the loading case is shown in Figure 10a. With the diode rectifier, at the start of loading, the stator voltage decreased from its rated voltage of 200 V to 187 V, and then recovered to 196 V at steady state. With the IGBT rectifier, at the instant of loading, the stator voltage dropped to 191 V. After 2 s, the stator voltage caught its reference value of 200 V despite of a small overshoot. For the load removal case, as can be seen in Figure 10b, the stator voltage in the case of the IGBT rectifier reached its reference value after load transients. With the diode rectifier, the stator voltage had a small deviation from its rated value of 200 V under a steady state condition. Therefore, the waveforms in Figure 10 show the usefulness of stator voltage controller. The dc link voltage responses to the loading case are shown in Figure 11a. With the diode rectifier, it could be seen that there was a considerable voltage drop of 40 V at the time of loading. Furthermore, the dc link voltage was maintained at around 260 V at the steady state. Since there was no control for both the generator field voltage and the dc link, the voltage could not reach to its noload condition value of 290 V. With the IGBT rectifier, the amount of voltage drop at the start of load connection was about 20 V, and then the dc voltage reached its reference value after 3 s without any overshoot and steady-state error. Figure 11b depicts the dc-link voltage response to the load removal case. With the diode rectifier, the dc-link voltage recovered to its no-load condition value of 290 V for the case of removing the load from the system. With the IGBT rectifier, the dc link voltage rose from 400 V to 420 V when the load was removed from the system. After 2 s, it dropped to its reference value. For both the loading and the load removal cases, the results show the usefulness of dc link voltage controller. As the IGBT rectifier was a boost type converter, the dc link voltage with the IGBT rectifier was higher than that with the diode rectifier and could sufficiently provide the demanded load power. The dc link voltage responses to the loading case are shown in Figure 11a. With the diode rectifier, it could be seen that there was a considerable voltage drop of 40 V at the time of loading. Furthermore, the dc link voltage was maintained at around 260 V at the steady state. Since there was no control for both the generator field voltage and the dc link, the voltage could not reach to its no-load condition value of 290 V. With the IGBT rectifier, the amount of voltage drop at the start of load connection was about 20 V, and then the dc voltage reached its reference value after 3 s without any overshoot and steady-state error. Figure 11b depicts the dc-link voltage response to the load removal case. With the diode rectifier, the dc-link voltage recovered to its no-load condition value of 290 V for the case of removing the load from the system. With the IGBT rectifier, the dc link voltage rose from 400 V to 420 V when the load was removed from the system. After 2 s, it dropped to its reference value. For both the loading and the load removal cases, the results show the usefulness of dc link voltage controller. As the IGBT rectifier was a boost type converter, the dc link voltage with the IGBT rectifier was higher than that with the diode rectifier and could sufficiently provide the demanded load power. The generator output active power responses are shown in Figure 12. The waveforms of inverter output active power are shown in Figure 13. In Figures 12 and 13, with the diode rectifier, the settling time to reach the demanded load power was slower than that of the IGBT rectifier case. Nevertheless, in both cases, the power transitions had a smooth change during load transients owing to the effect of virtual inertia provided by the VSG control in the load side converter.

Evaluation of Different PMSG Side Control Schemes
In this section, different control strategies for the PMSG side converter are discussed and applied to the proposed gas engine generator system. These control schemes can be mainly divided into three types namely (1) zero d-axis current (ZDC) control, (2) unity power factor (UPF) control and (3) constant stator voltage (CSV) control. The CSV control method was explained in Section 3. Therefore, only the ZDC control and the UPF control methods are presented in the following subsections. The generator output active power responses are shown in Figure 12. The waveforms of inverter output active power are shown in Figure 13. In Figures 12 and 13, with the diode rectifier, the settling time to reach the demanded load power was slower than that of the IGBT rectifier case. Nevertheless, in both cases, the power transitions had a smooth change during load transients owing to the effect of virtual inertia provided by the VSG control in the load side converter. The generator output active power responses are shown in Figure 12. The waveforms of inverter output active power are shown in Figure 13. In Figures 12 and 13, with the diode rectifier, the settling time to reach the demanded load power was slower than that of the IGBT rectifier case. Nevertheless, in both cases, the power transitions had a smooth change during load transients owing to the effect of virtual inertia provided by the VSG control in the load side converter.

Evaluation of Different PMSG Side Control Schemes
In this section, different control strategies for the PMSG side converter are discussed and applied to the proposed gas engine generator system. These control schemes can be mainly divided into three types namely (1) zero d-axis current (ZDC) control, (2) unity power factor (UPF) control and (3) constant stator voltage (CSV) control. The CSV control method was explained in Section 3. Therefore, only the ZDC control and the UPF control methods are presented in the following subsections. The generator output active power responses are shown in Figure 12. The waveforms of inverter output active power are shown in Figure 13. In Figures 12 and 13, with the diode rectifier, the settling time to reach the demanded load power was slower than that of the IGBT rectifier case. Nevertheless, in both cases, the power transitions had a smooth change during load transients owing to the effect of virtual inertia provided by the VSG control in the load side converter.

Evaluation of Different PMSG Side Control Schemes
In this section, different control strategies for the PMSG side converter are discussed and applied to the proposed gas engine generator system. These control schemes can be mainly divided into three types namely (1) zero d-axis current (ZDC) control, (2) unity power factor (UPF) control and (3) constant stator voltage (CSV) control. The CSV control method was explained in Section 3. Therefore, only the ZDC control and the UPF control methods are presented in the following subsections.

Evaluation of Different PMSG Side Control Schemes
In this section, different control strategies for the PMSG side converter are discussed and applied to the proposed gas engine generator system. These control schemes can be mainly divided into three types namely (1) zero d-axis current (ZDC) control, (2) unity power factor (UPF) control and (3) constant stator voltage (CSV) control. The CSV control method was explained in Section 3. Therefore, only the ZDC control and the UPF control methods are presented in the following subsections.

Zero d-Axis Current Control
This control scheme is performed in the rotor reference frame in which the voltage vector is aligned on the q-axis component and the d-axis is aligned to the stator flux vector. The magnitude of stator current i s can be calculated from the d-axis current component i ds and the q-axis current component i qs as written in Equation (13).
From Equation (13), when the d-axis current component i ds is controlled to be zero, the stator current i s is equal to the q-axis current component i qs . Thus, the active and reactive powers of PMSG become P s = v qs i qs , Hence, the dc side voltage v dc can be controlled through i qs . Then, the control structure of the proposed stand-alone gas engine generation system with the ZDC control for the PMSG side converter is shown in Figure 14. It consists of three PI controllers, decoupling factors, and feed-forward terms. Therefore, PI 1 controller in Figure 14 is a dc link voltage controller corresponding to the active power. PI 4 and PI 3 are corresponding to the d-and q-axis current controllers, respectively. The outputs of current controllers e d * , e q * are the voltage reference signals of SVPWM for generating gate signals to the PMSG side converter. In this control scheme, the decoupling terms are ω e Li ds , ω e Li qs , and the feed forward term is ω e ψ m . As the control scheme is implemented in the rotor reference frame, an encoder is necessary to measure the rotor position θ r for each transformation of the three-phase system to a two-phase system. With this control scheme, the generator provides the maximum possible torque at the minimum current and can minimize the resistive losses in the generator. However, the converter rating increases in this control method as the reactive power of the generator is not zero. This control scheme is performed in the rotor reference frame in which the voltage vector is aligned on the q-axis component and the d-axis is aligned to the stator flux vector. The magnitude of stator current is can be calculated from the d-axis current component ids and the q-axis current component iqs as written in Equation (13).
From Equation (13), when the d-axis current component ids is controlled to be zero, the stator current is is equal to the q-axis current component iqs. Thus, the active and reactive powers of PMSG become = , = − . (15) Hence, the dc side voltage vdc can be controlled through iqs. Then, the control structure of the proposed stand-alone gas engine generation system with the ZDC control for the PMSG side converter is shown in Figure 14. It consists of three PI controllers, decoupling factors, and feedforward terms. Therefore, PI 1 controller in Figure 14 is a dc link voltage controller corresponding to the active power. PI 4 and PI 3 are corresponding to the d-and q-axis current controllers, respectively. The outputs of current controllers ed * , eq * are the voltage reference signals of SVPWM for generating gate signals to the PMSG side converter. In this control scheme, the decoupling terms are ωeLids, ωeLiqs, and the feed forward term is ωeψm. As the control scheme is implemented in the rotor reference frame, an encoder is necessary to measure the rotor position θr for each transformation of the three-phase system to a two-phase system. With this control scheme, the generator provides the maximum possible torque at the minimum current and can minimize the resistive losses in the generator. However, the converter rating increases in this control method as the reactive power of the generator is not zero.

Unity Power Factor (UPF) Control
The d-axis current component ids can also be used to achieve the unity power factor operation of the PMSG as shown in Figure 15. In this figure, the reactive power reference is set at zero to operate the PMSG with unity power factor. Thus, the reactive power controller PI 2 is included and its output is used as the reference current for the ids control loop. The other controllers perform the same function as explained in the ZDC control method. As in the ZDC control, an encoder is necessary to measure the rotor position θr for each transformation of a three-phase system to a two-phase system. As the reactive power of generator is controlled to be zero, the converter rating can be minimized by this control method.

Unity Power Factor (UPF) Control
The d-axis current component i ds can also be used to achieve the unity power factor operation of the PMSG as shown in Figure 15. In this figure, the reactive power reference is set at zero to operate the PMSG with unity power factor. Thus, the reactive power controller PI 2 is included and its output is used as the reference current for the i ds control loop. The other controllers perform the same function as explained in the ZDC control method. As in the ZDC control, an encoder is necessary to measure the rotor position θ r for each transformation of a three-phase system to a two-phase system. As the reactive power of generator is controlled to be zero, the converter rating can be minimized by this control method.

Simulation Results
In order to study the transient performance of the proposed gas engine generator system with different control methods for the PMSG side converter, simulations were performed under step load change conditions. The simulation parameters of the PMSG, the VSG control, and the circuit parameters were the same as listed in Tables 1-3. The proportional gain and the time constant of the reactive power controller PI 2 in the UPF control were set at Kp = 10 and Ti = 0.1 s, respectively. The simulation condition was also the same as presented in Section 4.
The simulation results of the engine speed during the step load changes are shown in Figure 16. For both loading and unloading cases, the engine speed in the case of UPF control method was more oscillatory. The engine speed transients of the CSV control and the ZDC control methods were almost similar. The stator voltage responses are illustrated in Figure 17, showing that the stator voltage deviated from its rated value with the ZDC and UPF control methods. By the CSV control, the stator voltage was controlled to follow its reference value after the transient. Moreover, the amount of voltage variations was the lowest during the transient. The dc link voltage responses to the load changes are shown in Figure 18. The dc link voltage responses of the ZDC method and the CSV method 34re almost the same. With the UPF control, there 34re some oscillations in the dc link voltage waveform.

Simulation Results
In order to study the transient performance of the proposed gas engine generator system with different control methods for the PMSG side converter, simulations were performed under step load change conditions. The simulation parameters of the PMSG, the VSG control, and the circuit parameters were the same as listed in Tables 1-3. The proportional gain and the time constant of the reactive power controller PI 2 in the UPF control were set at K p = 10 and T i = 0.1 s, respectively. The simulation condition was also the same as presented in Section 4.
The simulation results of the engine speed during the step load changes are shown in Figure 16. For both loading and unloading cases, the engine speed in the case of UPF control method was more oscillatory. The engine speed transients of the CSV control and the ZDC control methods were almost similar. The stator voltage responses are illustrated in Figure 17, showing that the stator voltage deviated from its rated value with the ZDC and UPF control methods. By the CSV control, the stator voltage was controlled to follow its reference value after the transient. Moreover, the amount of voltage variations was the lowest during the transient. The dc link voltage responses to the load changes are shown in Figure 18. The dc link voltage responses of the ZDC method and the CSV method 34re almost the same. With the UPF control, there 34re some oscillations in the dc link voltage waveform.

Simulation Results
In order to study the transient performance of the proposed gas engine generator system with different control methods for the PMSG side converter, simulations were performed under step load change conditions. The simulation parameters of the PMSG, the VSG control, and the circuit parameters were the same as listed in Tables 1-3. The proportional gain and the time constant of the reactive power controller PI 2 in the UPF control were set at Kp = 10 and Ti = 0.1 s, respectively. The simulation condition was also the same as presented in Section 4.
The simulation results of the engine speed during the step load changes are shown in Figure 16. For both loading and unloading cases, the engine speed in the case of UPF control method was more oscillatory. The engine speed transients of the CSV control and the ZDC control methods were almost similar. The stator voltage responses are illustrated in Figure 17, showing that the stator voltage deviated from its rated value with the ZDC and UPF control methods. By the CSV control, the stator voltage was controlled to follow its reference value after the transient. Moreover, the amount of voltage variations was the lowest during the transient. The dc link voltage responses to the load changes are shown in Figure 18. The dc link voltage responses of the ZDC method and the CSV method 34re almost the same. With the UPF control, there 34re some oscillations in the dc link voltage waveform.  The waveforms of generator output active power are shown in Figure 19. The ZDC method and the CSV method output similar active power responses with smooth transitions. The UPF control method made some oscillations during the transient period. The generator output reactive power responses are presented in Figure 20. With the ZDC control, there can be seen the negative reactive power in the steady state condition. With the CSV control, the reactive power had a large oscillation during the load transition and then it recovered to zero value in the steady state condition. With the UPF control, the reactive power was well controlled at zero value in the steady state condition. The inverter output waveforms are shown in Figure 21. The load power transitions had a smooth change in all cases.  The waveforms of generator output active power are shown in Figure 19. The ZDC method and the CSV method output similar active power responses with smooth transitions. The UPF control method made some oscillations during the transient period. The generator output reactive power responses are presented in Figure 20. With the ZDC control, there can be seen the negative reactive power in the steady state condition. With the CSV control, the reactive power had a large oscillation during the load transition and then it recovered to zero value in the steady state condition. With the UPF control, the reactive power was well controlled at zero value in the steady state condition. The inverter output waveforms are shown in Figure 21. The load power transitions had a smooth change in all cases.  The waveforms of generator output active power are shown in Figure 19. The ZDC method and the CSV method output similar active power responses with smooth transitions. The UPF control method made some oscillations during the transient period. The generator output reactive power responses are presented in Figure 20. With the ZDC control, there can be seen the negative reactive power in the steady state condition. With the CSV control, the reactive power had a large oscillation during the load transition and then it recovered to zero value in the steady state condition. With the UPF control, the reactive power was well controlled at zero value in the steady state condition. The inverter output waveforms are shown in Figure 21. The load power transitions had a smooth change in all cases. The waveforms of generator output active power are shown in Figure 19. The ZDC method and the CSV method output similar active power responses with smooth transitions. The UPF control method made some oscillations during the transient period. The generator output reactive power responses are presented in Figure 20. With the ZDC control, there can be seen the negative reactive power in the steady state condition. With the CSV control, the reactive power had a large oscillation during the load transition and then it recovered to zero value in the steady state condition. With the UPF control, the reactive power was well controlled at zero value in the steady state condition. The inverter output waveforms are shown in Figure 21. The load power transitions had a smooth change in all cases.
(a) (b) Figure 19. Results of the generator output active power (a) loading case, (b) load removal case. Figure 19. Results of the generator output active power (a) loading case, (b) load removal case. Some investigations show that the operating range of a PSMG with the UPF control in comparison of other two control methods is limited [32]. This is due to the UPF constraints specified by stator inductances, limiting the stator current magnitude and angle [33]. This limitation is specifically obvious in the speed range which limits the turbine's mechanical power available at rated and high speeds. That is why the PMSG with the CSV and the ZDC provides better performance, especially at rated speed.
From the simulation results, it can be said that each control method can be well applied to the proposed gas engine system for approaching the targeted control objectives. However, as can be seen from the waveforms, a better system performance was obtained with the CSV control method. Moreover, an encoder was not used in this control method and therefore the CSV control method was simpler than the other two methods.

Conclusions
This paper mainly addresses the entire control of a gas engine generation system using a PMSG and a fully controllable frequency converter. In the present work, the control methodologies for the generator side and the load side converters were performed. Using the proposed control strategy, the active and reactive powers of the generator were controlled independently. For the generator side converter, the generator output active power was controlled through a dc link voltage control loop, whereas the reactive power was controlled through the generator stator voltage controller. For the sake of showing the effectiveness of the proposed control scheme, several computer simulations were performed for the step load change test while the generator unit was working in stand-alone operation mode. In comparison with a diode rectifier-based system, the applied control scheme was significantly effective regarding generator current harmonic reduction. Thus, an improvement in generator efficiency can be expected. Moreover, the transient responses of the proposed gas engine generator system were simulated with different control strategies in the generator side converter. The simulation results verified that each control method properly worked in the studied system. In Some investigations show that the operating range of a PSMG with the UPF control in comparison of other two control methods is limited [32]. This is due to the UPF constraints specified by stator inductances, limiting the stator current magnitude and angle [33]. This limitation is specifically obvious in the speed range which limits the turbine's mechanical power available at rated and high speeds. That is why the PMSG with the CSV and the ZDC provides better performance, especially at rated speed.
From the simulation results, it can be said that each control method can be well applied to the proposed gas engine system for approaching the targeted control objectives. However, as can be seen from the waveforms, a better system performance was obtained with the CSV control method. Moreover, an encoder was not used in this control method and therefore the CSV control method was simpler than the other two methods.

Conclusions
This paper mainly addresses the entire control of a gas engine generation system using a PMSG and a fully controllable frequency converter. In the present work, the control methodologies for the generator side and the load side converters were performed. Using the proposed control strategy, the active and reactive powers of the generator were controlled independently. For the generator side converter, the generator output active power was controlled through a dc link voltage control loop, whereas the reactive power was controlled through the generator stator voltage controller. For the sake of showing the effectiveness of the proposed control scheme, several computer simulations were performed for the step load change test while the generator unit was working in stand-alone operation mode. In comparison with a diode rectifier-based system, the applied control scheme was significantly effective regarding generator current harmonic reduction. Thus, an improvement in generator efficiency can be expected. Moreover, the transient responses of the proposed gas engine generator system were simulated with different control strategies in the generator side converter. The simulation results verified that each control method properly worked in the studied system. In Some investigations show that the operating range of a PSMG with the UPF control in comparison of other two control methods is limited [32]. This is due to the UPF constraints specified by stator inductances, limiting the stator current magnitude and angle [33]. This limitation is specifically obvious in the speed range which limits the turbine's mechanical power available at rated and high speeds. That is why the PMSG with the CSV and the ZDC provides better performance, especially at rated speed.
From the simulation results, it can be said that each control method can be well applied to the proposed gas engine system for approaching the targeted control objectives. However, as can be seen from the waveforms, a better system performance was obtained with the CSV control method. Moreover, an encoder was not used in this control method and therefore the CSV control method was simpler than the other two methods.

Conclusions
This paper mainly addresses the entire control of a gas engine generation system using a PMSG and a fully controllable frequency converter. In the present work, the control methodologies for the generator side and the load side converters were performed. Using the proposed control strategy, the active and reactive powers of the generator were controlled independently. For the generator side converter, the generator output active power was controlled through a dc link voltage control loop, whereas the reactive power was controlled through the generator stator voltage controller. For the sake of showing the effectiveness of the proposed control scheme, several computer simulations were performed for the step load change test while the generator unit was working in stand-alone operation mode. In comparison with a diode rectifier-based system, the applied control scheme was significantly effective regarding generator current harmonic reduction. Thus, an improvement in generator efficiency can be expected. Moreover, the transient responses of the proposed gas engine generator system were simulated with different control strategies in the generator side converter. The simulation results verified that each control method properly worked in the studied system. In addition, the smooth change of generator active power results in all cases verified the usefulness of VSG control in the load Energies 2020, 13, 233 14 of 16 side converter. Thus, the proposed control framework for the PMSG was suitable for the gas engine generation system working in a stand-alone operation mode.
However, despite the mentioned benefits and advantages, like all existing control systems, the proposed control scheme suffers from some potential problems and shortages. The main weak points in practical applications can be summarized as follows: (1) The proposed VSG control method used in the inverter side could not provide a direct dc link voltage control. Therefore, in case of diode rectifier system, there was a lack of dc link voltage control which affected the total efficiency of the system. In the case of the active rectifier system, the dc link voltage could be controlled from the generator side converter. However, it was difficult to effectively use the developed control structure for the power generation systems in which the generator side converter had to perform another control purpose, for example, the generator side converter had to control the PMSG speed in order to perform maximum efficiency of a gas engine. (2) In comparison of diode-based rectifier, the design of the proposed active rectifier was more complex and costly. (3) The proposed VSG control provided constant virtual inertia and damping parameters.
The present work was an initial step to apply a combination of active rectifier and VSG control in the pure stand-alone operation system specialized for the gas engine generator. To responds to the above weak points, further works are required. Some future steps can be considered as: (1) conducting experimental tests for evaluating and validating the proposed control strategy in this paper, (2) enhance the VSG control scheme to produce inertia and damping parameters, adaptively; and (3) improve the dc link voltage control performance using a high capacity energy storage system and more sophisticated control methodology.

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