Re: Digital Control with very low sample rate

Translate This Thread From English to

Threaded View




For starters I'd suggest a strategy that's commonly referred to as 'smart
operator'. Smart operators know that if they move the knob by x, then the
thing they want to control will move by y. So they just look at how far
things are away from target and make a once-off move once the new data
appears, with a magnitude calculated to null out the error. If the rapid
slew when the adjustment appears is a problem, just apply some filtering
that's fast in relation to the sample interval.

This depends on a degree of linearity in the process.

That's easy to understand and easy to implement.



Re: Digital Control with very low sample rate



On Thu, 09 Jul 2009 16:57:28 +0800, Bruce Varley wrote:


It sounds like an integrating controller with output linearization, tuned
to be deadbeat.

Depending on how well known the command vs. output curve is you may want
to back off on the gain to avoid 1/fs oscillation.

--
http://www.wescottdesign.com

Re: Digital Control with very low sample rate



Hello Bruce and Tim,

thanks very much for your hints. They are really interesting. I didn't
understand all of it, see below.


How does this filtering work? Should it have a higher sample rate,
i.e. should I use a sort of sample rate conversion?


What is output linearization? What do you mean by deatbeat? It could
be that my controller will have a variable sample rate if the
intervals it gets the new sensor values are varying.



Do you mean I should lower the gain (i.e. the P in PID)? What is 1/fs
oscillation? fs is the sampling frequency?


Regards

Johannes

Re: Digital Control with very low sample rate





It's probably better to not think of this as a PID algorithm, because the
action is not time-continuous. The gain is the relationship between
manipulated variable move ('knob') and the consequent controlled variable
move.

Tim is right, if the gain is too high, you can get limit cycling at the
sample frequency, as the strategy overcorrects on every receipt of new data.
It's better to undercorrect than overcorrect, which is the same thing as
lowering the gain. When I'm applying this strategy, I always start with a
gain that I know is on the low side so that correction is only partial Then
as you monitor the behaviour over many cycles, you can tweak the gain up,
depending on how repeatable things turn out to be.



Re: Digital Control with very low sample rate



Sorry, I missed your other embedded questions.


With the strategy I'm suggesting, the raw correction would be applied as a
once-off change, ie. a step change. If you don't want the change made this
fast, you could apply a single lag low pass filter (Google) which will turn
the step change into something resembling a ramp, technically an exponential
response. The main requirement for this strategy is that all effects of an
adjustment must be well cleared before the next data point arrives. I'm
assuming here that your process will steady out a lot quicker than your
2-hours, then you could have a low pass filter with a time constant (Google)
of maybe 10 minutes, or even longer. For a single lag filter, just about all
the input will appear at the output in 3 - 4 times the time constant.


I'm not going to get into defining linearisation, someone else might oblige.

I haven't come across the deadbeat term before (thanks for a new word, Tim)
I assume the idea is that the adjustment 'hits the nail on the head', ie
achieves total, or approximately total, annulment of the error in one move.



Re: Digital Control with very low sample rate




http://lorien.ncl.ac.uk/ming/digicont/control/digital1.htm
Deadbeat controllers are not practical for most systems and are more
of an interest in theoretical work.  The system must be well defined
like a hard drive.  The Dahlin controller is much more practical.  The
main point is the procedure for calculating the controller gains that
will give the desired response.   The internal model control formulas
for pid gains are calculated in the same way but in the s domain.


Peter Nachtwey

Re: Digital Control with very low sample rate



On Fri, 10 Jul 2009 00:29:53 -0700, Johannes Eble wrote:


That's what I'd do.  Most likely you want to ease the new command in,
instead of suddenly changing the engine operation (what are you
adjusting, anyway?).


Assume that your engine has an command-to-consumption relationship
described by the function f(x).  Then output linearization is just
driving the output with the inverse of the function -- so if f(x) = sqrt
(x), then you'd run your command through an x^2 block.


A deadbeat system is one that comes to a rest in a finite number of
samples -- for a linear system this will be no more than the number of
states in the system.

As Peter pointed out, most systems aren't even close to being well
behaved enough to be amenable to deadbeat control.  It's of very minor
interest in those cases where the plant is well enough behaved to allow
it, and probably of more interest to serve as an absolute "you'll never
ever do better than this" upper limit to performance.


That won't matter much; as long as the engine always responds quickly
enough to input you can probably approximate it as responding
instantaneously.


(I meant to say fs/2 here, where fs is the sampling frequency -- at any
rate it's when the system ping-pongs between being too high and too low
every sample).


Yes, but it's the integrator gain you'd be lowering.  The system as Bruce
described only needs integrator gain, if you're thinking of it in PID
terms.  A pure-integrator controller is often the best thing to use when
you have a very prompt plant.

--
http://www.wescottdesign.com

Site Timeline