With the increasing penetration of renewable energy distributed generation (DG) sources, grid connected inverters have become critical components in systems such as photovoltaic and wind power generation. These grid connected inverters interact with the grid, potentially causing unstable harmonic amplitudes in current and voltage. Harmonic instability can lead to severe distortion in the AC bus voltage of inverters, ultimately affecting the normal operation of renewable energy integration systems. Since grid connected inverters generate significant harmonics during grid connection, filters must be introduced between the inverter and the grid to limit harmonic flow into the grid. Compared to L and LC filters, LCL filters are widely used in renewable energy systems due to their superior high-frequency attenuation characteristics, compact size, and low cost. Therefore, to improve grid current quality, enhance filtering performance, and reduce filtering costs, it is essential to rationally design LCL filter parameters.
Traditional methods for designing LCL filters, such as trial-and-error approaches, are often inefficient and computationally intensive. While some analytical and graphical methods exist, they may lack precision or overlook key factors like cost and harmonic attenuation. Intelligent optimization algorithms offer a promising alternative, but many existing approaches focus on single-objective optimization, which may not comprehensively address multiple design criteria. In this context, we propose a multi-objective optimization strategy for LCL filter parameters in grid connected inverters, combining an improved butterfly optimization algorithm (LTBOA) with a screening method. This approach ensures that the designed LCL filter meets high-frequency harmonic distortion requirements under both rigid grid and distributed grid conditions while minimizing cost.
In this paper, we first analyze the high-frequency harmonics of the inverter output voltage using double Fourier series, establishing a harmonic model for the grid current. We then design a multi-objective optimization function incorporating five optimization targets, including grid current high-frequency harmonic distortion rate, inductor ratio, total inductance value, resonant frequency constraints, and a cost function. By integrating the LTBOA algorithm with a screening method, we derive optimal LCL parameters. The effectiveness and accuracy of the proposed design method are validated through comparative simulations and experiments.

