Go to Post Instead of giving us some wood and nails and saying "build us a box", they're handing us power tools and saying "now make us something cool" - galewind [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #76   Spotlight this post!  
Unread 03-01-2015, 08:28 PM
sgtell sgtell is offline
Registered User
AKA: Steve
FRC #4795 (Eastbots)
Team Role: Mentor
 
Join Date: Dec 2012
Rookie Year: 2013
Location: Chapel Hill, NC
Posts: 5
sgtell is an unknown quantity at this point
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
Reply With Quote
  #77   Spotlight this post!  
Unread 03-01-2015, 10:26 PM
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,014
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Jaguar Speed Control Only Reaches 50% of Setpoint

Quote:
Originally Posted by sgtell View Post
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.
Reply With Quote
  #78   Spotlight this post!  
Unread 03-01-2015, 11:06 PM
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Mentor
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 5,492
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Jaguar Speed Control Only Reaches 50% of Setpoint

Quote:
Originally Posted by EricVanWyk View Post
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.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #79   Spotlight this post!  
Unread 03-02-2015, 07:46 AM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 9,126
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
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.


Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:12 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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