OCCRA
Go to Post BEING a chairmans team is alot more important then WINNING the chairmans award. - fuzzwaz [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-13-2017, 07:55 PM
dardeshna's Avatar
dardeshna dardeshna is online now
Team Captain
AKA: Devin Ardeshna
FRC #0008 (Paly Robotics | Team 8)
Team Role: Mechanical
 
Join Date: Dec 2015
Rookie Year: 2015
Location: Palo Alto
Posts: 114
dardeshna is a name known to alldardeshna is a name known to alldardeshna is a name known to alldardeshna is a name known to alldardeshna is a name known to alldardeshna is a name known to all
Tuning a PIDF follower on a robot with high gearing

One of the problems we have been encountering during the off-season is tuning a PIDF follower reliably on our 2017 robot. It is geared with a fairly high theoretical top speed (~17fps), and our autonomous trajectories are generated with a maximum velocity of about 5fps. This means there isn't much torque at the wheels compared to resistive forces.

Without feedback terms, velocity does not track well. Generally a kV and kA value that work at faster speeds (4-6fps) are inadequate for slower speeds (2-3fps). We can add in feedback, but a few things happen:

1) The Kp term does more corrective work than it should be doing
2) Because of the large error, following is inconsistent between different trajectories

How do teams overcome this inconsistency at lower torque and get better tracking with feed-forward terms before moving on to adding feedback terms?
__________________
Devin Ardeshna
Team Captain (Paly Robotics FRC #8)


2017 Ventura Regional Quarterfinalist, Entrepreneurship Award, and Creativity Award, Silicon Valley Regional Finalist, Entrepreneurship Award, and Wildcard, Roebling Division Semifinalist, Chezy Champs Quarterfinalist, Capital City Classic Semifinalist
2016 Central Valley Regional Finalist and Wildcard, Silicon Valley Regional Quarterfinalist, Curie Division, CalGames Quarterfinalist and Entrepreneurship Award, Capital City Classic Quarterfinalist
2015 Central Valley Regional Entrepreneurship Award, Silicon Valley Regional Entrepreneurship Award, Capital City Classic Semifinalist and Judges' Award
Reply With Quote
  #2   Spotlight this post!  
Unread 09-13-2017, 10:56 PM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
in hibernation
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,302
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Tuning a PIDF follower on a robot with high gearing

PID(F) assumes linear dynamics; the high voltage and low voltage operating points of DC motors attached to a substantial load behave quite differently.

You will have the best luck if you tune the feedforward terms near the setpoints you care about (or if you want, gain schedule so that no matter what the velocity setpoint, you have a suitable set of feedforward gains).

On 254 we typically tune around a "nominal" speed and accept that at very low speeds, the feedback part of the controller is doing more of the work (which for us usually only occurs briefly at the beginning or end of a motion profile). If we had to spend a large amount of time cruising at a different speed, we would probably gain schedule.
Reply With Quote
  #3   Spotlight this post!  
Unread 09-14-2017, 12:35 AM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,606
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Tuning a PIDF follower on a robot with high gearing

Quote:
Originally Posted by Jared Russell View Post
PID(F) assumes linear dynamics; the high voltage and low voltage operating points of DC motors attached to a substantial load behave quite differently.
We noticed this as well, after implementing acceleration feedforward on our practice bot (thanks a bunch for the Talon workaround you posted!). The Ka value that worked for our rather tame profile (max acceleration ~3.5 ft/sec^2) corresponded to a theoretical maximum robot acceleration of ~15 ft/sec^2, which is well below what we know the value to be.

Could you provide any insight into why motors so nonlinearly under these conditions? It doesn't seem clear to me from the state equations.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016
Reply With Quote
  #4   Spotlight this post!  
Unread 09-14-2017, 01:10 AM
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 872
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Tuning a PIDF follower on a robot with high gearing

Quote:
Originally Posted by Oblarg View Post
Could you provide any insight into why motors so nonlinearly under these conditions? It doesn't seem clear to me from the state equations.
It's the friction that isn't linear, not the motors. Rolling resistance, scrub forces, and static friction are a bear.
Reply With Quote
  #5   Spotlight this post!  
Unread 09-14-2017, 12:04 PM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,606
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Tuning a PIDF follower on a robot with high gearing

Quote:
Originally Posted by AustinSchuh View Post
It's the friction that isn't linear, not the motors. Rolling resistance, scrub forces, and static friction are a bear.
Yeah, I expected that friction would have some nonlinearity, but nowhere near the magnitude of the effect I observed.

This is one of the reasons I wish that the Talon's configNominalOutputVoltage setting rescaled the output to be linear between the nominal output and the maximum output (the current functionality merely promotes the value to the nominal output when it is too low), which it seems to me would do at least a somewhat better job of properly accounting for the effect of friction. I suppose, upon reflection, that we could implement this via. workaround the same way we implement our acceleration feedforward, i.e. by adding the constant value to our velocity setpoints (we'd have to adjust our Kv to account for this, though).

I confess, though, that I'm pretty ignorant of the specific details of the frictional losses - what I suggest above would be akin to assuming that the frictional losses (in terms of extra torque required by the motor) are constant at all speeds. I have no idea how close (or far) this is from the truth. Given the relatively gigantic size of the Ka gain (something like a factor of 6.5 higher than the "theoretical" frictionless value) that we found to work at low speeds/accelerations, I suspect it's pretty far - but I still don't know why the discrepancy is so huge.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016

Last edited by Oblarg : 09-14-2017 at 12:17 PM.
Reply With Quote
  #6   Spotlight this post!  
Unread 09-14-2017, 12:46 PM
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 4,774
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: Tuning a PIDF follower on a robot with high gearing

Quote:
Originally Posted by Oblarg View Post
Yeah, I expected that friction would have some nonlinearity, but nowhere near the magnitude of the effect I observed.
.... but I still don't know why the discrepancy is so huge.
The biggest reason is the carpet. Almost any surface pair will have a larger coefficient of static friction than of dynamic friction due to developing bonds between the two surfaces. In the case of carpet, it deforms relatively slowly and rebounds inelastically, so the net friction rises as speeds decrease. I suspect that carpet fibers also work their way into any crevices in the wheels over time, furthering this effect.
__________________

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
  #7   Spotlight this post!  
Unread 09-14-2017, 03:41 PM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,606
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Tuning a PIDF follower on a robot with high gearing

Quote:
Originally Posted by GeeTwo View Post
The biggest reason is the carpet. Almost any surface pair will have a larger coefficient of static friction than of dynamic friction due to developing bonds between the two surfaces. In the case of carpet, it deforms relatively slowly and rebounds inelastically, so the net friction rises as speeds decrease. I suspect that carpet fibers also work their way into any crevices in the wheels over time, furthering this effect.
Well, our current plan is to attempt to better-account for the effect of friction by, rather than computing Kv from a single data point (measured max speed), run the robot at a variety of voltages, measure steady-state speed at each, and perform a linear regression. The reciprocal of the slope will become Kv, and the negation of the intercept will become a constant "friction compensation term" that we will add to all of our velocity setpoints. This should, in theory, accurately account for any frictional effect that is itself linear with velocity (and a glance at the residuals from the regression should give us some insight into the degree to which it is nonlinear).

We will document how well this works, and probably write a short whitepaper on it. Hopefully, it will go some ways towards allowing us to have a single Ka gain work reasonably well over a wider range of accelerations.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016

Last edited by Oblarg : 09-14-2017 at 03:46 PM.
Reply With Quote
  #8   Spotlight this post!  
Unread 09-14-2017, 05:11 PM
nuclearnerd's Avatar
nuclearnerd nuclearnerd is offline
Speaking for myself, not my team
AKA: Brendan Simons
FRC #5406 (Celt-X)
Team Role: Engineer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Hamilton, Ontario, Canada
Posts: 618
nuclearnerd has a reputation beyond reputenuclearnerd has a reputation beyond reputenuclearnerd has a reputation beyond reputenuclearnerd has a reputation beyond reputenuclearnerd has a reputation beyond reputenuclearnerd has a reputation beyond reputenuclearnerd has a reputation beyond reputenuclearnerd has a reputation beyond reputenuclearnerd has a reputation beyond reputenuclearnerd has a reputation beyond reputenuclearnerd has a reputation beyond repute
Re: Tuning a PIDF follower on a robot with high gearing

I'm very interested in the answers to this, because it also applies to a differential swerve with too-high a turning gear ratio. Can someone post an example of gain scheduling or some other non-linear feedback control of turning for my non-coder brain to absorb?
Reply With Quote
  #9   Spotlight this post!  
Unread 09-15-2017, 12:00 AM
dardeshna's Avatar
dardeshna dardeshna is online now
Team Captain
AKA: Devin Ardeshna
FRC #0008 (Paly Robotics | Team 8)
Team Role: Mechanical
 
Join Date: Dec 2015
Rookie Year: 2015
Location: Palo Alto
Posts: 114
dardeshna is a name known to alldardeshna is a name known to alldardeshna is a name known to alldardeshna is a name known to alldardeshna is a name known to alldardeshna is a name known to all
Re: Tuning a PIDF follower on a robot with high gearing

Our current (post Chezy Champs) plan is to gather several kV values for speeds ranging from 0.5 fps to 10 fps and then write a class (or probably just grab 254's InterpolatingTreeMap) to do linear interpolation for kV values given a velocity target.
__________________
Devin Ardeshna
Team Captain (Paly Robotics FRC #8)


2017 Ventura Regional Quarterfinalist, Entrepreneurship Award, and Creativity Award, Silicon Valley Regional Finalist, Entrepreneurship Award, and Wildcard, Roebling Division Semifinalist, Chezy Champs Quarterfinalist, Capital City Classic Semifinalist
2016 Central Valley Regional Finalist and Wildcard, Silicon Valley Regional Quarterfinalist, Curie Division, CalGames Quarterfinalist and Entrepreneurship Award, Capital City Classic Quarterfinalist
2015 Central Valley Regional Entrepreneurship Award, Silicon Valley Regional Entrepreneurship Award, Capital City Classic Semifinalist and Judges' Award

Last edited by dardeshna : 09-15-2017 at 12:18 AM.
Reply With Quote
  #10   Spotlight this post!  
Unread 09-15-2017, 12:07 AM
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 872
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Tuning a PIDF follower on a robot with high gearing

Quote:
Originally Posted by nuclearnerd View Post
I'm very interested in the answers to this, because it also applies to a differential swerve with too-high a turning gear ratio. Can someone post an example of gain scheduling or some other non-linear feedback control of turning for my non-coder brain to absorb?
Here's a simple one.

Code:
  const double kP = ::std::abs(velocity) < 1.0 ? 5.0 : 4.0;
  voltage = kP * error;
If you want to hurt your head some, look at our 2016 drivetrain code. We gain schedule all 4 shifter combinations. ({left low, left high} x {right low, right high}).

Practically speaking, gain scheduling means picking a different set of gains at different points in the state space. It's harder to guarantee stability mathematically, so I like to avoid it if possible, or constrain its use such that it's driven by something like gear ratio that doesn't have as much interaction with the loop.
Reply With Quote
  #11   Spotlight this post!  
Unread 10-02-2017, 12:04 AM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,606
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Tuning a PIDF follower on a robot with high gearing

Quote:
Originally Posted by Oblarg View Post
Well, our current plan is to attempt to better-account for the effect of friction by, rather than computing Kv from a single data point (measured max speed), run the robot at a variety of voltages, measure steady-state speed at each, and perform a linear regression. The reciprocal of the slope will become Kv, and the negation of the intercept will become a constant "friction compensation term" that we will add to all of our velocity setpoints. This should, in theory, accurately account for any frictional effect that is itself linear with velocity (and a glance at the residuals from the regression should give us some insight into the degree to which it is nonlinear).

We will document how well this works, and probably write a short whitepaper on it. Hopefully, it will go some ways towards allowing us to have a single Ka gain work reasonably well over a wider range of accelerations.
Sorry to semi-necro the thread, but we just ran the velocity-versus-voltage tests and it turns out that the behavior is linear as heck:



So, our proposed fix should work - I will report back next weekend when we've finished testing it.

This also suggests that our feedforwards, in general, should include an intercept to help account for friction. It would be nice if both WPILib and CTRE would support this - I have sent an email to the latter requesting it.

Edit: If anyone is wondering, the intercept there is approximately -1.55 ft/sec, which corresponds to an output voltage of ~1.24 volts, which in turn corresponds to a torque of about .75 Nm per side of the drive. It would be interesting to see how closely this matches the actual "torque required to move the wheels of the robot at rest" as measured directly with a torque wrench or whatever. Something to put on our list, I suppose.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016

Last edited by Oblarg : 10-02-2017 at 12:34 AM.
Reply With Quote
  #12   Spotlight this post!  
Unread 10-02-2017, 02:02 AM
dardeshna's Avatar
dardeshna dardeshna is online now
Team Captain
AKA: Devin Ardeshna
FRC #0008 (Paly Robotics | Team 8)
Team Role: Mechanical
 
Join Date: Dec 2015
Rookie Year: 2015
Location: Palo Alto
Posts: 114
dardeshna is a name known to alldardeshna is a name known to alldardeshna is a name known to alldardeshna is a name known to alldardeshna is a name known to alldardeshna is a name known to all
Re: Tuning a PIDF follower on a robot with high gearing

Quote:
Originally Posted by Oblarg View Post
Sorry to semi-necro the thread, but we just ran the velocity-versus-voltage tests and it turns out that the behavior is linear as heck:



So, our proposed fix should work - I will report back next weekend when we've finished testing it.

This also suggests that our feedforwards, in general, should include an intercept to help account for friction. It would be nice if both WPILib and CTRE would support this - I have sent an email to the latter requesting it.

Edit: If anyone is wondering, the intercept there is approximately -1.55 ft/sec, which corresponds to an output voltage of ~1.24 volts, which in turn corresponds to a torque of about .75 Nm per side of the drive. It would be interesting to see how closely this matches the actual "torque required to move the wheels of the robot at rest" as measured directly with a torque wrench or whatever. Something to put on our list, I suppose.
Interesting. We will try something similar on our bot and report results.
__________________
Devin Ardeshna
Team Captain (Paly Robotics FRC #8)


2017 Ventura Regional Quarterfinalist, Entrepreneurship Award, and Creativity Award, Silicon Valley Regional Finalist, Entrepreneurship Award, and Wildcard, Roebling Division Semifinalist, Chezy Champs Quarterfinalist, Capital City Classic Semifinalist
2016 Central Valley Regional Finalist and Wildcard, Silicon Valley Regional Quarterfinalist, Curie Division, CalGames Quarterfinalist and Entrepreneurship Award, Capital City Classic Quarterfinalist
2015 Central Valley Regional Entrepreneurship Award, Silicon Valley Regional Entrepreneurship Award, Capital City Classic Semifinalist and Judges' Award
Reply With Quote
  #13   Spotlight this post!  
Unread 10-02-2017, 10:40 PM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,606
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Tuning a PIDF follower on a robot with high gearing

Quote:
Originally Posted by GeeTwo View Post
The biggest reason is the carpet. Almost any surface pair will have a larger coefficient of static friction than of dynamic friction due to developing bonds between the two surfaces. In the case of carpet, it deforms relatively slowly and rebounds inelastically, so the net friction rises as speeds decrease. I suspect that carpet fibers also work their way into any crevices in the wheels over time, furthering this effect.
So, I did a bit more investigation today, and it appears that the net friction does indeed decrease as velocity increases, however this decrease appears to be very nearly linear (as can be inferred from the near-perfect linearity of the earlier plot).

To be more specific, assuming the CIM specs used in the WCP drivetrain calculator are correct, the voltage required to overcome frictional losses on our practice bot drops from ~1.2V at velocities near 0, to ~.8V at velocities near max speed.

I will report back on how well our calculated "1.2V" figure corresponds to the actual torque required to move the wheels of the robot at rest once I get my hands on a torque wrench. Unfortunately, I can't think of any way to directly measure this value at speed, so I'm not sure how to test if this decrease is actually a decrease in the friction forces, or rather is simply a result of the CIM specs not being quite right. If anyone has a clever idea for this, let me know. The good news is, well, it really doesn't matter, pragmatically, which it is - since everything appears to be linear, we can easily just roll everything into the feedforward regardless of where it comes from.

It will be interesting to test this on other robots, and see if we obtain similar results.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016
Reply With Quote
  #14   Spotlight this post!  
Unread 10-02-2017, 11:04 PM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
in hibernation
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,302
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Tuning a PIDF follower on a robot with high gearing

Velocity is very linear except very close to the zero point (with the current generation of speed controllers). Acceleration vs. voltage is often not as nice due to friction, battery voltage sag, inductance, etc.

Last edited by Jared Russell : 10-02-2017 at 11:14 PM.
Reply With Quote
  #15   Spotlight this post!  
Unread 10-02-2017, 11:11 PM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,606
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Tuning a PIDF follower on a robot with high gearing

Quote:
Originally Posted by Jared Russell View Post
If you want to be a bit more accurate, you can compute a feed forward acceleration term for your profile that takes this into account, and apply a gain to that instead.
Assuming that you're tracking your profiles well enough that actual speed is sufficiently close to desired speed at any given point in time, then wouldn't a feedforward structure of "intercept + Kv*velocity setpoint + Ka*acceleration setpoint" properly account for this? Unless I fundamentally misunderstand brushed DC motors, torque depends only on the difference between applied voltage and back-EMF. The "intercept + Kv*vel" portion of the FF should account for back-EMF plus the voltage required to overcome frictional forces, leaving the "Ka*acc" term to account (hopefully correctly) for your desired acceleration on top of that.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016

Last edited by Oblarg : 10-02-2017 at 11:15 PM.
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 05:11 PM.

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


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