Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PID algorithm in C

52 views
Skip to first unread message

TenmaNeko

unread,
Mar 13, 2007, 4:50:14 PM3/13/07
to
Hello all! Well, my partners and I are implementing the control
scheme on an autonomous robot. We are using a laser ranger and
infrared for obstacle avoidance, and a GPS plus digital compass for
navigation.

We plan on using the compass to keep our robot heading straight. I
figured (after some reading) that a PID algorithm would probably be
the best way to keep it in line without oscillation. Previous groups
had such a problem, with their bot continuously overshooting its
setpoint. Our plan is to use the compass heading as our sensor
reading, and to use this algorithm to control the motors in order to
bring the robot smoothly back onto its proper path.

Can anyone point me in the direction of some C source code? We are
running this on Linux (CentOS) laptop as well. I understand that
there will be much testing and fine-tuning necessary, but I'm hoping
having some code on hand will at least help us get a place to start.

Thank you, I appreciate it.

Tim Wescott

unread,
Mar 13, 2007, 6:52:07 PM3/13/07
to
There's a link to my Embedded Systems Programming article here:
http://www.wescottdesign.com/articles/pidwophd.html.

You can still get overshoot (and stranger things) even with a PID
controller -- the PID controller is just the standard way to get things
done and is well understood.

If you want to delve deeper, look at my other articles,
http://www.wescottdesign.com/articles/articles.html, or buy my book:
http://www.wescottdesign.com/actfes/actfes.html.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google? See http://cfaj.freeshell.org/google/

"Applied Control Theory for Embedded Systems" came out in April.
See details at http://www.wescottdesign.com/actfes/actfes.html

Jonathan Kirwan

unread,
Mar 13, 2007, 7:52:14 PM3/13/07
to
On Tue, 13 Mar 2007 15:52:07 -0700, Tim Wescott <t...@seemywebsite.com>
wrote:

><snip>

Which can be a very good deal, as you can pepper the author with your
questions! Very hard to beat a book that can sensibly reply. ;)

Jon

sdey...@hotmail.com

unread,
Mar 13, 2007, 10:33:19 PM3/13/07
to
On 13 Mar 2007 13:50:14 -0700, "TenmaNeko" <revdr...@aol.com> wrote:

>Hello all! Well, my partners and I are implementing the control
>scheme on an autonomous robot.

>Can anyone point me in the direction of some C source code?

Check this out http://www.chiefdelphi.com/media/papers/download/1829

Tim Wescott

unread,
Mar 13, 2007, 10:57:13 PM3/13/07
to

And in so doing, help to improve future printings of the book. Perhaps
even future editions as well, assuming I go crazy enough to want to do
it over again, yet remain sane enough to do a good job.

Rene Tschaggelar

unread,
Mar 14, 2007, 5:48:26 AM3/14/07
to
TenmaNeko wrote:

The PID is extremely trivial. If you didn't understand
the theory behind it, it won't be going to work anyway.

Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net

Tom Lucas

unread,
Mar 14, 2007, 7:01:31 AM3/14/07
to
"Tim Wescott" <t...@seemywebsite.com> wrote in message
news:udOdnanME7tXt2rY...@web-ster.com...

> TenmaNeko wrote:
>> Hello all! Well, my partners and I are implementing the control
>> scheme on an autonomous robot. We are using a laser ranger and
>> infrared for obstacle avoidance, and a GPS plus digital compass for
>> navigation.
>>
>> We plan on using the compass to keep our robot heading straight. I
>> figured (after some reading) that a PID algorithm would probably be
>> the best way to keep it in line without oscillation. Previous groups
>> had such a problem, with their bot continuously overshooting its
>> setpoint. Our plan is to use the compass heading as our sensor
>> reading, and to use this algorithm to control the motors in order to
>> bring the robot smoothly back onto its proper path.
>>
>> Can anyone point me in the direction of some C source code? We are
>> running this on Linux (CentOS) laptop as well. I understand that
>> there will be much testing and fine-tuning necessary, but I'm hoping
>> having some code on hand will at least help us get a place to start.
>>
>> Thank you, I appreciate it.
>>
> There's a link to my Embedded Systems Programming article here:
> http://www.wescottdesign.com/articles/pidwophd.html.
>
> You can still get overshoot (and stranger things) even with a PID
> controller -- the PID controller is just the standard way to get
> things done and is well understood.

