On Sunday 02 August 2015 06:50:40 andy pugh wrote:

> On 2 August 2015 at 04:16, Gene Heskett <[email protected]> wrote:
> >> I said to check your HAL _file_ to see what it was used for, not to
> >> check the HAL _manual_
> >
> > True, and it is used, but probably the only reference to its effect
> > is in the man 9 pid. From that doc:
> > ====================
> >  pid.N.maxoutput float in
> >               Output  limit.   The absolute value of the output will
> > not be permitted to exceed maxoutput,
>
> So, that is exactly what that INI parameter is doing in your config.
> The point I am trying to make is that that INI param could be called
> WHOA_THATS_ENOUGH_X and it would still work just the same. The tag
> names are set by the whim of the person or wizard that writes the INI
> / HAL files so there is no definitive answer as to what does what.
>
> In this case the value of your INI parameter should be set to the
> value that gives maximum voltage or PWM on whatever the PID drives.

I can see that for the PWM into a servo because you never want to hit 
100%, so I always scale that to clip at 98% with no processing between 
the PID and the PWMGEN.

But when applied to a stepgen where it has been proven not to stall at 
heavy accel rates, the freezing of the error when the clipping occurs 
prevents the stepgen from unwinding the error as rapidly as its 
permitted, hence the joint following error, which brings everything to 
an instant halt (and makes quite a heavy thump!).

Correct?

This of course is using a very small fraction of the output range the PID 
is capable of since it deals with FP numbers.

To me, used to dealing in electronics with the ever present noise floor, 
that is wasted headroom that just makes it more sensitive to any noise 
that may creep in. So my natural tendency is to use as much of that 
headroom as is practical, then scale it (in the same servo cycle of 
course by ordering the addf's) to fit the target being controlled.
========
This is one of the reasons I would like to see a filter mode added to the 
encoder module that is the weighted sum of the last 4 samples the 
quadrature has encountered, thereby averaging out much of the not quite 
50% duty cycles or lack of accurate quadrature accuracy.  Sure, we can 
lowpass it or slew limit it, but that causes more lag and loop 
instabilities can creep in.

Even a separate, 4 stage shift register module with a weighted sum output 
would be a huge help in that regard.  It could be synthesized with 4 S&H 
modules and 3 sum2's, but its something I haven't yet carved up in a hal 
file just to see if it would work.  Maybe I will this time. Just for 
S&G. :)

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

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

Reply via email to