Distributed Solar Inverter for Comprehensive Power Quality Compensation

Distributed Solar Inverter for Comprehensive Power Quality Compensation

In recent years, I have observed that the integration of renewable energy sources, particularly solar photovoltaic systems, has grown rapidly in distribution networks. However, the increasing penetration of distributed solar inverters also brings new challenges related to power quality. Among the most pressing issues are harmonic distortion, voltage deviation, three-phase unbalance, and poor power factor. These problems are largely caused by the extensive use of nonlinear and unbalanced loads in the distribution grid. To address these concerns, I have developed and studied a comprehensive compensation device that utilizes the redundant capacity of a distributed solar inverter. This device, which I refer to as a DG-FACTS smart inverter, is capable of simultaneously compensating reactive power, harmonics, and negative-sequence currents without interfering with its primary function of grid-connected power generation. In this article, I present my research findings and the technical details of the proposed control strategies.

My approach is motivated by the fact that a conventional solar inverter and an active power filter or static var generator share very similar power electronic topologies. The main difference lies in the control objectives: a solar inverter normally injects only fundamental active current, whereas an active power filter injects harmonics and reactive current. By cleverly merging these control objectives, I can transform a standard distributed solar inverter into a multifunctional power quality compensator, thereby maximizing the utilization of existing hardware. This concept is often called power quality integrated management using distributed generation, abbreviated as DG-FACTS. The goal is to achieve comprehensive compensation of harmonics, reactive power, and negative-sequence currents while maintaining the solar inverter’s ability to feed solar power into the grid.

In the course of my work, I have designed a complete control framework that includes harmonic detection, reactive power command extraction, unbalanced component detection, instruction current synthesis, and current tracking. I have also paid special attention to the differences in main circuit parameters between a solar inverter and a dedicated power quality conditioner. The proposed algorithms are carefully selected and adapted to be easily implemented on a digital signal processor. To verify the feasibility, I built a detailed simulation model in MATLAB/Simulink. The simulation results confirm that the distributed solar inverter can effectively improve power quality while delivering solar power, achieving a total harmonic distortion reduction from 24.12% to 2.93% and improving the power factor from 0.7 to unity.

Parameter Value
Reactive load 10 mH
Unbalanced load A phase 1 Ω, 3 mH
Unbalanced load B phase 1 Ω, 3 mH
Unbalanced load C phase 3 Ω, 10 mH
Nonlinear load Rectifier bridge load
LCL filter L1 0.4 mH
LCL filter L2 0.04 mH
LCL filter C 20 μF
Switching frequency 10 kHz
DC-side capacitor 5000 μF

The system architecture that I employ in this study is shown conceptually in the following schematic. A three-phase three-wire solar inverter is connected to the grid through an LCL filter. The photovoltaic array is connected to the DC side, with an optional DC/DC converter in between, depending on the operating environment and parameter design. The controller samples the photovoltaic output voltage and current, and generates the active current command based on the maximum power point tracking algorithm. Simultaneously, the controller samples the load current or grid current, and extracts the corresponding command currents through reactive power detection, harmonic detection, and negative-sequence detection. These command currents are then synthesized according to a priority-based strategy. Finally, a closed-loop current controller and IGBT driver circuit are used to achieve zero-error tracking of the comprehensive command current.

System Architecture and DG-FACTS Concept

The proposed distributed solar inverter for power quality compensation is essentially a grid-connected voltage-source converter with an advanced controller. The hardware structure is identical to that of a conventional solar inverter, but the control software is extended to include multiple compensation loops. In my design, there are three main operating states: (1)grid-connected power generation only, (2)simultaneous power generation and power quality compensation, and (3)power quality compensation only when there is no solar irradiation but the inverter capacity is available. This flexibility ensures that the distributed solar inverter is not idle when renewable power is unavailable, thereby increasing its economic value.

The core of the DG-FACTS function is the accurate and fast extraction of compensation command currents. Since the main circuit parameters of a solar inverter are originally designed for fundamental active power transfer, the detection algorithms and current tracking controllers must be robust to parameter mismatches and switching frequency constraints. I have therefore selected detection methods that are computationally efficient and can be easily embedded in a digital controller.

Harmonic Detection Algorithm

Harmonic detection is the first important step. In distribution systems, the dominant harmonics are usually below the 25th order. The compensation device does not need to eliminate all harmonics; it can selectively compensate low-order harmonics. Therefore, I have chosen a harmonic detection method based on an improved sliding-window iterative discrete Fourier transform (DFT). This algorithm allows for the separate extraction of each harmonic component with low computational burden.

The conventional DFT coefficients for the nth harmonic are calculated as:

$$a_n = \frac{2}{N} \sum_{i=N_{new}-N+1}^{N_{new}} u(i\tau) \cos(n\omega i\tau)$$

$$b_n = \frac{2}{N} \sum_{i=N_{new}-N+1}^{N_{new}} u(i\tau) \sin(n\omega i\tau)$$

where \(N\) is the number of sampling points per fundamental period, \(N_{new}\) is the index of the latest sampled data, \(\tau\) is the sampling interval, and \(\omega\) is the fundamental angular frequency. In the sliding-window iterative implementation, the summation is updated recursively by adding the contribution of the newest sample and removing the contribution of the oldest sample. This leads to a simple recursive formula:

$$\sum_{i=N_{new}-N+1}^{N_{new}} u(i\tau) \cos(n\omega i\tau) = \sum_{i=N_{new}-N}^{N_{new}-1} u(i\tau) \cos(n\omega i\tau) – u((N_{new}-N)\tau) \cos(n\omega (N_{new}-N)\tau) + u(N_{new}\tau) \cos(n\omega N_{new}\tau)$$

$$\sum_{i=N_{new}-N+1}^{N_{new}} u(i\tau) \sin(n\omega i\tau) = \sum_{i=N_{new}-N}^{N_{new}-1} u(i\tau) \sin(n\omega i\tau) – u((N_{new}-N)\tau) \sin(n\omega (N_{new}-N)\tau) + u(N_{new}\tau) \sin(n\omega N_{new}\tau)$$

This algorithm is particularly suitable for the digital signal processor because each update requires only one addition and one subtraction for the accumulated buffer. In my implementation, I store the product of each sampled value and the corresponding rotation factor in a continuous data buffer. The harmonic current is then reconstructed by using the real-time computed coefficients and applying the inverse DFT formula. The detection delay is significantly reduced compared to the traditional full-point DFT, which is essential for real-time compensation.

Harmonic detection method Advantages Disadvantages
Improved sliding-window DFT Selective harmonic extraction, low computational cost, suitable for DSP Requires sinusoidal reference, memory buffer
Instantaneous reactive power theory (p-q) Fast response, good for total reactive and harmonic detection Less selective for individual harmonics

Reactive Power Detection Algorithm

For reactive power compensation, I have adopted the \(i_p-i_q\) method based on the instantaneous reactive power theory. This method is widely used because it has a small computational burden and strong anti-interference capability. The block diagram of the \(i_p-i_q\) extraction principle is shown conceptually. The three-phase grid voltage is passed through a phase-locked loop to generate a unit sine signal \(\sin\omega t\) and a cosine signal \(-\cos\omega t\). These signals are used to transform the three-phase load current into a two-phase rotating reference frame. The transformation matrices are defined as:

$$C_{32} = \sqrt{\frac{2}{3}} \begin{bmatrix} 1 & -\frac{1}{2} & -\frac{1}{2} \\ 0 & \frac{\sqrt{3}}{2} & -\frac{\sqrt{3}}{2} \end{bmatrix}$$

$$C_{pq} = \begin{bmatrix} \sin\omega t & -\cos\omega t \\ -\cos\omega t & -\sin\omega t \end{bmatrix}$$

After applying the \(C_{32}\) and \(C_{pq}\) transformations, the instantaneous real and imaginary powers \(i_p\) and \(i_q\) are obtained. The direct current components \(\bar{i_p}\) and \(\bar{i_q}\) are extracted using low-pass filters. These DC components correspond to the fundamental positive-sequence active and reactive currents, respectively. By applying inverse transformations, the fundamental active reference currents can be reconstructed, and the difference between the original load current and the fundamental active current gives the combined harmonic and reactive current command. For the DG-FACTS function, I need separate reactive and harmonic commands, so I use the \(i_p-i_q\) method to obtain the reactive current component directly from \(\bar{i_q}\) while the harmonic component is obtained from the harmonic detection algorithm described earlier.

The \(i_p-i_q\) method is preferred because it is less sensitive to voltage waveform distortion than the original p-q method. In low-voltage distribution networks, voltage distortion is common, and the \(i_p-i_q\) method uses the phase-locked loop to synchronize with the fundamental positive-sequence voltage, ensuring accurate detection of the fundamental reactive current.