Good article, thanks for that.

> If you want to delve deeper, look at my other articles,
> http://www.wescottdesign.com/articles/articles.html, or buy my book:
> http://www.wescottdesign.com/actfes/actfes.html.

You might have made a sale here.


Paul Carpenter

unread,
Mar 14, 2007, 6:50:08 AM3/14/07
to
On 13 Mar, in article
<1173819014.5...@y80g2000hsf.googlegroups.com>
revdr...@aol.com "TenmaNeko" wrote:

>Hello all! Well, my partners and I are implementing the control
>scheme on an autonomous robot. We are using a laser ranger and
>infrared for obstacle avoidance, and a GPS plus digital compass for
>navigation.

This robot is travelling over what distances?

GPS is not much use for small distances (a few metres or less).

>We plan on using the compass to keep our robot heading straight. I
>figured (after some reading) that a PID algorithm would probably be
>the best way to keep it in line without oscillation. Previous groups
>had such a problem, with their bot continuously overshooting its
>setpoint. Our plan is to use the compass heading as our sensor
>reading, and to use this algorithm to control the motors in order to
>bring the robot smoothly back onto its proper path.

What are you going to use as the error term, GPS or compass?
If the robot is trying to travel 100's of metres then it should be use
GPS to calculate what heading you should be on, THEN use the compass
to work out required heading error.

It is amazing how many get this wrong.

>Can anyone point me in the direction of some C source code? We are
>running this on Linux (CentOS) laptop as well. I understand that
>there will be much testing and fine-tuning necessary, but I'm hoping
>having some code on hand will at least help us get a place to start.
>
>Thank you, I appreciate it.

Needing to know what distance accuracy and resolution is your first step.
This will help to determine how much fine tuning capability you need, to
determine your software algorithm and its implementation. As well as
the resolution of the sensors required.

--
Paul Carpenter | pa...@pcserviceselectronics.co.uk
<http://www.pcserviceselectronics.co.uk/> PC Services
<http://www.gnuh8.org.uk/> GNU H8 & mailing list info
<http://www.badweb.org.uk/> For those web sites you hate

Mike Noone

unread,
Mar 14, 2007, 8:44:31 AM3/14/07
to

Rene - that is terribly, terribly wrong. At it's most basic level,
sure, a PID controller can be fairly simple to implement and tweak.
But PID controllers can also be incredibly complicated. For example -
how simple do you think an auto-tuning PID controller is? Not simple!
Or when you need to design a PID controller to have specific
overshoots, rise times, and steady state times? Not terribly simple.

-Mike

Vladimir Vassilevsky

unread,
Mar 14, 2007, 10:00:20 AM3/14/07
to

Mike Noone wrote:

>>>We plan on using the compass to keep our robot heading straight. I
>>>figured (after some reading) that a PID algorithm would probably be
>>>the best way to keep it in line without oscillation.

>>>Can anyone point me in the direction of some C source code? We are
>>>running this on Linux (CentOS) laptop as well. I understand that
>>>there will be much testing and fine-tuning necessary, but I'm hoping
>>>having some code on hand will at least help us get a place to start.
>>

>>The PID is extremely trivial. If you didn't understand
>>the theory behind it, it won't be going to work anyway.

I completely agree with Rene. If someone don't know what is PID, it is
too early for him to think about robots.


> Rene - that is terribly, terribly wrong. At it's most basic level,
> sure, a PID controller can be fairly simple to implement and tweak.

There is no need to tweak anything. Once the system response is
determined, the analytical design of PID is very trivial and
straightforward.

> But PID controllers can also be incredibly complicated.

It usually happens if somebody is trying to make PID to work by tweaking.


> For example -
> how simple do you think an auto-tuning PID controller is? Not simple!

This is a basic problem from any entry-level textbook.

> Or when you need to design a PID controller to have specific
> overshoots, rise times, and steady state times? Not terribly simple.

Yes, it is little bit more complicated then 2 x 2 = 4

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

http://www.abvolt.com

Mike Noone

unread,
Mar 14, 2007, 10:53:06 AM3/14/07
to
On Mar 14, 9:00 am, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:

> I completely agree with Rene. If someone don't know what is PID, it is
> too early for him to think about robots.

So - a complete knowledge of PID is necessary to do work in robotics?!
Right...

No.

> There is no need to tweak anything. Once the system response is
> determined, the analytical design of PID is very trivial and
> straightforward.

And determining system response is incredibly easy, let me tell you...
*rolls eyes*


> It usually happens if somebody is trying to make PID to work by tweaking.

Which often is the only viable route unless you want to spend half
your life doing simulation.

> > For example -
> > how simple do you think an auto-tuning PID controller is? Not simple!
>
> This is a basic problem from any entry-level textbook.

Ummmmm... No, what textbook would this be? People write their theses
on stuff like this. PID can be as simple or as complicated as you want
it to be.

> > Or when you need to design a PID controller to have specific
> > overshoots, rise times, and steady state times? Not terribly simple.
>
> Yes, it is little bit more complicated then 2 x 2 = 4

Good one, really.

Please back up your statements. I think you're pulling them out of a
place where the sun don't shine.

-Mike

Mike Noone

unread,
Mar 14, 2007, 10:57:11 AM3/14/07
to
On Mar 14, 5:50 am, p...@pcserviceselectronics.co.uk (Paul Carpenter)
wrote:

> GPS is not much use for small distances (a few metres or less).

When used by somebody that doesn't know what they're doing, sure.
Implement DGPS, or add in accelerometers and do kalman filtering, or
do many other things and you can get accuracy in the cm range.

-Mike

Vladimir Vassilevsky

unread,
Mar 14, 2007, 11:42:19 AM3/14/07
to

Mike Noone wrote:

>>I completely agree with Rene. If someone don't know what is PID, it is
>>too early for him to think about robots.
>
>
> So - a complete knowledge of PID is necessary to do work in robotics?!
> Right...
>
> No.

PID is the very very basics of the automatic control. If one doesn't
know what is PID, there is nothing to talk about.


>>There is no need to tweak anything. Once the system response is
>>determined, the analytical design of PID is very trivial and
>>straightforward.
>
>
> And determining system response is incredibly easy, let me tell you...
> *rolls eyes*

Yes, it is not too complex. You just have to think a little bit and then
put the numbers together. It requires no more then the basic science
from high school to estimate the responce of a mechanical or electrical
system with the required accuracy.

>>It usually happens if somebody is trying to make PID to work by tweaking.
>
> Which often is the only viable route unless you want to spend half
> your life doing simulation.

Big mistake. How about tweaking on the space rocket?
As for simulation, is a brute force approach. As Wiener said, the
computer can be used as the amplifier for the head, but not as the
substitute. Simulation is useful to check the fine aspects of the
nonlinear and time variant systems; however the simulation should be
based on the analysis, not vice versa.


>>>For example -
>>>how simple do you think an auto-tuning PID controller is? Not simple!
>>
>>This is a basic problem from any entry-level textbook.
>
> Ummmmm... No, what textbook would this be?

Probably, Mr. Tim Wescott has that. Hey, Tim?
I like "Advances in the PID control" book, there is also a number of
books on the robust control.


People write their theses
> on stuff like this. PID can be as simple or as complicated as you want
> it to be.

Ziegler and Nichols solved the basic problem of PID design in 1940.
After that, there were few small refinements and elaborations.

