0% found this document useful (0 votes)
58 views8 pages

DSP - Manual Part

This document contains information about experiments related to digital signal processing from the Digital Signal Processing Laboratory Manual. It includes the aims, theory, code, figures, discussion and questions for 6 experiments on topics like linear and circular convolution, generating triangular waves from sinusoidal waveforms using Fourier series, computing the discrete Fourier transform, and designing low pass, high pass, band pass and band stop filters using different window functions.

Uploaded by

Shivani Agarwal
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)
58 views8 pages

DSP - Manual Part

This document contains information about experiments related to digital signal processing from the Digital Signal Processing Laboratory Manual. It includes the aims, theory, code, figures, discussion and questions for 6 experiments on topics like linear and circular convolution, generating triangular waves from sinusoidal waveforms using Fourier series, computing the discrete Fourier transform, and designing low pass, high pass, band pass and band stop filters using different window functions.

Uploaded by

Shivani Agarwal
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/ 8

JSS Academy of Technical Education – NOIDA

Digital Signal Processing Laboratory (EEC-652) Manual (EC VIth Semester)

Experiment Related Questions:

(a) Is x(2n) an expanded or compressed version of x(n)?


(b) Is x(n/2) an expanded or compressed version of x(n)?
(c) What do you mean by up sampling?
(d) What do you mean by downsampling?
(e) What is zero padding?
(f) Does zero padding provide extra information?

Department of Electronic Engineering Page 29 of 36


JSS Academy of Technical Education – NOIDA
Digital Signal Processing Laboratory (EEC-652) Manual (EC VIth Semester)

Experiment No. 3

Aim: Write a program to perform circular and linear convolution on two sequences and
interpret your results.

Theory: Convolution is a mathematical operation on two functions f and g , producing a third


function that is viewed as modified version of original functions. It has applications that include
statistics, computer vision, image and signal processing
Linear Convolution is important in DSP because the response of LTI system for any input x(n) is
given by linear convolution of x(n) and impulse response h(n) of the system.
For fast convolution we use DFT but DFT supports only circular convolution. So we need to
compute linear convolution from the circular convolution.
.

Code:

Figures obtained :

Discussion of Results obtained

Experiment related Questions:


(a) What is an LTI system?
(b) What do you mean by impulse response of a system?
(c) How do we evaluate output in terms of impulse response?
(d) What is correlation?
(e) What is the difference between circular convolutions?
(f) Why DFT supports only circular convolution?
(g) Can you evaluate linear convolution with the help of circular convolution.

Department of Electronic Engineering Page 30 of 36


JSS Academy of Technical Education – NOIDA
Digital Signal Processing Laboratory (EEC-652) Manual (EC VIth Semester)

Experiment No. 4

Aim: To generate triangular wave from sinusoidal waveform

Theory: Triangular wave is not a sinusoidal function. A triangular wave can be represented
using a linear combination of sinusoidal functions (sine and cosine functions). A periodical
function can be represented in this way using Fourier series representation.

From frequency point of view it can be shown that the sine wave contains only a single
frequency (its fundamental frequency). A frequency spectrum of triangular wave will contain a
large number of frequencies (fundamental as well as its harmonics).

So in short a triangular function is a periodically varying function but not a sinusoidal function,
but it can be represented as a linear combination of sinusoidal function of varying frequencies.
In 1807, Joseph Fourier proposed that a completely arbitrary periodic function f(t)
could be expressed as a series of the form

Code:

Figures obtained :

Discussion of Results obtained:

Department of Electronic Engineering Page 31 of 36


JSS Academy of Technical Education – NOIDA
Digital Signal Processing Laboratory (EEC-652) Manual (EC VIth Semester)

Question and Answers:


(a) What is the difference between Fourier series and Fourier Transforms?
(b) Can aperiodic signals be expanded in terms of Fourier coefficients?
(c) What are Drichlets’s conditions?
(d) Can any signal be expressed in terms of sine and cosine.

Department of Electronic Engineering Page 32 of 36


JSS Academy of Technical Education – NOIDA
Digital Signal Processing Laboratory (EEC-652) Manual (EC VIth Semester)

Experiment No. 5

Aim: To find DFT of any given sequence and also plot its magnitude and phase response.

Theory: The discrete Fourier transform (DFT) X[k] of a finite-length sequence x[n] can be easily
computed in MATLAB using the function fft. There are two versions of this function. fft(x)
computes the DFT X[k] of the sequence x[n] where the length of X[k] is the same as that of x[n].
fft(x,L) computes the L-point DFT of a sequence x[n] of length N where L ≥ N. IfL > N, x[n] is
zero-padded with L−N trailing zero-valued samples before the DFT is computed. The inverse
discrete Fourier transform (IDFT) x[n] of a DFT sequence X[k] can likewise be computed using
the function ifft, which also has two versions.
If {h[n]} denotes the impulse response sequence of an LTI discrete-time system, its frequency
response H(ejω) is given by the discrete-time Fourier transform of {h[n]}, that is,

