๐๐ฎ๐ซ๐ซ๐๐ง๐ญ ๐๐๐ซ๐ฆ๐จ๐ง๐ข๐ ๐๐ข๐ญ๐ข๐ ๐๐ญ๐ข๐จ๐ง ๐ข๐ง ๐๐ซ๐ข๐-๐๐ข๐๐ ๐๐จ๐ฅ๐๐ซ ๐๐ ๐๐ฒ๐ฌ๐ญ๐๐ฆ
- lms editor
- 6 minutes ago
- 7 min read
๐๐ฎ๐ซ๐ซ๐๐ง๐ญ ๐๐๐ซ๐ฆ๐จ๐ง๐ข๐ ๐๐ข๐ญ๐ข๐ ๐๐ญ๐ข๐จ๐ง ๐ข๐ง ๐๐ซ๐ข๐-๐๐ข๐๐ ๐๐จ๐ฅ๐๐ซ ๐๐ ๐๐ฒ๐ฌ๐ญ๐๐ฆ
๐๐ง๐ญ๐ซ๐จ๐๐ฎ๐๐ญ๐ข๐จ๐ง
Nonlinear loads can draw highly distorted current from the utility grid. This increases the total harmonic distortion, reduces power quality and may affect other equipment connected at the point of common coupling.
๐๐ฎ๐ซ๐ซ๐๐ง๐ญ ๐๐๐ซ๐ฆ๐จ๐ง๐ข๐ ๐๐ข๐ญ๐ข๐ ๐๐ญ๐ข๐จ๐ง ๐ข๐ง ๐๐ซ๐ข๐-๐๐ข๐๐ ๐๐จ๐ฅ๐๐ซ ๐๐ ๐๐ฒ๐ฌ๐ญ๐๐ฆ

