Verified MATLAB & Simulink Project

Design of Shunt Active Power Filter(APF)

Design of Shunt Active Power Filter in MATLAB Simulink | Guide – MATLAB Simulation Video
YouTube Watch Full Simulation Free Preview
MATLAB R2020a - R2024b
Zero Convergence Errors
Simscape / SimPowerSystems
Need This Simulation?

Get in touch with our PhD MATLAB simulation team for customized code, parameters, or complete thesis models.

Talk to Simulation Expert
What we offer:
  • Custom MATLAB/Simulink solutions
  • 1-on-1 Expert consultation
  • Flexible pricing & 100% bug-free guarantee

What is Design of Shunt Active Power Filter(APF)?

Design of Shunt Active Power Filter(APF) is a MATLAB-based technical project and simulation model. Non-linear power electronic loads such as rectifiers, switched-mode power supplies, and variable frequency drives draw non-sinusoidal currents from the AC grid. This harmonic pollution causes voltage distortion, extra thermal stress on transformers, and degraded power factor. A Shunt Active Power Filter (SAPF) solves this by connecting in parallel at the Point of Common Coupling (PCC) to inject compensating currents that are equal in magnitude but opposite in phase to the load harmonics. As a result, the utility grid supplies only fundamental active power, maintaining sinusoidal currents and complying with the IEEE 519 standard. This project covers the design, modeling, and simulation of a three-phase Shunt APF in MATLAB Simulink, including reference current extraction, DC-link voltage regulation, and inverter switching control.

Project Methodology

The design and simulation of a three-phase Shunt Active Power Filter (SAPF) in MATLAB Simulink follows a structured engineering workflow:

  1. Grid and Non-Linear Load Modeling: Set up a three-phase 415V/50Hz AC power source with line impedance, and connect a harmonic-generating non-linear load using an uncontrolled diode bridge rectifier feeding a resistive-inductive (RL) load.
  2. Power Stage and Component Sizing: Calculate the minimum DC-link capacitor value needed to hold voltage during transients and size the AC-side coupling inductor (Lf) to attenuate high-frequency switching ripple without limiting harmonic tracking speed.
  3. Reference Current Extraction: Implement Instantaneous Reactive Power Theory (p-q theory) or Synchronous Reference Frame Theory (d-q theory) using Clarke and Park transformations to separate harmonic and reactive components from fundamental active load current.
  4. DC-Link Voltage Control: Design a discrete PI controller to compare the measured DC capacitor voltage against a reference setpoint, adding a small active current component to replenish inverter semiconductor and resistive losses.
  5. Current Control and Gate Pulse Generation: Implement a Hysteresis Band Current Controller or Sine-PWM modulator to compare extracted reference currents with actual filter output currents and drive the six IGBT switches of the Voltage Source Inverter (VSI).
  6. Dynamic Load Variation Testing: Run simulation cases under steady-state operation and introduce step changes in load resistance to evaluate DC bus voltage recovery time and transient compensation stability.
  7. FFT Analysis and Standard Validation: Use the Simulink Powergui Fast Fourier Transform (FFT) tool to evaluate source current Total Harmonic Distortion (THD) before and after APF activation, verifying compliance with the IEEE 519 5% THD limit.

Verified MATLAB Simulation Code Demonstration

Syntax-highlighted executable code demonstration for Design of Shunt Active Power Filter(APF):

MATLAB control_system_design.m
% State-Space Control & Stability Analysis
clc; clear; close all;

% System Matrices
A = [0 1; -4 -5];
B = [0; 1];
C = [1 0];
D = 0;

sys_ss = ss(A, B, C, D);
Co = ctrb(A, B);

% Pole Placement Control
desired_poles = [-3 + 4i, -3 - 4i];
K = acker(A, B, desired_poles);

sys_cl = ss(A - B*K, B, C, D);
fprintf('State Feedback Controller Formulated Successfully!\n');
Design of Shunt Active Power Filter(APF) $50.00
$50.00