0% found this document useful (0 votes)
35 views

Digital Signal Processing Lab - 1

This document summarizes the results of an experiment on sampling and digital signal processing. It discusses (1) sampling a signal at frequencies above the Nyquist rate, where the spectrum becomes sharper as more samples are taken, (2) sampling below the Nyquist rate causes aliasing and loss of information, and (3) the spectrum of a square wave contains only odd harmonics as expected. It also (4) describes using zero interpolation and a low-pass filter to upsample a signal, which introduces a delay but results in a signal equivalent to sampling at a higher rate.

Uploaded by

Gautam Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Digital Signal Processing Lab - 1

This document summarizes the results of an experiment on sampling and digital signal processing. It discusses (1) sampling a signal at frequencies above the Nyquist rate, where the spectrum becomes sharper as more samples are taken, (2) sampling below the Nyquist rate causes aliasing and loss of information, and (3) the spectrum of a square wave contains only odd harmonics as expected. It also (4) describes using zero interpolation and a low-pass filter to upsample a signal, which introduces a delay but results in a signal equivalent to sampling at a higher rate.

Uploaded by

Gautam Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

DIGITAL SIGNAL PROCESSING LAB REPORT

Experiment 1 : Sampling

A.Sampling of a sinusoidal waveform

An analog waveform (band-limited) is sampled at a frequency greater


than the nyquist frequency (2f​max​). Since signal was composed of
sinusoidal signals of frequency 1000 Hz, 2000 Hz & 4000 Hz, peaks
are clearly observed at these locations. To compute spectrum of the
signal numerically we applied DFT on truncated signal in
time-domain, where ​N marked the number of data points into
consideration. From the above plot, it can be clearly seen that as N
increases, peaks are more sharp, i.e. less spreading of spectrum.
This behaviour was very much expected, since more the number of
data points, frequency response leads to ideal response.
B.Sampling at below Nyquist rate and effect of aliasing

Analog waveform (band-limited) is having nyquist frequency (2f​max


=​12KHz). Sampling it below the nyquist frequency leads to loss of
information. As shown in the previous plots, frequency component at
1KHz, 2KHz, 4KHz should be present. But at f < 12KHz, component
at f = 4 KHz is not present due to aliasing effect.
C.Spectrum of a square wave

As expected frequency response of square wave is composed of


odd-harmonics with f​0 ​= 1Khz ( T= 1ms). Signal was sampled at rate
much above Nyquist rate and was truncated with ​N = 256​. ​Since the
signal is real, harmonic symmetry is also clearly observed.
D.Interpolation or Upsampling

There are various strategies for interpolation, one of the is zero interpolation. Analog
band-limited was sampled at frequency f = 2fmax Sampled signal was upsampled to
twice the number of samples by inserting zero between any two data points. It was then
passed to a low pass filter to interpolate at the newly inserted points. Since a sudden fall
and rise at each zero-insertion point causes high frequency component to creep in, low
pass filter will eliminate by by interpolating at those points. I used butterworth filter as a
low pass filter. Resultant signal should be ideally equivalent to a signal sampled at fs =
24KHz. This can be clearly seen from the last plot. Delay between the two signals can
be clearly seen. This delay is introduced due to the filter. As we increase the order of
the filter more delay is expected to creep in.

You might also like