DSPRelated.com
Forums

Aliasing and Sampling Prog question

Started by Rimmer June 14, 2005
I want to show aliasing and sampling  graphically with spectra by using
LabVIEW (or similar).Here is what I am doing

I have a ficticious sampling freq which is my 'analogue' signal - lets say I
make it 500MHz.

I then pass white noise through a narrowband filter centred at say 10.7MHz
bandwidth 200kHz. I take the FFT and see the spectrum and its negative
image - no problem. I add a sine wave to one end (the low freq) which sticks
up in the power spectra as a marker (for later reference).

I now want to show sub-sampling at lets say 500kHz and see all the images
etc. This is effectively multiplication by a train of unit? impulses. I can
see that this is just the same as removing samples so that to show the
effect of sampling at 500kHz I would need to include every 500e^6/500e3 =
1000 th sample and set the rest to zero.I then take the FFT with the
original sampling freq as ref ie 500MHz and see the images ie aliases. I can
also see the right alignment due to the additive sine wave.

Now suppose I wish to see the effect of sampling at 507kHz? This is not an
integer divider of 500MHz. Do I therefore just change the upper sampling
freq to make it such that 507 divides into it with no remainder?ie make it
say 5070MHz instead of 500MHz?

Also I can see that this is just down-saampling without the decimation
filter or removing the zero samples.

Does this make sense?

Thanks

Rimmer


Rimmer wrote:
> I want to show aliasing and sampling graphically with spectra by using > LabVIEW (or similar).Here is what I am doing > > I have a ficticious sampling freq which is my 'analogue' signal - lets say I > make it 500MHz. > > I then pass white noise through a narrowband filter centred at say 10.7MHz > bandwidth 200kHz. I take the FFT and see the spectrum and its negative > image - no problem. I add a sine wave to one end (the low freq) which sticks > up in the power spectra as a marker (for later reference). > > I now want to show sub-sampling at lets say 500kHz and see all the images > etc. This is effectively multiplication by a train of unit? impulses. I can > see that this is just the same as removing samples so that to show the > effect of sampling at 500kHz I would need to include every 500e^6/500e3 = > 1000 th sample and set the rest to zero.I then take the FFT with the > original sampling freq as ref ie 500MHz and see the images ie aliases. I can > also see the right alignment due to the additive sine wave. > > Now suppose I wish to see the effect of sampling at 507kHz? This is not an > integer divider of 500MHz. Do I therefore just change the upper sampling > freq to make it such that 507 divides into it with no remainder?ie make it > say 5070MHz instead of 500MHz?
For the purposes of your simulation you would probably either want to start with 507MHz, or you would want to sample at 507.099kHz (exactly 986 samples). If this were a real-world problem I'd suggest polyphase filtering or some such thing, but that's way too much work for a simulation.
> > Also I can see that this is just down-saampling without the decimation > filter or removing the zero samples.
If I read you right that is correct.
> > Does this make sense?
Yes. -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
"Tim Wescott" <tim@seemywebsite.com> wrote in message
news:11atnitjrvgrd9@corp.supernews.com...
> Rimmer wrote: > > I want to show aliasing and sampling graphically with spectra by using > > LabVIEW (or similar).Here is what I am doing > > > > I have a ficticious sampling freq which is my 'analogue' signal - lets
say I
> > make it 500MHz. > > > > I then pass white noise through a narrowband filter centred at say
10.7MHz
> > bandwidth 200kHz. I take the FFT and see the spectrum and its negative > > image - no problem. I add a sine wave to one end (the low freq) which
sticks
> > up in the power spectra as a marker (for later reference). > > > > I now want to show sub-sampling at lets say 500kHz and see all the
images
> > etc. This is effectively multiplication by a train of unit? impulses. I
can
> > see that this is just the same as removing samples so that to show the > > effect of sampling at 500kHz I would need to include every 500e^6/500e3
=
> > 1000 th sample and set the rest to zero.I then take the FFT with the > > original sampling freq as ref ie 500MHz and see the images ie aliases. I
can
> > also see the right alignment due to the additive sine wave. > > > > Now suppose I wish to see the effect of sampling at 507kHz? This is not
an
> > integer divider of 500MHz. Do I therefore just change the upper sampling > > freq to make it such that 507 divides into it with no remainder?ie make
it
> > say 5070MHz instead of 500MHz? > > For the purposes of your simulation you would probably either want to > start with 507MHz, or you would want to sample at 507.099kHz (exactly > 986 samples). If this were a real-world problem I'd suggest polyphase > filtering or some such thing, but that's way too much work for a
simulation.
> > >
Thanks that great - that was a type by the way - I meant 507MHz. Rimmer