0% found this document useful (0 votes)
142 views10 pages

DSP Lab ExptList 2020

This document provides a tentative list of experiments for the Digital Signal Processing laboratory course EC3093D at the National Institute of Technology Calicut. The experiments cover topics including generating and plotting fundamental discrete-time signals in MATLAB, sampling continuous-time signals, linear convolution, the discrete Fourier transform, z-transforms, and oversampling/undersampling effects. The experiments involve both theoretical analysis and hands-on MATLAB programming to analyze and process digital signals.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
142 views10 pages

DSP Lab ExptList 2020

This document provides a tentative list of experiments for the Digital Signal Processing laboratory course EC3093D at the National Institute of Technology Calicut. The experiments cover topics including generating and plotting fundamental discrete-time signals in MATLAB, sampling continuous-time signals, linear convolution, the discrete Fourier transform, z-transforms, and oversampling/undersampling effects. The experiments involve both theoretical analysis and hands-on MATLAB programming to analyze and process digital signals.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

NATIONAL INSTITUTE OF TECHNOLOGY CALICUT

Department of Electronics and Communication Engineering

EC3093D Digital Signal Processing Laboratory


(Tentative List of Experiments)

No.1: Familiarization Experiments

1. Generate the following fundamental discrete time signals and display using various plot-
ting functions available in MATLAB.

i. Unit impulse
ii. Unit step
iii. Unit ramp
iv. Periodic sequences (Eg. x[n] = {· · · , 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, · · · })
v. Exponential signal, x[n] = a(α)n u[n], where
(a) a and α are real. Obtain the plots for various values of α (α >1, 0 <α <1, -1
<α <0, -1<α ).
(b) a is complex.
(c) α is complex. Take α = eβ and obtain the plots if β is purely imaginary (β = jω)
and complex (β = σ + jω).
vi. Plot the complex exponential signal x[n] = ejΩ0 n for a specific Ω0 . Check whether the
signal is periodic for all values of Ω0 . If not obtain the condition for periodicity and
demonstrate the same using appropriate plots. (use “subplot” and “hold” functions)
( )
4πn
vii. Given x1 [n] = cos , x2 [n] = 3 cos(1.3πn) − 4 sin(0.5πn + 0.5π), x3 [n] =
17
5 cos(1.5πn + 0.75π) + 4 cos(0.6πn) − sin(0.5πn). In each case, determine the period
of the sequence theoretically and verify the result using the MATLAB plots.
viii. Plot signal x[n] = {1, 1, 1, 0, 1, 2, 3, 4}. Plot x[−n] and x[−n + 2].

2. a) Sample the sinusoid xa = 3 sin(2πf t), where f = 2 KHz at two different sampling
frequencies, fs1 = 3 KHz and fs2 = 5 KHz and plot the sampled signals. Use func-
tions ‘stem’ and ‘subplot’. Plot the sampled signals over the original continuous-time
signal. (Use ‘hold’)
b) Express the above as a 3-bit digital signal. Sample at fs3 = 15 KHz. Plot the sampled
signal (use ‘stem’) over the original analog signal.
3. A random signal of length N with samples uniformly distributed in the interval (0, 1)
can be generated by using the MATLAB command x = rand(1, N ). Likewise, a random
signal x[n] of length N with samples normally distributed with zero mean and unity
variance can be generated by using the following MATLAB command x = randn(1, N );

a. Write a MATLAB program to generate and display a random signal of length 100
whose elements are uniformly distributed in the interval [−2, 2].
b. Write a MATLAB program to generate and display a Gaussian random signal of length
75 whose elements are normally distributed with zero mean and a variance of 3. (Check
to see that the realised variable has mean and variance as defined, using the built in
functions mean() and var() in MATLAB ).

4. Familiarize the MATLAB functions for reading and displaying speech, audio, and image
data (eg. imread(), imshow(), wavread(), sound() etc.). Generate a chessboard image
(as a matrix) and display it on the screen.
No.2: Convolution

1. Generate the signal x[n] = {1, 1, 1, 0, 1, 2, 3, 4}. Write a function to compute linear con-
volution with system impulse response h[n] = {1, 2, 1, −1} given by

y[n] = h[k]x[n − k]
k

Verify your result with that obtained from in-built function in MATLAB. How would the
result change if we were to change the origin point of

(a) x[n]
(b) h[n]

2. Use the above program to find the step response of an LTI system given the impulse
response. (Take h[n] = {1, 2, 3, 4}). Also compute the response of the same system to a
rectangular pulse, exponential signal and a sinusoidal signal.

3. Read an image and resize it to 32 × 32. { Then convert


} it into a row vector of length
1 1 1
1 × 1024. Apply the filter given by h[n] = , , on the long row vector by making
3 3 3
use of overlap-add and overlap-save approach. Re-arrange the output sequence to image
format. What are the observations?
No.3: Study of Discrete Fourier Transform (DFT)

1. You are given a sinusoid x(t) = 3 sin(2πf t) where f is 2 KHz. Sample the given signal
with sampling frequency fs = 8 KHz and plot the subsequent output.

a) Plot the spectrum (DTFT) of the sampled signal.


2πk
b) Sample the magnitude spectrum at frequencies Ωk = , where k = 0, 1, · · · , N − 1.
N
Plot sampled spectrum for N = 4, N = 40, N = 100 and N = 150.
c) Calculate the DFT of the sampled signal for N = 4, N = 40 and N = 100 and compare
it with the output obtained in part b).

What is the significance of the variable N here?

2. Generate x1 [n] = {1, 2, 3} and x2 [n] = {3, 2, 1}. Obtain their respective 5-point DFTs.

(a) Multiply the two DFTs and plot output.


(b) Show relation of the result in part (a) to circular convolution of the two sequences
using necessary plots.
(c) Implement linear convolution using convolution theorem of DFT and demonstrate
your results.

{ }
1 1 1 1
3. Compute the eight point DFT of a given sequence x[n] = , , , , 0, 0, 0, 0 using
2 2 2 2
radix-2 decimation in time and radix-2 decimation-infrequency algorithms. Compare the
speed of your algorithm with the built-in DFT function of MATLAB.
No.4: Over sampling, under sampling effects in time and frequency domain.

1. Generate a sinusoid of frequency 13 Hz. Since the frequency of the continuous time signal
1
is 13 Hz, the Nyquist rate is T = . Run the program for several values of T , below and
26
1 1 1 2 1 2 4
above the Nyquist rate such as , , , , , , ,
8 × 13 6 × 13 4 × 13 7 × 13 3 × 13 5 × 13 9 × 13
1 2 4 1
, , , , etc.. Which of the discrete time signals will give correct
2 × 13 3 × 13 5 × 13 13
reconstruction of the continuous time signal? Mathematically determine the angular fre-
quency in rad/sample and the fundamental period N of each of the discrete time signals
and verify from the plots.

1 −7
2. Generate two sinusoids with frequencies f0 = Hz and f1 = Hz. Sample both at
8 8
fs = 1 Hz.

(a) Generate stem plots for each, with a different color for each. Plot the original
continuous signals over the sampled one, again each color coded. What do you
observe?
(b) Determine the sampling rate at which you can avoid a problem here. Repeat the
procedure at this new sampling frequency. What do you observe?
(c) Devise a method to obtain the signal without changing the sampling rate?

Can you give a theoretical explanation for the particular frequencies that come up? Would
you be able to give a f2 for which this same sampling problem would occur at fs ?

3. Consider a continuous time periodic signal x(t) and sample it with sampling frequency fs .
Let the period of the resultant signal be N (x[n] = x[n+N ]). The spectrum of the discrete
signal would be periodic with period N . Focusing on a single period k = 0, · · · , N − 1,
corresponding to a frequency range 0 ≤ f ≤ fs , display the effects of under sampling,
sampling at Nyquist rate and oversampling by looking at the spectrum?
No.5: Z-Transform

1. a) Write a MATLAB program to compute and display the poles and zeros, to compute
and display the factored form and to generate the pole-zero plot of a z-transform that
is a ratio of two polynomials in z −1 . Using this program, analyze the z transform

2 + 5z −1 + 9z −2 + 5z −3 + 3z −4
H(z) =
5 + 45z −1 + 2z −2 + z −3 + z −4

b) From the pole-zero plot generated in part a), determine the possible ROCs. Can you
tell from the pole-zero plot whether or not the DTFT exists? Is the filter stable if it
is causal?
c) Using zp2tf (), determine the rational form of a z transform whose zeros are at z1 = 0.3,
z2 = 2.5, z3 = −0.2 + j0.4, and z4 = −0.2 − j0.4; the poles are at p1 = 0.5, p2 =
−0.75, p3 = 0.6 + j0.7, and p4 = 0.6 − j0.7; and the gain constant k is 3.9.
z −1
d) Using impz() determine the first 10 samples of the inverse z transform of
3 − 4z −1 + z −2
. Using residuez() obtain the partial fraction expansion of X(z). From the partial
fraction expansion, write down the closed form expression of the inverse z transform
(assuming causal). Evaluate the first 10 samples of the closed form expression for x[n]
using MATLAB and compare with the result obtained using impz().
e) Using residuez() convert back the partial fraction expression for X(z) in part d) to
the rational function form.

2. Obtain the pole-zero plot of the transfer function H(z) = 1 − 0.3z −1 − 0.2z −2 . Plot the
magnitude and phase spectrum of the same.

3. Show stable and unstable conditions for the linear time invariant system h[n] = an u(n).
Obtain pole-zero plot for both conditions. Vary location of the pole, one at ROC limit,
one outside and one inside and observe the system response over time. Discuss in detail
the pole-zero plots you obtained relating to stability.

4. Determine the zeros for the systems H1 (z) = 6+z −1 −z −2 and H2 (z) = 1−z −1 −6z −2 , and
indicate whether the system is minimum phase, maximum-phase or mixed-phase system.
Explain the results obtained in terms of the magnitude and phase responses.
No.6: FIR Filter design

π
1. Compute the pole-zero plot of an FIR filter that blocks the frequencies Ω0 = and
2

Ω1 = .
4
2. Consider the FIR filter, given by y[n] = x[n] + x[n − 4]

(a) Compute and sketch its magnitude and phase response.


( ) ( )
π π
(b) Compute its response to the input, x[n] = cos n + cos n
2 4

π
3. Design an FIR filter that completely blocks the frequency Ω0 = and then compute its
( ) 4
π
output if the input is x[n] = sin n u(n) for n = 0, 1, 2, 3, 4. Does the filter fulfill your
4
expectations? Explain.

4. Familiarize various MATLAB functions for the design of FIR filters.


No.7: FIR Filter design using windowing

1. Design a Low pass filter with the following specifications: Compute the order of the fil-
ter based on the transition width. Choose the window based on the stop band attenuation.

Pass band edge frequency = 1000 Hz; Stop band edge frequency = 1500 Hz
Minimum stop band attenuation = 50 dB; Maximum pass band attenuation = 0.9 dB
Sampling Frequency = 8000 Hz

Plot the impulse response, magnitude spectrum and phase spectrum.

2. Design a high pass filter with the following specifications:

Pass band edge frequency = 1500 Hz; Stop band edge frequency = 1000 Hz
Minimum stop band attenuation = 50 dB; Maximum pass band attenuation = 0.9 dB
Sampling Frequency = 8000 Hz

Plot the impulse response, magnitude spectrum and phase spectrum.

3. Design a filter with the following specifications:

−1 ≤ |H(e(jΩ) )|dB ≤ 0, 0.4π ≤ Ω ≤ 0.6π

|H(e(jΩ) )|dB ≤ 60, 0 ≤ Ω ≤ 0.15π and 0.8π ≤ Ω ≤ π

Plot the impulse response, magnitude spectrum and phase spectrum.

4. Generate a composite signal by adding sinusoids of different frequencies (100 Hz, 200 Hz,
500 Hz, 2000 Hz, and 4000 Hz). Compute the output of the filters designed in Qns. 1 to
3 by giving the composite signal as input and verify the design.

5. Vary the window size and window type, how does the response vary? Filter two signals
at different frequencies, one in pass band and the other in the stop band. Do you get
results as expected?
No.8: IIR Filter design

1. Design and implement a low pass Butterworth filter using

(a) Impulse Invariance Transformation (IIT)


(b) Bilinear Transformation (BLT).

The specifications are given below.

Pass band edge frequency = 1000 Hz; Stop band edge frequency = 2000 Hz
Minimum stop band attenuation = 30 dB; Maximum pass band attenuation = 0.5 dB
Sampling Frequency = 8000 Hz

Plot the magnitude spectrum and phase spectrum.

2. Design and implement a low pass Chebychev filter using IIT for the specifications given
in Qn.1. Compare the two designs.

3. Determine the transfer function and plot the gain response of an elliptic IIR low pass
filter with the following specifications:
Passband edge fp =800 Hz, Stopband edge fst = 1 KHz,
passband ripple of 0.5 dB, minimum stopband attenuation of 40 dB
sampling rate fs = 4 KHz.

4. Generate two different signals with different frequencies, one signal in passband and the
other signal in the stop band. Show the results for all the above filters.
No.9: Correlation

1. Write a program to perform correlation of two sequences. Create any two arbitrary se-
quences of short lengths and compute the result using your program. Use the inbuilt
function in MATLAB to verify your result.

2. Use your program to compute the auto correlation of a sequence. Compute the auto cor-
relation of a rectangular pulse and a periodic signal. Plot the auto correlation function
and comment on your results.

You might also like