Вы находитесь на странице: 1из 17
Application Notes Squirrel Cage Induction Motor Control with DS1104 R&D Controller Board Document Version 2.1

Application Notes

Squirrel Cage Induction Motor Control with DS1104 R&D Controller Board

Document Version 2.1 June 2002

dSPACE Application Notes
dSPACE Application Notes
dSPACE Application Notes Table of Contents INTRODUCTION 2 INDUCTION MOTOR TEST BENCH 2 FIELD ORIENTED

Table of Contents

INTRODUCTION

2

INDUCTION MOTOR TEST BENCH

2

FIELD ORIENTED CONTROL

3

Controller Equations and Parameters

6

Implementation in the Flux Weaking Region

8

Pulse Width Modulation (PWM)

9

Initialization and Output of u a , u b and u c

12

CONTROLLER DESIGN WITH SIMULINK

12

The Control Layers

12

The Measurement

13

The PWM Interface

13

EXTENSION OF THE FUNCTIONALITY

14

Flux Weaking Control

14

Speed Limits

15

THE DEMO DOCUMENTS

16

1

dSPACE Application Notes
dSPACE Application Notes
dSPACE Application Notes Introduction Electrical drives play an important role as electromechanical energy converters in

Introduction

Electrical drives play an important role as electromechanical energy converters in transportation and most production processes. During the last few years the field of controlled electrical drives has experienced rapid expansion mainly caused by the advances of semiconductors in the form of power electronics as well as digital signal and analog electronics for microelectronics and microprocessors. Electronically switched solid-state power converters have renewed the controlling of AC-motor drives not subject to the limitations of the mechanical commutator of DC drives.

These application notes describe the implementation of a field- oriented control for a squirrel cage induction motor. The control structure is programmed as a Simulink graphical model and can be implemented by Real-Time Interface (RTI) on the DS1104 R&D Controller Board.

The induction motor control is implemented in three tasks containing the I/O and the two control layers. The measure task is directly triggered by the PWM interrupt of the TMS320F240. This closely connects the task cycles of the TMS320F240 and PowerPC 603e to avoid jitter. It works at a PWM frequency of 16kHz and generates a synchronous software interrupt with 8kHz. This interrupt is used to trigger the superior current control task. The subordinated speed controller works in a third task and is triggered by the timer interrupt of the PowerPC, which occurs with a frequency of 4kHz.

Induction Motor Test Bench

The control test bench is shown in Figure 1. It consists of a host computer PC, the DS1104 R&D controller board, the PWM inverter and the squirrel cage induction motor.

Motor Position Information DS1104 R&D 8 Controller Board 3 Host PC 2 PWM Signals Current
Motor Position Information
DS1104 R&D
8
Controller Board
3
Host PC
2
PWM Signals
Current Information
i
a
3
Power
Frequency
i
b
3 3
~
Supply
Input Voltage
Converter
Input
Frequency

Figure 1: Squirrel cage induction motor control experimental setup

2

dSPACE Application Notes Two inductive sensors are implemented to fetch the necessary current information. To

dSPACE Application Notes

Two inductive sensors are implemented to fetch the necessary current information. To avoid noise the measured voltages are filtered by two low pass chebyschev filters with a cutoff frequency of about 5kHz. For the squirrel cage motor control two 16-bit A/D converters and one incremental encoder channel of the DS1104 are needed. Furthermore, the DSP TMS320F240 is used to provide the duty cycles for the frequency converter.

Field-Oriented Control

This chapter describes the basics of the implemented control scheme. The control algorithms are derived
This chapter describes the basics of the implemented control
scheme. The control algorithms are derived from the block
structure of an induction machine in rotor-flux frame, shown in
Figure 2.
1
ε FS
ω FS
/
(
T
L H
R L
R )
1/K
LH / TR
K L
/K R
R
L H
T R
Denominator
u Sd
i Ψ Rd
Sd
ω FR
ω RS
Numerator
K L
a,b,c
u Sa
u Sb
K L
u Sc
m L
d,q
1
1/K
K/ K
3
/2 L H /L R
p
J
p
R
LR
-
-
m
e
u Sq
-
i Sq
Ψ Rd
L H / L R
ω m
ω RS

Figure 2: Block diagram of a squirrel cage induction motor

The motor dynamics are described by the following space vector differential equations:

K

i

R Sd

K

i

R Sq

+

+

K

L

K

L

di

Sd

=

u

L

H

equations: K i R Sd K i R Sq + + K L K L di

dt

di

Sq

dt

=

u

Sd

Sq

FS

ω

FS

L Sq

K i

L Sd

+

L T

R

R

L

L

H

R

ω

RS

+

ω

K i

+

Ψ

Rd

Ψ

Rd

3

dSPACE Application Notes
dSPACE Application Notes
dSPACE Application Notes d Ψ Rd Ψ + T = L i Rd R H Sd
d Ψ Rd Ψ + T = L i Rd R H Sd dt L
d Ψ
Rd
Ψ + T
= L i
Rd
R
H Sd
dt
L
R
T =
R
R
R
ω
J d
m
= m − m
e
L
dt
3
L
H
m
=
p
e
i Sq
2 L
R
L i
= H Sq
ω
FR
T Ψ
R
Rd
ω ω
=
+
ω
FS
FR
RS
ε
=
∫ ω
dt
FS
FS

Ψ

Rd

The torque of the motor m e is proportional to the product of Ψ Rd and i Sq , see the lower part of Figure 2. The rotor-flux Ψ Rd changes slowly compared to i Sq and i Sd , since the time constant T R is much greater than:

K

K

K

L

, T >>

R

L

K

R

R

For this reason it makes sense to control the torque via i Sq , with the q-current controller (q-CC), see Figure 3. Furthermore, it is required that the machine has a constant magnetic operating point, which is provided by the flux controller (FC) with a set-point.

To realize this control structure it is necessary to transform the phase currents into d- and q-currents. The block diagram of the motor (Figure 2) shows that the d- and q-currents are coupled, so it is necessary to implement a decoupling network (D) to make them independent of each other. The transformation, which calculates the d- and q-currents from the measured phase currents, is given by the following equations:

i

i

 

S α

S β

   i

i

Sd

Sq

1 1  i    1 − −   Sa  2
1 1
 i 
 
1
 
Sa
 2
2
2
  =
i Sb
3
3
0 3
i
 
 
Sc
 
2 2
 
 cos
ε
sin
ε
  i 
FS
FS
S α
 
 
− sin
ε
cos
ε
i
   =   
FS
FS
  
S β

4

dSPACE Application Notes The controller outputs u S d * and u S q *

dSPACE Application Notes

The controller outputs u Sd * and u Sq * must be transformed to phase voltages and connected to motor inputs u Sa , u Sb and u Sc . This transformation is given by a matrix multiplication to transform the outputs in the rotating α,β-frame and the space-vector modulation to transform the α,β-voltages to phase voltages. The space-vector modulation is used to exploit the DC-link voltage better.

u

u

u

u

*

S

α

u

*

β

S

*

Sa

*

Sb

*

Sc

cos

sin

=

ε

ε

FS

FS

 =

(

space

sin

ε

FS

cos

ε

FS

  u

*

Sd

u

*

Sq

vector modulation

)

u

*

*

S

α

u

β

S

Figure 3 shows the complete control structure. The transformation blocks are marked with dashed-lined boxes.

d,q-frame to phase + - q-CC ω * U D * u * u *
d,q-frame to phase
+
-
q-CC
ω
*
U D
*
u
*
u
*
RS
i Sq
Sq
α,β
-
u
*
z
u
-
Sa
a
Sa
u
*
z
ω
VC
u
Sb
b
RS
Sb
-j ε FS
PWM
D
e
ASM
u
u
*
z
Sc
Sc
c
*
*
i Sd
u
*
u
*
Ψ Rd
Sd
S β
a,b,c
-
-
IG
Ψ Rd
FC
d-CC
phase to d,q-frame
ω ω
RS
i
i
i
ε
Sa
Sq
a,b,c
RS
-
i
Sb
e
jε FS
-
ε FS
i
i
i
Sd
Sc
α,β
ε
RS
Flux-
ω FR
Ψ
Rd
Model

Figure 3: Control structure for the induction motor

To decouple both currents and compensate the induced voltage in the q-current path (see lower left part of Figure 2), the necessary compensation voltages are reconstructed using the available measurements. These voltages and the output of both current controllers are added to determine the output quantities u Sd * and u Sq * . Figure 4 shows the decoupling network and both current controllers. The decoupling and the compensation section are marked with dashed-lined boxes.

5

dSPACE Application Notes
dSPACE Application Notes
dSPACE Application Notes d-CC u * i * Sd Sd - - i Sd ω RS

d-CC

u * i * Sd Sd - - i Sd ω RS K L ω
u
*
i
*
Sd
Sd
-
-
i
Sd
ω RS
K L
ω ω FS
FR
i
Sq
current decoupling
q-CC
i
*
-
+
u
*
Sq
Sq
+
L H L R
/
Ψ Rd
compensation of induced voltage

Figure 4: Decoupling network and current controller

As shown above, the decoupling network needs the rotor-flux Ψ Rd , the slip-frequency ω FR and the electrical rotor velocity ω RS . While ω RS can be measured the other two variables are estimated using a flux-model (Figure 5), which is based on the motor model shown in Figure 2. The flux model is also used to estimate the angle ε FS needed for the frame transformations (see Figure 3). Since it is based on the current measurement, Figure 5 is the current version of the flux model.

L H T R i Sα i Sd Ψ Rd e -jε FS i Sβ
L H
T R
i Sα
i Sd
Ψ Rd
e -jε FS
i Sβ
i Sq
ω FR
L H T R
/
1
ε FS
Denominator
Numerator
ε FR
ε FS
ω FR
ε RS

Figure 5: The flux model

Controller Equations and Parameters

To implement the current controllers only the q-current controller is used to describe the system and calculate the parameters, since i q controls the motor torque. The current control loop is shown in Figure 6. For the sake of clarity, the decoupling part is omitted.

6

dSPACE Application Notes
dSPACE Application Notes
dSPACE Application Notes 1 L S 1 R K Ri T Ri T Ti S R
1 L S 1 R K Ri T Ri T Ti S R S i
1
L S
1
R
K Ri
T Ri
T Ti
S
R S
i
*
Sq
i Sq
-

Figure 6: Current controller structure

The AC drive is described in the first order lag G Si (s) with:

G Si

( s ) =

1

R S L S 1 + s R S
R
S
L
S
1 +
s
R
S

The delay time T Ti is determined by the delay times of the digital control and the PWM inverter:

T

Ti

=

T

ctrl

+

T PWM

2

Hence the open loop transfer function is described by the equation:

Gs

oi

() =

K

Ri

1 + T s

Ri

T s

Ri

e

s T

Ti

Gs ()

Si

Both current controllers are dimensioned with the magnitude optimum method, according to a phase reserve of 63°. The controller parameters are:

T =

ci

K =

ci

L S R S T R ci S 2 T Ti
L
S
R
S
T R
ci
S
2 T
Ti

Figure 7 shows the velocity control structure. This structure is based on the symmetric optimum. So a further first order lag to delay the reference input ν M is necessary. In addition, the actual velocity input is FIR-filtered to avoid jitter effects of the incremental encoder. In the block structure the behavior of the FIR-filter is approximated by a first order lag.

K M 1 1.2 1 T J K cν T cν dν T cν ν
K M
1
1.2
1
T
J
K cν
T cν
T cν
ν
ν
*
Μ
Μ
G
i (s)
-
T

Figure 7: Velocity controller structure

7

dSPACE Application Notes The integrator block describes the mechanical dynamics of the motor. ν =

dSPACE Application Notes

The integrator block describes the mechanical dynamics of the motor.

ν =

M

K

M

J

∫

()

i t dt

q

The delay time T dν is determined by the delay time of the digital

velocity control: T T

given by:

. The open velocity controller loop is

dν

=

ctrl ν

G

o

ν

=

K

c

ν

1

+

s T

c

ν

sT

c

ν

()

G s

i

K

M

1

⋅⋅ e

s T

c

ν

J

1

+ sT

f

ν

The transfer function G i (s) and the exponential term can be approximated by first order lags with the time-constants T and T d ν . According to the symmetric optimum, the small time constants can be combined to T sub ν . With these simplifications the controller parameters can be determined with the following equations achieved by field-oriented control.

T

c

ν

=

K =

c

ν

4

T

i

J

2

(

T

d

ν

++ TT

if

ν

)

K

M

Implementation in the Flux-Weaking Region

At higher speed, saturation of the current controller occurs when the terminal voltages of the motor approach the ceiling voltage of the inverter. The maximal available stator voltage is determined by the DC link voltage, and can be expressed as:

1 2 2 U = uu +=⋅ U S max Sd Sq D 3
1
2
2
U
=
uu
+=⋅
U
S max
Sd
Sq
D
3

In the lower part of Figure 2 it can be seen that u Sq has to be higher than the back EMF of the AC motor to produce a torque. The back EMF can be determined with the equation:

u

R

em f

.

.

=

L

H

L

R

R

Ψω

Rd

RS

Since the back EMF is proportional to the rotor flux and the flux Ψ Rd , in the rotor frame, the coordinates have to be reduced at high speed. This can be done with a look-up table. As long as the current rotor velocity ω RS is under the nominal velocity ω RSnom , the flux reference value Ψ Rd is the constant nominal flux Ψ Rdnom . And if the velocity is higher than the nominal velocity the reference flux is weak. This is done with the following equation:

8

