Docsity

Understanding the Effect of Sampling Frequency on Spectrum Analysis - Prof. Daniel S. Brog, Lab Reports of Electrical and Electronics Engineering

Partial preview of the text

Download Understanding the Effect of Sampling Frequency on Spectrum Analysis - Prof. Daniel S. Brog and more Lab Reports Electrical and Electronics Engineering in PDF only on Docsity!

2/2/2009 Daniel S. Brogan - UNH ECE 618 S09 1-

A 1 Wavelength Sampled Waveform

2/2/2009 Daniel S. Brogan - UNH ECE 618 S09 1-

Output from Matlab’s fft() Command

2/2/2009 Daniel S. Brogan - UNH ECE 618 S09 1-

Assigning Frequencies to Bin Numbers

Note: The X bin should be discarded because it contains data from both ends of

the spectrum. For odd fft lengths, there is no X bin.

2/2/2009 Daniel S. Brogan - UNH ECE 618 S09 1-

The fftshift() Function

Note: Matlab scales the fft output amplitude by the number of samples. This

assumes a rectangular weighting window on the sampled (on / off).

2/2/2009 Daniel S. Brogan - UNH ECE 618 S09 1-

Zero-Padding To Infinite Sample Size

Zero padding increases the number of points until the red line is reached, but only

the blue samples represent the real data. Thus, the continuous spectrum is

simply a best fit line to the blue samples.

2/2/2009 Daniel S. Brogan - UNH ECE 618 S09 1-

Zero-Padding To Infinite Sample Size

In this case, the red line is the convolution of the sinc (from the 1 s sampling

length) with the two impulses from the sine wave, i.e. the absolute value of the

cyan sinc function minus the green sinc function (odd symmetry for sine waves).

2/2/2009 Daniel S. Brogan - UNH ECE 618 S09 1-

A 1.5 Wavelength Sampled Waveform

Remember, the fft assumes that this data sequence repeats infinitely.

How will this effect the spectrum?

2/2/2009 Daniel S. Brogan - UNH ECE 618 S09 1-

The Sampled Spectrum for 1.5 Wavelengths

This amplitude spectrum is much noisier than the previous one because there is

no bin at 1 Hz and because of the abrupt change at the ends of the waveform.

This frequency spreading is called leakage.

2/2/2009 Daniel S. Brogan - UNH ECE 618 S09 1-

The Sampled Spectrum for 2 Wavelengths

This amplitude spectrum is very similar to the spectrum for a 1 wavelength

sample because both have a frequency bin at 1 Hz. However, this spectrum has

twice as many measurements as the previous one.

2/2/2009 Daniel S. Brogan - UNH ECE 618 S09 1-

An Almost 1 Wavelength Sampled Waveform

What spectrum do you expect to see now?

2/2/2009 Daniel S. Brogan - UNH ECE 618 S09 1-

The Sampled Spectrum for ~1 Wavelength

There is a small amount of leakage here because there is nearly 1 wavelength

here. If 125 samples are taken, there is no leakage because there is a frequency

bin at 1 Hz (i.e. integer number of wavelengths).

2/2/2009 Daniel S. Brogan - UNH ECE 618 S09 1-

A 2 Wavelength Sampled Waveform @ 2 Hz

What spectrum do you expect to see now? Why?