Active filter design : 2nd order sharp roll-off - Page 1
Forum section: electronics / projects

author: Rutherberg
author_rank: Regular Contributor
timestamp: February 04, 2019, 03:10:41 pm
content: Hello,All is in the subject, I have a hard time to design a non-inverting 2nd order high pass with a sharp roll-off.I would like to keep the -40db/decade, but with a sharper roll-off.With a classic 2nd order, the roll-off is too slow.What type of filter should I use for these results ?Thanks

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: February 04, 2019, 03:22:04 pm
content: 2nd order is only good for so much. You need a higher order filter.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 04, 2019, 03:23:26 pm
content: Yeh... how sharp are you looking for?Consider this: you only gave one number, and it's not even the property you're trying to optimize! That doesn't give us much to go on.How much peaking can you tolerate?That's the only variable you have control over. To get a sharper cutoff, you need a higher order filter, even if you don't need the cutoff attenuation that gives.If you can afford an elliptical filter, it can be much sharper, but it will likely take more parts, or more order (there's hardly such a thing as an elliptical 2nd order), though it can still have the same asymptote.Mind that, if this is an active filter, the attenuation may level off anyway, due to the amp's finite gain.Tim

author: Benta
author_rank: Super Contributor
timestamp: February 04, 2019, 03:51:19 pm
content: Look into Chebyschev filters. They have a sharper initial rolloff, but end at -40 dB/decade.Downside is, you'll have ripple/peaking in the pass band.

author: Rutherberg
author_rank: Regular Contributor
timestamp: February 04, 2019, 04:27:48 pm
content: Ok thanks, I may have found a hint of what I try to achieve.Attached, an op amp circuit with a transistor gyrator. The curve of the peak is what I want.The idea now is to keep same gain at peak frequency after the peak frequency, to make a high pass filter, thus the roll-off will be fast. I don't know if I'm clear.How can I achieve this ?

author: Benta
author_rank: Super Contributor
timestamp: February 04, 2019, 05:08:21 pm
content: Whether you use a gyrator, a classic opamp active filter or or a conundrumbulator is irrelevant.A second order response is a second order response, regardless of how you do it.

author: RandallMcRee
author_rank: Frequent Contributor
timestamp: February 04, 2019, 05:55:29 pm
content: Here:https://www.analog.com/designtools/en/filterwizard/Try this, before posting again. Let us know if you have questions. Google anything you don't understand.Ask further questions if you can't understand what you googled.

