🔌 MATLAB Simulation of Unified Power Quality Conditioner (UPQC) for Power Quality Improvement
- lms editor
- Jun 30, 2025
- 2 min read
Power quality issues such as voltage sags, swells, harmonics, and reactive power have become common in modern electrical systems. To address these challenges, a Unified Power Quality Conditioner (UPQC) serves as an effective solution. In this post, we explore the MATLAB/Simulink implementation of a UPQC system, its operation, and how it significantly improves power quality.
⚙️ What is a UPQC?
A Unified Power Quality Conditioner is a hybrid device combining:
A Series Active Power Filter (SAPF), connected in series with the power line, used to mitigate voltage disturbances and harmonics.
A Shunt Active Power Filter (SHAPF), connected in parallel, used to compensate reactive power and improve current waveform quality.
Together, these filters operate to:
Inject compensating voltage to maintain desired voltage at the load.
Inject compensating current to improve current waveform and regulate the DC-link voltage shared by both filters.
📉 Power System Without UPQC
Before implementing UPQC, the system is simulated under adverse power conditions:
Voltage Sag and Swell: Created by varying the source voltage amplitude between 0.7 p.u. to 1.3 p.u.
Harmonics: 5th and 7th order harmonics are injected using non-linear loads like a diode rectifier with RL load.
Current Distortion: Source current is highly distorted due to harmonic pollution, with Total Harmonic Distortion (THD) reaching approximately 22.2%.
These conditions result in:
Poor voltage regulation at the load.
Highly distorted source currents.
Uncompensated reactive power.
🛠️ MATLAB Model of UPQC
The UPQC system is modeled using Simulink and comprises:
🔷 Series Active Power Filter (SAPF)
Connected via a transformer in series with the line.
Utilizes a Voltage Source Inverter (VSI) with IGBT switches.
A hysteresis controller compares actual and reference load voltages to generate gate pulses for the inverter.
Injects voltage to counteract voltage sag, swell, and harmonics, thereby maintaining constant load voltage.
🔶 Shunt Active Power Filter (SHAPF)
Connected in parallel to the power system at the Point of Common Coupling (PCC).
Acts as a Current Source Inverter (CSI) to inject compensating current.
Controlled using:
PI controller to regulate the DC-link voltage.
PQ theory-based control to calculate instantaneous active and reactive power.
Hysteresis current controller to track the reference and actual compensating currents.
📈 Power Quality Improvement with UPQC
Upon enabling the UPQC in simulation, the following observations are made:
✔️ Voltage Compensation
During voltage sag and swell conditions, the SAPF injects compensating voltage.
The load voltage is successfully maintained at 1 p.u. regardless of the disturbances in the source voltage.
✔️ Current Compensation and THD Reduction
The SHAPF injects compensating current to neutralize harmonics and reactive power.
The source current becomes sinusoidal, indicating high power quality.
THD of the source current is reduced drastically from 22.2% to 2.45%, demonstrating the effectiveness of the UPQC.
✅ Conclusion
The MATLAB-based simulation clearly illustrates that the Unified Power Quality Conditioner (UPQC) is a powerful solution for:
Mitigating voltage disturbances,
Reducing current harmonics,
Compensating reactive power.
By combining the functions of both series and shunt filters, UPQC ensures enhanced voltage stability and improved current quality, making it ideal for sensitive and dynamic power systems.







Comments