An Optimized Parameter Design Method for Passivity-Based Control in a LCL-Filtered Grid-Connected Inverter

Nowadays, the Passivity-Based Control (PBC) has been successfully applied to digitally controlled Grid-Connected Inverter (GCI) with LCL filter. As a nonlinear method, the PBC controller has strong robustness against the parameter drift of the LCL filter and the grid impedance, where the parameters of the PBC controller still need to be designed carefully to achieve a good control performance. The existing design methods are based on separating the PBC controller into three control loops. Therefore, the design process is cumbersome, especially for inexperienced engineers, due to the complex structure of the PBC controller. In this article, an intelligent Particle Swarm Optimization (PSO) algorithm is utilized to simplify the parameters design of the PBC controller, where the difficulty of manual calculations is avoided and the parameters can be more easily and efficiently obtained using MATLAB in offline mode. Furthermore, a Kalman filter observer is adopted to estimate the state variables in the PBC controller, where only the grid-injected current needs to be sampled in the overall GCI system. Simulations and experiments are provided to verify the correctness and effectiveness of the proposed PBC controller design method.


I. INTRODUCTION
With the concern of the environment, the renewable energy has attracted more and more attentions. The Grid-Connected Inverter (GCI) is an important interface unit inserted between renewable energy and the grid [1], where a power filter, such as L, LC, and LCL, is also indispensable to suppress the harmonic current generated by the high frequency switching. Compared with the L and LC filter, the LCL filter is often utilized in industry, owing to its better harmonic attenuation performance and lower cost [2], [3].
To achieve the excellent control performance of LCL filtered GCI, PI-Based Control [4] and Proportional-Resonance Control [5], [6] are commonly adopted as linear controllers, The associate editor coordinating the review of this manuscript and approving it for publication was Elisabetta Tedeschi .
providing the high control gain and tracking the reference without steady-state error. However, the whole system often suffers from the resonance, which may seriously deteriorate its stability. In order to suppress the possible resonance, passive or active damping methods have been widely adopted [7]- [9]. Note that the damping methods can effectively ensure the stability of system, but at extra costs. For example, the passive damping consumes the extra power of the system, while the active damping increases the numbers of sensors.
Nowadays, owing to the more and more powerful processors with the high computational capacity, many nonlinear control strategies, such as Predictive Control [10]- [12], Slide Model Control [13], [14], Adaptive Control [15], [16] and Passivity-Based Control (PBC) [17], [18] have been applied to GCI. Among the nonlinear control strategies, the PBC has strong robustness against external perturbations and parameter variations. The stability of the GCI/electric-grid interconnection is ensured, by rendering the system to be passive [19]. The PBC has attracted considerable interests from many scholars.
It is worth noting that the passivity theory is also adopted by linear controllers [20], where the LCL-filtered GCI with linear controllers is equivalent to an admittance model and the stability of the system is analyzed by the frequency-domain passivity theory. Although this method is different from the PBC controller design approach based on Euler-Lagrange (EL) model in this paper, it is a good method for analyzing system stability.
In [21], a PBC controller with three control loops was proposed, which guaranteed high-quality the grid-injected current and had strong robustness against system parameter changes and external perturbations. As an important factor, the damping gains of the PBC controller determine the control performance. However, the appropriate damping gains are very difficult to find due to the complex structure of the PBC controller. In practical applications, the trial-and-error method is often adopted. In [18], a step-by-step parameters design method was proposed to select the damping gains of PBC controller, where the three control loops are separated from inside to outside and the inherent steady-state error of grid-injected current is effectively limited. Although the damping gains designed by this method provide good steadystate performance and guarantee robustness against parameter variations, the design process of this method is a little cumbersome.
The artificial intelligence techniques have been improved significantly during the last years. Among them, the Particle Swarm Optimization (PSO) algorithm is gradually adopted to design the parameters of controllers, due to its flexibility, simplicity and ease of use. In [22], the PSO algorithm was employed to search for the optimal settings of operating parameters of PI controllers, filter, and power sharing coefficients such that satisfactory system performance is achieved under different disturbances. In [23], the weighting matrix for the LQR was optimized using the PSO algorithm, which made the tuning procedure simpler in comparison to the often reported trial-and-error method for determining the weighting matrix. The automated parameter-search method by PSO algorithm ignores the complex structure of the controller and obtains the optimal parameters by continuously updating the fitness function [24]. In order to assist the design of PBC controller, the PSO algorithm will be applied to select the parameters in this article.
In addition, the PBC controller is similar to the full-state feedback control [25], which needs to sample multiple state variables, including inverter-side current, capacitor voltage, grid-injected current and Point of Common Coupling (PCC) voltage. In order to reduce the number of sensors, an observer is required. In [18], [26], a state observer was adopted to estimate state variables, where the values of inverter-side current and capacitor voltage can be observed. Note that, in [27], a Kalman filter observer had been utilized together with only one current sensor, which achieved a good performance of the controller with a low total harmonic current distortion (THD).
In this article, an improved PBC controller combining the PSO algorithm and a Kalman filter observer are proposed for the three-phase LCL-filtered GCI. Compared to the past-proposed control methods for LCL-filtered GCI, the design technique proposed in this article exhibits the following novelty: (i) the parameters design of the PBC controller is optimized by the PSO algorithm to achieve the required transient and steady-state performance of the overall GCI system and (ii) the PBC controller can be implemented with only grid-injected current sensors.
The rest of this article is organized as follows. The mathematical model and conventional PBC controller of the LCLfiltered three-phase GCI will be presented in Section II. Then, in Section III, an improved PBC controller based on the PSO algorithm and a Kalman filter observer are proposed, where optimized parameters of proposed PBC controller can be easily obtained by applying the PSO algorithm, while, additionally, the required number of sensors is reduced by employing a Kalman filter observer. The effectiveness of the proposed PBC controller is verified by simulation in Section IV. In Section V, the performance of the proposed PBC controller is further demonstrated by a 3-kW experimental device. Finally, the conclusions of the paper are drawn in Section VI.

A. EULER LAGRANGE MODEL OF LCL-FILTERED GCI
A full configuration of the GCI with an LCL filter and the proposed control structure are shown in Fig. 1, where L 1 , L 2 and C are the inverter-side inductor, the grid-side inductor and the capacitor, respectively; R 1 and R 2 are parasitic resistors; L g is the equivalent grid inductor; i 1 and i 2 are the inverter-side current and the grid-injected current, respectively; u a-b-c , u c and v pcc are the inverter output voltage, the capacitor voltage and the PCC voltage, respectively. The driving signal is obtained through Space Vector Pulse Width Modulation (SVPWM) technique. A constant dc-link voltage U dc is assumed, due to that the dc dynamics are quite slow and are reasonably neglected [28].
Based on the two-phase static coordinate α-β, the mathematical equations of an LCL-filtered GCI are the following: (1) VOLUME 8, 2020 In order to exploit the passivity property of LCL-filtered GCI, the mathematical equation (1) is equivalently represented in the Euler Lagrange (EL) model as follows:

B. PASSIVITY OF THE LCL-FILTERED GCI
In order to apply the PBC controller to the LCL-filtered GCI, it is necessary to verify the passivity of the LCL-filtered GCI. The storage energy function of system is defined as Then, the time derivative of the storage energy function can be obtained aṡ According to the passive theory [29], the equation (4) is transformed into an integral equation as It can be seen that t 0 x T udt represents the energy supplied to the system; t 0 x T Rxdt represents the dissipated energy in the system; H [x(t)] − H [x(0)] represents the energy stored inside the system. It denotes that the total energy stored is not higher than the energy supplied. Thus, the LCL-filtered GCI is strictly passive.

C. CONVENTIONAL PBC CONTROLLER
Since the LCL-filtered GCI has been proven to be a passive system, the conventional PBC controller can be deduced as follows.
Firstly, the desired equilibrium points are defined as , and the error vector can be expressed as Then, by substituting (6) into (2), the error equation can be obtained as In order to quickly converge x to x * , the damping R d = diag r 3 r 3 r 2 r 2 r 1 r 1 is added to the error equation, where r 1 , r 2 , r 3 > 0. The error equation (7) is rewritten as According to (8), the left side of the equation is equal to zero when the error vector x e tends to zero. Thus, the conventional PBC controller of LCL-filtered GCI can be obtained as In order to analyze the asymptotic stability, an error energy (Lyapunov) function is defined as From (8), the left side of the equation can be rewritten as Thus, the time derivative of the error energy function can be obtained aṡ Since M and (R + R d ) are both positive definite diagonal damping matrices, the conditions of H e (x) > 0,Ḣ e (x * ) = 0 andḢ e (x) < 0 are satisfied. The error energy function can asymptotically converge to zero, according to the Lyapunov stability criterion [30]. Note that, the damping of R d determines the convergence rate of H e (x). A small value of R d will make the error converge slowly, while a large value may cause system to oscillate. Therefore, a suitable design of the damping of R d needs to be addressed. Finally, by expanding (9), the controller is described in detail as follows: The equivalent system diagram of the conventional PBC controller is plotted in Fig. 2, where e −1.5T s s represents 1.5T s time delay associated with the calculation and pulse width modulation (T s is the inverter sampling period). In order to distinguish control parameters and actual parameters, the parameters (L 1 , L 2 , C) in the controller are marked with subscript ''e''. Since the β-axis component has the same structure with the α-axis one, only the α-axis component is shown.

III. PROPOSED PBC CONTROLLER A. ELIMINATING THE STEADY STATE ERROR
In practical applications, due to disturbances caused by the external environment, the conventional PBC controller may exhibit a steady-state error. In order to eliminate the steadystate error, many modified PBC methods were adopted, such as the disturbance observer [31], the proportional-integral (PI) regulator [18], [32] and the proportional-resonant (PR) regulator [33] etc. According to [34], it can be known that a PR regulator can better track a sinusoidal current reference than a PI regulator. In this article, a proportional-resonant regulator is employed instead of the damping r 1 of a conventional PBC controller in order to eliminate the steady-state error. The transfer function of the PR regulator is expressed as where k P and k r are gain coefficients, and ω 0 is the fundamental angular frequency.

B. PARAMETERS DESIGN USING PSO ALGORITHM
From equation (13) and (14), it can be seen that the performance of the PBC controller is determined by the parameters k P , k r , r 2 and r 3 . In order to obtain high control performance and convenient design parameters, the PSO algorithm is used to design the parameters of the PBC controller. The PSO algorithm is an iterative optimization algorithm, which uses a set of particles to find the global minimum of the fitness function in D-dimensional space. Each particle has two characteristics: position P i , velocity v i , where i is the i th particle. The position represents the solution of the optimization problem, which is described as P i = [ p i1 p i2 · · · p id · · · p iD ]. The velocity represents the distance that the particle needs to move in each iteration, which is described as In the process of particle movement, each particle will remember the position where it personally encountered the most fitness. This position with the best fitness B i = [ b i1 b i2 · · · b id · · · b iD ] is known as the personal best (p best ). Moreover, the global best position (g best ) G = [ g 1 g 2 · · · g d · · · g D ] is also obtained by comparing the pbest values of entire particle swarm.
In the D-dimensional space, the position and the velocity of the entire particle swarm are updated during each iteration, as follows: where w is inertial weight; λ 1 and λ 2 are random numbers in the interval [0, 1]; c 1 and c 2 are scaling factors that determine the relative relationship of p best and g best ; n is the n th iteration; d is the d th dimension. The basic idea of the PSO algorithm is that the particles adjust the position and the velocity according to equation (15) in each iteration, while optimal value of each individual's original memory is retained. By comparing the p best and g best of the particle swarm in each iteration, the most fitness of particle is selected. In this article, the position of the particles is represented by the parameters of the controller (k P , k r , r 2 and r 3 ). The dimension D is determined to be 4 according to the number of parameters. The fitness function is defined as ; k 1 , k 2 and k 3 is the weight coefficient. Since the grid-injected current is used as the important factor in GCI, k 1 , k 2 and k 3 of the weight coefficient are set to 0.8, 0.1 and 0.1, respectively.
The flow chart of the PSO algorithm are depicted in Fig. 3. The detailed steps of the PSO algorithm are described as follows: 1) The number of particles, the number of iterations, inertial weight w, random numbers λ 1 , λ 2 , and scaling factors c 1 , c 2 are determined. The position and velocity of each particle are randomly initialized. 2) The fitness of each particle is evaluated. The position and fitness of each particle are stored in the particle's p best . For the particle with the best value of p best in the entire particle swarm, the position and fitness function value of this particle are stored as the g best . 3) According to equation (15), the position and velocity of each particle are updated. 4) The new fitness function value of each particle is evaluated. If the new fitness function value is better than the particle's p best value, the particle's p best value is updated with the current position and fitness function value. 5) For the particle swarm, the new g best value is also obtained. If the fitness function value of the new g best is better than the fitness function value of the existing g best , the value of g best is updated with the current position and fitness function value of new g best . 6) The steps 3 to 5 are repeated until n reaches the maximum number of iterations or the preset position accuracy is met.

C. REDUCING THE NUMBER OF SENSORS
From Fig. 2, it should be noted that the PBC controller needs to sample the full status, including inverter-side current, capacitor voltage, grid-injected current and PCC voltage. The sampled state variables require many sensors, which increases system cost. In order to reduce the number of sensors, the use of a Kalman filter observer is proposed in this article to estimate the state variables. Only the grid-injected current is retained as a sampling signal, while inverter-side current, capacitor voltage and PCC voltage can be estimated by the Kalman filter observer.
In the Kalman filter algorithm, the state-space form of mathematical equation (1) is expressed as (17). Due to the symmetrical system structure, only the α-axis is shown. The state vector is redefined as where v q pccα is the quadrature component of the voltage of v pccα . where and ω g is the grid angular frequency.
By discretizing the state-space equations (17), it can be obtained that where A 1 = e AT s , B 1 = T s 0 e Aτ dτ B, T s is sample period, k is the discrete sampling instant. ω(k) and v(k) are the process and measurement noise vectors, respectively.
The covariance matrices of ω(k) and v(k) are expressed as

Q(k) = E[ω(k)ω(k) T ], R(k) = E[ν(k)ν(k) T ]. (19)
The error covariance matric of x α (k) are defined as p α (k). In the current step, the first prediction valuex α (k/k − 1) of the state vector and its corresponding error covariance matriĉ p α (k/k − 1) can be obtained by the previous prediction value, which are expressed as Then, the final estimatesx α (k) of the state vector and its corresponding error covariance matricp α (k) can be determined as where T (k), the Kalman filter gain, is calculated recursively to minimize the mean square error between the measured values and the predicted values [35], which is used to update the state vector and error covariance matrix at each time step. The Kalman filter gain is defined as In order to further understand the Kalman filter observer, the block diagram of the Kalman filter observer is shown in Fig. 4, where the covariance matrices Q and R are both determined as 0.1.

IV. SIMULATION RESULTS
In order to verify the effectiveness of the proposed strategy, simulation tests on the GCI with an LCL filter are carried out in MATLAB/Simulink environment. The parameters of a 3-kW LCL-filtered GCI and the PSO algorithm are listed in Table 1.

A. PARAMETERS SELETED BY PSO ALGORITHM
According to the Fig. 3 and Table 1, simulation of the PSO algorithm is implemented to optimize the parameters k p , k r , r 2 and r 3 . During the optimization process, the VOLUME 8, 2020 parameters of controller are updated in each iteration and the best parameters are selected based on the fitness function. The results of optimization parameters are shown in Fig. 5. It can be seen that the optimal parameters are: k p = 9.416, k r = 467.882, r 2 = 0.021, r 3 = 0.577.

B. ROBUSTNESS ANALYSIS AGAINST PARAMETERS SHIFT OF LCL FILTER
In order to verify the robustness of the PBC controller, the pole maps of the closed-loop transfer function G of the whole system is depicted in Fig. 6. Since the integral FIGURE 6. Pole maps of the closed-loop transfer function. (a) L 1 varies from 50% to 150%, (b) C varies from 50% to 150%, (c) L 2 varies from 50% to 500%. coefficient k r and parasitic resistors R have little effect on stability of system, they can be ignored to simplify the calculation. The detailed expressions of the closed-loop transfer function G can be found in the appendix. L 1 varies in the range of 0.6 mH-1.8 mH (50%∼150% of L 1 ), C varies in the range of 3 µF-9 µF (50%∼150% of C) and L 2 varies in the range of 0.6 mH-6 mH (50%∼500% of L 2 ), respectively. In each case, only one parameter in the LCL filter varies. From Fig. 6, it can be seen that all closed-loop poles of system are located inside the unity circle, which means that the PBC controller using the parameters designed by PSO has strong robustness against parameters variation.

C. TRANSIENT RESPONSES UNDER THE STEP CHANGE
To verify the effectiveness of the parameters provided by PSO algorithm, the simulation of the proposed PBC controller is carried out. In addition, the parameters designed by [18] (k p = 8, k i = 800, r 2 = 0.02, r 3 = 4) is also used as a comparative experiment. Fig. 7 shows the transient responses of the grid-injected current controlled by the proposed PBC and conventional PBC on d-q axis, where the current reference starts from 6.43 A step to 12.86 A at t = 0.20 s.
It can be seen that the overshoot (σ ) and settling time (t s ) of the conventional PBC are about 20.76 % and 0.002 s, respectively; the overshoot (σ ) and settling time (t s ) of the proposed PBC are about 20.54 % and 0.001 s, respectively. Compared with the conventional PBC, the parameters of the PBC controller selected by PSO algorithm can achieve almost the same dynamic performance. This confirms that PSO algorithm is an effective method to design the parameters of the PBC controller.

D. STEADY-STATE WAVEFORMS AT DIFFERENT RATED POWER
This test is conducted to verify the steady-state performance of the grid-injected current under different rated power levels. Table 2 records the experimental conditions of three cases and corresponding controller parameters obtained by the PSO algorithm. The simulated results of the grid-injected current are shown in Fig. 8. It can be observed that the grid-injected currents remain sinusoidal waveforms with zero steady-state error, whose THDs are about 2.24%, 3.22%, 2.20%, respectively. This confirms that the grid-injected current can be well controlled by the proposed PBC controller at different rated power levels.

E. ESTIMATION EVALUATION OF KALMAN FILTER OBSERVER
This test is conducted to verify the performance of the Kalman filter observer. The inverter-side current i 1 , the capacitor voltage u c and the PCC voltage v pcc estimated by the Kalman filter observer, respectively, are shown in Fig. 9. In addition, to show the superior performances of the Kalman filter observer, the actual values are also measured and presented in Fig. 9.
From Fig. 9, it can be seen that the values estimated by the Kalman filter observer are almost the same as the measured ones. Thus, the use of a Kalman filter observer is a feasible design method for the PBC controller.

V. EXPERIMENTAL VERIFICATIONS
In order to further verify the effectiveness of the proposed method, a 3kW/3-phase/110V grid-connected inverter setup was constructed for experiments, which is shown in Fig. 10. Chroma 62150H-600S DC power supply provide a dc-link voltage. The digital control algorithm is implemented in dSPACE 1202 microlabbox. The waveforms of grid voltage and grid-injected current were measured with a Yokogawa DL 1640 digital oscilloscope. The parameters of experiments are also listed in Table 1.

