Adaptive PID for BLDC Speed Control

this file shares the idea of how to design and develop an adaptive PID for controlling the speed of BLDC motors in spite of torque variation


Updated 6 Jul 2019

View License

The major of this project is to show how to design and implement an adaptive PID (APID) for your power system. The adaptive PID designed, compares the reference speed with the actual speed of BLDC. The output of PID then feeds a controlled voltage source attached to a universal 3-phase bridge, the bridge that is connected to a BLDC motor.

The torque is constant during the first 0.2 sec of simulation, then it is changed abruptly to 10N to examine the ability of APID speed control in spite of torque variation.

The APID model is adapted from the following article:
Self-tuning of PID controllers by adaptive interaction (

You might also find my article for another practical example:
Online Adaptive Power Factor Correction Controller for DC-DC Converters ( )

Please do not hesitate to contact me if you require any further information.


Cite As

Mahdi Mansouri (2023). Adaptive PID for BLDC Speed Control (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with R2018a to R2019a
Platform Compatibility
Windows macOS Linux

Inspired: Adaptive Fuzzy Control

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes