Project Engineer: Abd El-Rhman Muhammad Saad
Academic Institution: Faculty of Engineering, Alexandria University (Class of 2026)
Department: Electrical Engineering Department
Course / Specialization: Power System Compensation / FACTS & Power Quality
Core Focus: Grid-Connected STATCOM, Synchronous Reference Frame ($dq0$ ) Decoupled Control, Dynamic Reactive Power Compensation & LCL Filtering
Academic Documentation: Full Project Technical Report (PDF) | Simulink Model Source
This repository delivers the analytical design, mathematical modeling, control synthesis, and high-fidelity MATLAB/Simulink simulation of a grid-connected Static Synchronous Compensator (STATCOM) based on a Two-Level Voltage Source Converter (VSC). Developed as an advanced power quality and FACTS (Flexible AC Transmission Systems) solution, the STATCOM provides high-speed dynamic reactive power compensation for localized, highly inductive industrial loads, restoring the utility grid power factor strictly to unity (
The local load draws
-
Three-Phase Utility Interconnection: A stiff
$415\text{ V}$ three-phase source coupled through line impedance to the PCC. -
Industrial Load Branch: A three-phase parallel RLC branch absorbing
$200\text{ kW}$ active and$100\text{ kVAR}$ inductive power. -
Two-Level Voltage Source Converter (VSC): Six IGBT/Diode switches arranged in a three-phase bridge topology energized by a
$10.0\text{ mF}$ DC-link capacitor regulated at$800.0\text{ V DC}$ . -
Cascaded
$dq0$ Control Hierarchy: Voltage-Oriented Control (VOC) separating the active power channel (DC voltage regulation) from the reactive power channel ($Q$ compensation). -
High-Frequency SPWM Modulation: Sinusoidal Pulse-Width Modulation operating at a
$10.0\text{ kHz}$ carrier frequency with natural anti-windup clamping. -
Harmonic Interfacing Filter: Third-order passive
$LCL$ filter ($L_1 = 300\ \mu\text{H}, L_2 = 500\ \mu\text{H}, C_f = 100\ \mu\text{F}$ ) trapping switching harmonics and ensuring clean grid sinusoidal currents.
The physical and electrical design parameters of the grid-connected STATCOM system are summarized below:
| Engineering Parameter | Symbol | Benchmark Value | Physical / Operational Significance |
|---|---|---|---|
| AC Grid Nominal Voltage | Three-phase line-to-line distribution baseline | ||
| Grid Operating Frequency | Synchronous utility base frequency | ||
| Angular Velocity Baseline | Synchronous grid angular velocity ( |
||
| Load Active Power | Real power absorbed by industrial facility | ||
| Load Reactive Power | Inductive reactive power demand to be compensated | ||
| Uncompensated Power Factor | Baseline uncompensated load power factor | ||
| Target Grid Power Factor | Post-compensation objective ( |
||
| DC-Link Target Voltage | Regulated capacitor potential ( |
||
| DC-Link Bus Capacitance | Energy storage buffer damping low-frequency DC ripple | ||
| Converter-Side Inductor | Limits high-frequency bridge switching ripple | ||
| Grid-Side Filter Inductor | Provides high impedance against switching injection | ||
| Filter Shunt Capacitance | Shunts |
||
| PWM Carrier Frequency | SPWM switching carrier frequency | ||
| Outer Voltage Loop PI Gains | DC-link voltage error regulator gains | ||
| Inner Current Loop PI Gains | Fast decoupled current tracking gains | ||
| Simulation Discrete Step Size | Discrete-solver fixed execution sample time |
Three-Phase Grid Voltages & Currents
│
▼
┌───────────────────────────────┐
│ Three-Phase PLL System │ ───► Grid Angle (θ = ωt)
└───────────────────────────────┘
│
▼
┌───────────────────────────────┐
│ Park's Transform (abc->dq) │ ───► vd, vq, id, iq
└───────────────────────────────┘
│
┌──────────┴──────────┐
▼ ▼
┌──────────────┐ ┌──────────────┐
│ Outer Loop │ │ Inner Loop │
│ (DC Voltage)│ │ (Reactive Q)│
└──────────────┘ └──────────────┘
Vdc* - Vdc Q* - Q
│ │
▼ ▼
PI Controller PI Controller
│ │
▼ ▼
id* (Losses) iq* (-100 kVAR)
│ │
└──────────┬──────────┘
▼
┌────────────────────────────────────┐
│ Inner Decoupled Current Regulators │
│ vd* = -(PI)(id* - id) + ωL iq + vd│
│ vq* = -(PI)(iq* - iq) - ωL id + vq│
└────────────────────────────────────┘
│
▼
┌────────────────────────────────────┐
│ Inverse Park Transform (dq->abc) │ ───► Modulating Signals (Vref)
└────────────────────────────────────┘
│
▼
┌────────────────────────────────────┐
│ 10 kHz SPWM Comparator Gate Logic │ ───► Gate Pulses (Q1 - Q6)
└────────────────────────────────────┘
The three-phase AC voltages and currents are transformed into a rotating reference frame synchronous with the grid fundamental frequency via Park's Transformation:
Under Voltage-Oriented Control (VOC) synchronized by the Phase-Locked Loop (PLL), the
In the synchronous frame, instantaneous active (
This formulation proves complete decoupling:
- The
$d$ -axis current component ($i_d$ ) controls real power flow, exclusively dictating the charging and voltage maintenance of the DC-link capacitor. - The
$q$ -axis current component ($i_q$ ) controls reactive power flow, directly dictating whether the STATCOM operates in inductive mode ($i_q > 0$ ) or capacitive compensation mode ($i_q < 0$ ).
The differential equations governing the AC-side currents through the interfacing inductance
The rotational cross-coupling terms (
The DC-link capacitor voltage dynamics are governed by the power balance between the AC grid and the converter:
The outer voltage controller processes the error
The resonance frequency of the third-order
This resonance frequency satisfies the industrial design constraint
The steady-state analytical and empirical power distribution across the electrical network is detailed below:
| System Node | Active Power ( |
Reactive Power ( |
Apparent Power ( |
Power Factor ( |
Operational Role |
|---|---|---|---|---|---|
| Local Industrial Load |
|
Continuous inductive demand | |||
| STATCOM (Compensator) |
|
Full reactive supply + loss absorption | |||
| Main Grid (Uncompensated) |
|
Highly strained, heavy |
|||
| Main Grid (Compensated) | Pure active power transfer, zero reactive strain |
The Level-1 Control Loop block houses the cascaded control structure:
-
PLL Frequency Tracker: Extracts the precise grid electrical angle
$\theta$ . -
Outer Voltage Loop: Compares measured
$V_{\text{dc}}$ against$800.0\text{ V}$ baseline. -
Inner Current Loops: Implements decoupled PI controllers with
$\pm\omega L i$ cross-coupling compensation. -
Modulation Generation: Executes inverse Park transformation to generate normalized three-phase modulating references (
$V_{\text{ref}}$ ).
-
Conversion Subsystem: Contains the primary 2-level IGBT/Diode bridge connected across the
$10\text{ mF}$ capacitor. -
Gate Control Subsystem: Compares
$V_{\text{ref}}$ against a$10.0\text{ kHz}$ symmetrical triangular carrier to generate complementary gate firing pulses ($Q_1$ through$Q_6$ ) with dead-time compensation.
-
LLC Filter Subsystem: Integrates the converter-side inductors (
$300\ \mu\text{H}$ ), grid-side inductors ($500\ \mu\text{H}$ ), and shunt capacitor bank ($100\ \mu\text{F}$ ). -
Measurement Subsystem: Samples three-phase voltages and currents at the Grid, Load, and STATCOM branches, executing real-time
$P-Q$ calculations through first-order smoothing filters.
The active power scope demonstrates the seamless startup and steady-state profile:
-
Load Active Power (
$P_{\text{load}}$ ): Strictly flat at$200.0\text{ kW}$ . -
STATCOM Active Power (
$P_{\text{statcom}}$ ): Briefly absorbs power during the initial$0.15\text{ s}$ charging transient to establish the$800\text{ V}$ DC-link, subsequently stabilizing at$-1.08\text{ kW}$ to cover switching and conduction losses. -
Grid Active Power (
$P_{\text{grid}}$ ): Tracks$P_{\text{load}} + P_{\text{loss}} \approx 201.08\text{ kW}$ .
The reactive power scope proves complete dynamic compensation:
-
Load Reactive Demand (
$Q_{\text{load}}$ ): Steady inductive consumption of$+100.0\text{ kVAR}$ . -
STATCOM Reactive Injection (
$Q_{\text{statcom}}$ ): Rapidly transitions from$0$ to$-100.0\text{ kVAR}$ capacitive within$0.15\text{ s}$ . -
Grid Reactive Power (
$Q_{\text{grid}}$ ): Clamps to$0.00\text{ kVAR}$ in steady state, proving total elimination of reactive current transmission.
- The DC-link capacitor voltage starts at
$0\text{ V}$ and reaches the reference setpoint of$800.0\text{ V}$ within$0.15\text{ s}$ with less than$2%$ overshoot. - Steady-state DC voltage ripple is strictly constrained within
$\pm 1.5\text{ V}$ ($< 0.2%$ ), verifying the sizing of the$10.0\text{ mF}$ capacitor bank.
-
Phase Alignment: The zoomed steady-state grid current (
$I_{abc}$ ) and grid voltage ($V_{abc}$ ) waveforms are perfectly in phase, confirming true unity power factor ($PF = 1.000$ ). -
Harmonic Purity: The third-order
$LCL$ filter completely eliminates the$10\text{ kHz}$ carrier ripple, delivering pure sinusoidal waveforms to the AC utility network.
To reproduce and run the model in MATLAB/Simulink:
- Prerequisites: Ensure MATLAB R2024b (or compatible release) with Simulink and Simscape Electrical is installed.
-
Open Model: Launch MATLAB, navigate to the repository directory, and open:
open('Simulation/STATCOM.slx'); -
Execution Settings:
-
Solver: Fixed-step
ode23tordiscrete (no continuous states). -
Step Size (
$T_s$ ):$1.0 \times 10^{-5}\text{ s}$ ($10.0\ \mu\text{s}$ ). -
Stop Time:
$2.5\text{ s}$ .
-
Solver: Fixed-step
-
Run Simulation: Click Run in the Simulink toolstrip. Open the
Scopessubsystem to inspect real-time waveforms.
statcom-dq0-control-simulation/
├── images/ # Curated high-resolution (300 DPI) diagrams and scopes
│ ├── System_00_Root_STATCOM_Full_Overview.png # Level 0 overall Simulink architectural model
│ ├── System_01_L1_Control_Loop.png # Level 1 cascaded dq0 control loop subsystem
│ ├── System_02_L1_Conversion.png # Level 1 two-level VSC bridge subsystem
│ ├── System_04_L1_Gate_Control.png # Level 1 10 kHz SPWM gate generation logic
│ ├── System_05_L1_LLC_Filter.png # Level 1 third-order LCL interfacing filter
│ ├── System_06_L1_Measurement.png # Level 1 real-time power measurement subsystem
│ ├── Scope_Scopes_0_Iabc_Vabc.png # Full duration three-phase current & voltage scope
│ ├── Scope_Scopes_0_Iabc_Vabc_Zoomed.png # Zoomed sinusoidal in-phase waveforms (PF = 1.0)
│ ├── Scope_Scopes_1_PGrid_PLoad_PStatcom.png # Active power distribution dynamics
│ ├── Scope_Scopes_2_Vref_Voltage.png # DC-link 800V voltage regulation scope
│ └── Scope_Scopes_3_QGrid_QLoad_QStatcom.png # Reactive power dynamic compensation scope
├── Simulation/ # Simulink simulation files
│ └── STATCOM.slx # Complete MATLAB/Simulink R2024b model
├── Docs/ # Academic project documentation
│ ├── statcom-dq0-control.pdf # Compiled formal technical report (PDF)
│ └── LaTeX_Source/ # Complete LaTeX source files and assets
│ ├── statcom-dq0-control.tex # Full academic paper source
│ └── Images/ # Vector assets and 300 DPI figures
└── README.md # Master engineering documentation
Abd El-Rhman Muhammad Saad
Department of Electrical Engineering
Faculty of Engineering, Alexandria University (Class of 2026)
Alexandria, Egypt









