Optimization Problem with an RC BP filter

AI Thread Summary
The discussion centers on designing an RC bandpass filter that peaks at 10kHz while maintaining less than half peak voltage at 3kHz and 30kHz. The user is struggling with the optimization of component values, specifically resistors and capacitors, and is advised to use more sophisticated tools like R or Matlab instead of spreadsheets for better efficiency. Dimensional analysis of the transfer function reveals inconsistencies, prompting a reevaluation of the formula's correctness. The conversation also highlights the importance of approximating the behavior of the filter stages, suggesting that the impedance relationships between components are crucial for achieving the desired frequency response. Ultimately, the user is encouraged to refine their approach to selecting component values based on the filter's characteristics and performance requirements.
  • #51
Do you mean use a 4th order circuit?
If so, how would you recommend analyzing it? I'm assuming that there is an easier way than what I'm trying to do.
 
Engineering news on Phys.org
  • #52
Yes, the cascade of two of your existing circuit will give you a 4th order circuit.

As far as your question about analysis, yes there are easier ways to do it. I'm not sure how you are doing it, but whatever it is appears cumbersome.

Re-read post #23 and #38. Do they make sense to you?
 
  • #53
23 does for the most part. I 100% understand the first 2 listed statements, I don't quite see the 3rd. I also am not sure about the first statement as to how that gives me a peak at 10k. I'm assuming I pick some threshold for the voltage and solve for that voltage at 10k in the same sense that I did will do with voltage at 3 and 30k, setting r = z at 3 and 30k.

I think I used 38 in my most recent analysis. Using v_out_2 as my v_in for my 2nd circuit. I'm not sure what you meant by accounting for the second capacitor. Would you elaborate on that, please?
 
  • #54
Have a look at this thread: http://forum.allaboutcircuits.com/threads/rc-bandpass-filter-transfer-function-derivation.80000/

I'm home for the evening so I can respond quickly. Let me know if you don't understand all the details.

I gave you some R and C values in post #25, and showed a plot of the magnitude of the transfer function over a frequency range. Can you get those same values?
 
  • #55
BiGyElLoWhAt said:
I think I used 38 in my most recent analysis. Using v_out_2 as my v_in for my 2nd circuit. I'm not sure what you meant by accounting for the second capacitor. Would you elaborate on that, please?

When you have a low pass RC section followed by a high pass CR section, you can't calculate the transfer function for the R1, C1 section separately and then use the Vout of that section as the input for the next stage (CR stage). Doing that neglects the loading effect of the input impedance of the CR high pass section on the output of the first RC section. You have to calculate the transfer function of the whole thing with both sections connected together. I describe that in the linked thread I gave in the previous post.
 
  • #56
Yes, I see how my current could be messed up. Dang. So I need to work with my original analysis, or divide the current proportionally to the impedance. Let me go through, re analyze my circuit to see if I can get a neater looking transfer function, and go through the article. Then I'll check to see if I can get the values and post back. Thanks.
 
  • #57
I think I did that in my initial setup, but I didn't break it into pieces. I simply analyzed the whole thing as 1.
##V_{out}/V_{in} = \frac{Z_2}{R_1+\frac{1}{\frac{1}{Z_1}+\frac{1}{R_2 + Z_2}}}##
 
  • #58
Have a look at the result the TS got in that other link: http://forum.allaboutcircuits.com/attachments/results-transfer-function-pdf.51260/
 
  • #59
Any chance you could bring the picture here? I have to create an account to view attachments.
 
  • #60
Here it is:
 

Attachments

  • #61
Do you understand what I mean by a cascade of two of your original circuits? I mean this:

BP4thOrder.jpg


You will need to find the transfer function of this bandpass filter, and that will involve mucho algebra, if you know what I mean. This will be so difficult that I find it hard to believe that a "electronics for scientists" course would expect you to derive the transfer function for a 4th order passive network. Could there be another circuit that the professor expects you to use? Something easier to analyze?

How did you come up the original R1/C1/R2/C2 circuit? Did you professor give it to you?
 
  • #62
It was one that I'd seen before. About a week or so before the assignment we talked about what the graph of the output would look like. There might be other circuits, but he explicitly told me only capacitors and resistors, as my original idea was an RLC circuit.
 
  • #63
Can you see the pdf file in post #60?
 
  • #64
