On Thu, 8 Jul 2010, Jake Anderson wrote:

> Date: Thu, 08 Jul 2010 10:32:50 +1000
> From: Jake Anderson <ya...@vapourforge.com>
> Reply-To: "Enhanced Machine Controller (EMC)"
>     <emc-users@lists.sourceforge.net>
> To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net>
> Subject: [Emc-users] odd PID tuning problem
> 
> We have converted our mill to CNC and EMC2 and all is fairly well.
> http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?JakeAndRussells
>
> Having a little trouble getting the tuning "just so" however.
> I set P and D to get an acceptable step response and all is fairly well.
> however when I have the table moving at a set speed there is a fixed
> offset, IE the table lags .01 or so behind.
> so I use FF1 to null that out so the ferror hovers around 0 and it all
> looks really good.
> Unfortunatly when I change that cruise speed (g1 F200 vs G1 F100 say)
> the ferror goes up, and I start either leading or lagging the set point.
> I can tune to hover around 0 error at any given speed, but as the speed
> changes I start getting error again.
> Any tips?

Do you have enough integral term to correct errors during cruise?
the integral term is slow (so can have a lot of gain without 
becoming unstable) but should be set fast enough to track velocity.

Does you motor power supply droop when doing a fast move? With a bare Hbridge 
(Voltage mode), FF1 is needed to compensate for the motors back EMF, so that 
without any other PID terms being applied, the H bridge output voltage matches 
the motors back EMF at any velocity. Once back EMF is compensated for, you 
have a ~torque (current) mode drive:

IMotor = (VBridgeFF1-VMotorBEMF+VBridgePID)/RMotor

where VBridgeFF1-VMotorBEMF ~=0

One problem with this scheme however is that the FF1 back EMF compensation 
depends on the power supply voltage (since Hbridge Vout = VSupply*PWMVal).


Torque mode amplifiers depend on high bandwidth velocity feedback, so 
you may need to raise the sample rate to get fast enough velocity feedback (D 
term) Better velocity feedback will allow your P and D terms to be increased, 
improving following error. When tuning a torque mode drive, at least in my 
experience, you have to ratchet P and D up alternately while checking the 
step response. Higher D allows higher P (and higher P allows higher I).

Dont know if EMCs PID loop has been modified to allow an external (not 
DPosition/DT) velocity input. If the PID component had a velocity input, you 
could use HostMot2s encoder velocity output as a better velocity feedback term 
than the (crunchy) DPosition/DT



Peter Wallace
Mesa Electronics

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to