30 views

Uploaded by Abhinav Malhotra

- Leadership and Management 2003
- Dsp Lab Manual VTU
- Digital Signal Processing Lab Manual
- S7, S8 EEE Regular Syllabus- KU
- GUI Development using MATLAB for FFT
- 1.Introduction to UML
- 73256023 VTU Dsp Lab Manual 5th Sem E C Matlab Programs and CCS Studio Programs
- Copia de FORMATO Amef
- Fht
- DFT
- DSP Notes.pdf
- Experiment 2 Mat Lab
- l5.pdf
- dsp unit 2
- Exam 2003
- Lecture20 FFT S
- Digital Signal Processing Sept 2010 (2006 Amjd) - [ Www.cusatxpress.com ]
- DSP_TUGAS
- IRJET- A Novel method for image enhancement by Channel division method using Discrete Shearlet Transform and Genetic Algorithm
- 2

You are on page 1of 20

Abhinav Malhotra

03/EC/07

03/EC/07

EXPERIMENT NO: 1

An LTI system is specified by the equation, y[n]=0.9y[n-1]+x[n]

(a) Find H(z) and show the pole-zero plot

(b) Plot |H(exp(jw)| and phase(H(exp(jw))

(c) Calculate and plot the steady state response to x[n]=cos(0.05n)u[n]

THEORY

We calculated response as:

MATLAB CODE:

clc;

clear all;

zplane(zero(Hz),pole(Hz))

03/EC/07

freqz([1],[1 -0.9]);

freqz([1 cos(.05*pi)],[1 -2.9 (18*cos(.05*pi)+1) -0.9]);

OUTPUTS:

Pole-zero plot

03/EC/07

03/EC/07

03/EC/07

EXPERIMENT NO: 2

Let x[n] be a 4-point sequence:

x[n]= 1 ; 0<=n<=3

= 0 ; otherwise

(a) Compute DTFT and plot its magnitude and phase

(b) Compute 4-point, 8-point and 16-point DFT of x[n]

THEORY

The DFT of a sequence of length N is given as

The discrete Fourier transform computes the values of the z transform for evenly spaced points around the

unit circle for a given sequence.

If the sequence to be represented is of finite duration, i.e., has only a finite number of non-zero values, the

transform is discrete Fourier transform.

N-1

kn/N

n=0

k = 0,1,2..,N-1

x(n) = {1,1,1,1}

4-point DFT

N=4

N-1

kn/N

n=0

k = 0,1,2..,N-1

3

kn/4

n=0

k = 0,1,2,3

03/EC/07

k/4

+x(2) e-j2

2/4

+e-j2

k2/4

k3/4

+x(3) e-j2

X(0) = 1+1+1+1=4

/4

X(1) = 1+ e-j2

+e-j2

3/4

=0

2 /4

+e-j2

3 /4

+e-j2

X(2) = 1+ e-j2

4/4

+e-j2

6/4

6/4

+e-j2

=0

X(3) = 1+ e-j2

9/4

=0

8-point DFT

N=8

X(n) = {1,1,1,1,0,0,0,0}

N-1

kn/N

n=0

k = 0,1,2..,N-1

7

kn/8

n=0

k = 0,1,2,3,4,5,6,7

X(k) = x(0)+x(1) e

-j2 k/8

k5/8

+x(5) e-j2

k2/8

+x(2) e-j2

k6/8

+x(6) e-j2

k/8

k4/8

+x(4) e-j2

k7/8

+x(7) e-j2

k2/8

k3/8

+x(3) e-j2

+x(2) e-j2

k3/8

+x(3) e-j2

X(0) = 1+1+1+1 = 4

/8

X(1) = 1+ e-j2

2/8

+e-j2

3/8

+e-j2

= 1-2.414j

2 /4

+e-j2

3 /8

+e-j2

X(2) = 1+ e-j2

4/4

+e-j2

6/4

6/8

+e-j2

8 /8

+e-j2

=0

X(3) = 1+ e-j2

9/8

= 1-0.414j

4 /8

+e-j2

5 /8

+e-j2

X(4) = 1+ e-j2

12/8

=0

X(5) = 1+ e-j2

10/8

15/8

+e-j2

= 1+0.414j

6/8

X(6) = 1+ e-j2

12/8

+e-j2

18/8

+e-j2

03/EC/07

=0

7/8

X(7) = 1+ e-j2

14/8

+e-j2

21/8

+e-j2

= 1+2.414j

16point DFT

N = 16

X(n) = {1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0}

N-1

kn/N

n=0

k = 0,1,2..,N-1

15

kn/16

n=0

k = 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15

-j2 k/16

X(k) = 1+x(1) e

-j2 k2/16

k3/16

+(3) e-j2

+x(2) e

X(0) = 1+1+1+1 = 4

/16

X(1) = 1+ e-j2

2/16

+e-j2

3/16

+e-j2

= 3.007-2.007j

2 /16

4/16

6/16

6/16

9/16

4 /16

8 /16

12/16

5 /16

10/16

+e-j2

12/16

+e-j2

14/16

+e-j2

X(2) = 1+ e-j2

+e-j2

+e-j2

= 1-2.414j

3 /16

X(3) = 1+ e-j2

+e-j2

+e-j2

= 1.593-1.247j

X(4) = 1+ e-j2

+e-j2

+e-j2

=0

X(5) = 1+ e-j2

+e-j2

15/16

= 0.833+0.167j

6/16

+e-j2

7/16

+e-j2

X(6) = 1+ e-j2

18/16

=0

X(7) = 1+ e-j2

21/16

= 1.166-2.012j

8 /16

16 /16

24 /16

9 /16

18 /16

27/16

X(8) = 1+ e-j2

+e-j2

+e-j2

=0

X(9) = 1+ e-j2

+e-j2

+e-j2

= 0.407+0.593j

10 /16

X(10) = 1+ e-j2

20/16

+e-j2

30/16

+e-j2

= 1+0.414j

03/EC/07

11 /16

22/16

+e-j2

12 /16

24/16

+e-j2

13 /16

26/16

+e-j2

14 /16

28/16

+e-j2

15 /16

30/16

+e-j2

X(11) = 1+ e-j2

+e-j2

33/16

= 0.833-0.167j

X(12) = 1+ e-j2

+e-j2

36/16

=0

X(13) = 1+ e-j2

+e-j2

39/16

= -0.247+1.247j

X(14) = 1+ e-j2

+e-j2

42/16

= 1+j

X(15) = 1+ e-j2

+e-j2

45/16

= 3.007+2.007j

MATLAB CODE:

clc

clear all

close all

N1=4;

N2=8;

N3=16;

x1=zeros(1,N1);

x1(1:4)=1;

x2=zeros(1,N2);

x2(1:4)=1;

x3=zeros(1,N3);

x3(1:4)=1;

Xk1=zeros(1,N1);

Xk2=zeros(1,N2);

Xk3=zeros(1,N3);

03/EC/07

for k=1:N1

for n=1:N1

Xk1(k)=Xk1(k)+x1(n)*exp(-j*2*pi*k*n/N1);

end

end

for k=1:N2

for n=1:N2

Xk2(k)=Xk2(k)+x2(n)*exp(-j*2*pi*k*n/N2);

end

end

for k=1:N3

for n=1:N3

Xk3(k)=Xk3(k)+x3(n)*exp(-j*2*pi*k*n/N3);

end

end

w1=0:2*pi/100:2*pi*99/100;

%

% subplot(2,1,2); plot(w1, angle(fft(x1,100))); xlabel('w(rad/s)'); ylabel('phase of DTFT');

subplot(3,1,2); stem(abs(Xk2)); ylabel('8-point DFT');

subplot(3,1,3); stem(abs(Xk3)); ylabel('16-point DFT');

10

03/EC/07

OUTPUT

11

03/EC/07

EXPERIMENT NO:3

For given sequence:

x[n]=cos(0.48n) + cos(0.52n) ;

(a) Plot the 100 point DFT for 0<=n<=10 (Pad 90 zeroes)

(b) Plot the 100-point DFT of x[n].

MATLAB CODE:

%DFT

N=100;

n=1:100;

x1=zeros(1,N);

x2=zeros(1,N);

x(n)=(cos(.48*pi*n)+cos(.52*pi*n));

x1(1:10)=x(1:10);

x2=x;

fftx1=fft(x1,100);

fftx2=fft(x2,100);

w=0:2*pi/100:2*pi*99/100;

subplot(2,1,1); plot(w,abs(fftx1));xlabel('w(rad/s)'); ylabel('magnitude(i)');

subplot(2,1,2); plot(w,abs(fftx2));xlabel('w(rad/s)'); ylabel('magintude(ii)');

12

03/EC/07

OUTPUT:

13

03/EC/07

EXPERIMENT NO: 4

Design a length-21 differentiator using a Hamming window

MATLAB CODE:

clc

clear all

close all

hd=zeros(1,21);

w=hamming(21)

a=0.54

for n=1:21

hd(n)=(j/pi)*(((pi*sin(pi*(n-a)))/(n-a))+(cos(pi*(n-a))/(n-a)^2))

end

h=(w').*(hd);

w1=0:2*pi/100:2*pi*99/100;

windowing');

14

03/EC/07

OUTPUT:

15

03/EC/07

EXPERIMENT NO: 5

To design a length-25 digital hilbert transformer using a hanning window

MATLAB CODE:

clc

clear all

close all

h=zeros(1,25);

w=hanning(25);

a=0.5;

for n=1:25

hd(n)=(1-cos(pi*(n-a)))/(pi*(n-a))

end

w1=0:2*pi/100:2*pi*99/100;

h=(w').*(hd);

subplot(2,2,1);plot(w1,abs((fft(hd,100)))); xlabel('w(rad/s)'); ylabel('magnitude response of the hilbert

transformer (orginally)');

transformer(after windowing)');

16

03/EC/07

subplot(2,2,4);plot(w1,angle((fft(h,100)))); xlabel('w(rad/s)'); ylabel('phase response of the hilbert

transformer');

OUTPUT:

Before

Windo

wing

After

Windo

wing

17

03/EC/07

EXPERIMENT NO:6

To see the effect of up-sampling and down-sampling on a signal

(a) Up-sample a sequence given by x[n] = sin(0.24n) 0<=n<=49; by factor L=3.

(b) Down-sample the sequence given by x[n] = sin(0.24n) 0<=n<=149; by a factor of M=3.

MATLAB CODE:

clc

clear all

close all

n=1:50;

x=ones(1,50);

for n=1:50

x(n)=sin(0.24*pi*n);

end;

%upsampling

L=3;

y=zeros(1,150);

y(1)=x(1);

for i=1:49

y(3*i+1)=x(i+1);

end;

subplot(3,2,1);stem(x);

subplot(3,2,3);stem(y);

%downsampling

M=3;

18

03/EC/07

z(1)=x(1);

for i=1:16

z(i+1)=x(3*i+1);

end;

subplot(3,2,5);stem(z);

a=abs(fftshift(fft(x)));

b=abs(fftshift(fft(y)));

c=abs(fftshift(fft(z)));

subplot(3,2,2);stem(a);

subplot(3,2,4);stem(b);

subplot(3,2,6);stem(c);

OUTPUT:

19

03/EC/07

25

20

0. 5

15

0

10

-0.5

-1

5

10

20

30

40

50

10

20

30

40

50

30

0. 5

20

0

10

-0.5

-1

50

100

150

50

100

150

10

8

0. 5

6

0

4

-0.5

-1

2

5

10

15

20

10

15

20

20

- Leadership and Management 2003Uploaded byCiella Dela Cruz
- Dsp Lab Manual VTUUploaded byRakshith Hardy
- Digital Signal Processing Lab ManualUploaded byNiranjan Hegde
- S7, S8 EEE Regular Syllabus- KUUploaded byAlvina HR
- GUI Development using MATLAB for FFTUploaded bybinayakojha
- 1.Introduction to UMLUploaded bydeepak sureddi
- 73256023 VTU Dsp Lab Manual 5th Sem E C Matlab Programs and CCS Studio ProgramsUploaded bySundaram Natarajan
- Copia de FORMATO AmefUploaded byDavid Saucedo
- FhtUploaded byAquiles Brinco
- DFTUploaded byomprakkash1509
- DSP Notes.pdfUploaded byKiranmai Srinivasulu
- Experiment 2 Mat LabUploaded byKapil Gupta
- l5.pdfUploaded bydebnathsuman49
- dsp unit 2Uploaded byrahulsaraswat_ece
- Exam 2003Uploaded byNigel Mukandi
- Lecture20 FFT SUploaded bydmctek
- Digital Signal Processing Sept 2010 (2006 Amjd) - [ Www.cusatxpress.com ]Uploaded bySachin Varghese
- DSP_TUGASUploaded byMohammad Fajar Irfansyah
- IRJET- A Novel method for image enhancement by Channel division method using Discrete Shearlet Transform and Genetic AlgorithmUploaded byIRJET Journal
- 2Uploaded byprasad1987
- DVB-T and DVB-H Measuring Software for PC Connected With Spectral AnalyzerUploaded bydesconoc9
- Binder1 3Uploaded byvainateyagoldar
- Nov Dec 08Uploaded byBalakumar Kumar
- 6736-19025-1-PB (1)Uploaded byarin
- 2008_IEEE Transactions on Industrial Electronics_ Phase Sensitive Detection of Motor Fault Signatures in the Presence of NoiseUploaded byMoinul Shahidul Haque
- shape memory alloyUploaded byxavier_snk
- Trabajo de ControlUploaded byJose Caycho
- Signal and System unit test 2 elpo-converted.pdfUploaded bysrinivasa
- Modelado de Pymes Con IDEF0Uploaded byckruger1
- 8docsUploaded byP_lee

- TrialBal LSUploaded byAdesh Chaudhary
- Nasa 1977 TBC FT50 ProgramUploaded byatfrost4638
- ESDModel.pdfUploaded byTomaz V. Da Silva
- CMW-Z10_bro_enUploaded byVaibhav Sharma
- 01179014Uploaded byRakeshKrishnan
- SIV BSL2 GuideLentivirusUploaded byJojoran Surabaya
- Nuclear Chemistry - Review - SolutionsUploaded byEkim
- EIL Material Selection ChartUploaded byVijaya Sekhar
- Fudge the ASCB SystemUploaded bydbowes_5
- Barrett Odum-2000 (1)Uploaded byAlonso Gutiérrez
- Antibiotic Sensitivity of Staphylococcus Aureus IsUploaded byinggrit anggraini
- SPW3 Manual Rev 5Uploaded byJPYadav
- clo2Uploaded byraytreurniet
- D011493126Uploaded byMia Vujisic
- 917370921 Owners ManualUploaded byisaac_maykovich
- Center for the American Experiment Transportation Policy BlueprintUploaded byFluenceMedia
- TU606 Maruti Suzuki 080724Uploaded bychand1234567893
- Code-MATH-Course-Details.pdfUploaded byAnees Rahman
- The Typical Layout of an Ozone Injection SystemUploaded byOptrics
- ICP-MS Sebagai Instrumen yang Luar BIasaUploaded byMeyka Rahmi
- 2010 Expedition / Navigator Fuel Pump ModuleUploaded byAnonymous yGKSwu8lP0
- Hmt Project ReportUploaded bySidhique Akbar
- Programming the NX PanelUploaded bydjbrooksy05
- Nonjob - Elliott #1Uploaded byGrant Cherry
- RENAUD BARBARAS - Francisco Varela - A New Idea of Perception and LifeUploaded bydrleonunes
- rotor.pdfUploaded byIvan Contrreras Quispe
- POIS WaldingerUploaded byjose
- Unit 1 Ch. 3 the Dynamic EarthUploaded byncl12142
- Booklet 3 - Lighting for Safety on Roads, Paths SquaresUploaded byÁrthur Lima
- Chapter11 Valves 12Uploaded byfazarbadhusha