Implementing Control Theory

Discussion in 'Electronics Resources' started by royourboat, Apr 15, 2010.

  1. royourboat

    Thread Starter New Member

    Apr 15, 2010
    10
    0
    I am interested in the practical side to control theory. I am halfway through studying a control theory course and am having some difficulty in understanding how one would go from transfer functions to circuits among many other things.

    I searched the forums, and someone using a PID implementation to make a line following bot was the most relevant. It mentioned the 'Applied Control Theory for Embedded Systems' text, however that doesn't give a single circuit, not really what i'm looking for.

    I would rather start with the continuous and or classical side of control, and do some experimentation.


    Examples of what would be helpful / Questions I need to research:

    1. How do you model tf of simple plant (ie. brushless dc motor). Convolution theorem?
    2. What does instability 'act' like if the plant is a motor or an actuator?
    3. If you know the frequency of the input why all the analysis and plotting of various frequencies?
    4. How do damping ratio, insert random greek symbols here, affect this plant?
    5. Assuming I become competent and have the theory sorted out, what are the building blocks of analog control circuits?

    I have little experience in circuit design, but probably have access to the tools/facilities I may need.

    More importantly I am motivated. Especially coz finding some answers will shorten my current reading list :eek:
    Modern Control Engineering, Ogata
    Control System Design, Goodwin
    Control System Design Guide, Ellis
    Mechatronics, Bolton

    Please help :(
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,140
    1,789
    Your question is too broad to answer in a single post, but let me get started with your question #2.

    2. What does instability 'act' like if the plant is a motor or an actuator?

    The simple answer is that instability 'acts like' the inability to control either the angular position or the angular velocity of the motor. The observed behavior would be an oscillation back and forth around a commanded position. Real trouble would ensue if the magnitude of the oscillations increased on each cycle. This is a common behavior in non-linear systems called limit cycling. It is stable in the sense that the magnitude of the error is bounded, but it is undesirable in a system where the goal is to drive the error to zero.

    In a velocity control system this behavior would look like speeding up and slowing down without being able to run at a constant velocity.

    True instability where the system response grows without bound has mechanical limits in a motor with winding resistance and inductance as well as bearing friction.

    There is one more behavior that I might mention and that is resonance. Some motors, particularly stepper motors, will sit and vibrate at several thousand hertz with very small magnitude if they are excited at particular frequencies.
     
  3. Ghar

    Active Member

    Mar 8, 2010
    655
    72
    You can implement a lot of basic control laws with op amps circuits with resistors and capacitors.

    How you model things depends on your scheme. If you have control over voltage (as in a power supply) you'd have to derive transfer functions from input voltage to motor speed or position or whatever.
    To do that you need to know how to model a motor which comes from electric machine theory. The basic models are pretty simple.

    You look at many frequencies because your input isn't a single frequency. The most common thing you apply is a step response or maybe a ramp - turn it on, suddenly change speed, slowly change speed, whatever. Those types of signals have many frequencies.
    You also need to look at many frequencies because at some point (or always) the frequencies will still exist. If the system is unstable they will emerge and dominate the behaviour in oscillation.

    Damping ratio and all that good stuff affects how the plant behaves. How quickly does it track your input and how cleanly? Is there overshoot? Can it actually track it?
     
  4. royourboat

    Thread Starter New Member

    Apr 15, 2010
    10
    0
    Ok, well I haven't done any power engineering yet / own a text on the topic. A textbook that has experiments or takes you through modelling of plant is really what I'm looking for. Any ideas?

    This doesn't make a great deal of sense to me. A step or ramp doesn't have a frequency or am I :confused:? Frequency is for periodic signals!

    I can appreciate that knowing where or if there are instabilities so you can be wary of your frequency straying into taht area. But doesn't a !(*%(*&!@ of plant out there run on 415V & 240V (Aus light industrial 3phase & domestic) both at 60Hz? I suppose they aren't directly wired or we wouldn't be discussing controllers (in series between power and plant usually i suppose). But again, I figure most things are running off the same national standard frequency?

    Thanks Ghar & Papabravo! :Thumpsup:
     
  5. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    Have you studied Fourier and Laplace Transform theory yet? It seems you have not, and this may be the biggest obstacle to understanding control theory. Once you study this, you will learn that a step and a ramp, or even an impulse function have all frequencies.

    There is another aspect to frequencies that are important in control theory. The spectrum of the input and output is important, of course. However, an equally (or more) important consideration is noise, which includes a broad band of frequencies. This relates to stablity. An unstable system can oscillate by building up noise via positive feedback.
     
  6. royourboat

    Thread Starter New Member

    Apr 15, 2010
    10
    0
    steveb thanks for your reply.

    1. I know Fourier and Laplace transforms, but not thoroughly.. I understand Laplace transform is a converter from time to s-domain which brings de's back to algebra in s, so its simple solve. Fourier is s=jw so, more of a complex argument of x+jw, instead of s. (Haven't done any DSP of DFTF etc.)

    2. So thats what I understand, but I still miss how steps and ramps etc have frequencies! That is unless you mean that anything periodic (which shouldnt include ramps and steps) can be represented as a sum of sinusoids by way of fourier series.. (the basis of freq. response analysis).

    3. I don't understand exactly what you mean by spectrum of frequencies of i/o signals, unless you are referring to noise and complex/messy signals?

    4. I did pick up in a recent lecture that noise account for the need to design for stability in many frequencies. Which now makes sense if your input is effectively a non-ideal DC current, frequencies of the noise can make the plant unstable.
     
  7. royourboat

    Thread Starter New Member

    Apr 15, 2010
    10
    0
    BUMP.

    Regarding 2 from previous post.

    Do you mean that ramps and steps have a frequency, if you repeat them as square and triangle waveforms?

    5. Can anyone recommend a text for state space design of controllers?
     
  8. Ghar

    Active Member

    Mar 8, 2010
    655
    72
    No, we don't mean ramps with a frequency, we just mean ramps.

    Think of it this way... say you have a sinusoid for 10 cycles and it suddenly stops.
    Did you or did you not have a defined frequency? It didn't last forever (it was only 10 cycles) so it's not strictly periodic but until it ended it looked like it was repeating perfectly.

    If you play music you don't have strictly periodic waveforms. Various frequencies come and go and only last a short time. None of it is purely periodic unless each note lasts forever.

    The Fourier Transform (not the Fourier Series) is used for finding frequencies of non-periodic waveforms. Look it up online.
     
  9. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    So even a single non-repetitive pulse has a frequency spectrum associated with it.

    An ideal single, perfectly square pulse has an infinite continuous spectrum from ±∞ Hz. Of course, such a pulse does not exist as a physical entity.

    One of the interesting consequences of this is that one can notionally apply a single impulse of given parameters to a system and measure the system frequency response indirectly by capturing and analysing the corresponding output signal. All with a single measurement!
     
  10. royourboat

    Thread Starter New Member

    Apr 15, 2010
    10
    0
    Argh, yes I remember now that you can produce a frequency spectrum plot of a signal from the fourier transform. Showing that any signal has every frequency in varying amounts.

    I can see how this may pose a problem to my understanding of control theory. I will have to review this after exams. :(

    Does anyone know of books to read wrt designing controllers, using any methods?
     
  11. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    It is very easy to find books that tell you how to design digital controllers. These are simply implemented in code on a microprocessor or DSP, so it is easy to go from the mathematics of a book directly to the programming in a real system.

    The more difficult thing is finding books that show you how to design analog controllers in actual circuitry. They probably exist, but I think most of us just figure this out on our own. Once you know the basics of analog control theory, you can figure out how to use your knowledge of analog components and analog circuits to implement something physically. This usually relies heavily on theoretical or computer modeling to understand the system responses (both control circuitry and the system you wish to control).

    There is no substitute for establishing a strong foundation of fundamentals in ALL relevant areas including, linear control theory (digital and analog), linear system analysis (Fourier, Laplace), analog electronics (transistor, opamps etc), digital electronics (logic and microprocessors), mathematics and physics (mechanics, thermal, optical, electromagnetics etc). Once you have these fundamentals down (which does take time, so be patient) you will instinctually know what to do, even without a book.

    Note that Matlab/Simulink is a good modern day tool for any control design work. It saves much time and can even help teach you. Often I go many years between needing to do control system design, Matlab generally gets me up to speed, and clears the cobwebs from my mind very quickly.

    Once you are comfortable with linear control system design, you can move to nonlinear system control.
     
  12. Ghar

    Active Member

    Mar 8, 2010
    655
    72
    The Nise book briefly shows some op-amp circuits implementing some control laws. Not enough to really build it but a very good start.
    It's a pretty good book and I enjoyed it though it's strictly introductory stuff. Good intro to many topics though, including digital control.
    I think most of my school's intro courses use it.

    Being a popular undergrad textbook you know it's expensive...
    http://www.amazon.com/Control-Systems-Engineering-Norman-Nise/dp/0471794759/
     
  13. royourboat

    Thread Starter New Member

    Apr 15, 2010
    10
    0
    Agreed. If it wasn't clear (my bad), but finding material on implementation of analog controllers was the basis of the thread! That said, thank you for your post steveb.

    I am obviously studying fundamentals, but I have a strong need of understanding the practical (the end game for me). So when you emphasise the fundamentals, I can truly appreciate that, I'm just impatient ;)

    Thanks Ghar, I will have a squiz, but I have found what is probably identical in my Uni's text, Modern Control Engineering by Ogata. The single page or so has Op-amps implementing P->PID+ with relevant equations. As you said, its enough to start.
     
Loading...