DSPRelated.com
Forums

A DSP Decimation Riddle

Started by Randy Yates August 24, 2007
Just for fun!

When is decimating by N not equivalent to decimating by 2*N followed
by interpolating by 2?

This is not a trick question and is an actual real-life application.
-- 
%  Randy Yates                  % "Maybe one day I'll feel her cold embrace,
%% Fuquay-Varina, NC            %                    and kiss her interface, 
%%% 919-577-9882                %            til then, I'll leave her alone."
%%%% <yates@ieee.org>           %        'Yours Truly, 2095', *Time*, ELO   
http://home.earthlink.net/~yatescr
> When is decimating by N not equivalent to decimating by 2*N followed > by interpolating by 2?
I think, except for a handful of pathological cases, any time bandwidth >= Fs/4N. For example, try it with a sine wave (NOT a cosine wave) of frequency Fs/4N. Decimate by N and Nyquist is still satisfied; you'll save the peaks and the zero-crossings. Decimate by 2*N and Nyquist is violated; you'll save only the zero crossings and all the interpolation in the world won't bring back anything resembling the original signal. Greg
On Aug 24, 12:15 pm, Randy Yates <ya...@ieee.org> wrote:
> Just for fun! > > When is decimating by N not equivalent to decimating by 2*N followed > by interpolating by 2?
i dunno, perhaps when the original signal has non-zero content between Nyquist/(2N) and Nyquist/N ?
robert bristow-johnson <rbj@audioimagination.com> writes:

> On Aug 24, 12:15 pm, Randy Yates <ya...@ieee.org> wrote: >> Just for fun! >> >> When is decimating by N not equivalent to decimating by 2*N followed >> by interpolating by 2? > > i dunno, perhaps when the original signal has non-zero content between > Nyquist/(2N) and Nyquist/N ?
OK. I'm a dummy. ("You could learn a lot from a dummy...") My problem was that I did not recognize a couple of properties regarding multirate processing and bandpass sampling. I was confused, but now I'm just stupid... -- % Randy Yates % "With time with what you've learned, %% Fuquay-Varina, NC % they'll kiss the ground you walk %%% 919-577-9882 % upon." %%%% <yates@ieee.org> % '21st Century Man', *Time*, ELO http://home.earthlink.net/~yatescr
On Aug 24, 1:57 pm, Randy Yates <ya...@ieee.org> wrote:
> robert bristow-johnson <r...@audioimagination.com> writes: > > On Aug 24, 12:15 pm, Randy Yates <ya...@ieee.org> wrote: > >> Just for fun! > > >> When is decimating by N not equivalent to decimating by 2*N followed > >> by interpolating by 2? > > > i dunno, perhaps when the original signal has non-zero content between > > Nyquist/(2N) and Nyquist/N ? > > OK. I'm a dummy. ("You could learn a lot from a dummy...")
naw. but, being a fellow dummy (who likes to think of things in as simple terms as possible), i just think of decimating as down-sampling and interpolation as up-sampling. i also like to think of continuous- time as having an infinite sampling rate, so "sampling a C.T. waveform" is about the same as "down-sampling", so both have issues of what happens to components that live above the (new) Nyquist. up- sampling has no such issue, at least in the ideal. r b-j
frequency related issue is it?
when you decimate, you lose some signal in the high range of the bandwidth.
and you can't recover the lost signal by interpolation.

Am I right?




"Randy Yates" <yates@ieee.org> wrote in message 
news:m37inkdi3d.fsf@ieee.org...
> Just for fun! > > When is decimating by N not equivalent to decimating by 2*N followed > by interpolating by 2? > > This is not a trick question and is an actual real-life application. > -- > % Randy Yates % "Maybe one day I'll feel her cold > embrace, > %% Fuquay-Varina, NC % and kiss her > interface, > %%% 919-577-9882 % til then, I'll leave her > alone." > %%%% <yates@ieee.org> % 'Yours Truly, 2095', *Time*, ELO > http://home.earthlink.net/~yatescr
On Fri, 24 Aug 2007 12:15:34 -0400, Randy Yates <yates@ieee.org>
wrote:

>Just for fun! > >When is decimating by N not equivalent to decimating by 2*N followed >by interpolating by 2? > >This is not a trick question and is an actual real-life application. >-- >% Randy Yates % "Maybe one day I'll feel her cold embrace,
Hi Randy, I don't have solid answer for ya' right now, but isn't there some restriction about decimation followed by interpolation only works "as expected" when the decimation and interpolation factors are mutually prime? [-Rick-]
Randy Yates <yates@ieee.org> wrote in news:m37inkdi3d.fsf@ieee.org:

> Just for fun! > > When is decimating by N not equivalent to decimating by 2*N followed > by interpolating by 2? > > This is not a trick question and is an actual real-life application.
When the highest frequency content is bigger than Fs/4, with Fs being the original sampling rate. -- Scott Reverse name to reply
On Aug 27, 10:07 am, R.Lyons@_BOGUS_ieee.org (Rick Lyons) wrote:
> ... isn't there some restriction > about decimation followed by interpolation > only works "as expected" when the decimation and > interpolation factors are mutually prime?
Rick, Could you be referring to polyphase filtering, where the order of downsampling and upsampling can only be reversed if the downsampling and upsampling factors are relatively prime? Greg
On Fri, 24 Aug 2007 12:15:34 -0400, Randy Yates <yates@ieee.org>
wrote:

>Just for fun! > >When is decimating by N not equivalent to decimating by 2*N followed >by interpolating by 2? > >This is not a trick question and is an actual real-life application. >-- >% Randy Yates % "Maybe one day I'll feel her cold embrace,
OK. I think I have one correct answer. As far as I can tell, decimating by two is not equivalent to decimating by four followed by interpolation by two. [-Rick-]