Reply by Rick Lyons November 17, 20102010-11-17
On Tue, 16 Nov 2010 05:38:42 -0800 (PST), davew
<david.wooff@gmail.com> wrote:

   [Snipped by Lyons]
> >Hi Rick, >yes I'd already realised that zero stuffing is essentially the reason >for/comes free with polyphase filtering - thanks for the reminder. > >I've got the same ISBN, 12th Printing April 2009. > >Regards, >Dave.
Hi Dave, I've sent the errata to your personal E-mail address. [-Rick-]
Reply by davew November 16, 20102010-11-16
On Nov 16, 1:14&#4294967295;pm, Rick Lyons <R.Lyons@_BOGUS_ieee.org> wrote:
> On Mon, 15 Nov 2010 10:03:53 -0800 (PST), davew > > <david.wo...@gmail.com> wrote: > > &#4294967295; &#4294967295;[Snipped by Lyons] > > > > >OK thanks VLV, penny just dropped I think. &#4294967295;Rick mentions this (CIC > >filter method) in his book too. &#4294967295;As you say application dependent, for > >me at least, I think the zero stuff followed by polyphase FIR is the > >appropriate tack. > > Hi davew, > &#4294967295; &#4294967295;Vladimir's correct on both counts. &#4294967295;The > zero-order hold idea provides improved attenuation > of the spectral images that occur with > interpolation. &#4294967295;However, the price you pay is > a non-flat freq response (rolloff) at low frequencies. > The amount of rolloff you'll experience depends on the > bandwidth of the low-freq spectral-samples-of-interest > and the freq spacing between spectral images. > If the bandwidth of your low freq signal-of-interest > is quite small compared to the image spacing, then > the zero-order hold rolloff might not be too bad. > > However davew, if someone implements a polyphase > FIR interpolation process, the ideas of zero-stuffing > and zero-order hold stuffing no longer have any > meaning. &#4294967295;That's because with polyphase FIR filters, > the "stuffed" sequence does not exist at all. > > davew, if you have an American version of the 2nd Edition > of my "Understanding DSP" book, I can send you the > appropriate errata if you can tell me the "Printing Number" > of your copy of the book. > > You can determine the "Printing Number" of the American > version (ISBN# 0-13-108989-7) of the 2nd Edition of my > book by looking at the page just before the "Dedication" > page. &#4294967295; > > On that page (before the Dedication) you'll see all > sorts of publisher-related information, including the > ISBN number. &#4294967295;Down toward the bottom of the page you > should see lines printed something like: > > &#4294967295; &#4294967295; &#4294967295; &#4294967295;Printed in the United States of America > &#4294967295; &#4294967295; &#4294967295; &#4294967295;First Printing > > indicating the "First Printing" of the book. &#4294967295;However, for > later printings the second line above may have the words > like: "Second Printing" or "Seventh Printing". > > See Ya', > [-Rick-]
Hi Rick, yes I'd already realised that zero stuffing is essentially the reason for/comes free with polyphase filtering - thanks for the reminder. I've got the same ISBN, 12th Printing April 2009. Regards, Dave.
Reply by Rick Lyons November 16, 20102010-11-16
On Mon, 15 Nov 2010 10:03:53 -0800 (PST), davew
<david.wooff@gmail.com> wrote:

   [Snipped by Lyons]
