top of page

Harmonic Mitigation in Grid-Connected PV System Using Shunt Active Power Filter

7 days ago
7 min read

Harmonic Mitigation in Grid-Connected PV System Using Shunt Active Power Filter


𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧

Grid-connected solar photovoltaic systems are increasingly used for clean and sustainable power generation. However, when 𝐧𝐨𝐧-𝐥𝐢𝐧𝐞𝐚𝐫 𝐥𝐨𝐚𝐝𝐬 are connected at the point of common coupling (PCC), they can introduce current harmonics and reduce grid power quality.


Harmonic Mitigation in Grid-Connected PV System Using Shunt Active Power Filter


Harmonic Mitigation in Grid-Connected PV System Using Shunt Active Power Filter

Harmonic Mitigation in Grid connected PV using Shunt Active Filter in MATLAB
₹12,000.00₹6,000.00
Buy Now


This MATLAB/Simulink model demonstrates 𝐡𝐚𝐫𝐦𝐨𝐧𝐢𝐜 𝐦𝐢𝐭𝐢𝐠𝐚𝐭𝐢𝐨𝐧 in a grid-connected PV system using a 𝐒𝐡𝐮𝐧𝐭 𝐀𝐜𝐭𝐢𝐯𝐞 𝐏𝐨𝐰𝐞𝐫 𝐅𝐢𝐥𝐭𝐞𝐫 (SAPF).

The complete system combines:

  • 100.2 kW solar PV array

  • Boost converter with Incremental Conductance MPPT

  • 700 V DC-link

  • Three-phase grid-connected inverter

  • LCL filter

  • 400 V, 50 Hz utility grid

  • Non-linear diode rectifier load

  • Shunt active power filter

  • PQ-theory-based reference current generation

  • Hysteresis current control

  • FFT-based harmonic analysis

The simulation compares grid current quality under three different operating conditions and clearly shows the effectiveness of the active power filter.

𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰

The proposed system transfers solar PV power to the utility grid while simultaneously compensating harmonic currents produced by the non-linear load.

Main System Parameters

Parameter

Value

PV array rated power

100.2 kW

Parallel PV strings

47

Modules per string

10

Single PV module maximum power

213.15 W

Module voltage at maximum power

29 V

PV-side operating voltage

Approximately 290 V

DC-link reference voltage

700 V

Grid voltage

400 V

Grid frequency

50 Hz

Initial grid-current THD

3.63%

THD with non-linear load

7.23%

THD after SAPF compensation

4.85%

The system is designed so that the PV inverter injects active power into the grid, while the shunt active filter compensates for harmonic current created by the non-linear load.

𝐏𝐕 𝐀𝐫𝐫𝐚𝐲 𝐚𝐧𝐝 𝐁𝐨𝐨𝐬𝐭 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫

The solar generation section uses a 𝐏𝐕 𝐚𝐫𝐫𝐚𝐲 𝐫𝐚𝐭𝐞𝐝 𝐚𝐭 𝟏𝟎𝟎.𝟐 𝐤𝐖.

Its configuration consists of:

  • 47 parallel strings

  • 10 modules connected in series per string

  • 213.15 W maximum power from each module

  • 29 V module voltage at the maximum power point

The PV array is connected to a DC-DC boost converter.

Boost Converter Functions

The converter performs two important tasks:

  • Extracts the maximum available solar power.

  • Increases the PV-side voltage from approximately 290 V to the required 700 V DC-link level.

An 𝐈𝐧𝐜𝐫𝐞𝐦𝐞𝐧𝐭𝐚𝐥 𝐂𝐨𝐧𝐝𝐮𝐜𝐭𝐚𝐧𝐜𝐞 𝐌𝐏𝐏𝐓 algorithm controls the boost converter.

𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬

The overall energy conversion and harmonic compensation process can be understood in a few stages.

1. Solar Power Generation

The PV array generates DC power according to the available solar irradiance and operating temperature.

2. Maximum Power Point Tracking

The MPPT controller receives:

  • PV voltage

  • PV current

It continuously determines the required operating point for extracting maximum available PV power.

3. Boost Conversion

The reference generated by the MPPT controller is compared with the measured PV voltage.

The resulting control error is processed through a PI controller to obtain the switching command for the boost converter.

This enables the system to:

  • Maintain PV operation near the maximum power point.

  • Increase the DC voltage to approximately 700 V.

4. Grid Power Injection

The regulated DC-link voltage supplies the three-phase inverter.

The inverter converts the DC power into three-phase AC power and injects it into the utility grid through an LCL filter.

