+ All Categories
Home > Documents > DSP 2012 Lab Manual

DSP 2012 Lab Manual

Date post: 26-Oct-2014
Category:
Upload: adib-shaikh
View: 110 times
Download: 3 times
Share this document with a friend
29
Manual – Digital Signal Processing TABLE OF CONTENTS Sr.N o. CONTENTS Page No. 1 Difference Equation 2 2 Sampling Theorem 4 3 DTFS & DTFT 6 4 DFT 8 5 DT System Response 10 6 Z – Transform 12 7 Design of IIR Filter(Impulse Invariance) 14 8 Design of IIR Filter(Bilinear transformation) 16 9 Rectangular & hamming window 18 10 Interpolation & Decimation 20 11 Overlap & add method Vishwakarma Institute of Information Technology, Pune 1
Transcript
Page 1: DSP 2012 Lab Manual

Manual – Digital Signal Processing

TABLE OF CONTENTS

Sr.No. CONTENTS Page No.

1 Difference Equation 2

2 Sampling Theorem 4

3 DTFS & DTFT 6

4 DFT 8

5 DT System Response 10

6 Z – Transform 12

7 Design of IIR Filter(Impulse Invariance) 14

8 Design of IIR Filter(Bilinear transformation) 16

9 Rectangular & hamming window 18

10 Interpolation & Decimation 20

11 Overlap & add method

Vishwakarma Institute of Information Technology, Pune 1

Page 2: DSP 2012 Lab Manual

Manual – Digital Signal Processing

EXPERIMENT NO : 01

TITLE OF EXPERIMENT: Difference Equation.

Vishwakarma Institute of Information Technology, Pune 2

Page 3: DSP 2012 Lab Manual

Manual – Digital Signal Processing

1.1 Aim: To find total response of discrete time system described by difference equation.

1.2 Equipment / Apparatus: PC with MATLAB software.

1.3 Theory: Take two difference equation

A) y(n)-0.5y(n-1)=x(n) y(-1)=16 x(n)=n2

B) y(n)-y(n-1)+0.24y(n-2)=x(n)-2x(n-1) y(-1)=2 y(-2)=1 x(n)=n

Solve first difference equation by any method either with

A) CF+PI OR

B) Natural & forced response approach.

1.4 Lab Session Expectation:

A) Implement above two equations in MATLAB & verify the answer of first equation theoretically as well as with the output of MATLB.

B) Implement second equation & calculate answer of few indices.

1.5 Questions:

A) How many ways are available to solve difference equation?

B) What is the relation between convolution & forced response?

C) Mention the particular inputs & their respective PI answered?

1.6 Printouts Expected:

A) MATLAB code

B) Output of the code

Vishwakarma Institute of Information Technology, Pune 3

Page 4: DSP 2012 Lab Manual

Manual – Digital Signal Processing

EXPERIMENT NO: 02

TITLE OF EXPERIMENT: Sampling Theorem

Vishwakarma Institute of Information Technology, Pune 4

Page 5: DSP 2012 Lab Manual

Manual – Digital Signal Processing

2.1 Aim: To study sampling Theorem & Aliasing.

2.2 Equipment / Apparatus: PC with MATLAB software.

2.3 Theory : x(t)=3 cos2000πt + 5 sin 6000πt + 10 cos12000πt

A) What is Nyquist rate?B) Let Fs=5000 samples/sec. what is discrete time signal obtained?C) Solve above Numerical.

2.4 Lab session expectation:

A) Generate two sin waves (100Hz,600Hz)

B) Sample them with Fs=500Hz

C) Plot x1(n) & x2(n)

2.5 Questions:

A) How do you understand the concept of aliasing from above experimentation?

B) What exactly is the meaning of aliasing & why it happens?

C) Can aliasing be avoided?

D) Is there any application of aliasing?

E) If the analog signal is not band limited can we sample it without aliasing?

F) Why the range of digital frequencies –π to π?

G) In the above experimentation change the sampling frequency suitably &

show that aliasing can be avoided.

2.5 Printouts Expected:

A) MATLAB code.

B) Output to demonstrate aliasing.

C) Output to demonstrate aliased free condition.

2.6 Useful Functions: sin, cos, stem, subplot

Vishwakarma Institute of Information Technology, Pune 5

Page 6: DSP 2012 Lab Manual

Manual – Digital Signal Processing

EXPERIMENT NO: 03

TITLE OF EXPERIMENT: DTFS & DTFT

Vishwakarma Institute of Information Technology, Pune 6

Page 7: DSP 2012 Lab Manual

Manual – Digital Signal Processing

3.1 Aim: To find DTFS for periodic & non periodic signals

3.2 Equipment / Apparatus: PC with MATLAB software.

3.3 Theory :

A) Take a square wave & represent in terms of DTFS.

B) Take exponential signal & calculate its DTFT.

3.4 Lab session expectations: Part A

A) Generate a square wave(symmetric around x axis)B) Calculate DTFS coefficientsC) Generate square wave(with dc shift completely above x axis)D) Calculate DTFS coefficients

Part B

A) Generate exponential signal B) Select resolution of frequency axisC) Plot DFT of sequence

3.5 Questions:

A) What is difference between DTFS & DFT?B) Why the transform is called DTFT?C) Comment on the observations of part AD) Verify the harmonics present in square wave & justify the observation.E) Comment on the nature of DTFT & how it is different than CTFT.

3.6 Printouts:

A) MATLAB code

B) waveforms

Vishwakarma Institute of Information Technology, Pune 7

Page 8: DSP 2012 Lab Manual

Manual – Digital Signal Processing

EXPERIMENT NO: 04

TITLE OF EXPERIMENT: DFT

Vishwakarma Institute of Information Technology, Pune 8

Page 9: DSP 2012 Lab Manual

Manual – Digital Signal Processing

4.1 Aim : To find DFT of DT signal

4.2 Equipment / Apparatus: PC with MATLAB software.

4.3 Theory :

A) X (n) = [1, 2, 3, 4], Calculate 4 point DFT.B) Write the time shifting property of DFT & justify why we have circular shift

& not linear shift.C) Explain concept of DFT.

4.4 Lab session Expectation :

A) Take any sequence & find its DFT.B) Take a sinusoidal signal & calculate its DFT.C) Verify time shifting property of DFT for the above sequence.D) Verify results of DFT with the function FFT available in MATLAB.

4.5 Questions:

A) Justify the plot of DFT of the sine wave used.B) Can we identify the frequency present in a signal just looking at the plot of

FFT? If yes justify. If not justify.C) How many computations are required to calculate N point DFT?D) Explain the concept of convolution in the DFT sense?

4.6 Printouts:

A) DFT ProgramB) Property verification codeC) Output of above two steps.

Vishwakarma Institute of Information Technology, Pune 9

Page 10: DSP 2012 Lab Manual

Manual – Digital Signal Processing

EXPERIMENT NO: 05

TITLE OF EXPERIMENT: DT system response

Vishwakarma Institute of Information Technology, Pune 10

Page 11: DSP 2012 Lab Manual

Manual – Digital Signal Processing

5.1 Aim: To find response of DT system using convolution.

5.2 Equipment / Apparatus: PC with MATLAB software.

5.3 Theory:

A) Write equation of convolution.B) Take two sequences & calculate convolution.

5.4 Lab session Expectation:

Approach 1

A) Take nay sequences h(n),x(n)B) Compute convolution.C) Verify the result using ‘conv’ function.

Approach 2

A) Take discrete time system e.g. y(n)-3y(n-1)=x(n) x(n)=2^nB) Obtain h (n) from this equation.C) Compute y(n) with above h(n) & input x(n)

Hint: y (n) =h (n) when x (n) =δ (n)

5.5 Printouts expected:

A) MATLAB code

B) OUTPUT

5.6 Questions:

A) Why do we study basic signals?

B) What is theme of convolution?

C) What is the application of linear convolution?

D) Y (n) =x2(n) Will convolution work for such a system? Justify the answer.

E) What is the limitation of ‘conv’ function in MATLAB?

Vishwakarma Institute of Information Technology, Pune 11

Page 12: DSP 2012 Lab Manual

Manual – Digital Signal Processing

EXPERIMENT NO: 06

TITLE OF EXPERIMENT: Z Transform

Vishwakarma Institute of Information Technology, Pune 12

Page 13: DSP 2012 Lab Manual

Manual – Digital Signal Processing

6.1 Aim: To find inverse Z transform & to sketch pole zero plot of a given rational function.

6.2 Equipment / Apparatus: PC with MATLAB software.

6.3 Theory: A) Definition of Z Transform.

B) Unit circle importance, ROC concept.

C) Take any rational function in Z domain & calculate its inverse using

I) Partial fraction method

II) Long division method

D) Take any function & sketch its pole zero plot.

6.4 Lab session Expectation:

A) Implement the above example in MATLAB & verify the results.

B) Plot pole zero graph & frequency response.

6.5 Questions:

A) Why do we go with Z Transform?

B) Comment on stability of system from pole zero plot.

C) What is the relation between Z Transform & DTFT?

6.6 Printouts expected:

A) MATLAB code

B) OUTPUT

6.7 Functions used: zplane, roots, residuez, deconv

Vishwakarma Institute of Information Technology, Pune 13

Page 14: DSP 2012 Lab Manual

Manual – Digital Signal Processing

EXPERIMENT NO: 07

TITLE OF EXPERIMENT: Design of IIR Filter

Vishwakarma Institute of Information Technology, Pune 14

Page 15: DSP 2012 Lab Manual

Manual – Digital Signal Processing