> >OK thanks VLV, penny just dropped I think. Rick mentions this (CIC >filter method) in his book too. As you say application dependent, for >me at least, I think the zero stuff followed by polyphase FIR is the >appropriate tack.
Hi davew, Vladimir's correct on both counts. The zero-order hold idea provides improved attenuation of the spectral images that occur with interpolation. However, the price you pay is a non-flat freq response (rolloff) at low frequencies. The amount of rolloff you'll experience depends on the bandwidth of the low-freq spectral-samples-of-interest and the freq spacing between spectral images. If the bandwidth of your low freq signal-of-interest is quite small compared to the image spacing, then the zero-order hold rolloff might not be too bad. However davew, if someone implements a polyphase FIR interpolation process, the ideas of zero-stuffing and zero-order hold stuffing no longer have any meaning. That's because with polyphase FIR filters, the "stuffed" sequence does not exist at all. davew, if you have an American version of the 2nd Edition of my "Understanding DSP" book, I can send you the appropriate errata if you can tell me the "Printing Number" of your copy of the book. You can determine the "Printing Number" of the American version (ISBN# 0-13-108989-7) of the 2nd Edition of my book by looking at the page just before the "Dedication" page. On that page (before the Dedication) you'll see all sorts of publisher-related information, including the ISBN number. Down toward the bottom of the page you should see lines printed something like: Printed in the United States of America First Printing indicating the "First Printing" of the book. However, for later printings the second line above may have the words like: "Second Printing" or "Seventh Printing". See Ya', [-Rick-]
Reply by Manuel Naudin November 15, 20102010-11-15
> > Rick, > > perhaps the OP should buy your book and read chapter 10 like some of > > us already have. &#4294967295;
well, I should probably P.S. was the zero order hold suggestion serious? &#4294967295;I
> > understood that zero stuffing produces "ideal" spectral images to be > > filtered out by the LPF and so is the way to go, or am I missing > > something? &#4294967295;Does repeating samples make things easier somehow? &#4294967295;I > > would have thought (intuitively for me anyway) it would add some form > > of distortion into the mix. > > P.S. my previous thread is on the very same subject as this. > > Thanks, > > Dave > > You can look at zero order hold as a boxcar filter with sin(x)/x > frequency response. This will simplify the subsequent filtering as it > attenuates the upper images, however it will also introduce ~ 4dB > rolloff near Nyquist of the "fundamental" image. IIRC the OP is using > IIR filter.
Oh, I thought I was using a FIR I would rather make an equvalent polyphase FIR, rather then
> doing zero-order-hold + IIR; however it depends on the application. >
So i'll try to follow these advices and go this way. Thanks all
Reply by davew November 15, 20102010-11-15
On Nov 15, 5:38&#4294967295;pm, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
> davew wrote: > > On Nov 15, 12:35 pm, Rick Lyons <R.Lyons@_BOGUS_ieee.org> wrote: > > >>On Sun, 14 Nov 2010 10:05:35 -0600, Vladimir Vassilevsky > > >><nos...@nowhere.com> wrote: > > >>>Manuel Naudin wrote: > > >>>>Hello, > >>>>I'm trying to set up a java program to make EBU R 128 measures on > >>>>audio files. (http://tech.ebu.ch/docs/r/r128.pdf) > >>>>I have an issue with the True Peak measurement. It is basically > >>>>described as four times oversampling the original signal by : > >>>>padding the signal with zeros > >>>>applying a low pass filter > > >>>>The issue I have is that the outputPeak is about 0.25*inputPeak, where > >>>>I would have expected that it would be at least the same, or more in > >>>>case of signals having intersamples peaks. > >>>>So am I missing the whole point ? Is the filter not fitted for that > >>>>purpose ? > > >>>This is what expected as you diluted the original signal by the factor > >>>of 4 by padding it with zeroes. Make up the gain accordingly. > > >>>Vladimir Vassilevsky > > >>Hi Valdimir, > >> &#4294967295;Yep, that's right. &#4294967295;What Manuel should > >>experiment with is, instead of stuffing those > >>three zero-valued samples between each > >>original time sample, repeating the last > >>original sample value three times. &#4294967295;(A kind > >>of "zero-order-hold".) > > >>He might be happier with the filtered results. > > >>See Ya', > >>[-Rick-] > > > Rick, > > perhaps the OP should buy your book and read chapter 10 like some of > > us already have. &#4294967295;P.S. was the zero order hold suggestion serious? &#4294967295;I > > understood that zero stuffing produces "ideal" spectral images to be > > filtered out by the LPF and so is the way to go, or am I missing > > something? &#4294967295;Does repeating samples make things easier somehow? &#4294967295;I > > would have thought (intuitively for me anyway) it would add some form > > of distortion into the mix. > > P.S. my previous thread is on the very same subject as this. > > Thanks, > > Dave > > You can look at zero order hold as a boxcar filter with sin(x)/x > frequency response. This will simplify the subsequent filtering as it > attenuates the upper images, however it will also introduce ~ 4dB > rolloff near Nyquist of the "fundamental" image. IIRC the OP is using > IIR filter. I would rather make an equvalent polyphase FIR, rather then > doing zero-order-hold + IIR; however it depends on the application. > > &#4294967295; VLV
OK thanks VLV, penny just dropped I think. Rick mentions this (CIC filter method) in his book too. As you say application dependent, for me at least, I think the zero stuff followed by polyphase FIR is the appropriate tack.
Reply by Vladimir Vassilevsky November 15, 20102010-11-15

davew wrote:

