Distributed generation has grown rapidly over the past decade. As the penetration level of distributed energy resources increases, grid-connected converters are no longer allowed to behave as simple power sources that only inject active power into the utility grid. They are expected to participate in grid stability enhancement, especially in voltage regulation. Among all distributed generation units, the photovoltaic system is one of the most widely installed. Most grid-connected solar inverters operate with a maximum power point tracking algorithm and inject as much active power as possible into the grid. In many cases, they do not participate in grid voltage control. When the grid voltage exceeds the protection threshold, the solar inverter is disconnected to avoid overvoltage faults. This approach is not economically attractive because it wastes available solar energy whenever the grid voltage rises above the nominal level. Therefore, a more intelligent control strategy for the solar inverter is necessary.
In this article, I present a grid voltage control strategy for a solar inverter. The proposed method enables the solar inverter to regulate the grid voltage by controlling both active and reactive power injected into the grid. The key feature of the proposed strategy is the online estimation of the grid impedance ratio R/X. This ratio determines how the active power and reactive power influence the grid voltage. In a resistive grid, the active power has the dominant effect on voltage; in an inductive grid, the reactive power dominates. Most actual grids contain both resistance and reactance, so the voltage control performance depends on the impedance ratio. The proposed control strategy observes the grid impedance ratio online and adjusts the active and reactive power references of the solar inverter in real time. As a result, the solar inverter can still deliver power to the grid even when the grid voltage is not at its optimal level. The strategy is not only applicable to solar inverters but also to other distributed generation grid-connected converters.
1. Introduction
The increasing integration of distributed generation introduces new challenges for voltage control in distribution networks. In particular, the connection of solar inverters with high power ratings changes the power flow and can cause voltage rise during periods of high irradiance and low load. Conventionally, distribution network operators use protection relays to disconnect solar inverters when the voltage exceeds 110% of the nominal value for more than ten minutes, as required by some grid codes. However, this practice leads to a loss of renewable generation and reduces the economic benefit of the photovoltaic installation. Instead of disconnecting the solar inverter, it would be preferable to let the solar inverter contribute to voltage regulation by managing its output power.
The relationship between the grid voltage and the power injected by a solar inverter depends on the grid impedance. In an inductive grid where the reactance is much larger than the resistance, the voltage magnitude is mainly affected by reactive power. In a resistive grid, the voltage magnitude is mainly affected by active power. For a grid with mixed resistive and inductive components, both active and reactive power influence the voltage magnitude. The relative effectiveness is determined by the ratio of resistance to reactance, denoted as R/X. This ratio is not constant in practice. It changes with load variations, feeder switching, and network reconfiguration. Especially in low-voltage distribution networks, the impedance ratio can vary over a wide range. Thus, a fixed control parameter based on an off-line measured impedance would not provide satisfactory performance. Online impedance estimation is therefore essential for the proposed voltage control.
Several methods have been proposed in the literature for grid impedance estimation. These methods may be classified into offline and online, active and passive, or transient and steady-state approaches. Among them, the non-characteristic harmonic current injection method is attractive because it does not require extra hardware and uses the solar inverter itself to inject a small harmonic current. The grid impedance is then obtained by applying a discrete Fourier transformation (DFT) to the measured grid voltage and current. This method has been shown to be both accurate and effective for online impedance estimation. In this article, I adopt this technique to estimate the grid impedance ratio online. The estimated ratio is then used in the droop-based voltage control of the solar inverter.
2. Photovoltaic Power System Configuration
The photovoltaic power system studied in this article is shown in Figure 1 in a conceptual sense. The system consists of a photovoltaic panel, an energy-collection converter that implements maximum power point tracking, and a solar inverter that includes a three-phase full-bridge switching network and a grid-side filter. The solar inverter controls the current injected into the grid and thereby regulates its dc-link voltage. The active power injected into the grid is determined by the energy collected by the energy-collection converter. In the conventional operation mode, the energy-collection converter always operates at the maximum power point, and the solar inverter transfers all available power to the grid.
In the proposed control strategy, the energy-collection converter does not always operate at the maximum power point. Instead, its power reference is adjusted according to the grid voltage condition. The solar inverter is responsible for controlling the active power and reactive power injected into the grid. At the same time, the solar inverter performs online grid impedance ratio estimation. The estimated impedance ratio is used to update the active and reactive power references dynamically.