>
>>>Or when you need to design a PID controller to have specific
>>>overshoots, rise times, and steady state times? Not terribly simple.
>>
>>Yes, it is little bit more complicated then 2 x 2 = 4
>
>
> Good one, really.
>
> Please back up your statements. I think you're pulling them out of a
> place where the sun don't shine.

I suggest you to read books instead of tweaking the parameters. You
will be surprised; it is really helpfull.

Mike Noone

unread,
Mar 14, 2007, 12:00:11 PM3/14/07
to
On Mar 14, 10:42 am, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:

> Mike Noone wrote:
> >>I completely agree with Rene. If someone don't know what is PID, it is
> >>too early for him to think about robots.
>
> > So - a complete knowledge of PID is necessary to do work in robotics?!
> > Right...
>
> > No.
>
> PID is the very very basics of the automatic control. If one doesn't
> know what is PID, there is nothing to talk about.
>
> >>There is no need to tweak anything. Once the system response is
> >>determined, the analytical design of PID is very trivial and
> >>straightforward.
>
> > And determining system response is incredibly easy, let me tell you...
> > *rolls eyes*
>
> Yes, it is not too complex. You just have to think a little bit and then
> put the numbers together. It requires no more then the basic science
> from high school to estimate the responce of a mechanical or electrical
> system with the required accuracy.

If you're just using plug and chug formulas - sure. If you actually
want to understand where those formulas come from, not as simple.

> >>It usually happens if somebody is trying to make PID to work by tweaking.
>
> > Which often is the only viable route unless you want to spend half
> > your life doing simulation.
>
> Big mistake. How about tweaking on the space rocket?
> As for simulation, is a brute force approach. As Wiener said, the
> computer can be used as the amplifier for the head, but not as the
> substitute. Simulation is useful to check the fine aspects of the
> nonlinear and time variant systems; however the simulation should be
> based on the analysis, not vice versa.

Of course sometimes simulation is the only viable route. However, in
most situations that I've run across simulation has been only good
enough to get a starting point for gain values, and to get perfection
those have to be hand tweaked.

> >>>For example -
> >>>how simple do you think an auto-tuning PID controller is? Not simple!
>
> >>This is a basic problem from any entry-level textbook.
>
> > Ummmmm... No, what textbook would this be?
>
> Probably, Mr. Tim Wescott has that. Hey, Tim?
> I like "Advances in the PID control" book, there is also a number of
> books on the robust control.

Not familiar with that one - will take a look some time. I'll mention
that any book that covers that in the beginning is glossing over all
the nuts and bolts of control systems, which in my humble opinion is
not proper form, unless it is assumed that the reader already has a
solid foundation in control systems.

> People write their theses
>
> > on stuff like this. PID can be as simple or as complicated as you want
> > it to be.
>
> Ziegler and Nichols solved the basic problem of PID design in 1940.
> After that, there were few small refinements and elaborations.

I guess that's why there's about 6000 papers on auto tuning PID:
http://scholar.google.com/scholar?q=auto+tuning+PID&hl=en&lr=&btnG=Search

> > Please back up your statements. I think you're pulling them out of a
> > place where the sun don't shine.
>
> I suggest you to read books instead of tweaking the parameters. You
> will be surprised; it is really helpfull.

Not willing to back up anything? Guess that isn't too surprising.


I think you're arguing that using other's work and formulas and
whatnot to implement PIDs is easy. This is true. However, if you
actually want to know what is going on, you'll need a foundation in
control systems.

-Mike

Vladimir Vassilevsky

unread,
Mar 14, 2007, 12:04:49 PM3/14/07
to

Mike Noone wrote:

This will provide for the resolution, not for the accuracy.

However, there is GPS with better accuracy, too. But there is one
problem with it: the GPS with 10m guaranteed accuracy is $$, and the GPS
with 10cm accuracy is $$$$. Perhaps, it can do even better for $$$$$$,
but it doesn't seem to be a very good option...

Spehro Pefhany

unread,
Mar 14, 2007, 1:24:56 PM3/14/07
to
On 14 Mar 2007 07:57:11 -0700, the renowned "Mike Noone"
<nlea...@gmail.com> wrote:

