Stephen Wille Padnos wrote:
>
> EMC2 has a component called "at_pid", which is an autotuning PID.  It 
> uses something like Z-N to get the coefficients.  In testing, it seemed 
> to create usable sets of coefficients, but the results were pretty 
> heavily dependent on initial conditions.  You could tune an axis twice, 
> and you'd get two very different sets of coefficients.  Both seemed like 
> they would work OK, but the fact that the results were so dependent on 
> initial conditions led most everyone, including the author of the 
> component, to question whether it was a good idea to use it.

I was writing the same thing, but Stephen beat me to it.

> I don't know if auto-tuners can tune feedforward - I've never heard of 
> one that does (though I haven't looked hard).  Feedforward lets the PID 
> feed control commands straight through (mroe or less), and then adds on 
> the error correction terms.

In many cases, feed-forward doesn't need to be "tuned".  The idea behind 
feed-forward is to provide an open-loop command that gets you very close 
to the desired result, and then let the PID correct for any remaining 
errors.  By doing incremental design and measurements, and setting the 
scales right, you can arrange it so that the most important FF term will 
be 1.000.

For example, assume your servo drives have a velocity loop, which means 
you will be wrapping EMC's position loop around the drive's inner loop.

Note - in this case you MUST get the velocity loop tuned first!

If the drive has a velocity loop, the dominate feedforward term will be 
FF1, the velocity term.  Once the drive is tuned, there will be a very 
specific relationship between the voltage from EMC and the speed of the 
motor.  For example, +3V to the servo drive might result in 6 inches per 
second movement of the axis.  In that case, the DAC scale should be set 
so that a PID output of 6 generates +3 volts at the DAC, which will make 
the axis move at 6 inches/sec.  Then you can set the FF1 term in the PID 
loop to 1.0 - a commanded position that is changing at 6 inches/sec will 
result in a PID output of 6 * FF1 = 6, the DAC will output +3V, and the 
axis will move at 6 inches/sec.  Of course it won't be perfect - analog 
drift, shaft load, etc, might make the resulting speed be 6.02 or 5.97 
inches/sec - that is why we have feedback.

If the servo drives accept a current (or torque) command instead of 
velocity, then the dominate feedforward term will be FF2 (acceleration). 
  A specific input voltage to the drive would result in a specific 
output current and thus motor torque, and that torque would accelerate 
the axis at a rate which depends on its mass.  You would set the DAC 
scaling so that a PID output of 1.0 would result in enough torque to 
accelerate the axis at 1.0 inches per second per second.  Then set FF2 
to 1.0, so that when the position command accelerates, the PID output is 
automatically whatever is needed to achieve that acceleration.  Again, 
there will be errors between the open loop accel from the drive, and the 
exact accel you want - probably worse than with a velocity loop in the 
drive, since there are more things that can change the open loop 
response.  Put a heavy workpiece on the table, and the same amount of 
torque will give you less acceleration.  So again, feedback and the PID 
terms takes care of the errors.

> There's just no substitute for having a brain in the process somewhere - 
> computers can't do it all (yet).

Exactly.  IMHO this is a good thing - if computers could do all the 
thinking for us, we would let our brains rot.  Then who would tell the 
computers what to do?

Regards,

John Kasunich

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to