SLAAE96A March   2023  – September 2023 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3106 , MSPM0G3107 , MSPM0G3505 , MSPM0G3506 , MSPM0G3507

 

  1.   1
  2.   BLDC and PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 MCUs

BLDC and PMSM Control Using Sensorless FOC Algorithm Based on MSPM0 MCUs

In the 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 must run smoothly with high efficiency and minimal audible noise. MSPM0 MCUs can fill this role of FOC control with broad portfolio, efficient math accelerator, and high-performance features.

GUID-20230223-SS0I-FR4Z-KK8J-5BTVNHBX27FS-low.jpg
GUID-20230223-SS0I-XJ7Z-RPMP-ZGCPXXFHFMJP-low.jpg
GUID-20230223-SS0I-C6DR-CNJB-KS4HG54GXBXZ-low.jpg
GUID-20230223-SS0I-1Q39-HHQZ-B9WRPNXKPSCL-low.jpg
Home appliancesPower toolsIndustrial motorsPersonal transport

What are BLDC, PMSM, and FOC?

BLDC and PMSM are a brushless motors that use the force generated by the inconsistent magnetic fields of the stator and rotor to drive a motor. The rotor of this motor is a permanent magnet, and the stator is composed of multiple electromagnetic coils.

GUID-20230112-SS0I-GQSZ-QZLX-K8CT1CL4HPMX-low.pngFigure 1 Consistent Magnetic Field
GUID-20230112-SS0I-W24W-9C8M-LZ069JJZS6WR-low.pngFigure 2 Inconsistent Magnetic Field

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 speed control of the drive.

GUID-20230208-SS0I-CPW6-D4WW-V7NMFLMBF63W-low.svgFigure 3 FOC Control Algorithm Block Diagram

Across BLDC and PMSM related applications, users must 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): Motor driver controller, which 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 N-type MOSFETs, IGBTs, or Gallium nitride (GaN) FETs
  • Analog feedback: Collects bus voltage, motor phase voltages, and motor phase currents
  • Position sensing (optional): Absolute encoders, resolvers, 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

TI devices can realize all of these functions for the driver and powerstage across a wide range of 3-phase motor voltages and powers.

MCUMotor Voltage (Switch Type)PredriverPowerstage, Inverter
MSPM0Gxxxx ARM Cortex M0+ 80-MHz MCUs3 V to 40 V (MOSFET)3-Phase BLDC Motor Driver (DRV831x series)
6 V to 100 V (MOSFET)3-phase BLDC Gate Driver (DRV83xx series)N-channel MOSFET (CSD series)
Up to 650 V (GaN)GaN ICs (LMG3xx series)
Up to 700 V (MOSFET, IGBT)Half bridge drivers (UCC2xxx series, LMxxx series)MOSFET, IGBT

Why is MSPM0 Considered for BLDC, PMSM, and FOC?

Texas Instruments' scalable M0+ MSPM0Gxx high-performance MCUs with advanced on-chip motor control peripherals provides a design for variety of motor control applications. The portfolio covers from 32 KB to 128 KB of flash with scalable analog integration, motor control peripherals, and CAN.

GUID-20230118-SS0I-SN8M-9JLD-5ZPPPZSBGBHN-low.svg
  • 80-MHz M0+ CPU – Reduces processing time for FOC algorithms and sensing signal
  • Integrated math accelerator
    • 32-bit hardware divider (8 cycles) for fixed point and IQ format numbers
    • Square root operation in 21 cycles
    • 24-bit trigonometric calculations (sin, cos, atan) in 29 cycles
  • Two independent 4-Msps 12-bit ADC Module (up to 16 channels)
    • Up to 11 ENOB with SNR
    • Up to 4-Msps ADC boost motor phase current sensing within 250 ns
  • Two "zero-drift" chopper op amps – Accurately amplifies 2-phase currents and calculate the 3rd phase current
  • Three high speed comparators– Enables hardware low-side current limiting for motor with zero-wait
  • Advanced motor control timers – Flexible 6 PWM control and cross triggers
    • Center-aligned PWM generate
    • Asymmetric PWM allows two center-aligned PWM signals to be generated with a controlled phase shift
    • Complementary PWM with dead band insertion
    • Cross trigger to generate ADC timing to capture 2-phase current
  • Robust IO design with glitch filter – Provides a reliable system despite motor noise.
  • Comprehensive communication interfaces – Including UART, I2C, SMBus, SPI and CAN-FD to meet all the communication requirements with the motor control system.
  • FOC algorithm library – Accelerates time to market of motor control design.
  • Scalable MCU portfolio – Pin-to-pin compatible devices across a wide range of flash memory options.
  • Low cost and small footprint package – Options for space constrained designs.
  • Wide operating temperature range (-40°C to +125°C)
  • Automotive-Q100 qualified and functional safety options (up to ASIL-B) for system stability and reliability.

