AN1931D Freescale Semiconductor / Motorola, AN1931D Datasheet - Page 30

no-image

AN1931D

Manufacturer Part Number
AN1931D
Description
3-Phase PM Synchronous Motor Vector Control
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Software Design
Note:
6.
6.1 Main Software Flow Chart
30
A detailed description of the individual board can be found in the appropriate DSP56F80x Evaluation
Module User’s Manual, or on the Motorola web site, http://-www.motorola.com. The User’s
Manual includes the schematic of the board, description of individual function blocks, and a bill of
materials. The individual boards can be ordered from Motorola as standard products.
This section describes the design of the drive’s software blocks. The software description comprises
these topics:
For more information on the system blocks used, refer to
The main software flow chart incorporates the Main routine entered from Reset (see
Interrupt states (see
and the main loop.
The software consist of processes: Application Control, PM Synchronous Motor (PMSM) Control,
Analog sensing, Position and Speed Measurement, Fault Control, and Brake Control.
The Application Control process is the highest software level which precedes settings for other
software levels. The input of this level is the Run/Stop switch, Up/Down buttons for manual control,
and PC master software (via the registers shown in
Application Control Processing called from Main; see
The PMSM (PM Synchronous Motor) Control process provides most of the motor control
functionality. It is split into Current Processing and Speed Processing. Current Processing is called
from ADC Complete Interrupt (see
can also be set to each PWM reload (62.5 s), but the PC master software recorder
pcmasterdrvRecorder() must be removed from the code. Speed Processing is called from the
Quadrature Timer D0 Interrupt (see
(900 s). The advantage of splitting the current and the speed control processes is that current control
can be executed with a high priority and frequency of calls, while the execution of the speed control is
not that highly prioritized.
The Analog sensing process handles sensing, filtering and correction of analog variables (phase
currents, temperature, DCBus voltage). It is provided by Analog Sensing Processing (see
and Analog Sensing ADC Phase Set. Analog Sensing ADC Phase Set is split from Analog Sensing
Processing because it sets ADC according to the svmSector variable, calculated after PMSM Control
Current Processing.
Software Design
MB1 Motor-Brake SM40V + SG40N
— Supplied as Order #ECMTRHIVBLDC
The application software is targeted for a PM synchronous motor with sinewave Back-EMF
shape. In this demo application, a BLDC motor is used instead, due to the availability of the
BLDC motor (MB1). Although the Back-EMF shape of this motor is not an ideal sinewave, it
can be controlled by the application software. The drive parameters will be ideal with a PMSM
motor with an exact sinewave Back-EMF shape.
Main Software Flow Chart
Data Flow
State Diagram
Figure
Freescale Semiconductor, Inc.
3-Phase PM Synchronous Motor Vector Control
For More Information On This Product,
6-2,
Figure
Go to: www.freescale.com
Figure
Figure
6-3). The Main routine includes the initialization of the DSP
6-2) once per two PWM reloads, with a period 125 s. It
6-3) with the period PER_TMR_POS_SPEED_US
Figure
Section
Section
6-1.
4.3.
6.2). This process is handled by
Figure
MOTOROLA
Figure
6-1) and
6-2)

Related parts for AN1931D