With the rapid integration of distributed photovoltaic systems into distribution networks, the utilization of solar inverters for ancillary services such as harmonic compensation has gained significant attention. However, in many practical installations, grid-side current transformers (CTs) are absent due to cost, space, or wiring constraints. To address this challenge, we propose a novel harmonic compensation scheme that operates without any grid-side current measurement device. The core idea is to estimate the grid impedance by injecting non-characteristic frequency currents via the solar inverter, and then use the estimated impedance together with the measured grid voltage harmonics to compute the grid-side harmonic current. This computed current serves as the reference for the repetitive controller, enabling the solar inverter to compensate for harmonics introduced by nonlinear loads. This paper presents the complete methodology, including impedance estimation principles, harmonic current estimation algorithms, and control architecture. Extensive simulation results demonstrate that the proposed method can reduce the total harmonic distortion (THD) of the grid current from over 60% to less than 7%, validating its effectiveness. The approach is particularly valuable for retrofitting existing solar inverters where additional CT installation is impractical.
Introduction
The proliferation of nonlinear loads in distribution networks has exacerbated harmonic pollution, deteriorating power quality and threatening the stability of connected equipment. Simultaneously, the penetration of grid-connected solar inverters has increased dramatically, driven by renewable energy policies and declining photovoltaic costs. Solar inverters, being power electronic interfaces, possess inherent capability to inject or absorb harmonic currents beyond their primary function of real power delivery. Exploiting the spare capacity of these inverters for harmonic compensation offers an economically attractive solution compared to dedicated active power filters.
Conventional harmonic compensation methods rely on accurate measurement of either load-side or grid-side harmonic currents using current transformers. However, in many field installations, especially in residential or small commercial settings, grid-side CTs are not installed. Even when present, traditional electromagnetic CTs suffer from bandwidth limitations, phase delay, and saturation issues that degrade performance in harmonic compensation. Furthermore, installing additional CTs retrospectively is often impractical due to wiring difficulties and cost. Hence, developing a harmonic compensation strategy that operates without grid-side CTs is of great practical significance.
In this paper, we propose a method that eliminates the need for any dedicated current sensor on the grid side. The only required measurements are the inverter output current (already available for control) and the grid voltage at the point of common coupling (PCC). The method proceeds in two stages: first, during an initialization period, the solar inverter injects a small controlled harmonic current at a non-characteristic frequency (e.g., 75 Hz) to estimate the grid impedance (resistance and inductance) in real time. Second, using the estimated impedance and the harmonic components extracted from the PCC voltage, we compute the grid-side harmonic current. This computed current is then fed into a repetitive controller that generates the compensation current reference for the solar inverter.
The key contributions of this work include: (1) a systematic impedance estimation technique based on discrete Fourier transform (DFT) with sliding window iteration, which minimizes the impact of background harmonics; (2) a harmonic current estimation formula derived from Ohm’s law in the frequency domain; and (3) a repetitive control scheme that effectively tracks the estimated harmonic components and compensates them. We provide a thorough analytical derivation, simulation setup, and performance evaluation. Results confirm that the method achieves satisfactory harmonic mitigation without any grid-side current sensing.
The rest of this paper is organized as follows. Section II describes the system topology and mathematical model. Section III details the harmonic current estimation method, including impedance estimation and harmonic current reconstruction. Section IV presents the control strategy for harmonic compensation. Section V provides simulation results and analysis. Finally, conclusions are drawn in Section VI.
System Topology and Model
The single-phase solar inverter system considered in this work is depicted conceptually in the figure below. The solar inverter is connected to the grid through an LCL filter, and a nonlinear load (e.g., a diode rectifier) is connected at the PCC. The grid is modeled as an ideal voltage source \( U_s \) in series with grid impedance consisting of resistance \( r_g \) and inductance \( l_g \). The nonlinear load is represented as a harmonic current source \( i_h \).

The system parameters are summarized in Table I.
| Parameter | Symbol | Value |
|---|---|---|
| Grid voltage (RMS) | \( U_s \) | 220 V |
| Grid resistance | \( r_g \) | 0.25 Ω |
| Grid inductance | \( l_g \) | 0.5 mH |
| DC bus voltage | \( V_{dc} \) | 400 V |
| Inverter switching frequency | \( f_{sw} \) | 10 kHz |
| LCL filter parameters | \( L_1, C_f, L_2 \) | 2 mH, 10 μF, 1 mH |
| Nonlinear load type | – | Single-phase diode rectifier with RL load |
During normal operation, the solar inverter delivers active power while compensating harmonics. The compensation function is activated periodically based on the estimated grid conditions. The core challenge is to obtain the grid-side harmonic current without direct measurement. Our solution relies on estimating the grid impedance first.
Harmonic Current Estimation Method
Grid Impedance Estimation Principle
The impedance estimation is performed by injecting a non-characteristic frequency current through the solar inverter. We choose 75 Hz because it is distinct from the fundamental (50 Hz or 60 Hz) and its multiples, thus avoiding interference from typical background harmonics. The injection lasts for a few cycles until the estimation converges.
Figure 3 (conceptually, a sliding-window iterative DFT algorithm) is used to extract the real and imaginary parts of the 75 Hz component from the PCC voltage and the inverter output current. Let \( U_{g-ih} \) and \( I_{g-ih} \) represent the phasors of the PCC voltage and injected current at the injection frequency \( \omega \). The real and imaginary components are denoted as \( u_{reg\_ih}, u_{meg\_ih} \) and \( i_{reg\_ih}, i_{meg\_ih} \) respectively. According to the equivalent circuit, the grid impedance is given by:
$$
\begin{aligned}
r_g &= \frac{u_{reg\_ih} i_{reg\_ih} + u_{meg\_ih} i_{meg\_ih}}{i_{reg\_ih}^2 + i_{meg\_ih}^2} \\
\omega l_g &= \frac{u_{meg\_ih} i_{reg\_ih} – u_{reg\_ih} i_{meg\_ih}}{i_{reg\_ih}^2 + i_{meg\_ih}^2}
\end{aligned}
$$
These calculations are computationally light and can be implemented in real time on a digital signal processor (DSP) or FPGA. To improve accuracy, we inject multiple current phasors with different phases and average the resulting impedance estimates, thereby reducing the influence of measurement noise and nonlinear load variations.
Table II summarizes the impedance estimation results from the simulation. The estimated values converge to 0.251 Ω and 0.501 mH, which are very close to the actual values of 0.25 Ω and 0.5 mH, demonstrating high accuracy.
| Parameter | Actual Value | Estimated Value | Error |
|---|---|---|---|
| \( r_g \) (Ω) | 0.25 | 0.251 | 0.4% |
| \( l_g \) (mH) | 0.5 | 0.501 | 0.2% |
Grid-Side Harmonic Current Estimation
Once the grid impedance is known, we continuously monitor the PCC voltage \( U_a \) and extract its harmonic components using the same sliding-window DFT algorithm. For each harmonic of order \( k \) (e.g., 3rd, 5th, …), the voltage phasor is decomposed into real part \( u_{re}^{(k)} \) and imaginary part \( u_{me}^{(k)} \). The corresponding grid-side harmonic current phasor can be computed via Ohm’s law applied to the grid impedance:
$$
\begin{aligned}
i_{re}^{(k)} &= \frac{u_{re}^{(k)} r_g + u_{me}^{(k)} k\omega l_g}{r_g^2 + (k\omega l_g)^2} \\
i_{me}^{(k)} &= \frac{u_{me}^{(k)} r_g – u_{re}^{(k)} k\omega l_g}{r_g^2 + (k\omega l_g)^2}
\end{aligned}
$$
where \( \omega \) is the fundamental angular frequency (100π rad/s for 50 Hz). The instantaneous harmonic current waveform is reconstructed by multiplying the real and imaginary parts with the corresponding cosine and sine basis functions and summing over all considered harmonic orders:
$$
i_{sh}(t) = \sum_{k=3}^{K} \left[ i_{re}^{(k)} \cos(k\omega t) + i_{me}^{(k)} \sin(k\omega t) \right]
$$
This estimated grid-side harmonic current \( i_{sh} \) replaces the actual measured grid-side current in the compensation loop. The estimation accuracy is evaluated in the simulation and shown to track the actual harmonic current closely, even after compensation starts.
Harmonic Compensation Control Strategy
The overall control block diagram is depicted conceptually. The solar inverter’s output current \( i_{out} \) is measured (using internal CTs) and compared with the reference current \( i_{ref} \). The reference comprises two parts: the fundamental active power component (from maximum power point tracking, not discussed here) and the harmonic compensation component. The harmonic compensation component is obtained by adding the estimated grid-side harmonic current \( i_{sh} \) and the actual inverter output harmonic current \( i_{out\_h} \) (which is simply the harmonic content of \( i_{out} \) extracted via DFT). This composite reference ensures that the inverter injects exactly the amount of harmonic current needed to cancel the grid-side harmonics.
The error between \( i_{ref} \) and \( i_{out} \) is processed by a repetitive controller (RC), which is highly effective for tracking periodic signals. The structure of the RC is shown in Figure 7 (conceptually) and its parameters are given in Table III.
| Parameter | Symbol | Value |
|---|---|---|
| Repetitive gain | \( K_s \) | 1.35 |
| Direct feedback gain | \( K_r \) | 1.8 |
| Forgetting factor | \( K_f \) | 0.9 |
| Fundamental period samples | \( N \) | 200 |
The RC includes a delay line of one fundamental period to memorize the error pattern, a forgetting factor \( K_f \) to ensure stability by attenuating non-repetitive disturbances, and a phase compensation block to account for sampling and computation delays. The output of the RC is added to the grid voltage feedforward term to generate the modulation signal for the solar inverter.
The key advantage of this control scheme is that it does not require any grid-side CT: the harmonic reference is derived purely from voltage measurements and the prior impedance estimate. The repetitive controller ensures accurate steady-state tracking and fast dynamic response.
Simulation Results and Analysis
We built a digital simulation model in MATLAB/Simulink using the parameters of Table I. The nonlinear load is a single-phase diode rectifier with a resistive-inductive load drawing a highly distorted current. The solar inverter initially operates in grid-feeding mode without compensation. At t = 0.15 s, the impedance estimation is completed, and the harmonic compensation function is enabled. The compensation targets the dominant odd harmonics from 3rd to 25th order.
Impedance Estimation Performance: Figure 8 (conceptual) shows the real-time estimation of \( r_g \) and \( l_g \). After a brief transient, the estimates settle to within 1% of the actual values. The small residual oscillation is due to the DFT window length and the presence of background harmonics.
Harmonic Current Estimation Accuracy: In Figure 9 (conceptual), the estimated grid-side harmonic current (computed from voltage and impedance) is plotted against the actual grid-side harmonic current (measured in simulation for validation). The two waveforms overlap almost perfectly both before and after compensation is activated, confirming that the estimation method is reliable even when the inverter begins to inject compensation currents.
Harmonic Compensation Effect: Figure 10 (conceptual) displays the grid current before and after compensation. Before compensation, the current is severely distorted. After compensation, the waveform becomes nearly sinusoidal. The frequency spectrum analysis (Figure 11, conceptual) indicates that the THD is reduced from 61.41% to 6.67%. Detailed harmonic content is summarized in Table IV.
| Harmonic Order | Before Compensation | After Compensation |
|---|---|---|
| 3rd | 35.2% | 3.1% |
| 5th | 20.5% | 2.4% |
| 7th | 14.1% | 1.8% |
| 9th | 9.8% | 1.2% |
| 11th | 7.3% | 0.9% |
| 13th | 5.6% | 0.7% |
| 15th | 4.2% | 0.5% |
| 17th | 3.1% | 0.4% |
| 19th | 2.4% | 0.3% |
| 21st | 1.9% | 0.2% |
| 23rd | 1.5% | 0.2% |
| 25th | 1.1% | 0.1% |
| THD | 61.41% | 6.67% |
The results clearly demonstrate that the proposed method can effectively compensate the grid current harmonics without any grid-side CT. The residual THD is below 7%, which meets typical grid code requirements (e.g., IEEE 519).
Discussion
The success of the method hinges on the accuracy of the grid impedance estimation. In practice, the grid impedance may vary over time due to changes in network topology or load conditions. To address this, we recommend periodic re-estimation of the impedance (e.g., every few minutes) or triggering re-estimation when a significant change in PCC voltage harmonic content is detected. The injection current amplitude must be carefully chosen: large enough to produce a measurable voltage drop, yet small enough to avoid violating power quality limits. In our simulation, we used an amplitude of 1 A (peak) for the 75 Hz current, which is negligible compared to the fundamental current (about 15 A).
Another consideration is the impact of background harmonics at the injection frequency. Since 75 Hz is a non-characteristic frequency, such background is typically absent or very low. However, if interharmonic sources exist (e.g., from ac arc furnaces), additional filtering may be required. The sliding-window DFT inherently provides some filtering, but a narrow bandpass filter could be added for improved rejection.
The repetitive controller parameters were tuned based on the system’s dynamic response. Larger \( K_s \) improves convergence speed but may cause instability if the delay compensation is inaccurate. Using a forgetting factor \( K_f \) slightly less than 1 ensures robustness against non-periodic disturbances. In field implementation, adaptive tuning could further enhance performance.
Conclusion
We have presented a novel harmonic compensation method for grid-connected solar inverters that operates without any grid-side current transformer. By injecting a small non-characteristic current to estimate the grid impedance and then deriving the grid-side harmonic current from the PCC voltage, we eliminate the need for costly and impractical CT installations. The control strategy employs a repetitive controller that uses the estimated harmonic current as a reference, enabling the solar inverter to compensate for harmonics generated by nonlinear loads. Simulation results confirm that the method reduces the THD from over 60% to below 7%, meeting common power quality standards. The approach is particularly suitable for retrofit applications where adding grid-side CTs is difficult. Future work will focus on experimental validation in a hardware prototype and extension to three-phase systems.
In summary, the proposed scheme leverages the unused capacity of solar inverters to enhance power quality while requiring minimal additional hardware. It represents a practical and economically viable solution for the growing challenges of harmonic pollution in distribution networks with high photovoltaic penetration.