7.1 Aim: To Design, on paper, and implement an IIR filter. Use Butterworth approximation & bilinear transformation.

7.2 Equipment / Apparatus: PC with MATLAB software.

7.3 Theory: Design the filter for the following specifications.

Pass band edge frequency : 1.2 KHz.

Stop band edge frequency : 2.5 KHz.

Pass band ripple : 1dB

Stop band attenuation : 20 dB

Sampling frequency : 8 KHz

7.4 Lab session Expectation:

A) Implement the above filter design in MATLAB & verify the frequency

response.

B) Generate a composite signal x (n) =sin 2000πn+sin 8000πn & pass it through

the filter & verify output.

7.5 Questions:

A) What are methods of IIR filter design?

B) What are advantages & disadvantages of Impulse Invariance method & Bilinear Transformation method.

7.6 Printouts expected:

A) MATLAB code

B) OUTPUT

7.7 Functions Used: buttord, butter, zplane, freqz, roots

Vishwakarma Institute of Information Technology, Pune 15

Page 16: DSP 2012 Lab Manual

Manual – Digital Signal Processing

EXPERIMENT NO: 08

TITLE OF EXPERIMENT: Rectangular & Hamming window

Vishwakarma Institute of Information Technology, Pune 16

Page 17: DSP 2012 Lab Manual

Manual – Digital Signal Processing

8.1 Aim: To plot frequency response for Rectangular & Hamming window.

8.2 Equipment / Apparatus: PC with MATLAB software.

8.3 Theory :

A) Write the equations for Rectangular & Hamming window.

B) Calculate coefficients for these window functions.

8.4 Lab session Expectation:

A) Assume some order of the filter.

B) Implement the equations for Rectangular & Hamming window.

C) Plot the magnitude response for these windows.

D) Verify your response with the response obtained by using MATLAB

functions.

8.5 Questions:

A) What is Gibb’s phenomenon?

B) What is meaning of side lobes?

C) What is need of windowing?

D) Compare responses of above two windows?

E) Mention other window functions.

8.6 Functions Used: Hamming

Vishwakarma Institute of Information Technology, Pune 17

Page 18: DSP 2012 Lab Manual

Manual – Digital Signal Processing

EXPERIMENT NO: 09

TITLE OF EXPERIMENT: Interpolation & Decimation

Vishwakarma Institute of Information Technology, Pune 18

Page 19: DSP 2012 Lab Manual

Manual – Digital Signal Processing

9.1 Aim: To Study Interpolation & Decimation.

9.2 Equipment / Apparatus: PC with MATLAB software.

9.3 Theory:

A) Write concept of Interpolation & Decimation.B) Explain Sampling Rate Conversion.

9.4 Lab session Expectation:

Consider a C. T. signal,

X (t) =A cos (2πF1t) + B cos (2πF2t).

If F1=100Hz, F2=200Hz, A =1.5, B=1, Fs=1000Hz, t=0:1/Fs: 1

A) Generate D. T. signal using MATLAB

B) Interpolate the signal by factor I=3

C) Decimate this interpolated signal by factor D=3

D) Plot all signals

9.5 Questions:

A) What is Multirate DSP?

B) What is need of Interpolation & Decimation?

C) What are applications of Multirate DSP?

9.6 Printouts expected:

A) MATLAB code

B) OUTPUT

9.7 Functions useful: interp, decimate

Vishwakarma Institute of Information Technology, Pune 19

Page 20: DSP 2012 Lab Manual

Manual – Digital Signal Processing

EXPERIMENT NO: 10

TITLE OF EXPERIMENT: Overlap & add method

10.1 Aim: To filter noise corrupted sinusoidal signal using Overlap & add method.

Vishwakarma Institute of Information Technology, Pune 20

Page 21: DSP 2012 Lab Manual

Manual – Digital Signal Processing

10.2 Equipment / Apparatus: PC with MATLAB software.

10.3 Theory:

A) Explain filtering of long data sequences.B) Explain Overlap & add method with one example.

10.4 Lab session Expectation:

A) Generate a sinusoidal wave.

B) Generate Random signal.

C) Add two signals to obtain a noise corrupted signal.

D) Input length of moving average filter.

E) Generate coefficient vector.

F) Perform filtering operation using ‘fftfilt’ function.

g) Plot all signals.

10.5 Questions:

A) What methods are used to do linear filtering of long data sequences &

why?

B) What is the disadvantage of direct computation of DFT?

10.6 Printouts expected:

A) MATLAB code

B) OUTPUT

10.7 Functions useful: fftfilt

Vishwakarma Institute of Information Technology, Pune 21

Page 22: DSP 2012 Lab Manual

Manual – Digital Signal Processing

Sr.No Section no /Page no. Old revision no / Date

New revision no / Date

Reason for Revision

Vishwakarma Institute of Information Technology, Pune 22

Title: Revision Record


Recommended