I have studied the control strategy of a grid-connected solar inverter because the conversion interface between a photovoltaic array and the utility grid determines both the quality of the injected current and the stability of the local distribution network. As renewable generation becomes a larger part of the energy mix, the solar inverter is no longer a simple DC-to-AC converter. It is a controlled power-electronic device that must track a sinusoidal reference, reject periodic disturbances, tolerate parameter drift, and satisfy harmonic limits. My work focuses on a three-phase LCL-filtered solar inverter, and I compare repetitive control, proportional-integral control, sliding-mode control, and a weighted hybrid control method. The main objective is to improve the steady-state accuracy and dynamic response of the solar inverter while reducing the harmonic distortion of the grid current.
The global energy context makes this problem urgent. Fossil-fuel resources are limited, and environmental constraints are becoming stricter. Solar energy is abundant, distributed, and relatively clean, but photovoltaic generation is intermittent and non-dispatchable. A solar inverter must therefore operate over a wide range of input conditions. In addition, many nonlinear loads and power-electronic devices are connected to the same distribution feeder. These devices inject harmonics at the point of common coupling, and the solar inverter must not amplify those harmonics. If the current control of the solar inverter is poor, the grid current can contain low-order harmonics, high-frequency switching ripple, and phase error. These effects reduce power quality and can cause overheating in transformers, capacitors, and motors.
Harmonic distortion can be represented by a Fourier series. For a periodic current \(i(t)\), I write
$$i(t)=I_0+\sum_{h=1}^{\infty} I_h \sin(h\omega_0 t+\phi_h)$$
where \(\omega_0\) is the fundamental angular frequency, \(I_h\) is the amplitude of the \(h\)-th harmonic, and \(\phi_h\) is its phase. The total harmonic distortion of current is defined as
$$THD_i=\frac{\sqrt{\sum_{h=2}^{\infty} I_h^2}}{I_1}\times 100\%$$
For grid-connected solar inverter systems, standards such as IEEE 519 limit the harmonic current injection. I summarize the main odd-harmonic limits in Table 1. These limits guide the design of the current controller and the LCL filter. I also note that the solar inverter must maintain a total harmonic distortion below 5% in many practical designs, although the exact requirement depends on the grid code and the short-circuit ratio at the connection point.
| Harmonic order | Allowed harmonic content |
|---|---|
| \(h<11\) | \(<4\%\) |
| \(11 \le h <17\) | \(<2\%\) |
| \(17 \le h <23\) | \(<1.5\%\) |
| \(23 \le h <35\) | \(<0.6\%\) |
| \(h \ge 35\) | \(<0.3\%\) |
| Total harmonic distortion | \(<5\%\) |
The harmonic problem in a solar inverter is not only caused by the nonlinear loads on the grid. The inverter itself uses switching devices, and the switching process produces high-frequency voltage harmonics. The LCL filter attenuates these harmonics, but the filter introduces a resonant peak. If the resonant peak is not damped, the solar inverter current can oscillate and the system can become unstable. Therefore, I studied the filter topology and damping method before designing the current controller.
Solar Inverter Topologies and Filter Selection
I compared three common filter structures for a solar inverter: the L filter, the LC filter, and the LCL filter. The L filter is a first-order filter. Its transfer function from inverter voltage to grid current is
$$G_L(s)=\frac{i_g(s)}{u_{inv}(s)}=\frac{1}{Ls}$$
The L filter is simple and robust, but its attenuation is only \(-20\) dB per decade. To achieve a low switching ripple, the inductance must be large. A large inductance increases cost, volume, and voltage drop. It also slows the current loop of the solar inverter. The LC filter has a capacitor that provides a low-impedance path for high-frequency current, but the capacitor can resonate with the grid impedance. This resonance is dangerous in a grid-connected solar inverter because the grid impedance varies with the operating condition. Therefore, I did not select the LC filter as the main grid-interface filter.
The LCL filter is a third-order filter. Its ideal transfer function from inverter voltage to grid current is
$$G_{LCL}(s)=\frac{i_g(s)}{u_{inv}(s)}=\frac{1}{L_1L_2Cs^3+(L_1+L_2)s}$$
At high frequency, the LCL filter provides \(-60\) dB per decade attenuation. This means that a smaller total inductance can meet the harmonic limit compared with an L filter. The LCL filter is therefore attractive for a solar inverter because it reduces switching ripple while maintaining a fast current loop. However, the denominator has a pair of complex conjugate poles, which creates a resonant peak. I use passive damping to suppress this peak. The damping resistor can be placed in different branches, and I evaluated six common passive damping arrangements. Table 2 summarizes the qualitative comparison.
| Damping position | Effect on resonance | Loss | High-frequency attenuation | Practical preference |
|---|---|---|---|---|
| Series with \(L_1\) | Strong | High | Reduced | Less common |
| Parallel with \(L_1\) | Moderate | High | Reduced | Less common |
| Series with \(L_2\) | Moderate | Moderate | Reduced | Sometimes used |
| Parallel with \(L_2\) | Moderate | High | Reduced | Less common |
| Series with \(C\) | Strong | Low | Preserved | Preferred |
| Parallel with \(C\) | Strong | Very high | Preserved | Not preferred |
I selected a resistor in series with the filter capacitor because the capacitor branch carries mainly high-frequency current. The fundamental current through the capacitor is small, so the damping loss is lower than in the inductor branches. The damping resistor also does not significantly reduce the low-frequency gain. This choice is important for the solar inverter because the current controller needs sufficient low-frequency loop gain to track the fundamental reference and reject low-order harmonics.