The control system is implemented in the synchronous d-q reference frame, which is synchronized with the voltage at the point of common coupling. The d-axis of the reference frame is aligned with the grid voltage vector. Therefore, the magnitude of the grid voltage is equal to the d-axis voltage component Vd, and the q-axis voltage component Vq is zero. This simplifies the calculation of active and reactive power and enables a straightforward feedback control design.
3. Grid Voltage and Frequency Control Principle
In a purely inductive grid, the grid voltage magnitude can be controlled by reactive power, while the frequency can be controlled by active power. In a purely resistive grid, the situation is reversed: the grid voltage magnitude is controlled by active power and the frequency by reactive power. However, actual distribution grids contain both resistance and reactance. The generalized droop control equations for a grid with mixed impedance are given as follows:
For an inductive grid (R ≪ X):
$$
\begin{cases}
f – f_0 = -k_p (P – P_0) \\
V – V_0 = -k_q (Q – Q_0)
\end{cases}
\tag{1}
$$
For a resistive grid (X ≪ R):
$$
\begin{cases}
f – f_0 = +k_p (Q – Q_0) \\
V – V_0 = -k_q (P – P_0)
\end{cases}
\tag{2}
$$
where kp and kq are the active and reactive power droop gains, V and f are the measured grid voltage magnitude and frequency, P and Q are the active and reactive power injected by the solar inverter, R and X are the resistive and reactive components of the grid impedance, V0 and f0 are the nominal voltage magnitude and frequency, P0 is the active power at the maximum power point, and Q0 is the reference reactive power.
For a grid with both resistance and reactance, the droop equations can be extended as follows:
$$
f – f_0 = -k_p \frac{X}{Z} (P – P_0) + k_q \frac{R}{Z} (Q – Q_0)
\tag{3}
$$
$$
V – V_0 = -k_p \frac{R}{Z} (P – P_0) – k_q \frac{X}{Z} (Q – Q_0)
\tag{4}
$$
where Z = sqrt(R² + X²) is the magnitude of the grid impedance. Since the grid voltage magnitude and frequency are measurable in real time, and the active and reactive power can be controlled by the solar inverter, equations (3) and (4) can be rearranged to obtain the active and reactive power references as functions of the voltage and frequency deviations:
$$
P – P_0 = -\frac{1}{k_p} \frac{X}{Z} (f – f_0) – \frac{1}{k_p} \frac{R}{Z} (V – V_0)
\tag{5}
$$
$$
Q – Q_0 = \frac{1}{k_q} \frac{R}{Z} (f – f_0) – \frac{1}{k_q} \frac{X}{Z} (V – V_0)
\tag{6}
$$
In practical applications, the frequency deviation can be neglected. The solar inverter is usually relatively small compared to the large generation units that determine the grid frequency. The frequency is a global parameter, while the voltage magnitude is a local parameter. Therefore, the solar inverter should follow the grid frequency and only regulate the local voltage magnitude. With this assumption, equations (5) and (6) become:
$$
P = -\frac{1}{k_p} \frac{R}{Z} (V – V_0) + P_0
\tag{7}
$$
$$
Q = -\frac{1}{k_q} \frac{X}{Z} (V – V_0)
\tag{8}
$$
Equations (7) and (8) show that the required control effort depends on the grid impedance components R and X. However, it is not necessary to estimate R and X separately for the purpose of voltage control. Only the impedance ratio α = R/X is needed. Using α, we can express:
$$
\frac{X}{Z} = \frac{X}{\sqrt{R^2 + X^2}} = \frac{1}{\sqrt{(R/X)^2 + 1}} = \frac{1}{\sqrt{\alpha^2 + 1}}
\tag{9}
$$
$$
\frac{R}{Z} = \frac{R}{\sqrt{R^2 + X^2}} = \frac{1}{\sqrt{(X/R)^2 + 1}} = \frac{\alpha}{\sqrt{\alpha^2 + 1}}
\tag{10}
$$
Substituting equations (9) and (10) into equations (7) and (8), and assuming the frequency deviation is zero, yields the droop control equations in terms of the impedance ratio:
$$
P = -\frac{\alpha}{\sqrt{\alpha^2 + 1}} \frac{1}{k_p} (V – V_0) + P_0
\tag{11}
$$
$$
Q = -\frac{1}{\sqrt{\alpha^2 + 1}} \frac{1}{k_q} (V – V_0)
\tag{12}
$$
These equations are the basis of the proposed grid voltage control strategy. The solar inverter measures the deviation of the grid voltage magnitude from the nominal value and computes the active and reactive power references according to the estimated impedance ratio α.
It is important to note that the voltage magnitude V is updated at the sampling rate of the analog-to-digital converter. The maximum power point P0 changes with solar irradiance, typically on a timescale of several seconds. The grid impedance ratio α is updated at the update rate of the impedance observer, which may also be in the range of several seconds. The control strategy remains valid as long as the impedance ratio is estimated reasonably accurately.
4. Active and Reactive Power Control
The active and reactive power references calculated from equations (11) and (12) must be translated into current references for the solar inverter. The control is performed in the d-q synchronous reference frame. Under balanced three-phase conditions, the instantaneous reactive power injected by the solar inverter into the grid is:
$$
Q(t) = -\frac{3}{2} V_d(t) i_q(t)
\tag{13}
$$
where iq is the q-axis current and Vd is the d-axis voltage magnitude. Therefore, the reactive power control can be achieved by controlling the q-axis current. Substituting equation (13) into equation (12) gives:
$$
i_q(t) = \frac{2}{3} \frac{1}{\alpha(t)^2 + 1} \frac{1}{k_q} \left[ 1 – \frac{V_0}{V_d(t)} \right]
\tag{14}
$$
Equation (14) provides the q-axis current reference directly from the voltage deviation. The solar inverter can either inject or absorb reactive power by changing the sign of iq. This capability allows the solar inverter to raise or lower the voltage at the point of common coupling as needed.
The active power control is more complex because the solar inverter is usually operated in coordination with the energy-collection converter. In conventional operation, the solar inverter transfers all the power generated by the photovoltaic panel at the maximum power point. However, in the proposed voltage control strategy, the power reference may be lower than the maximum power point. The active power reference is given by:
$$
P(t) = -\frac{\alpha(t)}{\alpha(t)^2 + 1} \frac{1}{k_p} \left[ V_d(t) – V_0 \right] + P_0(t)
\tag{15}
$$
where P0(t) is the maximum power point active power at time t. Since the solar inverter can only reduce the active power below P0, equation (15) is only effective for overvoltage situations. In the case of undervoltage, the calculated active power reference might be larger than P0, and the reference is saturated to P0. Undervoltage problems are usually addressed by reactive power compensation, which the solar inverter can also provide. Therefore, the main focus of the proposed strategy is to prevent overvoltage, which is more common in modern distribution networks with high photovoltaic penetration.
The active power reference from equation (15) is communicated to the energy-collection converter. The energy-collection converter adjusts its operating point accordingly. The solar inverter controls the dc-link voltage by balancing the input and output power. If the active power reference is below the maximum power available, the energy-collection converter reduces its output, preventing the dc-link voltage from rising excessively. In this way, the solar inverter injects the required active power into the grid while maintaining the dc-link voltage within a safe range.
5. Online Grid Impedance Ratio Estimation
The impedance ratio α is a crucial parameter in the proposed voltage control strategy. In high-voltage transmission systems, the impedance ratio is typically around 0.3. In medium-voltage networks, it is about 0.8. However, in low-voltage distribution networks, the impedance ratio can vary from 2 to 8 or even higher. Because of this wide variation, an accurate online impedance estimation method is necessary.
Among the various impedance estimation techniques, I choose the non-characteristic harmonic current injection method. This method is easy to implement because it does not require additional hardware. The solar inverter itself injects a small harmonic current into the grid. The grid voltage and current are measured, and a DFT is performed to extract the harmonic components. The grid impedance at the harmonic frequency is then computed. The impedance at the fundamental frequency (50 Hz) is approximated from the harmonic impedance using a correction factor.
For the h-th harmonic, the grid impedance is:
$$
Z_g(h) = R_g(h) + j X_g(h)
\tag{16}
$$
The h-th harmonic impedance is obtained from the voltage and current harmonics:
$$
Z_g(h) = \frac{V_g(h)}{I_L(h)}
\tag{17}
$$
where Vg(h) and IL(h) are the h-th harmonic voltage and current phasors obtained by DFT. The grid impedance at the fundamental frequency is approximated by:
$$
Z_g(50\,\text{Hz}) \approx \Re\left[\frac{V_g(h)}{I_L(h)}\right] + j \frac{2\pi \cdot 50\, \text{rad/s}}{\omega(h)} \Im\left[\frac{V_g(h)}{I_L(h)}\right]
\tag{18}
$$
where ω(h) is the angular frequency of the h-th harmonic. The approximation is valid if the harmonic frequency is close to the fundamental frequency. In this article, I use a harmonic frequency of 75 Hz, as suggested in previous studies. The injected harmonic current has a frequency of 75 Hz, which is 1.5 times the fundamental frequency. Since the control is performed in the d-q synchronous reference frame, the 75 Hz harmonic appears as a 25 Hz component in the d and q axis current references. The reference currents are modified as follows:
$$
i_{d,ref} = i_{d,ref,50} – B \cos(2\pi 25 t)
\tag{19}
$$
$$
i_{q,ref} = i_{q,ref,50} + B \sin(2\pi 25 t)
\tag{20}
$$
where id,ref,50 and iq,ref,50 are the d and q current references from the dc-link voltage controller and the reactive power controller, respectively. The parameter B is the amplitude of the injected harmonic current, limited by the solar inverter capacity. The injected harmonic current should be large enough to ensure a sufficient signal-to-noise ratio, but small enough to keep the total harmonic distortion within acceptable limits.
To compute the DFT, the sampling frequency is set to 3 kHz. The harmonic current is injected for 40 ms, which corresponds to 120 sampling points for both voltage and current. With N = 120 samples, the DFT base frequency is 3 kHz / 120 = 25 Hz. Therefore, the 75 Hz component appears as the third harmonic in the DFT result. The DFT expression for the third harmonic is:
$$
V(3) = \frac{1}{N} \sum_{n=0}^{N-1} v(n) e^{-j \frac{2\pi}{N} 3n}, \quad N=120
\tag{21}
$$
where v(n) is the sampled voltage data. The same calculation is performed for the current. The grid impedance at 75 Hz is then calculated, and the impedance ratio α is obtained.
I performed a simulation study using Matlab/Simulink to verify the online impedance estimation algorithm. The simulation model included a 220 V three-phase voltage source, grid impedance resistors and inductors, a 2 kW load, a 1 kW three-phase solar inverter, and a 400 V / 1 kW dc source. I compared the estimated impedance ratio with the actual value. The results are summarized in Table 1 below.
| Actual Impedance Ratio α | Relative Error of Estimated α (%) | Relative Error of R Estimation (%) | Relative Error of X Estimation (%) |
|---|---|---|---|
| 0.5 | 18.6 | 12.3 | 2.1 |
| 1.0 | 4.3 | 5.6 | 1.8 |
| 2.0 | 2.8 | 3.2 | 1.5 |
| 4.0 | 2.2 | 2.8 | 1.2 |
| 7.64 | 4.1 | 4.8 | 1.1 |
From Table 1, it can be observed that when the impedance ratio is greater than 1, the estimation accuracy is very high, with the relative error below 5%. However, when the impedance ratio is less than 1, the relative error increases significantly. This is because when the inductive component is large, the grid voltage becomes severely distorted, affecting the DFT calculation. The reactance estimation remains accurate across all tested conditions, with the relative error always below 5%. The resistance estimation error increases as the impedance ratio decreases, which consequently affects the accuracy of the impedance ratio estimation for small α values.
6. Proposed Grid Voltage Control Scheme
The overall control block diagram of the proposed grid voltage control strategy is presented conceptually. The grid voltage and current are measured and fed to the impedance ratio observer. The observer computes the estimated impedance ratio α using the DFT-based harmonic injection method. The grid voltage magnitude is also measured and compared with the nominal value V0. The voltage deviation is then used by the active and reactive power controllers, which implement equations (11) and (12). The outputs are the active power reference and the reactive power reference. These references are converted to d-q current references. The active power reference is sent to the energy-collection converter, while the reactive power reference is used to generate the q-axis current reference. The current controller of the solar inverter tracks these references and produces the gate signals for the switches.
The grid impedance ratio observer is triggered periodically or when a significant change in the grid voltage magnitude is detected. When a new impedance ratio is needed, the solar inverter injects the 75 Hz harmonic current for 40 ms. The DFT is then performed, and the impedance ratio is updated. The update of α modifies the coefficients in equations (11) and (12). The active and reactive power references are then recalculated according to the new impedance condition.
One important issue is the impact of impedance estimation errors on the voltage control performance. The estimation error tends to be positive, meaning that the estimated resistance is larger than the actual resistance. As a result, the solar inverter may inject more active power and less reactive power than necessary. This could cause the active power reference to saturate, which is undesirable. To mitigate this effect, I propose a modification of the weighting coefficients. Instead of using the nonlinear functions given by equations (9) and (10), I approximate them with linear functions as follows:
$$
\frac{1}{\alpha^2 + 1} \rightarrow 1 – \frac{\alpha}{8}
\tag{22}
$$
$$
\frac{\alpha}{\alpha^2 + 1} \rightarrow \frac{\alpha}{8}
\tag{23}
$$
where α is normalized with respect to a maximum expected impedance ratio of 8. This linearization reduces the sensitivity of the weighting coefficients to changes in α and decreases the impact of the impedance estimation error. The modified coefficients are used in the voltage control equations.
7. Experimental Results and Analysis
Extensive experiments were carried out to verify the proposed grid voltage control strategy. The experimental platform was set up according to the simulation model described earlier. The grid impedance components Xg1 and Rg1 were adjustable to change the impedance ratio. A switch was included to allow load-step tests. The solar inverter was rated at 1 kW and connected to a 220 V three-phase grid. The dc source was set to 400 V. The control algorithm was implemented on a digital signal processor.
7.1 Impedance Estimation Performance
In the experiment, the grid impedance ratio was changed step by step. For each impedance ratio, the online estimation was performed 400 times. Each estimation required 150 ms, so the complete set of 400 estimations took about one minute. The average of the 400 estimated values was compared with the actual impedance ratio. The results are shown in Table 2.
| Actual Impedance Ratio α | Average Estimated α | Relative Error (%) |
|---|---|---|
| 0.5 | 0.61 | 22.0 |
| 1.0 | 1.04 | 4.0 |
| 2.0 | 2.06 | 3.0 |
| 4.0 | 4.15 | 3.8 |
| 5.0 | 5.45 | 9.0 |
| 7.64 | 9.17 | 20.0 |
It is clear from Table 2 that the estimation accuracy is good for impedance ratios between 1 and 5. For ratios larger than 5, the relative error increases significantly. This is because the resistance component becomes large, and the voltage drop across the resistance disturbs the DFT-based estimation. To improve the accuracy for high impedance ratios, I increased the amplitude of the injected harmonic current. In a separate experiment, with the actual impedance ratio fixed at 7.64, the harmonic current amplitude was varied. The average relative error of the impedance ratio estimation was recorded and is presented in Table 3.
| Harmonic Current Amplitude B (A) | Relative Error of α Estimation (%) |
|---|---|
| 0.2 | 35.2 |
| 0.3 | 26.8 |
| 0.4 | 21.5 |
| 0.5 | 20.0 |
| 0.6 | 15.6 |
| 0.8 | 9.8 |
Increasing the harmonic current amplitude can effectively reduce the estimation error. However, the injected current should not exceed the allowable total harmonic distortion limit of the solar inverter. In the voltage control experiments, a harmonic current amplitude of 0.5 A was used as a compromise, while the fundamental current amplitude was 2.5 A.
7.2 Voltage Control Performance
The proposed grid voltage control strategy was tested under different grid impedance conditions. For each impedance ratio, two sets of experiments were performed: one without voltage control (conventional maximum power point tracking) and one with the proposed voltage control strategy. In the conventional mode, the energy-collection converter operated at the maximum power point and the solar inverter injected all available power into the grid. In the voltage control mode, the energy-collection converter operated at the power point requested by the voltage controller.
Table 4 summarizes the grid voltage magnitude in per unit for both cases across several impedance ratios.
| Actual Impedance Ratio α | Grid Voltage without Control (pu) | Grid Voltage with Control (pu) | Voltage Reduction (%) |
|---|---|---|---|
| 0.8 | 1.132 | 1.078 | 4.8 |
| 1.5 | 1.125 | 1.061 | 5.7 |
| 2.5 | 1.118 | 1.072 | 4.1 |
| 4.0 | 1.102 | 1.065 | 3.4 |
| 6.0 | 1.088 | 1.058 | 2.8 |
From Table 4, it can be observed that without the proposed control, the grid voltage exceeds 1.10 pu in most cases, which would trigger the overvoltage protection and disconnect the solar inverter. With the proposed control, the grid voltage is effectively limited to below 1.10 pu for all tested impedance ratios. The voltage reduction is more significant when the impedance ratio is low. For example, when α = 1.5, the voltage is reduced from 1.125 pu to 1.061 pu, a reduction of about 5.7%. When α = 6.0, the reduction is about 2.8%. This behavior is expected because at lower impedance ratios the active power has a stronger influence on the voltage magnitude, and the proposed control adjusts the active power reference accordingly.
It is also interesting to evaluate the relative improvement of the voltage control. When the impedance ratio is above 1.5, the overvoltage is improved by approximately 20%. When the impedance ratio is below 1.5, the improvement is about 40%. The proposed strategy significantly alleviates the overvoltage problem and prevents the solar inverter from being disconnected.
The experimental results clearly demonstrate the effectiveness of the proposed grid voltage control strategy. The solar inverter not only injects power into the grid but also contributes to voltage regulation by adjusting its active and reactive power outputs according to the estimated grid impedance ratio.
8. Conclusion
In this article, I have presented a comprehensive grid voltage control strategy for solar inverters in distributed generation systems. The proposed strategy uses the online estimated grid impedance ratio R/X to determine the appropriate mix of active and reactive power control actions. The solar inverter measures the grid voltage magnitude and compares it with the nominal value. The active and reactive power references are then calculated using droop-based control equations that explicitly depend on the impedance ratio. The grid impedance ratio is estimated online using the non-characteristic harmonic current injection method with DFT analysis. This method is implemented within the existing control structure of the solar inverter without additional hardware.
Simulation and experimental results have shown that the proposed impedance estimation method provides accurate results for a wide range of impedance ratios, particularly for ratios greater than 1. For very small impedance ratios, the estimation error increases, but the voltage control performance remains satisfactory. The proposed voltage control strategy effectively limits the grid voltage to below 110% of the nominal value in all tested scenarios. This prevents the solar inverter from tripping due to overvoltage and allows continuous operation even under high solar irradiance and low load conditions.
The strategy sacrifices a small amount of available photovoltaic energy to achieve grid voltage stability. This trade-off is acceptable because the alternative would be complete disconnection of the solar inverter and loss of all generated energy. The control strategy is not limited to solar inverters; it can also be applied to other types of distributed generation grid-connected converters, such as wind turbines and energy storage systems.
Future work will focus on two aspects. The first is to establish a quantitative relationship between the solar inverter capacity and the grid voltage control effectiveness. The second is to analyze the theoretical causes of the impedance estimation error trends at different impedance ratios and to develop a refined estimation algorithm that reduces these errors. The proposed strategy provides a solid foundation for the integration of distributed generation into future smart grids.