author: Rutherberg
author_rank: Regular Contributor
timestamp: February 04, 2019, 06:15:39 pm
content: Thanks, but if I come here, it's not because I want to waste anyone's time, it's because I googled everything I can. It's been about 3 days that I work on that and it drives me nuts.I tried Filter Wizard for about 1 hour today, still not what I need.I'm close to find the solution, look at my last post. The rising curve of the peak is what I need, now I need to keep the gain maxed after the peak frequency, and I don't know how to do it.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 04, 2019, 06:25:35 pm
content: Can you please draw a Bode plot of what you actually need? (That's a log-log graph, vertical gain (log, so equivalent to dB), horizontal frequency, with straight line asymptotes showing where you want the pass and stop bands, and showing some allowable peaking, or required cutoff sharpness, at the corners between straight segments.)Tim

author: Benta
author_rank: Super Contributor
timestamp: February 04, 2019, 06:55:24 pm
content: Quote from: Rutherberg on February 04, 2019, 06:15:39 pmYes, but you can't get to a solution that way. Combining a band pass filter with a high pass filter just won't fly, the way you are approaching it. If you want a steeper cutoff, you'll need to increase the filter order, there's no way around it.An alternative approach is to go digital and use an FIR filter, but...

author: grouchobyte
author_rank: Regular Contributor
timestamp: February 05, 2019, 10:23:10 pm
content: Try this. Your requirements are a little fuzzy,but based on comments you made I took a stab at it. Is this what you want/need? If not, please clarify with better requirements like ( for example):high pass?nth order?fidelity in the time domain/ dont care?input/output impedance?pass band attenuation?pass band ripple?topology preferred ( active/ passive, sw cap...etc)rolloff?Let us know and we can help you optimize it

author: grouchobyte
author_rank: Regular Contributor
timestamp: February 05, 2019, 11:07:02 pm
content: your want better rolloff?.....try this. Sim attachedYou're welcome!@grouchobyte

author: nick_d
author_rank: Regular Contributor
timestamp: February 06, 2019, 04:38:03 am
content: The easiest way to meet this requirement is to put the correct number of Sallen & Key high pass filters in series. Each Sallen & Key filter uses one op-amp and two RC networks to deliver (in voltage) 6dB/octave = 20dB/decade or (in power) 12dB/octave = 40dB/decade of roll on. See here:http://sim.okawa-denshi.jp/en/OPseikiHikeisan.htmThe choice of response type (Butterworth, Bessel, Chebyshev etc) is independent of the number of sections. What these options do is change the behaviour slightly near the cutoff. A few octaves away from the cutoff the behaviour will be basically the same for all response types. If you have say 3 sections with 6 RC filters, then you set the response type by tweaking the 6 RC values so that each has a slightly different cutoff, using a table that is pre-computed for cascaded Sallen & Key filters of a particular number of sections.There isn't really anything more to do. It is a completely straightforward exercise in plonking down the example circuit and reading the tables.cheers, Nickedit: clarify voltage dB vs power dB

author: Rutherberg
author_rank: Regular Contributor
timestamp: February 06, 2019, 10:46:07 am
content: Thanks a lot for all the answers despite the lack of clarity of my request.Attached, 2 circuits simulated, green curve is a high-pass Sallen Key calculated with okawa-denshi calculator, blue curve is a 1-stage Chebychev calculated with Analog filter wizard, cut-off is approximatively 3,7kHz for both.The rough red curve is what I need : at least the roll-off of the chebychev or sharper at approx. 3.7kHz, but limit the attenuation.I would like to have 1kHz attenuation at about -14dB.Filter ripple is not crucial, but better under 2dB.Also, I would like to keep the numbers of stages to a minimum, ideally 1 or max. 2.How can I limit the attenuation ?Quote from: grouchobyte on February 05, 2019, 10:23:10 pm- High pass- 2nd order- Don't care- Don't care, will be buffered- minimum possible- max. 2dB- Don't care, but this circuit will be audio and thus noise sensitive- faster/sharper than the green curve attachedIs it more clear ?Thanks

author: nick_d
author_rank: Regular Contributor
timestamp: February 06, 2019, 12:04:34 pm
content: Are you happy that from 0 to 1kHz you have exactly 14dB attenuation, and then after that you have the Chebyshev? Since your circuit will be buffered, that is easy to do. 14dB is a factor of 25 (calculate by 10^1.4) if you meant by voltage, or 5 (calculate by sqrt 25) if you meant by power. So you create the Chebyshev filter and then present your buffer with a voltage that is 1/25 the original signal plus 24/25 the filtered signal. You do this with a resistive divider. Like this:orig||[ ] 24k|*--- out|[ ] 1k||filtThe voltage at "out" will be the weighted average of "orig" and "filt", however make sure your buffer doesn't take much current from it or it will reduce the accuracy. The best way to do it is have "out" be either the + input of an op amp in voltage follower configuration, or the virtual Earth of an op amp in inverting configuration. This ensures an accurate weighted average or sum respectively.cheers, NickEdit: are you sure your Chebyshev is one stage? A Chebyshev has at least 2 RC filters, since what makes it a Chebyshev is the adjustment of the two RC cutoffs relative to each other. I think your blue and green lines have same roll-on but different response types. May be wrong but possibly 1 stage means two RCs?Edit: swap the 1k and the 24k.

author: Karel
author_rank: Super Contributor
timestamp: February 06, 2019, 12:44:19 pm
content: https://www.ti.com/design-tools/signal-chain-design/webench-filters.html

author: Rutherberg
author_rank: Regular Contributor
timestamp: February 06, 2019, 03:14:16 pm
content: Quote from: nick_d on February 06, 2019, 12:04:34 pmI misspoke, I would like -14db from pass band to 1kHz, and approx. -20/-22dB from pass band to 100Hz. Just like the red trace on the graph.I tried with 1k and 24k, it limits the attenuation, but attenuation curve is not smooth, I got a dip at about 1kHz.Quote from: nick_d on February 06, 2019, 12:04:34 pmYes, by one stage I mean one op amp.Quote from: nick_d on February 06, 2019, 12:04:34 pmYes, I tried too.

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: February 06, 2019, 04:52:47 pm
content: You can do a nice 4-pole filter with a single opamp. See my program link in this thread-https://www.eevblog.com/forum/projects/third-order-filters-with-a-single-opamp-are-possible-after-all/25/There can be component sensitivity issues with any higher order filter, but I've had little trouble.

author: nick_d
author_rank: Regular Contributor
timestamp: February 06, 2019, 10:59:06 pm
content: QuoteCan you clarify if you are talking about power or voltage? Assuming voltage, you cannot get 6dB/decade. You can get 10dB/decade which might be adequate. Assuming power, you can get 20dB/decade which is steeper than you need. What you will have to do is construct the response stepwise.So, you can have cutoffs at 100Hz and 1kHz. This gives you 3 signals to work with: original (freq 0..infinity), first filtered (freq 100..infinity) and second filtered (freq 1k..infinity). A weighted average of these can give you the stepwise response that you require.If yoy want the steps to be as gradual as possible, use one RC. If you want the first step gradual and the second sharper, use one RC for the first filter and the two-RC Sallen-Key for the second. You can design what you need.QuoteThat shouldn't happen. Can you show your circuit? You probably loaded down the resistive divider by taking current from it. Use one of the techniques I mentioned (mean and voltage follower, or summing junction).More sophisticated responses can be constructed with digital techniques.cheers, Nick

author: grouchobyte
author_rank: Regular Contributor
timestamp: February 07, 2019, 12:38:22 am
content: Hows this? You can tweak this for desired response below 1Khz. Your desire to use one stage is a little unreasonable since you are already asking too much. Here in America we call that putting 50 lbs of manure in a 10 lb bag. Use a quad opamp and 0402s or tell your boss/client about the manure conundrum and ask him how he would solve it@grouchobyte

author: nick_d
author_rank: Regular Contributor
timestamp: February 07, 2019, 07:52:52 am
content: @grouchobyte that is a cool circuit. Kudos for the effort to design and simulate. At first I could not figure out why you had low passed the top branch. But then I realized that in my suggested way, adding the original signal to the high passed signal, the high passed signal will be significantly phase shifted as it starts to roll on, initially causing cancellation until the phase shift reduces throughout the pass band (it would be 180deg at DC, 90deg at cutoff and 0deg at infinite frequency?). This must be what OP complained of, whereas your low pass starts to roll off and add phase shift just as the high pass rolls on, to get reinforcement?cheers, Nick

author: grouchobyte
author_rank: Regular Contributor
timestamp: February 07, 2019, 09:40:19 am
content: Quote from: nick_d on February 07, 2019, 07:52:52 amNickYour assessment is correct in terms of the overlapping technique of the LP and HP sections. I guess 45 years doing analog design for HP, Tek and a dozen other giants has its benefits. Your suggestions actually led me to the current solution. The whole exercise including drawing it up in LTspice took me about 20 minutes. The hard part was reading through the OP’s posts and trying to extract the requirements. I am not certain it meets his needs 100%, but it is close and leaves a little for him to tweak and learn. (I am pretty sure we may be asked to assist in getting it dialed in) I have a PhD client that reminds me of the OP in the way he defines his requirements ( no offense to the OP) so it’s all in a days work for me. Cheers!grouchobyte (Bob)

author: Rutherberg
author_rank: Regular Contributor
timestamp: February 08, 2019, 08:30:15 am
content: @grouchobyte cool circuit indeed, thanks a lot for the effort !It's starting to look like what I need. The limit of attenuation to approx. -20dB is good and the knee at the cut-off frequency is sharp enough.Now the idea would be to make the slope more progressive (see attached, the red curve) but keeping the sharp knee at cut-off frequency, if only it is possible of course.I messed around for hours with your simulation but I can't get the results I need.The closer I can get is with the second circuit attached, but the knee at cut-off is not sharp enough

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 08, 2019, 08:32:42 am
content: You're asking for fractions of a dB tweak, I don't see for what purpose that would be productive.Tim

author: ogden
author_rank: Super Contributor
timestamp: February 08, 2019, 09:54:46 am
content: Quote from: T3sl4co1l on February 08, 2019, 08:32:42 amIt won't be achievable w/o precision capacitors/resistors (or trimpots) anyway. I would suggest to run Monte Carlo simulation for selected tolerance (spread) of resistors and capacitors to see possible range of the error. As an illustration LC filter simulation (10% inductors and 5% capacitors):

author: nick_d
author_rank: Regular Contributor
timestamp: February 08, 2019, 10:52:43 am
content: @rutherberg I believe the fundamental problem is that what you are asking is impossible. To give an example, suppose I was a builder and I was equipped with 30 degree and 45 degree (to the horizontal) roof trusses. The client asks me for a 15 degree sloping roof. What do I do? The best that I can achieve is to put 30 degree and then a straight section and then repeat. I can construct a 15 degree roof but stepwise.Does that make it clearer? Having said that, I believe we can get closer to what you need. Note that @grouchobyte's solution uses basically two high pass Sallen Key filters in series (look at the lower branch and ignore the upper branch), at what? 4 kHz? Let's say 4 kHz.Introducing some terminology, what you have is a 4 pole filter. One pole is one RC network and gives you 3dB/octave (by voltage, not power). So, if you do not want it so steep at 4 kHz, remove some poles.On the other hand, if you want it to rise steeply from say -10dB to 0dB at 4kHz using the 4 pole filter then that is fine too, you just have to use the additive ideas already discussed to make sure there is a -10dB signal already there before the 4 pole filter rolls on and adds to it.The problem comes with your specification for <4 kHz. If you want -20dB at 100 Hz and -10 dB at 4 kHz then it cannot be done with RC networks. The closest you can do is a ONE pole high pass network, which will give you 3dB/octave or 10dB/decade (by voltage). So it will climb from -20dB at 100 Hz to -10dB at 1 kHz which is too early. It will double again twice to -4dB by 4 kHz. So the best option is basically put another straight section in from 1 kHz to 4 kHz if that is what you need.Thing is, that gets very complicated. I understand you would LIKE to have a certain response if you can get it by changing component values or rearranging the circuit. But are you willing to put extra chips just to make this happen? May we have an idea of what this circuit will be used for? Since your requirement is an uncommon one and might be eaaily side-stepped.cheers, Nick

author: grouchobyte
author_rank: Regular Contributor
timestamp: February 08, 2019, 04:20:12 pm
content: Quote from: nick_d on February 08, 2019, 10:52:43 amNickWell said! It seems @Rutherberg is trying to use this filter to achieve something that may be best solved some other way. I could be wrong, but many a time I find engineers boxed into a corner with their design convinced that "only if" this particular parameter or that would conform to their will, that all would be golden. I think it's time to ask @Rutherberg to tell us more about the need for this filter and why he requires the odd filter performance. Only then can we we advise him on the best way to achieve his goal. I can certainly get the performance tweaked the way he wants but I suspect there is something very wrong with tweaking it for some system requirement that may have a dependency on this filter making it difficult to manufacture, reproduce, or modify. I guess we are back to the manure conundrum-Bob (@grouchobyte)

author: schmitt trigger
author_rank: Super Contributor
timestamp: February 08, 2019, 05:09:59 pm
content: Subscribing to this thread to follow the very informative comments.