Go to Post Ok guys. What is this? Make Brandon work day? - Brandon Martus [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-03-2016, 00:43
tomer tomer is offline
Registered User
FRC #4590 (GreenBlitz)
Team Role: CAD
 
Join Date: Nov 2015
Rookie Year: 2014
Location: Israel
Posts: 16
tomer is an unknown quantity at this point
High Frequency C++ control loops & Feed Forward

Hey!

We are in the process of trying adding feed forward to our control loop for the FIRST time this year and would ask for your kind assistance.

How do you normally calculate motion profile for feed forward? How do you calibrate Kf? What about using feed forward with the TalonSRX?

Currently interesting cases are: Fly wheel control, chassis simple turn / drive distance.

Also, how can we run our PIDF loops at higher frequency then base command based robot frequency? (we program in c++ and would appreciate examples if relevant)

Many thanks and good luck to all!
  #2   Spotlight this post!  
Unread 05-03-2016, 09:14
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: High Frequency C++ control loops & Feed Forward

Quote:
Originally Posted by tomer View Post
How do you normally calculate motion profile for feed forward?
This works quite well.

Quote:
How do you calibrate Kf?
Kf is there to convert velocity to motor command. You can derive it from first principles, or you can measure it.

Quote:
What about using feed forward with the TalonSRX?
Read paragraph 12.4 of the Talon SRX Software Reference Manual, available for download on the manufacturer's website.




Last edited by Ether : 05-03-2016 at 09:28.
  #3   Spotlight this post!  
Unread 05-03-2016, 22:48
tomer tomer is offline
Registered User
FRC #4590 (GreenBlitz)
Team Role: CAD
 
Join Date: Nov 2015
Rookie Year: 2014
Location: Israel
Posts: 16
tomer is an unknown quantity at this point
Re: High Frequency C++ control loops & Feed Forward

How about motion profiles for velocity closed loop? I saw that I can calibraet Kf for the talonSRX but I couldn't understand how does the constant translate to output.

Do you know how can I run high frequency PID loops in c++?

Thanks!
  #4   Spotlight this post!  
Unread 05-03-2016, 23:13
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: High Frequency C++ control loops & Feed Forward

Quote:
Originally Posted by tomer View Post
How about motion profiles for velocity closed loop?
Why do you think you need motion profile to control the speed of your flywheel? Most teams using the SRX built-in PIDF for that application just use simple setpoint commands. If you are concerned about high current draw at initial spinup, just use the voltage ramping or closed-loop rate control of the SRX PIDF.


Quote:
Do you know how can I run high frequency PID loops in c++?
How high is "high frequency" in this context? The PIDF in the SRX runs at 1KHz.

Quote:
...drive distance...
You can use motion profile for that. Use v(t) from the profile as your feedforward input, and x(t) as your setpoint input. i.e. closed-loop position control with velocity feedforward.




Last edited by Ether : 05-03-2016 at 23:17.
Closed Thread


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 00:38.

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