|
|||
Z1202 wrote: I would further assume, that should you simply connect an integrator to the bandpass output, the resulting lowpass signal might "drift" around DC, whereas inside the filter the feedback will probably take care of the precision losses.
hopefully. but yes, i agree - i would expect something like that, too. |
|||
| ^ | Joined: 08 Mar 2004 Member: #15959 Location: Berlin, Germany | ||
|
|||
you're just integrating the differentiated value.
how is it so hard to believe this: s[i] - s[i-1] + s[i-1] = s[i] ? differentiation: d = s - a; a = s; integration: b += d; b == s; the problem of drift due to error is solved by the feedback, which can never be absolutely zero. |
|||
| ^ | Joined: 07 Dec 2004 Member: #50793 | ||
|
|||
Robin from www.rs-met.com wrote: Z1202 wrote: I would further assume, that should you simply connect an integrator to the bandpass output, the resulting lowpass signal might "drift" around DC, whereas inside the filter the feedback will probably take care of the precision losses.
hopefully. but yes, i agree - i would expect something like that, too. |
|||
| ^ | Joined: 11 Apr 2002 Member: #2472 | ||
|
|||
aciddose wrote: you're just integrating the differentiated value.
how is it so hard to believe this: s[i] - s[i-1] + s[i-1] = s[i] ? differentiation: d = s - a; a = s; integration: b += d; b == s; hmm...well, yes. sometimes, it helps to switch the perspective. from a (discrete) time-domain perspective, it's certainly much easier to believe (although we are actually not really using the naive integrator here) |
|||
| ^ | Joined: 08 Mar 2004 Member: #15959 Location: Berlin, Germany | ||
|
|||
Z1202 wrote: Well, suppose you have a DC input x=const, and BP=0 and LP!=x, then you immediately get the signal x-LP at the input of the first integrator. There you go
|
|||
| ^ | Joined: 08 Mar 2004 Member: #15959 Location: Berlin, Germany | ||
|
|||
Something to note: since the finite DC gain relies on the differentials having zeroes at DC (which the integrators then cancel), if the differentials go through a non-linearity (eg practical OTA) you will typically get some DC drift at output. This is dependent on the cutoff (increases as cutoff gets lower).
If you observe that happening, don't panic. It's something that happens with with an analog implementation as well (or even SPICE). In a properly gain-staged filter it shouldn't become a problem at audio rates (ie back off the saturation), but you might want to stick a DC blocker at the output. |
|||
| ^ | Joined: 11 Feb 2006 Member: #97939 Location: Helsinki, Finland | ||
|
|||
I'm wondering why google still doesn't find the original link, while it finds the discodsp mirror. Does this have to do with the way I posted the URL? Attempt no.2:
http://ay-kedi.narod2.ru/VAFilterDesign.pdf |
|||
| ^ | Joined: 11 Apr 2002 Member: #2472 | ||
|
|||
We paid Google |
|||
| ^ | Joined: 17 Jul 2002 Member: #3353 | ||
|
|||
[Edit: message deleted by the author] Last edited by Z1202 on Fri Jun 08, 2012 1:24 am; edited 1 time in total |
|||
| ^ | Joined: 11 Apr 2002 Member: #2472 | ||
|
|||
i was trying to obtain a bell-shaped filter (aka peaking filter, parameteric eq) from the SVF via the formulas in 5.3, page 81 (add a weighted bandpass output to the original signal). the formula at the bottom of the page to prescribe a desired bandwidth in octaves to calculate the damping coeff "R" did not give me the results, i expected. so i tried to re-derive it and obtained a different formula. i wrote a little MatLab/Octave script that compares both formulas:
clear all; % parameters (we assume the center frequency at unity): G = 4.0; % desired linear gain (== K-1) B = 2.0; % desired bandwidth in octaves K = G-1; % multiplier for bandpass signal w = 0:0.01:3; % radian frequency axis RV = (abs(2^(B/2)-2^(-B/2)))/(4*G); % Vadim's formula (page 81), G == 1+K RR = sqrt((((2^B)^2+1)/2^B-2)/(4*G)); % Robin's formula % obtain magntitude responses for both values of R: cN = 4*RV^2*K^2 + 8*RV^2*K + 4*RV^2 - 2; cD = 4*RV^2 - 2; MV = sqrt((1 + cN*w.^2 + w.^4) ./ (1 + cD*w.^2 + w.^4)); cN = 4*RR^2*K^2 + 8*RR^2*K + 4*RR^2 - 2; % numerator coeff for w^2 cD = 4*RR^2 - 2; % denominator coeff for w^2 MR = sqrt((1 + cN*w.^2 + w.^4) ./ (1 + cD*w.^2 + w.^4)); % plot: % blue curve: Vadim's formula (too narrow) % green curve: Robin's formula - passes through 2=sqrt(4) at 0.5 and 2.0 % which is at it should be for a 2-octave wide bell centered at 1: plot(w, MV, w, MR); grid on; the script plots the magnitude responses for an analog bell with unit center frequency, a linear gain factor of 4 and 2 octaves bandwidth. the green curve is what i expect (it passes through 2 at 0.5 and 2.0) and that's what my formula gives. the blue curve is from an R value calculated with the formula from the book and is too narrow:
hmm... so either the formula in the book is wrong, or i somehow misunderstood how to apply it. Vadim, if the former turns out to be the case, you may read my formula from the script. also, i wonder whether the "peaking filter" somewhere below (as opposed to this "band-shelf") results in the same response (up to sign inversion) once you parametrize it in terms of the bandwidth? edit: of course, this formula applies to the analog filter, for the digital one, one has to take frequency warping into account ....more work to do. |
|||
| ^ | Joined: 08 Mar 2004 Member: #15959 Location: Berlin, Germany | ||
|
|||
Robin from www.rs-met.com wrote: the formula at the bottom of the page to prescribe a desired bandwidth in octaves to calculate the damping coeff "R" did not give me the results, i expected. Oops, I guess I'll need to debug it Robin from www.rs-met.com wrote: also, i wonder whether the "peaking filter" somewhere below (as opposed to this "band-shelf") results in the same response (up to sign inversion) once you parameterize it in terms of the bandwidth? The other one doesn't have independent control of bandwidth and peak height (actually someone on KVR made me recently aware of this peaking filter, probably I need to dig up this thread and credit the person in the next book update). |
|||
| ^ | Joined: 11 Apr 2002 Member: #2472 | ||
|
|||
Robin from www.rs-met.com wrote: edit: of course, this formula applies to the analog filter, for the digital one, one has to take frequency warping into account ....more work to do. Personally, I'd assume at least 88kHz SR and ignore the "minor" warping in the audible range |
|||
| ^ | Joined: 11 Apr 2002 Member: #2472 | ||
|
|||
Z1202 wrote: Robin from www.rs-met.com wrote: edit: of course, this formula applies to the analog filter, for the digital one, one has to take frequency warping into account ....more work to do. Personally, I'd assume at least 88kHz SR and ignore the "minor" warping in the audible range hmm...najaaa...neee. i'll see if i can work it out. |
|||
| ^ | Joined: 08 Mar 2004 Member: #15959 Location: Berlin, Germany | ||
|
|||
Robin from www.rs-met.com wrote: Z1202 wrote: Robin from www.rs-met.com wrote: edit: of course, this formula applies to the analog filter, for the digital one, one has to take frequency warping into account ....more work to do. Personally, I'd assume at least 88kHz SR and ignore the "minor" warping in the audible range hmm...najaaa...neee. i'll see if i can work it out. |
|||
| ^ | Joined: 11 Apr 2002 Member: #2472 | ||
|
|||
Z1202 wrote: Robin from www.rs-met.com wrote: also, i wonder whether the "peaking filter" somewhere below (as opposed to this "band-shelf") results in the same response (up to sign inversion) once you parameterize it in terms of the bandwidth? The other one doesn't have independent control of bandwidth and peak heightwell, yeah - that's probably what i mean with "once you parameterize it in terms of the bandwidth" ...but that doesn't even seem to be possible since it has no free parameter K. hmm...well - i think the other one is more useful then. |
|||
| ^ | Joined: 08 Mar 2004 Member: #15959 Location: Berlin, Germany |
| KVR Forum Index » DSP and Plug-in Development | All times are GMT - 8 Hours |
|
Printable version |
Disclaimer: All communications made available as part of this forum and any opinions, advice, statements, views or other information expressed in this forum are solely provided by, and the responsibility of, the person posting such communication and not of kvraudio.com (unless kvraudio.com is specifically identified as the author of the communication).
Powered by phpBB © phpBB Group