The structure of a two-level grid connected inverter with an LCL filter is shown in the figure above. Here, \( C_1 \) is the DC-link capacitor, \( Q_n \) (where \( n = 1,2,3,4,5,6 \)) represents the insulated gate bipolar transistors (IGBTs), \( L_1 \) is the inverter-side filter inductor, \( L_2 \) is the grid-side filter inductor, \( C \) is the filter capacitor, and \( L_g \) is the grid impedance. \( U_{dc} \) denotes the DC-link voltage, while \( U_x \), \( U_{px} \), \( i_{L1x} \), and \( i_{gx} \) (with \( x = a,b,c \)) represent the three-phase grid voltage, point of common coupling (PCC) voltage, inverter-side current, and grid-side current (i.e., grid current), respectively.
Assuming an ideal balanced grid voltage source, the transfer function between the grid current \( i_{gx} \) and the inverter output phase voltage \( u_{xn} \) is given by:
$$ G(s) = \frac{i_{gx}(s)}{u_{xn}(s)} = \frac{1}{L_1 L_2 C s^3 + (L_1 + L_2) s} = \frac{1}{L_1 L_2 C s} \cdot \frac{1}{s^2 + \omega_r^2} $$
where \( \omega_r \) is the resonant angular frequency of the LCL filter, expressed as:
$$ \omega_r = \sqrt{\frac{L_1 + L_2}{L_1 L_2 C}} $$
For harmonic analysis, we consider a two-level grid connected inverter using sinusoidal pulse width modulation (SPWM). The three-phase modulation waves \( u_a \), \( u_b \), \( u_c \) and the carrier wave \( u_z \) are defined as:
$$ u_a = U_x \sin(\omega_0 t + \phi) $$
$$ u_b = U_x \sin(\omega_0 t + \phi – 2\pi/3) $$
$$ u_c = U_x \sin(\omega_0 t + \phi + 2\pi/3) $$
$$ u_z = \begin{cases}
-\frac{(\omega_c t – 2\pi k – \pi)}{2U_c/\pi} + U_c & \text{for } 2\pi k + \pi \leq \omega_c t \leq 2\pi k + 2\pi \\
\frac{(\omega_c t – 2\pi k)}{2U_c/\pi} + U_c & \text{for } 2\pi k \leq \omega_c t \leq 2\pi k + \pi
\end{cases} $$
where \( U_x \) is the amplitude of the modulation wave, \( \omega_0 \) is the fundamental angular frequency (equal to the grid voltage angular frequency), and \( f_0 \) is the fundamental frequency. Using double Fourier series, the Fourier series expansion of the output phase voltage \( U_{an} \) for the a-phase leg of the grid connected inverter can be derived as:
$$ U_{an}(t) = \frac{U_{dc} M}{2} \sin \omega_0 t + \frac{2U_{dc}}{\pi} \sum_{m=1,3,5,\ldots}^{+\infty} \frac{1}{m} J_0\left(\frac{m M \pi}{2}\right) \sin \frac{m\pi}{2} \cos m\omega_0 t + \frac{2U_{dc}}{\pi} \sum_{m=1,3,5,\ldots}^{+\infty} \sum_{n=\pm 2, \pm 4, \pm 6, \ldots}^{+\infty} \frac{1}{m} J_n\left(\frac{m M \pi}{2}\right) \sin \frac{m\pi}{2} \cos(m\omega_c t + n\omega_0 t) + \frac{2U_{dc}}{\pi} \sum_{m=2,4,6,\ldots}^{+\infty} \sum_{n=\pm 1, \pm 3, \pm 5, \ldots}^{+\infty} \frac{1}{m} J_n\left(\frac{m M \pi}{2}\right) \cos \frac{m\pi}{2} \sin(m\omega_c t + n\omega_0 t) $$
From this, the high-frequency harmonic amplitude of the inverter output phase voltage \( U_{an} \) can be obtained. The grid current harmonic \( i_{gx}(j\omega_{mn}) \) at the \( m(f_{sw}/f_0) \pm n \)-th harmonic frequency, with angular frequency \( \omega_{mn} \), is related to the inverter output phase voltage harmonic \( u_{xn}(j\omega_{mn}) \) by:
$$ \frac{i_{gx}(j\omega_{mn})}{u_{xn}(j\omega_{mn})} = \frac{1}{L_1 L_2 C (j\omega_{mn})^3 + (L_1 + L_2) j\omega_{mn}} $$
The amplitude of the \( m(f_{sw}/f_0) \pm n \)-th grid current harmonic is:
$$ |i_{gx}(j\omega_{mn})| = \frac{|u_{xn}(j\omega_{mn})|}{|(L_1 + L_2) \omega_{mn} – L_1 L_2 C \omega_{mn}^3|} $$
Thus, the harmonic distortion rate for this component is:
$$ D_{i_{gx}} = \frac{|i_{gx}(j\omega_{mn})|}{I_{g0}} \times 100\% = \frac{|u_{xn}(j\omega_{mn})|}{I_{g0} |(L_1 + L_2) \omega_{mn} – L_1 L_2 C \omega_{mn}^3|} \times 100\% $$
where \( I_{g0} \) is the fundamental grid current amplitude. This analysis highlights the importance of LCL filter parameters in attenuating high-frequency harmonics from the grid connected inverter.
To optimize the LCL filter parameters, we employ an improved butterfly optimization algorithm (LTBOA). The standard butterfly optimization algorithm (BOA) is a nature-inspired metaheuristic that simulates the foraging behavior of butterflies. However, it may suffer from uneven population distribution and slow convergence. Our improvements include:
- Latin Hypercube Sampling for Population Initialization: This ensures that the initial butterfly positions are uniformly distributed across the search space, enhancing exploration and avoiding premature convergence.
- Dynamic Switching Probability: The switching probability \( p_t \) between global and local search is adjusted dynamically as:
$$ p_t = 0.3 \left( \frac{t}{T} – 1 \right) + 0.8 $$
where \( t \) is the current iteration and \( T \) is the maximum iteration count. This balances exploration and exploitation over the optimization process. - Nonlinear Fitness Weighting: A nonlinear weight coefficient \( w(t) \) is introduced to accelerate convergence:
$$ w(t) = 0.05 + 0.25 \sin\left( \frac{t}{T_{\text{max}}} \cdot \frac{\pi}{2} \right) $$
The global and local search equations are modified as:
$$ x_i^{t+1} = w(t) \left[ x_i^t + (r^2 g^* – x_i^t) f_i \right] $$
$$ x_i^{t+1} = w(t) \left[ x_i^t + (r^2 x_j^t – x_k^t) f_i \right] $$
where \( x_i^t \), \( x_j^t \), and \( x_k^t \) are positions of butterflies, \( g^* \) is the best solution found, \( r \) is a random number in [0,1], and \( f_i \) is the fragrance of butterfly \( i \).
We compare LTBOA with the standard BOA and genetic algorithm (GA) using benchmark test functions to validate its efficiency. The test functions and results are summarized below:
| Function | Range | Dimensions | Characteristics | Theoretical Optimum |
|---|---|---|---|---|
| Sphere | [-100, 100] | 40 | Unimodal | 0 |
| Ackley | [-30, 30] | 40 | Multimodal | 0 |
The convergence curves demonstrate that LTBOA achieves faster convergence and higher accuracy than BOA and GA, making it suitable for optimizing LCL filter parameters in grid connected inverters.
Next, we define the constraints for LCL filter parameters. The total inductance \( L_T = L_1 + L_2 \) must be limited to avoid excessive voltage drop and power factor reduction. The maximum total inductance is:
$$ L_{T_{\text{max}}} = \frac{\sqrt{U_{dc}^2/4 – U_{x_p}^2}}{2\pi f_0 I_{g_p}} $$
where \( U_{dc} \) is the DC-link voltage, \( U_{x_p} \) is the peak phase voltage, and \( I_{g_p} \) is the peak grid current. The inverter-side inductor \( L_1 \) must limit the current ripple \( \Delta I_{L1_p} \) to less than 20% of \( I_{g_p} \), giving the minimum value:
$$ L_{1_{\text{min}}} = \frac{U_{dc} M_r}{4\sqrt{3} \Delta I_{L1_p} f_{sw}} $$
where \( M_r \) is the modulation index and \( f_{sw} \) is the switching frequency. The filter capacitor \( C \) should not introduce reactive power exceeding 5% of the system active power \( P_N \), so:
$$ C_{\text{max}} = \frac{0.05 P_N}{3 \cdot 2\pi f_0 u_{xn_{\text{rms}}}^2} $$
where \( u_{xn_{\text{rms}}} \) is the RMS phase voltage. Thus, the search ranges are: \( L_1 \in (L_{1_{\text{min}}}, L_{T_{\text{max}}}) \), \( L_2 \in (0, L_{T_{\text{max}}}) \), and \( C \in (0, C_{\text{max}}) \).
We formulate a multi-objective optimization function with five targets to design the LCL filter for grid connected inverters:
- High-Frequency Harmonic Distortion (HFTHD): The sum of grid current THD at the switching frequency, its multiples, and sidebands should not exceed a threshold \( D_{th} \) based on IEEE 1547 standards. The fitness value is \( F_{\text{HFTHD}} \).
- Total Inductance Constraint: Ensure \( L_1 + L_2 \leq L_{T_{\text{max}}} \), with fitness \( F_{L_T} \).
- Inductor Ratio: The ratio \( L_2 / L_1 \) should be within a practical range \( p_1 < L_2 / L_1 < p_2 \) to balance filter size and performance. Fitness is \( F_p \).
- Resonant Frequency: The resonant frequency \( f_r \) must lie between 10 times the fundamental frequency and half the switching frequency to avoid low-frequency amplification and high-frequency issues:
$$ 10 f_0 < f_r < 0.5 f_{sw} $$
Fitness is \( F_r \). - Cost Minimization: A cost function accounts for the expenses of inductors and capacitors:
$$ F_{\text{cost}} = a_1 (L_1 + L_2) + a_2 C $$
where \( a_1 \) and \( a_2 \) are cost coefficients with \( a_1 + a_2 = 1 \). Typically, \( a_1 = 0.8 \) and \( a_2 = 0.2 \) due to higher inductor costs.
The total fitness function is:
$$ F_{\text{total}} = F_{\text{HFTHD}} + F_{L_T} + F_p + F_r + F_{\text{cost}} $$
We integrate a screening method with LTBOA to handle these multiple objectives. During optimization, each LCL parameter set is checked against the constraints (Objectives 1-4). If a parameter set satisfies an objective, its fitness component is set to 0; otherwise, it is set to 1. Only parameter sets with \( F_{\text{total}} < 1 \) are considered valid, and the one with the smallest \( F_{\text{total}} \) is selected as optimal. This ensures that the optimized LCL filter meets all performance criteria while minimizing cost.
For grid connected inverters in distributed grids, where grid impedance \( L_g \) is significant, the grid-side inductor \( L_2 \) is adjusted. If the optimized \( L_{2t} \) (including \( L_g \)) is greater than \( L_g \), then \( L_2 = L_{2t} – L_g \); otherwise, \( L_2 = 0 \), and the optimization is repeated for \( L_1 \) and \( C \). This adaptability is crucial for ensuring effective filtering in varying grid conditions.
To demonstrate the optimization process, we consider a grid connected inverter system with the following parameters:
| Parameter | Value |
|---|---|
| DC-link voltage \( U_{dc} \) | 700 V |
| Grid line voltage RMS \( u_x \) | 315 V |
| Grid current \( I \) | 260 A |
| Switching frequency \( f_{sw} \) | 3.2 kHz |
| Sampling frequency \( f_s \) | 12.8 kHz |
| Modulation depth \( M \) | 0.74 |
Using LTBOA with a population size of 100 and 160 iterations, we obtain optimized LCL parameters for a rigid grid: \( L_1 = 0.84 \, \text{mH} \), \( L_2 = 0.18 \, \text{mH} \), and \( C = 60 \, \mu\text{F} \). The convergence plots show stable optimization after 138 iterations, with \( F_{\text{total}} \) remaining below 1, confirming that all constraints are satisfied. For a distributed grid with \( L_g = 0.46 \, \text{mH} \), the optimized parameters are \( L_1 = 0.73 \, \text{mH} \) and \( C = 43 \, \mu\text{F} \), achieving convergence in 19 iterations.
We validate the optimized parameters through simulations in MATLAB/Simulink. For the rigid grid case, the grid current THD is 1.66%, with high-frequency harmonics (at switching frequency and sidebands) summing to 0.3%, compliant with IEEE 1547 standards. For the distributed grid case, the grid current THD is 1.84%, with high-frequency harmonics also at 0.3%. These results indicate that the LCL filter effectively attenuates harmonics while minimizing cost.
Experimental verification is conducted on a two-level grid connected inverter platform. The experimental parameters are:
| Parameter | Value |
|---|---|
| DC-link voltage \( U_{dc} \) | 130 V |
| Grid line voltage RMS \( u_x \) | 315 V |
| Grid current \( I \) | 6 A |
| Inductor \( L_1 \) | 4.8 mH / 4.5 mH |
| Inductor \( L_2 \) | 1.8 mH / 1.6 mH |
| Capacitor \( C \) | 2.9 μF / 3.5 μF |
| Switching frequency \( f_{sw} \) | 5 kHz |
| Sampling frequency \( f_s \) | 10 kHz |
| Modulation depth \( M \) | 0.9 |
The experimental results show smooth grid currents with low ripple, and FFT analysis confirms that high-frequency harmonics meet the 0.3% limit. This validates the practicality of the proposed optimization method for grid connected inverters in both rigid and distributed grids.
In conclusion, we have developed a comprehensive multi-objective optimization strategy for LCL filter parameters in grid connected inverters. By analyzing high-frequency harmonics using double Fourier series and employing an improved butterfly algorithm (LTBOA) combined with a screening method, we achieve optimal LCL designs that satisfy harmonic distortion requirements, inductor constraints, resonant frequency limits, and cost minimization. The method is adaptable to both rigid and distributed grid conditions, ensuring robust performance for grid connected inverters in renewable energy systems. Simulations and experiments demonstrate the effectiveness and accuracy of the approach, offering a reliable tool for enhancing the power quality and efficiency of grid connected inverters.
The proposed optimization framework can be extended to other types of grid connected inverters and filter topologies, providing a foundation for future research in harmonic mitigation and cost-effective filter design. As renewable energy integration continues to grow, such advanced optimization techniques will play a vital role in maintaining grid stability and power quality for grid connected inverters worldwide.
