OCCRA
Go to Post I hope I can do something as awesome as Curiosity when I'm older.. - rachelholladay [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 01-23-2018, 11:03 PM
b.lou's Avatar
b.lou b.lou is offline
Registered User
AKA: Brandon
FRC #4159 (CardinalBotics)
Team Role: Programmer
 
Join Date: Apr 2016
Rookie Year: 2015
Location: San Francisco
Posts: 2
b.lou is an unknown quantity at this point
Question on Feed Forward Gains

My team has been trying to implement velocity closed loop control by following the Talon SRX Software Reference Manual (Section 12.4) found here. First off, what does the feed forward gain actually do? Why do we need it? And what we're most confused about is where does the number 1023 come from when calculating the f-gain?

Any help would be greatly appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 01-23-2018, 11:18 PM
skor skor is offline
Registered User
AKA: Sam k
FRC #1339 (Angelbotics)
Team Role: Programmer
 
Join Date: Mar 2017
Rookie Year: 2016
Location: Denver, Colorado
Posts: 3
skor is an unknown quantity at this point
Re: Question on Feed Forward Gains

In my understanding, the feedforward part of PIDF is an approximation of what speed you think the robot should be at. It is recommended to set the feedforward constant to 1 divided by the maximum velocity of the robot, so that, for example, if I wanted the robot to travel half of the maximum speed, the velocity * the feedforward value would yield 1/2. ((Maximum velocity / 2) * (1 / maximum velocity))

On the talon srx, the motor values are set between -1023 and 1023 which is where that number comes from. In other words, using my previous example, half speed would be a motor output of 511.5 (0.5 * 1023).

Feedforward is very useful because it allows the PID loop to not have to do as much work. Since the velocity is already close to what you want it to be because of the feedforward, the PID loop only has to account for small error between the approximated velocity and your actual desired velocity.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-24-2018, 02:08 AM
dardeshna's Avatar
dardeshna dardeshna is offline
Alumnus
AKA: Devin Ardeshna
FRC #0008 (Paly Robotics | Team 8)
Team Role: Mechanical
 
Join Date: Dec 2015
Rookie Year: 2015
Location: Palo Alto
Posts: 172
dardeshna is a splendid one to beholddardeshna is a splendid one to beholddardeshna is a splendid one to beholddardeshna is a splendid one to beholddardeshna is a splendid one to beholddardeshna is a splendid one to beholddardeshna is a splendid one to behold
Re: Question on Feed Forward Gains

In an ideal brushed DC motor, there’s a direct relationship between applied voltage and rotor speed. You give the motor 0V and it doesn’t spin, 6V and it spins at half speed, 12V and it spins at full speed.

Now, this makes control really simple in theory. You just need to multiply your goal velocity by some constant (F) and you’ll get the voltage that needs to be applied to the motor. This is the purpose of feed-forward.

Unfortunately, the real world has things like friction, wheel slip, wire resistance, etc. To account for deviations from the goal, a PID loop will take sensor input and boost or lower the applied voltage to the motor accordingly.
__________________
Devin Ardeshna
Alumnus (Paly Robotics FRC #8)


2018 (FRC #8 - Team Captain) Arizona North Regional Quarterfinalist and Entrepreneurship Award, Silicon Valley Regional Semifinalist
2017 (FRC #8 - Build Captain) 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 (FRC #8 - Safety Captain) Central Valley Regional Finalist and Wildcard, Silicon Valley Regional Quarterfinalist, Curie Division, CalGames Quarterfinalist and Entrepreneurship Award, Capital City Classic Quarterfinalist
2015 (FRC #8 - Student) Central Valley Regional Entrepreneurship Award, Silicon Valley Regional Entrepreneurship Award, Capital City Classic Semifinalist and Judges' Award
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 06:31 AM.

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