For our next exercise, we should define Beauty and Truth. :) - Taylor [more]
 Chief Delphi Closed PID loop for Speed Control
 CD-Media CD-Spy
 portal register members calendar search Today's Posts Mark Forums Read FAQ rules

#1
05-15-2012, 09:41 AM
 DavidVang.2012 TeTsuTo FRC #2500 (Herobotics) Team Role: Programmer Join Date: Jan 2011 Rookie Year: 2010 Location: Minneapolis, MN Posts: 2
Closed PID loop for Speed Control

We are currently trying to create a closed PID loop that will essentially be able to control the speed output of our drive wheels as we give input through our joysticks.

Is there anyone out there who is willing to share their developed [and working] closed PID loop so that I can get a better picture of what I need to include in the program? A simple closed PID loop program will be sufficient.

Thank you very much.
#2
05-15-2012, 12:04 PM
 Alan Anderson Software Architect FRC #0045 (TechnoKats) Team Role: Mentor Join Date: Feb 2004 Rookie Year: 2004 Location: Kokomo, Indiana Posts: 9,064
Re: Closed PID loop for Speed Control

LabVIEW includes PID functions already. To find them, open the function palette and search for "PID".

Since you want to control speed instead of position, you have two basic options. Either use the output of the PID function to add to or subtract from your motor power instead of using it as the motor power directly, or get an equivalent effect by running the PID function using the I term as if it were the proportional constant.
#3
05-15-2012, 08:48 PM
 Tom Line 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,449
Re: Closed PID loop for Speed Control

Check out the Velocity PID (2012) located here:

http://www.fightingpi.org/Controls.html

It's in labview, and is commented fairly well and should be self explanatory if you know basic PID theory. Thanks to Jared from team 341 for giving the derivation in 2009 that we used to create this PID to control our shooter this year.

Last edited by Tom Line : 05-15-2012 at 08:51 PM.
#4
05-15-2012, 10:15 PM
 blackflame2996 Alumni AKA: David Donahue FRC #2996 (Cougars Gone Wired) Team Role: Alumni Join Date: Nov 2011 Rookie Year: 2011 Location: Colorado springs, CO Posts: 67
Re: Closed PID loop for Speed Control

Just out of curiosity, why use PID for a user controlled drive system? This seems unnecessary. PID is nice for things like shooters, but why use it with the drive?
__________________
2009 Regional Winners
2011 Regional Chairman's Award
2012 Regional Winners
2013 Regional Chairman's Award
#5
05-15-2012, 10:20 PM
 Ether systems engineer (retired) no team Join Date: Nov 2009 Rookie Year: 1969 Location: US Posts: 7,790
Re: Closed PID loop for Speed Control

Quote:
 Originally Posted by blackflame2996 Just out of curiosity, why use PID for a user controlled drive system? This seems unnecessary. PID is nice for things like shooters, but why use it with the drive?
Autonomous. Computer-assisted bridge balancing. More predictable response to driver commands in the presence of varying battery voltages.

#6
05-15-2012, 11:08 PM
 Tom Line 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,449
Re: Closed PID loop for Speed Control

Traction control (2009).

Maintaining a set field position.

We're not even talking about a swerve drive....
#7
05-17-2012, 05:11 PM
 blackflame2996 Alumni AKA: David Donahue FRC #2996 (Cougars Gone Wired) Team Role: Alumni Join Date: Nov 2011 Rookie Year: 2011 Location: Colorado springs, CO Posts: 67
Re: Closed PID loop for Speed Control

I see. we'll keep that in mind.
__________________
2009 Regional Winners
2011 Regional Chairman's Award
2012 Regional Winners
2013 Regional Chairman's Award

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     User Announcements FIRST     General Forum         FIRST E-Mail Blast Archive     Rumor Mill     Career     Robot Showcase Technical     Technical Discussion     Robotics Education and Curriculum     Motors     Electrical         CAN     Programming         NI LabVIEW         C/C++         Java         Python     Control System         FRC Control System         Sensors     Pneumatics     Kit & Additional Hardware     CAD         Inventor         SolidWorks         Pro ENGINEER / Creo     IT / Communications         3D Animation and Competition         Website Design/Showcase         Videography and Photography         Computer Graphics     National Instruments LabVIEW and Data Acquisition         LabView and Data Acquisition Competition     Awards         Chairman's Award     Rules/Strategy         Scouting         You Make The Call     Team Organization         Fundraising         Starting New Teams         Finding A Team         College Teams     Championship Event     Regional Competitions     District Events     Off-Season Events     Thanks and/or Congrats     FRC Game Design     OCCRA         OCCRA Q&A         OCCRA Programming Other     Unsung FIRST Heroes     Chit-Chat         Games/Trivia             Fantasy FIRST     Car Nack's Corner     College & University Education     Dean Kamen's Inventions     FIRST-related Organizations         Western Region Robotics Forum         Robot Chicks Union (RCU)         Southern California Regional Robotics Forum         FIRST Interactive Rural SupporT         FIRST Scouting Network         FloridaFIRST         FIRSTwiki         The Blue Alliance             Video Archives     FIRST Historians     FIRST In the News...     FIRST Lego League         Lego Mindstorm Discussion     FIRST Tech Challenge     VEX         VEX Robotics Competition         VEX IQ     Televised Robotics     Math and Science         NASA Discussion ChiefDelphi.com Website     CD Forum Support     Extra Discussion Old Forum Archives     1999     2000     2001

All times are GMT -5. The time now is 11:03 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.

 -- English (12 hour) -- English (24 hour) Contact Us - Chief Delphi - Rules - Archive - Top