On 8/1/12 5:25 AM, Domagoj Saric wrote:
On 1.8.2012. 6:29, robert bristow-johnson wrote:
if DC is slowly varying, small displacements
of a windowed section of DC (which is what comes out of any weighted
moving-average filter) does not change it much. the difference between the IIR
vs FIR, minimum phase vs. linear phase, is just the shape of that window
function (it's the same as the impulse response)

I must admit you kind of lost me with that last sentence... :)


i'm saying that these are all filters. the output of whatever DC blocker, however you implement it, is a weighted sum of the current and previous samples. if you were to plot the weighting coefficients vs. displacement from the current sample, you would see how your signal is "windowed" and the only difference between these is the shape of the window. this window is actually the same as the impulse response flipped around backward.

for a moving average, the coefficients must all add to 1. there are many shapes that you can have that have coefficients that add to 1.

for a DC blocker, the coefficients must all add to 0. again, many ways to do that.

if the shape of this window is perfectly symmetrical, you have linear phase. that filter has a constant time delay, no matter what the frequency content of the audio going in is.

if the filter is minimum phase, the shape of that window will emphasize the more current samples than the much older samples.



Unless the answer is in the JOS link (the near zero-phase)..?

you mean the zero-phase filters using truncated IIR? for DC blocking (or for
LPF metering) or whatever, using that Powell/Chau/Smith/Wang kind of
linear-phase TIIR filtering is using a cannon to kill a fly, no?

No, I mean https://ccrma.stanford.edu/~jos/filters/DC_Blocker_Frequency_Response.html which shows that when R=0 you get a linear phase FIR but when R approaches 1 (which is the case in DC filters) the phase response approaches zero for frequencies not near zero/DC.



that "FIR" case (when R=0) is a digital differentiator. you might like the linear phase (a constant delay of 1/2 sample), but you won't like the amplitude component of the frequency response.

that JOS DC block filter is the simplest IIR filter.
for a moving average or for DC blocking, just use an IIR. simple and plenty good enough. if it's done in fixed-point arithmetic, then using noise shaping
will help the filter behave itself.

Since we seem to be starting to run in circles let me try to restate my main question as simple as possible: does using an IIR DC filter defeat the purpose of using a (linear phase) FIR (anti-aliasing) LPF in the same signal chain? If not, why? If yes, how can it be considering that this is exactly what ITU-R and EBU recommend for "true peak" measurement?

i dunno about ITU-R or EBU (i s'pose i could click on those links you mention), but the old analog meters had meter ballistics that were analog. IIR filters most closely follow analog filters than do FIR, unless you make the FIR very long.

note that when R is very close to 1, the DC block filter is almost zero-phase for frequencies high enough. the DC blocker does nothing to frequencies high enough because it's just an HPF.


--

r b-j                  r...@audioimagination.com

"Imagination is more important than knowledge."



--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp

Reply via email to