Howard Chan wrote:

To be perfectly honest, I can't understand your words.  But scope traces 
are easier to translate, so let's look at your picture:

> http://myweb.polyu.edu.hk/~icwfchan/p4.png

The area you have labeled "1" - you need to zoom in closer there, 500mS 
per division doesn't show much.  It seems to be oscillating, but the 
amplitude is perfectly constant - I bet that is one encoder count.

Since you aren't in the USA, I'm assuming your length units are 
millimeters.  In that case, the 500u/div scaling on the pid.0.error 
trace means 500nm per division (or 0.5 microns per division).  That 
"oscillation" seems to be about 0.8 divisions, or 0.4 microns.  0.4 
microns per count would be 2500 counts per millimeter - is that the 
resolution of your machine?

If so, you should probably change the scaling of that scope trace - a 
scale of 1 or 2 or even 5 microns per division would give you a better 
view of what is going on.

The area you have labeled "2" - that represents the drive and motor 
lagging behind the position command.  Since the vertical scaling is set 
too high, we can't see how bad the worst-case error is (it is off the 
top of the screen).  The horizontal scaling is also set too slow, so we 
can't really see the dynamics of the initial acceleration.  The sweep 
rate should be about 10 times faster.

The question at the root of problem area "2" is this - is the PID not 
asking for enough velocity, or is the drive not delivering the velocity 
that the PID asks for?  If the former is true, you probably need to 
increase P, D, or FF2.  If the latter, you need to fix the drive - 
probably tune the drive velocity loop, with no PID loop in EMC to 
confuse the issue.

Note that you can (and should) use HAL and halscope to do the velocity 
loop tuning.  Run a 0.5 Hz square wave from "siggen" thru a "limit2" 
block to generate a trapezoidal velocity command, then send that to the 
DAC and from there to the servo amp.  Use a ddt block on the position 
feedback, or better yet the direct velocity output from the encoder 
counter, to observe the drive performance.

AFTER the servo drive itself is working as well as possible (and you 
understand its limits, such as accel rate), then you can move on to 
position control with EMC's position loop.  I tend to use a siggen + 
limit3 block to generate a position command that accelerates, cruises at
constant velocity for a while, decelerates to a stop, holds for a while, 
and then repeats going the other direction.  The scope automatically 
triggers on every repetition, so you can concentrate on changing things 
with setp and interpreting the results, rather than messing around 
operating EMC (jogs or whatever).

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to