Reply by Tim Wescott April 26, 20152015-04-26
On Sat, 25 Apr 2015 16:49:25 -0400, robert bristow-johnson wrote:

> you might think that this is a settled issue, especially before any > "digitization" of the transfer function. so, for the moment, let's > leave the z-plane outa it. > > originally, i always took the definition of "Q" and resonant frequency > "w0" (pronounced "omega-naught" not "dubya-zero" even though we all know > he's a zero) as coming from the classic RLC series circuit (with output > voltage taken over the R) having transfer function: > > H(s) = R / ( R + sL + 1/(sC) ) > > which if you re-arrange it a little, you get this BPF: > > H(s) = (1/Q)(s/w0) / ( (s/w0)^2 + (1/Q)(s/w0) + 1 ) > > > for w0 = 1/sqrt(LC) and Q = w0*L/R > > when s = j*w0 you get H(j*w0) = 1 which has greater magnitude than any > other real frequency. > > but this is not necessarily the frequency at which the circuit "rings" > at if whacked with an impulse. > > h(t) = w0 * exp(-(w0/2Q)*t) * cos( sqrt(1-(1/2Q)^2)*w0*t + phi ) > > phi = arctan(1/2Q) i think > > > the "ringing frequency" is sqrt(1-(1/2Q)^2)*w0 . if the Q is smaller > than 1/2, this thing doesn't even ring and you have two damped > exponentials in the impulse response rather than a damped sinusoid. > (instead of a pair of complex-conjugate poles, there is a pair of real > poles.) > > now, can we agree that the resonant frequency of this analog transfer > function is w0 which exists for any Q>0 ? even if this thing does not > ring? > > the reason i am asking is, reviewing some very old notes regarding Hal's > SVF *and* with the Lattice filters, i am wondering if the "frequency" > that the filters are tuned to are the ringing frequency (that exists > only for Q > 1/2) and not the resonant frequency (which still has > meaning for low-pass filters that don't ring at all). > > so which is it? (consider this a polling question.)
I believe the ringing frequency is different from the frequency at maximum gain. Either one might get called the "resonant frequency". Check the ingredients list on the package before consuming the product. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by Tim Wescott April 26, 20152015-04-26
On Sun, 26 Apr 2015 08:55:04 -0500, Greg Berchin wrote:

> On Sat, 25 Apr 2015 16:49:25 -0400, robert bristow-johnson > <rbj@audioimagination.com> wrote: > >> H(s) = (1/Q)(s/w0) / ( (s/w0)^2 + (1/Q)(s/w0) + 1 ) >> >>for w0 = 1/sqrt(LC) and Q = w0*L/R >> >>when s = j*w0 you get H(j*w0) = 1 which has greater magnitude than any >>other real frequency. >> >>but this is not necessarily the frequency at which the circuit "rings" >>at if whacked with an impulse. >> >> h(t) = w0 * exp(-(w0/2Q)*t) * cos( sqrt(1-(1/2Q)^2)*w0*t + phi ) >> >> phi = arctan(1/2Q) i think >> >> >>the "ringing frequency" is sqrt(1-(1/2Q)^2)*w0 . > > I seem to recall a control systems class (the controls folks are always > interested in time-domain performance) wherein it was acknowledged that > there is a difference between "f0" (= w0/2PI) and the "ringing > frequency". It has to do with the effect of damping upon the rate of > change of the signal, and the ringing frequency equals f0 when there is > no damping (i.e., on the jw axis). In fact, and this is ancient > knowledge so it may be a little dusty, I seem to recall that the actual > ringing frequency corresponds to the imaginary part of the pole location > on the s-plane -- that seems reasonable, because for Q<0.5 the poles lie > on the real axis.
w0 is called the "natural frequency" in that case. The older I get the less I care, because if Q > 10 or so then (a) unless all the components are passive you're likely to be in a world of hurt (or working on an old radio), and (b) the resonant frequency today is different from the resonant frequency yesterday and tomorrow both. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by Greg Berchin April 26, 20152015-04-26
On Sat, 25 Apr 2015 16:49:25 -0400, robert bristow-johnson
<rbj@audioimagination.com> wrote:

> H(s) = (1/Q)(s/w0) / ( (s/w0)^2 + (1/Q)(s/w0) + 1 ) > >for w0 = 1/sqrt(LC) and Q = w0*L/R > >when s = j*w0 you get H(j*w0) = 1 which has greater magnitude than any >other real frequency. > >but this is not necessarily the frequency at which the circuit "rings" >at if whacked with an impulse. > > h(t) = w0 * exp(-(w0/2Q)*t) * cos( sqrt(1-(1/2Q)^2)*w0*t + phi ) > > phi = arctan(1/2Q) i think > > >the "ringing frequency" is sqrt(1-(1/2Q)^2)*w0 .
I seem to recall a control systems class (the controls folks are always interested in time-domain performance) wherein it was acknowledged that there is a difference between "f0" (= w0/2PI) and the "ringing frequency". It has to do with the effect of damping upon the rate of change of the signal, and the ringing frequency equals f0 when there is no damping (i.e., on the jw axis). In fact, and this is ancient knowledge so it may be a little dusty, I seem to recall that the actual ringing frequency corresponds to the imaginary part of the pole location on the s-plane -- that seems reasonable, because for Q<0.5 the poles lie on the real axis.
>now, can we agree that the resonant frequency of this analog transfer >function is w0 which exists for any Q>0 ? even if this thing does not ring?
I really prefer this definition for its mathematical consistency -- w0 is always the same regardless of the value of Q.
Reply by Frank Miles April 26, 20152015-04-26
On Sat, 25 Apr 2015 16:49:25 -0400, robert bristow-johnson wrote:

> you might think that this is a settled issue, especially before any > "digitization" of the transfer function. so, for the moment, let's > leave the z-plane outa it. > > originally, i always took the definition of "Q" and resonant frequency > "w0" (pronounced "omega-naught" not "dubya-zero" even though we all know > he's a zero) as coming from the classic RLC series circuit (with output > voltage taken over the R) having transfer function: > > H(s) = R / ( R + sL + 1/(sC) ) > > which if you re-arrange it a little, you get this BPF: > > H(s) = (1/Q)(s/w0) / ( (s/w0)^2 + (1/Q)(s/w0) + 1 ) > > > for w0 = 1/sqrt(LC) and Q = w0*L/R > > when s = j*w0 you get H(j*w0) = 1 which has greater magnitude than any > other real frequency. > > but this is not necessarily the frequency at which the circuit "rings" > at if whacked with an impulse. > > h(t) = w0 * exp(-(w0/2Q)*t) * cos( sqrt(1-(1/2Q)^2)*w0*t + phi ) > > phi = arctan(1/2Q) i think > > > the "ringing frequency" is sqrt(1-(1/2Q)^2)*w0 . if the Q is smaller > than 1/2, this thing doesn't even ring and you have two damped > exponentials in the impulse response rather than a damped sinusoid. > (instead of a pair of complex-conjugate poles, there is a pair of real > poles.) > > now, can we agree that the resonant frequency of this analog transfer > function is w0 which exists for any Q>0 ? even if this thing does not > ring? > > the reason i am asking is, reviewing some very old notes regarding Hal's > SVF *and* with the Lattice filters, i am wondering if the "frequency" > that the filters are tuned to are the ringing frequency (that exists > only for Q > 1/2) and not the resonant frequency (which still has > meaning for low-pass filters that don't ring at all). > > so which is it? (consider this a polling question.)
The resonant frequency is where the phase=0 ;) More seriously (risking being called a moral relativist) why the need for a single definition? Isn't this one of those cases where we might usefully depend on circumstances/requirements?
Reply by April 25, 20152015-04-25
Bringing the z-plane into it...since I wrangled my usage of the nomenclature, I've referred to a resonance as a local maximum that occurs in a magnitude frequency response (or a signal's mag. FT); where it appears is a resonant frequency . Briefly, the argument times t in cos() or sin() is the pole angle, modal frequency, or eigenfrequency.
Reply by robert bristow-johnson April 25, 20152015-04-25
you might think that this is a settled issue, especially before any 
"digitization" of the transfer function.  so, for the moment, let's 
leave the z-plane outa it.

