Plug-ins, Hosts, Apps,
Hardware, Soundware
Developers
(Brands)
Videos Groups
Whats's in?
Banks & Patches
Download & Upload
Music Search
KVR
   
KVR Forum » DSP and Plug-in Development
Thread Read
Book: The Art of VA Filter Design
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Robin from www.rs-met.com
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Thu May 24, 2012 3:58 am reply with quote
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
aciddose
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Thu May 24, 2012 4:05 am reply with quote
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  
Z1202
KVRist
- profile
- pm
PostPosted: Thu May 24, 2012 4:09 am reply with quote
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 Smile
^ Joined: 11 Apr 2002  Member: #2472  
Robin from www.rs-met.com
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Thu May 24, 2012 4:14 am reply with quote
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
Robin from www.rs-met.com
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Thu May 24, 2012 4:16 am reply with quote
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 Smile


Thumbs Up! 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.
----
^ Joined: 08 Mar 2004  Member: #15959  Location: Berlin, Germany
mystran
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Thu May 24, 2012 12:12 pm reply with quote
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.
----
<- my plugins | my music -> @Soundcloud
^ Joined: 11 Feb 2006  Member: #97939  Location: Helsinki, Finland
Z1202
KVRist
- profile
- pm
PostPosted: Thu May 24, 2012 12:23 pm reply with quote
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  
George
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Thu May 24, 2012 12:25 pm reply with quote
We paid Google HiHi
----
discoDSP — Home of CoronaDiscovery ProVertigo
^ Joined: 17 Jul 2002  Member: #3353  
Z1202
KVRist
- profile
- pm
PostPosted: Fri May 25, 2012 12:43 am reply with quote
[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  
Robin from www.rs-met.com
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Fri May 25, 2012 2:59 am reply with quote
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
Z1202
KVRist
- profile
- pm
PostPosted: Fri May 25, 2012 3:19 am reply with quote
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 Smile 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).
^ Joined: 11 Apr 2002  Member: #2472  
Z1202
KVRist
- profile
- pm
PostPosted: Fri May 25, 2012 3:20 am reply with quote
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 Smile
^ Joined: 11 Apr 2002  Member: #2472  
Robin from www.rs-met.com
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Fri May 25, 2012 3:23 am reply with quote
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 Smile


hmm...najaaa...neee. i'll see if i can work it out.
----
^ Joined: 08 Mar 2004  Member: #15959  Location: Berlin, Germany
Z1202
KVRist
- profile
- pm
PostPosted: Fri May 25, 2012 3:24 am reply with quote
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 Smile


hmm...najaaa...neee. i'll see if i can work it out.
Well, you won't get a symmetric shape anyway Wink
^ Joined: 11 Apr 2002  Member: #2472  
Robin from www.rs-met.com
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Fri May 25, 2012 3:27 am reply with quote
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.
----
^ Joined: 08 Mar 2004  Member: #15959  Location: Berlin, Germany
All times are GMT - 8 Hours

Printable version
Page 5 of 9
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Display posts from previous:   
ReplyNew TopicPrevious TopicNext Topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Username: Password:  
KVR Developer Challenge 2012