This MATLAB/Simulink model demonstrates current harmonic mitigation in a grid-tied solar PV systemย using an active current coefficient control strategy.
The proposed system performs three major functions:
Extracts maximum available power from the solar PV array
Supplies active and reactive power to the connected load
Compensates nonlinear-load harmonics to maintain sinusoidal grid current
The model is tested under changing solar irradiance, distorted grid voltage, voltage sag and voltage swell.
๐๐ก๐ฒ ๐๐๐ซ๐ฆ๐จ๐ง๐ข๐ ๐๐ข๐ญ๐ข๐ ๐๐ญ๐ข๐จ๐ง ๐๐ฌ ๐๐๐ช๐ฎ๐ข๐ซ๐๐
A three-phase rectifier with an RL load is used as the nonlinear load. This load draws a nonsinusoidal current and introduces harmonic components into the grid.
Without compensation:
The grid current becomes distorted
Current THD may exceed the recommended limit
Power factor can decrease
Additional heating may occur in electrical equipment
Sensitive loads may experience poor operating conditions
In the simulated system, the uncompensated current THD is approximately 22.22%. The grid-connected inverter is therefore controlled to inject the required compensation current.
๐๐ฒ๐ฌ๐ญ๐๐ฆ ๐๐ฏ๐๐ซ๐ฏ๐ข๐๐ฐ
The grid-tied solar PV system contains the following major components:
Solar PV array
DCโDC boost converter
Perturb and Observe MPPT controller
DC-link capacitor
Three-phase voltage-source inverter
Coupling inductor
Nonlinear rectifier load
Utility grid
Active current coefficient controller
Hysteresis current controller
Main system parameters
Parameter | Value |
PV modules connected in series | 7 |
Parallel PV strings | 12 |
Rated power of each module | 315 W |
Voltage at maximum power point | 54.7 V |
Current at maximum power point | 5.76 A |
Maximum PV array power | Approximately 26.47 kW |
Grid voltage | 450 V |
Grid frequency | 50 Hz |
DC-link reference voltage | 735 V |
Nonlinear-load active power | Approximately 9 kW |
Nonlinear-load reactive power | Approximately 5 kVAr |
Initial current THD | Approximately 22.22% |
๐๐จ๐ฅ๐๐ซ ๐๐ ๐๐ซ๐ซ๐๐ฒ
The PV array consists of 7 modules in seriesย and 12 strings in parallel. Each module is rated at 315 W.
The PV output changes according to the available solar irradiance.
Solar irradiance | Approximate PV power | PV operating voltage |
100 W/mยฒ | 2.49 kW | 360.9 V |
400 W/mยฒ | 9โ9.5 kW | Approximately 330 V |
1000 W/mยฒ | 26.47 kW | 382.9 V |
At approximately 400 W/mยฒ, the PV current reaches around 27 A. At 1000 W/mยฒ, the current increases to approximately 73 A.
๐๐จ๐ซ๐ค๐ข๐ง๐ ๐๐ซ๐จ๐๐๐ฌ๐ฌ
1. Solar power generation
The PV array converts solar irradiance into DC electrical power. Its voltage and current vary with irradiance and temperature.
2. Maximum power extraction
The measured PV voltage and current are supplied to the Perturb and Observe MPPT controller.
The controller:
Observes the change in PV voltage
Observes the change in PV power
Adjusts the boost-converter duty cycle
Moves the PV operating point toward maximum power
3. Boost-converter operation
The DCโDC boost converter increases the PV voltage to the required DC-link level.
The MPPT duty cycle is processed through a PWM generator, which controls the converter switch.
4. Grid-connected inverter operation
The voltage-source inverter transfers PV power to the load and utility grid.
It also operates as an active power filterย by injecting compensation current for:
Load-current harmonics
Load reactive-power demand
DC-link voltage regulation
5. Grid-current compensation
The controller calculates the required reference current. The inverter then produces the compensation current required to keep the grid current nearly sinusoidal.
๐๐จ๐ง๐ญ๐ซ๐จ๐ฅ ๐๐ญ๐ซ๐๐ญ๐๐ ๐ฒ
The inverter is controlled through an active current coefficient control method.
Grid-voltage processing
The measured three-phase grid voltages are processed to obtain clean voltage templates.
The control process includes:
Converting line-to-line voltage into phase voltage
Transforming three-phase voltage into stationary components
Filtering the voltage signals
Generating three-phase unit vectors
PLL-free synchronization
The system does not depend on a conventional phase-locked loop for synchronization.
Instead, it uses a unit-vector-based synchronization methodย to generate phase information for all three phases.
This can simplify the synchronization process and support operation under distorted voltage conditions.
Active current coefficient calculation
The three nonlinear-load currents are measured separately.
The controller determines:
Active current coefficient of phase A
Active current coefficient of phase B
Active current coefficient of phase C
Average active current requirement of the load
The calculated coefficient represents the fundamental active-current component required by the load.
DC-link voltage control
The measured DC-link voltage is compared with the reference value of 735 V.
A PI controller processes the voltage error and determines the additional current required to maintain the DC-link voltage.
Reference-current generation
The load active-current coefficient and DC-link regulation component are combined to produce the total current reference.
The current reference is multiplied by the three-phase unit vectors to obtain phase-wise AC current references.
Hysteresis current control
The reference currents are compared with the measured grid currents.
A hysteresis current controller generates switching pulses for the voltage-source inverter.
The complementary switching signals are used to operate all six inverter switches.
๐๐ฉ๐๐ซ๐๐ญ๐ข๐ง๐ ๐๐จ๐๐๐ฌ
The system is tested under several operating conditions.
Operating condition | PV contribution | Grid operation | Inverter function |
Zero irradiance | No PV power | Supplies load active power | Harmonic and reactive-power compensation |
Medium irradiance | Partial PV power | Supplies remaining active power | Supplies PV power and compensation current |
High irradiance | PV power exceeds load demand | Receives excess PV power | Supplies load and exports excess power |
Distorted grid voltage | Depends on irradiance | Grid voltage contains harmonics | Maintains improved grid-current quality |
Voltage sag | Depends on irradiance | Grid voltage decreases | Adjusts current and power exchange |
Voltage swell | Depends on irradiance | Grid voltage increases | Regulates current and power exchange |
๐๐ข๐ฆ๐ฎ๐ฅ๐๐ญ๐ข๐จ๐ง ๐๐๐ฌ๐ฎ๐ฅ๐ญ๐ฌ
Case 1: PV irradiance equal to zero
When irradiance is zero, the PV array does not generate power.
Under this condition:
The utility grid supplies approximately 9 kW of active power
The nonlinear load consumes approximately 5 kVAr of reactive power
The inverter supplies the reactive-power requirement
The inverter compensates harmonic current
The grid reactive power remains close to zero
The grid current remains nearly sinusoidal
The voltage-source inverter therefore operates similarly to an active power filter.
Case 2: PV irradiance at 400 W/mยฒ
At 400 W/mยฒ, the PV system produces approximately 9โ9.5 kW.
The operating response shows that:
PV power is sufficient to meet most or all of the loadโs active-power demand
The inverter supplies the required active power
The inverter also supplies the loadโs reactive power
Grid active-power exchange becomes very small
Grid reactive power remains close to zero
The nonlinear load current remains distorted
The grid current remains compensated and nearly sinusoidal
Case 3: PV irradiance at 1000 W/mยฒ
At 1000 W/mยฒ, the PV array generates approximately 26.47 kW.
Since the generated PV power is higher than the load demand:
The inverter supplies the load active power
The inverter supplies the load reactive power
The remaining PV power is exported to the utility grid
Grid-side power factor remains close to unity
Grid-current waveform quality is maintained
Power-flow summary
Quantity | Approximate value |
Load active power | 9 kW |
Load reactive power | 5 kVAr |
PV power at 400 W/mยฒ | 9โ9.5 kW |
PV power at 1000 W/mยฒ | 26.47 kW |
DC-link reference | 735 V |
Grid reactive power after compensation | Close to zero |
Case 4: Distorted grid-voltage condition
Harmonic components are introduced into the grid voltage to evaluate controller performance.
During voltage distortion:
Grid voltage becomes nonsinusoidal
The controller continues to calculate the required compensation current
The inverter supplies load active and reactive power
Excess PV power is exported to the grid
Grid reactive power remains close to zero
Grid-current quality is maintained
This test demonstrates the controllerโs ability to operate without conventional PLL-based synchronization.
Case 5: Grid-voltage sag
During a voltage sag, the grid-voltage magnitude is reduced to approximately 0.8 per unit.
The observed response includes:
Reduced load active-power consumption
Reduced load reactive-power consumption
Increased availability of excess PV power
Increased power export to the utility grid
Adjustment of grid-current magnitude
Maintenance of a nearly sinusoidal grid current
Case 6: Grid-voltage swell
During a voltage swell, the grid voltage is increased to approximately 1.2 per unit.
The system response shows:
Increased active-power demand from the load
Increased reactive-power demand from the load
Reduced excess power available for grid export
Reduced grid-current magnitude
Continued harmonic-current compensation
Stable grid-current waveform quality
Voltage disturbance comparison
Condition | Grid-voltage level | Main system response |
Normal voltage | 1.0 p.u. | Normal power sharing and harmonic compensation |
Voltage sag | 0.8 p.u. | Increased excess-power export and current adjustment |
Voltage swell | 1.2 p.u. | Increased load demand and reduced exported power |
๐๐๐ฒ ๐ ๐๐๐ญ๐ฎ๐ซ๐๐ฌ
MATLAB/Simulink implementation of a grid-connected PV system
Current harmonic mitigation for a nonlinear rectifier load
Active current coefficient control method
PLL-free unit-vector synchronization
Perturb and Observe MPPT control
Boost-converter duty-cycle control
DC-link voltage regulation
Hysteresis current control
Reactive-power compensation
Unity power-factor operation at the grid side
Active-power import and export
Operation under changing solar irradiance
Performance testing under voltage distortion
Voltage-sag and voltage-swell analysis
Detailed grid, load, inverter and PV waveforms
๐๐๐ฏ๐๐ง๐ญ๐๐ ๐๐ฌ
Improves grid-current waveform quality
Reduces the effect of nonlinear-load harmonics
Compensates load reactive power
Utilizes the PV inverter for multiple functions
Supports bidirectional active-power flow with the utility grid
Maintains near-unity grid-side power factor
Operates under variable solar irradiance
Provides stable performance during grid-voltage disturbances
Avoids dependency on a conventional PLL
Demonstrates coordinated power-quality and renewable-energy control
๐๐ฉ๐ฉ๐ฅ๐ข๐๐๐ญ๐ข๐จ๐ง๐ฌ
This model is useful for studying:
Grid-connected solar PV systems
Harmonic compensation techniques
Active power filtering
Nonlinear-load compensation
Renewable-energy power-quality improvement
Distribution-system power conditioning
Grid-current control
Reactive-power compensation
MPPT-based PV energy conversion
Voltage sag and swell performance
PLL-free grid synchronization
Smart-grid power-flow management
๐๐ก๐จ ๐๐๐ง ๐๐ฌ๐ ๐๐ก๐ข๐ฌ ๐๐จ๐๐๐ฅ?
The simulation is suitable for:
Electrical engineering students
Power electronics learners
Renewable-energy researchers
MATLAB/Simulink users
Power-quality engineers
Grid-integration specialists
Engineers studying nonlinear-load compensation
๐๐๐๐ซ๐ง๐ข๐ง๐ ๐๐ฎ๐ญ๐๐จ๐ฆ๐๐ฌ
By studying this system, users can understand:
How nonlinear loads create current harmonics
How a PV inverter can operate as an active power filter
How MPPT extracts maximum power from a PV array
How active and reactive power are shared among the PV system, load and grid
How reference currents are produced for the inverter
How hysteresis current control generates inverter switching pulses
How grid-current quality is maintained during voltage disturbances
How excess solar power is exported to the utility grid
๐๐จ๐ง๐๐ฅ๐ฎ๐ฌ๐ข๐จ๐ง
The Current Harmonic Mitigation in Grid-Tied Solar PV Systemย model demonstrates an effective method for combining renewable-energy conversion with power-quality improvement.
The nonlinear rectifier load produces highly distorted current with an initial THD of approximately 22.22%. The active current coefficient controller calculates the fundamental active-current requirement and generates suitable reference currents for the grid-connected inverter.
When solar irradiance is unavailable, the inverter operates as an active power filter and compensates the loadโs harmonics and reactive power. At medium irradiance, PV power supplies the load and reduces power drawn from the grid. At high irradiance, the PV system supplies the load and exports excess active power to the utility grid.
The simulation also demonstrates stable operation under distorted grid voltage, voltage sag and voltage swell. Throughout these conditions, the inverter supports reactive-power compensation, power-flow control and improved grid-current quality.
This MATLAB/Simulink model provides a practical learning platform for understanding solar PV control, harmonic mitigation, MPPT, active filtering, grid synchronization and power-quality enhancement.



Comments