Digital implementation of a control design

Translate This Thread From English to

Threaded View


Hi, I'm kinda new in this world of control design. I have a simple
question.

I read some tutorials on the net (like this one:
http://www.engin.umich.edu/class/ctms/examples/motor/freq2.htm ).  It's
about speed control of a motor using a Frequency Design Method (Blode
plot, etc...).

Ok, once I have the desired parameters of the controller, how do I
digitally implement it.  All the design is in the frenquency domain
(LaPlace).  Do I have to switch back to time domain and work with
that? I'm a little bit lost.  I just want to be able to *code* the
controller.

B.T.W if you know a excellent book on this (undergraduate/graduate
level) that explain the implementation too, this would be great!!!

Thanks

Re: Digital implementation of a control design



On Thu, 07 Feb 2008 18:59:44 -0800, reginald.louis wrote:


This article has an itty bitty bit of what you want:  http://
www.wescottdesign.com/articles/zTransform/z-transforms.html

What you _really_ want is my book, which you can read about here: http://
www.wescottdesign.com/actfes/actfes.html.  If you like the above article
but wish there were more detail, you'll find bits of it scattered -- and
expanded -- through three or four chapters of the book.

I prefer to model the plant in the z domain as it's seen by the
processor, then do all my Bode (and Nyquist) plot design in that domain.  
That way I know that I'm not making any further approximations when I go
from my z domain model of the controller to my discrete-time real
controller.  It's the method I concentrate on in the book -- but I do
show how to approximate an s-domain transfer function in the z domain by
several popular methods.

--
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com

Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html

Re: Digital implementation of a control design



Tim Wescott wrote:

I hope you advise him to sample at a high enough rate to obviate the
need for much (if any) anti-alias filtering. The OP needs to realize
that a one-sample delay at the sampling frequency creates a 180-degree
phase lag.

Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Re: Digital implementation of a control design



Jerry Avins wrote:

I don't do so in quite the same terms.  I do advise them to avoid
anti-alias filtering unless they're in a noisy environment, and give
guidelines for selecting a sampling rate that is high enough.

Most anti-aliasing filtering plays merry hell with sampled-time control
loops; it's usually better to smile and put up with the aliasing, or
increase one's sample rate.

The only exception to this is a comb filter, where you integrate your
inputs for one sample time, then sample-and-dump the integrator state.
This gives an additional delay, true, but it also automatically puts a
notch over each and every harmonic of the sampling rate, so any noise
that may alias down to within the bandwidth of the control system is
severely attenuated.  Generally you can buy back the cost of the delay
by increasing your sampling rate by less than a factor of 2, and in a
noisy environment it can significantly quiet down the drive to the plant.

--

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

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html

Re: Digital implementation of a control design




http://www.wescottdesign.com/articles/zTransform/z-transforms.html

http://www.wescottdesign.com/actfes/actfes.html .  If you like the above article

I just bought your book this week! So far so good!

Re: Digital implementation of a control design



On Feb 7, 6:59 pm, reginald.lo...@gmail.com wrote:

Have you been working on this since September?


This is a good place to start.


What was wrong with the PID from last September?  Did you try it?


That is evident.


I have provided you with the code already.  It is the understanding
that you need and don't have.  Otherwise you wouldn't be asking.


My favorite is
http://www.amazon.com/Digital-Control-System-Analysis-Design/dp/013309832X
There are probably better ones based on the reviews.  I have many of
the same complaints but it is the only one of the three that I have
that go from laplace to difference equation.

One more thing.  It has all been done before, many times.  Search for
my name and the links to .pdf files.  They are examples of what you
need to know.


Peter Nachtwey

Re: Digital implementation of a control design



On Feb 7, 9:59 pm, reginald.lo...@gmail.com wrote:

one:http://www.engin.umich.edu/class/ctms/examples/motor/freq2.htm ).  It's

If your controllers bandwidth is much greater than the relative
bandwidth of the system you are controlling then your continuous time
design will do fine. Another way of saying this is if your sampling
frequency is high enough (meaning much faster than the fastest
dynamics of your process--more than 10 times) then you will come very
close to the desired continuous time design.  Also, remember that eigC
= exp(eigC*Ts)
Where eigC is the continuous time eigenvalues of your system (the one
you designed) and Ts is the Sampling Interval (1/Fs or 1/sampling
frequency).

Hope that helps.
sam

Site Timeline