Go to Post IRI seeks to invite the very best robots to play the FIRST game, achieving the highest level of play, while keeping in place the FIRST atmosphere. - Nathan Streeter [more]
Home
Go Back   Chief Delphi > Technical > Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 10-02-2013, 17:34
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,063
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
bang-bang control with Talon


I'd like to know of any teams which have successfully used Talon motor controller for shooter-wheel bang-bang speed control. Thanks.


Reply With Quote
  #2   Spotlight this post!  
Unread 10-02-2013, 19:40
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: bang-bang control with Talon

We did it. But it's not going to be on our competition robot.

We put a strip chart on the Dashboard to display the RPM as measured by the encoder. Our programming students decided they weren't satisfied by the amount of overshoot it showed, and implemented a simple PID controller. A few minutes of tuning later (plus some tweaking of the algorithm to limit integral windup), it works great.

The continual loud snaps and clicks from the gearbox when using bang-bang were rather disturbing to most people hearing them. The simple PID sounds smooth as silk, appears to bring the motor up to speed just as fast, and recovers quickly from a brief additional load without problem.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-02-2013, 19:46
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,063
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: bang-bang control with Talon

Quote:
Originally Posted by Alan Anderson View Post
The continual loud snaps and clicks from the gearbox when using bang-bang were rather disturbing to most people hearing them.
Did you get the same disconcerting results with a Victor?


Reply With Quote
  #4   Spotlight this post!  
Unread 10-02-2013, 19:56
AdamHeard's Avatar
AdamHeard AdamHeard is offline
Lead Mentor
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Atascadero
Posts: 5,503
AdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond repute
Send a message via AIM to AdamHeard
Re: bang-bang control with Talon

Quote:
Originally Posted by Alan Anderson View Post
We did it. But it's not going to be on our competition robot.

We put a strip chart on the Dashboard to display the RPM as measured by the encoder. Our programming students decided they weren't satisfied by the amount of overshoot it showed, and implemented a simple PID controller. A few minutes of tuning later (plus some tweaking of the algorithm to limit integral windup), it works great.

The continual loud snaps and clicks from the gearbox when using bang-bang were rather disturbing to most people hearing them. The simple PID sounds smooth as silk, appears to bring the motor up to speed just as fast, and recovers quickly from a brief additional load without problem.
Very impressive it the performance is truly comparable.
Are you doing PID on velocity itself?
Is it output = PID, or output += PID?
Are you using all three terms?
Are you limiting the motor to never allow a negative power applied?
Reply With Quote
  #5   Spotlight this post!  
Unread 10-02-2013, 20:34
z_beeblebrox's Avatar
z_beeblebrox z_beeblebrox is offline
Custom User Title
AKA: Cal
FRC #4183 (Bit Buckets)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Cambridge MA
Posts: 811
z_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond repute
Re: bang-bang control with Talon

We did on our prototype shooter. We had no problems direct driving AM pneumatic wheels with CIMS from the Talons.

The final robot uses Victors for controlling the shooter, as excellent linearity is not needed for bang-bang control.
__________________
2012 Utah Regional Rookie All-Star
2013 Phoenix Regional Judge's Award for "design process and prototyping"
2014 Hub City Regional Quality Award, Arizona Regional Excellence in Engineering Award
2015 Arizona East Regional Creativity Award, Winner
2016 Arizona North Regional Finalist, Arizona West Excellence in Engineering Award, Finalist
Reply With Quote
  #6   Spotlight this post!  
Unread 10-02-2013, 20:48
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
Red face Re: bang-bang control with Talon

Quote:
Originally Posted by Ether View Post
Did you get the same disconcerting results with a Victor?
Oops.

The programming group is using a drivebase built out of the Kit chassis this year. Its drive wheels are controlled using Talons, and the actual robot has Talons installed for the shooter motors, and that's what I was thinking of when I answered the question.

However, the shooter test rig on the Kit 'bot was wired up using Victors. I'm sorry for the bad data.

Quote:
Originally Posted by AdamHeard View Post
Very impressive it the performance is truly comparable.
Are you doing PID on velocity itself?
Is it output = PID, or output += PID?
Are you using all three terms?
Are you limiting the motor to never allow a negative power applied?
Both the setpoint and process variables are in values of "kRPM".

After we discussed the fine points of position vs. velocity control, I believe the student doing the programming chose to send the output of the PID computation directly to the motor rather than doing a post-PID integration. I was busy with other tasks while he was tuning it, but I'm pretty sure the D constant ended up being zero, and the P constant is probably negligibly small. Most of it is I, as one would expect from a velocity PID.

The output is indeed limited to never apply power the motor in the "wrong" direction. There is a use case where the shooter motors must be run in reverse, so the control software keeps the output either positive or negative as appropriate, based on the polarity of the desired velocity.
Reply With Quote
  #7   Spotlight this post!  