Negative-Sequence Current Detection Algorithm

Three-phase unbalance in the distribution network is another critical power quality issue. The negative-sequence component of the load current is responsible for additional losses and heating in transformers and rotating machines. A three-phase three-wire solar inverter can compensate the negative-sequence current without affecting the zero-sequence path, because there is no neutral conductor. I have chosen a negative-sequence detection method based on rotating coordinate transformation. In a negative-sequence synchronous reference frame, the negative-sequence components appear as DC quantities, while the positive-sequence components appear as AC components with twice the fundamental frequency. By applying a low-pass filter, the DC negative-sequence component can be extracted.

For a three-phase current vector \(\mathbf{I}_{abc}\), the positive-sequence current \(\mathbf{I}_{abc}^{p}\) and negative-sequence current \(\mathbf{I}_{abc}^{n}\) can be separated using the following transformation:

$$\mathbf{I}^n_{abc} = T^n \mathbf{I}_{abc}$$

where \(T^n\) is the negative-sequence transformation matrix. In my implementation, I transform the three-phase current into the αβ stationary frame and then into the dq frame rotating at the negative fundamental angular velocity \(-ω\). The dq components are filtered to obtain the DC negative-sequence values. The inverse transformation gives the negative-sequence current command. This method provides a clean extraction of the unbalanced component with a relatively fast response.

Instruction Current Synthesis

One of the most important contributions of my work is the instruction current synthesis strategy. A distributed solar inverter must first satisfy the grid-connected power generation requirement. Only the remaining current capacity can be used for power quality compensation. Therefore, I calculate the available current margin as:

$$i_{AMP}^* = i_n^* – i_p^*$$

where \(i_n^*\) is the rated current of the inverter switches, and \(i_p^*\) is the photovoltaic active current command. If the total compensation current \(i_c^*\) (the sum of reactive current \(i_q^*\), harmonic current \(i_{sh}^*\), and negative-sequence current \(i_{-}^*\)) is less than or equal to \(i_{AMP}^*\), all compensation functions can be performed simultaneously. Otherwise, the user must set a priority order among the three compensation functions. The priority-based synthesis can be expressed as:

$$i_{ref}^* = i_p^* + i_c^* = i_p^* + k_1 i_1^* + k_2 i_2^* + k_3 i_3^*$$

where \(i_1^*\) is the first priority current command, \(i_2^*\) is the second, \(i_3^*\) is the third, and \(k_1, k_2, k_3\) are the corresponding enabling coefficients. The coefficients are either 1 or 0 depending on the available current margin. If the first priority current exceeds the margin, a proportional amplitude scaling algorithm is applied to limit the compensation current linearly:

$$i_c^* = \frac{i_{AMP}^*}{I_1^*} i_1^*$$

If the first priority current is within the margin, the second priority current is evaluated with respect to the remaining margin \(i_{AMP1}^* = i_n^* – i_p^* – i_1^*\). If the second priority also exceeds the remaining margin, the scaling is applied to the second component. The same logic extends to the third priority. This strategy ensures that the solar inverter never operates over its rated current while maximizing the compensation effectiveness according to user preferences.

The flow of the instruction current synthesis is as follows: first, detect the photovoltaic output voltage and current, and compute \(i_p^*\) by a PI controller that regulates the DC-link voltage to the maximum power point voltage. Second, detect the load current and calculate the required compensation currents \(i_q^*\), \(i_{sh}^*\), and \(i_{-}^*\). Third, compare the total compensation demand with \(i_{AMP}^*\). If the demand is less, combine all components. If not, apply the priority-based scaling and limiting. This approach provides a practical and flexible solution for the DG-FACTS inverter.

Priority scenario Current margin condition Compensation current expression
All compensation possible \(i_c^* \le i_{AMP}^*\) \(i_c^* = i_q^* + i_{sh}^* + i_{-}^*\)
First priority exceeds margin \(i_1^* > i_{AMP}^*\) \(i_c^* = i_{AMP}^* i_1^* / I_1^*\)
Second priority exceeds remaining margin \(i_1^* \le i_{AMP}^*, i_2^* > i_{AMP1}^*\) \(i_c^* = i_1^* + (i_{AMP1}^* i_2^* / I_2^*)\)
Third priority exceeds remaining margin \(i_1^* \le i_{AMP}^*, i_2^* \le i_{AMP1}^*, i_3^* > i_{AMP2}^*\) \(i_c^* = i_1^* + i_2^* + (i_{AMP2}^* i_3^* / I_3^*)\)