Even better than that.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
sp...@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com

linnix

unread,
Mar 14, 2007, 12:13:34 PM3/14/07
to
On Mar 14, 8:04 am, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:

> Mike Noone wrote:
> > On Mar 14, 5:50 am, p...@pcserviceselectronics.co.uk (Paul Carpenter)
> > wrote:
>
> >>GPS is not much use for small distances (a few metres or less).
>
> > When used by somebody that doesn't know what they're doing, sure.
> > Implement DGPS, or add in accelerometers and do kalman filtering, or
> > do many other things and you can get accuracy in the cm range.
>
> This will provide for the resolution, not for the accuracy.
>
> However, there is GPS with better accuracy, too. But there is one
> problem with it: the GPS with 10m guaranteed accuracy is $$, and the GPS
> with 10cm accuracy is $$$$. Perhaps, it can do even better for $$$$$$,
> but it doesn't seem to be a very good option...

Carrier phase correction will get down to 10cm. It is doable for
$1000.
You need a stable clock source, dro and pll, precision delays (ns),
high speed dividers (GHz). It will be a lunch box size and takes
about 5 Watts.

Mike Noone

unread,
Mar 14, 2007, 12:47:00 PM3/14/07
to
On Mar 14, 11:04 am, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:

> Mike Noone wrote:
> > On Mar 14, 5:50 am, p...@pcserviceselectronics.co.uk (Paul Carpenter)
> > wrote:
>
> >>GPS is not much use for small distances (a few metres or less).
>
> > When used by somebody that doesn't know what they're doing, sure.
> > Implement DGPS, or add in accelerometers and do kalman filtering, or
> > do many other things and you can get accuracy in the cm range.
>
> This will provide for the resolution, not for the accuracy.

I would suggest doing some more research on that topic then. You are
misinformed. There are countless papers on this topic so I won't go
into much depth on it. But if you were to combine kalman filtering
with DGPS you can get some very, very good accuracy as well as
resolution.

> However, there is GPS with better accuracy, too. But there is one
> problem with it: the GPS with 10m guaranteed accuracy is $$, and the GPS
> with 10cm accuracy is $$$$. Perhaps, it can do even better for $$$$$$,
> but it doesn't seem to be a very good option...
>
> Vladimir Vassilevsky

Cleverness can overcome cost. You may find this website interesting:
http://precision-gps.org/

-Mike

linnix

unread,
Mar 14, 2007, 1:04:02 PM3/14/07
to

This is based on the idea that the you have a stable reference source
at both places (a fixed and rover location) and that the receiver
clocks does not drift apart. Yes, you have a narrow processing window
after calibration, but the clock phases will drift randomly
afterward. Namely, error rate increase in time after calibration.

My proposal is to eliminate the clock drift with a stable laser tuned
Cesium clock.

linnix

unread,
Mar 14, 2007, 1:37:51 PM3/14/07
to
On Mar 14, 8:04 am, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:

> Mike Noone wrote:
> > On Mar 14, 5:50 am, p...@pcserviceselectronics.co.uk (Paul Carpenter)
> > wrote:
>
> >>GPS is not much use for small distances (a few metres or less).
>
> > When used by somebody that doesn't know what they're doing, sure.
> > Implement DGPS, or add in accelerometers and do kalman filtering, or
> > do many other things and you can get accuracy in the cm range.
>
> This will provide for the resolution, not for the accuracy.

Aren't they related?

>
> However, there is GPS with better accuracy, too. But there is one
> problem with it: the GPS with 10m guaranteed accuracy is $$, and the GPS
> with 10cm accuracy is $$$$. Perhaps, it can do even better for $$$$$$,

A few hundred $ for an OEM board with Carrier Phase info.
Good enough if you can constantly recalibrate the drift.
Not good if you don't have a fixed reference.

The receiver has to be in both places at the same time for
calibration.
I guess that the non-physics version of Uncertainty Principle.


Everett M. Greene

unread,
Mar 14, 2007, 1:45:37 PM3/14/07
to

And everybody says it's tricky but nobody ever bothers to
give even any hints as to how to determine the coefficients...

linnix

unread,
Mar 14, 2007, 2:06:51 PM3/14/07
to
On Mar 14, 9:45 am, moja...@mojaveg.lsan.mdsg-pacwest.com (Everett M.
Greene) wrote:

Read some books on Linear Algebra, Feedback Stabilities,
Matrix Algebra and Different Equations. We don't have to
repeat the college courses that you should have taken.

Rene Tschaggelar

unread,
Mar 14, 2007, 2:30:24 PM3/14/07
to
Mike Noone wrote:

> On Mar 14, 3:48 am, Rene Tschaggelar <n...@none.net> wrote:
>
>>TenmaNeko wrote:
the robot smoothly back onto its proper path.
>>
>>>Can anyone point me in the direction of some C source code? We are
>>>running this on Linux (CentOS) laptop as well. I understand that
>>>there will be much testing and fine-tuning necessary, but I'm hoping
>>>having some code on hand will at least help us get a place to start.
>>
>>The PID is extremely trivial. If you didn't understand
>>the theory behind it, it won't be going to work anyway.

>

> Rene - that is terribly, terribly wrong. At it's most basic level,
> sure, a PID controller can be fairly simple to implement and tweak.
> But PID controllers can also be incredibly complicated. For example -
> how simple do you think an auto-tuning PID controller is? Not simple!
> Or when you need to design a PID controller to have specific
> overshoots, rise times, and steady state times? Not terribly simple.

Mike,
the code for a simple PID is a threeliner. Plus an
additional line to stop the integrator when the
output hits the rails. We're not talking autowhatever.

First one has to have a basic understanding on
system behavious, whether a system is integrating
or not. Then one has to estimate the nonlinearities.
One has to have an idea about frequency response and
phase. When you have heard about all this, then the
threeliner is done. Just in case you have more sensors
than the one for the eventual measurement, and the
system is not acting as expected, a state control is
the way to go further. Once you heard a semester about
state control with virtual viewer, then the few more
lines are also trivial, the parameters take a bit
more then.

Paul Carpenter

unread,
Mar 14, 2007, 3:16:55 PM3/14/07
to
On 14 Mar, in article
<1173884231....@l75g2000hse.googlegroups.com>
nlea...@gmail.com "Mike Noone" wrote:

The original post showed little detail of what was trying to be achieved
except 'hand-waving' and technology 'buzzwords'. no information on expected
travel time or distance, let alone how close to the end point is classed
as being at 'set point'.

Until you know the scope of what is being attempted, PID or whatever
algorithm is pointless. Especially if what is being used to determine
error may cause more oscillations or drift than any algorithm can
correct.

The points made refered to what was the original poster trying to achieve
NOT what can be achieved with limitless budgets and limitless resources.

Until you know what is trying to be achieved, any assistance is just
'hand waving', based on personal experience which may be different to
the questioners experience or expectations.

For all we know the original poster could be

a) tring to achieve the DARPA autonomous vehicle challenge

b) moving a CNC machine workpiece no more than 10 mm steps
max distance of 1m in less than 0.1 seconds.

c) anything in between the two.

Paul Taylor

unread,
Mar 15, 2007, 4:05:48 AM3/15/07
to

> I completely agree with Rene. If someone don't know what is PID, it is
> too early for him to think about robots.

I would disagree - what a great way of learning about PID controllers. If
the OP's software can accept the PID constants easily, then he can
experiment with different setups and see the effects instantly with his
robot.

He could:

- Try pure I (slow but quiet) and pure P and think about results
- Add some I (slow) to his P and some D and think about results
- try some anti reset windup on the I and see what happens
- think about the affects of his AD & DA resolution will have in his
system
- think about sampling time, and what effect that will have (including on
the D term)

Is there anything else (if the OP isn't trying to get maximum performance
from his system)? I think that is it.

