Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Talon SRX PID tuning (http://www.chiefdelphi.com/forums/showthread.php?t=144512)

tedlasai 02-23-2016 12:17 PM

Talon SRX PID tuning
 
I am working two shooter motors that are used to throw the ball out. One of the shooters motors has perfect PID values at P=5 I =0.01 D =2. We have tried these values on the other motor but it shoots up very fast. The values we were playing with last night gave us p=4 i =0 d=2. This produced a steady oscillation under the target. However, when we increased the i to match the target line it just shot of. Any amount of I caused the motor to shoot off really fast. We are setting the i small at the beginning like values of 0.01 or 0.001. Is there an explanation for this?

Sai

Alan Anderson 02-23-2016 12:37 PM

Re: Talon SRX PID tuning
 
Do you want the motors to run at the same speed? If so, you can set one of the Talons to be a "slave" to the other as a "master", and run the closed-loop control on only the master. This assumes that you're controlling them over CAN.

tedlasai 02-23-2016 02:07 PM

Re: Talon SRX PID tuning
 
No, they will have to run at different speeds. Do you have an idea of why the Integral gain of 0.01 or 0.001 causes the speed of the motor to accelerate like crazy.

Jared Russell 02-23-2016 02:08 PM

Re: Talon SRX PID tuning
 
Read the Talon SRX Software Reference Manual very closely so that you understand what exactly each of your gains does.

In particular, there is a very useful example in this document to help tune velocity PID loops.

tr6scott 02-23-2016 04:50 PM

Re: Talon SRX PID tuning
 
Also there github is very helpful with actual code.
https://github.com/CrossTheRoadElec/...0Closed%20Loop

kevin.li.rit 02-23-2016 05:08 PM

Re: Talon SRX PID tuning
 
This may also be useful

http://www.chiefdelphi.com/forums/sh...ight=Bang+bang

tr6scott 02-23-2016 05:16 PM

Re: Talon SRX PID tuning
 
Also read up on the SRX "IZone", sounds like you could use that feature to limit the I accumulated when out of zone.

I had a tough time with getting the SRX units straight. It is all in the manual, but I'm and engineer, and I don't read manuals.

OMAR has spent a good amount of time getting all of the options documented, and giving good examples. We shoot at 9000 rpm, and the control on the SRX is simply unbelievable is a sub $100 controller.

pipsqueaker 02-29-2016 10:12 PM

Re: Talon SRX PID tuning
 
Quote:

Originally Posted by tedlasai (Post 1545164)
No, they will have to run at different speeds. Do you have an idea of why the Integral gain of 0.01 or 0.001 causes the speed of the motor to accelerate like crazy.

Rate PIDs are a little weird- you actually only tune I and P. You can think of the reasoning as "I'm tuning for the derivative of position, so all the constants act as if they were derived: in a rate PID, I acts like P, P acts like D, and the D value is, afaik useless

cjl2625 02-29-2016 10:14 PM

Re: Talon SRX PID tuning
 
I'd recommend using the feedforward (F gain) in the talon's PID. You can read about it in the talon documentation.

With that, I've been able to get very solid shooter wheel velocity control with just P and F -- no integral or derivative.


All times are GMT -5. The time now is 05:25 AM.

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