After selecting the LCL structure, I built the mathematical model of the three-phase solar inverter. The topology contains a DC link, a three-phase bridge, an inverter-side inductor \(L_1\), a filter capacitor \(C\), a grid-side inductor \(L_2\), and a three-phase grid. The state variables are the inverter-side currents \(i_a,i_b,i_c\), the capacitor voltages \(u_{ca},u_{cb},u_{cc}\), and the grid-side currents \(i_{ga},i_{gb},i_{gc}\). Using Kirchhoff’s voltage and current laws, I obtain
$$L_1\frac{di}{dt}=u_{inv}-u_c$$
$$C\frac{du_c}{dt}=i-i_g$$
$$L_2\frac{di_g}{dt}=u_c-u_g$$
where \(i=[i_a,i_b,i_c]^T\), \(u_c=[u_{ca},u_{cb},u_{cc}]^T\), \(i_g=[i_{ga},i_{gb},i_{gc}]^T\), and \(u_g=[u_{ga},u_{gb},u_{gc}]^T\). These equations describe the solar inverter in the stationary abc frame. Because the reference current is sinusoidal, I apply the Park transformation to convert the model into the synchronous rotating dq frame. The transformation matrix from abc to dq is
$$T_{3s/2r}=\frac{2}{3}
\begin{bmatrix}
\cos(\omega t) & \cos(\omega t-\frac{2\pi}{3}) & \cos(\omega t+\frac{2\pi}{3})\\
-\sin(\omega t) & -\sin(\omega t-\frac{2\pi}{3}) & -\sin(\omega t+\frac{2\pi}{3})
\end{bmatrix}$$
In the dq frame, the solar inverter model becomes
$$L_1\frac{di_d}{dt}=u_d-u_{cd}+\omega L_1 i_q$$
$$L_1\frac{di_q}{dt}=u_q-u_{cq}-\omega L_1 i_d$$
$$C\frac{du_{cd}}{dt}=i_d-i_{gd}+\omega C u_{cq}$$
$$C\frac{du_{cq}}{dt}=i_q-i_{gq}-\omega C u_{cd}$$
$$L_2\frac{di_{gd}}{dt}=u_{cd}-u_{gd}+\omega L_2 i_{gq}$$
$$L_2\frac{di_{gq}}{dt}=u_{cq}-u_{gq}-\omega L_2 i_{gd}$$
The cross-coupling terms \(\omega L_1 i_q\), \(\omega L_1 i_d\), \(\omega C u_{cq}\), \(\omega C u_{cd}\), \(\omega L_2 i_{gq}\), and \(\omega L_2 i_{gd}\) appear explicitly. For current control, I decouple these terms so that the d-axis and q-axis currents can be regulated independently. This decoupling is essential for a solar inverter because active power and reactive power are controlled through \(i_d\) and \(i_q\), respectively. When the grid voltage is aligned with the d-axis, \(u_{gq}=0\), and the power equations simplify to
$$P=\frac{3}{2}u_{gd}i_d$$
$$Q=-\frac{3}{2}u_{gd}i_q$$
Thus, the current control of the solar inverter directly determines the active and reactive power delivered to the grid. I used this model as the basis for the controller design.
LCL Parameter Design for the Solar Inverter
I designed the LCL filter parameters according to ripple, reactive power, and resonance constraints. The inverter-side inductor \(L_1\) is selected to limit the switching ripple. The maximum ripple current is approximately
$$\Delta i_{L1,\max}=\frac{U_{dc}}{4L_1f_{sw}}$$
I require the ripple to be less than \(15\%\) of the rated peak current \(I_n\). Therefore, the lower bound of \(L_1\) is
$$L_{1,\min}=\frac{U_{dc}}{4\times 15\%\times I_n f_{sw}}$$
The total inductance \(L_T=L_1+L_2\) is limited by the allowable voltage drop. If the voltage drop across the total inductance is limited to \(10\%\) of the grid voltage, then
$$L_{T,\max}=\frac{10\%U_g}{2\pi f_0 I_g}$$
I also use the common design rule that the ratio between \(L_1\) and \(L_2\) is between 3 and 7:
$$3 < \frac{L_1}{L_2} < 7$$
The filter capacitor is selected so that its reactive power is less than \(5\%\) of the rated active power:
$$C_{\max}=\frac{5\%P_N}{\omega_0 U_g^2}$$
The resonance frequency of the LCL filter is
$$f_r=\frac{1}{2\pi}\sqrt{\frac{L_1+L_2}{L_1L_2C}}$$
To avoid interaction with the fundamental and switching frequencies, I constrain the resonance frequency as
$$10f_0 < f_r < 0.5f_{sw}$$
Based on these constraints, I selected \(L_1=2\) mH, \(L_2=0.4\) mH, \(C=11\) \(\mu\)F, \(U_{dc}=600\) V, \(U_g=220\) V, \(f_0=50\) Hz, and \(f_{sw}=10\) kHz. The corresponding resonance frequency is about 2630 Hz, which satisfies the constraint. Table 3 lists the main parameters of the solar inverter model.
| Parameter | Value |
|---|---|
| DC-link voltage \(U_{dc}\) | 600 V |
| Grid phase voltage \(U_g\) | 220 V |
| Fundamental frequency \(f_0\) | 50 Hz |
| Switching frequency \(f_{sw}\) | 10 kHz |
| Inverter-side inductance \(L_1\) | 2 mH |
| Grid-side inductance \(L_2\) | 0.4 mH |
| Filter capacitance \(C\) | 11 \(\mu\)F |
| Resonance frequency \(f_r\) | About 2630 Hz |
Repetitive Control for the Solar Inverter
I used the internal model principle as the foundation for repetitive control. The internal model principle states that if a signal model is embedded in a stable closed-loop system, the system can track that signal with zero steady-state error. For a periodic disturbance with period \(T\), the continuous internal model is
$$G_{im}(s)=\frac{e^{-sT}}{1-e^{-sT}}$$
In a digital implementation, the repetitive controller uses a discrete delay of \(N\) samples, where \(N=T/T_s\). The traditional internal model is
$$G_{im}(z)=\frac{z^{-N}}{1-z^{-N}}$$
This model has poles on the unit circle. Although it provides infinite gain at the harmonic frequencies, it is marginally stable. Small parameter variations can make the solar inverter unstable. To improve stability, I use a filtered internal model:
$$G_{im}(z)=\frac{Q(z)z^{-N}}{1-Q(z)z^{-N}}$$
where \(Q(z)\) is either a low-pass filter or a constant slightly less than one. I selected \(Q(z)=0.95\). This moves the poles slightly inside the unit circle and improves robustness. The repetitive controller includes a compensator \(C(z)\):
$$C(z)=K_r z^k S(z)$$
where \(K_r\) is the repetitive gain, \(z^k\) is the phase-lead element, and \(S(z)\) is a low-pass filter. The phase-lead element compensates the phase lag of the plant and the filter. The low-pass filter attenuates high-frequency components and prevents the repetitive controller from amplifying noise. I designed \(S(z)\) as a second-order low-pass filter:
$$S(s)=\frac{\omega_n^2}{s^2+2\xi\omega_n s+\omega_n^2}$$
I selected a cutoff frequency of 650 Hz, \(\omega_n=4084\) rad/s, and \(\xi=0.8\). After discretization, the filter becomes
$$S(z)=\frac{0.067z+0.0538}{z^2-1.3995z+0.5203}$$
The stability condition for the repetitive-controlled solar inverter can be derived from the small-gain theorem. The error transfer function is
$$e(z)=\frac{1-Q(z)z^{-N}}{1-Q(z)z^{-N}+K_r z^{k-N}S(z)P(z)}r(z)
+\frac{1-Q(z)z^{-N}}{1-Q(z)z^{-N}+K_r z^{k-N}S(z)P(z)}d(z)$$
For stability, the following condition must hold on the unit circle:
$$|Q(e^{j\omega T})-K_r e^{jk\omega T}S(e^{j\omega T})P(e^{j\omega T})|<1$$
This condition shows that the compensator must shape \(S(z)P(z)\) so that its magnitude is small at high frequencies and its phase is properly compensated at low and middle frequencies. I also combined the repetitive controller with a proportional-integral controller in parallel. The PI part provides fast transient response, while the repetitive part provides zero steady-state error for periodic signals. The composite control law is
$$G_c(z)=K_p+\frac{K_i}{s}+\frac{z^{-N}C(z)}{1-Q(z)z^{-N}}$$
I selected \(K_p=10\), \(K_i=100\), \(K_r=1\), \(N=200\), and \(z^k=z^4\). Table 4 summarizes the repetitive controller parameters. In the solar inverter, the PI controller acts immediately when the current error changes, and the repetitive controller corrects the periodic error after one fundamental period. This combination improves both the transient and steady-state performance.
| Repetitive controller parameter | Value |
|---|---|
| Sampling period \(T_s\) | 0.01 ms |
| Samples per fundamental period \(N\) | 200 |
| Filter constant \(Q(z)\) | 0.95 |
| Repetitive gain \(K_r\) | 1 |
| Phase-lead order \(k\) | 4 |
| PI proportional gain \(K_p\) | 10 |
| PI integral gain \(K_i\) | 100 |
| Low-pass cutoff frequency | 650 Hz |
| Damping ratio \(\xi\) | 0.8 |
I simulated the repetitive plus PI controlled solar inverter in MATLAB/Simulink. The DC voltage was 600 V, the grid voltage was 380 V line-to-line, and the switching frequency was 10 kHz. The current reference tracking and the current error were recorded. The PI-only solar inverter reached steady state slowly, and the current error remained relatively large. The repetitive plus PI solar inverter reached steady state faster and reduced the error. The grid current was smooth, and the phase aligned with the grid voltage. The THD of the grid current with the repetitive plus PI controller was about 4.02% in my simulation, which is better than the PI-only case but still leaves room for improvement.
Sliding-Mode Control for the Solar Inverter
Sliding-mode control is a nonlinear control method that is insensitive to parameter variations and external disturbances. For a general system
$$\dot{x}=f(x,u,t), \quad x\in R^n, \quad u\in R^m$$
I define a switching function \(s(x)\in R^m\). The control law is designed so that the state trajectory reaches the sliding surface \(s(x)=0\) and then slides along it. The sliding surface must satisfy the reachability condition, the stability condition, and the invariance condition. A common sliding surface for current control is
$$s=ce+\int_0^t e\,d\tau$$
where \(e=i^*-i\) is the current tracking error and \(c>0\). For the d-axis and q-axis currents of the solar inverter, I define
$$s_d=ce_d+\int_0^t e_d\,d\tau$$
$$s_q=ce_q+\int_0^t e_q\,d\tau$$
The derivatives are
$$\dot{s}_d=c\dot{e}_d+e_d$$
$$\dot{s}_q=c\dot{e}_q+e_q$$
With the system model, the sliding-mode control law can be derived. The reaching law determines the transient behavior. I considered the constant reaching law, the exponential reaching law, and the power reaching law. Their expressions are
$$\dot{s}=-\varepsilon \operatorname{sgn}(s), \quad \varepsilon>0$$
$$\dot{s}=-\varepsilon \operatorname{sgn}(s)-ks, \quad \varepsilon>0, \quad k>0$$
$$\dot{s}=-k|s|^{\alpha}\operatorname{sgn}(s), \quad k>0, \quad 0<\alpha<1$$
The constant reaching law has a fixed reaching speed, but it produces strong chattering. The exponential reaching law combines a constant term and an exponential term, so it reaches the surface quickly and then reduces the speed. The power reaching law reduces chattering near the surface. However, all discontinuous switching laws produce chattering because the control is discontinuous across the sliding surface. In a solar inverter, chattering appears as high-frequency ripple in the grid current. It increases switching loss and can excite unmodeled dynamics.
To reduce chattering, I replaced the sign function with a high-frequency control function:
$$u_{HF}(s)=\frac{\rho s}{|s|+\epsilon}$$
where \(\rho>0\) and \(\epsilon>0\). When \(\epsilon=0\), this function becomes the sign function. When \(\epsilon>0\), the function is smooth around the origin, and the control effort is reduced near the sliding surface. I used this function in the reaching law:
$$\dot{s}_d=-u_{HF}(s_d)-e_d$$
$$\dot{s}_q=-u_{HF}(s_q)-e_q$$
For stability, I define the Lyapunov function
$$V=\frac{1}{2}s^2$$
with \(s=[s_d,s_q]^T\). Its derivative is
$$\dot{V}=s\dot{s}=s_d\dot{s}_d+s_q\dot{s}_q$$
Substituting the reaching law gives
$$\dot{V}=-\rho\frac{s_d^2}{|s_d|+\epsilon}-\rho\frac{s_q^2}{|s_q|+\epsilon}-s_d e_d-s_q e_q$$
For sufficiently small error terms, \(\dot{V}\le 0\), so the sliding-mode controller stabilizes the solar inverter current loop. I simulated the sliding-mode controlled solar inverter with the same LCL parameters. The d-axis current error reached steady state in about \(3\times 10^{-3}\) s, which is much faster than the repetitive controller. However, the error amplitude oscillated between 0 and about 2.3 A. This chattering confirmed that sliding-mode control alone is not ideal for steady-state power quality, even though its transient response is excellent.
Weighted Hybrid Control for the Solar Inverter
The simulation results showed that sliding-mode control has faster tracking, while repetitive plus PI control has lower steady-state ripple. I therefore proposed a weighted hybrid control strategy for the solar inverter. The idea is to use sliding-mode control when the current error is large and to increase the weight of repetitive plus PI control as the error decreases. Instead of hard switching between controllers, which can cause waveform distortion, I use a variable weight \(a\). The control law for the d-axis and q-axis is
$$u_d=aG_{RP}(s)e_d+(1-a)u_{HF}(s)-R i_d-\omega L i_q+u_{gd}$$
$$u_q=aG_{RP}(s)e_q+(1-a)u_{HF}(s)-R i_q+\omega L i_d+u_{gq}$$
where \(G_{RP}(s)\) is the repetitive plus PI controller, \(u_{HF}(s)\) is the sliding-mode reaching function, and \(a\in[0,1]\) is the weight. The weight is updated according to the current error:
$$a=
\begin{cases}
0, & |e|>\eta_2\\
\operatorname{roundn}\left(\frac{|e|-\eta_1}{\eta_2-\eta_1},2\right), & \eta_1<|e|\le\eta_2\\
1, & |e|\le\eta_1
\end{cases}$$
Here, \(\eta_1\) and \(\eta_2\) are the lower and upper error thresholds. When the error is larger than \(\eta_2\), the weight is zero, so the sliding-mode controller dominates and drives the error down quickly. When the error is between \(\eta_1\) and \(\eta_2\), the weight increases gradually. When the error is below \(\eta_1\), the weight is one, so the repetitive plus PI controller dominates and maintains a smooth steady state. This approach allows the solar inverter to combine the fast response of sliding-mode control with the low steady-state ripple of repetitive control. Table 5 lists the weighted controller parameters.
| Weighted hybrid parameter | Value |
|---|---|
| Error upper threshold \(\eta_2\) | 2 A |
| Error lower threshold \(\eta_1\) | 0.2 A |
| Sliding-mode gain \(\rho\) | 500 |
| Smoothing factor \(\epsilon\) | 0.05 |
| Sliding surface coefficient \(c\) | 100 |
| Repetitive plus PI \(G_{RP}\) | As designed previously |
I simulated the weighted hybrid controlled solar inverter under the same conditions. The current error reached steady state in about \(3\times 10^{-3}\) s, similar to the sliding-mode case. However, the steady-state error amplitude was between 0 and 2 A, and the waveform was much smoother than the sliding-mode-only case. The grid current and voltage were in phase, and the current had a good sinusoidal shape. The THD of the grid current with the weighted hybrid controller was about 2.51%, which is lower than both the repetitive plus PI controller and the sliding-mode controller. Table 6 compares the three control strategies.
| Control strategy | Convergence time | Steady-state current error | THD of grid current | Robustness |
|---|---|---|---|---|
| Repetitive plus PI | About 0.18 s | Small, about 2 A ripple | 4.02% | Good steady-state, slow transient |
| Sliding-mode control | About \(3\times 10^{-3}\) s | Large, about 2.3 A chattering | 2.60% | Fast, but chattering |
| Weighted hybrid control | About \(3\times 10^{-3}\) s | Small, about 2 A smooth | 2.51% | Fast and smooth |
I also tested the robustness of the weighted hybrid solar inverter by changing the DC-link voltage from 600 V to 700 V at 0.1 s. The current error recovered quickly, and the grid current remained smooth. This result indicates that the weighted hybrid controller has good disturbance rejection. The sliding-mode part provides robustness during the transient, and the repetitive part removes periodic error after the transient. In contrast, a hard switch between controllers produced a large distortion in the grid current, which confirms that the weighted transition is necessary. The weighted hybrid control therefore improves the solar inverter performance in both transient and steady-state operation.
Simulation Verification and Harmonic Analysis
I performed additional simulations to evaluate the harmonic performance of the solar inverter. Fast Fourier transform analysis of the grid current showed that the repetitive plus PI controller had a fundamental amplitude of about 23.29 A and a THD of 4.02%. The sliding-mode controller had a fundamental amplitude of about 21.05 A and a THD of 2.60%. The weighted hybrid controller had a fundamental amplitude of about 21.1 A and a THD of 2.51%. The lower THD means that the weighted hybrid solar inverter injects fewer harmonics into the grid. This is important because the solar inverter must comply with grid codes and must not degrade the power quality at the point of common coupling.
The improvement comes from the way the weighted controller allocates control effort. During the initial transient, the error is large, so the sliding-mode term dominates. The sliding-mode term drives the current toward the reference quickly. As the error decreases, the repetitive plus PI term becomes dominant. The repetitive term has high gain at the fundamental and harmonic frequencies, so it cancels periodic errors. The PI term provides additional damping and helps the transient. Because the weight changes smoothly, the solar inverter avoids the sudden control discontinuity that would occur with hard switching.
I also examined the effect of the LCL filter damping on the harmonic spectrum. The passive damping resistor in series with the capacitor reduces the resonant peak without significantly affecting the low-frequency gain. The resonance frequency is about 2630 Hz, which is far from the fundamental frequency and below half of the switching frequency. This placement ensures that the current control loop does not excite the resonance. The damping resistor also reduces the high-frequency ripple that would otherwise appear in the grid current. When the damping resistor is too small, the resonant peak is high, and the solar inverter current oscillates. When the damping resistor is too large, the losses increase and the high-frequency attenuation is reduced. I selected the damping resistor to balance these effects.
Controller Design Details for the Solar Inverter
The current loop of the solar inverter is implemented in the dq frame. The d-axis current reference is generated by the DC-link voltage controller or by the maximum power point tracking stage. The q-axis current reference is usually set to zero for unity power factor operation. In my study, I focused on the current loop, so I assumed that the DC-link voltage was constant and that the reference currents were ideal sinusoids in the abc frame and constant in the dq frame. The current controller outputs voltage commands \(u_d^*\) and \(u_q^*\). These commands are transformed back to the abc frame and used by the pulse-width modulation modulator. The modulation signals drive the six switches of the solar inverter bridge.
The decoupling terms are added to the controller output. For the d-axis, the decoupling term is \(-\omega L i_q\), and for the q-axis, the decoupling term is \(+\omega L i_d\). These terms cancel the cross-coupling in the solar inverter model. Without decoupling, a change in the d-axis current would disturb the q-axis current, and vice versa. The decoupling improves the independent control of active and reactive power. The grid voltage feedforward terms \(u_{gd}\) and \(u_{gq}\) are also added. These terms improve the disturbance rejection because they cancel the grid voltage influence on the current loop.
The repetitive controller is implemented in parallel with the PI controller. The repetitive controller has a delay of one fundamental period. The delay is implemented as a circular buffer with \(N=200\) samples. The output of the repetitive controller is added to the PI output. The low-pass filter \(S(z)\) limits the bandwidth of the repetitive controller. The phase-lead element \(z^4\) compensates the phase lag. The gain \(K_r=1\) is chosen to balance convergence speed and stability. A larger gain would speed up the repetitive action but could reduce the stability margin. A smaller gain would be more stable but slower. The value \(Q(z)=0.95\) ensures that the repetitive controller does not have poles exactly on the unit circle. This is important for the solar inverter because the grid frequency can vary slightly, and the repetitive controller must remain stable under frequency deviation.
For the sliding-mode controller, the reaching law uses the high-frequency function. The parameters \(\rho\) and \(\epsilon\) determine the chattering level. A larger \(\rho\) makes the reaching faster but increases chattering. A larger \(\epsilon\) smooths the control but slows the reaching. I selected \(\rho=500\) and \(\epsilon=0.05\) after simulation tuning. The sliding surface coefficient \(c=100\) is chosen so that the error dynamics on the sliding surface are fast. The Lyapunov function confirms that the closed-loop system is stable. The sliding-mode controller is implemented in the dq frame, and its output is added to the current controller through the weight \(a\).
The weighted controller uses the current error magnitude to compute \(a\). The error is filtered to avoid noise-induced weight fluctuations. The threshold \(\eta_2=2\) A and \(\eta_1=0.2\) A are selected based on the error range observed in the simulations. When the error is larger than 2 A, the sliding-mode controller is fully active. When the error is between 0.2 A and 2 A, the weight increases linearly. When the error is below 0.2 A, the repetitive plus PI controller is fully active. This strategy prevents the sliding-mode chattering from dominating the steady state. It also prevents the slow repetitive response from dominating the transient. The result is a solar inverter current with both fast transient response and low steady-state harmonic distortion.
Comparative Discussion
The simulation results support the following conclusions. First, the LCL filter is necessary for the solar inverter to meet harmonic limits with a reasonable switching frequency. The passive damping resistor in series with the capacitor suppresses the resonant peak. Second, the repetitive plus PI controller is effective for periodic disturbances and achieves a low steady-state error. However, its transient response is slow because the repetitive controller waits for one period before correcting the error. Third, the sliding-mode controller is very fast and robust, but its chattering causes high-frequency ripple in the grid current. Fourth, the weighted hybrid controller combines the advantages of both methods. It uses sliding-mode control during the transient and repetitive plus PI control during the steady state. The weight changes smoothly, so the solar inverter current does not experience a sudden discontinuity.
Table 7 summarizes the design choices and their reasons.
| Design choice | Reason |
|---|---|
| LCL filter | Provides \(-60\) dB/decade attenuation and reduces switching ripple. |
| Series capacitor damping | Suppresses resonance with low loss and preserves high-frequency attenuation. |
| dq-frame control | Decouples active and reactive power and simplifies current regulation. |
| Repetitive control | Provides high gain at harmonic frequencies and reduces periodic error. |
| PI control | Provides fast transient response and improves damping. |
| Sliding-mode control | Provides fast reaching and robustness to parameter variations. |
| High-frequency reaching function | Reduces chattering compared with the sign function. |
| Weighted hybrid control | Combines fast transient response with low steady-state ripple. |
I also compared the computational burden of the controllers. The PI controller is the simplest and requires only a few multiplications and additions. The repetitive controller requires a circular buffer and a low-pass filter, so it needs more memory. The sliding-mode controller requires the evaluation of the reaching function and the sliding surface. The weighted hybrid controller requires both controllers and the weight calculation. In a modern digital signal processor, the computational burden is acceptable for a solar inverter switching at 10 kHz. The memory requirement for the repetitive controller is 200 samples per phase, which is also acceptable. The weighted hybrid controller therefore has a practical implementation path.
One important issue is the grid frequency variation. The repetitive controller assumes a fixed period \(N\). If the grid frequency deviates from 50 Hz, the delay length is not exactly one period. This reduces the harmonic cancellation performance. To address this, I can use a frequency-adaptive repetitive controller that adjusts \(N\) according to the measured grid frequency. Alternatively, the low-pass filter \(Q(z)\) and the phase-lead element \(z^k\) can be designed with some margin. In my simulation, the grid frequency was assumed to be constant. For practical solar inverter applications, frequency adaptation is recommended. The weighted hybrid controller is still robust because the sliding-mode part handles the transient, and the PI part provides some harmonic rejection even if the repetitive controller is detuned.
Another practical issue is the DC-link voltage variation. The solar inverter input voltage depends on the photovoltaic array operating point. When the irradiance or temperature changes, the DC-link voltage changes. The current controller must maintain the grid current despite this variation. In my robustness test, I changed the DC-link voltage from 600 V to 700 V. The weighted hybrid controller recovered quickly. The sliding-mode part reacted to the sudden error, and the repetitive part corrected the steady-state error. The grid current remained sinusoidal. This result confirms that the weighted hybrid controller is suitable for a solar inverter with a varying DC input.
Implementation Considerations for the Solar Inverter
For a real solar inverter, the controller is implemented on a digital signal processor or a field-programmable gate array. The sampling must be synchronized with the pulse-width modulation carrier to reduce noise. The current sensors must have sufficient bandwidth and accuracy. The grid voltage must be measured for phase synchronization. A phase-locked loop is used to estimate the grid phase angle. The Park transformation requires the phase angle, so the accuracy of the phase-locked loop affects the current control. In my simulation, I assumed an ideal phase angle. In practice, the phase-locked loop should be designed to reject grid voltage harmonics and unbalance.
The LCL filter parameters can vary due to manufacturing tolerance and temperature. The inductor value can change with current because of magnetic saturation. The capacitor value can change with temperature. The grid impedance can also vary. These variations affect the resonant frequency and the plant model. The weighted hybrid controller is robust to these variations because the sliding-mode part is insensitive to parameter changes, and the repetitive part has a stability margin provided by \(Q(z)\). The passive damping resistor also reduces the sensitivity to resonance. Therefore, the weighted hybrid control is a practical choice for a solar inverter.
The switching frequency is another design parameter. A higher switching frequency reduces the size of the LCL filter but increases switching loss. In my design, I used 10 kHz. This is a common value for medium-power solar inverters. The resonance frequency is about 2630 Hz, which is below half of the switching frequency. This ensures that the current loop can control the resonance. If the switching frequency were lower, the resonance frequency would need to be lower as well, or the damping would need to be stronger. The weighted hybrid controller can be adapted to different switching frequencies by changing the controller gains and the filter parameters.
Conclusions and Future Work
I have presented a comprehensive study of control strategies for a three-phase LCL-filtered solar inverter. I selected the LCL filter because it provides strong high-frequency attenuation and reduces the size of the magnetic components. I used a series capacitor damping resistor to suppress the resonant peak. I derived the abc-frame and dq-frame models of the solar inverter and designed the LCL parameters using ripple, reactive power, and resonance constraints. I then designed a repetitive plus PI controller, a sliding-mode controller, and a weighted hybrid controller. The repetitive plus PI controller achieved low steady-state error but was slow during transients. The sliding-mode controller achieved fast transients and good robustness but produced chattering. The weighted hybrid controller combined the two approaches by adjusting the weight according to the current error. Simulation results showed that the weighted hybrid controller had a fast convergence time of about \(3\times 10^{-3}\) s, a smooth steady-state current, and a THD of about 2.51%. It also rejected a DC-link voltage step change quickly. I therefore conclude that the weighted hybrid control strategy is effective for improving the current quality and dynamic performance of a solar inverter.
Future work can extend this study in several directions. First, the nonlinear load at the point of common coupling should be included in the simulation. A nonlinear load injects additional harmonics, and the solar inverter controller must compensate for them. Second, the three-phase unbalanced condition should be considered. The dq-frame model assumes a balanced grid, but real distribution grids can be unbalanced. A negative-sequence controller or a resonant controller may be needed. Third, the DC/DC converter stage should be integrated with the inverter model. The maximum power point tracking dynamics and the DC-link voltage control interact with the inverter current control. A coordinated control strategy for the whole photovoltaic system would be valuable. Fourth, an experimental prototype should be built to validate the simulation results. The digital implementation delay, sensor noise, and dead time would affect the performance. These practical effects should be studied. Finally, the weighted hybrid control could be combined with model predictive control or artificial intelligence methods to further improve the performance of the solar inverter.
In summary, the solar inverter is a key component of modern photovoltaic systems. Its control strategy determines the quality of the grid current and the stability of the interconnection. The LCL filter and the weighted hybrid controller provide a strong foundation for high-performance solar inverter operation. I believe that the methods presented here can be adapted to different power levels and grid conditions. The continued development of solar inverter control will support the integration of renewable energy and the improvement of power quality in future distribution networks.
