Bode Plotting Band Pass Filter

Discussion in 'General Electronics Chat' started by Mechatronical, Feb 19, 2014.

  1. Mechatronical

    Thread Starter Member

    Feb 15, 2014
    30
    0
    Preface:
    My inverting-active-RC band pass filter is made up of a first order low pass filter and a first order high pass filter, which combined makes a second order band pass filter, with the following transfer function:

    H(jω) = R2C1jω / (R2C2jω+1)(R1C1jω+1)

    Replacing jω with s:

    H(s) = s/(ω0+s) * ω0/(ω0+s) = ω0s / (ω0+s)^2
    But for band pass filters with high Q Factor (Quality Factor):
    H(s) = (ω0/Q)s / s^2 + (ω0/Q)s + ω0^2

    Problem 1:
    Which one of the H(s) should I be using?

    Problem 2:
    When bode plotting either of them, I get very strange graphs.

    In one situation I want to see the settling time, pike time and overshoot.
    On the other hand, I want to see the typical plot of bandwidth.
    What am I doing wrong and what are you observing?

    Here's an example of what I see:
    http://www.wolframalpha.com/input/?i=bode+plot+19364s/(s^2+38729s+375000000)

    Values:
    R2=R1=10K ohm
    C1 = 10nF = 10*10^-9 F (Farad)
    C2 = 1nF = 1*10^-9 F
     
  2. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,392
    497
    "In one situation I want to see the settling time, pike time and overshoot."
    Band pass filter operates at a range of frequencies, meaning it operates at more than one frequency. These parameters that you want to see, they would have to be recalculated for each frequency, so you will have thousands, maybe tens of thousands of plots. Drowning in data is kinda useless.

    "On the other hand, I want to see the typical plot of bandwidth."
    The bode magnitude plot does not look good. It seems you have very very very narrow band pass region. The rule of thumb is draw the horizontal line at -3 dB mark, since you are doing band pass, the line will cross your plot in two places, the region between the two intersections is your band pass region. You can double check it. Take the intersection point and drop down to the frequency axis, you intersection point should be at the cutoff frequency. Since you are doing band pass, left most intersect will be at lower cutoff frequency, right most intersect will be at higher cutoff frequency. Higher cutoff frequency minus lower cutoff frequency is equal to bandwidth.
     
  3. Mechatronical

    Thread Starter Member

    Feb 15, 2014
    30
    0
    Here is the rest of the data:
    lower cut off frequency; ωl = 15000 Hz
    upper cut off frequency; ωu = 25000 Hz
    Center frequency; ω0 = sqrt(ωl*ωu) = 19364 hz
    Bandwidth; B = ωu-ωl = 10000 Hz
    Quality Factor: ω0/B = 19364 Hz / 10000 Hz = 1.93

    My set up in Scilab for
    H(jw) = R2C1jw/[(R2C2jw+1)(R1C1jw+1)] -->
    H(s) = R2C1s/[(R2C2s+1)(R1C1s+1)]
    H(s) = 0.0001s/[(0.00001s+1)(0.0001s+1)]

    http://s30.postimg.org/6ska8mmep/Scilab.png
     
  4. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    Clearly with the configuration you chose you can only have real valued roots for the second order equation. Thus your damping factor is greater than unity.
     
  5. LvW

    Active Member

    Jun 13, 2013
    674
    100
    Mechatronical, some comments from my side:

    1.) Of course, for the BODE plot you should use the actual transfer function which belongs to your circuit - and NOT the theoretical expression which applies for a conjugate-complex pole pair only (that means: Q>0.5)

    2.) The shown BODE plot looks good. It has a slope of 20 dB for frequencies below and above the center frequency - as expexted.
    (I don`t know why the member shteii01 wrote it wouldn`t look good).

    Comment: "looks good" means: As expected. From the theoretical point of view (filtering action) it is a rather poor bandpass with a Q value of app. 2 only. Nevertheless, realize that it is a theoretical response of the given transfer function and not of the actual filter with two real poles which allow a quality factor Q<0.5 only.


    3.) The mentioned properties (settling time, pike time and overshoot) cannot be seen in the BODE plot because these parameters are measured in the TIME domain only (TRAN analysis). However - what is "pike time"?


    Further comment:
    Replacing jω with s: H(s) = s/(ω0+s) * ω0/(ω0+s) = ω0s / (ω0+s)^2

    You should recalculate this line. It is not correct.
     
    Last edited: Feb 20, 2014
  6. LvW

    Active Member

    Jun 13, 2013
    674
    100
    Mechatronical,

    only now I have checked your Q calculation derived from the shown BODE plot.
    It is not correct.
    By comparing the actual transfer function (as given on the Wolfam page) with the general form (expressed using Q and wo) you will get the following values:

    wo=SQRT(375000000)=19364.9 rad/s
    Q=wo/38729=0.5

    Furthermore, please note that angular frequencies w are given in rad/s rather than in Hz. The unit Hz=1/s is reserved for frequencies f=w/2Pi only. Otherwise, misunderstandings are probable.
     
    Last edited: Feb 20, 2014
  7. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    It would be particularly helpful if you posted a schematic of your BPF with component values shown. Otherwise it's difficult to visualize & understand the issues you are discussing.

    For instance, what circuit topology gave you the transfer function below?

    H(jω) = R2C1jω / (R2C2jω+1)(R1C1jω+1)

    I've checked another of your threads - is this it ?

    http://www.electronics-tutorials.ws/filter/fil51.gif
     
    Last edited: Feb 20, 2014
  8. Mechatronical

    Thread Starter Member

    Feb 15, 2014
    30
    0
    Thank you so much for your feedback :D! I have been studying "regulation engineering" where we're used with time domain while we're used to the dB/magnitude and frequency analysis in electrical engineering. I did really good in these majors but I get awfully confused when comparing them.


    First of all, I have designed the bandwidth to be 10'000 Hz deliberately, so it is neither good or bad. It is what it is. A wide band pass filter. I also agree the bode plot looks good now (after getting some proper sleep).

    Let me give you some data, and illustrate how I calculate the Q factor:
    Warning: This data does not correlate to the values of R2=R1=10KΩ,C1=10uF and C2=1uF as bode plotted, it's just a "template"
    low frequency cut off: ωl = 15000 Hz
    high frequency cut off: ωh = 25000 Hz
    center frequency ω0 = sqrt(25000*15000) = 19364 Hz
    Bandwidth B = 25000-15000 = 10000 Hz
    (Please let us rather use Hz, thank you)
    Q factor = ω0/B = 1.9364
    I would then use these parameters to bode plot with the following transfer function, (although it is stated to be used for RC band pass filters with high Q, and 2nd order band pass filters (of which mine is, as it has a 2nd degree polynomial expression), why not?):
    H(s) = ω/Q s / (s^2 + ω/Q s +1)

    Problem 1:
    So please do confirm with me, if you believe that the equation as stated above, can be used for a simple inverted RC wide band pass filter with a 2nd degree polynomial expression

    Problem 2 (most important):
    I would like to plot the transfer function in the time domain so I can get the pike time or overshoot or settling time, either is fine. But, I don't know how to do that. At least, I'm using Scilab, using the H(jw) function and replacing jw with s, but I only get a flat line. I think the problem might actually be the scilab, and not my brain.

    http://s29.postimg.org/6uzpadxtj/Scilab.png

    Pike time means the time it takes to reach the top:
    http://s9.postimg.org/kctdtalvz/pike_Time.png

    Problem 3:
    I'd like to get a relationship between the H(s) where Q is defined, and the H(jw), so I get a relationship between the ω0/Q and the RC components.

    And I'm guessing it could be ω0/Q = R2C2+R1C1
     
    Last edited: Feb 20, 2014
  9. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    If you want to design a BPF with a "high" Q underdamped response, then you would need to use multiple feedback topology.

    A useful site specifically tailored to the BPF design is found here

    http://sim.okawa-denshi.jp/en/OPttool.php

    You simply enter the center frequency, gain and Q (or ζ) and it does all the work for you. If you understand the method used you can then try a paper design on your own.

    As I stated in an earlier post, the topology you are using won't give you a high Q outcome.
     
    Last edited: Feb 20, 2014
  10. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    If you are actually interested in any of my comments, I can show you how to plot a time response in Scilab using a known 's' domain transfer function.
     
    Last edited: Feb 20, 2014
  11. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    With respect to the time domain response you are anticipating here ...

    http://s9.postimg.org/kctdtalvz/pike_Time.png

    How could a band pass filter produce such a response? If no DC can pass through, how can one anticipate a change in steady state output as denoted by a final non-zero steady state output condition [Cfinal]?
     
  12. LvW

    Active Member

    Jun 13, 2013
    674
    100
    My comments/answers are below in bold/italic:
     
  13. Mechatronical

    Thread Starter Member

    Feb 15, 2014
    30
    0
    Yes please. And I know that I won't get a high Q factor. I've already said that it's a wideband band pass filter. Q should be less than 10, and somewhere around 2. But should the plant simply be replacing jw with s? As long as you can show me how the plant should look like, it will be raining angels.

    H(s) = R2C1s / [(R2C2s+1)(R1C1s+1)]
     
  14. Mechatronical

    Thread Starter Member

    Feb 15, 2014
    30
    0
    Of course a band pass filter has a response time. It doesn't matter if it's AC or DC. What matters is, how quickly does the filter react, when it receives a signal, at all. The input is an AC signal.
     
  15. LvW

    Active Member

    Jun 13, 2013
    674
    100
    Mechatronics, to shorten the discussion please find below the general transfer function of a second-order bandpass (for Q>0.5):

    H(s)=N(s)/D(s) with

    N(s)=Ao*s*ωp/Qp and
    D(s)=ωp^2 + s*ωp/Qp + s^2
    .

    Ao: gain at ω=ωp=ωo (depends on the actual circuit realization.
    ωp: pole (angular) frequency; for bandpass: identical to center (angular) frequency ωp=ωo.
    Qp: pole quality factor; for bandpass: identical to Q=ωo/Δω.

    If you have the actual transfer function (derived from the circuit) in the same form you can compare the various terms and derive the expressions for ωp and Q.
     
  16. LvW

    Active Member

    Jun 13, 2013
    674
    100
    Yes - you are right, of course it has a "response time".
    However, the input in this case is NOT an ac signal.
    The characteristic response form is the STEP RESPONSE (input voltage step in the time domain).
     
  17. Mechatronical

    Thread Starter Member

    Feb 15, 2014
    30
    0
    You're stating that everything is wrong, but you don't have any solutions.
    Here's where I got the transfer function of the band pass filter. I've stated allready, the Q is around 2 but less than 10. It's a wide band band pass filter.
    You don't need a schematic, everything you need is in the transfer function (which is the actual function).

    http://www.analog.com/library/analogdialogue/archives/43-09/edch 8 filter.pdf

    Go to page 17:
    Figure 8.10: Standard Second-order Filter Responses

    So, answer this at least:
    For the step response, is this the correct plant?:

    H(s) = R2C1s / [(R2C2s+1)(R1C1s+1)]
     
  18. Mechatronical

    Thread Starter Member

    Feb 15, 2014
    30
    0
    So the "actual transfer function" is:
    H(jw) = R2C1jw / [(R2C2jw+1)(R1C1jw+1)]
    Sooo... how would you compare the various terms and derive the expressions for ωp and Q?

    When I think about it, I think I'm plotting correctly in Scilab.
    Because when I put s/[(s+1)(s+1)], I get a nice underdamped graph.
    But when ever I add the RC values which are in the order 0.0001 and 0.00001, I get a flat line. Should I perhaps change the final value of the step? I've been using values of 1 - 9 volt.
     
  19. LvW

    Active Member

    Jun 13, 2013
    674
    100
    What kind of solution?
    When you show us a function that contains an expression like (s^2 +1) I suppose that you know why it must be wrong. Or is it necessary to explain why you are not allowed to add two terms with different dimensiones?

    Correct - I do not need the schematic. But YOU need the schematic in case you want to design a filter.

    Yes - this is exactly the transfer function I have given to you already.
    So what?
    I repeat for the third time: This is a function that allows Q<0.5 only.
    The denominator has two REAL (negative) zeros only!
    Simple math.
    If I understood you well, you try to implement something like Q=2, correct?
    Thus, you cannot use this function and the corresponding circuit.
     
  20. LvW

    Active Member

    Jun 13, 2013
    674
    100
    When you read my contributions carefully, you will understand that THIS function applies for Q<0.5 only.
    Pleaase, read all the contributions in this thread again and try to UNDERSTAND!

    Comment: Regarding comparison of the various terms I repeat here part of my response#15:
    If you have the actual transfer function (derived from the circuit) in the same form you can compare the various terms and derive the expressions for ωp and Q
     
    Last edited: Feb 20, 2014
Loading...