Design and Implementation of Permanent Magnet Synchronous Motor Control System Based on CAN Bus

This project is a permanent magnet synchronous motor control system based on Controller Area Network (CAN) bus communication, which can be used in the tripod head, robot dog, manipulator and other high precision and torque requirements of the field. The research content includes hardware design and software debugging of permanent magnet synchronous motor control system. Firstly, the mathematical model and derivation process of permanent magnet synchronous motor and magnetic field oriented control are understood by reading literature. Secondly, according to the function to be realized, a relatively new scheme is selected, that is, DRV8323S in the integrated drive chip DRV83 series of TI Company is used. The hardware design side of the motor driver chip initialization parameters and device selection parameters are calculated in detail, according to the results of the selection of appropriate inverter circuit devices and protective devices, and completed the hardware circuit design and welding. Part of the program design code uses the latest version of HAL library, and first realizes the calculation of CAN communication, ADC sampling and magnetic field oriented control. Finally, the PI parameters of the three rings are debugged, and the control effect is basically realized.

Project Video Presentation

Motor Start-Stop Forward and Reverse Rotation

Motor Speed-Loop Control

If you’re interested in this project, you can get more details from my article: Design and Implementation of Permanent Magnet Synchronous Motor Control System Based on CAN Bus([English]/Chinese).

In the 1980s, the development of permanent magnet materials, especially rubidium iron-boron permanent magnet materials with high magnetic energy products, high coercivity, and low price, enabled people to develop permanent magnet motors with low prices, small size, and high performance. The Permanent Magnetics Synchronous Machine (PMSM) and Brushless DC Motor (BLDC) are both AC motors, their main difference is the distribution of the air gap magnetic field. The BLDC counterelectromotive force is close to the step wave shape, while the PMSM counterelectromotive force is a sine wave. The concept of Permanent Magnet in a permanent magnet synchronous motor refers to the addition of a permanent magnet when manufacturing a motor rotor so that the performance of the motor is further improved. The stator of the permanent magnet synchronous motor generates a three-phase current in the process of cutting the magnetic field. The rotors can be divided into Insert Type, Surface Mount Type, and Built-in Type according to the differences in the ways installed in the permanent magnet synchronous motor. The so-called synchronization means that the speed of the rotor is always consistent with the current frequency of the stator winding. You can see the difference in their structure in the two graphs below.

First Image

BLDC magnetic core

Second Image

Surface Mount Type PMSM magnetic core

Image Description

Control part circuit schematic

Image Description

Drive part circuit schematic

First Image

Control part circuit PCB

Second Image

Drive part circuit PCB

Image Description

FOC program operation schematic

Image Description

Complete program flow chart

Image Description

Timer channel 4 outputs PWM trigger ADC sampling