A Simpliﬁed Design Strategy for Multi-Resonant Current Control of a Grid-Connected Voltage Source Inverter with an LCL Filter

: A distorted grid voltage or nonlinear behavior in the current control loop can cause low frequency current harmonics in a grid-connected voltage source inverter (VSI). Many efforts have been made to mitigate such phenomena, including hardware and/or control structure improvements. A well-known suitable strategy to reduce current harmonics in a selective manner is to apply a Proportional Multi-Resonant (PMR) current controller. Inverter-grid stability is another common issue when dealing with grid-connected VSI. Stability is inﬂuenced by the inverter impedance, which depends on the controller parameters. This paper presents a simpliﬁed tuning strategy for the PMR controller, taking into consideration the inverter-grid stability issue. The obtained controller was implemented and tested in a 10 kW three-phase inverter with a passively damped LCL ﬁlter. A signiﬁcant reduction of current harmonics emission from the inverter up to 650 Hz was achieved without any hardware modiﬁcation. The limits of PMR controllers to mitigate current harmonics were studied, and the inﬂuence of the grid impedance was veriﬁed. This paper focuses on low frequency current harmonics mitigation for a three-phase, three-wire inverter with a passively damped LCL ﬁlter, without any hardware intervention. Several solutions have already been studied in the literature to mitigate those harmonics. A non-exhaustive review is presented here.


Introduction
Distributed energy generation is increasing with the exploitation of renewable energy sources. Current-controlled voltage source inverters (VSIs) are commonly used to connect those sources to the AC utility grid. The inverters cause current harmonics at both low (few hundred hertz) and medium frequencies (from a few kHz up to 100 kHz). PWM (pulse-width-modulated) inverters produce current harmonics at their switching frequency and its multiples. Typically, passive or active output filters are used to reduce these perturbations in the kHz range [1].
However, low frequency harmonics also exist as a consequence of • nonlinear behavior in the current control loop such as the switching dead time [2], • grid voltage disturbances [1,3], and • DC-link voltage harmonics [3].
A constant DC voltage is assumed in this manuscript. They generally occur at multiples of the grids fundamental frequency and therefore in the lower frequency range, up to 2 kHz. This paper focuses on low frequency current harmonics mitigation for a three-phase, three-wire inverter with a passively damped LCL filter, without any hardware intervention. Several solutions have already been studied in the literature to mitigate those harmonics. A non-exhaustive review is presented here.
Current controllers with a single proportional integral (PI) per axis are commonly used to control three-phase grid-connected inverters. Typically, these controllers are implemented in the synchronous dq-reference frame and are sufficient when dealing with a balanced and mainly sinusoidal electrical grid. However, when grid voltages are unbalanced and distorted, advanced current controller and/or additional hardware are required. A good strategy to achieve a zero steady state error at the grid's fundamental frequency is to use proportional resonant (PR) controllers in the stationary αβ-reference frame [4]. The mathematical relation between the rotating frame PI controller and the stationary frame PR controller was derived, and a damped PR controller was proposed to increase system stability in [5,6]. It has been demonstrated that an ideal PR controller corresponds to a pair of PI controllers, synchronized with the grids' positive and negative sequence components [1,7]. A controller with additional resonances was proposed in [8] to cancel current harmonics. This type of controller modifies the output impedance of the inverter by integrating a model of the periodic disturbances.
The influence of proportional multi-resonant (PMR) controllers on the output impedance of the inverter was analyzed in [9]. Different structures were studied, e.g., to improve the current distortion under unbalanced grid conditions [10]. In [2], it was demonstrated that multi-resonant control effectively mitigates current harmonics caused by the converter dead time. Its advantage over average theory-based approaches to compensate the influence of the dead-time is that there is no need for current polarity detection.
Unfortunately, due to the phase lag introduced by the PMR controller, closed-loop stability is not an effortless task. In order to tackle this drawback, a repetitive controller (RC) has been proposed [11]. An RC rejects all grid harmonics disturbances; however, from an implementation point of view, an RC requires more memory resources compared to a PMR controller. Moreover, a PMR controller allows specific and selective control of non-harmonic components (sub-and inter-harmonics). A cascaded PI controller can also realize current harmonics mitigation [1]. From an implementation point of view, a cascaded PI controller requires more computational resources and memory. A Z-active power filter (Z-APF) aims to sink the harmonics current from the grid by generating a current reference directly from the grid voltage and the desired impedance type and value. In a grid-connected application, the R-APF type is mostly employed to damp out currents harmonics and stabilize the grid [12]. Predictive controllers (PCs), such as deadbeat or finite control set models, have been investigated as well [13]. PCs require a strong knowledge of the inverter model, plant, and grid to predict dynamic behavior, meaning that PCs are inherently sensitive to model and parameter mismatches. Robust control using H-infinity methods based on a PI plus resonant controller and based on an RC have been proposed [14,15]. Many other non-linear controllers such as swarm-optimization-based harmonic elimination [16] and fuzzy logic [17] have been studied. In [18,19], a direct Lyapunov-based control technique is presented for active power filtering of the utility grid. Others system topologies have been studied to attenuate current harmonics, such as Z-source inverters [20]. In [21], an active power filter approach is presented. In [22], an auxiliary power converter is devoted to the control of the current harmonics of a high power VSI.
None of the above strategies/methods benefit from a perfect harmonic cancellation, low computation, no losses, no specific position in the grid, and no additional cost.
The aim of this paper is to present a design strategy of the inverter current controller to attenuate current harmonics perturbations in the frequency range below 2 kHz. This can be done with a PMR controller. In order to reduce the number of parameters to be tuned, harmonic resonant coefficients have been imposed to be inversely proportional to the value of the fundamental harmonic coefficient. More precisely, they will follow an inverse proportional law as a function of the harmonic order. The design of the current controller then takes into account the inverter-grid stability issue by using sensitivity values. This approach of a simplified choice of coefficients of a PMR controller, together with the inverter-grid stability approach, is novel. The obtained current controller was implemented in a 10 kW three-phase grid-connected VSI with an LCL filter. Tests were executed under varying grid voltage conditions. The paper is organized as follows. The experimental setup is described in Section 2. Section 3 presents the inverter model. In Section 4, a description of the PMR controller tuning procedure is given, with particular emphasis on the influence of the different optimization criteria. Finally, in Section 5, the experimental results are presented.

Experimental Setup
The experimental setup has been presented in a previous paper [23]. For ease of reading, the key elements, along with some of the design criteria, are summarized in this section. A principle schematic of the inverter is shown in Figure 1. in a 10 kW three-phase grid-connected VSI with an LCL filter. Tests were executed under varying grid voltage conditions. The paper is organized as follows. The experimental setup is described in Section 2. Section 3 presents the inverter model. In Section 4, a description of the PMR controller tuning procedure is given, with particular emphasis on the influence of the different optimization criteria. Finally, in Section 5, the experimental results are presented.

Experimental Setup
The experimental setup has been presented in a previous paper [23]. For ease of reading, the key elements, along with some of the design criteria, are summarized in this section. A principle schematic of the inverter is shown in Figure 1. The main system specifications are listed in Table 1. The inverter hardware is mainly made of three boards, i.e., power, control, and communication boards, a coupling inductance section, and an EMC filter section. Both power and control boards were custom made, while for the communication an evaluation board was chosen: STKA28-AA, supplied by the TQ group. A picture of the electrical cabinet of the inverter is presented in Figure 2. The main system specifications are listed in Table 1. The inverter hardware is mainly made of three boards, i.e., power, control, and communication boards, a coupling inductance section, and an EMC filter section. Both power and control boards were custom made, while for the communication an evaluation board was chosen: STKA28-AA, supplied by the TQ group. A picture of the electrical cabinet of the inverter is presented in Figure 2.

Power Board Hardware Features
The power board bloc-schematic is shown in Figure 3. It is supplied by an external +24 V power supply. All auxiliary power supplies, e.g., +3.3 V and +5 V, are embedded. An intelligent power module has been selected for the switching section. Due to the required overload capability, the PM50RLB120, 50 A/1200 V (Mitsubishi Electric Corporation, Tokyo, Japan) was chosen. The inverter losses were calculated according to [24] and simulated using PLECS ® (Version 4.0.5, Plexim GmbH, Zurich, Switzerland), simulation software for power electronics. In nominal conditions, overall losses of about 400 W were evaluated at the switching frequency fsw = 15 kHz. The DC link capacitor bank was designed according to [25]. Considering an ambient temperature of 45 °C and a junction virtual temperature Tj = 125 °C, the required thermal resistance of the heat-sink was evaluated as 0.08 K/W. The chosen heatsink was a LA8-300-24 V (Astrel AG, Pfäffikon, Switzerland). The IPM module was directly soldered on the PCB (Printed Circuit Board).
The DC voltage was connected to the intelligent power module (IPM) through two positive and negative overlapping copper layers on the board (equivalent busbar). The DC link voltage and the three phase output currents were measured with HXS20-NP Hall sensors (LEM, Geneva, Switzerland). The leakage current on the DC link was measured with a LEM CTSR 0.3-TP/SP4. The PWM control signals from the DSP were provided via fast optocouplers HCPL-4504 (Broadcom, San Jose, CA, USA-formerly Avago), while the IPM error output was sent back to the control through fast optocouplers HMHA2801 (Fairchild -ON Semiconductor, Phoenix, AZ, USA). The three-phase utility voltages were measured after a three-phase contactor and the filter section to perform grid synchronization independently from the power injection procedure.

Power Board Hardware Features
The power board bloc-schematic is shown in Figure 3. It is supplied by an external +24 V power supply. All auxiliary power supplies, e.g., +3.3 V and +5 V, are embedded. An intelligent power module has been selected for the switching section. Due to the required overload capability, the PM50RLB120, 50 A/1200 V (Mitsubishi Electric Corporation, Tokyo, Japan) was chosen. The inverter losses were calculated according to [24] and simulated using PLECS ® (Version 4.0.5, Plexim GmbH, Zurich, Switzerland), simulation software for power electronics. In nominal conditions, overall losses of about 400 W were evaluated at the switching frequency f sw = 15 kHz. The DC link capacitor bank was designed according to [25]. Considering an ambient temperature of 45 • C and a junction virtual temperature Tj = 125 • C, the required thermal resistance of the heat-sink was evaluated as 0.08 K/W. The chosen heatsink was a LA8-300-24 V (Astrel AG, Pfäffikon, Switzerland). The IPM module was directly soldered on the PCB (Printed Circuit Board).

Power Board Hardware Features
The power board bloc-schematic is shown in Figure 3. It is supplied by an external +24 V power supply. All auxiliary power supplies, e.g., +3.3 V and +5 V, are embedded. An intelligent power module has been selected for the switching section. Due to the required overload capability, the PM50RLB120, 50 A/1200 V (Mitsubishi Electric Corporation, Tokyo, Japan) was chosen. The inverter losses were calculated according to [24] and simulated using PLECS ® (Version 4.0.5, Plexim GmbH, Zurich, Switzerland), simulation software for power electronics. In nominal conditions, overall losses of about 400 W were evaluated at the switching frequency fsw = 15 kHz. The DC link capacitor bank was designed according to [25]. Considering an ambient temperature of 45 °C and a junction virtual temperature Tj = 125 °C, the required thermal resistance of the heat-sink was evaluated as 0.08 K/W. The chosen heatsink was a LA8-300-24 V (Astrel AG, Pfäffikon, Switzerland). The IPM module was directly soldered on the PCB (Printed Circuit Board).
The DC voltage was connected to the intelligent power module (IPM) through two positive and negative overlapping copper layers on the board (equivalent busbar). The DC link voltage and the three phase output currents were measured with HXS20-NP Hall sensors (LEM, Geneva, Switzerland). The leakage current on the DC link was measured with a LEM CTSR 0.3-TP/SP4. The PWM control signals from the DSP were provided via fast optocouplers HCPL-4504 (Broadcom, San Jose, CA, USA-formerly Avago), while the IPM error output was sent back to the control through fast optocouplers HMHA2801 (Fairchild -ON Semiconductor, Phoenix, AZ, USA). The three-phase utility voltages were measured after a three-phase contactor and the filter section to perform grid synchronization independently from the power injection procedure.  The DC voltage was connected to the intelligent power module (IPM) through two positive and negative overlapping copper layers on the board (equivalent busbar). The DC link voltage and the three phase output currents were measured with HXS20-NP Hall sensors (LEM, Geneva, Switzerland). The leakage current on the DC link was measured with a LEM CTSR 0.3-TP/SP4. The PWM control signals from the DSP were provided via fast optocouplers HCPL-4504 (Broadcom, San Jose, CA, USA-formerly Avago), while the IPM error output was sent back to the control through fast optocouplers HMHA2801 (Fairchild-ON Semiconductor, Phoenix, AZ, USA). The three-phase utility voltages were measured after a three-phase contactor and the filter section to perform grid synchronization independently from the power injection procedure.

Coupling Inductance and Harmonics Filter
The coupling inductance L 1 value of 3 mH was designed by neglecting the additional differential mode harmonic filter made by C 1 and L 2 . A nominal voltage at L 1 of about 5% of utility voltage was selected. Simulated current harmonics were used to choose the inductance core. The details of the harmonics filter design are presented in [23].

Control Board Hardware Features
The inverter can be controlled using the International Electrotechnical Commission standard communication protocol IEC-61850, through a custom designed software called Mat2DSP (Proprietary custom developed software), or through a Labview (2017, National Instruments Corporation, Austin, TX, USA) application. Figure 4 presents the bloc-schematic of the control board including the communication port.

Coupling Inductance and Harmonics Filter
The coupling inductance L1 value of 3 mH was designed by neglecting the additional differential mode harmonic filter made by C1 and L2. A nominal voltage at L1 of about 5% of utility voltage was selected. Simulated current harmonics were used to choose the inductance core. The details of the harmonics filter design are presented in [23].