Unread 12-03-2013, 22:21
xmaams xmaams is offline
Registered User
AKA: Sam Dietrich
FRC #2587 (Discobots)
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2012
Location: Houston
Posts: 12
xmaams will become famous soon enoughxmaams will become famous soon enough
Re: bang-bang control with Talon

We are using bang-bang control on Talons with two 4-7/8" wheels (I think).
We painted half the wheel white and used a light sensor to measure rpm. All of our shots went in at Lone Star when we positioned our robot correctly.
Reply With Quote
  #8   Spotlight this post!  
Unread 12-03-2013, 23:15
Woolly's Avatar
Woolly Woolly is offline
Programming Mentor
AKA: Dillon Woollums
FRC #1806 (S.W.A.T.)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Springfield, MO
Posts: 512
Woolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond repute
Re: bang-bang control with Talon

Quote:
Originally Posted by z_beeblebrox View Post
We did on our prototype shooter. We had no problems direct driving AM pneumatic wheels with CIMS from the Talons.

The final robot uses Victors for controlling the shooter, as excellent linearity is not needed for bang-bang control.
Would a spike relay have a snowball's chance of reacting quickly enough for a bang-bang controller?
__________________


Team 1806 Student: 2012-2013 | Mentor: 2013-Present
Reply With Quote
  #9   Spotlight this post!  
Unread 12-03-2013, 23:19
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,075
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: bang-bang control with Talon

Quote:
Originally Posted by Woolly View Post
Would a spike relay have a snowball's chance of reacting quickly enough for a bang-bang controller?
Even if it could, I wouldn't feel comfortable having it switch that fast. Remember, it's a mechanical relay. Something is actually moving in there.
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

Reply With Quote
  #10   Spotlight this post!  
Unread 12-03-2013, 23:28
Woolly's Avatar
Woolly Woolly is offline
Programming Mentor
AKA: Dillon Woollums
FRC #1806 (S.W.A.T.)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Springfield, MO
Posts: 512
Woolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond repute
Re: bang-bang control with Talon

Quote:
Originally Posted by cgmv123 View Post
Even if it could, I wouldn't feel comfortable having it switch that fast. Remember, it's a mechanical relay. Something is actually moving in there.
Well drat. There needs to be a tiny FRC-legal motor controller that does full-backward, stop, and full-forward only.
__________________


Team 1806 Student: 2012-2013 | Mentor: 2013-Present
Reply With Quote
  #11   Spotlight this post!  
Unread 13-03-2013, 08:04
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,515
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: bang-bang control with Talon

Quote:
Originally Posted by Alan Anderson View Post
We did it. But it's not going to be on our competition robot.

We put a strip chart on the Dashboard to display the RPM as measured by the encoder. Our programming students decided they weren't satisfied by the amount of overshoot it showed, and implemented a simple PID controller. A few minutes of tuning later (plus some tweaking of the algorithm to limit integral windup), it works great.

The continual loud snaps and clicks from the gearbox when using bang-bang were rather disturbing to most people hearing them. The simple PID sounds smooth as silk, appears to bring the motor up to speed just as fast, and recovers quickly from a brief additional load without problem.
We found the same. The bang-bang sounded horrible, and had a bit of a sine wave on our graphs. This was probably a result of an update time that was too slow. It was easier to review our code from last year and implement something similar. We don't even have to retune it from practice to comp bot.
Reply With Quote
  #12   Spotlight this post!  
Unread 13-03-2013, 17:01
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,355
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: bang-bang control with Talon

Quote:
Originally Posted by Tom Line View Post
We found the same. The bang-bang sounded horrible, and had a bit of a sine wave on our graphs. This was probably a result of an update time that was too slow. It was easier to review our code from last year and implement something similar. We don't even have to retune it from practice to comp bot.
Slow loop timing could easily cause both overshoots and undershoots.

Additionally, one of our local teams used a slightly modified Bang-Bang to resolve the "The bang-bang sounded horrible" issue. What they did was increase the "off" state drive from "0" to 30% power.

They also added a second case to completely stop the motor when not needed.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #13   Spotlight this post!  
Unread 13-03-2013, 23:23
xmaams xmaams is offline
Registered User
AKA: Sam Dietrich
FRC #2587 (Discobots)
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2012
Location: Houston
Posts: 12
xmaams will become famous soon enoughxmaams will become famous soon enough
Re: bang-bang control with Talon

Quote:
Originally Posted by billbo911 View Post
Slow loop timing could easily cause both overshoots and undershoots.
We had a lot of this at first. When we set up bang-bang on our shooter, our encoder outputs were jumping around by about 300 rpm, and even with direct drive off a miniCIM, bang-bang didn't sound very good.

Eventually we convinced the rpm function of the counter class to use the FPGA timer, and the numbers settled down very well.

Then by having the code attempt to update the Talon output every millisecond we eliminated almost all of the overshoot and variation. It is changing state so quickly now that the motors sound just as smooth as ones receiving constant PWM.
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:10.

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