What can MSPM0 do in BLDC, PMSM, and FOC?

In BLDC, PMSM, and FOC applications, MSPM0 monitors the motor status and runs the FOC algorithm. Depending on the system architecture and motor voltage, there are two main topologies of analog integration used in FOC applications, especially in sensorless FOC applications where an observer is required to estimate the real-time position of the motor. The MSPM0G also provides an integrated hardware accelerator to calculate the computations for efficient FOC performance at 30 kHz PWM frequency or higher.

MSPM0 Analog Integration and Gate Driver

With the help of scalable analog integration, the MSPM0 can accurately sense the motor phase voltage, bus voltage, current, and speed quickly to provide feedback to the FOC algorithm. Two programmable gain amplifiers (PGAs) amplify the difference between phase currents sensed through two shunt resistors and a scaled DAC output voltage, and the output of the PGAs directly can be sampled by internal ADCs. This topology is designed for FOC applications that require high voltages, low-cost or high efficiency, such as servo drives, HVAC motors, and large appliances.

GUID-20230208-SS0I-FMNW-D30R-ZGRDQJNSGZMR-low.svgFigure 4 MSPM0Gx50x + Gate Driver Block Diagram for FOC

MSPM0 and Gate Driver with Analog Integration

In lower voltage motor applications, many gate driver or motor driver devices integrate up to three current sense amplifiers with programmable gain, which offloads analog requirements from the MSPM0Gx device. MSPM0Gx devices without analog integration are available in packages as small as 24-VQFN to reduce system size. MSPM0 can accurately sense the motor phase voltage, bus voltage, current, and speed quickly to provide feedback to the FOC algorithm using 12-bit simultaneous sampling 4-Mbps ADCs. This topology is designed for FOC applications that are small form factor, such as pumps, fans, blowers, and small appliances.

GUID-20230208-SS0I-KFJJ-R9XH-VZ4GCVPMZ0PB-low.svgFigure 5 MSPM0Gx10x + Gate Driver Block Diagram for FOC

Design details

  • Motor control designs in MSPM0-SDK
    • MSPM0 Sensorless FOC Library
      • Supports DRV830x, DRV831x, DRV832x, DRV834x, DRV835x devices with integrated current sense
      • Supports 3-phase gate driver designs 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. The module is applied here to control three-phase stator and rotor qualities to maximize torque.
    • 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
    • Generates six 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.
      GUID-20230112-SS0I-G1P6-Z4LP-VZ33CMPQ6CHG-low.pngFigure 6 MSPM0Gx TIMA and ADC Sequence for FOC
  • OPA – standard (STD) mode
    • 6-MHz GBW, 4-V/µs slew rate, and 6-µV/°C drift in STD mode
    • GUID-20230208-SS0I-KLKV-QLKH-JVTTNXHNLTFM-low.svg Figure 7 MSPM0Gx OPA Block Diagram for Current Sensing
  • COMP – high-speed mode
    • The 8-bit DAC (1-µs settling time) inside COMP module enables a 40-ns response time for setting current limit thresholds
      GUID-20230208-SS0I-XHDB-6FBW-BXFFZ2T9GTKD-low.svg Figure 8 MSPM0Gx COMP Block Diagram for Current Protection

Resources

Order an MSPM0 LaunchPad development kit and a DRV83xx EVM today to start evaluating MSPM0 for a motor control system. Jump-start a motor control design with MSPM0 code examples and interactive online trainings. The following links show additional resources that are available.