Control Board Hardware Features
The inverter can be controlled using the International Electrotechnical Commission standard communication protocol IEC-61850, through a custom designed software called Mat2DSP (Proprietary custom developed software), or through a Labview (2017, National Instruments Corporation, Austin, TX, USA) application. Figure 4 presents the bloc-schematic of the control board including the communication port. The current controller presented in this paper was implemented in the experimental setup described above. Figure 5 shows the block diagram of the current control loop.  (1)- (5). The inverter itself is represented by a gain with a time delay, due to the computation time of the microcontroller and the delay introduced by space vector modulation (SVM). It is represented by the block Ginv(s). In this study, a 4th-order Padé-approximation of the delay was used, in order to model the phase lag accurately up to the resonance frequency of the filter (5.8 kHz). The current controller presented in this paper was implemented in the experimental setup described above.

Coupling Inductance and Harmonics Filter
The coupling inductance L1 value of 3 mH was designed by neglecting the additional differential mode harmonic filter made by C1 and L2. A nominal voltage at L1 of about 5% of utility voltage was selected. Simulated current harmonics were used to choose the inductance core. The details of the harmonics filter design are presented in [23].

Control Board Hardware Features
The inverter can be controlled using the International Electrotechnical Commission standard communication protocol IEC-61850, through a custom designed software called Mat2DSP (Proprietary custom developed software), or through a Labview (2017, National Instruments Corporation, Austin, TX, USA) application. Figure 4 presents the bloc-schematic of the control board including the communication port. The current controller presented in this paper was implemented in the experimental setup described above.   (1)- (5). The inverter itself is represented by a gain with a time delay, due to the computation time of the microcontroller and the delay introduced by space vector modulation (SVM). It is represented by the block Ginv(s). In this study, a 4th-order Padé-approximation of the delay was used, in order to model the phase lag accurately up to the resonance frequency of the filter (5.8 kHz).  (1)- (5). The inverter itself is represented by a gain with a time delay, due to the computation time of the microcontroller and the delay introduced by space vector modulation (SVM). It is represented by the block G inv (s). In this study, a 4th-order Padé-approximation of the delay was used, in order to model the phase lag accurately up to the resonance frequency of the filter (5.8 kHz).

Inverter Model
The transfer function of the PMR controller [1,3,7,10] is shown by Equation (5). It contains the proportional gain k p and the sum of damped resonance terms. As is well known, a damped resonance was implemented to increase system stability and to avoid discretization issues [1,5,6]. The peak gain of each resonance is defined by the parameter k r . The angular frequency of each resonance is determined by the parameter ω n and the damping factor ζ determines their bandwidth. The passively damped LCL filter is represented by the blocks Y L1 , Z C1 , and Y L2 . The lossless admittances of the filter inductors are modeled by the blocks Y L1 and Y L2 , while the Z C1 is the impedance of the capacitor branch, including its damping circuit.
U e , T s , R f , and L f terms represent respectively the DC-bus voltage, the delay time caused by computation delay and zero-order hold effect, the damping resistor of the LCL filter, and the parallel inductance to the damping resistor in order to reduce ohmic losses.
The grid voltage harmonics of V g (s) acts as a disturbance on the current control loop. The transfer function of the current controller is modeled by the block G reg (s). Equation (6) describes the open loop transfer function of the current control loop.
From Equations (1)-(6), the continuous transfer function of inverter admittance can be easily deduced: where It is worth mentioning that Equation (5) contains a model of the n sinusoidal signal. The internal model principle (IMP) states that, if a permanent and a marginally stable signal need to be rejected, a model of this signal has to be included inside the control loop [26]. By developing Equation (7), it can be demonstrated that its numerator contains a model of the n sinusoidal signal thanks to G reg (s).
Grid-connected inverters are known to become unstable when dealing with a highly inductive grid. Inverter-grid system stability using only the inverter output impedance and the grid impedance has been investigated in [27]. A grid-connected inverter operation is stable if the ratio of the grid impedance to the inverter output impedance satisfies the Nyquist criterion. As already said, the proposed design of the PMR controller will take into account the inverter-grid system stability.

Harmonics Gain Definition for the PMR Controller
The current controller has been designed in the fixed α,β frame, based on the model presented in the section above. According to [27], two sources of low frequency current harmonics must be taken into account: nonlinear effects in the current control loop, mainly the switching dead time [28] and the grid voltage harmonics [29,30] typically produced by nonlinear loads. In a three-phase system, the most annoying harmonics caused by both of the aforementioned effects are the lower order ones. The 5th, 7th, 11th, and 13th harmonics were selected to be compensated by the proposed multi-resonant controller.
The damping factor ζ is related to the quality factor Q of a resonance, and it is an indicator of the ratio between the resonance frequency and the bandwidth B W as described in Equation (10).
An identical damping factor ζ of 0.01 was chosen for each selected resonance of the PMR controller. This assures that the bandwidth of each resonance covers a frequency deviation of ±1%. This is the admissible frequency deviation defined by the European standard EN 50160 [31].
The resonance peak of each harmonic compensator was tied to the peak gain of the fundamental resonance, then a reduction of the gain k r,n inversely proportional to the harmonic order was applied. This is illustrated by Equations (11) and (12).
There are three main reasons for this choice. Firstly, the number of parameters to be separately tuned is reduced, which significantly simplifies the optimization of the controller. Secondly, a decreasing impact on the phase response is achieved, as a resonance is located closer to the cutoff frequency of the system. This leads to an increased phase margin. Thirdly, typically the amplitude of the aforementioned harmonics decreases with increasing order. Therefore, a lower controller gain for compensation of higher order harmonics can be applied. Figure 6 shows the bode plot of two PMR controllers. The first one has a constant gain k r,n for each resonance, while the second controller exhibits a reduction of the resonant gain as described in Equations (11) and (12). The decreasing impact of higher order resonances on the phase response in the second case can be noted.

Harmonics Gain Definition for the PMR Controller
The current controller has been designed in the fixed α,β frame, based on the model presented in the section above. According to [27], two sources of low frequency current harmonics must be taken into account: nonlinear effects in the current control loop, mainly the switching dead time [28] and the grid voltage harmonics [29,30] typically produced by nonlinear loads. In a three-phase system, the most annoying harmonics caused by both of the aforementioned effects are the lower order ones. The 5th, 7th, 11th, and 13th harmonics were selected to be compensated by the proposed multi-resonant controller.
The damping factor ζ is related to the quality factor Q of a resonance, and it is an indicator of the ratio between the resonance frequency and the bandwidth BW as described in Equation (10).
An identical damping factor ζ of 0.01 was chosen for each selected resonance of the PMR controller. This assures that the bandwidth of each resonance covers a frequency deviation of ±1%. This is the admissible frequency deviation defined by the European standard EN 50160 [31].
The resonance peak of each harmonic compensator was tied to the peak gain of the fundamental resonance, then a reduction of the gain kr,n inversely proportional to the harmonic order was applied. This is illustrated by Equations (11) and (12).
There are three main reasons for this choice. Firstly, the number of parameters to be separately tuned is reduced, which significantly simplifies the optimization of the controller. Secondly, a decreasing impact on the phase response is achieved, as a resonance is located closer to the cutoff frequency of the system. This leads to an increased phase margin. Thirdly, typically the amplitude of the aforementioned harmonics decreases with increasing order. Therefore, a lower controller gain for compensation of higher order harmonics can be applied. Figure 6 shows the bode plot of two PMR controllers. The first one has a constant gain kr,n for each resonance, while the second controller exhibits a reduction of the resonant gain as described in Equations (11) and (12). The decreasing impact of higher order resonances on the phase response in the second case can be noted.

Sensitivity Functions and Minimum Distances
The presence of multiple resonances must be considered carefully in the design procedure of the PMR controller, since the frequency response can approach 0 dB at several frequencies. The same is true for the phase response and the −180 • limit. In order to achieve a robust control design, a procedure relying on the open loop Nyquist plot was applied with the aim to increase the minimum distance of the trajectory to the critical point [32]. The minimum distance of the Nyquist trajectory to the critical point can easily be traced making use of the systems' sensitivity function described by Equation (13). The minimum distance corresponds to the inverse of the sensitivity functions maximum gain, which is equal to its infinity norm as described by Equation (14).
Similarly, the minimal distance η z is expressed as follows:

Iterative Design Procedure
An iterative design procedure has been developed, as described by the flowchart in Figure 7. It must be highlighted that this procedure can be applied to a PR controller as well. The presence of multiple resonances must be considered carefully in the design procedure of the PMR controller, since the frequency response can approach 0 dB at several frequencies. The same is true for the phase response and the −180° limit. In order to achieve a robust control design, a procedure relying on the open loop Nyquist plot was applied with the aim to increase the minimum distance of the trajectory to the critical point [32]. The minimum distance of the Nyquist trajectory to the critical point can easily be traced making use of the systems' sensitivity function described by Equation (13). The minimum distance corresponds to the inverse of the sensitivity functions maximum gain, which is equal to its infinity norm as described by Equation (14).
Similarly, the minimal distance ηz is expressed as follows:

Iterative Design Procedure
An iterative design procedure has been developed, as described by the flowchart in Figure 7. It must be highlighted that this procedure can be applied to a PR controller as well. After the initialization of the optimization parameters (step 1), the grid inductance Lg,ref, the kp and kr,1 range and steps, the damping factor ζ value, and the minimal critical distances η0,min and ηz,min are stated. In a second step, an iterative algorithm for each combination of kp and kr,1 checks if the critical distance η0 is higher than minimum value η0,min. Then, the algorithm calculates the maximal grid inductance value satisfying the critical distance ηz and the Nyquist criterion (step 3). If a set of parameters agrees with one of the three aforementioned criteria, the algorithm stores the kp and kr,1 combination as a valid set for the PMR controller. In the fourth and final step, the results of optimization procedure are displayed in a 2-D surface plot. After the initialization of the optimization parameters (step 1), the grid inductance L g,ref , the k p and k r,1 range and steps, the damping factor ζ value, and the minimal critical distances η 0,min and η z,min are stated. In a second step, an iterative algorithm for each combination of k p and k r,1 checks if the critical distance η 0 is higher than minimum value η 0,min . Then, the algorithm calculates the maximal grid inductance value satisfying the critical distance η z and the Nyquist criterion (step 3).
If a set of parameters agrees with one of the three aforementioned criteria, the algorithm stores the k p and k r,1 combination as a valid set for the PMR controller. In the fourth and final step, the results of optimization procedure are displayed in a 2-D surface plot. Figure 8 presents the optimization results for a 130 µH grid inductive impedance and a given set of ζ, η 0,min , and η z,min . Green lines limit the surface where the values of k p and k r,1 respect all the given criteria. As can be seen, multiple choice of k p and k r,1 parameters fulfill the design requirements. The final choice is made by choosing the parameter's pair with the maximum distance from the origin. In this case, this is satisfied by k p = 0.064 and k r,1 = 7.42, which guarantees the wider bandwidth. More details on the influence of the three optimization criteria are presented in the next section.  Figure 8 presents the optimization results for a 130 µH grid inductive impedance and a given set of ζ, η0,min, and ηz,min. Green lines limit the surface where the values of kp and kr,1 respect all the given criteria. As can be seen, multiple choice of kp and kr,1 parameters fulfill the design requirements. The final choice is made by choosing the parameter's pair with the maximum distance from the origin. In this case, this is satisfied by kp = 0.064 and kr,1 = 7.42, which guarantees the wider bandwidth. More details on the influence of the three optimization criteria are presented in the next section. In order to choose the highest values for kp and kr,1, the parameters in Table 2 where selected. The table shows also the parameters obtained with the PMR controller. The PR controller has been designed with the same iterative design procedure.  Figure 9 illustrates the influence of the parameters kp and kr,1 on the minimum distance η0 of the open loops transfer function. In this case, we utilize a 3-D representation of the results, namely the minimal distance η0, kp, and kr,1. The black plane represents the minimum of η0 = 0.3 that was imposed for the design. The distance η0 is maximum for a proportional gain kp = 0.04 and a resonant gain kr,1 = 3.25. However, kp and kr,1 should be as high as possible to achieve minimal steady state error at the fundamental frequency, a dynamic transient response, and maximum harmonic rejection. As can be seen, there is a change of the slope of the η0 surface towards the right corner of the graph. This is due to the fact that the Nyquist plot encircles the critical point for a low proportional gain kp and increasing resonant gain kr,1. Of course, these combinations are not valid since they clearly lead to an unstable system. Figure 10 shows the Bode plot of the open loop transfer function of the VSI with the PMR In order to choose the highest values for k p and k r,1 , the parameters in Table 2 where selected. The table shows also the parameters obtained with the PMR controller. The PR controller has been designed with the same iterative design procedure.  Figure 9 illustrates the influence of the parameters k p and k r,1 on the minimum distance η 0 of the open loops transfer function. In this case, we utilize a 3-D representation of the results, namely the minimal distance η 0 , k p , and k r,1 . The black plane represents the minimum of η 0 = 0.3 that was imposed for the design. The distance η 0 is maximum for a proportional gain k p = 0.04 and a resonant gain k r,1 = 3.25. However, k p and k r,1 should be as high as possible to achieve minimal steady state error at the fundamental frequency, a dynamic transient response, and maximum harmonic rejection.

Example of Iterative Design Procedure Results
As can be seen, there is a change of the slope of the η 0 surface towards the right corner of the graph. This is due to the fact that the Nyquist plot encircles the critical point for a low proportional gain k p and increasing resonant gain k r,1 . Of course, these combinations are not valid since they clearly lead to an unstable system.
Energies 2018, 11, x FOR PEER REVIEW 10 of 15 phase starts to drop significantly above 1 kHz due to the computation delay and the delay caused by the SVM. The resonance at 5.8 kHz is caused by the LCL filter.

Influence of ηz
The ratio Zg(s)/Zinv(s) between the grid impedance and the inverter impedance is an indicator of the stability of the grid-connected VSI [27,33]. Figure 11 shows the Bode plot of Zinv(s) and Zg(s) for a strong grid with an inductance of 130 µH.   phase starts to drop significantly above 1 kHz due to the computation delay and the delay caused by the SVM. The resonance at 5.8 kHz is caused by the LCL filter.

Influence of ηz
The ratio Zg(s)/Zinv(s) between the grid impedance and the inverter impedance is an indicator of the stability of the grid-connected VSI [27,33]. Figure 11 shows the Bode plot of Zinv(s) and Zg(s) for a strong grid with an inductance of 130 µH.

Influence of η z
The ratio Z g (s)/Z inv (s) between the grid impedance and the inverter impedance is an indicator of the stability of the grid-connected VSI [27,33]. Figure 11 shows the Bode plot of Z inv (s) and Z g (s) for a strong grid with an inductance of 130 µH. The stability criterion discussed in [27,33] dictates that the phase difference of Zinv(s) and Zg(s) must not exceed 180° at the frequency where their magnitudes intersect. The intersection of |Zinv(s)| and |Zg(s)| in Figure 11 occurs around the resonance of the LCL filter; i.e., as far as stability is concerned, the filter is the critical element under varying grid conditions. To evaluate the robustness of the system with respect to grid impedance variation, the theory of the minimum distance was applied to the transfer function Zg(s)/Zinv(s). Figure 12 shows the minimal distance ηz as a function of kp and kr,1. A high gain kp decreases stability significantly, whereas the influence of kr,1 on the impedance-based stability criterion is by far less important. Again, the black plane indicates the minimum of 0.3 that was imposed.

Influence of Lg
As mentioned before, grid impedance Lg plays a major role for the inverter-grid system stability. In Figure 13, we assume a grid impedance reference as a pure inductor of 130 µH. According to [27], the theoretical maximal grid impedance value for a stable operation of grid-inverter system is about 320 µH, which is quite low for a grid-connected inverter. The main reason is the limited damping of the passive LCL filter. Figure 13 may be used in conjunction with Figure 8 to select the set of controller parameters, as an alternative to the proposed maximum distance criteria (see section example of the iterative design procedure results). The stability criterion discussed in [27,33] dictates that the phase difference of Z inv (s) and Z g (s) must not exceed 180 • at the frequency where their magnitudes intersect. The intersection of |Z inv (s)| and |Z g (s)| in Figure 11 occurs around the resonance of the LCL filter; i.e., as far as stability is concerned, the filter is the critical element under varying grid conditions. To evaluate the robustness of the system with respect to grid impedance variation, the theory of the minimum distance was applied to the transfer function Z g (s)/Z inv (s). Figure 12 shows the minimal distance η z as a function of k p and k r,1 . A high gain k p decreases stability significantly, whereas the influence of k r,1 on the impedance-based stability criterion is by far less important. Again, the black plane indicates the minimum of 0.3 that was imposed. The stability criterion discussed in [27,33] dictates that the phase difference of Zinv(s) and Zg(s) must not exceed 180° at the frequency where their magnitudes intersect. The intersection of |Zinv(s)| and |Zg(s)| in Figure 11 occurs around the resonance of the LCL filter; i.e., as far as stability is concerned, the filter is the critical element under varying grid conditions. To evaluate the robustness of the system with respect to grid impedance variation, the theory of the minimum distance was applied to the transfer function Zg(s)/Zinv(s). Figure 12 shows the minimal distance ηz as a function of kp and kr,1. A high gain kp decreases stability significantly, whereas the influence of kr,1 on the impedance-based stability criterion is by far less important. Again, the black plane indicates the minimum of 0.3 that was imposed.

Influence of Lg
As mentioned before, grid impedance Lg plays a major role for the inverter-grid system stability. In Figure 13, we assume a grid impedance reference as a pure inductor of 130 µH. According to [27], the theoretical maximal grid impedance value for a stable operation of grid-inverter system is about 320 µH, which is quite low for a grid-connected inverter. The main reason is the limited damping of the passive LCL filter. Figure 13 may be used in conjunction with Figure 8 to select the set of controller parameters, as an alternative to the proposed maximum distance criteria (see section example of the iterative design procedure results).

Influence of L g
As mentioned before, grid impedance L g plays a major role for the inverter-grid system stability. In Figure 13, we assume a grid impedance reference as a pure inductor of 130 µH. According to [27], the theoretical maximal grid impedance value for a stable operation of grid-inverter system is about 320 µH, which is quite low for a grid-connected inverter. The main reason is the limited damping of the passive LCL filter. Figure 13 may be used in conjunction with Figure 8 to select the set of controller parameters, as an alternative to the proposed maximum distance criteria (see section example of the iterative design procedure results).

