Go to Post ahhhh, for the good old days, when our robots always seemed to come in well under weight instead of well over... :( . - dlavery [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 15-01-2010, 20:03
ChaosX73 ChaosX73 is offline
Registered User
AKA: Ryan Harrison
FRC #2338 (Gear it Forward)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Aurora, IL
Posts: 75
ChaosX73 is a glorious beacon of lightChaosX73 is a glorious beacon of lightChaosX73 is a glorious beacon of lightChaosX73 is a glorious beacon of lightChaosX73 is a glorious beacon of light
Exclamation PID controllers?

Hello, I was charged for programming homework by my mentor to find out what a PID controller is. I looked online, but all I get are confusing algorithms. I have not had a math class in a while and I have not programmed using labview in a while. So, needless to say, I don't know what the PID articles mean.

I know P means proportional
I means integral
and D means derivative

Can someone please explain in simple terms how it works? Thanks!
  #2   Spotlight this post!  
Unread 15-01-2010, 20:43
Phoenix Spud's Avatar
Phoenix Spud Phoenix Spud is offline
Everyone. Everywhere.
FRC #3132 (Thunder Down Under)
Team Role: College Student
 
Join Date: Jan 2009
Rookie Year: 2004
Location: Sydney, Australia
Posts: 702
Phoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond repute
Re: PID controllers?

Have you tried the FIRST wiki? When I learned about PIDs last year, I found that very helpful. try this link.

Essentially, what you need to know is that PID controllers make sure you move a motor (or robot, or something else) to the exact right spot using a sensor. It makes sure there is no over--or under--shoot by giving you real-time feedback. I don't know if you are using the WPIlib for C++ or not, but if you are there is a really good class that implements a PID controller for you.
__________________
Sarah Heimlich
Outreach Mentor | Business Mentor
FIRST® TEAM 3132
  #3   Spotlight this post!  
Unread 15-01-2010, 21:44
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,979
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: PID controllers?

PID stands for "Proportional, Integral, Derivative". A car's cruise control is a good example of a system controlled by PID. You set it for a particular speed, and it controls the throttle to maintain that speed, uphill, downhill, whatever.

The first part of the algorithm is proportional to the "error", the difference between your actual (whatever - speed for example) and the set point. If you set cruise control for 40 MPH, you only want a little throttle if you drop to 39 MPH, but you want more if you drop to 30 MPH. The error of 1 MPH is less than the error of 10 MPH, and the throttle application is proportional.

But let's say the engine is powerful, and a little throttle at 39 MPH brings the car up to 41 MPH. You back off the throttle, but the whole process repeats, and you get sick from the speed changing so often... So you put in little less Proportional, but then a small speed error doesn't have any effect - so what you do is integrate the error over time, literally adding up a whole bunch of small error every second, and eventually it gets larger and you can use that to correct the small error, so 39.5 MPH gets to 40 MPH.

In some systems, you can't control the throttle so finely, so then you also use Derivative, which limits how fast you can change the throttle setting - kind of like just slowing things down a little "you can't increase more than 1/2 inch per second". This keeps the control algorithm from overcontrolling.

Many systems can get by with only P. I can be added in some cases, and only a few systems also need D to work properly.

Learn those algorithms, they are simple math (addition, subtraction and multiplication) just repeating many, many times. Once you get them, the concepts are understood for life.
__________________

I am N2IRZ - What's your callsign?
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
PID Control Geek 2.0 Programming 16 12-01-2010 21:10
PID Troubleshooting iamthewalrus135 Programming 7 08-02-2008 11:16
PID: P+D or P-D billbo911 Programming 1 27-01-2008 23:52
PID question bronxbomber92 Programming 8 12-01-2008 00:07
PID shadowops06 Programming 5 16-06-2006 22:48


All times are GMT -5. The time now is 09:57.

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