top of page

Fuzzy Tuned PI Speed control of BLDC motor in MATLAB

3 hours ago
5 min read

Fuzzy Tuned PI Speed control of BLDC motor in MATLAB


𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧

𝐅𝐮𝐳𝐳𝐲 𝐓𝐮𝐧𝐞𝐝 𝐏𝐈 𝐒𝐩𝐞𝐞𝐝 𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐨𝐟 𝐁𝐋𝐃𝐂 𝐌𝐨𝐭𝐨𝐫 𝐢𝐧 𝐌𝐀𝐓𝐋𝐀𝐁 is a motor control system developed using MATLAB/Simulink to regulate the speed of a Brushless DC (BLDC) motor under varying operating conditions.



Fuzzy Tuned PI Speed control of BLDC motor in MATLAB
₹6,000.00₹3,000.00
Buy Now


The system combines a 𝐅𝐮𝐳𝐳𝐲 𝐋𝐨𝐠𝐢𝐜 𝐂𝐨𝐧𝐭𝐫𝐨𝐥𝐥𝐞𝐫 (𝐅𝐋𝐂) with a conventional 𝐏𝐫𝐨𝐩𝐨𝐫𝐭𝐢𝐨𝐧𝐚𝐥–𝐈𝐧𝐭𝐞𝐠𝐫𝐚𝐥 (𝐏𝐈) controller to adjust controller gains dynamically and improve speed tracking.

Main objectives:

  • Maintain the BLDC motor speed near the reference speed.

  • Automatically adjust PI controller gains using fuzzy logic.

  • Reduce speed variations caused by load disturbances.

  • Achieve speed tracking during reference speed changes.

  • Analyze stator current, back EMF, rotor speed, and electromagnetic torque.

𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰

The MATLAB/Simulink model consists of a voltage-source inverter, BLDC motor, Hall sensor decoder, electronic commutation logic, and fuzzy-tuned PI speed controller.

Illustrative BLDC motor control architecture.

𝐌𝐚𝐢𝐧 𝐒𝐲𝐬𝐭𝐞𝐦 𝐂𝐨𝐦𝐩𝐨𝐧𝐞𝐧𝐭𝐬

Component

Function

BLDC Motor

Converts electrical energy into mechanical rotation

Voltage Source Inverter

Supplies controlled three-phase power

Hall Sensor Decoder

Determines rotor position and commutation sequence

Gate Pulse Generator

Generates six switching signals for the inverter

Fuzzy Logic Controller

Adjusts PI controller gains

PI Speed Controller

Regulates motor speed

Speed Feedback

Measures actual motor speed

Measurement Scopes

Monitor current, back EMF, speed, and torque

𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐏𝐚𝐫𝐚𝐦𝐞𝐭𝐞𝐫𝐬

Parameter

Value

Simulation software

MATLAB/Simulink

Motor type

Brushless DC Motor

Rated power

1 kW

Rated speed

3000 RPM

Speed controller

Fuzzy Tuned PI

Inverter

Three-phase voltage-source inverter

Rotor position detection

Hall sensors

Initial load torque

0 N·m

Load torque step

3 N·m

Load application time

0.1 s

Initial speed reference

3000 RPM

Additional speed reference

1500 RPM

Fuzzy controller inputs

Speed error and change in speed error

Fuzzy controller outputs

PI gains (Kp and Ki)

Fuzzy rules

Approximately 24 rules, as described

𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬

The system operates using a closed-loop speed control technique with electronic commutation.

Reference Speed (RPM)

Speed Error Calculation

Fuzzy Logic Tuning of Kp and Ki

PI Controller and Voltage Regulation

Three-Phase Inverter and BLDC Motor

Actual Speed Measurement and Feedback

1. 𝐑𝐞𝐟𝐞𝐫𝐞𝐧𝐜𝐞 𝐒𝐩𝐞𝐞𝐝 𝐚𝐧𝐝 𝐅𝐞𝐞𝐝𝐛𝐚𝐜𝐤

  • The required speed is provided as a reference input.

  • The actual motor speed is measured using the feedback system.

  • The reference and actual speeds are compared.

  • The resulting speed error is supplied to the fuzzy-tuned PI controller.

2. 𝐇𝐚𝐥𝐥 𝐒𝐞𝐧𝐬𝐨𝐫 𝐃𝐞𝐜𝐨𝐝𝐢𝐧𝐠

  • Three Hall sensors identify rotor position.

  • The Hall signals are processed using a decoder and lookup logic.

  • The decoder generates the required commutation information.

  • The commutation signals determine which inverter switches should conduct.

3. 𝐈𝐧𝐯𝐞𝐫𝐭𝐞𝐫 𝐒𝐰𝐢𝐭𝐜𝐡𝐢𝐧𝐠

  • The inverter contains six power semiconductor switches.

  • Switching signals are generated using electronic commutation logic.

  • The inverter supplies three-phase electrical power to the BLDC motor.

  • The controller regulates the inverter input voltage to achieve the required speed.

4. 𝐒𝐩𝐞𝐞𝐝 𝐑𝐞𝐠𝐮𝐥𝐚𝐭𝐢𝐨𝐧

  • The fuzzy controller continuously evaluates speed error and its variation.

  • PI controller gains are adjusted based on fuzzy inference rules.

  • The PI controller generates the required control signal.

  • The motor responds to the control signal and attempts to follow the reference speed.

𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐒𝐭𝐫𝐚𝐭𝐞𝐠𝐲

𝐅𝐮𝐳𝐳𝐲 𝐓𝐮𝐧𝐞𝐝 𝐏𝐈 𝐂𝐨𝐧𝐭𝐫𝐨𝐥𝐥𝐞𝐫

A conventional PI controller uses fixed proportional and integral gains. However, motor operating conditions may change due to speed commands and mechanical load disturbances.

The 𝐅𝐮𝐳𝐳𝐲 𝐓𝐮𝐧𝐞𝐝 𝐏𝐈 𝐂𝐨𝐧𝐭𝐫𝐨𝐥𝐥𝐞𝐫 adjusts these gains according to the motor operating condition.

Controller input/output

Description

Speed Error

Difference between reference and actual speed

Change in Error

Variation in speed error

Kp

Proportional gain

Ki

Integral gain

PI Output

Control signal for voltage regulation

𝐅𝐮𝐳𝐳𝐲 𝐋𝐨𝐠𝐢𝐜 𝐎𝐩𝐞𝐫𝐚𝐭𝐢𝐨𝐧

  • Fuzzification: Converts numerical input signals into fuzzy membership values.

  • Rule Evaluation: Uses approximately 24 fuzzy rules to determine controller gain adjustments.

  • Inference Process: Evaluates the relationship between speed error, error variation, and required gains.

  • Defuzzification: Generates numerical values for proportional and integral gains.

  • PI Control: Uses the adjusted gains to generate a modulating signal.

𝐑𝐨𝐥𝐞 𝐨𝐟 𝐊𝐩 𝐚𝐧𝐝 𝐊𝐢

Gain

Control function

Kp

Responds to speed error and influences dynamic response

Ki

Reduces steady-state speed error

Fuzzy gain tuning

Adapts the gains to changing operating conditions

This adaptive gain adjustment helps the controller maintain speed regulation during load disturbances and reference speed variations.

𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬

The MATLAB/Simulink model is evaluated under load torque variations and changes in reference speed.

1. 𝐒𝐩𝐞𝐞𝐝 𝐑𝐞𝐬𝐩𝐨𝐧𝐬𝐞

The motor speed response is analyzed to determine how effectively the fuzzy-tuned PI controller follows the reference speed.

Observed behavior:

  • The motor is tested at a reference speed of 3000 RPM.

  • The motor experiences transient speed variations during operating changes.

  • The controller adjusts the control signal to regulate motor speed.

  • The speed response demonstrates tracking toward the reference after disturbances.

2. 𝐋𝐨𝐚𝐝 𝐓𝐨𝐫𝐪𝐮𝐞 𝐕𝐚𝐫𝐢𝐚𝐭𝐢𝐨𝐧

A mechanical load disturbance is applied to evaluate speed regulation.

Simulation condition

Value

Initial load torque

0 N·m

Load torque after step

3 N·m

Load change time

0.1 s

Reference speed

3000 RPM

Response examined

Speed and electromagnetic torque

Result: The controller responds to the load variation and works to restore motor speed toward its commanded value.

3. 𝐑𝐞𝐟𝐞𝐫𝐞𝐧𝐜𝐞 𝐒𝐩𝐞𝐞𝐝 𝐕𝐚𝐫𝐢𝐚𝐭𝐢𝐨𝐧

Different reference speed values are used to evaluate dynamic speed tracking.

Test condition

Reference speed

Rated speed operation

3000 RPM

Reduced speed operation

1500 RPM

Speed recovery

Return toward 3000 RPM

The simulation demonstrates that changing the reference speed affects the actual motor speed, back EMF waveform, and electromagnetic torque.

4. 𝐒𝐭𝐚𝐭𝐨𝐫 𝐂𝐮𝐫𝐫𝐞𝐧𝐭 𝐚𝐧𝐝 𝐁𝐚𝐜𝐤 𝐄𝐌𝐅

  • The stator current changes during starting and load disturbances.

  • The back EMF waveform varies according to rotor speed.

  • Back EMF magnitude and frequency change when motor speed changes.

  • These waveforms help analyze motor commutation and electrical performance.

5. 𝐄𝐥𝐞𝐜𝐭𝐫𝐨𝐦𝐚𝐠𝐧𝐞𝐭𝐢𝐜 𝐓𝐨𝐫𝐪𝐮𝐞

  • Starting torque exhibits transient variations.

  • Torque changes when the mechanical load is applied.

  • The motor develops electromagnetic torque to meet the load demand.

  • Torque ripple can be observed in the simulation waveform.