Experimental Results
The aim of the tests was mainly to compare PR and PMR controllers. The controller transfer function was discretized using the Tustin method. In order to reduce the influence of the computational delay, the inverter sampling time has been shifted by half of a PWM period. First of all, PR and PMR controller behavior (see Table 2) was tested with a measured harmonic grid voltage distortion of 2.47%. After that, additional voltage harmonics of the 5th, 7th, 11th, and 13th order were added to the grid voltage using a three-phase low voltage serial regulator [34]. For the second scenario, a harmonic voltage distortion of 6.83% was reached. The tests were carried out with a grid inductance of 130 µH. Figures 14 and 15 show the results of the first and second scenarios. The corresponding current spectra are shown in Figure 16. Even with the linear reduction of the resonance gain for higher order harmonics (see the section on harmonics gain definition), the resonant controller achieves a significant reduction in 11th-and 13th-order harmonics. Table 3 shows the measured total harmonic distortion with the different control structures considering harmonics up to 2 kHz.

Experimental Results
The aim of the tests was mainly to compare PR and PMR controllers. The controller transfer function was discretized using the Tustin method. In order to reduce the influence of the computational delay, the inverter sampling time has been shifted by half of a PWM period. First of all, PR and PMR controller behavior (see Table 2) was tested with a measured harmonic grid voltage distortion of 2.47%. After that, additional voltage harmonics of the 5th, 7th, 11th, and 13th order were added to the grid voltage using a three-phase low voltage serial regulator [34]. For the second scenario, a harmonic voltage distortion of 6.83% was reached. The tests were carried out with a grid inductance of 130 µH. Figures 14 and 15 show the results of the first and second scenarios. The corresponding current spectra are shown in Figure 16. Even with the linear reduction of the resonance gain for higher order harmonics (see the section on harmonics gain definition), the resonant controller achieves a significant reduction in 11th-and 13th-order harmonics. Table 3 shows the measured total harmonic distortion with the different control structures considering harmonics up to 2 kHz.

Experimental Results
The aim of the tests was mainly to compare PR and PMR controllers. The controller transfer function was discretized using the Tustin method. In order to reduce the influence of the computational delay, the inverter sampling time has been shifted by half of a PWM period. First of all, PR and PMR controller behavior (see Table 2) was tested with a measured harmonic grid voltage distortion of 2.47%. After that, additional voltage harmonics of the 5th, 7th, 11th, and 13th order were added to the grid voltage using a three-phase low voltage serial regulator [34]. For the second scenario, a harmonic voltage distortion of 6.83% was reached. The tests were carried out with a grid inductance of 130 µH. Figures 14 and 15 show the results of the first and second scenarios. The corresponding current spectra are shown in Figure 16. Even with the linear reduction of the resonance gain for higher order harmonics (see the section on harmonics gain definition), the resonant controller achieves a significant reduction in 11th-and 13th-order harmonics. Table 3 shows the measured total harmonic distortion with the different control structures considering harmonics up to 2 kHz.

Conclusions
The PMR controller is a well-known, easy, and an effective strategy to reduce current harmonics of a current-controlled VSI in a selective manner. It targets both harmonics caused by grid voltage distortion and harmonics caused by non-linear effects in the current control loop of the inverter itself. In order to reduce the number of parameters to be tuned, the choice of harmonic resonant coefficients has been made to be inversely proportional to the value of the fundamental harmonic coefficient. Then the design of the current controller has been performed by taking into account the inverter-grid stability issue. The obtained controller was implemented and successfully tested in a 10 kW threephase grid-connected VSI with an LCL filter. Depending on grid voltage conditions, current harmonic distortion was reduced by 1.0 or 3.9 percentage points, respectively, compared to a PR controller.

Conclusions
The PMR controller is a well-known, easy, and an effective strategy to reduce current harmonics of a current-controlled VSI in a selective manner. It targets both harmonics caused by grid voltage distortion and harmonics caused by non-linear effects in the current control loop of the inverter itself. In order to reduce the number of parameters to be tuned, the choice of harmonic resonant coefficients has been made to be inversely proportional to the value of the fundamental harmonic coefficient. Then the design of the current controller has been performed by taking into account the inverter-grid stability issue. The obtained controller was implemented and successfully tested in a 10 kW threephase grid-connected VSI with an LCL filter. Depending on grid voltage conditions, current harmonic distortion was reduced by 1.0 or 3.9 percentage points, respectively, compared to a PR controller.