Mook said:
Thanks,
I've read your articls on PID without a PHD and things are clearing up.
TI has a multistep process to build feeback contolled PMSM with resolver
FB.
1) is to run the motor open loop with and Id and Iq command
2) is to apply the Id and Iq feedback and close the torque control loop
3) is the aply thespeed control look using resolver feedback.
We have run the motor with a DC paramaters for Id and Iq. Id
= 0 since we are running a PMAC motor with resolver feedback. We run these
values into the Ipark- Iclark block to generate the 3 phase SVM signal for
the motor windings.
In the open look it works OK but pulls WAY too much current. We have to
turn the power supply voltage down to keep from saturating the current
sensors (2A). There is no load on the motor as we are just starting out. my
recommendation is to reduce Iq until the current is under control and the
motor still spins openloop. The FW guy is resistant to this for some
reason.
I havent looked at the TI PMSM code, but the normal approach is to have
a current setpoint, and a closed-loop current controller, that then
generates a voltage setpoint to the waveform generator. If you try
running it open-loop, with a current setpoint, it'll saturate PDQ.
What you need to do is bypass the current controller, and provide a
fixed voltage setpoint to the waveform generator.
you might be better off with some inductors rather than a machine to get
the open-loop control working. check your waveform generator is working
nicely (I built some 8th order passive bessel filters that Tektronix
P5200 probes plug into, to measure the fundamental voltage waveform from
a hairy-assed PWM mess, for this purpose).
once you are happy that you can produce the voltage waveforms you intend
to (IOW the WG is working), then add in the current controller. If Id =
0 then Vd = 0, so you dont need the Id controller at all.
And yes, you start with a nice small Iq. My personal preference is to
use inductors, because there arent any rotating bits to worry about, and
you dont have to worry about getting the darned thing started.
Once you have got the current regulator working at a variety of currents
with an L-R load (mostly L), you can do step responses etc. I find it
handy to feed actual Id, Iq out a DAC port, so you can see whats going
on in the SRRF on a scope - there are devices called vector visualisers
that implement Parke, Clarke transforms with analogue ICs, to let you do
this with V,I measurements directly, but if you have a DAC port its way easy
One the open loop is stabilized, the next step in the build procedure is to
connect the clark/park Id and Iq output from the measured 3 phase currents
and for a feedback loop with a difference block subtracting the target
Iq and Id from the measured Iq and Id to generatethe error. That is feed to
the PID block then to the ipark/iclark to generate the corrected SVM
waveforom on the motor.
with the current regulator working and a machine attached, organise to
slowly bring it up to speed with open-loop voltage control (if you ramp
the voltage slowly, the unloaded machine will easily follow it), then
kick in the current controller. at this point you can tune it, using
small step-changes in Iq*
Using the Z-N method, I should set the Kp = 1 and Kd = Ki = 0? Then make
the Iq command step up and down between values in the operational range of
the motor and look at the feedback iq response. Should be slugish.
Increase Kp until you get some overshoot on the steps. Then begin
oncreasing Kd until the overshoots damp out. Then increase Ki to reduce the
steady state error.
Is this the proper method to apply Z-N for motor controll of the current.
you dont need any Kd for the current controller. PI is fine, and thats
one less parameter to mess with.
a crude analysis of ZN is:
- crank up Kp until it gets pissy
- wind it back a bit
- ditto with Ki
but really its not too hard to sit down and write some control-loop
equations, so you can figure out the "ideal" Kp, Ki for whatever
response you desire. Dynamically its just a current controller providing
a voltage setpoint which is driving into an L-R circuit.
In practice its more complex, there are sampling issues etc, but as long
as your sampling rate is fast c.f. the machine rated speed, they wont
affect you too much - and the analyutic approach provides a good
starting point.