On Sat, Jan 12, 2013, at 03:12 PM, Chris Radek wrote:
> On Sat, Jan 12, 2013 at 08:00:49PM +0000, andy pugh wrote:
> > 
> > Doesn't this mean that there is no PID output for the first servo
> > period after a setpoint change?
> 
> Hmm yeah, it does seem like it will add a period's delay.

Yes, to me this seems like a problem with putting it in PID.
 
> Does pid need to keep track of both kinds of error?  Report to
> motion its success (previous command vs current feedback), but use
> current command vs current feedback to calculate all the gains?

I don't think so.  Motion already gets position feedback and
creates motion command.  So it is quite capable of calculating
any flavor of ferror.  It should calculate the flavor that makes
the most sense for the needs of the motion module.  If that is
old position command vs new feedback, or new command vs
new feedback, or whatever.  

Putting that calculation in PID is a step in the wrong direction,
IMO.  The PID loop's job is to make the motor track the command.
PID is not responsible for generating a fault if it fails at that task.

I think part of the trouble might be that we aren't necessarily
all in agreement about what motion's position command output
actually is.

In my opinion, command is motion saying "this is where
I want the axis to be at the end of the next 1mS period".

I think some others are thinking it means "this is where I
want the axis to be right now". 

For anything but constant speed motion, the latter makes
the PID's job impossible.  It can't possibly make the axis
be at a specific location at a specific time, if it isn't told
the location until the time has already arrived.  Sure, if
the last several commands represent a constant speed,
it can assume that motion will continue at the same speed
and direction.  But what if motion just got to the end of
the constant speed part of a move, and has begun to 
decelerate?

If we can agree on which of the above definitions is 
correct, then I think we can walk through the rest of
the problem based on that information.  Note that it
is quite possible that the PID error term and the ferror
term used to generate a "too far off path" fault might
indeed wind up being different things. 

-- 
  John Kasunich
  [email protected]

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to