Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   CAN (http://www.chiefdelphi.com/forums/forumdisplay.php?f=185)
-   -   Jaguar Speed Control Only Reaches 50% of Setpoint (http://www.chiefdelphi.com/forums/showthread.php?t=90508)

sgtell 01-03-2015 21:28

Re: Jaguar Speed Control Only Reaches 50% of Setpoint
 
Looks like the Jag PID limits integrator wind-up:

Code:

    //
    // Update the error integrator.
    //
    if((psState->lIntegrator & 0x80000000) == (lError & 0x80000000))
//trimmed

[/quote]

From this old thread it looks like the Jaguar's onboard firmware source code was once available - at least the old TI/Luminary micro version (I understand that the FRC version was not).

Is there anywhere to obtain this source code today? Our students are attempting position-based PID control onboard the jaguar using an encoder, and having some difficulty. Being able to point to exactly what the jaguar is doing with their parameters may be a useful teaching opportunity.

thanks, Steve

jhersh 01-03-2015 23:26

Re: Jaguar Speed Control Only Reaches 50% of Setpoint
 
Quote:

Originally Posted by sgtell (Post 1451814)
Is there anywhere to obtain this source code today? Our students are attempting position-based PID control onboard the jaguar using an encoder, and having some difficulty. Being able to point to exactly what the jaguar is doing with their parameters may be a useful teaching opportunity.

Have you tried looking here? http://www.ti.com/tool/mdl-bdc24&DCMP=STELLARIS&

There is a software download that should include the non-FRC version, which should include all of the PID algorithms.

GeeTwo 02-03-2015 00:06

Re: Jaguar Speed Control Only Reaches 50% of Setpoint
 
Quote:

Originally Posted by EricVanWyk (Post 1012050)
By definition, it is impossible to stably hit your set point with a P only control loop. You must have an I term.

It is possible to have an accurate feed-forward and achieve this. Not likely, for sure.

Also, for benefit of anyone reading this and not recognizing the distinction, you can stably hit a position set point with a P-only control loop. (Well, actually you need some D, but this doesn't need to be in software - a bit of friction will often do the job nicely.)



As to a P-only loop only reaching 50% speed, that makes sense if you don't have a feed-forward. Thought experiment: what happens if you start at the setpoint speed, or equivalently read the current speed, and make it the setpoint? Answer: the difference is zero, so zero voltage is applied to the motor. It slows down. As it slows down, D increases and voltage is again applied, but never enough to get back up to the set point.

Ether 02-03-2015 08:46

Re: Jaguar Speed Control Only Reaches 50% of Setpoint
 


This thread is about speed control using the Jag firmware PID, which does not have a feedforward term.




All times are GMT -5. The time now is 02:41.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi