Go to Post Congratulations to team 341, your work is nothing short of what I want to do when I grow up. - kjolana1124 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 14-01-2016, 23:44
MrNick's Avatar
MrNick MrNick is offline
Registered User
FRC #0088 (TJ^2)
Team Role: Mentor
 
Join Date: Apr 2015
Rookie Year: 2014
Location: Bridgewater, MA
Posts: 8
MrNick is an unknown quantity at this point
Re: Implementing Feedforward/Feedback Motion Profile with Talon SRX

I just discovered the TalonSRX's have new support for motion profiling. That is very cool! Thanks for posting this...it should be a great help as we figure out how to do this in java.
Reply With Quote
  #2   Spotlight this post!  
Unread 15-01-2016, 10:29
jojoguy10's Avatar
jojoguy10 jojoguy10 is offline
Programming/Controls Mentor
AKA: Joe Kelly
FRC #0997 (Spartan Robotics) and FRC #2990 (Hotwire Robotics)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Stayton, OR
Posts: 279
jojoguy10 is a glorious beacon of lightjojoguy10 is a glorious beacon of lightjojoguy10 is a glorious beacon of lightjojoguy10 is a glorious beacon of lightjojoguy10 is a glorious beacon of light
Re: Implementing Feedforward/Feedback Motion Profile with Talon SRX

This is a great paper (you should upload it to the white papers section of CD as well)! I do have one question after reading through it: On page 3, you explain the F gain value and how it's related to the Talon's measured throttle. You say that "For the left side of the robot at full throttle, the Talon SRX reported a speed of 1210" but I don't see 1210 anywhere in the image. It sounds like you logged the data to a file and grabbed from that. Can you explain where you got 1210 for the throttle? Is it the "Velocity" measurement in the image? If so, was the velocity still positive 1210?

Thanks!
__________________



Last edited by jojoguy10 : 15-01-2016 at 10:29. Reason: formatting fix
Reply With Quote
  #3   Spotlight this post!  
Unread 15-01-2016, 11:10
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: Implementing Feedforward/Feedback Motion Profile with Talon SRX

Quote:
Originally Posted by MrNick View Post
I just discovered the TalonSRX's have new support for motion profiling. That is very cool! Thanks for posting this...it should be a great help as we figure out how to do this in java.
You're welcome. Just to be clear, my paper does not cover the "buffered" motion profile capability of the Talon SRX. We did not get a chance to try that before releasing this paper, although Omar from CTRE did provide the essential parts of an example during the latter part of Beta testing. I know he plans to have a separate user manual for that feature soon.

Quote:
Originally Posted by jojoguy10 View Post
Can you explain where you got 1210 for the throttle? Is it the "Velocity" measurement in the image? If so, was the velocity still positive 1210?

Thanks!
In our case, we did log data to a file. Time-stamp, throttle value, and speed as measured by the Talon SRX. I wanted to see how everything behaved. I took the image for illustration when I was building the document. The easiest way for you to get that value is to drive at full speed and then refresh the web page. If you don't have the room to do all that at once, you can grab the logging VIs from our Marvin T code post or build your own.

There is one error in that document that I need to fix and repost. I said to take the cycles per rev from the spec sheet and multiply by 4. This is not correct. The help screen in labview for the configuration VI is confusing. It says:

"Allows setting the Counts Per Rotation of the Talon SRX's connected quadrature encoder. This is also referred to as the 'Number Encoder Lines', 'Counts Per Revolution', and 'Cycles Per Revolution'."

It turns out that the number you send to the config should be Cycles Per Revolution (128 for my Grayhill encoder). The Talon SRX multiplies it by 4. To me, this help text includes contradictory terms. Cycles do not equal counts or lines.

Now, you would rightly say "Dang didn't he notice a 4 to 1 error?" Well, unknown to me at the time, the encoder in our gearbox is not on the wheel shaft. It has a 4.14:1 ration with the wheel. Divide by 4 and multiply by 4.41 and you don't notice much :-) So in the end, my number ended up being 565 fed into the Config VI. Beware a shifting transmission! This ratio will probably change with gear shifts, but you can just change it on the fly in code depending on the status of the shifter.

The end performance of this approach is striking. Tuning the PID gains was really easy (just as the Poofs claimed in their presentation). Very tolerant of values (you see my round numbers..no fine tuning needed). This controls our wheels to within a tenth of a rotation or less every single time.
Reply With Quote
  #4   Spotlight this post!  
Unread 19-01-2016, 23:02
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: 516
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: Implementing Feedforward/Feedback Motion Profile with Talon SRX

Talon SRX Motion Profile Reference Manual is now available at...
http://www.ctr-electronics.com/talon...ical_resources
Reply With Quote
  #5   Spotlight this post!  
Unread 13-02-2016, 10:16
Tparbotmail Tparbotmail is offline
Registered User
FRC #3944
 
Join Date: Jan 2015
Location: Az
Posts: 65
Tparbotmail is an unknown quantity at this point
Re: Implementing Feedforward/Feedback Motion Profile with Talon SRX

Quote:
Originally Posted by sraque View Post
You're welcome. Just to be clear, my paper does not cover the "buffered" motion profile capability of the Talon SRX. We did not get a chance to try that before releasing this paper, although Omar from CTRE did provide the essential parts of an example during the latter part of Beta testing. I know he plans to have a separate user manual for that feature soon.



In our case, we did log data to a file. Time-stamp, throttle value, and speed as measured by the Talon SRX. I wanted to see how everything behaved. I took the image for illustration when I was building the document. The easiest way for you to get that value is to drive at full speed and then refresh the web page. If you don't have the room to do all that at once, you can grab the logging VIs from our Marvin T code post or build your own.

There is one error in that document that I need to fix and repost. I said to take the cycles per rev from the spec sheet and multiply by 4. This is not correct. The help screen in labview for the configuration VI is confusing. It says:

"Allows setting the Counts Per Rotation of the Talon SRX's connected quadrature encoder. This is also referred to as the 'Number Encoder Lines', 'Counts Per Revolution', and 'Cycles Per Revolution'."

It turns out that the number you send to the config should be Cycles Per Revolution (128 for my Grayhill encoder). The Talon SRX multiplies it by 4. To me, this help text includes contradictory terms. Cycles do not equal counts or lines.

Now, you would rightly say "Dang didn't he notice a 4 to 1 error?" Well, unknown to me at the time, the encoder in our gearbox is not on the wheel shaft. It has a 4.14:1 ration with the wheel. Divide by 4 and multiply by 4.41 and you don't notice much :-) So in the end, my number ended up being 565 fed into the Config VI. Beware a shifting transmission! This ratio will probably change with gear shifts, but you can just change it on the fly in code depending on the status of the shifter.

The end performance of this approach is striking. Tuning the PID gains was really easy (just as the Poofs claimed in their presentation). Very tolerant of values (you see my round numbers..no fine tuning needed). This controls our wheels to within a tenth of a rotation or less every single time.
Hi Steve
How did you get that .97 throttle value for the right side? Having trouble understanding.
Reply With Quote
  #6   Spotlight this post!  
Unread 14-02-2016, 09:00
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: Implementing Feedforward/Feedback Motion Profile with Talon SRX

Quote:
Originally Posted by Tparbotmail View Post
Hi Steve
How did you get that .97 throttle value for the right side? Having trouble understanding.
We have a VI in Periodic Tasks that logs data to a file. We logged throttle setting and speed as reported from the Talon SRX status VI. We drove the robot at full speed (joystick full forward) down a hallway keeping it straight as much as we could, and then looked at the data log. We looked for areas of data where throttle and speed were close to constant and close to maximum and then took those as the data pairs. Since motors behave differently going forwards or backwards, it is typical that for driving straight, one side will be at a higher throttle than the other.

The important part is to get a relationship between throttle and speed. The process assumes the relationship is linear, and with today's speed controllers that is true. So, theoretically, you could pick your data pair anywhere along the line. Choosing a point near maximum throttle, however, will reduce your error resulting from variations that happen during the measurement process.
Reply With Quote
  #7   Spotlight this post!  
Unread 14-02-2016, 10:14
Tparbotmail Tparbotmail is offline
Registered User
FRC #3944
 
Join Date: Jan 2015
Location: Az
Posts: 65
Tparbotmail is an unknown quantity at this point
Re: Implementing Feedforward/Feedback Motion Profile with Talon SRX

Steve
Thank you for taking the time to reply.
Reply With Quote
  #8   Spotlight this post!  
Unread 23-02-2016, 12:31
kdavidson kdavidson is offline
Registered User
AKA: Ken Davidson
FRC #0173 (RAGE)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2007
Location: Tolland, CT
Posts: 13
kdavidson is an unknown quantity at this point
Re: Implementing Feedforward/Feedback Motion Profile with Talon SRX

Can you tell me where the white papers section of CD is located? I can't for the life of me find it. I'm sure it's in plain sight. Thanks.

Ken
Reply With Quote
  #9   Spotlight this post!  
Unread 23-02-2016, 12:33
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,995
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: Implementing Feedforward/Feedback Motion Profile with Talon SRX

Quote:
Originally Posted by kdavidson View Post
Can you tell me where the white papers section of CD is located? I can't for the life of me find it. I'm sure it's in plain sight. Thanks.

Ken
CD Media link at the top of the page.


Attached Thumbnails
Click image for larger version

Name:	CD Media.jpg
Views:	26
Size:	87.8 KB
ID:	20164  
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 20:47.

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