DPRG
DPRG List  



[DPRG] Processing unit for mobile robot

Subject: [DPRG] Processing unit for mobile robot
From: Eric Sumner kd5bjo at gmail.com
Date: Fri Apr 25 16:25:22 CDT 2008

> > If you have  an unstable sampling period,
>  > you can't do that.  So long as the  sampling rate is fast
>  > enough, this formulation should produce the same  results
>  > regardless of the sampling rate for any set of gains.
>
>  I'm not sure I can follow your point, but I suspect you are
>  dismissing mine.

I did not intend to dismiss your point.

>  The need to ease the gain on the K term is because of Delta-t
>  isn't dt. That is, Delta-t being finite in size means how often
>  we run determines how close the discrete value is to the
>  calculus value and so the shorter the time, the closer to
>  theoretical value.

Yes; the shorter the sampling interval, the closer the discrete-time
system will approximate the continuous-time one.

>  As an example, let's say we get the a response where we run
>  the routine twice in a period and where we run it three times.
>
>  Let's say the error goes up linearly with time. So if we
>  calculate twice in 3mS, we have a Yp term based on 0 until
>  1.5mS and 1.5 until 3mS. If we do it three times, we get a Yp
>  of 0 until 1, 1 until 2 and 2 until 3. So the Yp output average
>  over those 3mS will be 1.5/2 if we do it twice, and will be 3/3 if
>  we do it three times. Therefore a single Kp gain will not give
>  the correct output for irregular periods.

This depends on your definition of "correct".  As you point out, in a
purely mathematical sense, they are not equal.  Also, however, neither
of them produces the same result as the continuous-time system.
Usually, a discrete-time approximation of a system is considered
"correct" if it limits to the continuous system as the sampling period
approaches zero.

>  Or at least that's how it looks to me so far. I haven't studied
>  this officially, this is just my thinking on the subject over
>  the last week when the idea first occurred to me about why the
>  irregular update would cause problems.
>
>  Do you know the offical engineering text answer?

Engineering is all about approximations and determining a "good
enough" solution.  Thus, the engineering text answer is primarily what
conditions need to be maintained for the mathematically correct
approximation to be good enough to actually use.  The result in this
case is that as long as your sampling frequency is significantly
higher than the Nyquist frequency for your system, changing the
sampling rate doesn't affect the output of the system very much.

How closely your system needs to approximate the continuous system
will determine how fast your sampling rate needs to be in order for
your system to behave properly.  There is no penalty for increasing
the sampling rate until you increase it so far that you start having a
significant amount of quantization error.

I apologize for not offering the derivation of this result, but I
don't have time right now to dust off my Laplace and Z-transform
skills.  If you're interested, I could do that for you after I've
finished my finals.

There are other, more complicated, formulations of a discrete-time PID
controller that require less of a margin over the Nyquist frequency
than this one, but it is usually easier to increase the sampling
frequency to reduce the error.

  -- Eric

More information about the DPRG mailing list

Copyright © 1984 - 2006 Dallas Personal Robotics Group. All rights reserved.
Website Design by NCC

For the latest robot news visit robots.net