BLDCPMSM Control Using Sensorless FOC Algorithm
BLDCPMSM Control Using Sensorless FOC Algorithm
com BLDC/PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 MCUs
Application Brief
BLDC/PMSM Control Using Sensorless FOC Algorithm
Based on MSPM0 MCUs
In our modern world, motors are used in many products, such as power tools, e-bike, e-car, industrial robot, and
more. BLDC (brushless DC) and PMSM (permanent-magnet synchronous motor) motors in particular provide
advantages in terms of high efficiency, low noise and long life. For the control method of the BLDC or PMSM,
field-oriented control (FOC) algorithms are used in many applications where the motor needs to run smoothly
with high efficiency and minimal audible noise. MSPM0 MCUs can fill this role of FOC control with its low-price,
broad portfolio, efficient math accelerator, and high-performance features.
Vector control, also called field-oriented control (FOC), is a variable-frequency drive (VFD) control method in
which the stator currents of a three-phase AC or brushless DC electric motor are identified as two orthogonal
components that can be visualized with a vector. One component defines the magnetic flux of the motor, the
other the torque. The driver control system calculates the corresponding current component references from the
flux and torque references given by the drive's speed control.
SLAAE96 – MARCH 2023 BLDC/PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 1
Submit Document Feedback MCUs
Copyright © 2023 Texas Instruments Incorporated
BLDC/PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 MCUs www.ti.com
MSPM0Gx
Across BLDC and PMSM related applications, users need to accurately control the motor speed, torque, and
other variables to meet the requirements of actual applications. Therefore, the main resources used are as
follows:
Hardware
• Microcontroller (MCU): As the motor driver controller, it controls analog data acquisition, run control
algorithms, monitors the motor status, and communicates with other products.
• Predriver: Predriver for power stage / inverter bridge
• Power stage and inverter bridge: 6x MOSFETs, IGBTs, Gallium nitride (GaN) FETs
• Analog feedback: collects bus voltage, motor phase voltages, and motor phase currents
• Position sensing (optional): absolute encoders, sin/cos transducers
Software
• Application: Task management and scheduling
• Algorithm: Calculate the drive signal output of the motor in real time according to the feedback of the motor
and the user input speed/torque references
TI Devices
You can realize all these functions using TI devices for the driver and powerstage across a wide range of
3-phase motor voltages and powers.
MCU Motor Voltage (Switch Type) Pre-driver Powerstage, Inverter
3 V to 40 V (MOSFET) 3-Phase BLDC Motor Driver (DRV831x series)
3-phase BLDC Gate Driver
6 V to 100 V (MOSFET) N-channel MOSFET (CSD series)
MSPM0Gxx ARM Cortex M0+ 80- (DRV83xx series)
MHz MCUs Up to 650 V (GaN) GaN ICs (LMG3xx series)
Half bridge drivers (UCC2xxx
Up to 700 V (MOSFET, IGBT) MOSFET, IGBT
series, LMxxx series)
2 BLDC/PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 SLAAE96 – MARCH 2023
MCUs Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com BLDC/PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 MCUs
SLAAE96 – MARCH 2023 BLDC/PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 3
Submit Document Feedback MCUs
Copyright © 2023 Texas Instruments Incorporated
BLDC/PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 MCUs www.ti.com
Vbus
MSPM0G150x
MSPM0G350x 1H 2H 3H
FOC 2H
Timer
Speed 3H 3-ph
6 PWM 3-ph.
Control BLDC/
Fault Gate
nFAULT PMSM
Detect driver 1L 2L 3L
2L
DAC R 3L
LPF
Fault Bus Overcurrent Protection
Detect
LS
Comp
MSPM0G310x 1H 2H 3H
FOC 2H
Timer
Speed 3-ph. 3H 3-ph
6 PWM
Control BLDC BLDC/
SPI (opt.) driver PMSM
1L 2L 3L
Fault nFAULT 2L
3L
Detect
ADC LPF
CSAs
Vbus
Current Sense x3
Solution Details
• Code Examples
– MSPM0 Sensorless FOC Library (access link)
• Supports DRV830x, DRV831x, DRV832x, DRV834x, DRV835x devices with integrated current sense
• Supports 3-phase gate driver solutions using MSPM0Gx integrated analog for current sense up to
650 V
• FOC Algorithm Libraries
– Hardware abstraction layer (HAL)
• Used to make the device-specific peripherals (for example, PWM, ADC, and Timer) generic across the
rest of the algorithm for easy porting.
– Space vector modulation (SVM)
• PWM control algorithm to create a continuously rotating space vector that generates appropriate gate
signals for the gate driver every PWM period.
– Clarke and Park transforms (and inverse)
• Mathematical modules used in the algorithm to achieve direct-quadrature-zero transform, which is a
crucial element of FOC theory. It is applied here to control three-phase stator and rotor qualities to
maximize torque.
4 BLDC/PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 SLAAE96 – MARCH 2023
MCUs Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com BLDC/PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 MCUs
– Estimator
• Used to measure rotor flux magnitude and angle in sensorless FOC systems.
– PID controller
• A typical proportional-integral-derivative controller can be used to stabilize closed loop performance.
– User
• A module containing all user tunable parameters to achieve desired performance.
• Timer and ADC
– Generate 6 external PWM signals from one timer (TIMA0) and trigger 2 ADC module conversions to
simultaneously sample phase currents, phase voltages, and bus voltage
– PWM: Center-aligned complementary PWM with deadband insertion.
– 6-MHz GBW, 4-V/µs slew rate, and 6-µV/°C drift in STD mode
• COMP – high-speed mode
Overcurrent Protecon
Motor MSPM0G150x
GND MSPM0G350x
OpAmps
Bus Shunt Motor Fault Event Timer
COMP
Resistor Current
8-bit DAC
6 PWM
Limi ng current threshold
Power GND
– The 8-bit DAC (1-µs settling time) inside COMP module enables a 40-ns response time for setting current
limit thresholds.
SLAAE96 – MARCH 2023 BLDC/PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 5
Submit Document Feedback MCUs
Copyright © 2023 Texas Instruments Incorporated
BLDC/PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 MCUs www.ti.com
Resources
Order an MSPM0 LaunchPad development kit and a DRV83xx EVM today to start evaluating MSPM0 for your
motor control system. Jump start your motor control design with MSPM0 code examples and interactive online
trainings. You can also find other resources under these links:
• MSPM0 Academy
• MSPM0 landing page
• DRV83xx EVM
– DRV8311HEVM / DRV8316REVM / DRV8317HEVM
– BOOSTXL-DRV8320RS
– BOOSTXL-DRV8323RH / BOOSTXL-DRV8323RS
– DRV8353RH-EVM / DRV8353RS-EVM
• MSPM0 LaunchPad development kit
• TI Precision Labs - Motor Drivers: Brushless-DC Basics
6 BLDC/PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 SLAAE96 – MARCH 2023
MCUs Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
IMPORTANT NOTICE AND DISCLAIMER
TI PROVIDES TECHNICAL AND RELIABILITY DATA (INCLUDING DATA SHEETS), DESIGN RESOURCES (INCLUDING REFERENCE
DESIGNS), APPLICATION OR OTHER DESIGN ADVICE, WEB TOOLS, SAFETY INFORMATION, AND OTHER RESOURCES “AS IS”
AND WITH ALL FAULTS, AND DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION ANY
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF THIRD
PARTY INTELLECTUAL PROPERTY RIGHTS.
These resources are intended for skilled developers designing with TI products. You are solely responsible for (1) selecting the appropriate
TI products for your application, (2) designing, validating and testing your application, and (3) ensuring your application meets applicable
standards, and any other safety, security, regulatory or other requirements.
These resources are subject to change without notice. TI grants you permission to use these resources only for development of an
application that uses the TI products described in the resource. Other reproduction and display of these resources is prohibited. No license
is granted to any other TI intellectual property right or to any third party intellectual property right. TI disclaims responsibility for, and you
will fully indemnify TI and its representatives against, any claims, damages, costs, losses, and liabilities arising out of your use of these
resources.
TI’s products are provided subject to TI’s Terms of Sale or other applicable terms available either on ti.com or provided in conjunction with
such TI products. TI’s provision of these resources does not expand or otherwise alter TI’s applicable warranties or warranty disclaimers for
TI products.
TI objects to and rejects any additional or different terms you may have proposed. IMPORTANT NOTICE
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2023, Texas Instruments Incorporated