Book: The Art of VA Filter Design 2.1.2

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

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.
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

you're just integrating the differentiated value.

how is it so hard to believe this:

s - s[i-1] + s[i-1] = s ?

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.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

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.
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 :)

Post

aciddose wrote:you're just integrating the differentiated value.

how is it so hard to believe this:

s - s[i-1] + s[i-1] = s ?

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)
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

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 :)


:tu: yeah - so, as we see, the feedback is indeed crucial for this DC reconstruction. i guess, i'm already way too spoiled with this strictly sequential thinking in DSP.
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

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.

Post

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

Post

We paid Google :hihi:

Post

[Edit: message deleted by the author]
Last edited by Z1202 on Fri Jun 08, 2012 9:24 am, edited 1 time in total.

Post

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:

Code: Select all

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;
[/size]

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:

Image

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.
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

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 :) I just derived it by hand, rechecked my derivation, but didn't do a numerical check. Apparently I made some mistake there.
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).

Post

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 :)

Post

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.
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

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.
Well, you won't get a symmetric shape anyway ;)

Post

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 height
well, 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.
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post Reply

Return to “DSP and Plugin Development”