Matlab Simulation of Unified Power Quality Conditioner for Power Quality Improvement
- lms editor
- 1 day ago
- 7 min read
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