Software Tools
i_ref_q
watch window
IqRef
i_ref_d
IdRef (=0)
Speed_Ref
watch window
set_value
RC
MACRO
trgt_value
eq. flag
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
Figure 16. Build Level III - Closed Current Loop Test
PID
MACRO
u_out_q
Iq Reg.
Ipark_Q
IPARK
MACRO
Theta
Ipark_D
PID
MACRO
u_out_d
Id Reg.
park_D
PARK
MACRO
park_Q
rmp_freq
RG
MACRO
rmp_offset
rmp_gain
Copyright © 2010, Texas Instruments Incorporated
Mfunc_c1
Ta
Ipark_q
Valpha
SVGEN
DQ
Mfunc_c2
MACRO
Tb
Ipark_d
Vbeta
Mfunc_c3
Tc
park_d
clarke_d
CLARKE
clarke_a
AdcRslt0
MACRO
theta
clarke_b
AdcRslt1
park_q
clarke_q
Speed
Theta
SPEED_FR
MACRO
Speed Rpm
Direction
www.ti.com
PWM1A
3-Phase
PWM1B
Inverter
PWM2A
PWM
EV
DRV
PWM2B
MACRO
HW
PWM3A
PWM3B
Ia
EV
ADC
Ib
DRV
HW
Vdc
Elec
QEPA
QEPB
Index
QEP
EV
DRV
HW
PMSM
Motor
SPRUGI6 – September 2010
Submit Documentation Feedback
Need help?
Do you have a question about the TMS320C2000 and is the answer not in the manual?