Shop OBEX P1 Docs P2 Docs Learn Events
Bode Plots — Parallax Forums

Bode Plots

El PaisaEl Paisa Posts: 375
edited 2007-08-07 21:29 in Propeller 1
I am really impress with the capabilities of the Propeller.
Looking forward to play with it for long time.

In regard with the thread Bode Plotter, is unfortunate name for the thread.
It should been named Open loop Frequency Analyzer or something similar.

By definition a Bode Plot is· the plotting of system Stability of Servos Systems (constant velocity or constant position) or closed loop systems such as Power Supplies.

It is defined as:

·Gain(freq) = 20 * log10 * [noparse][[/noparse]Vin(freq) / Vout(Freq)]· in Decibels

For more information see http://www.motionvillage.com/training/handbook/resources/1999_03_bode_plots.pdf

Obtaining Bode Plot results is not a trivial matter. It uses sophisticated piece of equipment (see http://www.venable.biz/pr-products.html) and normally is plotted in semi-log paper.

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-04-05 14:58
    There are many uses of Bode Plots, in microwave design we would create 4 sets S figures on bode plots in addition to polar plot frequency response. In its most general definition it is the complex response (real plus imaginary (or magnitude plus phase)) to frequency. The are most frequently used in active filter design but have a wide host of applications

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    6+6=10 (Long live the duodecimal system)
  • El PaisaEl Paisa Posts: 375
    edited 2006-04-05 15:06
    Are refering to Bode Plots or Niquist plots
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-04-05 15:25
    We used both, both plots impart different information, and both Bode and Nyquist plots are used in a wide variety of applications.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    6+6=10 (Long live the duodecimal system)
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-04-05 15:30
    Ok, here's an important question that I've been struggling with.
    Is it Bode pronounced like Toad or Roady.· I've heard it both ways.
    -Martin
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-04-05 16:01
    I always heard it pronouned with the long vowels for both the o and e, so it would rhyme with Roady.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    6+6=10 (Long live the duodecimal system)
  • El PaisaEl Paisa Posts: 375
    edited 2006-04-05 16:04
    Joke, right?
    Seriously, Bode plots applies only to closed loop systems.
  • Shawn LoweShawn Lowe Posts: 635
    edited 2006-04-05 16:26
    Ok, I should know this!· (But I'm not sure..) Bode Plots are just a graphical representation of paraments in a system versus frequency( given in logarithmic values usually). Parameters being gain, or voltage, ect. There is no qualification·as to a Bode Plots only being usable on a closed loop system since I can get a Bode plot of the voltage on a capacitor versus frequency in a RC circuit. This would show the cutoff frequency of the filter (or pass frequency).

    Of course, what your definition of closed loop is·might dictate if you are correct.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Shawn Lowe


    My last words shall be - "NOT YET!!!"
  • Russ MillerRuss Miller Posts: 25
    edited 2006-04-05 16:30
    El Paisa: Bode plots simply depict the transfer function of a system, so they are often used for open loop systems in modal analysis, and RLC networks. Of course for classic feedback control systems we can also get stability and performance information from them.

    Martin and Paul: I had a controls professor who claimed the correct pronounciation was Bo-duh based on Henrik Bode's dutch ancestry. bo-dee is what I hear most often though.

    Russturn.gif
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-04-05 16:46
    Russ, you're probably correct.

    El Paisa, I beg to differ, wikipedia defines Bode plot as:

    "A Bode plot, named for Hendrik Wade Bode, is usually a combination of a Bode magnitude plot and Bode phase plot:

    A Bode magnitude plot is a graph of log magnitude against log frequency often used in signal processing to show the transfer function or frequency response of an LTI system.

    ...

    A Bode phase plot is a graph of phase against log frequency, usually used in conjunction with the magnitude plot, to evaluate how much a frequency will be phase-shifted."

    and http://www.swarthmore.edu/NatSci/echeeve1/Ref/Bode/Bode.html·states:

    "Bode plots are a very useful way to represent the gain and phase of a system as a function of frequency.· This is referred to as the frequency domain behavior of a system."

    and goes on to show for the first example this circuit:

    BodeWhatCirc.gif
    This is the run of the mill 1st order low pass filter, I was taught this is an open loop system, where Vin is the input, Vo is the output and Vo is not in a feedback configuration with Vin (ie the Value at Vo has no effect on the value of Vin).
    You are correct that Bode Plots are very useful when determining the stability of a system which employs feedback, but that is not the only purpose of using Bode plots.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    6+6=10 (Long live the duodecimal system)
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-04-05 16:55
    Interesting discussion, but from a research point of view, any time you cite wikipedia as a reference you lose credibility. Just the university researcher coming out in me. It happens so seldom...

    At least in our technical education, we use the term Bode Plot anytime we show a relationship of frequency and amplitude. It's nice to have learned it's so much more involved and versatile.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    Southern Illinois University Carbondale - Electronic Systems Technologies

    Personal Links with plenty of BASIC Stamp info
    StampPlot - Graphical Data Acquisition and Control
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-04-05 16:59
    Sorry Martin, Im at work and dont have access to my shelve of textbooks. Also Its easier to cut and paste than type something from a book. I know the whole ins and outs of using wikipedia as a reference, I can never use it to reject a patent application, the site is too volatile to be able to establish a proper date of priority. Also the review board frowns upon non-authoratative sources.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    6+6=10 (Long live the duodecimal system)
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2006-04-05 17:04
    El Paisa,
    ·
    You are correct...
    ·
    Gain(freq) = 20 * log10 * [noparse][[/noparse]Vin(freq) / Vout(freq)]· in Decibels
    ·
    ...And what I displayed is basically...
    ·
    Frequency vs. Magnitude
    ·
    ...So this really becomes a scaling issue that my graph is not displayed in Decibels or that the Frequency is linear and not logarithmic.
    Trivial for a Bode magnitude plot where the information wealth is in the frequency response.
    ·




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 4/5/2006 5:13:57 PM GMT
  • El PaisaEl Paisa Posts: 375
    edited 2006-04-05 17:41
    My understanding of the Bode plot is normally used to·indicate if a Closed Loop System ( a system that consist of a Reference, Error Amplifier and some sort of feedback, and some lead a lag networks) is stable or not.

    The Rate of closure (slope) of the system gain crosses the zero gain axis (also called gain margin and corresponding phase margins).

    If the slope is equal to 20 db/decade or less, the system is stable, if the slope is more than 20 db/decade, the system will oscillate under certain load conditions.

    Some people call this a damped or under-damped system.

    This is very important in the design of Power Supplies, constant velocity and constant positions systems.



    ·
  • AndreLAndreL Posts: 1,004
    edited 2006-04-09 06:10
    A bode plot, pronounced "boda" like "roada" has nothing to do with open loop, closed loop, or whatever its simply a logarithmic plot of frequency response of an electrical two port network's gain or transfer function, simple as that. A bode plot can be used to analyze the transfer function of a resistor if you like. One thing though, you guys have your log term inverted, gain is = output / input, so the correct math is:

    Gain db(freq) = 20 * log10 * [noparse][[/noparse]Vout(freq) / Vin(freq)]

    And many times you will see the parameter being "S" used which is the S-domain:

    Gain db(s) = 20 * log10 * [noparse][[/noparse]Vout(s) / Vin(s)]

    Which is much more flexible than time or frequency, see laplace transform, many times when analyzing complex circuits the output and input is written in terms of the S parameter after a laplace tranform of the function from the time domain, this converts any differential/integral components into algebraic factors of S, thus, a transfer function might look like "1/SC" <-- capacitor's transfer function, which is much better than v(t) = 1/c * integral [noparse][[/noparse]i dt]! Then when you are done, you convert back to the time domain with an inverse laplace.

    Also, be careful since technically a bode plot is the result of exciting the system with a single sine wave, not a summation/series of them like a square wave. When you do that, then you get a infinite series response where each term is the indepedently seperarable sine term that makes of the square wave, so the result is a summation of terms, there is no such thing as a square wave bode plot, since every network will attenuate all the harmonics that make up a squarewave related to the fundamental, so you "loose" information in the bode plot if you tried to plot a square, since the "squareness" of the wave would be lost and is not plotted, so transfer functions and bode plots are only good for impulse and pure sine waves, then the total response is a series for every fundamental sine wave that composes the wave forms you plan to excite the system with, since every waveform in the universe can be constructed from sine waves.

    Andre'
  • POLOCEROPOLOCERO Posts: 4
    edited 2006-04-12 23:07
    Hello I'm really interested on this forum, from my point of view, all the posts are right, because at the end Bode Plots are twice, in one hand·Magnitude versus·Frecuency diagram, but too Phase versus Frecuency diagram, remember that the real advantage is, on the simultaneous look at this two representations, sometimes used to know how far stable are closed loop systems (remember the trick is on the root pole zero representation, you can move pole's touching on gain value, making system get into stable/unstable situation, left/right to the jw axis), only taking a look at these bode plots, you can predict how far·frecuency you can increase, being on stable situation, but not only for closed loop systems, you can use it too, for example, as i have been posted, for representing filter responses, looking at Magnitude Vs Frecuency plot, and Phase·shift between input and output (usually called delay on·filter) looking·at Phase Vs Frecuency plot.

    In what I'm really interested is on the open door for spectrum analyzer, as all of us knows, these kind of DFT calculators needs to have very hard computation capabilities, and i would like to start talking about it.

    ¿Has enough power to know speech recognition?

    ¿What kind of future CMU's cam's could be developed with this SX son?

    I think that there exists a barrier in wich engineers must take a decision between using DSP or MICROCHIPS, and this new popeller·makes fuzzy the line.

    Of course there exists DSP's like texas wich has GHz·internal clocks, used for military applications, but·until now, systems like speech recognition, were using ASICS, and i hope this Propeller to be able to develop the first·non DSP ASIC·Real time systems, like new CMU improvements·and massive data systems.

    Thank you very much to whole the people skiping on·singulars, to·looking at these new important questions.
  • cgraceycgracey Posts: 14,133
    edited 2006-04-12 23:44
    Yes, these are things of big importance!

    Frequency, phase, magnitude, and·pitch (difficult), are all keys to being able to do amazing things. I hope the Propeller gets applied to these concepts so that we could do things like speech recognition. The DFT/FFT/Goertzel algorithms open up whole new worlds for microcontroller programmers. It's like finally being able to get on top of complex signals and be able to look at them from other perspectives, or maybe 'other dimensions' is more apt. This is what I dream·of doing with the Propeller. The new demo board will·have an electret microphone with 2 resistors and 2 caps, so that it can be digitized by a CTR on a COG.·When I·first·got it running, I made a simple echo, and then started a flanger. I want to make a pitch detector so that we could·map vocal pitch to musical notes (the closest one), and then drive·a synthesizer to make some other noise from that. Also, if we could make a formant detector, we'd be a long ways towards a speech recognizer.
    POLOCERO said...
    Hello I'm really interested on this forum, from my point of view, all the posts are right, because at the end Bode Plots are twice, in one hand·Magnitude versus·Frecuency diagram, but too Phase versus Frecuency diagram, remember that the real advantage is, on the simultaneous look at this two representations, sometimes used to know how far stable are closed loop systems (remember the trick is on the root pole zero representation, you can move pole's touching on gain value, making system get into stable/unstable situation, left/right to the jw axis), only taking a look at these bode plots, you can predict how far·frecuency you can increase, being on stable situation, but not only for closed loop systems, you can use it too, for example, as i have been posted, for representing filter responses, looking at Magnitude Vs Frecuency plot, and Phase·shift between input and output (usually called delay on·filter) looking·at Phase Vs Frecuency plot.

    In what I'm really interested is on the open door for spectrum analyzer, as all of us knows, these kind of DFT calculators needs to have very hard computation capabilities, and i would like to start talking about it.

    ¿Has enough power to know speech recognition?

    ¿What kind of future CMU's cam's could be developed with this SX son?

    I think that there exists a barrier in wich engineers must take a decision between using DSP or MICROCHIPS, and this new popeller·makes fuzzy the line.

    Of course there exists DSP's like texas wich has GHz·internal clocks, used for military applications, but·until now, systems like speech recognition, were using ASICS, and i hope this Propeller to be able to develop the first·non DSP ASIC·Real time systems, like new CMU improvements·and massive data systems.

    Thank you very much to whole the people skiping on·singulars, to·looking at these new important questions.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • cgraceycgracey Posts: 14,133
    edited 2006-04-13 00:01
    Here's a spectograph program I've been writing which lets you view the sound spectrum in 3D (time, frequency, amplitude). It's also a test-bed for a speech synthesis algorithm that I hope to get running in the propeller, eventually.

    SPACE = play buffer (comes up with synthesized singing, product of algorithm)

    ENTER = record from PC microphone

    LeftClick-Drag-Release = play portion of visible buffer (works forward and reverse)

    RightClick = replay what was last played

    MiddleClick = toggle magnified/absolute waveform view

    MouseWheel = increase display gain

    S = save buffer as test.wav

    Have fun. This lets you see what your ear 'sees'!


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.

    Post Edited (Chip Gracey) : 4/13/2006 3:50:32 AM GMT
    zip
    214K
    fft.zip 214.2K
  • POLOCEROPOLOCERO Posts: 4
    edited 2006-04-13 09:54
    Nice job CHIP Gracey!, pretty good!!!, i hope this software could be download to the propeller chip, but let make you a question ¿what programmming language have you used to develop this Fourier transform application?, i usually use Borland C++, do you think it would be possible to put something like this inside Propeller?.


    Recently i have developed a kind of Goertzel Algorithm for touch tone decoding on a texas instruments DSP evaluation board, the goal was to obtain a code on 4 leds, indicating what the phone DTMF key was pressed on phone, using on board mic to sample sound from speaker mobile phone.

    Another application was to be able to generate the DTMF codes using IIR Filter, i have had a SX developent system, know that is able to do this, thinking about developing a modem with only one propellet chip, thinking too on installing caller ID function using some COG's, nice modem with caller ID.

    For whole the people thinking about how goertzel algorithm works, i will post my matlab development, is like DFT but only calculated in one point.

    Very easy to be understood and embedded on a board, can be helpfull on aplications in wich you need spectra analysis but not in whole the spectra, unles only some points.


    wait until come back to my country, i have this one on my hard drive there!

    it's strongly·recommended to take a look at www.flexipanel.com, modules using bluetooth can be very good friends of Propeller because the voice transmit enable option of bluetooth protocol!!

    Continue posting about Digital Signal Processing Issues please, i think it's going to be the great advantage of this kind of DSP and MICROCONTROLLER named Propeller

    Thanks!

    Post Edited (POLOCERO) : 5/5/2006 1:11:24 PM GMT
  • cgraceycgracey Posts: 14,133
    edited 2006-04-13 21:38
    POLOCERO,

    This spectograph app was written in Delphi, but the FFT algorithm was coded in 386 assembler for speed.

    Yeah, the Goertzel algorith is really simple and not hard to understand. Just keep multiplying and accumulating your incoming samples by advancing SINE and COSINE values and then, at some point, compute the hypotenuse of the SINE and COSINE accumulators. Then, you get the energy. The longer you accumulate for, the tighter the bandwidth, and vice-versa.

    I once saw a NASA tech note where rather than using SINE and COSINE, +/-1 was used, resulting in the samples being XOR'd with a bit-per-SINE and bit-per-COSINE quadrature pattern, and these resulting bits drove binary up-down counters to create the accumulators. Very simple. It had ghosting at the third and, lessly-so,·fifth harmonic, since a square wave had effectively been used instead of analog sine and cosine. I thought that was an amazing reduction of the Goertzel algorithm - reduced to XOR's and UP-DOWN counters, but still useful for finding a needle in·a haystack!
    POLOCERO said...
    Nice job CHIP Gracey!, pretty good!!!, i hope this software could be download to the propeller chip, but let make you a question ¿what programmming language have you used to develop this Fourier transform application?, i usually use Borland C++, do you think it would be possible to put something like this inside Propeller?.


    Recently i have developed a kind of Goertzel Algorithm for touch tone decoding on a texas instruments DSP evaluation board, the goal was to obtain a code on 4 leds, indicating what the phone DTMF key was pressed on phone, using on board mic to sample sound from speaker mobile phone.

    Another application was to be able to generate the DTMF codes using IIR Filter, i have had a SX developent system, know that is able to do this, thinking about developing a modem with only one propellet chip, thinking too on installing caller ID function using some COG's, nice modem with caller ID.

    For whole the people thinking about how goertzel algorithm works, i will post my matlab development, is like DFT but only calculated in one point.

    Very easy to be understood and embedded on a board, can be helpfull on aplications in wich you need spectra analysis but not in whole the spectra, unles only some points.


    wait until come back to my country, i have this one on my hard drive there!

    i extremly recommend to take a look at www.flexipanel.com, modules using bluetooth can be very good friends of Propeller because the voice transmit enable option of bluetooth protocol!!

    Continue posting about Digital Signal Processing Issues please, i think it's going to be the great advantage of this kind of DSP and MICROCONTROLLER named Propeller

    Thanks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • POLOCEROPOLOCERO Posts: 4
    edited 2006-05-02 10:08
    Here I am again!, and as I promised in last post, this is the matlab programs for IIR generation and Goertzel algorithm, moreover, i've programmed it on DSP board and show on led binary code, the·touched tone.

    The use is the following, first of all, generate DTMF tone with the first .m file, and then use the digital sample file generated, to accomplish the Goertzel transform over the sample file generated, note that the Goertzel algorithm is programmed for standard touch tone telephone, and if anyone likes to use it on different frecuencies, code should be changed.

    I'll send a PDF with user manual·of this files in matlab, and a multisample algorithm, that for everybody to understand it, is the way of changing the sample frecuency of a sampled wave, without converting to analog...so having the digitalized wave, you can change the sample frecuency used for digitalizing it!!, is useful when using·circuits·having different sample rates, and so on, for vocoder purposes changing pitch.

    Now i'm developing internet controlled robot, i will develop new subject forum related to this idea.



    Enjoy it!

    Post Edited (POLOCERO) : 5/5/2006 1:32:24 PM GMT
  • Michael OBannonMichael OBannon Posts: 19
    edited 2006-05-02 18:03
    Is there any chance we could get Propeller objects for FFT's (even with limited frequency range) and FIR and IIR filters? I know the filter algorithms are very straightforward, but for those of us with rusty assembler skills, optimized versions would sure give a quicker start.

    Thanks,
    Michael
  • dkemppaidkemppai Posts: 315
    edited 2006-05-02 20:38
    Paul Baker said...
    Sorry Martin, Im at work and dont have access to my shelve of textbooks. Also Its easier to cut and paste than type something from a book. I know the whole ins and outs of using wikipedia as a reference, I can never use it to reject a patent application, the site is too volatile to be able to establish a proper date of priority. Also the review board frowns upon non-authoratative sources.

    I surprised you didn't reference the source...· [noparse];)[/noparse]

    ·
  • POLOCEROPOLOCERO Posts: 4
    edited 2006-05-11 21:20
    News, take a look at this PDF of how to generate sin wave with IIR filter.

    Enjoy it!
  • mcstarmcstar Posts: 144
    edited 2007-08-07 21:29
    I like the spectrograph! I'm inspired to create my music like the singing monks... any chance we could get an "open wave" file feature for the tool???
Sign In or Register to comment.