park_D
park_Q
clarke_d
clarke_q
Valpha
Vbeta
Tb
Ta
Tc
Ipark_d
Ipark_Q
Ipark_D
Theta
Ipark_q
rmp_freq
rmp_offset
rmp_gain
trgt_value
set_value
eq. flag
Mfunc_c1
Mfunc_c2
Mfunc_c3
PWM1A
PWM
DRV
MACRO
PWM1B
PWM2A
PWM2B
PWM3A
PWM3B
EV
HW
3-Phase
Inverter
PMSM
Motor
ADC
DRV
EV
HW
Ia
Vdc
Ib
AdcRslt0
AdcRslt1
clarke_a
clarke_b
park_d
park_q
PARK
MACRO
CLARKE
MACRO
SVGEN
DQ
MACRO
IPARK
MACRO
RG
MACRO
RC
MACRO
theta
watch window
Speed_Ref
PID
MACRO
Iq Reg.
IdRef (=0)
IqRef
watch window
PID
MACRO
Id Reg.
QEP
DRV
EV
HW
QEPA
QEPB
Index
Elec
Theta
Direction
Speed
Speed Rpm
SPEED_FR
MACRO
u_out_q
u_out_d
i_ref_d
i_ref_q
Software Tools
www.ti.com
Figure 16. Build Level III - Closed Current Loop Test
2.4.4
Closed Speed Loop Operation - Build Level 4
In this level, the speed loop will be closed in addition to the current loops regulating stator current d-q
components and use the actual rotor position. This section verifies the speed PID and FOC based on
actual rotor position. The basic sensored, field-oriented control of PMSM motor implementation will be
done once this step is completed successfully.
•
Torque control: If the user is interested in “torque only” control, the previous scheme allows the user
control the torque as long as the actual rotor position sensed by the QEP drv is fed to the Park and
IPark transforms. The amount of the load determines the speed of the motor at a given torque
reference since the torque control guarantees constant torque production but cannot control the speed
directly.
•
Speed control and speed PID tuning: If it is intended to control both speed and the torque, then the
speed loop should be closed as given in the block diagram of level 4. The reference speed adjusted by
the user is compared to the speed feedback and then the error is compensated by speed PID module
which needs to be tuned at this level. The output of the speed PID is connected to another PID
regulating Iq (stator current torque generating component), and the system increases or decreases the
torque generation depending on the actual speed level vs speed reference. For example, when the
system is loaded, motor speed tends to reduce and the system immediately increase the torque
generation to handle the applied load and indirectly keep the speed at the reference level. Once the
speed PID is tuned at a certain operating point, the user needs to examine the robustness of the
speed loop under various torque/speed levels, step load or any other torque/speed profile applied to
user’s system.
•
Now, the actual rotor position is used: It was confirmed in build level 3 that position information
(both electrical and mechanical) was correctly appearing at the outputs of the QEP drive module. In
build level 4, the simulated angle provided by RAMP_GEN is no longer needed. This can now be
replaced by the actual measured electrical angle, theta_elec, which is used as angular position
feedback for the Park and inverse Park transforms.
•
Soft-switches helps to manage control loops: The latest incremental build levels are supported by
loop switches (a software variable in the code, lsw) to manage the loops. For instance, when lsw=0,
the rotor is locked to the initial rotor position which is essential for sensored applications. Afterwards,
the lsw is set to 1 to close the current loops which help the motor start up smoothly. This is often
needed for sensorless applications because the algorithms need some time to converge to the actual
position/speed value. Finally, lsw is set to 2 in order to close the speed loop which let the customer
control speed accurately and realize field orientation.
20
TMS320C2000 Motor Control Primer
SPRUGI6 – September 2010
Submit Documentation Feedback
Copyright © 2010, Texas Instruments Incorporated