originally, i always took the definition of "Q" and resonant frequency 
"w0" (pronounced "omega-naught" not "dubya-zero" even though we all know 
he's a zero) as coming from the classic RLC series circuit (with output 
voltage taken over the R) having transfer function:

    H(s) =  R / ( R + sL + 1/(sC) )

which if you re-arrange it a  little, you get this BPF:

    H(s) =  (1/Q)(s/w0) / ( (s/w0)^2 + (1/Q)(s/w0) + 1 )


for w0 = 1/sqrt(LC)  and  Q = w0*L/R

when s = j*w0 you get H(j*w0) = 1 which has greater magnitude than any 
other real frequency.

but this is not necessarily the frequency at which the circuit "rings" 
at if whacked with an impulse.

    h(t) =  w0 * exp(-(w0/2Q)*t) * cos( sqrt(1-(1/2Q)^2)*w0*t + phi )

                            phi = arctan(1/2Q) i think


the "ringing frequency" is sqrt(1-(1/2Q)^2)*w0 .  if the Q is smaller 
than 1/2, this thing doesn't even ring and you have two damped 
exponentials in the impulse response rather than a damped sinusoid. 
(instead of a pair of complex-conjugate poles, there is a pair of real 
poles.)

now, can we agree that the resonant frequency of this analog transfer 
function is w0 which exists for any Q>0 ?  even if this thing does not ring?

