From: Eric H. J. <ejo...@aa...> - 2006-08-12 03:32:29
|
Ray, > You need to think of P a +- value around the setpoint. The > larger the P the closer to that point it gets. What you did > for setting P to minimize errors is a good start but as soon > as you begin to add in D and I you can increase the P. > > I tend to start out raising P until I get some oscillation > (ringing) of the axis. Not a lot of oscillation but it > should be noticeable. Now add in a bit of I and D and you > should be able to see the ringing stop. > Increase P again until the ringing returns and increase I and > D. You should be able to repeat this several times. Each > time you do you will see more stiffness when you try to > rotate the motor by hand. > > You will get to a point where you are not able to make the > axis settle down by increasing I or D. At that point back > off P a bit and then twiddle I and D until you see minimal > overshoot and a quick return to correct position. Thanks for the feedback. For the most part that is pretty close to what I was doing. In fact, if you happen to be familiar with Galil motion systems, it has a tuning facility where one of the functions is an auto tune which operates very similarly to what you describe, and what I was manually trying to emulate here. What I was finding was that after I reached a P value of about 325, the error started getting worse rather than better. Of course I may well have P and D well out of synch in moving each of them up. However, at one point I did crank P up to 1000, and still had rather soft response on the drive. Which is why I thought perhaps it was one or more of the non-PID parameters, like acceleration or output_scale, which I had wrong. Pushing up output_scale had much more effect on the stiffness of the motor than cranking up P. I also saw a reference in the Integrator's Handbook regarding the use of ff0 and ff1. I tried ff0 through the range of 4-7, but did not see any real noticeable difference, at least in that range. > If this is EMC2 you can start up halscope and watch some > signals. I've found that connecting axis position to a ddt > block will let you watch change of position rather than position. I wrote a wrapper around halcmd and with it, a little PID tuning utility. Mainly the ability to manipulate P, I, D, ff0, ff1 and bias, monitor various pins, and issue MDI commands. Monitoring change in position is a good point. I will be taking another shot at it tomorrow. Regards, Eric |