Vous êtes sur la page 1sur 17

Application Notes

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

Document Version 2.1 June 2002

dSPACE Application Notes

Table of Contents

INTRODUCTION INDUCTION MOTOR TEST BENCH FIELD ORIENTED CONTROL


Controller Equations and Parameters Implementation in the Flux Weaking Region Pulse Width Modulation (PWM) Initialization and Output of ua, ub and uc

2 2 3
6 8 9 12

CONTROLLER DESIGN WITH SIMULINK


The Control Layers The Measurement The PWM Interface

12
12 13 13

EXTENSION OF THE FUNCTIONALITY


Flux Weaking Control Speed Limits

14
14 15

THE DEMO DOCUMENTS

16

dSPACE Application Notes

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 fieldoriented 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 Controller Board

Host PC
PWM Signals

3 2 Current Information i
a b

Power Supply

3 Input Voltage Input Frequency

Frequency Converter

Figure 1: Squirrel cage induction motor control experimental setup

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 from the block structure of an induction machine in rotor-flux frame, shown in Figure 2.
1 FS L H/ ( T RLR) FS

uSd

1/KR KL/KR

iSd

LH

TR Rd

LH / T R Denominator Numerator FR RS

uSa uSb

a,b,c

KL

KL uSc d,q 1/KR KL KR / 3 /2 pLH /LR me i Sq LH / L R -

mL

uSq

1 J

Rd RS

Figure 2: Block diagram of a squirrel cage induction motor The motor dynamics are described by the following space vector differential equations:

K R i Sd + K L K R i Sq + K L

LH di Sd = u Sd + FS K L i Sq + Rd dt L R TR diSq dt = u Sq FS K L i Sd + LH LR

RS Rd

dSPACE Application Notes


Rd +TR d Rd =LH i Sd dt L TR = R RR d m =me mL dt 3 L m e = p H i Sq Rd 2 LR

FR =

LH i Sq TR Rd

FS = FR + RS FS = FS dt
The torque of the motor me is proportional to the product of Rd and iSq, see the lower part of Figure 2. The rotor-flux Rd changes slowly compared to iSq and iSd, since the time constant TR is much greater than:

KL KR

K , TR >> L KR

For this reason it makes sense to control the torque via iSq, 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:

1 1 i Sa i S 2 1 2 2 iSb = i 3 3 3 S 0 i 2 2 Sc i Sd cos FS sin FS i S = i sin cos FS i S FS Sq

dSPACE Application Notes


The controller outputs uSd* and uSq* must be transformed to phase voltages and connected to motor inputs uSa, uSb and uSc. 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 S cos FS * = u sin FS S * sin FS u Sd * cos FS u Sq

* u Sa * * u S u Sb = (space vector modulation ) * u * S u Sc

Figure 3 shows the complete control structure. The transformation blocks are marked with dashed-lined boxes.
* RS RS * Rd Rd FC VC i* Sd d-CC iSq FS iSd phase to d,q-frame iS a,b,c iSa
ejFS

* iSq

q-CC

u* Sq

d,q-frame to phase * uS
,

+ u* Sa * uSb u* Sc za zb zc

U D

uSa uSb uSc

D
u* Sd

e-j FS

PW M

ASM
IG RS RS

u* S

a,b,c

iSb
iS
,

iSc

Rd

FR

FluxModel

RS

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 uSd* and uSq*. Figure 4 shows the decoupling network and both current controllers. The decoupling and the compensation section are marked with dashed-lined boxes.

dSPACE Application Notes


d-CC
i* Sd iSd u* Sd

KL
FS

RS FR
iSq

current decoupling

q-CC
i* Sq

LH/LR

+ +

u* Sq

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 iS iS
e-j FS

T R Rd FR

iSd iSq L /T H R 1 FR

FS

Denominator Numerator

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 iq controls the motor torque. The current control loop is shown in Figure 6. For the sake of clarity, the decoupling part is omitted.

dSPACE Application Notes


KRi
i* Sq

TRi

TTi

1 RS

LS RS

iSq

Figure 6: Current controller structure The AC drive is described in the first order lag GSi(s) with:

1 RS GSi (s) = L 1+ S s RS
The delay time TTi is determined by the delay times of the digital control and the PWM inverter:

TTi = Tctrl +

TPWM 2

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

Goi (s) = K Ri

1 + TRi s s TTi e GSi ( s) TRi s

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

Tci = Kci =

LS RS Tci RS 2 TTi

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.
KM J

1 1.2 T c
*

Kc

Tc

Td

Tf

Gi(s)

Figure 7: Velocity controller structure

dSPACE Application Notes


The integrator block describes the mechanical dynamics of the motor.

M =

KM iq ( t ) dt J

The delay time Td is determined by the delay time of the digital velocity control: Td = Tctrl . The open velocity controller loop is given by:

Go = Kc

1 + s Tc K 1 Gi ( s) M e s Tc s Tc J 1 + s Tf

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

Tc = 4 Ti Kc = J 2 Td + Ti + Tf 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:
2 2 US max = uSd + uSq =

1 UD 3

In the lower part of Figure 2 it can be seen that uSq 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:

ueR. m. f =

LH R Rd RS LR

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:

dSPACE Application Notes


* * Rd = Rdnom min(1,

RSnom ) RS

For safe operational behavior the stator voltage vector US 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, US has to be limited with q-priority and otherwise with dpriority. The modified controller structure is shown in Figure 8.
* RS

RS * Rd FC Rd VC

i* Sq

q-CC

u* Sq limit iq RS u* Sd

D
i* Sd d-CC iSd iSq

RS

Figure 8: Control structure of the flux-weaking region

Pulse Width Modulation (PWM)


The generation of the three-phase sinusoidal output voltages ua through uc 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 dleft and dright. This is shown in Figure 9.

u
2

dle ft
3 1

drig h t
4 5 6

Figure 9: Space vector modulation With the determined values for the sectors dleft and dright, 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 PWMa through

dSPACE Application Notes


PWMc 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 za through zc result from the values dleft and dright normalized with the maximum output voltage (UD / 3 ) and the PWM inverter period TPWM. Figure 10 shows this context for a voltage space vector in the first sector. Tpwm denotes the inverter period.

d0 4

dr 2

dl 2

d0 2

dl 2

dr 2

d0 4

PWM a PWM b PWM c


Tpwm 2 Tpwm

zaTPWM zbT PWM zcTPWM

Figure 10: PWM inverter duty cycle arrangement

10

10

dSPACE Application Notes


The values of dl, dr and d0 can be determined with the following equations:

dl = dleft dr = dright

3 TPWM UD 3 TPWM UD

d0 = TPWM dl dr
Figure 11 shows the ceiling phase voltages ua, ub and uc generated by the duty cycle PWM of the TMS320F240. The resulting line voltages uab , ubc and uca. are shown in Figure 12.
150

ua/[V] 100 ub/[V] uc/[V]


50 0 -50 -100 -150 0

0.005

0.01

0.015

0.02

t/[s]

Figure 11: The phase voltages ua through uc

300

uab/[V] 200 ubc/[V] uca/[V] 100


0 -100 -200 -300 0

0.005

0.01

0.015

0.02

t/[s]

Figure 12: The line voltages uab through uca

The calculated duty cycles za through zc 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

11

dSPACE Application Notes Initialization and Output of ua, ub and uc


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 RealTime 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.

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

12

dSPACE Application Notes 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 fPWM.

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 Sfunction 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 Sfunction with an RTI block.

Figure 15: PWM Interface to the DS1104 Slave CPU

13

13

dSPACE Application Notes

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.

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).

Figure 17: Flux weaking control

14

14

dSPACE Application Notes

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.

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

15

dSPACE Application Notes

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 Startup file for MATLAB, initializes all variables 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 Application-specific files: imctrl_1104.map MAP file, maps symbolic names to physical addresses imctrl_1104.trc Variable file, provides information on the available variables imctrl_1104.ppc Real-time application for the R&D board Experiment-specific files:

Imctrl.cdd Imctrl.cdc Imctrl.cdx Imctrl_1104.sdf Control.lay Measure.lay Imctrl_Stim.se

Experiment description file Experiment connection file Experiment file System description file, defines application should be used Main control layout Layout with measured data Stimulus Sequence for test automation

which

16

16

Vous aimerez peut-être aussi