Current Tracking Control

To achieve accurate tracking of the complex synthesized current command, I selected a current controller based on improved repetitive control. The repetitive control method provides zero steady-state error for periodic signals such as harmonics and is well suited for active power filters and power quality compensators. In my design, the controller includes a proportional term for fast dynamic response and a repetitive term for steady-state accuracy. The repetitive controller is implemented in discrete time using a delay line of one fundamental period. The transfer function of the repetitive controller is:

$$G_c(z) = \frac{k_r z^{-N}}{1 – Q(z) z^{-N}}$$

where \(N\) is the number of samples per fundamental period, \(k_r\) is the repetitive gain, and \(Q(z)\) is a low-pass filter used to improve stability. The combined current controller also includes a PI regulator in parallel to enhance the transient response. The output of the controller is passed through a PWM modulator to generate the gating signals for the IGBTs. I have verified that this controller can track the reference current with high accuracy, as the simulation results show the output power values track the commands with an error of less than 1%.

Simulation Verification

To validate the proposed distributed solar inverter with comprehensive power quality compensation, I built a simulation model in MATLAB/Simulink. The system parameters are listed in Table 1. I intentionally included a rectifier bridge as the nonlinear load, an RL load as the reactive load, and three-phase asymmetric loads to create unbalanced conditions. The simulation sequence is as follows:

  • At \(t = 0.05\) s, the solar inverter starts operating with power generation.
  • At \(t = 0.14\) s, the solar inverter begins to compensate the unbalance current.
  • At \(t = 0.34\) s, the solar inverter starts to output active power command from the photovoltaic array.
  • At \(t = 0.54\) s, the solar inverter begins to compensate reactive power.
  • At \(t = 0.74\) s, the solar inverter starts to compensate harmonic current.

This sequence helps to demonstrate that the solar inverter can gradually increase its compensation functions while maintaining grid-connected power generation. The simulation results show the grid-side current waveform before and after compensation. After the comprehensive compensation is enabled, the grid-side current becomes balanced and sinusoidal. The three-phase current unbalance is eliminated, and the harmonic distortion is significantly reduced. The power factor is improved from 0.7 to 1.0, indicating that the reactive power compensation is effective. The DC-side photovoltaic output delivers 35 kW of active power and 10.6 kW of reactive power in this test, all within the inverter current ratings.

A detailed FFT analysis of the A-phase grid current before and after compensation shows that the total harmonic distortion drops from 24.12% to 2.93%. This result meets the IEEE-519 harmonic limits and demonstrates the strong harmonic suppression capability of the proposed distributed solar inverter. The dynamic response is also examined: after the compensation starts, the waveform transitions smoothly from a distorted asymmetric shape to a clean sinusoidal waveform within a few fundamental cycles. These results confirm the practical feasibility of implementing DG-FACTS functionality in a distributed solar inverter.

Quantity Before compensation After compensation
Current THD 24.12% 2.93%
Power factor 0.70 1.00
Three-phase balance Unbalanced Balanced
Waveform shape Distorted Sinusoidal

Conclusion

In this work, I have presented a comprehensive power quality compensation device based on a distributed solar inverter. The proposed DG-FACTS approach allows the solar inverter to serve as a multifunctional device that can simultaneously inject solar power and improve the power quality of the distribution network. I have designed a complete set of detection algorithms, including the improved sliding-window DFT for selective harmonic extraction, the \(i_p-i_q\) method for reactive current detection, and the rotating coordinate transformation for negative-sequence current extraction. The instruction current synthesis strategy based on priority setting and amplitude scaling ensures that the solar inverter operates safely within its rated current while providing the maximum possible compensation.

The simulation results demonstrate the effectiveness of the proposed methods. With the distributed solar inverter performing comprehensive compensation, the grid-side current becomes balanced and sinusoidal, the total harmonic distortion is reduced to below 3%, and the power factor approaches unity. The active power output of the solar inverter is maintained at the expected level, confirming that the compensation functions do not interfere with the primary photovoltaic power generation.

I believe that this research provides a valuable reference for the practical application of distributed solar inverters in power quality management. By integrating DG-FACTS functions into existing solar inverters, utilities and customers can benefit from improved power quality without the need for additional dedicated compensation devices. This approach not only reduces investment costs but also increases the utilization efficiency of the distributed solar inverter, which is particularly important in modern smart grid and renewable energy integration scenarios.

Scroll to Top