AN2281
Application note
Low cost self-synchronizing PMAC
motor drive using ST7FLITE35
Introduction
Due to their high efficiency, power by size ratio and silent operation, Permanent Magnet AC
(PMAC) motors are increasingly used in many applications. They are becoming the
predominant type of motor used in applications where the above advantages are required,
especially fans, compressors and pumps.
Since PMAC motors are synchronous machines, to get the best efficiency from them, the
excitation must be switched from one motor phase to another in exact synchronism with the
rotor motion. This concept, commonly known as self-synchronization, uses direct feedback
of the rotor angular position to ensure that the PMAC machine never loses synchronization.
This application note describes a low-voltage single-sensor three-phase AC permanent
magnet motor, also known as PMAC or BLAC (brushless AC) control system.
It includes a depiction of:
●
Reference schematics, which can be used for up to 12V-50W PMAC motors and based
on ST7LITE35 microcontroller and on STS8C5H30L complementary P-channel and N-
channel MOSFETs,
Firmware library, developed with the Cosmic C compiler and STVD7 release 3.x.x. It is
composed of several C modules containing a set of convenient functions for sinusoidal
waveform generation, synchronization mechanism and closed loop control of PMAC
motors.
●
March 2006
Rev 1
1/38
www.st.com
Contents
AN2281
Contents
1
2
3
Theory of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
PMAC motor control basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Implementation on the ST7Lite35 microcontroller . . . . . . . . . . . . . . . . . 6
3.1
3.2
3.3
ST7Lite3x 12-bit Autoreload timer (ART) in PWM mode . . . . . . . . . . . . . . 6
Lite Timer for measuring the rotor speed . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Lite Timer configuration for measuring the Hall sensor period . . . . . . . . . 10
4
Application schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.1
Gate driving and dead time insertion circuit . . . . . . . . . . . . . . . . . . . . . . . 14
5
Library parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.1
5.2
Phase synchronization and Phase angle optimization . . . . . . . . . . . . . . . 16
Start-up phase parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6
Getting started with the ST7FLITE35-based PMAC motor control
system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.1
6.2
6.3
6.4
Hardware connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Development Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Library source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
How to set the library parameters to run a PMAC motor for the first time 23
7
Conclusion and results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.1
7.2
7.3
Motor control related CPU load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Code memory size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Example oscilloscope captures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Appendix A List of software functions and Interrupt Service Routines . . . . . . 31
2/38
AN2281
Theory of operation
1
Theory of operation
Standard induction motors, normally designed to run at base speeds between 850 to 3500
rpm, are not particularly well suited to low-speed operation, as their efficiency drops with the
reduction in speed. They may also be unable to deliver sufficient smooth torque at low
speeds.
The use of a gearbox is the traditional mechanical solution to this problem. However, the
gearbox is a complicated piece of machinery that takes up space, reduces efficiency, and
needs both maintenance and significant quantities of oil. Replacing the gearbox with
permanent magnet motors/drive configurations saves space and installation costs, energy
and maintenance, and provides more flexibility in production and facility design. These
motors use magnets to produce the magnetic rotor field rather than the magnetizing
component of the stator current like in the induction motor.
Figure 1
shows a cross section of a typical permanent magnet (PM) motor. The rotor has an
iron core on the surface of which is mounted a thin permanent magnet. An alternating
magnet of opposing magnetization produces radial directed flux density across the air gap.
This flux then reacts with currents in the stator windings to produce torque.
The two most common types of brushless PM motors are classified as:
●
●
Synchronous, with a uniformly rotating stator field as an induction motor. This type is
also referred to as PMAC (BLAC)
Switched or trapezoidal, with stator fields that are switched in discrete steps. This type
is also referred to as PMDC (BLDC)
Cross-section of PM motors
a
N
-b
-c
-b
S
S
a
N
-c
Figure 1.
N
c
S
-a
1 pole pair
b
c
S
-a
3 pole pairs
N
b
3/38
Theory of operation
AN2281
Figure 2
provides a direct comparison of ideal current excitation waveforms for typical three-
phase sinusoidal and trapezoidal PM motors.
Figure 2.
Sinusoidal (PMAC) and trapezoidal (PMDC or 6-step) current excitation
1
Phase A
2
3
4
5
6
120°
Phase B
120°
240°
Phase C
240°
(a) Sinusoidal
(b) Trapezoidal
PMDC motors are specifically designed to develop nearly constant output torque when
excited with a six-step switched current waveform. Their stator windings are concentrated
into narrow phase belts. The resulting back-EMF voltage, induced in each stator phase
winding during rotation, can be modeled quite accurately as a trapezoidal waveform.
PMAC motors are, on the contrary, specifically designed to be excited with a sinusoidal
current waveform. Their stator windings are typically distributed over multiple slots in order
to approximate a sinusoidal distribution so that the resulting back-EMF waveforms
generated are sinusoidal shaped.
Except for the intrinsic characteristics of stator windings, a PM machine can be excited with
both drive methods without any great loss of efficiency. The main difference between the two
types of excitation consists of the acoustic noise generated. The abrupt variation of the
trapezoidal phase current, in fact, generally introduces a great amount of acoustic and
electronic noise in comparison to the sinusoidal phase current.
In the 6-step PMDC method, one of the three phases is always unexcited, making it possible
to access back-EMF zero-crossing (i.e. rotor position) information, while in a PMAC motor
drive the three phases are always excited during the electrical period, making it necessary
to use at least one rotor position sensor.
Nevertheless, the relatively reduced amount of noise when a PM motor is excited with
sinusoidal current in comparison to 6-step excitation makes it the preferred choice for all
applications in which audible noise is a critical issue.
Actually, some complex algorithms for driving PMAC sensorless motors have been
developed, but they require more computational power than would be available from an 8-bit
microcontroller.
4/38
AN2281
PMAC motor control basics
2
PMAC motor control basics
PMAC machines are synchronous so the average torque can be produced only when the
excitation is synchronized with the rotor frequency and instantaneous position. By
continuously detecting the rotor angular position and rotational speed, the excitation can be
properly switched among the PMAC motor phases in exact synchronism with the rotor
motion.
This concept, commonly known as self-synchronization, uses direct feedback of the rotor
angular position to ensure that the PMAC machine never loses synchronization. Generally,
Hall sensors are used to get information about the angular position of rotor, detecting the
magnetic field direction generated by the rotor. In particular, the usage of only one sensor is
supported with the system presented in this document.
Figure 3
shows the block diagram of the PMAC self-synchronization algorithm implemented
in the software library.
Figure 3.
PMAC motor control basics: the block diagram
Phase
synchronization
Rotor Position
Φ
A
V/F
Limitation
A*
A* sin(2πf+Φ)
Motor
Phase angle
optimization
Hall
sensor
f
f*
f=f*
Each of the three phases of the motor is supplied by a sinusoidal waveform whose
frequency, amplitude and phase have been respectively indicated with f, A* and
Φ.
Every time an Hall sensor signal transition occurs, the algorithm estimates the rotor
frequency f* and utilizes this value as statorical frequency (f) for the successive electrical
semi-period. Meanwhile, the phase of the sine wave is also updated and set equal to phase
angle
Φ
or
Φ+π
depending on the Hall sensor edge transition (rising or falling). Generally, for
a large operating speed range, the proper value of
Φ
is strongly dependent on the motor
speed affecting the driving efficiency. The provided library allows you to set the optimum
Φ
as a linear function of the speed (in rpm).
Since there are no direct information on current and torque, a V/F limitation has also been
implemented in order to allow you to limit the maximum flowing current for a given speed.
5/38