-----Original Message-----
From: dave engvall <[email protected]> 
Sent: Wednesday, December 09, 2020 1:10 PM
To: [email protected]
Subject: Re: [Emc-users] Tuning a servo

On 12/9/20 8:21 AM, Jon Elson wrote:
> On 12/08/2020 10:53 PM, Gene Heskett wrote:
>> What does that 22mv mean in folllowing error since I have that set 
>> for about half an inch at the moment?
> It is not milli VOLTS, it is milli-units.  Generally inches or mm, 
> depending on your preference.
> so 22m means 0.022" assuming that's what you use.  Or, if this is a 
> rotary, then it could be
> 0.022 degrees.
>
> My method of tuning is to first increase MIN_FERROR to prevent 
> following error trips, then reduce P to a small value, just enough 
> that error doesn't creep up. Adjust
> FF1 until error is small at moderate speed, less than 50 encoder 
> counts, perhaps.  Then, assuming a real axis with encoder feedback, 
> add a LITTLE FF2 to reduce the error spikes on accel/decel.  (Don't 
> bother on stepper-simulated axes.) Then, increase P to drive the error 
> down to a small fraction, add a little D to improve stability.
> It takes practice and experience to know what to adjust based on the 
> Halscope trace.
>
> Jon
Tuning seems to be a highly individualized endeavor. Hopefully a damped (in 
following error) search. :-) I start with a classic ZN ... increase P until you 
get un-dampened oscillation.  Make starting P .6 of that value.
Set FF1 equal to one and then adjust as necessary to minimize following error.
Adjust FF2 to minimize spikes on accel and decel. Adjust FF0 if needed for zero 
crossing. Try small amounts of D and I although I usually leave them a zero. 
Following error is < 1e-3 and can get down as good as 5e-4.
The values in PID, etc do seem to interact so going thru the loop a few times 
can't hurt. As always YMMV.
The major error on my machine is backlash. Adding a glass scale to X and Y 
might help. (future project).

I suspect that having tach feedback makes tuning much easier. I've never had 
much success with torque mode.

If I had the skill in linuxcnc internals I'd would try a well constrained Monte 
Carlo. No chance of my  doing that. ;-(


That’s all well and good if the command input of the amp is velocity, but I 
don't think that is the case for this one.  In torque/current mode the FF1 and 
FF2 have very different affects than with a velocity drive.  (and I never 
really completely figured it out, before I gave up and set up two nested PID 
loops.)  For a single loop you'll need as much P and D as you can make stable, 
and lots of I.  I've also found that setting the max error I limit pin to 
something that prevents windup can allow for very quick response from the I 
term without the negative side effects. (I've had good luck with setting the 
pid maxerrorI = 10/I).  I've also noticed some strangeness, where adding I 
actually seemed to made the steady state following error worse up until it was 
large, then the error started getting better until it finally came back in line 
and more I started to help a lot.  I did this searching for the point where 
more I caused instability, which I'm not sure if I ever did find.  (This was 
done before I tried limiting the max error for I.)

One of the main reasons I gave up on the single loop, was that the tune seemed 
to be very changeable and touchy, every few weeks I was tweaking on it again 
trying to get rid of following errors, instability, or overheating the drives.  
I've not had to mess with it since switching to the double loop.

_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to