What is Speed Control of BLDC Motor Using a 5-Level H-Bridge Inverter in MATLAB Simulink?
Speed Control of BLDC Motor Using a 5-Level H-Bridge Inverter in MATLAB Simulink is a MATLAB-based technical project and simulation model. Brushless DC (BLDC) motors are widely used in electric vehicle drivetrains, industrial servo systems, aerospace actuators, and robotic joints. Compared to brushed DC and induction machines, a BLDC motor operates without mechanical brushes or a commutator, which eliminates brush wear, reduces maintenance, and delivers a higher torque-to-weight ratio in compact spaces. Conventional BLDC drives rely on a standard two-level, three-phase voltage source inverter. At higher DC-link voltages, this topology switches the full bus voltage across the stator windings in a single step. Each switching transition creates a steep voltage edge (high dV/dt) that stresses winding insulation, induces high-frequency bearing currents, increases electromagnetic interference (EMI), and adds torque ripple and acoustic noise. A 5-level Cascaded H-Bridge (CHB) inverter solves these problems by dividing the output phase voltage into smaller steps. Connecting two single-phase H-bridge cells in series per phase, each supplied by an isolated DC source, produces five voltage levels: +2Vdc, +Vdc, 0, −Vdc, and −2Vdc. Because each transition changes the phase voltage by half the total bus voltage per step, the stepped waveform tracks the reference more closely, lowers total harmonic distortion (THD), and reduces switching stress on the power devices. This project models closed-loop speed control of a BLDC motor driven by a 5-level CHB inverter in MATLAB Simulink. Combining a proportional-integral (PI) speed controller, electronic commutation logic, and multicarrier PWM modulation, the simulation evaluates speed tracking, stator current quality, and torque response under varying load conditions.
Project Methodology
-
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
SteporSignal Builderblock to the mechanical torque input (Tm) so you can apply a sudden load disturbance once the motor reaches steady-state speed. -
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.
-
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. -
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
Gainblock (30/π), and subtract it from the reference speed command (ωref). Feed the speed error into a discretePID Controllerblock 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 byRepeating Sequenceblocks at the chosen switching frequency (fsw). Combine the resulting carrier PWM pulses with the 6-step commutation enables using logicalANDgates so that only the two active phases switch while the idle phase stays off. -
Solver Configuration and Performance Verification: Place a
powerguiblock 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 thepowerguiFFT 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:
% 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');