Microchip logo
  • All
  • Products
  • Documents
  • Applications Notes

Motor Control Algorithms

Developers of modern motor control applications need to implement many complex control algorithms to meet efficiency and performance specifications. We provide motor control software libraries and example applications that can be used with our microcontrollers (MCUs) and Digital Signal Controllers (DSCs) to jump start your design and reduce your development time.

Brushed DC Motors

Brushed DC (BDC) motors can be operated with a simple on/off control or a variable-speed control with optional feedback mechanism. The control system also depends on the drive type, which can be a unidirectional low-side drive, unidirectional high-side drive or bidirectional drive.

Brushed DC Motor Control Application Notes, Tuning Guides and Example Software

Algorithm8-bit PIC® and
AVR® MCUs
Brushed DC Motor Fundamentals AN905
PIC18Cxx/PIC16Cxxx DC Servomotor Applications AN696
Servo Control of a Brushed DC Motor AN532
Low-Cost Bidirectional Brushed DC Motor Control Using the PIC16F684 AN893
Sensorless Position Control of Brushed DC Motor Using Ripple Counting Technique AN3049

Stepper Motors

Stepper motors have various drive techniques depending on the application and phase configuration of the motor. The drive can be either unipolar or bipolar and the step mode can be wave drive, full-step drive, half-step drive or microstep drive.

Stepper Motor Control Application Notes, Tuning Guides and Example Software

Algorithm8-bit
AVR® MCUs
8-bit
PIC® MCUs
dsPIC33 DSCs
Stepper Motor Fundamentals AN907
Full- and Half -Stepping AN8017AN906, AN2326AN1307
Microstepping  AN822, AN2326AN1307

 

Brushless DC Motors

Brushless DC (BLDC) motors are Permanent Magnet Synchronous Motors (PMSMs) that are designed to use six-step trapezoidal control. This can be implemented by using Hall sensors for sensored control or by measuring the motor’s back EMF for a sensorless implementation.

BLDC Motor Control Application Notes, Tuning Guides and Example Software

Algorithm 8-bit
AVR MCUs
8-bit
PIC MCUs
dsPIC33
DSCs
32-bit
PIC32MK/
SAM MCUs
SmartFusion®2/
IGLOO®2 FPGAs
Brushless DC (BLDC)
Motor Fundamentals
AN857, AN885, AN7671AC445
Sensored AN2522AN899, AN1779,
AN2049
AN95742711A
Sensored Sinusoidal AN8010, AN8030AN2557AN1017 
Sensorless BEMF AN8012, AN7658AN970, AN1175,
AN1305, AN857
AN901, AN992 
Sensorless Filtered BEMF
with Majority Detect
  AN1160 
Tuning Guide: Sensorless
BLDC Control with Back-EMF
Filtering Using a Majority Function
  AN1160 

 

Permanent Magnet Synchronous Motors

Closed-loop Field-Oriented Control (FOC) is essential for getting the best performance from Permanent Magnet Synchronous Motors (PMSMs). Our complete ecosystem for developing FOC control algorithm includes these resources:

Zero-Speed/Maximum-Torque Control

The Zero-Speed/Maximum-Torque (ZS/MT) control algorithm is a new variation of the sensorless Field-Oriented Control (FOC) algorithm that enables the adoption of sensorless control techniques in high-torque or low-speed motor control applications. These types of applications typically require three Hall effect position sensors. ZS/MT eliminates the need for Hall effect sensors, connectors and cables by using a reliable Initial Position Detection (IPD) method based on High-Frequency Injection (HFI) to determine the exact rotor position at zero and low speeds. This enables the control algorithm to deliver maximum torque to a variety of applications including drilling machines, garage door openers, automotive starters and e-bikes. The ZS/MT algorithm runs on dsPIC33 Motor Control Digital Signal Controllers and SAM C2x, SAM D/E5x, SAM E7x and PIC32MK MCUs and can be used with Interior Permanent Magnet (IPM) motors.

Advantages:

  • Reduces overall system cost in applications requiring high torque at zero (standstill) or low motor speeds
  • Offers improved reliability by eliminating potential issues due to faulty cables and ESD-sensitive Hall effect sensors

Application-Specific Algorithms for Field Oriented Control

To help you overcome the challenges of implementing FOC and improve the performance of your PMSM application, we offer a number of application notes and a variety of algorithms within our motor control software library such as:

  • Flux weakening
  • Initial Position Detection (IPD)
  • Soft stop
  • Stall detection
  • Windmilling
  • Torque compensation

Our technical brief discusses some algorithms that can improve the Field-Oriented Control of your PMSM.

Examples of Application-Specific Algorithms

Air conditioners and refrigerators: To enable heat exchange, motor-driven compressors are major components in air conditioning and refrigeration systems. Due to pressure variations during a compression cycle, the compressor loads the motor unevenly, causing vibrations in the motor, compressor and pipes. These vibrations, especially at low speeds, can cause fatigue in pipes and can lead to premature failure of the unit. At high speeds, the motor, compressor and pipes react less due to their typical mechanical responses. The Torque Compensation algorithm can be used to minimize vibrations in compressors.

Washing machines: With the combination of a high-inertia load and a motor running at a very high speed, an abrupt stop can suddenly transfer the energy back to the electrical system. The Soft Stop algorithm provides a controlled reduction to the motor speed to prevent a surge in the DC bus voltage when a washing machine is running in spin-dry mode and is suddenly stopped.

PMSM Control Application Notes, Tuning Guides and Example Software

Algorithm dsPIC33
DSCs
32-bit
PIC32MK/
SAM MCUs
SmartFusion®2/
IGLOO®2 FPGA
Sensored SinusoidalAN1017AN2757AC445
Sensorless Dual-Shunt FOC with
Reduced Order Luenberger Observer
 AN2590
Sensorless Dual-Shunt FOC with
SMO Estimator and Field Weakening
AN1078 
Sensorless Single-Shunt FOC with
SMO Estimator and Field Weakening
AN1299 
Sensorless Dual-Shunt FOC with
SMO and PFC
AN1208 
Sensorless Dual-Shunt FOC with
PLL Estimator and Field Weakening
AN1292AN2520
Sensorless Dual-Shunt FOC with
PLL Estimator and PFC
 AN2584
Tuning Guide: Sensorless Single-Shunt
FOC with SMO Estimator PMSM
AN1299 

 

AC Induction Motor

AC Induction Motors (ACIMs) are the most popular motors for Variable Frequency Drives (VFDs). Speed control of ACIMs can be implemented using either the Scalar Control Algorithm (V/f Control) or Field-Oriented Control (FOC).

ACIM Application Notes, Tuning Guides and Example Software

Algorithm 8-bit
AVR MCUs
8-bit
PIC MCUs
dsPIC33
DSCs
AC Induction Motor FundamentalsAN887
Open-Loop V/fAN7545, AN7546AN900, AN843,
AN889, AN955,
AN967, AN1660
AN984
Closed-Loop Vector Control

AN908
Sensorless Dual-Shunt FOC with
PLL Estimator


AN1162
Sensorless Dual-Shunt FOC with
PLL Estimator and Field Weakening


AN1206