Variable cut low-pass filter. - Page 1
Forum section: electronics / beginners

author: Greg Robinson
author_rank: Regular Contributor
timestamp: February 10, 2016, 04:40:23 am
content: Hi everyone.I'm experimenting with some variable cut low-pass filters. A first-order filter is quite easy to achieve, and can be varied from -6dB per octave to flat with use of the pot. It can also be easily re-arranged to also allow boost by adding a resistor in the feedback path of the op amp equal to the value of the pot so that at one extreme of the pots range it is -6dB per octave, in the middle it is flat, and at the other extreme it is +6dB per octave.I'm hoping to increase the maximum slope of cut to -12dB an octave by using a second-order filter. The obvious solution is to use a ganged pot and cascade two stages with a buffer in between. However, I'm hoping to find some topology that would allow me to use just a single-ganged pot and (hopefully) just a single filter block rather than the two independent cascaded blocks, maybe something like a Sallen-Key arrangement, but I've been unable to figure out a way to then vary the slope of cut using a Sallen-Key arrangement.Does anyone have any suggestions?Thanks for your time.

author: LvW
author_rank: Frequent Contributor
timestamp: February 10, 2016, 07:33:22 am
content: I must admit not to understand your circuits (and your wording).* What is the purpose of the resistor between both opamp input terminals? And what is the meaning of the unconnected capacitiors? I do not see any filter.* What is the meaning of ".....can be varied from -6dB per octave to flat..."Question: You want to find a second-order filter (-12dB/okt) with a tunable 3dB frequency, correct?Which characteristic do you want (Butterworth, Chebyshev,...)?

author: Greg Robinson
author_rank: Regular Contributor
timestamp: February 10, 2016, 08:11:02 am
content: Quote from: LvW on February 10, 2016, 07:33:22 amThe "resistor" between the inverting and non-inverting inputs is a potentiometer, the "unconnected" capacitor is connected to the wiper of this pot. When the wiper is turned to the non-inverting side, C1 and R1 form a low-pass filter with -6dB per octave slope (first order filter). When the wiper is turned to the inverting side, the negative feedback results in a flat frequency response.I do not want to vary the frequency, I want to vary the slope of the filter from between -12dB per octave (second order filter), to 0dB per octave (flat).The second circuit in my attachment labelled Second order will already achieve this, but it requires the use of a ganged potentiometer. I am hoping that someone may know of some novel circuit topology that only requires a single variable element (single gang pot) to achieve the same result. I understand that this may not be possible, but I won't find out unless I ask.Since you ask, I would like a Butterworth response, but I don't think the characteristic should matter.I hope that clarifies my question for you. Thanks.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 10, 2016, 09:43:55 am
content: Ehh, you've worded it so that you are implying the cut rate (dB/oct) is variable, which is not possible.The cutoff frequency is variable, easily enough, though.You get significantly better performance from an active (feedback) type stage (which can exhibit peaking: complex poles), than from cascading first-order stages (which, at best, get you a repeated pole, no sharper than each one alone).In general, there is no method to use just one resistor. The current through that resistor would have to be dependent upon two or more capacitors, and the capacitors are the "memory" responsible for the filtering action; they would be mixed, as a result, and you'd end up with capacitors in series or parallel, and a first order system again (maybe with a pole-zero response).You might want to take a look at OTA (operational transconductance amplifier) circuits. These can be used to create electronically variable resistors, amplifiers or filters. Keeping a chain of them perfectly in sync (so as to smoothly vary the cutoff frequency, while preserving a sharp cutoff characteristic) may be a challenge, but it's the most useful configuration because only a control voltage is needed.Tim

author: Greg Robinson
author_rank: Regular Contributor
timestamp: February 10, 2016, 10:23:25 am
content: Hi Tim, thanks for you comments.Quote from: T3sl4co1l on February 10, 2016, 09:43:55 amAh yes, I do suppose that it is variable shelving rather than slope.It does serve to alter the slope between the passband and the cutoff frequency. I suppose I didn't think about this in close enough detail.Quote from: T3sl4co1l on February 10, 2016, 09:43:55 amYes, that's simple, although for a Sallen-Key arrangement, maintaining the Q again requires a dual-gang pot. I'm just trying to avoid the need for dual gang pots so that I have a wider choice of form factors available to choose from.Quote from: T3sl4co1l on February 10, 2016, 09:43:55 amThanks for all the input. I think you've probably really answered my question (and I had the feeling that was the answer I was going to get). I may consider the OTA option. Was just hoping that maybe there was some super clever person out there who might have come up with an elegant circuit topology that could do what I want.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 10, 2016, 06:38:13 pm
content: What are you using this for, anyway? Do you have an application in mind, or..?Variable cut/boost is a quite common thing (e.g., audio), but the closest application for "variable slope" would be something like, compensating for transmission line losses, where the attenuation of a long transmission line goes roughly as sqrt(f). Ionic diffusion is another example (e.g., battery terminal voltage versus current and time), among many other things.Line compensation of course was solved a great many decades ago, by fellows such as Zobel. Typically, a variable network is used, to adjust the gain and impedance matching, at one frequency; an array of these networks are used to compensate the full frequency response of the system.The peculiar thing is, those phenomena are all about high frequency losses, and compensating for them usually means adding loss at low frequency to compensate for it (since a passive network has no gain). So it's strange to have interest in an intentional "diffusion" filter, or indeed, any degree between there.The mathematics concerning fractional order filters, by the way, is fractional calculus, a subject with (as far as I know) relatively little use, and not very well known. But if you are familiar with the rules of calculus, then you'll remember the integral of a power:Integral x^n (n != -1) = x^(n+1) / (n+1) + CThat is, up to a constant factor, the only difference is incrementing the exponent.Well, supposing there were such a thing as a "half integral", it should have the effect that the exponent is incremented by half, instead of one. (The constant factor might turn out to be irrational or complex for things to work out, but that's okay, as long as the second half-integral turns out the correct full-integral result.) The half-integral of 1 is sqrt(x) (give or take a factor, and constant of integration), or the half-derivative of x.The transfer function of a lumped constant network, is a rational equation p(w) / q(w), where p and q are polynomials (i.e., a sum of integer powers of w). So you can't get irrational terms like sqrt(w) unless you apply fractional calculus.So that's the kind of thing you're asking for, here. Almost. It's actually even worse than that, because you're not even asking about just a "half integral", or even a rational fraction, but a real valued fraction: continuously adjustable between 0 and 1, say.So, analytically speaking... it's all kinds of a wonderful clusterfuck of mathematical abominations. I bet you weren't expecting that.And, so, it might be an interesting problem for a mathematician to play with -- in general, functions with non-integer powers are non-causal (nonzero for t < 0) or complex (especially for t < 0), which real signals can't be, for obvious reasons. The first challenge is restricting the function to make it behave, without making it harder to work with; then trying to synthesize a circuit that exhibits that transfer function (probably using a lot of dependent components). As for producing an approximation with discrete components (even one with synchronized variable-gain amplifiers), good luck with that...(I've gone into a little depth on this, partly to explore my own knowledge and curiosity, and partly to give you an idea of how many subjects your query touches on -- which it turns out is more diverse than the usual electronics question, even if you didn't intend it to be!)Tim

author: orolo
author_rank: Frequent Contributor
timestamp: February 10, 2016, 08:44:56 pm
content: Quote from: T3sl4co1l on February 10, 2016, 06:38:13 pmVery interesting discussion! I was thinking along the same lines in the thread about op-amp frequency dividers: why not use a square root circuit (say, log -> half -> exp, or something with a fet in the feedback) to halve the frequency? Because the square root is not a function! It is multi-valued. That means that hysteresis is unavoidable in frequency division, in order to move between the two branches of the square root when crossing the branch cut, and hence you need comparators, flip-flops, etc. BTW, I'm still in awe with the beautiful 5-minute circuit some genial contributor pulled off.Back to the topic. A quick analysis of the first filter shows it has a pole and a zero. If the total resistance of the potentiometer is R, and we call a*R and (1-a)*R to the resistances to the wiper, for 0 < a < 1, then the pole is at a lower frequency 1/(a*R + 10k)*C and the zero at a higher frequency 1/(1-a)*R*C. The capacitance is C=100n. To either side of these frequencies, the response of the filter is almost flat. In between, it goes down at -6db/octave. There is not variable slope; the final attenuation depends of the variable width between the zero and the pole, which depends on the positionaof the pot.The two stage cascaded filter has a response that is the square of the first stage: therefore, it has a double pole and a double zero. To the sides of the frequencies it is almost flat, and between them it goes down at -12db/octave. There is not variable slope, again.However, the idea could be exploited to approximate an arbitrary slope: just interleave poles and zeros with variable positions to get a ladder-like response. The higher the order, the greater the resolution (and complexity, of course). That would not require ganged pots, since poles and zeros should not coincide.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 11, 2016, 09:24:33 am
content: Quote from: orolo on February 10, 2016, 08:44:56 pmIt's worse than that: the sqrt (or other fractional power) is in the frequency domain. The time domain equivalent is some nasty inverse exponential something or other, I'm not sure (checking, it seems the closest Fourier complement of 1/sqrt(w) is 2/sqrt(|t|)^3, which is infinite valued near t=0).Tim

author: Greg Robinson
author_rank: Regular Contributor
timestamp: February 12, 2016, 12:03:32 pm
content: Quote from: T3sl4co1l on February 10, 2016, 06:38:13 pmYes, it's intended for audio use - variable cut shelving filter is what I'm after. After further though I see that I was wrong to call it "variable slope".If anyone happens to know of a topology that would allow variable shelving with maximum cut of a second order filter while using only a single potentiometer rather than dual, that would still be great, although I've found a dual pot in a form factor that suits me, so it's a bit of a moot point at this stage.Thanks for your in-depth responses, sorry for the confusion!

author: LvW
author_rank: Frequent Contributor
timestamp: February 12, 2016, 03:01:14 pm
content: Quote from: Greg Robinson on February 12, 2016, 12:03:32 pmI am afraid that I must disappoint you. I feel pretty familiar with active filters - however, at the moment I do not know about any second-order lowpass which issingle-elementtunable in frequency without modifying the filter characteristics (pole Q).

author: Greg Robinson
author_rank: Regular Contributor
timestamp: February 12, 2016, 03:03:18 pm
content: Quote from: LvW on February 12, 2016, 03:01:14 pmAgain, not trying to vary the frequency, only the shelving/level of cut. But thanks for your input.