Verified MATLAB & Simulink Project

Speed Control of BLDC Motor Using a 5-Level H-Bridge Inverter in MATLAB Simulink

BLDC Motor Speed Control Using 5-Level H-Bridge Inverter | MATLAB – MATLAB Simulation Video
YouTube Watch Full Simulation Free Preview
MATLAB R2020a - R2024b
Zero Convergence Errors
Simscape / SimPowerSystems
Complete Simulation Pack 4.9 (120+ Downloads)
$25.00
$36.25
30% OFF
  • Complete Simulink Model (.slx file)
  • Parameter Init Script (.m file)
  • Scope & Waveform Signals pre-configured
  • Design & Methodology Report (PDF Guide)
Required
Invalid email
Instant .ZIP download link emailed upon checkout

Project Methodology

  1. BLDC Motor and Mechanical Load Setup: Add the Permanent Magnet Synchronous Machine (PMSM) block from Simscape Electrical and set the back-EMF waveform to Trapezoidal (120° flat-top). Configure the stator phase resistance (Rs), stator inductance (Ls), flux linkage or back-EMF constant (Ke), number of pole pairs (p), rotor inertia (J), and viscous damping (B). Connect a Step or Signal Builder block to the mechanical torque input (Tm) so you can apply a sudden load disturbance once the motor reaches steady-state speed.

  2. 5-Level Cascaded H-Bridge (CHB) Inverter Topology: Build each of the three phase legs (A, B, and C) using two single-phase H-bridge cells connected in series. Each cell contains four MOSFET or IGBT switches with antiparallel diodes (S1 to S4 in Cell 1, and S5 to S8 in Cell 2) and an isolated DC source of voltage Vdc. Connect the three cascaded legs in a star (wye) configuration to the A, B, and C stator terminals of the PMSM. By controlling the two cells together, each phase leg synthesizes five voltage levels:

    • +2Vdc: Both Cell 1 and Cell 2 output +Vdc.
    • +Vdc: One cell outputs +Vdc while the other is bypassed (0 V).
    • 0 V: Both cells are bypassed (upper switches on or lower switches on).
    • −Vdc: One cell outputs −Vdc while the other is bypassed (0 V).
    • −2Vdc: Both Cell 1 and Cell 2 output −Vdc.
  3. Hall-Effect Sensing and 6-Step Commutation Logic: Read the three Hall-effect sensor outputs (Ha, Hb, Hc) from the PMSM measurement bus. Every 60° electrical, the Hall signals transition through six valid 3-bit states (excluding 000 and 111). Use a Truth Table, Lookup Table, or combinational logic gates to map each Hall state to six sector-enable signals. At any instant, only two stator phases conduct (one connected to the positive modulated rail and one to the return rail) while the third phase remains open, keeping stator current aligned with the flat 120° peak of the trapezoidal back-EMF.

  4. Closed-Loop PI Speed Control and Multicarrier PWM: Measure the rotor angular speed from the PMSM bus, convert it from rad/s to RPM using a Gain block (30/π), and subtract it from the reference speed command (ωref). Feed the speed error into a discrete PID Controller block configured in PI mode with output saturation and anti-windup clamping so the modulation index stays within [0, 1]. Compare this control signal against four level-shifted Phase-Disposition (PD-PWM) or phase-shifted triangular carriers generated by Repeating Sequence blocks at the chosen switching frequency (fsw). Combine the resulting carrier PWM pulses with the 6-step commutation enables using logical AND gates so that only the two active phases switch while the idle phase stays off.

  5. Solver Configuration and Performance Verification: Place a powergui block in the model and set the simulation type to Discrete, choosing a sample time Ts at least 20 to 50 times smaller than the PWM period (1/fsw) so carrier crossings are captured accurately. Log the rotor speed, electromagnetic torque (Te), stator currents (Ia, Ib, Ic), and inverter phase voltage (Van). Open the powergui FFT Analysis tool to measure phase voltage and stator current THD, and compare speed rise time, overshoot, and torque ripple against a baseline two-level six-switch inverter under identical speed and load steps.

Verified MATLAB Simulation Code Demonstration

Syntax-highlighted executable code demonstration for Speed Control of BLDC Motor Using a 5-Level H-Bridge Inverter in MATLAB Simulink:

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');
Speed Control of BLDC Motor Using a 5-Level H-Bridge Inverter in MATLAB Simulink $25.00
$25.00