The OP would of course be recommended to do some reading on the subject
from good sources, but that doesn't preclude him from getting some good
practical experience with this stuff.

Regards,

Paul.


James Beck

unread,
Mar 15, 2007, 10:59:08 AM3/15/07
to
In article <pan.2007.03.15....@tiscali.co.uk>,
paul_ng...@tiscali.co.uk says...

>
> > I completely agree with Rene. If someone don't know what is PID, it is
> > too early for him to think about robots.
>
> I would disagree - what a great way of learning about PID controllers. If
> the OP's software can accept the PID constants easily, then he can
> experiment with different setups and see the effects instantly with his
> robot.
>

I ignored this thread originally because it was another one of those
where the poor new guy gets to hear all the "old timers" tell him/her
about why they are too stupid/ignorant/inexperienced to try what they
are attempting and if they don't fully understand the concept behind the
X, Y or Z technology they are just ignorant and should go back to
school, or bitch about how they didn't post a full spec on the project.
That being said, I'm sure those "old timers" forgot that the best (and
most memorable) lessons they ever learned were from jumping in to
something WAYYYY over their heads and slogging it out until they
understood what was going on.
So, in a nut shell, I agree with you. By all means, get a good book on
PID algorithms. Read it cover to cover, but then LIVE it by trying to
make some real tangible thing and see what happens. It is pretty sad
when we are discouraging a person from trying something that will
educate them. Sure it might not work, but that is knowledge too.
How many of you have a bin of prototypes around that didn't work?
Why do you keep them?
What did you learn?


Jim

larwe

unread,
Mar 15, 2007, 12:37:41 PM3/15/07
to
On Mar 15, 10:59 am, James Beck

> How many of you have a bin of prototypes around that didn't work?

It's a shelf in my case, and I refer to it as the Wall of Folly.
Products are positioned according to how expensive they were to make.
Currently the top item is a little device that cost [the company for
which I was working] almost $300,000 plus another $100,000 in
miscellaneous marketing, shipping, returns acceptance, collections and
interest. I wasn't involved in the design or debug of the piece of the
product that didn't work, but that didn't help me...

James Beck

unread,
Mar 15, 2007, 2:50:27 PM3/15/07
to
In article <1173976661.6...@l77g2000hsb.googlegroups.com>,
zwsd...@gmail.com says...
Lessons come in all price ranges ;)
I have had a few thousand dollar Mondays.
I hope to never have a $330K Monday though!

Jim

Tim Wescott

unread,
Mar 16, 2007, 12:19:15 PM3/16/07
to
Rene Tschaggelar wrote:

There are thousands, if not millions, of PID loops in mills and
factories around the world that are specified, installed, maintained,
and tuned by people who don't understand PID, yet build machines with
them that do their jobs adequately, if not not optimally.

So I disagree.

Having said that, there are also innumerable applications where PID
control is the correct answer, but where you'll never get it working
without understanding the theory. Moreover, without the theory you
won't necessarily know which type of problem you're dealing with unless
you try and either succeed or fail.

For the former type of system there's my article on PID. For the
latter, there's my book -- or me.

linnix

unread,
Mar 16, 2007, 12:39:11 PM3/16/07
to

> > The PID is extremely trivial. If you didn't understand
> > the theory behind it, it won't be going to work anyway.
>
> There are thousands, if not millions, of PID loops in mills and
> factories around the world that are specified, installed, maintained,
> and tuned by people who don't understand PID, yet build machines with
> them that do their jobs adequately, if not not optimally.

Yes, efficiency is the key.
You can run feedback loops with or without PID.
But for robotics, using minimum energy might be desirable.

> Having said that, there are also innumerable applications where PID
> control is the correct answer, but where you'll never get it working
> without understanding the theory. Moreover, without the theory you
> won't necessarily know which type of problem you're dealing with unless
> you try and either succeed or fail.

Unfortunately, many don't even know why they are needed,
since they only learn about fancy interfaces and not about
getting more mileages (auto is a good example).


0 new messages