Professional Documents
Culture Documents
Servo System
Abstract A digital servo system based on MC56F8357 is The reference frames of FOC shown as Fig. 2 can be
presented in this paper. The system principle, hardware and used to analyze the PMSM, in the FOC, the expression of
software architectures of the AC servo drives are introduced. the voltage, flux linkage equations of PMSM in the d, q
By utilizing Field Oriented Control (FOC), Space Vector coordinate system are given as:
PWM (SVPWM), DC bus ripple compensation, digital PI
regulating with correction of the integral term and Anti-
Hunt Processing control strategies, the hardware and soft-
F 1Sd R siSd
i ±d dt
Y Sd (1fY Sq
1519
B. Voltage Space Vector PWM Au(k) = u(k) -u(k -1) = Kp[e(k) -4k -1)]+KI ek) (7)
The six transistors in the inverter can form eight where, k is sampling order number, u(k) is the output of
switch variables, corresponding to 8-space vectors: Uo, the controller at the sampling time k. e(k) is input errors at
U60, U120, U180, U240, U300, 0000, 0111, here six states are time k. Kp is the proportion, KI is integral factor. To
non-zero vectors, two states (Oooo, °111) are zero vectors, avoid the saturation and overflow of the regulator vari-
the non-zero vectors form the axes of a hexagonal, the ables and output, one solution is to add a correction Kcor
angle between two adjacent non-zero vectors is 60 de- of the integral term to the previous structure, to quickly
grees. The space voltage vector PWM is shown as Fig. 3. quit the saturation and overflow. The innovated PI algo-
The SVPWM method with zero vectors that combined rithm is as follow,
with states 0000 and °111 in each sector is adopt in this e(k)= r(k)-y(k)
paper. The inclusion of zero vectors helps to balance the u(k) =x(k-1)+Kp e(k)
turn on and turn off periods of the transistors, and thus x(k) =x(k-1)+±K e(k) +Kcor EpI
their power dissipation. The objective is to approximate
the motor voltage Us by a combination of eight switching where, Kcor=K1 /Kp is the integral correction factor, EPI=
patterns of the six power transistors. The projected motor uour-u(k), if PI regulator is saturation and overflow,
voltage Us, at any time, can be approximated by the vec- uO1t=Umax when u(k)>Umax, or uo,t=Umin when u(k)<Umin,
tor sum of two vector components lying on the two adja- otherwise uo,t=u(k).
cent basic vectors: E. Anti-Hunt Processing
Us=T1 TUx+ T21TUx+60+ TnullI T(Oooo or 01 l) In the servo control, when the motor reaches to the re-
T=T1+ T2+ Tnull quired position and needs to produce torque at standstill,
T is the PWM period. This approximation means that special attention needs paid since the rotor will very likely
the upper transistors must have the on and off patterns oscillate (hunting). A variable gain Anti-Hunt algorithm is
corresponding to Ux and Ux+60 for the time T1 and T2, to developed as shown in Fig. 4. 1) When the position error
apply voltage Us to the motor, e.g., the projected motor is large (region 1 or 5), the PI gains of the speed and posi-
voltage Us is in the sector I, the time T1 and T2 of the two tion regulators are set to the maximal value, to get fast
vectors Uo and U60, can be calculate as speed response. 2) When the position error is small
T1 = (FUua )* T / 2 (4) enough (region 2 or 4), the PI gains should be gradually
UT2 =u, ET
where, u., up is a, ,B component of Us respectively
reduced. 3) Once the rotor enters the Anti-Hunt window
(region 3), the PI gains are reset to zero. This approach
has effectively avoided the rotor oscillation at the stand-
still position.
C. DC Bus Ripple Compensation
In order to eliminate the influence of DC bus voltage III. IMPLICATION OF HARDWARE AND SOFTWARE
ripples on the generated pulse-width-modulated wave-
forms, an arithmetic is induced to compensate the ampli-
tude of a and ,B component of the projected motor voltage
Us, the formulae are shown in (5), (6):
index *ac
F ine u ddcbus
cc u dcbus if I index* c < - 2 (5)(5)
sign(c ) * 1.0 otherwise
Undebus
i
if index * D < 2 (6)
sign (D ) *1.0 otherwise
where, index must be within a fractional range and posi-
tive: 0 <index < 1 the value depends on the modulation U240 V. U300
technique, i.e., for the SVPWM applied in this paper, in- (001) X (101)
dex is equal to 0.866025. 0< u dcbus< 1 is equal to 0% - [-I /,-13 [-I1/ ,1]
100% of the maximum DC bus voltage. The y = sign (x)
function is defined as follow: Fig. 3. Space voltage vector PWM.
01.0 if x O
y
1 .0 otherwise
where, x =a, , are input duty-cycle ratios and a*,,* are PjIGains /
output duty-cycle ratios.
-x I O ~~I +
D. Digital PI Regulator
If the sampling period is small enough, the incre- Position Error
mental form of normal PI algorithm is expressed as: Fig. 4. Variable PI gains for Anti-Hunt.
1520
A. System Structure and Hardware Design
The MC56F8357 based servo system hardware struc-
ture is shown in Fig. 5. The hardware is mainly consisted
of a DSP MC56F8357EVM board, Power Integrate Mod-
ule (PIM) and PWM power drivers, voltage, current de- Voltage 12 FOC<
tection and feedback circuits, position detect circuits, Current bit_9
T
LCD/LED display and indicate circuits, power supply
circuits, a PMSM servomotor with an optical encoder. Display Si _R
(1) MC56F8357 is a cost efficient 16-bit fixed-point
DSP of Freescale Company, up to 60 MIPS at 60 MHz
| u/top + G < 1 E Quadrature/
core frequency, the power supply is 3.3V. Up speed 0 PM
The main characteristics of the DSP are: 1) Large ca- Freescale DSP
D
E
pacity memory. 256KB Program Flash, 4KB Program Down speed MC56F8357EVM R
RAM, 8KB Data Flash, 16KB Data RAM, 16KB Boot Fig. 5. MC56F8357 based servo system hardware structure.
Flash, combined with the on-board 128KB external Pro-
gram/Data SRAM. 2) Multiple motor control modules. IPWMDv OpticaleC j1 PWM
Four 4-channel 12-bit simultaneous or sequential sam- Fig. 6. PWM drive flowchart.
pling ADCs, the ADC internal clock is 5MHz, sample
time is 1.2us; two 6-channel independent or complemen-
Fig. 7. Voltage/current detect flowchart.
tary PWM modules; two quadrature decoders for capture
the position signal; four general-purpose cascadable quad state, e.g. run/stop motor, up/down speed when press the
timers and temperature sensor. 3) Mass communication corresponding buttons. Besides, a Human Machine Inter-
module for extend. Two asynchronous serial interfaces face (H4MI) is extended via an electrically isolated serial
SCI and two synchronous serial interfaces SPI, CAN bus RS232 communication, to control the motor and display
module and extend a serial RS232 communication for PC system state in real-time.
master control and display etc.
The high calculation speed, large capacity memory, (6) In the power supply circuits, digital and simula-
high sample precision and strong extend capability make tive power grounds connected by one point in this servo
MC56F8357 very optimized for digital motor control. In system, the different groups of power supply are isolated
this system, the calculation of FOC, SVPWM, DC bus by optically coupled isolator, the different powers level
ripple compensation, four digital PI regulator and Anti- translation are also used in this system.
Hunt processing etc are all implement in MC56F8357. B. Software Design
(2) A PIM P549-A-PM is adopted as the power stage, The main idea of the servo control program in this pa-
the PIM consist of 1/3 phases input rectifier, brake chop- per is: 1) Calculate the position error of the required posi-
per, 3 phases inverter IGBT + FRED with open emitter. tion and the actual position, which return back by the po-
Three IR2 11 Os are used as the PWM driver circuit, so it sition interrupt program. After Anti-Hunt processing, the
can use only one group power supply to control the six position PI controller generates a required speed by the
IGBT inverters. If some hardware error generate, the error position error. 2) Calculate the speed error of the required
signal will braking the PIM module and block all the speed and the actual speed, which is calculated by M1T
PWM output, the PWM drive flowchart is shown as Fig. 6. algorithm. Then the speed PI controller generates a re-
(3) Two current LEMs (LA28-NP) and one voltage quired current by the speed error. 3) Calculate the actual
LEM (LV28-P) are used to sense two phase current of currents in d, q coordinate system by the ADC interrupt
motor and DC bus voltage separately. The amplified and program, then compare to the required currents, the cur-
filtered current/voltage signals are transmitted to the A/D rents PI controller generate the required output voltages. 4)
port of DSP. At the same time, the sample values are also Eliminate DC bus voltage ripple, then generate PWM
used as the hardware and software protection signals, signal drive the servo motor by SVPWM.
such as under voltage, over voltage and over current, the The control program flowchart of servo system is
detect flowchart is shown as Fig. 7. shown as Fig. 8, it consists of the main program, ADC
and position interrupt program. In the main program, ini-
(4) The position pulse signals from the motor optical tialization DSP, fault control, application control and
encoder, after anti-jamming processing, are transmitted to brake control and performed In the ADC interrupt pro-
the quadrature decoder of DSP. The DSP get the speed gram, the analog sensing processing, sin, cos generation,
and relative position value via calculate the pulse, at the current control and PWM output are performed, the inter-
same time, the index signal of the encoder is use to initial- rupt period is 125us. In the position interrupt program,
ize alignment and correct the position offset. position/speed measurement, alignment control, position
(5) One 8 bit LCD (W-C1601A) is used to display control and speed control processes are performed. The
the position, speed, voltage, current value and other vari- interrupt period is 3ms.
ant if needed. LEDs are also used to display the system In order to control the motor and detect the parameters
more convenient, a graphic user interface is programmed
1521
Fb_SiZMmzNa\+evg=w.A8VjP-0EltfI?X;hWs*ibFrS_
with the PC master. The PC master, which extended via control have been carried out. The parameters of the PM
an electrically isolated serial RS232 communication, is servomotor are as follow: PN=4, T,1=0.59 N m, Rw=27.15
plug in the program software for Freescale DSP. The pro- Ohm, Lw=45 mH, Jm=0.027 kgm2 103, P11=201 W, I 1 A.
grammed HMI is shown as the Fig. 9. An embedded incremental encoder with a resolution of
1024 lines/r (the quadruple frequency is 4096 lines/r) pro-
IV. EXPRIMENT RESULTS vides position and speed feed back for servo control.
The PWM frequency is 8 KHz, DC bus voltage is 36
The experimental equipment is shown in Fig. 10. It V, voltage and current sampling period is 125 us, speed
contains a PMSM servo motor, a MC56F8357EVM board and position sampling period is 3ms, PC master sampling
and a parameter detection and drive board. Ranges of ex- period is lOims, the HTML control form of the PC master
periments including current, different speed and position refresh period is 1 s.
Star
The steady state and transient state phase currents re-
Initialization (ADC Interrupt) spondent waveforms are shown in Fig. 11 and Fig. 12 sepa-
Enable Interrupt Analog Sensing Processing
rately. It can be seen that the precise sinusoidal wave-
Currents sensing ia, ib forms are obtained. The id, iq currents respondent wave-
|Voltage sensing-DC bus|
Fault Control forms with sudden load and unload, obtained from the PC
Undervoltage
Overheating Sin, cos Generation master, are shown as Fig. 13. These waveforms proved
Overvoltage
Overcurrent the high control performance and fast torque response.
Current Control
Currents transformation (a,b,c to d,q)
The speed respondent waveform from 20 rpm to 200
Application Control Current d regulator PI controller rpm, final 600 rpm is shown as Fig. 14. It indicates a fast
PC Master/Manual control Current q regulator PI controller
Run/stop control Voltages transformIation (d,q to no
DCBus ripple compensation
and steady speed respond.
Alignment control
Position/speed loop control SVPWM Module sets duty circle
Up/down speed control
LED indication control
LCD display control PWM Output
Brake Control
( Return o)
A. Main program flowchart B. ADC interrupt program
.r r r r r. r. I.r. .r .r 1
,..
=-Bs--RyM-1ffi-f]'i't-Be
lsb \? th76
Br0b-*--1bB *0t>-Sh1.
gr at
. W. .t g
ffi X g ii
k W A M
_
l}is;-
l2;e1
_ P_ |R _
W Eg ' H XR tS4mS .
I
B __ _
Fig. 9. PC master control and display interface. Fig. 12. Phase currents waveform with abruptly strike (0.2 A/grid).
1522
The different position respondent waveforms obtained
from the PC master when change position setting: 1)
From 0 pulse to 1000 pulses is shown as Fig. 15. 2) From
0 pulse to ±20000 pulses, then -20000 pulses, fmnal 0
pulse is shown as Fig. 16. ('±' means clockwise, '-' Actual Positionl
means anticlockwise). They verified that the servo control
can run in four quadrants very well, the position error is
very small (only one line error, 4096 lines/r) and the R~cjuired Po ition
speed response is fast.
The experimental results show that the servo system
proposed can accomplish precise position and speed con-
trol with fast torque respondent.
V. CONCLUSION
cluded that:
The servo system using MC56F8357 as the DSP con-
AcKNOWLEDGMENT
REFERENCES
-758, 2001.
[2] Longya Xu, Minghua Fu, and Li Zhen, A DSP Based Servo Sys-
Re qird Po6-siition tem Using Permanent Magnet Synchronous Motors (PMSM),
Texas Instruments Semiconductors.
Fig. 15. Position respondent waveform when discrete-time predictive current control for PMSM; proc. of IEEE
change position from 0 pulse to 1000 pulses. on Power Electronics, pp. 464 -472, 2003.
1523