𝐎𝐯𝐞𝐫𝐚𝐥𝐥 𝐏𝐞𝐫𝐟𝐨𝐫𝐦𝐚𝐧𝐜𝐞 𝐎𝐛𝐬𝐞𝐫𝐯𝐚𝐭𝐢𝐨𝐧

Output parameter

Simulation observation

Rotor speed

Tracks the commanded operating speed after transient variations

Stator current

Changes with switching and motor operating conditions

Back EMF

Varies with motor speed

Electromagnetic torque

Responds to applied mechanical load

Proportional gain

Adjusted through fuzzy inference

Integral gain

Adjusted through fuzzy inference

Speed regulation

Maintained through closed-loop PI control

The qualitative observations indicate closed-loop speed regulation. Quantitative performance measures such as settling time, percentage overshoot, and steady-state speed error would require further waveform analysis.

𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬

  • 𝐅𝐮𝐳𝐳𝐲 𝐓𝐮𝐧𝐞𝐝 𝐏𝐈 𝐂𝐨𝐧𝐭𝐫𝐨𝐥 – Adaptive proportional and integral gain adjustment.

  • 𝐁𝐋𝐃𝐂 𝐌𝐨𝐭𝐨𝐫 𝐌𝐨𝐝𝐞𝐥 – Simulation of a 1 kW, 3000 RPM motor.

  • 𝐄𝐥𝐞𝐜𝐭𝐫𝐨𝐧𝐢𝐜 𝐂𝐨𝐦𝐦𝐮𝐭𝐚𝐭𝐢𝐨𝐧 – Six-switch inverter control using Hall sensor information.

  • 𝐒𝐩𝐞𝐞𝐝 𝐅𝐞𝐞𝐝𝐛𝐚𝐜𝐤 – Closed-loop monitoring and regulation.

  • 𝐋𝐨𝐚𝐝 𝐃𝐢𝐬𝐭𝐮𝐫𝐛𝐚𝐧𝐜𝐞 𝐀𝐧𝐚𝐥𝐲𝐬𝐢𝐬 – Evaluation under mechanical load changes.

  • 𝐕𝐚𝐫𝐢𝐚𝐛𝐥𝐞 𝐒𝐩𝐞𝐞𝐝 𝐎𝐩𝐞𝐫𝐚𝐭𝐢𝐨𝐧 – Reference speed adjustment and tracking.

  • 𝐏𝐞𝐫𝐟𝐨𝐫𝐦𝐚𝐧𝐜𝐞 𝐌𝐨𝐧𝐢𝐭𝐨𝐫𝐢𝐧𝐠 – Analysis of current, back EMF, speed, and torque.

  • 𝐌𝐀𝐓𝐋𝐀𝐁/𝐒𝐢𝐦𝐮𝐥𝐢𝐧𝐤 𝐈𝐦𝐩𝐥𝐞𝐦𝐞𝐧𝐭𝐚𝐭𝐢𝐨𝐧 – Simulation-based evaluation of motor control.

𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬

The fuzzy-tuned PI speed control approach can be studied for several motor-drive applications.

Application

Relevance

Electric Vehicles

Traction motor speed regulation

Industrial Automation

Variable-speed electric drives

Robotics

Controlled motor rotation

Electric Pumps

Adjustable-speed pumping systems

Electric Fans

Speed regulation under varying demand

Conveyor Systems

Motor speed control during load changes

Motor Control Research

Analysis of adaptive PI control

Educational Laboratories

MATLAB/Simulink-based BLDC drive studies

𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧

The 𝐅𝐮𝐳𝐳𝐲 𝐓𝐮𝐧𝐞𝐝 𝐏𝐈 𝐒𝐩𝐞𝐞𝐝 𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐨𝐟 𝐁𝐋𝐃𝐂 𝐌𝐨𝐭𝐨𝐫 𝐢𝐧 𝐌𝐀𝐓𝐋𝐀𝐁 demonstrates an adaptive speed regulation technique using fuzzy logic and PI control.

The controller adjusts proportional and integral gains based on speed error and changes in speed error, allowing the BLDC motor to respond to reference speed variations and mechanical load disturbances.

The MATLAB/Simulink model provides a useful platform for understanding 𝐁𝐋𝐃𝐂 𝐦𝐨𝐭𝐨𝐫 𝐜𝐨𝐧𝐭𝐫𝐨𝐥, 𝐟𝐮𝐳𝐳𝐲 𝐥𝐨𝐠𝐢𝐜 𝐭𝐮𝐧𝐢𝐧𝐠, 𝐞𝐥𝐞𝐜𝐭𝐫𝐨𝐧𝐢𝐜 𝐜𝐨𝐦𝐦𝐮𝐭𝐚𝐭𝐢𝐨𝐧, and 𝐜𝐥𝐨𝐬𝐞𝐝-𝐥𝐨𝐨𝐩 𝐬𝐩𝐞𝐞𝐝 𝐫𝐞𝐠𝐮𝐥𝐚𝐭𝐢𝐨𝐧.

The system is suitable for students, engineers, and researchers interested in electric motor drives, intelligent control techniques, and MATLAB/Simulink motor modeling.


Comments


bottom of page