EMS601-Coursework2-UPQC Design
EMS601-Coursework2-UPQC Design
Unified Power Quality Conditioner (UPQC) is a specialised device used in electrical power
systems to improve the quality of electrical power by mitigating issues like voltage sags,
swells, and harmonics. UPQC combines both voltage and current control capabilities to
regulate and stabilise the power supply, ensuring consistent and high-quality electricity for
connected equipment.
Objective:
The objective of this lab experiment is to make the students understand and implement the
concept of a virtual UPQC algorithm to correct voltage sags, swells, and harmonic distortions
in each input voltage waveform. Students will also simulate the behaviour of the Series Active
Power Filter (SAPF) and Shunt Active Power Filter (SHPF) in virtual UPQC applications to
correct power quality.
Part 1: Correction of Voltage sag, swell and harmonic distortions using UPQC
Voltage Sag: A voltage sag is a sudden reduction in voltage magnitude that can lead to
equipment malfunction or shutdown. The UPQC detects the voltage sag and injects a
compensating voltage in series with the load. This compensating voltage boosts the sagging
voltage back to the desired level, mitigating the negative effects on the connected
equipment.
Voltage Swell: A voltage swell is a sudden increase in voltage magnitude, which can also
damage equipment. The UPQC detects the voltage swell and injects a compensating
voltage with a lower magnitude to counteract the excess voltage, bringing it down to the
acceptable range.
Harmonic Distortion: Harmonic distortions are unwanted frequencies that can distort the
ideal sinusoidal waveform of the voltage or current. These harmonics can cause overheating
and inefficiencies in equipment. The UPQC uses the shunt active power filter (SHPF)
component to detect the harmonic components in the current and inject equal and opposite
current harmonics to cancel out the distortions. This process results in a cleaner sinusoidal
waveform with reduced harmonic content.
MATLAB Script:
The provided code in the MATLAB Live Script (titled Example 1), simulates an input voltage
that has harmonic distortion and power imbalance. The task for us is to mitigate it using UPQC,
applying harmonic and reactive power compensation, and providing cleaner and balanced
output voltage.
Our code should represent the dynamic behaviour i.e., instead of instantaneously correcting
the power quality issues, we'll add a response time for the UPQC to gradually mitigate the
problems.
1. Algorithm Implementation:
Implement the algorithm for the virtual UPQC to correct the voltage issues in the input
waveform.
The algorithm should detect voltage sags, swells, and harmonic distortions in the input
waveform and apply corrective actions to generate an improved output voltage waveform.
You may use conditional statements, filtering techniques, or other relevant methods to
implement the algorithm.
2. Visualization:
3. Data Interpretation:
Interpret and analyse the results obtained from the simulation. Explain how the virtual UPQC
algorithm corrected the power quality issues in the input waveform and how the output
waveform differs from the input waveform.
Exercise:
You have been provided with a MATLAB code that simulates the behaviour of a virtual UPQC
to address power quality issues such as voltage sag, swell, and harmonic distortion. The code
currently implements basic compensation mechanisms. Your task is to comprehensively
enhance the code by implementing advanced compensation algorithms to effectively address
these power quality issues.
Edit the following values and then analyse the effect.
sag_start_time = 0.7
sag_duration = 0.3
sag_depth = 0.25
swell_start_time = 0.3
swell_duration = 0.125
swell_depth = 0.5
reactive_power_start_time = 0.5
reactive_power_duration = 0.2
reactive_power_depth = 0.2
How would you correct voltage sag, swell and harmonic distortions? Demonstrate it in the
code.
Part 2: Series Active Power Filter (SAPF) and Shunt Active Power Filter (SHPF)
in UPQC applications to correct power quality
1. Algorithm Implementation:
o Explain how the code simulates the behaviour of SAPF and SHPF separately to correct
voltage sag and reactive power imbalance, respectively.
o Explain the use of the response time parameter and how the SHPF gradually corrects
the reactive power imbalance.
o Instruct students to carefully analyse the code and identify the modifications made for
reactive power compensation and phase balancing.
o Encourage students to understand the significance of each modification in improving
power quality.
2. Visualization:
o Instruct students to plot the input and output voltages (for SAPF) and input and output
currents (for SHPF) using MATLAB. Ask them to analyse the results and explain how
the UPQC corrected voltage sags and improved the output voltage.
o Guide them in interpreting the results and explaining how the UPQC corrected power
quality issues in the virtual scenario.
o A plot showing the FFT (Fast Fourier Transform) of the input and output voltage
waveforms to visualize the impact on harmonic distortion.
o Instruct students to carefully analyse the code and identify the modifications made for
reactive power compensation and phase balancing.
3. Data Interpretation:
Students should interpret and analyse the results obtained from the simulation.
They should explain the significance of each modification in improving power quality.
Exercise:
o Implement reactive power compensation and phase balancing without SAPF or SHPF.
Gradually correct the reactive power imbalance in the output voltage after a response
time. Consider a depth of 0.15 (15% phase shift) for this simulation. Apply phase
balancing correction in the SAPF code. Ensure that the output voltage has the same
phase angle as the input voltage waveform.
o Implement reactive power compensation in the SAPF code. Gradually correct the
reactive power imbalance in the output voltage after a response time. Consider a depth
of 0.15 (15% phase shift) for this simulation. Apply phase balancing correction in the
SAPF code. Ensure that the output voltage has the same phase angle as the input
voltage waveform.
o Implement reactive power compensation in the SHPF code. Gradually correct the
reactive power imbalance in the output current after a response time. Consider the
same depth of 0.15 (15% phase shift) for this simulation. Apply phase balancing
correction in the SHPF code. Ensure that the output current has the same phase angle
as the input current waveform.
Methodology:
o Summarise the specific task assigned to you which involved modifying the provided MATLAB code
to implement both exercises.
o Make sure you include the algorithm or pseudo-code for your code in this section.
o Describe the modifications you made to the provided MATLAB code. Explain how you added the
reactive power compensation and phase balancing features to the code. Include key equations or
calculations that were used, if applicable.
Discussion:
o Provide a comprehensive discussion of the simulation outcomes:
o Discuss the importance of reactive power compensation and phase balancing in power quality
improvement.
o Explain how the UPQC components (SAPF and SHPF) work together to mitigate power quality
issues.
o Reflect on the significance of the simulation results in the context of real-world power quality
improvement.
o Challenges and Insights: Share any challenges you encountered while modifying the code and
interpreting the results. Discuss any insights you gained during the process, including a deeper
understanding of UPQC behaviour and control techniques.
Future Work/Recommendations:
Suggest any further enhancements or improvements that could be implemented in the future, such
as more advanced control algorithms or additional features of UPQC.
References:
List any references or resources you consulted during the lab report writing.
Appendix
Include the modified MATLAB code for both SAPF and SHPF simulations as an appendix to the
report. Label each code section clearly.
Formatting Guidelines:
o Maximum word limit of 3000 words.
o Use a clear and organised format, including headings and subheadings.
o Include labelled figures, plots, and equations as needed.
o Write in clear and concise language.
o Proofread your report for grammar and spelling errors.
o Ensure that you include all necessary components and follow the formatting guidelines, provided by
the TA/TF.
Assessment Criteria:
o Accuracy and completeness of the implementation of reactive power compensation and phase
balancing.
o Clarity and depth of analysis of simulation results.
o Quality of discussion and conclusions drawn from the simulations.
o Overall organisation, clarity, and correctness of the report.
Assessment Rubric