Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   High Frequency C++ control loops & Feed Forward (http://www.chiefdelphi.com/forums/showthread.php?t=145195)

tomer 05-03-2016 00:43

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!

Ether 05-03-2016 09:14

Re: High Frequency C++ control loops & Feed Forward
 
Quote:

Originally Posted by tomer (Post 1551549)
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.




tomer 05-03-2016 22:48

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!

Ether 05-03-2016 23:13

Re: High Frequency C++ control loops & Feed Forward
 
Quote:

Originally Posted by tomer (Post 1551903)
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.





All times are GMT -5. The time now is 00:38.

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