Go to Post Yellow bananas are the new red herrings. - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 02-23-2016, 12:17 PM
tedlasai tedlasai is offline
Registered User
FRC #2996
 
Join Date: Feb 2016
Location: Colorado Springs
Posts: 7
tedlasai is an unknown quantity at this point
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
  #2   Spotlight this post!  
Unread 02-23-2016, 12:37 PM
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
  #3   Spotlight this post!  
Unread 02-23-2016, 02:07 PM
tedlasai tedlasai is offline
Registered User
FRC #2996
 
Join Date: Feb 2016
Location: Colorado Springs
Posts: 7
tedlasai is an unknown quantity at this point
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.
  #4   Spotlight this post!  
Unread 02-23-2016, 02:08 PM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,069
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
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.
  #5   Spotlight this post!  
Unread 02-23-2016, 04:50 PM
tr6scott's Avatar
tr6scott tr6scott is offline
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 505
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: Talon SRX PID tuning

Also there github is very helpful with actual code.
https://github.com/CrossTheRoadElec/...0Closed%20Loop
__________________
The sooner we get behind schedule, the more time we have to catch up.

  #6   Spotlight this post!  
Unread 02-23-2016, 05:08 PM
kevin.li.rit's Avatar
kevin.li.rit kevin.li.rit is offline
Imaginary Friend
AKA: Kevin Li
FRC #0596 (SciClones)
Team Role: Student
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Hopkinton, Massachusetts
Posts: 936
kevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond repute
Send a message via Yahoo to kevin.li.rit
Re: Talon SRX PID tuning

This may also be useful

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

596 - Sciclones
1405 - Finney Falcons
2262 - Holliston Panthers
  #7   Spotlight this post!  
Unread 02-23-2016, 05:16 PM
tr6scott's Avatar
tr6scott tr6scott is offline
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 505
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
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.
__________________
The sooner we get behind schedule, the more time we have to catch up.

  #8   Spotlight this post!  
Unread 02-29-2016, 10:12 PM
pipsqueaker pipsqueaker is offline
Registered User
FRC #1124
 
Join Date: Apr 2013
Location: Avon
Posts: 51
pipsqueaker is a name known to allpipsqueaker is a name known to allpipsqueaker is a name known to allpipsqueaker is a name known to allpipsqueaker is a name known to allpipsqueaker is a name known to all
Re: Talon SRX PID tuning

Quote:
Originally Posted by tedlasai View Post
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
  #9   Spotlight this post!  
Unread 02-29-2016, 10:14 PM
cjl2625's Avatar
cjl2625 cjl2625 is offline
apel py
AKA: Cory Lynch
FRC #2067 (Apple Pi)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Guilford, CT
Posts: 412
cjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to behold
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.
__________________
Head Programmer / Driver
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 05:26 AM.

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