.st0{fill:#FFFFFF;}

Design BLDC Motor Speed Controller in Simulink 

 October 1, 2021

By  Addepalli Dolendra Vikas

Introduction

In this blog, we will be going through what a BLDC or Brush Less DC motor is, how is it different from the Permanent Magnet Synchronous Machines, and how to design a Speed Controller for BLDC in Simulink.

Required Add-Ons

  • Simscape
  • Simscape Electrical

BLDC Motors

            Everyday devices to the more complex machines use brushless dc motors that convert electrical energy into rotational mechanical energy. Brushless dc motors, also referred to as BLDCs, have many advantages over the brushed dc motor. BLDC motors require less maintenance and provide higher efficiency. That’s why these motors replaced brushed dc motors in many applications.

             BLDC motor operates on the same principle as the brushed motors in which rotational motion is generated through the attraction and repulsion of the magnetic poles of permanent and electromagnets.
Permanent and electro magnet

Permanent and electro magnet

The way these motors are controlled is very different. These motors require a complex controller to convert DC power to the three-phase voltages. To better understand this, let’s look at the BLDC motor structure.

BLDC motor structure

BLDC motor structure

Here the rotor is a Permanent magnet, and the stator is a three-phase Coil winding. This is a DC motor turned inside out. There are various BLDC motors with different magnet arrangements. The stator may have a different number of windings, and the rotor may have multiple pole pairs.

            A permanent magnet (PM) AC motor, which has a trapezoidal back-EMF, is referred to as a BLDC motor. The BLDC motor drive system is based on the feedback of the rotor system at fixed points for communication of the phase currents.

Wave forms

Wave forms

The BLDC motor requires quasi-rectangular shaped currents fed into stator windings of the machine. Alternatively, the voltage may be applied to the motor every 1200, with a current limit to hold the current within motor capabilities. Because the phase currents are excited in synchronism with the constant part of the back-EMF, constant torque is generated.

            The electromagnetic torque developed by the BLDC motor is a function of PM flux and current. Back-EMF in each phase is trapezoidal and is 1200 displaced (electrical) to each other. A rectangular current pulse is injected into each phase. The phase current coincides with the flat portion (1200) of the back-EMF waveform. Hence, the motor develops almost constant torque.

             The following is the functional block diagram of the BLDC motor controller.
Functional block diagram of the BLDC controller

Functional block diagram of the BLDC controller

Design BLDC Controller in Simulink

Note: Before designing the BLDC controller in Simulink, ensure that Simscape and Simscape electrical are correctly installed.

 The following image is the block diagram of the BLDC speed controller in Simulink.
BLDC controller block diagram in Simulink

BLDC controller block diagram in Simulink

Get Access to
Simulink Model!

Design the speed controller to the BLDC Motor or Brushless DC motor in Simulink using the PMSM or Permanent Magnet Synchronous Machine block; Developed in MATLAB R2020b with Simulink, Simscape, and Simscape Electrical

Select the permanent magnet synchronous machine, change its back EMF to trapezoidal in its block parameters, and set the number of phases to 3. To view the output of this block, we need to use the bus selector. In the bus selector, you can view the parameters that the PMSM (Permanent Magnet Synchronous Machine) can give as output. Select the required parameters that you wish to view and close the block. The following image is the switching logic block,

Switching logic block

Switching logic block

The switching block takes the three hall sensor digital signals from the motor as input. It generates the three logic signals for the PWM drive circuit. The following image is the PWM drive circuit,

PWM drive circuit

PWM drive circuit

The PWM drive circuit develops six device driving signals of the three-phase inverter supplying the BLDC motor. The following image is the block diagram o the three-phase inverter,

PWM inverter

PWM inverter

Take the rotor speed as the feedback and feed the error signal to the PID block. Now connect the PID block output to the PWM drive circuit to generate the six device driving signals of the three-phase inverter supplying the BLDC motor accordingly. The following image is the scope data before zooming,

Rotor speed and hall effect sensor digital signal

Rotor speed and hall effect sensor digital signal

The first channel shows the rotor speed of the motor, the speed of the motor is gradually reached to the set value. The remaining three channels are the three hall sensor digital signals. The following image is the scope data after zooming.

Hall effect sensor digital signal

Hall effect sensor digital signal

The following image is the scope data showing the back EMF generated by the BLDC motor,

Trapezoidal back EMF

Trapezoidal back EMF

As we discussed earlier, the back EMF generated by the BLDC motor is trapezoidal.

Conclusion

            Nowadays, DC motors are replaced by these BLDC motors, which require complex controllers, unlike regular DC motors. So, understanding the working of the BLDC motor and its controller will give better intuition on the working latest gadgets. “Simulink” and “Simscape” have made simulating these motors and verifying the control system for these motors easy.

Get instant access to the code, model, or application of the video or article you found helpful! Simply purchase the specific title, if available, and receive the download link right away! #MATLABHelper #CodeMadeEasy

Ready to take your MATLAB skills to the next level? Look no further! At MATLAB Helper, we've got you covered. From free community support to expert help and training, we've got all the resources you need to become a pro in no time. If you have any questions or queries, don't hesitate to reach out to us. Simply post a comment below or send us an email at [email protected].

And don't forget to connect with us on LinkedIn, Facebook, and Subscribe to our YouTube Channel! We're always sharing helpful tips and updates, so you can stay up-to-date on everything related to MATLAB. Plus, if you spot any bugs or errors on our website, just let us know and we'll make sure to fix it ASAP.

Ready to get started? Book your expert help with Research Assistance plan today and get personalized assistance tailored to your needs. Or, if you're looking for more comprehensive training, join one of our training modules and get hands-on experience with the latest techniques and technologies. The choice is yours – start learning and growing with MATLAB Helper today!

Education is our future. MATLAB is our feature. Happy MATLABing!

About the author 

Addepalli Dolendra Vikas

I’m an electronics hobbyist and tech enthusiast. I keep roaming around the stuff that are related to embedded systems, IoT and robotics. I love prototyping stuff and make it work.

  • A. Sai Sharmila says:

    I m recently working on Torque control of bldc motor. Can I check you simulink model if possible.

  • TSCA Electrical Group of Company Incorporated says:

    Hey, I read your article and your information is very amazing and so much helpful for me. Keep it up and Thank you very much. 🙂

  • Chandradhekhar says:

    Useful sir. Pl provide details of pwm driver circuit. One input to relational operator is pid and other input chain? Pl explain the block between pmsm and pwm inverter.
    My mail id is *********@gmail.com (Email ID Removed in Moderation)
    Thank u.

  • Hello, I live in Argentina; $60 US dollars is a lot of money for our economy. I also like your work. I wish I had the money to try it out. Goodbye.

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

    MATLAB Helper ®

    Follow: YouTube Channel, LinkedIn Company, Facebook Page, Instagram Page

    Join Community of MATLAB Enthusiasts: Facebook Group, Telegram, LinkedIn Group

    Use Website Chat or WhatsApp at +91-8104622179

    >