5. Harmonic Generation

When the non-linear load is connected to the PCC, distorted current is drawn from the system.

This significantly increases grid current harmonic distortion.

6. Harmonic Compensation

The shunt active power filter detects the undesirable current components and injects compensating current at the PCC.

As a result, the current drawn from the grid becomes much closer to a sinusoidal waveform.

𝐈𝐧𝐜𝐫𝐞𝐦𝐞𝐧𝐭𝐚𝐥 𝐂𝐨𝐧𝐝𝐮𝐜𝐭𝐚𝐧𝐜𝐞 𝐌𝐏𝐏𝐓 𝐂𝐨𝐧𝐭𝐫𝐨𝐥

The PV boost converter uses the 𝐈𝐧𝐜𝐫𝐞𝐦𝐞𝐧𝐭𝐚𝐥 𝐂𝐨𝐧𝐝𝐮𝐜𝐭𝐚𝐧𝐜𝐞 𝐌𝐏𝐏𝐓 method.

The controller monitors:

  • PV array voltage

  • PV array current

Based on these measurements, the controller determines the appropriate reference voltage required for maximum power extraction.

The reference is then compared with actual PV voltage and processed using a PI controller.

The resulting switching signal controls the boost converter IGBTs.

Key Benefits

  • Efficient PV power extraction

  • Improved operation during changing solar conditions

  • Stable DC-link supply

  • Suitable integration with grid-connected PV converters

𝐆𝐫𝐢𝐝-𝐒𝐢𝐝𝐞 𝐈𝐧𝐯𝐞𝐫𝐭𝐞𝐫 𝐂𝐨𝐧𝐭𝐫𝐨𝐥

The three-phase inverter uses 𝐯𝐨𝐥𝐭𝐚𝐠𝐞 𝐚𝐧𝐝 𝐜𝐮𝐫𝐫𝐞𝐧𝐭 𝐜𝐨𝐧𝐭𝐫𝐨𝐥 with feed-forward decoupling.

A Phase-Locked Loop (PLL) provides the angular position required for synchronous reference-frame transformations.

Control Process

  • Grid voltages are measured.

  • Inverter/grid currents are measured.

  • Three-phase quantities are transformed into dq components.

  • The 700 V DC-link reference is compared with the actual DC-link voltage.

  • The outer voltage controller generates the active-current reference.

  • The reactive-current reference is maintained at zero for unity-power-factor-oriented operation.

  • Actual dq currents are compared with their respective references.

  • PI current controllers process the errors.

  • Feed-forward decoupling improves current-loop performance.

  • The dq control commands are transformed back into three-phase quantities.

  • PWM pulses are generated for the inverter switches.

This control structure maintains the 𝐃𝐂-𝐥𝐢𝐧𝐤 𝐯𝐨𝐥𝐭𝐚𝐠𝐞 𝐚𝐭 𝟕𝟎𝟎 𝐕 while supporting controlled active-power transfer to the grid.

𝐋𝐂𝐋 𝐅𝐢𝐥𝐭𝐞𝐫

An LCL filter is placed between the PV inverter and the PCC.

Its main purpose is to suppress high-frequency switching components created by inverter PWM operation.

Advantages of the LCL Filter

  • Reduces inverter switching ripple

  • Improves grid-current waveform

  • Limits high-frequency harmonic injection

  • Provides better filtering than a simple inductive interface

The LCL filter mainly handles inverter switching harmonics, while the shunt active power filter compensates harmonic currents associated with the non-linear load.

𝐍𝐨𝐧-𝐋𝐢𝐧𝐞𝐚𝐫 𝐋𝐨𝐚𝐝

The non-linear load is modeled using a 𝐝𝐢𝐨𝐝𝐞 𝐫𝐞𝐜𝐭𝐢𝐟𝐢𝐞𝐫 𝐰𝐢𝐭𝐡 𝐚𝐧 𝐑𝐋 𝐥𝐨𝐚𝐝.

Unlike a conventional linear load, the rectifier does not draw a purely sinusoidal current.

Instead, it introduces harmonic components into the current waveform.

When connected at the PCC, these harmonics increase grid current distortion even though the grid voltage and PV power may remain relatively stable.

𝐒𝐡𝐮𝐧𝐭 𝐀𝐜𝐭𝐢𝐯𝐞 𝐏𝐨𝐰𝐞𝐫 𝐅𝐢𝐥𝐭𝐞𝐫

The 𝐒𝐀𝐏𝐅 is connected in parallel with the grid and non-linear load at the PCC.

Its main components include:

SAPF Component

Function

