This document describes a simulink and software library for the electric motor control
implementing a (EMSC) Sinusoidal Control targeted to ST10 Microcontrollers.
The library consists of:
●Simulink Library;
●C optimized Software Library;
●ASM optimized Software Library.
The EMSC Simulink Library is a set of Simulink blocks for implementing in Matlab-Simulink
environment the functions and the algorithms used in the electric motor control. These
blocks can be used either to conceive and to test new electric motor controls and to produce
automatic generated code in ANSI C, downloadable on microcontroller.
The Software Library is a set of routines for the electric motor control obtained from the code
generated in automatic, by Real Time Workshop Embedded Coder, starting from EMSC
Simulink library blocks, and then optimized in C and Assembler.
The SC software library for ST10 is fully compatible with SC simulink library.
This document begins with an introduction on Sinusoidal Control, the permanent magnet
synchronous machine (PMSM) and a short description of its mathematical model. Then, it
describes the Sinusoidal Control implementation on Simulink and details the space vector
modulation (SVM) technique and the used algorithm.
After the technical introduction, the EMSC Simulink Library is described, followed by the
Software Library.
7/36
Sinusoidal controlAN2291
2 Sinusoidal control
The Sinusoidal Control is a control strategy, characterized by sinusoidal waveforms so as to
drive the three motor windings with currents that vary smoothly and sinusoidally, obtaining a
negligible torque ripple and improved high-torque characteristics at both low and high
speeds compared with other control strategies.
In order to generate a smooth sinusoidal modulation as the motor works, it is necessary an
accurate rotor position feedback from a sensor, as encoder or similar devices.
The position information is used to synthesize three modulation signals shifted by 120°
degrees each other then multiplied by the command signal provided as output of a PI
controller. These signals are used to feed the motor windings with the three voltages,
proportional to desired command signal and appropriately phased, through a voltage source
inverter (VSI).
There are three basic methods to control the voltage vector direction, each with different
advantages and requests of measurement:
1. Vector of stator voltage is placed 90° relative to the vector of rotor permanent magnet
flux;
2. Vector of stator current is placed 90° relative to the vector of rotor permanent magnet
flux;
3. Voltage vector is kept in the direction of the current vector.garte06
Figure 1 shows the vector diagram of each control strategy:
Figure 1.Vector diagram
1)
Usspace vector of stator voltage
Isspace vector of stator current
Ysspace vector of stator flux
Yrspace vector of rotor flux
Yspace vector of magnetic flux
Espace vector of back emf
Rsstator resistance
wangular rotor speed
2)
8/36
AN2291Sinusoidal control
In Figure 5, the control of the motor speed forces the amplitude of the voltage vector
obtained in output from the PI controller starting from the speed error while an offset is
added to the actual rotor position in order to keep the voltage space vector in a desired
position respect to the rotor flux space vector.
2.1 PMSM
The necessity of reducing the charge of the combustion engine and of eliminating the weight
due to the mechanical connections in several applications, like in automotive field, induces
to use more and more electric motors, that assure a wide range in speed and torque control
satisfying the load demand.
The DC machine fulfils these requirements but needs periodic maintenance.
The AC machine, like induction motor and brushless permanent magnet motor, hasn’t
brushes, and its rotor is more robust because there aren’t commutator and/or rings. That
means a very low maintenance, other than increases the power-to-weight ratio and
efficiency.
In particular, in the automotive field the Permanent Magnet Synchronous Machine (PMSM)
seems to be the best solution.
The brushless permanent magnet motors (PMSMs) have the same electromagnetic
structure of a synchronous machine, without the brushes. As shown in the cross-section in
the below Figure 2, they have a wound stator, similar to an induction machine, and a rotor
with some permanent magnets instead of a wound rotor fed with DC current like the one that
is used in the classical synchronous machines. Besides, they need of an internal or external
device for sensing of the rotor position, like Hall sensors, encoder or resolver.
Figure 2.Cross-section of PMSM
The PMSMs are not self-commuting motors and to produce useful torque, the currents and
the voltages applied to stator phases must be controlled as a function of rotor position.
Therefore it is generally required to count the rotor position with a sensor so that the inverter
phases which feed it, acting at any time, are commuted depending on the rotor position.
That explains the necessity of a closed-loop speed/position feedback.
9/36
Sinusoidal controlAN2291
There are two kinds of brushless permanent magnet machines classifiable in account of the
shape of the BEMF (back-electromagnetic force):
●DC brushless machine having trapezoidal flux distribution and a trapezoidal BEMF fed
by quasi-square wave currents;
●AC brushless machine having approximately sinusoidal air-gap flux density and a
quasi-sinusoidal BEMF fed by sinusoidal stator currents.
Generally the DC brushless machines have a simpler control strategy than AC brushless
machines.
For trapezoidal flux distributions, to impose quasi-square wave currents on stator windings,
it is only needed a six position sensor, with a resolution of at least 60 electrical degrees.
On the contrary, for the sinusoidal current type, the angular position needs to be known with
a very accurate precision in order to control each of the three phases currents.
For each kind, the high reliability control makes this type of machine a powerful system for
electric vehicle application.
2.1.1 Mathematical model of the machine
In order to model the fields produced by the stator windings in terms of windings current,
“current space vectors” are used. The current space vector for a given winding has the
direction of the field produced by that winding and a magnitude proportional to the current
through the winding. This allows us to represent the total stator field as a current space
vector that is the vector sum of three space vector components, one for each of the stator
windings.
The three-phase voltage, currents and fluxes of AC motors can be analyzed in terms of
complex space vectors.
For instance, with regard to the currents in the stator windings, the current space vector can
be defined as follows.
Figure 3. Stator current space vector and its components in (a,b,c)
Assuming tha
complex stator current vector
Equation 1i
t is1,is2,is3 are the instantaneous currents in the stator phases, then the
i
is defined by:
s
2
-- -
3
i
s1is2
s
α⋅is3α2⋅++()⋅=
10/36
AN2291Sinusoidal control
whereα = e
j(2π/3)
and
α
2
= e
j(4π/3)
represent spatial operators. The Figure 3 shows the
stator current complex space vector.
In terms of space vectors it is possible to write the mathematical model of an AC brushless
machine in a stator frame, as follows:
Equation 2
u
s
RsisL
di
d
s
---- -
+⋅+⋅=
-------
s
dt
dt
jpθ
⎛⎞
ψ
⎝⎠
r
e
⋅
f
where:
ψ
f
R
s
L
s
ω
r
pNumber of pole pairs
θ
r
and the space vectors:
2
Equation 3
-- -
u
s
3
Modulus of the magnetizing flux-linkage vector
Stator resistance
Total three phase stator inductance
Rotor angular speed
Mechanical position
2π
------ -
⎛⎞
⋅=
t() u2t() e
++
u
⎜⎟
1
⎝⎠
j
3
⋅u3t() e⋅
4π
------ -
j
3
Equation 3 space vector of the stator voltage
Equation 4
2π
------ -
2
t() e
j
3
⋅i
s
3
⎛⎞
2
-- -
i
⋅=
t() i
i
s
⎜⎟
s1
3
⎝⎠
s
t() e
⋅++
4π
------ -
j
3
Equation 4 shows space vector of the stator current
Note:The mechanical position of the electric motors is related to the rotation of the shaft while the
electrical position is relate to the rotation of the rotor magnetic field.
So being the motor with p pole pairs, its rotor needs only to move 360/p mechanical degrees
to obtain an identical magnetic configuration as when it started.
Figure 4.Phase motor with 2 pole pair
11/36
Loading...
+ 25 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.