A. STEADY-STATE PERFORMANCE IN STIFF GRID
The experimental steady-state waveforms of the grid voltage and the grid-injected current under the condition of stiff grid ((L g = 0 mH) are depicted in Fig. 11. In addition, the conventional PBC in [18] was also implemented and tested as   a comparative experiment. It can be seen that both of them can achieve unit power factor and zero steady-state error. The proposed PBC controller with Kalman filter observer can ensure the quality of the grid-injected current, where its total harmonics distortion (THD) is about 1.43%.

B. TRANSIENT RESPONSE IN WEAK GRID
In actual applications, the electric grid usually has an equivalent grid inductor, which may change in over a large range. To verify the transient response of the proposed control method in the presence of the grid inductance, the external inductors (L g = 4.8 mH) were connected and the current reference value steps was reduced down from 12.86 A to 6.43 A. Fig. 12 shows the measured grid-injected currents of the proposed PBC and the conventional PBC, respectively, under the a weak grid condition. It can be seen that both of them are able to accurately track the reference current. The transient response, with a settling time of approximately 4 ms under proposed PBC is faster than that of conventional PBC. In addition, the oscillation under proposed PBC is smaller than conventional PBC. This demonstrates that the proposed PBC controller exhibits better transient performance against the grid impedance variations.

C. ROBUSTNESS TO THE PARAMETER VARIATION
The following experiment is performed to investigate the sensitivity of the grid-injected current against the parameter uncertainties. The inverter-side inductor L 1 decreases from  1.2 mH to 0.8 mH (33.3% dips), the grid-side inductor L 2 drops from 1.2 mH to 0.8 mH (33.3% dips), the filtering capacitor C reduces from 6 µF to 5.7 µF (5% dips), simultaneously. The experimental waveforms of the grid-injected current and grid voltage are shown in Fig. 13. It can be seen that the grid-injected current still be stable and achieve zero steady-state error, which means that the proposed PBC has strong robustness against the parameter variations. VOLUME 8, 2020

D. ABILITY TO REJECT THE GRID DISTURBANCES
In practice, harmonic voltages often exist in the power grid, which will affect the waveform of the grid-injected current. In order to suppress them, the harmonics of the electric grid voltage are considered as extended state variables in the observer model according to [36], [37]. When the grid voltage is distorted by the 3rd, 5th, 7th harmonics, whose magnitudes with respect to the grid fundamental voltage are all 3%, the grid voltage and the grid-injected current under a weak grid condition (L g = 3.6 mH) are shown in Fig. 14. It can be observed that the grid-injected current exhibits a good sinusoidal waveform and the harmonics of the grid voltage has been successfully attenuated. In addition, to further prove the ability of the proposed PBC to reject the grid disturbances, the experimental steady-state waveform of the grid-injected current and the unbalanced grid voltage when the grid impedance L g is 4.8 mH and the grid voltage is reduced by 25% in Phase A, are shown in Fig. 15.

VI. CONCLUSION
In this article, the operating parameter values of the PBC controller of a three-phase LCL-filtered GCI are derived by applying the PSO algorithm. Moreover, a Kalman filter observer is adopted to effectively reduce the number of sensors. The conclusions can be summarized as follows: 1) The parameter values of a PBC controller (including a PR regulator) can be successfully obtained by applying the PSO algorithm, which is more convenient and easier to use than the method introduced in [18], especially for inexperienced engineers.
2) The proposed PBC controller only uses grid-injected current sensors and has slightly better control performance than the conventional one.
3) The proposed PBC still has also very strong robustness against the parameter variations and external disturbance. All the analysis has been successfully verified through simulations and experiments on a 3-kW/ 50Hz/110V/ three-phase laboratory setup. Researcher at the Department of Energy Technology, Aalborg University, Aalborg, Denmark. Since January 2012, he has been an Assistant Professor with the Department of Electronic and Computer Engineering, Technical University of Crete. His research interests include the design of power converters and microelectronic energy management systems for renewable energy sources applications and the design optimization of photovoltaic power plants. Since April 2011, he has been serving as a member of the Editorial Board of the Renewable Energy Journal.