DC-link capacitor

Provides the filter inverter DC energy buffer

Three-phase inverter

Generates compensating currents

Coupling inductors

Connect the SAPF inverter to the PCC

DC voltage controller

Maintains the required filter DC voltage

PQ-theory controller

Determines harmonic compensation references

Hysteresis controller

Generates switching pulses for the filter inverter

Rather than supplying the load power directly, the SAPF generates the current required to cancel unwanted harmonic components.

𝐏𝐐-𝐓𝐡𝐞𝐨𝐫𝐲-𝐁𝐚𝐬𝐞𝐝 𝐇𝐚𝐫𝐦𝐨𝐧𝐢𝐜 𝐂𝐨𝐦𝐩𝐞𝐧𝐬𝐚𝐭𝐢𝐨𝐧

The active filter reference currents are generated using 𝐢𝐧𝐬𝐭𝐚𝐧𝐭𝐚𝐧𝐞𝐨𝐮𝐬 𝐩𝐨𝐰𝐞𝐫 𝐭𝐡𝐞𝐨𝐫𝐲, commonly known as PQ theory.

The control sequence includes:

  • Measuring three-phase grid voltage.

  • Measuring non-linear load current.

  • Transforming three-phase signals into αβ0 components.

  • Determining instantaneous real and reactive power components.

  • Separating average and oscillating components.

  • Including the power-loss component generated by the DC-link PI controller.

  • Calculating the required compensating currents.

  • Converting the compensation references back into three-phase currents.

These reference currents determine how much compensating current the active filter should inject into each phase.

𝐇𝐲𝐬𝐭𝐞𝐫𝐞𝐬𝐢𝐬 𝐂𝐮𝐫𝐫𝐞𝐧𝐭 𝐂𝐨𝐧𝐭𝐫𝐨𝐥

The generated compensation current references are compared with the actual SAPF currents.

The resulting current errors are processed using 𝐡𝐲𝐬𝐭𝐞𝐫𝐞𝐬𝐢𝐬 𝐜𝐮𝐫𝐫𝐞𝐧𝐭 𝐜𝐨𝐧𝐭𝐫𝐨𝐥.

The hysteresis controller directly generates switching commands for the active filter inverter.

Its advantages include:

  • Fast dynamic response

  • Simple implementation

  • Effective current tracking

  • Good suitability for active power filtering

𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐌𝐨𝐝𝐞𝐬

The MATLAB/Simulink model is evaluated under three main operating conditions.

Mode

System Condition

Grid Current THD

Observation

Mode 1

PV-grid system without non-linear load and SAPF

3.63%

Grid current remains within the selected 5% benchmark

Mode 2

Non-linear load connected without SAPF compensation

7.23%

Grid current becomes highly distorted

Mode 3

Non-linear load with SAPF compensation

4.85%

Harmonics are reduced below the selected 5% benchmark

This comparison makes the effect of the active filter easy to observe.

𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬

Case 1: PV System Without Non-Linear Load

Initially, the PV system operates without the non-linear load and without active-filter compensation.

The observed grid-current THD is:

THD = 3.63%

Key observations:

  • PV power reaches steady operation.

  • DC-link voltage is regulated close to 700 V.

  • Three-phase grid voltage remains sinusoidal.

  • Grid current has relatively low harmonic distortion.

Case 2: Non-Linear Load Connected

The diode-rectifier-based non-linear load is then connected at the PCC.

The measured grid-current distortion increases to:

THD = 7.23%

The key effect is clearly visible:

  • PV power remains stable.

  • Grid voltage remains largely unaffected.

  • Grid current becomes distorted.

  • Harmonic components increase considerably.

  • The selected 5% harmonic benchmark is exceeded.

This operating condition demonstrates why additional harmonic compensation is necessary.

Case 3: Shunt Active Power Filter Connected

The SAPF is finally connected at the PCC while maintaining the same non-linear loading condition.

The resulting grid-current THD becomes:

THD = 4.85%

The filter therefore reduces the distortion from 7.23% to 4.85%.

THD Comparison

Operating Condition

THD

PV system without non-linear load

3.63%

With non-linear load

7.23%

With non-linear load + SAPF

4.85%

The result confirms that the active filter significantly improves grid-current quality.

𝐇𝐚𝐫𝐦𝐨𝐧𝐢𝐜 𝐑𝐞𝐝𝐮𝐜𝐭𝐢𝐨𝐧 𝐏𝐞𝐫𝐟𝐨𝐫𝐦𝐚𝐧𝐜𝐞

