On Sun, 13 Jan 2013, John Kasunich wrote: > Date: Sun, 13 Jan 2013 22:44:25 -0500 > From: John Kasunich <[email protected]> > Reply-To: EMC developers <[email protected]> > To: [email protected] > Subject: Re: [Emc-developers] proposed patch for v2.5_branch: correct ferror > calculation > > > > 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?
Even for a fairly fast machine the error due to the integral terms inability to track acceleration is an order of magnitude smaller than the steady state error at speed. So yes, the PID tracking will lag on accelration, but this error is quite small relative to to first order velocity offset in ferror. (a machine that can accelerate to 600 IPM in 100 ms only moves 50 uInch in the first ms of motion) I dont know if you saw the results of Michael Haberlers proposed patch: freeby.mesanet.com/ferror0.png (ferror-mode set to 0) freeby.mesanet.com/ferror1.png (ferror-mode set to 1) Both plots of a PID loop with a large enough integral term that it can track velocity. I know which mode I would want to use when setting ferror limits. > > 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. Part of the issue I see is that its not so important what is correct but rather what is most useful. This depends on the feedback systems characteristics. > > -- > 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 > Peter Wallace Mesa Electronics (\__/) (='.'=) This is Bunny. Copy and paste bunny into your (")_(") signature to help him gain world domination. ------------------------------------------------------------------------------ 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