Also, I think my initial setup was bad. I need to multiply by a term to get the current divided between the two branches. I basically have (Current through the whole circuit)* Impedance of the capacitor. That answer [edit** in the attached pdf] is the same as was posted earlier (by you or somebody else, I don't remember). I've never seen a transfer function left with a complex denominator before, though.
 
  • #65
Yes.
 
  • #66
Perhaps it is a bit extreme to do a O(4) circuit, but to put it in perspective, this is a 300 level course. A 500 lvl course that I took a couple years ago (as an elective (?)) had us analyze the salen key low pass filter, which was chalkboards and chalkboards and chalkboards of algebra.
 
  • #67
The reason you need to do a 4th order circuit is because you have been constrained to use only Rs and Cs--no inductors, no opamps. With the low Q of a RC only network, the rolloff rate of a 2nd order is not fast enough to meet your requirements.
 
  • #68
BiGyElLoWhAt said:
I've never seen a transfer function left with a complex denominator before, though.

It's typical among EEs, Rationalizing the denominator just adds complication. When evaluating an expression in complex arithmetic, nowadays a modern software such as Matlab, Mathematica, Maple, Mathcad, etc., is used and it's not useful to rationalize the denominator. The software can evaluate an expression with a complex denominator just fine.
 
  • Like
Likes BiGyElLoWhAt
  • #69
So if I use 2 lowpass and 2 highpass, I'm not understanding conceptually how that will necessarily fix the problem. So I'm basically limited by the second derivative of the graph, right? V out vs. omega. By adding in another lowpass, in attempts to steepen the peak, one would be tempted to set "unity" at a higher frequency to have a steeper dropoff at the left. Won't this then mess with my peak at 10k?
 
  • #70
Perhaps that's unique to physicists, then.
 
  • #71
The center frequency stays the same, but the rolloff rate is enough higher to meet your requirements. Unity remains at 10 kHz.
 
  • #72
Oh, because all the gains on the LHS of the vertex will be less than 1 and multiplied, and same with the RHS. Correct? So would both my lowpass filters have the same RC values?
 

Attachments

  • 3rd order.png
    3rd order.png
    17.1 KB · Views: 387
  • #73
Ignore that picture, it is as of now irrelevant. It was an attempt to explain my confusion.
 
  • #74
Here's the response of the 2nd order network (blue; your original network), and the 4th order network (red):

PBP2.png
 
  • Like
Likes BiGyElLoWhAt
  • #75
Yes, yes. I think I get it now. What would be a reasonable, physical approximation that I could use to get my values? I.e. how I was trying to maximize it at 10k by setting both circuits in phase with each other and they would maximize due to superposition or something along those lines, or as was mentioned early where z_1 = R_1 at 3k, etc.
 
  • #76
BiGyElLoWhAt said:
So would both my lowpass filters have the same RC values?

The product of each RC pair will be the same, placing the cutoff frequency of all the pairs at 10 kHz. But the impedance level of each pair should increase as you move to the output of the overall network. The increase of impedance level of a subsequent pair is achieved by increasing the value of R by some factor, such as 10, and decreasing the value of C by the same factor, but keeping the RC product constant.
 
  • Like
Likes BiGyElLoWhAt
  • #77
Is that to minimize the impact on the current through the other branches, or on your supply?
 
  • #78
BiGyElLoWhAt said:
Yes, yes. I think I get it now. What would be a reasonable, physical approximation that I could use to get my values? I.e. how I was trying to maximize it at 10k by setting both circuits in phase with each other and they would maximize due to superposition or something along those lines, or as was mentioned early where z_1 = R_1 at 3k, etc.

You could start out with the R1 and C1 values I gave in post #25. Subsequent RC pairs have increasing impedance level as I explained in the previous post.

The ideal is that the RC product gives a time constant so that the peak frequency of the network is 10 kHz. You don't worry about trying to make the attenuation of the network at 3 kHz and 30 kHz some value you would like. You have no control of those because the Q of a passive RC network is low and nothing can be done to increase it (normally using an opamp would be what you would do to increase Q).

The reason for increasing the impedance of successive RC pairs is to prevent the later pairs from loading the previous ones and degrading Q more than it already is with passive RC networks.

Cascading two of your original networks is the only way to get a faster rolloff rate. There is no way to "optimize" other than cascading.
 
  • Like
Likes BiGyElLoWhAt
  • #79
What's a reasonable threshold to call something at "unity"? I think I get what I need to do, now. Thanks.
 
  • #80
BiGyElLoWhAt said:
What's a reasonable threshold to call something at "unity"? I think I get what I need to do, now. Thanks.

What I've done in the two curves you see above is normalize the response of the network at 10 kHz, so the response at 10 kHz is always unity. This is a typical way of showing filter responses.
 
  • #81
But that's only theoretical, right? You can't actually get the gain to be 1.
 
  • #82
BiGyElLoWhAt said:
But that's only theoretical, right? You can't actually get the gain to be 1.

Of course. That's one of the things opamps can do for you.
 
  • #83
Only if you rail it, though. And then it's railed to whatever your V is across the op amp. With this passive circuit, if I set .95Vin at 1k to the left and .95Vin 1k to the right (so 9k and 11k), would that seem reasonable?
 
  • #84
If you have a look at the curves in post #74 those are what you get if the impedance levels of the various RC pairs are increased enough at each subsequent stage to avoid loading the previous stage. I'm not sure what you mean when you ask if .95 Vin at ± 1 kHz on either side of 10 kHz is reasonable. It's not a question of reasonableness. If you normalize the response of the filter to be unity at 10 kHz, the response on either side of 10 kHz is what it is.

The actual, un-normalized "gain" of your original circuit at 10 kHz is about .49.

Here's the un-normalized response of your original circuit using the R and C values I gave in post #25:

PBP3.png
 
  • #85
I didn't realize you were actually normalizing the graph. If I used the phrase normalize, that's my mistake, it wasn't my intent. I was thinking you were getting a lot closer to Vin than you were.
 
  • #86
These passive RC filters have substantial loss even at the frequency of maximum "gain".

So I think you see what you must do now. I don't know any other way to get the "gain" at 3 kHz and 30 kHz to be less than 1/2 the "gain" at 10 kHz other than to cascade two of your original circuit.

I assume your professor is expecting you to demonstrate that your proposed circuit does in fact have the required relative attenuation at 3 kHz and 30 kHz.
 
Last edited:
  • Like
Likes BiGyElLoWhAt
  • #87
I believe so, as well. Thanks for all your help. I actually think some things clicked in this last hour or so. Thanks a million.
 
  • #88
When you derive a transfer function for a network don't waste time rationalizing the denominator, or any other simplifications. Just leave it in any form and use Matlab or a calculator that can do complex arithmetic to evaluate the transfer function. You should have a transfer function in terms of ω. Just set ω to 2*pi*f and evaluate the transfer function at 3 kHz, 10 kHz and 30 kHz to see if your requirements are met.
 
Last edited:
  • #89
Thanks, will do.
 
  • #90
If you find out that your professor had a solution that is much easier to analyze, would you please post it here?
 
  • #91
The Electrician said:
Here's the un-normalized response of your original circuit using the R and C values I gave in post #25:
Have you determined the Q with those component values?

There's a formula relating Q to the -3dB bandwidth, but do you know any general formula relating Q to the -6dB bandwidth? (The task here specifies the -6dB bandwidth, approximately.)
 
  • #92
donpacino said:
when analyzing the circuit, the transfer function is found seen below

Vo/Vin = [SC_2R_2 ] / [ S^2C_2^2R_2_2+S(2C_2R_2+C1R1)+1 ]
I have been wanting to reconcile this equation with the plot in #25. Is there an error in this apart from the subscript?

The plot in #25 seems to be exhibiting a Q of around 0.5 or so. (10,000÷19,000) [EDIT: correction]
With the Rs and Cs suggested, I calculate using your equation: Q = 0.333

There needs to be agreement in these figures before developing this further.
 
Last edited:
  • Like
Likes donpacino
  • #93
donpacino in post #32 has the wrong transfer function. The pdf file in post #60 has the derivation of the correct transfer function.

My derivation is the same:

PBP4.png
 
  • #94
The Electrician said:
donpacino in post #32 has the wrong transfer function. The pdf file in post #60 has the derivation of the correct transfer function.

My derivation is the same:

View attachment 106821
Just checked my work. Yes it is incorrect. I now got what the electrcian got. I switched some terms part way through the analysis. 1 am algebra will do that I guess.

the take away: always sanity check your work. In retrospect my answer makes no sense.
 
  • #95
Well, it seems as thought it was merely meant to be a struggle. It wasn't supposed to work, and when I went back, we started messing with bridge filters. Somewhat cruel, but I suppose it was meant to teach us a lesson we won't soon forget LOL.
 
  • #96
Are you saying that your professor is showing you a bridge filter, with only Rs and Cs that will meet the requirements? Or are you saying that your professor expected that you would not be able to meet the requirements with only Rs and Cs?

Did you show your professor that the requirements can be met by the 4 stage R/C filter I showed you?
 
Last edited:
  • #97
NascentOxygen said:
With the Rs and Cs suggested, I calculate using your equation: Q = 0.333
The figure of 0.33 does seem lower than what I would expect to be achievable.

I added a capacitor parallel to R2 and my calculations (if correct) indicate this can realize a Q of approx 0.88. But I have yet to dertermine whether this would be sufficient to meet this task's specifications.
 
  • #98
I'm saying that we moved directly into discussing bridge filters. I suggested a 4 stage filter, and he said that should work, but that was all the further the conversation went.
 
  • #99
Maybe my simple engineering approach would not satisfy your examiner. However, a simple approach is to draw a phasor diagram for a series circuit consisting of C and R. It is easy to see that if Xc is half R, then the voltage across C is a bit less than half the applied voltage. This is the desired condition.
The high and low circuits are so far removed that interaction will be negligible.
 

Similar threads

Back
Top