> On Nov 15, 12:35 pm, Rick Lyons <R.Lyons@_BOGUS_ieee.org> wrote: > >>On Sun, 14 Nov 2010 10:05:35 -0600, Vladimir Vassilevsky >> >> >> >><nos...@nowhere.com> wrote: >> >> >>>Manuel Naudin wrote: >> >>>>Hello, >>>>I'm trying to set up a java program to make EBU R 128 measures on >>>>audio files. (http://tech.ebu.ch/docs/r/r128.pdf) >>>>I have an issue with the True Peak measurement. It is basically >>>>described as four times oversampling the original signal by : >>>>padding the signal with zeros >>>>applying a low pass filter >> >>>>The issue I have is that the outputPeak is about 0.25*inputPeak, where >>>>I would have expected that it would be at least the same, or more in >>>>case of signals having intersamples peaks. >>>>So am I missing the whole point ? Is the filter not fitted for that >>>>purpose ? >> >>>This is what expected as you diluted the original signal by the factor >>>of 4 by padding it with zeroes. Make up the gain accordingly. >> >>>Vladimir Vassilevsky >> >>Hi Valdimir, >> Yep, that's right. What Manuel should >>experiment with is, instead of stuffing those >>three zero-valued samples between each >>original time sample, repeating the last >>original sample value three times. (A kind >>of "zero-order-hold".) >> >>He might be happier with the filtered results. >> >>See Ya', >>[-Rick-] > > > Rick, > perhaps the OP should buy your book and read chapter 10 like some of > us already have. P.S. was the zero order hold suggestion serious? I > understood that zero stuffing produces "ideal" spectral images to be > filtered out by the LPF and so is the way to go, or am I missing > something? Does repeating samples make things easier somehow? I > would have thought (intuitively for me anyway) it would add some form > of distortion into the mix. > P.S. my previous thread is on the very same subject as this. > Thanks, > Dave
You can look at zero order hold as a boxcar filter with sin(x)/x frequency response. This will simplify the subsequent filtering as it attenuates the upper images, however it will also introduce ~ 4dB rolloff near Nyquist of the "fundamental" image. IIRC the OP is using IIR filter. I would rather make an equvalent polyphase FIR, rather then doing zero-order-hold + IIR; however it depends on the application. VLV
Reply by davew November 15, 20102010-11-15
On Nov 15, 12:35&#4294967295;pm, Rick Lyons <R.Lyons@_BOGUS_ieee.org> wrote:
> On Sun, 14 Nov 2010 10:05:35 -0600, Vladimir Vassilevsky > > > > <nos...@nowhere.com> wrote: > > >Manuel Naudin wrote: > > >> Hello, > >> I'm trying to set up a java program to make EBU R 128 measures on > >> audio files. (http://tech.ebu.ch/docs/r/r128.pdf) > >> I have an issue with the True Peak measurement. It is basically > >> described as four times oversampling the original signal by : > >> padding the signal with zeros > >> applying a low pass filter > > >> The issue I have is that the outputPeak is about 0.25*inputPeak, where > >> I would have expected that it would be at least the same, or more in > >> case of signals having intersamples peaks. > >> So am I missing the whole point ? Is the filter not fitted for that > >> purpose ? > > >This is what expected as you diluted the original signal by the factor > >of 4 by padding it with zeroes. Make up the gain accordingly. > > >Vladimir Vassilevsky > > Hi Valdimir, > &#4294967295; Yep, that's right. &#4294967295;What Manuel should > experiment with is, instead of stuffing those > three zero-valued samples between each > original time sample, repeating the last > original sample value three times. &#4294967295;(A kind > of "zero-order-hold".) > > He might be happier with the filtered results. > > See Ya', > [-Rick-]
Rick, perhaps the OP should buy your book and read chapter 10 like some of us already have. P.S. was the zero order hold suggestion serious? I understood that zero stuffing produces "ideal" spectral images to be filtered out by the LPF and so is the way to go, or am I missing something? Does repeating samples make things easier somehow? I would have thought (intuitively for me anyway) it would add some form of distortion into the mix. P.S. my previous thread is on the very same subject as this. Thanks, Dave
Reply by Rick Lyons November 15, 20102010-11-15
On Sun, 14 Nov 2010 10:05:35 -0600, Vladimir Vassilevsky
<nospam@nowhere.com> wrote:

> > >Manuel Naudin wrote: > >> Hello, >> I'm trying to set up a java program to make EBU R 128 measures on >> audio files. ( http://tech.ebu.ch/docs/r/r128.pdf ) >> I have an issue with the True Peak measurement. It is basically >> described as four times oversampling the original signal by : >> padding the signal with zeros >> applying a low pass filter > >> The issue I have is that the outputPeak is about 0.25*inputPeak, where >> I would have expected that it would be at least the same, or more in >> case of signals having intersamples peaks. >> So am I missing the whole point ? Is the filter not fitted for that >> purpose ? > >This is what expected as you diluted the original signal by the factor >of 4 by padding it with zeroes. Make up the gain accordingly. > > >Vladimir Vassilevsky
Hi Valdimir, Yep, that's right. What Manuel should experiment with is, instead of stuffing those three zero-valued samples between each original time sample, repeating the last original sample value three times. (A kind of "zero-order-hold".) He might be happier with the filtered results. See Ya', [-Rick-]
Reply by Manuel Naudin November 15, 20102010-11-15
On 15 nov, 05:57, Rune Allnor <all...@tele.ntnu.no> wrote:
> On Nov 15, 5:46&#4294967295;am, Manuel Naudin <audion...@gmail.com> wrote: > > > I also have to do some tests that 'reveal' intersamples peaks, not > > sure yet of what original signal I have to use. (Well, a 48 kHz signal > > whose peaks lie between samples I guess ;-)). > > Right... are you aware of Nyquist's sampling theorem? > > Rune
Well, I think I am aware of it, but not being a dsp engineer or a professional programmer, there obviously is a lot I have to learn (or at least understand). For those interested in the loudness measurement field, I have setup an open source project here : http://code.google.com/p/jloudnessmeter/
Reply by Rune Allnor November 15, 20102010-11-15
On Nov 15, 5:46&#4294967295;am, Manuel Naudin <audion...@gmail.com> wrote:

> I also have to do some tests that 'reveal' intersamples peaks, not > sure yet of what original signal I have to use. (Well, a 48 kHz signal > whose peaks lie between samples I guess ;-)).
Right... are you aware of Nyquist's sampling theorem? Rune