In general (ejω) is a complex function of ω with a period 2π and can be expressed in terms of its
real and imaginary parts or its magnitude and phase. Thus,

Where Hre(ejω) and Him(ejω) are, respectively, the real and imaginary parts of H(ejω), and

The quantity |H(ejω)| is called the magnitude response and the quantity θ(ω) is called the phase
response of the LTI discrete-time system.
Code:
Figure Obtained:

Discussion of Results obtained:

Experiment Related Questions:


(a) What is the relationship between DTFT and DFT?
(b) Why do we need to find DFT?
(c) What is the relationship between z-transform and DFT?
(d) Why do we need to find large point DFT?

Department of Electronic Engineering Page 33 of 36


JSS Academy of Technical Education – NOIDA
Digital Signal Processing Laboratory (EEC-652) Manual (EC VIth Semester)

(e) If we find N-point DFT of sequence of length L such that N<L , then what will be the
result?
(f) If we find N-point DFT of sequence of length L such that N=L , then what will be the
result?
(g) What is impulse response of a system?
(h) What is an LTI system?

Department of Electronic Engineering Page 34 of 36


JSS Academy of Technical Education – NOIDA
Digital Signal Processing Laboratory (EEC-652) Manual (EC VIth Semester)

Experiment No. 6

Aim: To design a low pass, high pass, band pass, band stop filter using different window
functions (a) Rectangular (b) Hamming (c) Hanning (4) Blackman (5) Bartlett , and plot
their magnitude and phase response.

Theory:
Conceptually the simplest approach to FIR filter design is to simply truncate to a finite number
of terms the doubly infinite-length impulse response coefficients obtained by computing the
inverse discrete-time Fourier transform of the desired ideal frequency response.
However, a simple truncation results in an oscillatory behavior in the respective magnitude
response of the FIR filter, which is more commonly referred to as the Gibbs phenomenon. The
Gibbs phenomenon can be reduced by windowing the doubly infinite-length impulse response
coefficients by an appropriate finite-length window function. The functions fir1 and fir2 can be
employed to design windowed FIR digital filters in MATLAB. Both functions yield a linear-
phase design.
The function fir1 can be used to design conventional lowpass, highpass, bandpass, and bandstop
linear-phase FIR filters. The command b = fir1(N,Wn)
returns in vector b the impulse response coefficients, arranged in ascending powers of z−1, of a
lowpass or a bandpass filter of order N for an assumed sampling frequency of 2 Hz. For lowpass
design, the normalized cutoff frequency is specified by a scalar W n, a number between 0 and 1.
For bandpass design, Wn is a two-element vector [Wn1, Wn2] containing the specified passband
edges where0 < Wn1 < Wn2 < 1. The command
b = fir1(N,Wn,’high’)
with N an even integer, is used for designing a highpass filter. The command
b = fir1(N,Wn,’stop’)
with Wn a two-element vector, is employed for designing a bandstop FIR filter. If none is
specified, the Hamming window is employed as a default. The command
b = fir1(N, Wn, taper)
makes use of the specified window coefficients of length N+1 in the vector taper. However, the
window coefficients must be generated a priori using an appropriate MATLAB function such as
blackman, hamming, hanning, chebwin, or kaiser. The commands to use are of the following
forms:
taper = blackman(N) taper = hamming(N) taper = hanning(N)
taper = chebwin(N) taper = kaiser(N, beta)

The function fir2 can be used to design linear-phase FIR filters with arbitrarily shaped magnitude
responses. In its basic form, the command is
b = fir2(N, fpts, mval)
which returns in the vector b of length N+1 the impulse response coefficients, arranged in
ascending powers of z−1. fpts is the vector of specified frequency points, arranged in an
increasing order, in the range 0 to 1 with the first frequency point being 0 and the last frequency
point being 1. As before, the sampling frequency is assumed to be 2 Hz. mval is a vector of
specified magnitude values at the specified frequency points and therefore must

Department of Electronic Engineering Page 35 of 36


JSS Academy of Technical Education – NOIDA
Digital Signal Processing Laboratory (EEC-652) Manual (EC VIth Semester)

also be of the same length as fpts. The Hamming window is used as a default. To make use of
other windows, the command to use is
b = fir2(N, fpts, mval,taper)
where the vector taper contains the specified window coefficients.

Code:

Figures:

Discussion of Results obtained:

Experiment Related Questions:

(a) What do you understand by impulse response of a system?


(b) What do you understand by FIR system?
(c) What do you understand by IIR system.
(d) What do you understand by linear phase FIR system?
(e) Can IIR system have linear phase?
(f) What is gibb’s phenomenon?
(g) Can we use window functions for IIR filters also.

Department of Electronic Engineering Page 36 of 36

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy