Matlab Simulation of Unified Power Quality Conditioner for Power Quality Improvement
Unified Power Quality Conditioner for Power Quality Improvement
šš§šš«šØšš®ššš¢šØš§
Power quality problems such as voltage sag, voltage swell, harmonics, reactive power demand, and distorted source currentĀ can significantly affect the performance of electrical equipment.
Unified Power Quality Conditioner for Power Quality Improvement

The Unified Power Quality Conditioner (UPQC)Ā provides a combined solution for both voltage-side and current-side power quality problems. The MATLAB/Simulink model discussed here uses:
Series Active Power FilterĀ for voltage compensation.
Shunt Active Power FilterĀ for current compensation.
A common DC-linkĀ connecting both active filters.
Hysteresis-based switching control.
Instantaneous power-based reference current generation.
A nonlinear load for harmonic-performance evaluation.
The UPQC combines series and shunt compensation to address voltage disturbances, load-current harmonics, reactive power, and DC-link voltage regulation.
šš²š¬ššš¦ ššÆšš«šÆš¢šš°
The MATLAB/Simulink system consists of a three-phase source, nonlinear load, series active filter, shunt active filter, common DC link, coupling components, measurement blocks, and control subsystems.
Parameter | Simulation Detail |
Simulation Platform | MATLAB/Simulink |
Source Voltage | 400 V line-to-line |
Grid Frequency | 50 Hz |
Load Type | Nonlinear rectifier-based load |
Initial Source Current THD | Approximately 22.22% |
Series Filter | Series Active Power Filter |
Shunt Filter | Shunt Active Power Filter |
DC-Link Reference | 700 V |
Harmonics Introduced | 5th and 7th |
Source Current THD with UPQC | Approximately 2.45% |
The product configuration uses two voltage-source converter stages sharing a common DC link, with one converter connected in series and the other operating as the shunt compensator.
ššš¢š§ ššØš°šš« šš®šš„š¢šš² šš«šØšš„šš¦š¬
The model demonstrates several common disturbances encountered in a power distribution system.
Voltage Sag:Ā Source voltage is temporarily reduced below its normal value.
Voltage Swell:Ā Source voltage temporarily increases above the rated value.
Voltage Harmonics:Ā Harmonic components are deliberately introduced into the source voltage.
Current Harmonics:Ā The nonlinear load causes a highly distorted source current.
Reactive Power Demand:Ā The nonlinear load increases the need for current compensation.
Load Voltage Disturbance:Ā Without compensation, disturbances appearing at the source can affect the load.
šš©šš«ššš¢šØš§ šš¢šš”šØš®š šššš
The first simulation case evaluates the power system without any UPQC compensation.
The model contains only the source, transmission path, measurement blocks, and nonlinear load.
Disturbance Conditions
Test Condition | Value / Description |
Normal Source Voltage | 1.0 p.u. |
Voltage Sag Level | Approximately 0.7 p.u. |
Voltage Swell Level | Approximately 1.3 p.u. |
Harmonic Orders | 5th and 7th |
Harmonic Injection Interval | Approximately 3ā4 s |
Nonlinear Load Current THD | Approximately 22.2% |
Observations Without UPQC
Source voltage shows intentional sag and swell disturbances.
Harmonic components appear in the supply voltage during the harmonic test interval.
Nonlinear load operation produces a distorted source current.
Current waveform is far from an ideal sinusoidal shape.
FFT analysis gives source-current THD of approximately 22.22%.
This establishes the baseline condition for evaluating the effectiveness of the UPQC.
šššš ššØš§šš¢š š®š«ššš¢šØš§
A UPQC combines two complementary active filters.
1. ššš«š¢šš¬ šššš¢šÆš ššØš°šš« š š¢š„ššš«
The series filter is connected in series with the power line, normally through a series transformer.
Its main responsibilities are:
Compensating voltage sag.
Compensating voltage swell.
Mitigating voltage harmonics.
Maintaining a nearly constant load voltage.
Isolating the sensitive load from source-side voltage disturbances.
The active series converter is specifically intended to compensate supply-side voltage disturbances and provide harmonic isolation.
2. šš”š®š§š šššš¢šÆš ššØš°šš« š š¢š„ššš«
The shunt filter is connected in parallel at the point of common coupling (PCC).
Its major functions include:
Harmonic current compensation.
Reactive power compensation.
Improvement of source-current waveform.
Maintaining nearly sinusoidal grid current.
Regulation of the common DC-link voltage.
The shunt converter compensates load-current distortion and reactive power while also supporting DC-link voltage regulation.
ššØš«š¤š¢š§š šš«šØššš¬š¬
The overall UPQC operation can be understood through the following sequence:
Grid voltage and load conditions are continuously measured.
The controller identifies voltage-side and current-side compensation requirements.
The series APFĀ generates the required compensating voltage.
The compensating voltage is injected through the series transformer.
The load voltage is maintained close to its desired value.
The shunt APFĀ determines the compensating current required by the nonlinear load.
The inverter injects this compensation current through the coupling inductor.
Source-current distortion and reactive power demand are reduced.
The shunt filter simultaneously regulates the common DC-link voltage.
Both filters coordinate to improve overall power quality.
ššš«š¢šš¬ ššš ššØš§šš«šØš„
The series APF behaves as a controlled voltage-injection system.
Main Control Steps
Measure the load voltage.
Generate the desired reference voltage.
Compare actual load voltage with the reference.
Produce a voltage error signal.
Process the error through the switching controller.
Generate gate pulses for the three-phase voltage-source inverter.
Inject the necessary compensating voltage through the series transformer.
During Voltage Sag
When the source voltage falls to approximately 0.7 p.u.:
The series APF identifies the voltage deficiency.
Additional compensating voltage is injected.
Load voltage is restored toward approximately 1.0 p.u.
During Voltage Swell
When source voltage increases to approximately 1.3 p.u.:
The controller detects the excess voltage.
The series inverter produces the required compensating voltage.
The load-side voltage remains close to its rated value.
During Harmonic Distortion
When harmonic components appear in the source:
The series controller produces an opposing compensating voltage.
Harmonic distortion reaching the load is reduced.
A cleaner load voltage waveform is obtained.
šš”š®š§š ššš ššØš§šš«šØš„
The shunt APF operates mainly as a controlled current-compensation system.
Its control architecture includes:
DC-link voltage measurement.
Reference DC-link voltage.
PI controller.
Source-voltage measurement.
Load-current measurement.
Instantaneous power processing.
Reference compensating-current calculation.
Hysteresis current controller.
Three-phase inverter.
Coupling inductor.
šš-šš¢š§š¤ ššØš„ššš š ššš š®š„ššš¢šØš§
The common DC-link plays an important role because the series and shunt converters share the same DC energy-storage stage.
In this simulation:
DC-Link Parameter | Value |
Reference DC-Link Voltage | 700 V |
Regulating Controller | PI Controller |
Main Controlled Converter | Shunt APF |
Additional Purpose | Compensation-loss balancing |
Control Operation
Actual DC-link voltage is measured.
It is compared with the 700 V reference.
The error is processed by a PI controller.
The resulting control component is included in the reference-current calculation.
The shunt converter exchanges the required active power to keep the DC-link voltage regulated.
ššØš¦š©šš§š¬ššš¢š§š šš®š«š«šš§š ššš„šš®š„ššš¢šØš§
The shunt active filter uses measured electrical quantities to determine the amount of current that must be injected.
The control stage receives information such as:
Three-phase source voltage.
Nonlinear load current.
DC-link regulation signal.
The measured quantities are processed using an instantaneous power-based control approach.
The controller then:
Determines the active and reactive power components.
Separates the undesirable components associated with harmonics and reactive power.
Generates the required three-phase compensation-current references.
Sends these references to the current controller.
šš²š¬ššš«šš¬š¢š¬ šš®š«š«šš§š ššØš§šš«šØš„
The calculated reference compensation current is compared with the actual shunt-filter current.
The hysteresis controller then:
Detects the current-tracking error.
Maintains inverter current within the required hysteresis band.
Generates switching pulses for the inverter.
Forces actual compensating current to follow the reference.
Enables fast harmonic-current compensation.
This allows the shunt APF to inject the current required to counteract nonlinear-load distortion.
šš¢š¦š®š„ššš¢šØš§ ššš¬š®š„šš¬
The simulated results demonstrate improvements in both voltage quality and current quality after enabling the UPQC.
Voltage Compensation
The series APF responds to source-side disturbances by injecting compensating voltage.
Observed behavior includes:
Voltage harmonics are prevented from significantly affecting the load.
Sag conditions are compensated.
Swell conditions are compensated.
Load voltage is maintained close to 1.0 p.u.
The injected voltage changes according to the type and magnitude of source disturbance.
Current Compensation
The shunt APF compensates the harmonic and reactive components associated with the nonlinear load.
After compensation:
Source current becomes much closer to a sinusoidal waveform.
Harmonic content is significantly reduced.
Reactive current drawn from the source is reduced.
Grid-side power quality is substantially improved.
ššš ššš«ššØš«š¦šš§šš ššØš¦š©šš«š¢š¬šØš§
One of the clearest indicators of UPQC performance is the reduction in source-current Total Harmonic Distortion (THD).
Operating Condition | Source Current THD |
Without UPQC | Approximately 22.22% |
With UPQC | Approximately 2.45% |
Improvement | Major reduction in harmonic distortion |
What Does This Show?
Without compensation, the nonlinear load produces a strongly distorted current.
After UPQC activation, harmonic components are substantially suppressed.
Source current changes from a distorted waveform to a much cleaner sinusoidal waveform.
The result clearly demonstrates the effectiveness of the combined series and shunt compensation strategy.
The official product description similarly identifies harmonic compensation, voltage-disturbance mitigation, reactive-power compensation, and DC-link regulation as core UPQC functions.
ššš«ššØš«š¦šš§šš šš®š¦š¦šš«š²
Power Quality Issue | Without UPQC | With UPQC |
Voltage Sag | Appears at load | Compensated |
Voltage Swell | Appears at load | Compensated |
Voltage Harmonics | Affect waveform | Significantly mitigated |
Source Current | Distorted | Nearly sinusoidal |
Current THD | ~22.22% | ~2.45% |
Reactive Power | Uncompensated | Compensated |
Load Voltage | Disturbed | Maintained near rated value |
DC-Link Voltage | Not applicable | Regulated around reference |
ššš² š šššš®š«šš¬
Complete three-phase UPQC MATLAB/Simulink model.
Combined series and shunt active filtering.
Voltage sag compensation.
Voltage swell compensation.
Voltage harmonic mitigation.
Nonlinear-load harmonic-current compensation.
Reactive power compensation.
Shared DC-link architecture.
700 V DC-link voltage regulation.
PI-based DC-link controller.
Instantaneous power-based current-reference generation.
Hysteresis current control.
Three-phase voltage-source inverter implementation.
FFT-based harmonic analysis.
Comparison of operation with and without UPQC.
Source-current THD reduction from approximately 22.22% to 2.45%.
šš”šš ššš§ šš ššš®šš¢šš šš¬š¢š§š šš”š¢š¬ ššØššš„?
This MATLAB simulation is useful for understanding:
UPQC operating principles.
Series active-filter control.
Shunt active-filter control.
Power quality disturbance generation.
Voltage sag and swell behavior.
Harmonic compensation.
Nonlinear-load effects.
DC-link voltage regulation.
Reactive power compensation.
Reference-current generation.
Hysteresis switching control.
FFT and THD analysis.
Three-phase converter operation.
Point of common coupling behavior.
šš©š©š„š¢šššš¢šØš§š¬
UPQC technology can be studied for power-quality improvement in:
Industrial distribution networks.
Systems supplying nonlinear loads.
Sensitive electronic-load installations.
Converter-dominated electrical networks.
Renewable-energy interfaced distribution systems.
Distribution feeders experiencing voltage disturbances.
Power-electronic load environments.
Laboratories studying harmonic mitigation.
Smart-grid and advanced distribution-system research.
šš”šØ ššš§ šš¬š šš”š¢š¬ šššššš ššØššš„?
The model is especially useful for:
Electrical engineering students.
Power electronics learners.
Power-system researchers.
MATLAB/Simulink learners.
Research scholars studying power quality.
Engineers working with active power filters.
Faculty members demonstrating UPQC concepts.
Researchers analyzing THD and nonlinear loads.
šš”š² šššš šš¬ ššššššš¢šÆš
A major advantage of UPQC is that it does not address only one type of power-quality problem.
Instead:
Series APF ā handles voltage-related disturbances.
Shunt APF ā handles current-related disturbances.
Common DC link ā enables coordinated energy exchange.
Control system ā continuously determines required compensation.
This combination makes UPQC a multifunctional power-quality conditioner capable of addressing several disturbances simultaneously.
ššš² ššš¬š®š„šš¬ šš š šš„šš§šš
ā” Source voltage: 400 V line-to-line
š Frequency: 50 Hz
š Sag condition: approximately 0.7 p.u.
š Swell condition: approximately 1.3 p.u.
-ć½ļø Harmonics considered: 5th and 7th
š DC-link reference: 700 V
š THD without UPQC: approximately 22.22%
ā THD with UPQC: approximately 2.45%
š Load voltage maintained close to 1 p.u.
š Source current becomes significantly more sinusoidal
ššØš§šš„š®š¬š¢šØš§
The MATLAB/Simulink implementation demonstrates how a Unified Power Quality ConditionerĀ can simultaneously improve voltage and current quality in a three-phase power system.
The series active power filterĀ successfully compensates voltage sag, voltage swell, and voltage harmonics, helping maintain the load voltage close to its desired level. The shunt active power filterĀ compensates harmonic current and reactive power while regulating the common DC-link voltage.
Most importantly, the simulated source-current THD decreases from approximately 22.22% without UPQC to 2.45% with UPQC, showing a substantial improvement in waveform quality.
For students, researchers, and engineers interested in MATLAB simulation, UPQC control, active power filters, harmonic mitigation, voltage compensation, reactive power compensation, and power quality analysis, this model provides a clear and practical platform for understanding coordinated seriesāshunt compensation.



Comments