The most important comparison is between operation with the non-linear load before and after active-filter compensation.

Performance Indicator

Before SAPF

After SAPF

Grid-current THD

7.23%

4.85%

Current waveform

Distorted

Improved

Harmonic compensation

No

Yes

SAPF status

Disconnected

Connected

Power quality

Reduced

Improved

The SAPF reduces unwanted harmonic current by injecting an opposing compensating current at the PCC.

𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬

  • 𝐇𝐢𝐠𝐡-𝐩𝐨𝐰𝐞𝐫 𝟏𝟎𝟎.𝟐 𝐤𝐖 𝐏𝐕 𝐬𝐲𝐬𝐭𝐞𝐦

  • Incremental Conductance MPPT control

  • DC-DC boost converter

  • 700 V regulated DC-link

  • Three-phase grid-connected voltage source inverter

  • Synchronous dq current control

  • Feed-forward decoupling

  • PLL-based grid synchronization

  • LCL grid-interface filter

  • Diode-rectifier-based non-linear load

  • Shunt active power filter

  • PQ-theory reference current generation

  • PI-based SAPF DC-link regulation

  • Hysteresis current controller

  • FFT-based grid-current harmonic analysis

  • THD comparison under three operating conditions

𝐖𝐡𝐲 𝐒𝐡𝐮𝐧𝐭 𝐀𝐜𝐭𝐢𝐯𝐞 𝐏𝐨𝐰𝐞𝐫 𝐅𝐢𝐥𝐭𝐞𝐫 𝐢𝐬 𝐈𝐦𝐩𝐨𝐫𝐭𝐚𝐧𝐭

Renewable energy systems increasingly operate alongside power-electronic loads such as:

  • Rectifiers

  • Variable-frequency drives

  • Battery chargers

  • Switched-mode power supplies

  • Industrial electronic loads

Such equipment can produce substantial current harmonics.

A shunt active power filter provides an effective solution because its compensation can adapt dynamically to variations in load current.

Compared with relying only on passive filtering, active compensation provides greater flexibility when load conditions change.

𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬

This type of grid-connected PV harmonic mitigation system is useful in:

  • Solar PV power plants

  • Grid-connected renewable energy systems

  • Industrial distribution networks

  • Commercial buildings with non-linear loads

  • Smart-grid systems

  • Renewable-energy-based microgrids

  • Power-quality improvement studies

  • Active power filter research

  • Grid-connected converter control studies

  • Harmonic analysis using MATLAB/Simulink

𝐖𝐡𝐚𝐭 𝐂𝐚𝐧 𝐁𝐞 𝐋𝐞𝐚𝐫𝐧𝐞𝐝 𝐅𝐫𝐨𝐦 𝐓𝐡𝐢𝐬 𝐌𝐨𝐝𝐞𝐥?

Students, engineers, and researchers can use this system architecture to understand:

  • How a grid-connected PV array delivers active power.

  • How Incremental Conductance MPPT operates with a boost converter.

  • How a 700 V DC-link can be regulated.

  • How dq control is implemented for a three-phase inverter.

  • Why PLL synchronization is required.

  • How non-linear loads create grid-current harmonics.

  • How PQ theory is used for harmonic compensation.

  • How hysteresis current control operates in an active filter.

  • How FFT analysis is used to calculate THD.

  • How SAPF compensation improves grid-current waveform quality.

𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧

The MATLAB/Simulink model demonstrates an effective method for 𝐡𝐚𝐫𝐦𝐨𝐧𝐢𝐜 𝐦𝐢𝐭𝐢𝐠𝐚𝐭𝐢𝐨𝐧 𝐢𝐧 𝐚 𝐠𝐫𝐢𝐝-𝐜𝐨𝐧𝐧𝐞𝐜𝐭𝐞𝐝 𝐏𝐕 𝐬𝐲𝐬𝐭𝐞𝐦 using a shunt active power filter.

The 100.2 kW PV array supplies power through an Incremental Conductance MPPT-controlled boost converter and a three-phase grid inverter. Under normal operation, the grid-current THD is 3.63%. After connecting the non-linear load, THD increases to 7.23%, indicating significant current distortion.

When the shunt active power filter is activated, PQ-theory-based reference current generation and hysteresis current control provide harmonic compensation. As a result, the grid-current THD decreases to 𝐜𝟒.𝟖𝟓%, bringing it below the 5% benchmark used for the simulation comparison.

The model therefore provides a clear demonstration of PV grid integration, converter control, harmonic analysis, active filtering, and power-quality enhancement in a single MATLAB/Simulink environment.


Comments


bottom of page