View Single Post
  #2   Spotlight this post!  
Unread 05-07-2005, 09:56 PM
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Concept of PID explained

I've never done a PID system, but from what I understand all it does is: The closer you are to the point you want to be, the speed slows proportionately. If I'm not mistaken, you can do the same with a y=mx+b kind of formula. I've e been tinkering with this idea lately, and figured it would be a good alternative to a complex PID system. Where
y is the speed it's going to be set to
m is 127 divided by the distance you are starting at
x is the current distance away
b is 127

Speed = (127/StartingDistance)*Distance + 127

So say we want to travel until a pot reads 100, slowing down proportionally until we hit the destination (where it would set speed to 127)

Case
Pot is currently at 100, needs to go to 1
Current speed is 127
Speed = (127/100)*100+127

The speed decrease would proportionally go down, as shown by this chart.
(Note: This chart starts at 127, and goes up to 255. It's the first time I've used Excel to generate charts.)


The chart was generated using the attached data sheet (.xls format)

Good luck,
Mike
Attached Files
File Type: xls APID.xls (21.0 KB, 204 views)
__________________
http://www.mikesorrenti.com/