the reason i am asking is, reviewing some very old notes regarding Hal's 
SVF *and* with the Lattice filters, i am wondering if the "frequency" 
that the filters are tuned to are the ringing frequency (that exists 
only for Q > 1/2) and not the resonant frequency (which still has 
meaning for low-pass filters that don't ring at all).

so which is it?  (consider this a polling question.)


-- 

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."






On 4/21/15 2:19 PM, robert bristow-johnson wrote:
> On 4/21/15 1:01 PM, Rob Gaddi wrote: >> On Tue, 21 Apr 2015 06:18:53 -0700, radams2000 wrote: >> >>> Look at digital state-variable filters. They have independent control of >>> frequency and Q, and if you are "oversampled enough" you can ignore the >>> errors from running in discrete time. So you can then have a global >>> frequency control variable applied to all stars-variable filters and >>> will frequency-scale the entire filter. I would recommend that you be >>> oversampled by a minimum factor of 4. >>> >>> Another approach is to use filter sections based on allpass filters. >>> Just Google "Sanjit Mitra", he is the master of this approach. >>> > ... >> The state-variable filters were where I was going to go also, >> specifically look for "Chamberlin". >> > > me too. > > i'm looking at Hal's SVF, and as i calculate it, one SVF coefficient is > > Fc = 2*sin(w0/2) > > and the other is > > Qc = (1/Q)*(w0/2)/(sin(w0/2) > > where w0 is normalized resonant frequency (as in DTFT). > > Qc is independent control of Q only for reasonably low resonant > frequency. and i thought that Fc coef expression was only clear when Q > is also reasonably high Q. > > both might be the case for my use. > >> If you stay well away from the Nyquist rate then you can just tune the f >> of each stage and the q's will stay constant. As you get closer to >> Nyquist, the q's start changing too. If you want to avoid that, you'll >> need to stay well away from Nyquist; Bob's suggestion of 4 is if anything >> not conservative enough. > > yup. > >
Reply by Bob Masta April 22, 20152015-04-22
On Tue, 21 Apr 2015 09:41:36 -0400, robert bristow-johnson
<rbj@audioimagination.com> wrote:

>On 4/21/15 9:05 AM, Bob Masta wrote: >> >> I don't have much experience with IIR filters, but I do have >> a fair amount with analog filters. If you cascade N >> identical 1-pole analog filters you get a pile of mush, > >well, if N=4 and you loop some feedback around the pile (and label the >knob with the word "regeneration"), you get what we, in the music >synthesizer domain, call a "4-pole Moog filter".
Hey, thanks for that! I have been interested in (and built) analog synthesizers since the early days and hadn't heard that term. But you bring up an important point, which is exactly the difference between 2 cascaded 1-poles and one 2-pole filter: It's the feedback. If you cascade 2 RC stages (ie cascade two 1-pole filters) you get droop, and not just from the second stage loading the first. The simple Sallen-Key 2-pole topology just applies a buffer to the output of the cascaded RCs, then feeds the buffer output back to the ground return of the first RC. A little gain on the buffer (or messing with the R or C values) allows this to implement any 2-pole damping / Q value. Best regards, Bob Masta DAQARTA v7.60 Data AcQuisition And Real-Time Analysis www.daqarta.com Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, Pitch Track, Pitch-to-MIDI FREE Signal Generator, DaqMusiq generator Science with your sound card!
Reply by Evgeny Filatov April 21, 20152015-04-21
On 21.04.2015 20:01, Rob Gaddi wrote:

(snip)

> The state-variable filters were where I was going to go also, > specifically look for "Chamberlin". > > If you stay well away from the Nyquist rate then you can just tune the f > of each stage and the q's will stay constant. As you get closer to > Nyquist, the q's start changing too. If you want to avoid that, you'll > need to stay well away from Nyquist; Bob's suggestion of 4 is if anything > not conservative enough. >
Thanks! Hal Chamberlin's totally sounds like a book I want on my bookshelf. Evgeny.
Reply by Tim Wescott April 21, 20152015-04-21
On Tue, 21 Apr 2015 10:54:24 -0500, tomb18 wrote:

>>On Mon, 20 Apr 2015 14:40:28 -0500, tomb18 wrote: >> >>> Hi, >>> I have an IQ signal that I mix with a complex oscillator to bring >>> signals down to 0 hz. I now need to do a lowpass filter on the >>signal >>> to remove all other signals before demodulating the signal. Currently, >>> I have this working by using a 5 pole butterworth filter >>with >>> a cut off frequency of 3000Hz. This works nice, and I can get the >>> coefficients from online resources. However, what I really want is a >>> filter that one can adjust the cutoff frequency in real time and not >>one >>> that needs coefficients for every frequency. This if I want 3.0 kHz. >>> 2.9kHz, etc down to 1.8 kHz I need 12 sets of coefficients. I tried >>> something like this however, as one goes down in frequency the audio >>> output level decreases to the point you can hardly hear it anymore. >>Also >>> if I also need a filter down to 400Hz, or even 50Hz it does not make >>> sense to have all those filter coefficients. >>> So can anyone suggest a better way? A better filter? >> >>Are you implementing your 5 pole Butterworth as an IIR filter? >> >>Why not calculate the coefficient values on the fly? >> >>As Eric pointed out, there's difficulties involved with changing cutoff >> >>frequencies on the fly (they'll probably sound like "THUMP!"), but if >>you ramp the cutoff frequency at a rate significantly slower (probably >>5x, at a guess) than the filter's settling time you should be OK. If >>you can calculate the coefficients on the fly, and if you have a means >>of changing them fairly rapidly, then you're made in the shade. >> >>You are implementing your 5-pole IIR filter as two 2nd-order filters and >> >>one 1st-order one, right? >> >>-- >> >>Tim Wescott Wescott Design Services http://www.wescottdesign.com > > I am using the filters from here: > http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html
Step 1: learn why you don't want to implement your IIR filters in blocks bigger than 2nd order. See here: http://wescottdesign.com/articles/ zTransform/z-transforms.html. Read section 3, particularly the part about why the filter in listing 1 isn't a good idea. Step 2: learn how to design your own Butterworth filters, and how to do your own bilinear transforms. Then you won't have to depend on websites of unknown provenance. (Like mine!) -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by robert bristow-johnson April 21, 20152015-04-21
On 4/21/15 1:01 PM, Rob Gaddi wrote:
> On Tue, 21 Apr 2015 06:18:53 -0700, radams2000 wrote: > >> Look at digital state-variable filters. They have independent control of >> frequency and Q, and if you are "oversampled enough" you can ignore the >> errors from running in discrete time. So you can then have a global >> frequency control variable applied to all stars-variable filters and >> will frequency-scale the entire filter. I would recommend that you be >> oversampled by a minimum factor of 4. >> >> Another approach is to use filter sections based on allpass filters. >> Just Google "Sanjit Mitra", he is the master of this approach. >>
...
> The state-variable filters were where I was going to go also, > specifically look for "Chamberlin". >
me too. i'm looking at Hal's SVF, and as i calculate it, one SVF coefficient is Fc = 2*sin(w0/2) and the other is Qc = (1/Q)*(w0/2)/(sin(w0/2) where w0 is normalized resonant frequency (as in DTFT). Qc is independent control of Q only for reasonably low resonant frequency. and i thought that Fc coef expression was only clear when Q is also reasonably high Q. both might be the case for my use.
> If you stay well away from the Nyquist rate then you can just tune the f > of each stage and the q's will stay constant. As you get closer to > Nyquist, the q's start changing too. If you want to avoid that, you'll > need to stay well away from Nyquist; Bob's suggestion of 4 is if anything > not conservative enough.
yup. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."