dSPACE Application Notes * Ψ Rd = Ψ * Rdnom ⋅ min(1, ω RSnom ω

dSPACE Application Notes

*

Ψ

Rd

= Ψ

*

Rdnom

min(1,

ω

RSnom

ω RS

)

For safe operational behavior the stator voltage vector U S has to be limited according to the operating point of the AC motor. If the motor is in generating working order, for example, after a speed reversal, U S has to be limited with q-priority and otherwise with d- priority. The modified controller structure is shown in Figure 8.

q-CC * u * ω RS i Sq * Sq - - VC iq ω
q-CC
*
u *
ω RS
i Sq *
Sq
-
-
VC
iq
ω RS
D limit
ω RS
*
i *
Sd
Ψ Rd
u *
Sd
-
-
FC
d-CC
ω RS
Ψ Rd
i Sd
i Sq

Figure 8: Control structure of the flux-weaking region

Pulse Width Modulation (PWM)

The generation of the three-phase sinusoidal output voltages u a through u c of the frequency converter is based on the PWM. At first the area of the rotating space vector has to be detected and the space vector has to be projected on the neighboring left and right space vectors to determine the values d left and d right . This is shown in Figure 9.

u β 2 d left 3 1 u d right α 4 6 5
u β
2
d left
3
1
u
d right
α
4
6
5

Figure 9: Space vector modulation

With the determined values for the sectors d left and d right , the Space Vector Modulation of the TMS320F240 can be used for PWM generation, just as it is possible to use the TMS320F240 for PWM generation with duty cycles. Then the output signals PWM a through

9

dSPACE Application Notes
dSPACE Application Notes
dSPACE Application Notes PWM c are low at the beginning and end of each sampling period

PWM c are low at the beginning and end of each sampling period and high in the middle. The order in which the signals become high depends on the duty cycles calculated by the neighboring space vectors. The duty cycles z a through z c result from the values d left and d right normalized with the maximum output voltage (U D / 3 ) and the PWM inverter period T PWM . Figure 10 shows this context for a voltage space vector in the first sector. T pwm denotes the inverter period.

the first sector. T p w m denotes the inverter period. d d 0 d r
d d 0 d r l d 0 d l d r d 0 4
d
d
0
d r
l
d 0
d l
d r
d 0
4
2
2
2
2
2
4
PWM a
z a T PWM
PWM b
z b T PWM
PWM c
Tpwm
z c T PWM
2
T
pwm

Figure 10: PWM inverter duty cycle arrangement

10

dSPACE Application Notes
dSPACE Application Notes
dSPACE Application Notes The values of d l , d r and d 0 can be

The values of d l , d r and d 0 can be determined with the following equations:

3 d = d T l left PWM U D 3 d = d T
3
d
=
d
T
l
left
PWM
U
D
3
d
=
d
T
r
right
PWM
U
D
d
=
T
−−
dd
0
PWM
l
r

Figure 11 shows the ceiling phase voltages u a , u b and u c generated by the duty cycle PWM of the TMS320F240. The resulting line voltages u ab , u bc and u ca . are shown in Figure 12.

150 u a /[V] 100 u b /[V] u c /[V] 50 0 -50 -100
150
u
a /[V]
100
u
b /[V]
u
c /[V]
50
0
-50
-100
-150
0
0.005
0.01
0.015
0.02
t/[s]
Figure 11: The phase voltages u a through u c
300
/[V]
u ab
200
/[V]
u bc
u ca /[V]
100
0
-100
-200
-300
0
0.005
0.01
0.015
0.02
t/[s]

Figure 12: The line voltages u ab through u ca

The calculated duty cycles z a through z c are in the range of 0 to 1 since the PWM calculation routine, which can also be used for the subharmonic pulse width modulation, needs input values between -1 and 1.

11

dSPACE Application Notes
dSPACE Application Notes
dSPACE Application Notes Initialization and Output of u a , u b and u c The

Initialization and Output of u a , u b and u c

The information is passed independently of the PWM type through the TMS320F240 DSP microcontroller. This DSP converts the duty cycles and space vector information into corresponding digital signals. The type of PWM generation is selected by the RTI block that is used. An S-function is used for the essential calculations and provides both the sector/time information as well as the duty cycles.

Controller Design with Simulink

The AC drive control introduced in the previous chapter is realized in SIMULINK, dSPACE's Real-Time Interface (RTI) and the Real- Time Workshop (RTW). The control parameters are initialized with their default values via the M-file go.m. The controller is realized as much as possible with SIMULINK and RTI standard units.

The Control Layers

The induction motor control is implemented in two control layers: a superior current control and a subordinated speed control. A software interrupt generated at the middle of each second PWM period is used to trigger the current controller. The speed controller is triggered by the timer interrupt of the PowerPC, which occurs with a frequency of 4kHz.

of the PowerPC, which occurs with a frequency of 4kHz. Figure 13: Simulation control via interrupts

Figure 13: Simulation control via interrupts

This is essential for the reference signal generator, which must be timer triggered to get the required absolute time reference. Now the requirement of several discrete sample rates can no longer be met by SIMULINK functions positioned in interrupt-triggered subsystems. Therefore any discrete units placed inside such systems must inherit their sample time.

12

dSPACE Application Notes
dSPACE Application Notes
dSPACE Application Notes The Measurement The actual values required for control are fetched inside a separate

The Measurement

The actual values required for control are fetched inside a separate task. To make sure that the current is not measured at a PWM edge it is triggered by the PWM interrupt occurring at the center of each period. Beside the ADC channels used to measure the current reflecting voltage, an encoder interface is positioned inside the measure subsystem. It is used to obtain the necessary speed and position information of the drive. The encoder delta position is first scaled to encoder tics, and then to angle (rad) and velocity (rpm). The derived speed signal is filtered by a discrete PT1 block at a cut-off frequency of 1/3 f PWM .

PT1 block at a cut-off frequency of 1/3 f P W M . Figure 14: Encoder

Figure 14: Encoder Interface

Furthermore, the software interrupt for the current controller is generated inside the measure subsystem.

The PWM Interface

The implementation for PWM is split into two parts. The source values are rotating vectors supplied by the control layers. An S- function called svecmod_duty.c transforms them into duty cycles just as into sector and times needed for the space vector PWM of the TMS320F240. Hence it is feasible to use both kinds of PWM generation supported by RTI. The following figure shows the S- function with an RTI block.

RTI. The following figure shows the S- function with an RTI block. Figure 15: PWM Interface

Figure 15: PWM Interface to the DS1104 Slave CPU

13

dSPACE Application Notes
dSPACE Application Notes
dSPACE Application Notes Extension of the Functionality Flux Weaking Control A flux weaking region as described

Extension of the Functionality

Flux Weaking Control

A flux weaking region as described on page 8 is implemented. It is optional and can be activated by a switch as shown in Figure 16.

and can be activated by a switch as shown in Figure 16. Figure 16: Flux weaking

Figure 16: Flux weaking as an additional feature

By setting switch_weakflux accordingly, either the normal control or an extended control including flux weaking is available. The flux weaking control is discretized at a sample time of 250 µs and is therefore included in the speed/flux subsystem (see Figure 17). It is comprised of a nonlinear function and a PI compensator. The nonlinear function supplies a constant reference flux of psi_ref for speeds below speed_ref and a flux decreasing at a rate of 1/n beyond (see Figure 18).

below speed_ref and a flux decreasing at a rate of 1/n beyond (see Figure 18). Figure

Figure 17: Flux weaking control

14

dSPACE Application Notes
dSPACE Application Notes
dSPACE Application Notes Figure 18: Flux weaking implementation Speed Limits Due to the implemented flux weaking,
dSPACE Application Notes Figure 18: Flux weaking implementation Speed Limits Due to the implemented flux weaking,

Figure 18: Flux weaking implementation

Speed Limits

Due to the implemented flux weaking, higher speeds are now possible with the induction motor. For this reason, the speed limits included in the signal generator can optionally be ignored now (see Figure 19). Then arbitrary reference speeds can be selected, although the motor is not able to follow at any speed.

although the motor is not able to follow at any speed. Figure 19: Selective bypassing of

Figure 19: Selective bypassing of speed limits

Figure 20 shows the ControlDesk layouts for standard control. The layout displays the turnaround times as it provides instruments for changes regarding the reference signal generator. Furthermore, a plotter shows the captured information on the speed, current and rotating vector. The “Real Speed” gauge displays the current speed information of the encoder. Its annular is split into two parts matching the multi-state LED colors of speed saturation. The proportional gain for the PI flux controller can be adjusted with slider controls. A second layout named “Measure” provides some measured data.

15

dSPACE Application Notes Figure 20: Layouts for standard control The Demo Documents In addition to

dSPACE Application Notes

dSPACE Application Notes Figure 20: Layouts for standard control The Demo Documents In addition to a

Figure 20: Layouts for standard control

The Demo Documents

In addition to a Simulink model, the compressed demo contains a

startup file for MATLAB, a ControlDesk experiment and all files

necessary to run the demo without compiling beforehand. The

following list describes the functionality of the demo files.

Model-specific files:

go.m

and opens the model. gain_1104x.M File for MATLAB, optimizes P-gain imctrl_1104.mdl Simulink model svecmod_duty.c S-function, transforms the rotating vector into source signals for the PWM svecmod_duty.dll The S-function DLL, necessary for Simulink svtoduty.c Source file, contains the transformation

Startup file for MATLAB, initializes all variables

Application-specific files:

imctrl_1104.map MAP file, maps symbolic names to physical addresses

imctrl_1104.trc

Variable

file,

provides

information

on

the

imctrl_1104.ppc

available variables Real-time application for the R&D board

 

Experiment-specific files:

Imctrl.cdd

Experiment description file

 

Imctrl.cdc

Experiment connection file

Imctrl.cdx

Experiment file

Imctrl_1104.sdf

System

description

file,

defines

which

Control.lay

application should be used Main control layout

Measure.lay

Layout with measured data

Imctrl_Stim.se

Stimulus Sequence for test automation

16