Digital Signal Processing Lab: Sampling and Reconstruction using MATLAB, Exercises of Digital Signal Processing

A lab experiment on digital signal processing focusing on speech sampling, generation of sinusoids at different sampling rates, and reconstruction of sampled signals using low pass filters. The lab includes instructions for performing these tasks using matlab, including recording speech at various sampling rates, plotting the recorded speech, playing the speech, and analyzing the effects of removing samples. Additionally, the lab covers generating and filtering sinusoids.

Typology: Exercises

2011/2012

Uploaded on 07/26/2012

parivita
parivita 🇮🇳

4.6

(9)

72 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Digital Signal Processing Lab
2
Sampling
1. Objective
1.1 Speech sampling
1.2 Generation of sinusoid at different sampling rates
1.3 Reconstruction of sampled sinusoid using low pass filter
2. Overview
Under certain conditions a continuous tim e signal can be com pletely represented
by and recoverable from knowledge of its values or samples at points equally spaced in
time. It is exploited, for exam ple, in m oving pictures, which consist of a sequence of
individual fram es each of which represents an instantaneous view of a continuously
changing scene. When these samples are viewed in sequence at a sufficiently fast rate,
we perceive an accurate representation of the original continuously moving scene.
The only way that a com puter can handl e a continuous (analog) signal is by
sampling them . The sam pling frequency ha s to be at least TW ICE the m aximum
frequency in the continuous signal, that is the ABSOLUTE m aximum frequency, not
just the twice the maximum frequency that you are interested in. More formally this is:
fs > 2·fmax
Sampling at this rate will not result in any loss of inform ation, but if you sam ple
at less than this then you will not be able to reconstruct the signal as it first appeared.
The reason f or this is that sam pling a signal is equivalent to m ultiplying it by a series
of delta functions.
In real life continuous signals have frequencies that are beyond any sam pling
frequency possible, they m ight even contain infinite frequencies!! One way round this
is to pass the signal through a low pass filte r that stops any frequencies ABOVE half
the sampling frequency. This is still not perfect, but is a practical method.
So, sam pling rate can be reduced up to above discussed rate. Now, the
reconstruction process is possible by m ean of low pass filter. Low pass filter works as
an interpolator. In this lab we will study the reconstruction process.
docsity.com
pf2

Partial preview of the text

Download Digital Signal Processing Lab: Sampling and Reconstruction using MATLAB and more Exercises Digital Signal Processing in PDF only on Docsity!

Digital Signal Processing Lab

Sampling

1. Objective

1.1 Speech sampling 1.2 Generation of sinusoid at different sampling rates 1.3 Reconstruction of sampled sinusoid using low pass filter

2. Overview

Under certain conditions a continuous tim esignal can be com pletely represented by and recoverable from knowledge of its values or samples at points equally spaced in time. It is exploited, for exam ple, in m oving pictures, which consist of a sequence of individual fram es each of which represents an instantaneous view of a continuously changing scene. When these samples are viewed in sequence at a sufficiently fast rate, we perceive an accurate representation of the original continuously moving scene. The only way that a com puter can handle a continuous (analog) signal is by sampling them. The sam pling frequency has to be at least TW ICE the m aximum frequency in the continuous signal, that is the ABSOLUTE m aximum frequency, not just the twice the maximum frequency that you are interested in. More formally this is:

fs > 2·fmax

Sampling at this rate will not result in any loss of inform ation, but if you sam ple at less than this then you will not be able to reconstruct the signal as it first appeared. The reason f or this is that sam pling a signal is equivalent to m ultiplying it by a series of delta functions. In real life continuous signals have frequencies that are beyond any sam pling frequency possible, they m ight even contain infinite frequencies!! One way round this is to pass the signal through a low pass filter that stops any frequencies ABOVE half the sampling frequency. This is still not perfect, but is a practical method. So, sam pling rate can be reduced up to above discussed rate. Now, the reconstruction process is possible by m ean of low pass f ilter. Low pass f ilter works as an interpolator. In this lab we will study the reconstruction process.

docsity.com

Digital Signal Processing Lab

3. MATLAB Simulation

3.1 Speech sampling Write a MATLAB code that perform following steps

  1. Record the speech at following sampling rates a. 22050 KHz b. 44100 KHz
  2. Plot the recorded speech on real frequency axis. Identify the band of frequencies.
  3. Play speech at original sampling rate.
  4. Replace throw away every next sam ple of each recorded speech. Note the effect of this step.
  5. Now, again play the m odified speech atoriginal sam pling rate and half of the sampling.
  6. Again, throw away two sam ples of each recorded speech. Note the effect of this step.
  7. Find out the required sampling rate to play the new speech signal. 3.2 Sine wave generation
  8. Generate sine waves of 1KHz and 2KHz at sampling rate of 16KHz and 28KHz.
  9. Design a 100-order low pass filter of with cutoff at

π (^).

  1. Perform following for each of the above generated sine wave. a. Pass the original sine through the low pass filter sketch both sine waves (i.e. original sine wave and filtered one) in time domain. b. Replace every next sample by zeros of sine wave. c. Repeat the step (a) for new sine wave. d. Replace every two sample by zeros of sine wave. e. Repeat the step (a) for new sine wave. f. Replace every three sample by zeros of sine wave. g. Repeat the step (a) for new sine wave. h. Keep on reducing num ber samples until filter out rem ain same as the input original sine.

docsity.com