Go to Post Along with having good manners, having good judgement goes a long way in life. - ebarker [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 16-12-2016, 10:50
sraque's Avatar
sraque sraque is offline
Registered User
AKA: Steve Raque
FRC #2614 (MARS)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2009
Location: Morgantown, WV
Posts: 79
sraque is on a distinguished road
Feed-forward coefficient for motion-constrained system

I am interested in techniques used to calculate the F coefficient when you have a system you can't run at full speed or constant speed for very long (like you can a drive system). An arm or a lift system, for example. I have ideas, but I wanted to get inputs from those who have done it before so I'm not re-invent the wheel.
Reply With Quote
  #2   Spotlight this post!  
Unread 16-12-2016, 11:51
Ari423's Avatar
Ari423 Ari423 is offline
LabVIEW aficionado and robot addict
AKA: The guy with the yellow hat
FRC #5987 (Galaxia)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2012
Location: Haifa, Israel
Posts: 483
Ari423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant future
Re: Feed-forward coefficient for motion-constrained system

I'm by no means an expert on PID, but from my experience and from what I've seen on CD usually FRC teams only use a F coefficient for velocity loops, not position loops. I'm sure someone from 971 or 254 can give you a better answer that covers exactly when you want to use one, but that's the general pattern that I've seen around these parts.
__________________
2017-present: Mentor FRC 5987
2017-present: CSA for FIRST in Israel
2012-2016: Member FRC 423
2013: Programmer
2014: Head Programmer, Wiring
2015: Head Programmer, Wiring
2016: Captain, Head Programmer, Wiring, Manipulator, Chassis, CAD, Business, Outreach (basically everything)


Reply With Quote
  #3   Spotlight this post!  
Unread 16-12-2016, 12:03
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
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,064
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: Feed-forward coefficient for motion-constrained system

A feedforward gain is useful if you are doing velocity control, motion profiling, or compensating for some known external force (e.g. gravity). The latter two applications are applicable to an arm or elevator system.

While a constant velocity test is the simplest way to calculate this gain, it isn't the only way. The first step is an initial guess. This is usually pretty easy...All you need to do is figure out the free speed of your mechanism by looking at your motor specs and effective gear ratio (and compensating for efficiency losses if you want). Kf = Full power / free speed. Once you have this guess, come up with a couple reference motion profiles to test and use a controller to follow them using *only* feedforward gain. This won't be precise or robust of course, but it should give you a way to figure out if you require more or less. Iteratively tune your feedforward gain until you are tracking various profiles closely. Remember, it doesn't have to be perfect...That's why we use feedback.
Reply With Quote
  #4   Spotlight this post!  
Unread 16-12-2016, 12:54
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 515
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: Feed-forward coefficient for motion-constrained system

When the range is limited, I like to manual throttle the mechanism (arm) up and down while plotting both throttle(motor-output) and sensor velocity. The first guess for fgain is then just me ball parking the ratio between the two from the plot. Also it's cool way to watch the sensor work.

If I remember right, your team uses LabVIEW, so throwing in a plot in the relevent VI should be pretty quick if you wanted to try this out.
Reply With Quote
  #5   Spotlight this post!  
Unread 16-12-2016, 17:41
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,334
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Feed-forward coefficient for motion-constrained system

Quote:
Originally Posted by Jared Russell View Post
A feedforward gain is useful if you are doing velocity control, motion profiling, or compensating for some known external force (e.g. gravity). The latter two applications are applicable to an arm or elevator system.

While a constant velocity test is the simplest way to calculate this gain, it isn't the only way. The first step is an initial guess. This is usually pretty easy...All you need to do is figure out the free speed of your mechanism by looking at your motor specs and effective gear ratio (and compensating for efficiency losses if you want). Kf = Full power / free speed. Once you have this guess, come up with a couple reference motion profiles to test and use a controller to follow them using *only* feedforward gain. This won't be precise or robust of course, but it should give you a way to figure out if you require more or less. Iteratively tune your feedforward gain until you are tracking various profiles closely. Remember, it doesn't have to be perfect...That's why we use feedback.
Thanks for the pointer Jared!
I was trying to remember where I had seen that information before so I could translate it into something I had a good grasp on.Then I remembered where, in the Software Guide for the Talon SRX. Here is a quote of the actual text from section 12.4.2 (for Java) on page 76.

Quote:
12.4.2. Velocity Closed-Loop Walkthrough – Calculating Feed Forward– Java

Now that we’ve confirmed that the position/speed moves in the positive direction with forward

(green throttle), we can calculate our Feed-forward gain. According to Section 17.2.1, our

selected sensor uses 4096 native units per rotation. That means our measurement of 1366RPM

scales to 9326 native units per 100ms. This is also calculated for you in the Self-Test.

Velocity is measured in change in native units per TvelMeas= 100ms.

(1366 Rotations / min) X (1 min / 60 sec) X (1 sec / 10 TvelMeas) X (4096 native units / rotation)

= 9326 native units per 100ms

Now let’s calculate a Feed-forward gain so that 100% motor output is calculated when the

requested speed is 9328 native units per 100ms.

F-gain = (100% X 1023) / 9326

F-gain = 0.1097
I also wondered where the "1023" came from and then I realized it is the resolution of step in the drive signal.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #6   Spotlight this post!  
Unread 17-12-2016, 01:51
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: 800
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: Feed-forward coefficient for motion-constrained system

Quote:
Originally Posted by Jared Russell View Post
While a constant velocity test is the simplest way to calculate this gain, it isn't the only way. The first step is an initial guess. This is usually pretty easy...All you need to do is figure out the free speed of your mechanism by looking at your motor specs and effective gear ratio (and compensating for efficiency losses if you want). Kf = Full power / free speed. Once you have this guess, come up with a couple reference motion profiles to test and use a controller to follow them using *only* feedforward gain. This won't be precise or robust of course, but it should give you a way to figure out if you require more or less. Iteratively tune your feedforward gain until you are tracking various profiles closely. Remember, it doesn't have to be perfect...That's why we use feedback.
When you are doing this tuning with the feedback off, make sure to do some short and long moves, especially on systems (like drivetrains) with lots of friction or other nonlinearities. You want to make sure you aren't over-fitting some specific motion. I worry more about making sure the shape of the acceleration is correct than making sure it matches perfectly.

It is possible to do the entire feed-forwards tuning and calculation from models, but that takes more math. That's how we did all the feed-forwards this year, and it worked really well.
Reply With Quote
  #7   Spotlight this post!  
Unread 17-12-2016, 08:32
sraque's Avatar
sraque sraque is offline
Registered User
AKA: Steve Raque
FRC #2614 (MARS)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2009
Location: Morgantown, WV
Posts: 79
sraque is on a distinguished road
Re: Feed-forward coefficient for motion-constrained system

Thanks to all. Just the kind of input I was hoping for. Very useful. We'll be working this next week at practice.
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 04:52.

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