+ All Categories
Home > Documents > LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and...

LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and...

Date post: 27-Mar-2020
Category:
Upload: others
View: 5 times
Download: 0 times
Share this document with a friend
79
Department of ECE Basic Simulation Lab Anurag College of Engineering 1 LIST OF EXPERIMENTS Experiment Name Page No. 1. Basic operations on matrices. 2 2. Generation on various signals and Sequences (periodic and aperiodic), such as unit impulse, unit step, square, sawtooth, triangular, sinusoidal, ramp, sinc 10 3. Operations on signals and sequences such as addition, multiplication, scaling, shifting, folding computation of energy and average power. 20 4. Finding the even and odd parts of signal/sequence and real and imaginary part of signal. 29 5. Convolution between signals and sequence 33 6. Auto correlation and cross correlation between signals and sequences 37 7. Verification of linearity and time invariance properties of a given continuous /discrete systems 43 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and stability properties. 47 9. Gibbs phenomenon 51 10. Finding the Fourier transform of a given signal and plotting its magnitude and phase spectrum. 52 11. Waveform synthesis using Laplace Transform 54 12. Locating the zeros and poles and plotting the pole zero maps in s-plane and z-plane for the given transfer function. 57 13. Generation of Gaussian Noise(real and complex), computation of its mean, M.S. Value and its skew kurtosis, and PSD, probability distribution function 59 14. Sampling theorem verification 62 15. Removal of noise by auto correlation/cross correlation 65 16. Extraction of periodic signal masked by noise using correlation. 71 17. Verification of Weiner-Khinchine relations. 74 18. Checking a random process for stationarity in wide sense. 76
Transcript
Page 1: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

1

LIST OF EXPERIMENTS

Experiment Name Page No.

1. Basic operations on matrices. 2

2. Generation on various signals and Sequences (periodic and aperiodic),

such as unit impulse, unit step, square, sawtooth, triangular, sinusoidal, ramp, sinc 10

3. Operations on signals and sequences such as addition, multiplication, scaling,

shifting, folding computation of energy and average power. 20

4. Finding the even and odd parts of signal/sequence and real and imaginary part

of signal. 29

5. Convolution between signals and sequence 33

6. Auto correlation and cross correlation between signals and sequences 37

7. Verification of linearity and time invariance properties of a given

continuous /discrete systems 43

8. Computation of unit sample, unit step and sinusoidal response of the

given LTI system and verifying its physical Realizability and stability properties. 47

9. Gibbs phenomenon 51

10. Finding the Fourier transform of a given signal and plotting its magnitude

and phase spectrum. 52

11. Waveform synthesis using Laplace Transform 54

12. Locating the zeros and poles and plotting the pole zero maps in s-plane

and z-plane for the given transfer function. 57

13. Generation of Gaussian Noise(real and complex), computation of its

mean, M.S. Value and its skew kurtosis, and PSD, probability distribution function 59

14. Sampling theorem verification 62

15. Removal of noise by auto correlation/cross correlation 65

16. Extraction of periodic signal masked by noise using correlation. 71

17. Verification of Weiner-Khinchine relations. 74

18. Checking a random process for stationarity in wide sense. 76

Page 2: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

2

Experiment No:1

Basic operations on matrices

Aim: To perform basic operation on matrices Using MATLAB

1. Addition of matrices

2. Subtraction of matrices

3. Multiplication of Matrices

4. Element to element matrix multiplication

5. Element to element matrix division

6. Transpose of a matrix

7. Identity matrix

8. Rank of matrix

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program: %1. Addition of matrices

clc;

clear all;

close all;

a=[2 3 5; 7 2 5];

Page 3: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

3

b=[- 8 5 2; 1 0 5];

c=a+b;

disp(‘addition of following 2 matrices’);

disp(a);

disp(‘and’);

disp(b);

disp(‘is’);

disp(c);

Output: addition of following 2 matrices

2 3 5

7 2 5

and

-8 5 2

1 0 5

is

-6 8 7

8 2 10

% 2. Subtraction of matrices

clc;

clear all;

close all;

a=[2 3 5; 7 2 5];

b=[- 8 5 2; 1 0 5];

c=a-b;

disp('addition of following 2 matrices');

Page 4: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

4

disp(a);

disp('and');

disp(b);

disp('is');

disp(c);

Output: addition of following 2 matrices

2 3 5

7 2 5

and

-8 5 2

1 0 5

is

10 -2 3

6 2 0

% 3. Multiplication of matrices

clc;

clear all;

close all;

a=[2 3 ; 7 2 ];

b=[- 8 5 ; 1 5];

c=a*b;

disp('multiplication of following 2 matrices');

disp(a);

Page 5: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

5

disp('and');

disp(b);

disp('is');

disp(c);

Output: multiplication of following 2 matrices

2 3

7 2

and

-8 5

1 5

is

-13 25

-54 45

% 4.Elememt to element matrix multiplication

clc;

clear all;

close all;

a=[2 3 ; 7 2 ];

b=[- 8 5 ; 1 5];

c=a.*b;

disp('element multiplication of following 2 matrices');

disp(a);

Page 6: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

6

disp('and');

disp(b);

disp('is');

disp(c);

Output: element multiplication of following 2 matrices

2 3

7 2

and

-8 5

1 5

is

-16 15

7 10

% 5 .Element to element matrix division

clc;

clear all;

close all;

a=[2 3 ; 7 2 ];

b=[- 8 5 ; 1 5];

c=a./b;

disp('element division of following 2 matrices');

disp(a);

Page 7: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

7

disp('and');

disp(b);

disp('is');

disp(c);

Output: element division of following 2 matrices

2 3

7 2

and

-8 5

1 5

is

-0.2500 0.6000

7.0000 0.4000

% 6. Transpose of a matrix

clc;

clear all;

close all;

a=[2 3 ; 7 2 ];

c=transpose(a);

disp('transpose of');

disp(a);

disp('is');

disp(c);

Page 8: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

8

Output: transpose of

2 3

7 2

is

2 7

3 2

% 7. Identity matrix

clc;

clear all;

close all;

c=eye(3);

disp('identity matrix is');

disp(c);

Output: identity matrix is

1 0 0

0 1 0

0 0 1

% 8. Rank of matrix

clc;

clear all;

close all;

a=[2 3 ; 7 2 ];

c=rank(a);

disp('rank of');

disp(a);

disp('is');

disp(c);

Page 9: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

9

Output: rank of

2 3

7 2

is

2

Result: Basic operations on matrices i.e addition, subtraction, multiplication, transpose, identity,

rank of matrices has been performed using matlab.

Page 10: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

10

Experiment No: 2

Generation on various signals and Sequences

Aim: To generate the various signals 1. Unit step signal

2. Unit ramp signal

3. Unit impulse signal

4. sinusoidal signal

5. Square wave

6. Triangular wave

7. sawtooth wave

8. sinc signal

Using matlab.

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Page 11: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

11

Program: clc;

clear all;

close all;

t=-10:0.001:10;

a=1.*(t>=0)+0.*(t<0);

subplot(2,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time unit step signal');

n=-10:1:10;

b=1.*(n>=0)+0.*(n<0);

subplot(2,1,2);

stem(n,b)

xlabel('n');

ylabel('x(n)');

title(' unit step sequence');

Page 12: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

12

2. Unit ramp signal

clc;

clear all;

close all;

t=-10:0.001:10;

a=t.*(t>=0)+0.*(t<0);

subplot(2,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time unit ramp signal');

n=-10:1:10;

b=n.*(n>=0)+0.*(n<0);

subplot(2,1,2);

stem(n,b)

xlabel('n');

ylabel('x(n)');

title(' unit ramp sequence');

-10 -8 -6 -4 -2 0 2 4 6 8 100

5

10

t

x(t)

continuous time unit ramp signal

-10 -8 -6 -4 -2 0 2 4 6 8 100

5

10

n

x(n)

unit ramp sequence

Page 13: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

13

3. Unit impulse signal

clc;

clear all;

close all;

t=-10:0.001:10;

a=1.*(t==0)+0.*(t<0)+0.*(t>0);

subplot(2,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time unit impulse signal');

n=-10:1:10;

b=1.*(n==0)+0.*(n<0)+0.*(n>0);

subplot(2,1,2);

stem(n,b)

xlabel('n');

ylabel('x(n)');

title(' unit impulse sequence');

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.5

1

t

x(t)

continuous time unit impulse signal

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.5

1

n

x(n)

unit impulse sequence

Page 14: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

14

4. sinusoidal signal

clc;

clear all;

close all;

t=-10:0.001:10;

a=sin(2*pi*(1/20)*t);

subplot(2,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time sinusoidal signal');

n=-10:1:10;

b=sin(2*pi*(1/20)*n);

subplot(2,1,2);

stem(n,b)

xlabel('n');

ylabel('x(n)');

title(' sinusoidal sequence');

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

-0.5

0

0.5

1

t

x(t)

continuous time sinusoidal signal

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

-0.5

0

0.5

1

n

x(n)

sinusoidal sequence

Page 15: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

15

5. Square wave

clc;

clear all;

close all;

t=-10:0.001:10;

a=square(2*pi*(1/7)*t);

subplot(2,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time square wave');

n=-10:1:10;

b=square(2*pi*(1/7)*n);

subplot(2,1,2);

stem(n,b)

xlabel('n');

ylabel('x(n)');

title(' square wave sequence');

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

-0.5

0

0.5

1

t

x(t)

continuous time square wave

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

-0.5

0

0.5

1

n

x(n)

square wave sequence

Page 16: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

16

6. Triangular wave

clc;

clear all;

close all;

t=-10:0.001:10;

a=sawtooth(2*pi*(1/7)*t,0.5);

subplot(2,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time triangular wave');

n=-10:1:10;

b=sawtooth(2*pi*(1/7)*n,0.5);

subplot(2,1,2);

stem(n,b)

xlabel('n');

ylabel('x(n)');

title(' triangular wave sequence');

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

-0.5

0

0.5

1

t

x(t)

continuous time triangular wave

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

-0.5

0

0.5

1

n

x(n)

triangular wave sequence

Page 17: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

17

7. sawtooth wave

clc;

clear all;

close all;

t=-10:0.001:10;

a=sawtooth(2*pi*(1/7)*t);

subplot(2,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time sawtooth wave');

n=-10:1:10;

b=sawtooth(2*pi*(1/7)*n);

subplot(2,1,2);

stem(n,b)

xlabel('n');

ylabel('x(n)');

title(' sawtooth sequence');

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

-0.5

0

0.5

1

t

x(t)

continuous time sawtooth wave

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

-0.5

0

0.5

1

n

x(n)

sawtooth sequence

Page 18: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

18

8. Sinc signal

clc;

clear all;

close all;

t=-10:0.001:10;

a=sinc(2*pi*(1/7)*t);

subplot(2,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time sinc wave');

n=-10:1:10;

b=sinc(2*pi*(1/7)*n);

subplot(2,1,2);

stem(n,b)

xlabel('n');

ylabel('x(n)');

title(' sinc sequence');

-10 -8 -6 -4 -2 0 2 4 6 8 10-0.5

0

0.5

1

t

x(t)

continuous time sinc wave

-10 -8 -6 -4 -2 0 2 4 6 8 10-0.5

0

0.5

1

n

x(n)

sinc sequence

Page 19: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

19

Result: Basic signals unit step, unit ramp, impulse, sinusoidal, square, triangular, sawtooth waves

has been generated using matlab.

Page 20: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

20

Experiment No:3

Operations on signals and sequences

Aim: To perform operations on signals Using MATLAB

1. Time shiting

2. Time scaling

3. Time reversal

4. Amplitude scaling

5. Signal addition

6. Signal multiplication

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program:

1. Time shiting clc;

clear all;

close all;

t=-10:0.001:10;

a=sawtooth(2*pi*(1/5)*t);

subplot(3,1,1);

plot(t,a);

Page 21: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

21

xlabel('t');

ylabel('x(t)');

title('continuous time sawtooth wave');

subplot(3,1,2);

plot(t-2,a);

xlabel('t');

ylabel('x(t-2)');

title('left shifted sawtooth signal');

subplot(3,1,3);

plot(t+2,a);

xlabel('t');

ylabel('x(t+2)');

title('right shifted sawtooth signal');

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

0

1

t

x(t

)

continuous time sawtooth wave

-12 -10 -8 -6 -4 -2 0 2 4 6 8-1

0

1

t

x(t

-2)

left shifted sawtooth signal

-8 -6 -4 -2 0 2 4 6 8 10 12-1

0

1

t

x(t

+2)

right shifted sawtooth signal

Page 22: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

22

2. Time scaling

clc;

clear all;

close all;

t=-10:0.001:10;

a=sawtooth(2*pi*(1/5)*t);

subplot(3,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time sawtooth wave');

subplot(3,1,2);

plot(t*2,a);

xlabel('t');

ylabel('x(t-2)');

title('scaled sawtooth signal');

subplot(3,1,3);

plot(t*(1/2),a);

xlabel('t');

ylabel('x(t*2)');

title('scaled sawtooth signal');

Page 23: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

23

3. Time reversal

clc;

clear all;

close all;

t=-10:0.001:10;

a=sawtooth(2*pi*(1/5)*t);

subplot(2,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time sawtooth wave');

subplot(2,1,2);

plot(-t,a);

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

0

1

t

x(t

)

continuous time sawtooth wave

-20 -15 -10 -5 0 5 10 15 20-1

0

1

t

x(t

*2)

scaled sawtooth signal

-5 -4 -3 -2 -1 0 1 2 3 4 5-1

0

1

t

x(t

(1/2

)

scaled sawtooth signal

Page 24: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

24

xlabel('t');

ylabel('x(-t)');

title('time reversal signal');

4. Amplitude Scaling:

clc;

clear all;

close all;

t=-10:0.001:10;

a=sawtooth(2*pi*(1/5)*t);

b=2*a;

c=(1/2)*a;

subplot(3,1,1);

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

-0.5

0

0.5

1

t

x(t

)

continuous time sawtooth wave

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

-0.5

0

0.5

1

t

x(-

t)

time reversal signal

Page 25: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

25

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time sawtooth wave');

subplot(3,1,2);

plot(t,b);

xlabel('t');

ylabel('2x(t)');

title('amplitude scaled sawtooth signal');

subplot(3,1,3);

plot(t,c);

xlabel('t');

ylabel('1/2x(t)');

title('amplitude scaled sawtooth signal');

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

0

1

t

x(t

)

continuous time sawtooth wave

-10 -8 -6 -4 -2 0 2 4 6 8 10-2

0

2

t

2x(t

)

amplitude scaled sawtooth signal

-10 -8 -6 -4 -2 0 2 4 6 8 10-0.5

0

0.5

t

1/2

x(t

)

amplitude scaled sawtooth signal

Page 26: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

26

5. Signal addition:

clc;

clear all;

close all;

t=-10:0.001:10;

a=2*sawtooth(2*pi*(1/5)*t);

b=2*sin(2*pi*(1/5)*t);

c=a+b;

subplot(3,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time sawtooth wave');

subplot(3,1,2);

plot(t,b);

xlabel('t');

ylabel('y(t)');

title('continuous time sine wave');

subplot(3,1,3);

plot(t,c);

xlabel('t');

ylabel('x(t)+y(t)');

title('addition');

Page 27: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

27

6. Signal multiplication:

clc;

clear all;

close all;

t=-10:0.001:10;

a=2*sawtooth(2*pi*(1/5)*t);

b=2*sin(2*pi*(1/5)*t);

c=a.*b;

subplot(3,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('continuous time sawtooth wave');

-10 -8 -6 -4 -2 0 2 4 6 8 10-2

0

2

t

x(t

)

continuous time sawtooth wave

-10 -8 -6 -4 -2 0 2 4 6 8 10-2

0

2

t

y(t

)

continuous time sin wave

-10 -8 -6 -4 -2 0 2 4 6 8 10-5

0

5

t

x(t

)+y(t

)

addition

Page 28: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

28

subplot(3,1,2);

plot(t,b);

xlabel('t');

ylabel('y(t)');

title('continuous time sin wave');

subplot(3,1,3);

plot(t,c);

xlabel('t');

ylabel('x(t)*y(t)');

title('multiplication');

Result: Basic operations time shifting, time scaling, time reversal, amplitude scaling, signal

addition, multiplication has been performed using matlab.

-10 -8 -6 -4 -2 0 2 4 6 8 10-2

0

2

t

x(t

)

continuous time sawtooth wave

-10 -8 -6 -4 -2 0 2 4 6 8 10-2

0

2

t

y(t

)

continuous time sin wave

-10 -8 -6 -4 -2 0 2 4 6 8 10-5

0

5

t

x(t

)+y(t

)

multiplication

Page 29: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

29

Experiment No: 4

Finding the even and odd parts of signal/sequence and real and

imaginary parts of signal

Aim: To find Finding the even and odd parts of signal/sequence and real and imaginary parts of

signal.

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program:

Even and odd parts of a signal:

clc;

clear all;

close all;

t=-10:0.001:10;

a=sin(t);

b=sin(-t);

c=(1/2)*(a+b);

d=(1/2)*(a-b);

subplot(3,1,1);

plot(t,a);

xlabel('t');

Page 30: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

30

ylabel('x(t)');

title('continuous time sin wave');

subplot(3,1,2);

plot(t,c);

xlabel('t');

ylabel('xe(t)');

title('even parts');

subplot(3,1,3);

plot(t,d);

xlabel('t');

ylabel('xo(t)');

title('odd parts');

-10 -8 -6 -4 -2 0 2 4 6 8 100

1

2

t

x(t

)

continuous time sawtooth wave

-10 -8 -6 -4 -2 0 2 4 6 8 100

1

2

t

xe(t

)

even parts

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

0

1

t

xo(t

)

odd parts

Page 31: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

31

Real and Imaginary parts:

clc;

clear all;

close all;

t=-10:0.001:10;

a=exp(j*t);

c=real(a);

d=imag(a);

subplot(3,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('complex exponential wave');

subplot(3,1,2);

plot(t,c);

xlabel('t');

ylabel('xe(t)');

title('Real parts');

subplot(3,1,3);

plot(t,d);

xlabel('t');

ylabel('xo(t)');

title('Imaginary parts');

Page 32: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

32

Result: Even parts and odd parts of a signal and Real and imaginary parts of a signal has been

found.

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

0

1

t

x(t

)

complex exponential wave

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

0

1

t

xe(t

)

Real parts

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

0

1

t

xo(t

)

Imaginary parts

Page 33: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

33

Experiment No: 5

Convolution between signals and sequences

Aim: To observe convolution between signals and sequences

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program: Convolution of signals

clc;

clear all;

close all;

t=-10:0.001:10;

a=2.*(t>=0)+0.*(t<0);

c=sin(t);

d=conv(a,c);

subplot(3,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('step signal');

subplot(3,1,2);

Page 34: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

34

plot(t,c);

xlabel('t');

ylabel('y(t)');

title('sine wave');

subplot(3,1,3);

plot(d);

xlabel('t');

ylabel('z(t)');

title('convolution');

-10 -8 -6 -4 -2 0 2 4 6 8 100

1

2

t

x(t

)

step signal

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

0

1

t

y(t

)

sine wave

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

x 104

-5000

0

5000

t

z(t

)

convolution

Page 35: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

35

Convolution of sequences:

clc;

clear all;

close all;

t1=-1:1:2;

t2=0:1:2;

t3=-1:1:4;

a=[2 5 9 7 ];

c=[7 5 4];

d=conv(a,c);

subplot(3,1,1);

stem(t1,a);

xlabel('t');

ylabel('x(t)');

title('sequence1');

subplot(3,1,2);

stem(t2,c);

xlabel('t');

ylabel('y(t)');

title('sequence 2');

subplot(3,1,3);

stem(t3,d);

xlabel('t');

ylabel('z(t)');

title('convolution');

Page 36: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

36

Result: Convolution of signals and sequences has been observed using matlab.

-1 -0.5 0 0.5 1 1.5 20

5

10

t

x(t

)

sequence1

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

5

10

t

y(t

)

sequence 2

-1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 40

100

200

t

z(t

)

convolution

Page 37: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

37

Experiment No: 6

Auto correlation and cross correlation

Aim: To observe cross correlation and auto correlation between signals and sequences

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program: Cross correlation of signals

clc;

clear all;

close all;

t=-10:0.001:10;

a=2.*(t>=0)+0.*(t<0);

c=sin(t);

d=xcorr(a,c);

subplot(3,1,1);

plot(t,a);

xlabel('t');

ylabel('x(t)');

title('step signal');

subplot(3,1,2);

Page 38: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

38

plot(t,c);

xlabel('t');

ylabel('y(t)');

title('sine wave');

subplot(3,1,3);

plot(d);

xlabel('t');

ylabel('z(t)');

title('cross correlation');

-10 -8 -6 -4 -2 0 2 4 6 8 100

1

2

t

x(t

)

step signal

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

0

1

t

y(t

)

sine wave

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

x 104

-5000

0

5000

t

z(t

)

cross correlation

Page 39: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

39

Auto Correlation of signal

clc;

clear all;

close all;

t=-10:0.001:10;

c=sin(t);

d=xcorr(c,c);

subplot(2,1,1);

plot(t,c);

xlabel('t');

ylabel('x(t)');

title('sine signal');

subplot(2,1,2);

plot(t,d);

xlabel('t');

ylabel('y(t)');

title('sine wave');

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

-0.5

0

0.5

1

t

x(t)

sine signal

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

x 104

-1

-0.5

0

0.5

1x 10

4

t

y(t)

sine wave

Page 40: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

40

Cross correlation of sequences:

clc;

clear all;

close all;

t1=-1:1:2;

t2=0:1:2;

t3=-1:1:5;

a=[2 5 9 7 ];

c=[7 5 4];

d=xcorr(a,c);

subplot(3,1,1);

stem(t1,a);

xlabel('t');

ylabel('x(t)');

title('sequence1');

subplot(3,1,2);

stem(t2,c);

xlabel('t');

ylabel('y(t)');

title('sequence 2');

subplot(3,1,3);

stem(t3,d);

xlabel('t');

ylabel('z(t)');

title('cross correlation');

Page 41: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

41

Cross correlation of sequences:

Cross correlation of sequences:

Auto correlation of sequences:

clc;

clear all;

close all;

t1=-1:1:2;

a=[2 5 9 7 ];

d=xcorr(a,a);

subplot(2,1,1);

stem(t1,a);

xlabel('t');

-1 -0.5 0 0.5 1 1.5 20

5

10

t

x(t

)

sequence1

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

5

10

t

y(t

)

sequence 2

-1 0 1 2 3 4 50

100

200

t

z(t

)

cross correlation

Page 42: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

42

ylabel('x(t)');

title('sequence1');

subplot(2,1,2);

stem(d);

xlabel('t');

ylabel('y(t)');

title('Auto correlation');

Result: Cross correlation and auto correlation of signals and sequences has been observed.

-1 -0.5 0 0.5 1 1.5 20

5

10

t

x(t

)

sequence1

1 2 3 4 5 6 70

50

100

150

200

t

y(t

)

Auto correlation

Page 43: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

43

Experiment No:7

Verification of linearity and time invariance

Aim: To Verify linearity and time invariance properties of given system.

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program: Linearity1

clc;

clear all;

close all;

n=0:40;

a=2;

b=1;

x1=cos(2*pi*0.1*n);

x2=cos(2*pi*0.4*n);

x=a*x1+b*x2;

y=n.*x;

y1=n.*x1;

y2=n.*x2;

yt=a*y1+b*y2;

Page 44: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

44

d=y-yt;

d=round(d);

if d

disp('Given system is not satisfy linearity property');

else

disp('Given system is satisfy linearity property');

end

subplot(3,1,1),

stem(n,y);

subplot(3,1,2),

stem(n,yt);

subplot(3,1,3);

stem(n,d);

Output: Given system is satisfy linearity property

0 5 10 15 20 25 30 35 40-100

0

100

200

0 5 10 15 20 25 30 35 40-100

0

100

200

0 5 10 15 20 25 30 35 40-1

0

1

Page 45: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

45

Time Invariance:

clc;

close all

clear all;

n=0:40;

D=10;

x=3*cos(2*pi*0.1*n)-2*cos(2*pi*0.4*n);

xd=[zeros(1,D) x];

y=n.*xd(n+D);

n1=n+D;

yd=n1.*x;

d=y-yd;

if d

disp('Given system is not satisfy time shifting property');

else

disp('Given system is satisfy time shifting property');

end

subplot(3,1,1),

stem(y),

grid;

subplot(3,1,2),

stem(yd);

grid;

subplot(3,1,3),

stem(d);

Page 46: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

46

grid;

Output: Given system is not satisfy time shifting property

Result: Linearity and time invariance properties of a system have been observed using matlab.

0 5 10 15 20 25 30 35 40 45-200

0

200

0 5 10 15 20 25 30 35 40 45-400

-200

0

200

0 5 10 15 20 25 30 35 40 45-200

0

200

Page 47: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

47

Experiment No:8

Computation of unit sample, unit step and sinusoidal response

Aim: To Compute unit sample, unit step and sinusoidal response of the given LTI system and

verifying its physical Realizability and stability properties.

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program: Impulse response:

clc;

clear all;

close all;

b=[1 0 0];

a=[1,-0.5,.9];

h=tf(b,a)

impulse(h);

0 50 100 150 200 250

-12

-10

-8

-6

-4

-2

0

2

4

6x 10

26 Impulse Response

Time (seconds)

Ampli

tude

Page 48: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

48

Step Response:

clc;

clear all;

close all;

b=[1 2 3];

a=[1 5 3];

h=tf(b,a)

step(h);

0 2 4 6 8 10 120.5

0.55

0.6

0.65

0.7

0.75

0.8

0.85

0.9

0.95

1

Step Response

Time (seconds)

Am

plit

ude

Page 49: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

49

Sinusoidal response:

clc;

clear all;

close all;

t=0:0.01:10;

x=sin(t);

b=[1 2 3];

a=[1 5 3];

h=tf(b,a)

lsim(h,x,t);

Result: Step response, Impulse response and sinusoidal response have been observed using matlab.

0 1 2 3 4 5 6 7 8 9 10-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Linear Simulation Results

Time (seconds)

Am

plit

ude

Page 50: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

50

Experiment No: 9

Gibbs phenomenon

Aim: To observe the gibbs phenomenon and compare with square wave.

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program: Gibbs phenomenon

clc;

clear all

close all

t=0:0.1:(pi*8);

y=sin(t);

subplot(5,1,1);

plot(t,y);

xlabel('k');

ylabel('amplitude');

title('gibbs phenomenon');

h=2;

for k=3:2:9

y=y+sin(k*t)/k;

Page 51: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

51

subplot(5,1,h);

plot(t,y);

xlabel('k');

ylabel('amplitude');

h=h+1;

end

Result:Gibbs phenomenon has been observed for 3 to 9 sinusoidal waves.

0 5 10 15 20 25 30-101

k

am

plitu

de gibbs phenomenon

0 5 10 15 20 25 30-101

k

am

plitu

de

0 5 10 15 20 25 30-101

k

am

plitu

de

0 5 10 15 20 25 30-101

k

am

plitu

de

0 5 10 15 20 25 30-101

k

am

plitu

de

Page 52: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

52

Experiment No:10

Fourier transform

Aim: To Find the Fourier transform of a given signal and plotting its magnitude and phase

spectrum.

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program:

clc

close all

clear all;

x=[1,1,1,1,zeros(1,4)];

N=8;

X=fft(x,N);

magX=abs(X),

phase=angle(X)*180/pi;

subplot(2,1,1)

plot(magX);

grid

xlabel('k')

ylabel('X(K)')

Page 53: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

53

subplot(2,1,2)

plot(phase);

grid

xlabel('k')

ylabel('degrees')

Result: Fourier transform of a given signal and its magnitude and phase spectrum have been

plotted.

1 2 3 4 5 6 7 80

1

2

3

4

k

X(K

)

1 2 3 4 5 6 7 8-100

-50

0

50

100

k

degre

es

Page 54: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

54

Experiment No:11

Waveform synthesis using Laplace Transform

Aim: To Find the Laplace transform of a given signal

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program:

clc;

clear all;

syms f t;

f=t;

laplace(f) %laplace transform

%f(s)=16/s(s+8) invese Laplce Transform

syms F s

F=24/(s*(s+8));

ilaplace(F)

Output: ans = 1/s^2

ans = 3 - 3*exp(-8*t)

Page 55: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

55

clc;

clear all;

close all;

t=0:1:5;

s=t;

subplot(2,3,1)

plot(t,s);

u=ones(1,6)

subplot(2,3,2)

plot(t,u);

f1=t.*u;

subplot(2,3,3)

plot(f1);

s2=-2*(t-1);

subplot(2,3,4);

plot(s2);

u1=[0 1 1 1 1 1];

f2=-2*(t-1).*u1;

subplot(2,3,5);

plot(f2);

u2=[0 0 1 1 1 1];

f3=(t-2).*u2;

subplot(2,3,6);

plot(f3);

Page 56: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

56

f=f1+f2+f3;

figure;

plot(t,f);

laplace(f);

Result: Laplace transform and wave form synthesis have been observed.

0 50

1

2

3

4

5

0 50

0.5

1

1.5

2

0 5 100

1

2

3

4

5

0 5 10-8

-6

-4

-2

0

2

0 5 10-8

-6

-4

-2

0

0 5 100

1

2

3

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Page 57: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

57

Experiment No:12

Locating the zeros and poles

Aim: To Locate the zeros and poles and plotting the pole zero maps in s-plane and z-plane for the

given transfer function.

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program:

clc;

clear all;

close all;

b=[1 0];

a=[1,-0.5];

h=tf(b,a)

figure;

pzmap(h);

figure;

zplane(b,a);

Page 58: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

58

Result: Poles and zeros of a system plotted on s-plane and z-plane.

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Pole-Zero Map

Real Axis (seconds-1)

Imagin

ary

Axis

(seconds-1

)

-1 -0.5 0 0.5 1

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Real Part

Imagin

ary

Part

Page 59: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

59

Experiment No:13

Generation of Gaussian Noise

Aim: To generate Gaussian noise using matlab

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program:

clc;

clear all;

close all;

dx=0.01;

x=-3:dx:3;

[m,n]=size(x);

mu_x=0;

sig_x=0.1;

a=1/(sqrt(2*pi)*sig_x);

for j=1:n

px1(j)=a*exp([-((x(j)-mu_x)/sig_x)^2]/2);

end

cum_Px(1)=0;

for j=2:n

Page 60: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

60

cum_Px(j)=cum_Px(j-1)+dx*px1(j);

end

figure(1)

plot(x,px1);

grid

axis([-3 3 0 1]);

title(['Gaussian pdf for mu_x=0 and sigma_x=', num2str(sig_x)]);

xlabel('--> x')

ylabel('--> pdf');

figure(2)

plot(x,cum_Px);

grid

axis([-3 3 0 1]);

title(['Gaussian Probability Distribution Function for mu_x=0 and

sigma_x=', num2str(sig_x)]);

title('\ite^{\omega\tau} = cos(\omega\tau) + isin(\omega\tau)') ;

xlabel('--> x')

ylabel('--> PDF')

-3 -2 -1 0 1 2 3

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Gaussian pdf for mux=0 and sigma

x=0.1

--> x

--> p

df

Page 61: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

61

Result: Gaussian noise has been generated using matlab

-3 -2 -1 0 1 2 30

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1e = cos() + isin()

--> x

-->

PD

F

Page 62: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

62

Experiment No:14

Sampling theorem

Aim: To verify sampling theorem(over sampling, under sampling and critical sampling) using

matlab

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program:

clc;

clear all;

close all;

t=-10:.01:10;

T=4;

fm=1/T;

x=cos(2*pi*fm*t);

subplot(2,2,1);

plot(t,x);

xlabel('time');

ylabel('x(t)')

title('continous time signal')

grid;

Page 63: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

63

n1=-4:1:4;

fs1=1.6*fm;

fs2=2*fm;

fs3=8*fm;

x1=cos(2*pi*fm/fs1*n1);

subplot(2,2,2);

stem(n1,x1);

xlabel('time');

ylabel('x(n)');

title('discrete time signal with fs<2fm')

hold on

subplot(2,2,2);

plot(n1,x1)

grid;

n2=-5:1:5;

x2=cos(2*pi*fm/fs2*n2);

subplot(2,2,3);

stem(n2,x2);

xlabel('time');

ylabel('x(n)');

title('discrete time signal with fs=2fm');

hold on

subplot(2,2,3);

plot(n2,x2);

grid;

Page 64: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

64

n3=-20:1:20;

x3=cos(2*pi*fm/fs3*n3);

subplot(2,2,4);

stem(n3,x3);

xlabel('time');

ylabel('x(n)');

title('discrete time signal with fs>2fm')

hold on

subplot(2,2,4);

plot(n3,x3);

grid;

Result: Sampling theorem(over sampling, under sampling and critical sampling) have been

verified using matlab.

-10 -5 0 5 10-1

-0.5

0

0.5

1

time

x(t

)

continous time signal

-4 -2 0 2 4-1

-0.5

0

0.5

1

time

x(n

)

discrete time signal with fs<2fm

-5 0 5-1

-0.5

0

0.5

1

time

x(n

)

discrete time signal with fs=2fm

-20 -10 0 10 20-1

-0.5

0

0.5

1

time

x(n

)

discrete time signal with fs>2fm

Page 65: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

65

Experiment No:15

Removal of noise

Aim: To remove noise by auto correlation / cross correlation using matlab.

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program: Removal of noise by auto correlation

clc;

clear all;

t=0:0.1:pi*4;

s=sin(t);

k=2;

subplot(6,1,1)

plot(s);

title('signal s');

xlabel('t');

ylabel('amplitude');

n = randn([1 126]);

f=s+n;

subplot(6,1,2)

plot(f);

Page 66: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

66

title('signal f=s+n');

xlabel('t');

ylabel('amplitude');

as=xcorr(s,s);

subplot(6,1,3)

plot(as);

title('auto correlation of s');

xlabel('t');

ylabel('amplitude');

an=xcorr(n,n);

subplot(6,1,4)

plot(an);

title('auto correlation of n');

xlabel('t');

ylabel('amplitude');

cff=xcorr(f,f);

subplot(6,1,5)

plot(cff);

title('auto correlation of f');

xlabel('t');

ylabel('amplitude');

hh=as+an;

subplot(6,1,6)

plot(hh);

Page 67: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

67

title('addition of as+an');

xlabel('t');

ylabel('amplitude');

Removal of noise by cross correlation:

clc;

clear all;

t=0:0.1:pi*4;

s=sin(t);

0 20 40 60 80 100 120 140-1

01

signal s

t

am

plitude

0 20 40 60 80 100 120 140-505

signal f=s+n

t

am

plitude

0 50 100 150 200 250 300-100

0100

auto correlation of s

t

am

plitude

0 50 100 150 200 250 300-200

0200

auto correlation of n

t

am

plitude

0 50 100 150 200 250 300-200

0200

auto correlation of f

t

am

plitude

0 50 100 150 200 250 300-200

0200

addition of as+an

t

am

plitude

Page 68: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

68

k=2;

subplot(7,1,1)

plot(s);

title('signal s');

xlabel('t');

ylabel('amplitude');

c=cos(t);

subplot(7,1,2)

plot(c);

title('signal c');

xlabel('t');

ylabel('amplitude');

n = randn([1 126]);

f=s+n;

subplot(7,1,3)

plot(f);

title('signal f=s+n');

xlabel('t');

ylabel('amplitude');

asc=xcorr(s,c);

subplot(7,1,4)

plot(asc);

Page 69: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

69

title(' correlation of s and c');

xlabel('t');

ylabel('amplitude');

anc=xcorr(n,c);

subplot(7,1,5)

plot(anc);

title(' correlation of n and c');

xlabel('t');

ylabel('amplitude');

cfc=xcorr(f,c);

subplot(7,1,6)

plot(cfc);

title(' correlation of f and c');

xlabel('t');

ylabel('amplitude');

hh=asc+anc;

subplot(7,1,7)

plot(hh);

title('addition of sc+nc');

xlabel('t');

ylabel('amplitude');

Page 70: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

70

Result: Noise have been removed by auto correlation and cross correlation using matlab.

0 20 40 60 80 100 120 140-1

0

1signal s

t

am

plitu

de

0 20 40 60 80 100 120 140-1

0

1signal c

t

am

plitu

de

0 20 40 60 80 100 120 140-5

0

5signal f=s+n

t

am

plitu

de

0 50 100 150 200 250 300-100

0

100 correlation of s and c

t

am

plitu

de

0 50 100 150 200 250 300-20

0

20 correlation of n and c

t

am

plitu

de

0 50 100 150 200 250 300-100

0

100 correlation of f and c

t

am

plitu

de

0 50 100 150 200 250 300-100

0

100addition of sc+nc

t

am

plitu

de

Page 71: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

71

Experiment No:16

Extraction of periodic signal

Aim: To extract periodic signal masked by noise using correlation using matlab.

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program:

clc

clear all;

close all;

n=256;

k1=0:n-1;

x=cos(32*pi*k1/n)+sin(48*pi*k1/n);

plot(k1,x)

%Module to find period of input signl

k=2;

xm=zeros(k,1);

ym=zeros(k,1);

hold on

for i=1:k

Page 72: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

72

[xm(i) ym(i)]=ginput(1);

plot(xm(i), ym(i),'r*');

end

period=abs(xm(2)-xm(1));

rounded_p=round(period);

m=rounded_p

% Adding noise and plotting noisy signal

y=x+randn(1,n);

figure

plot(k1,y)

% To generate impulse train with the period as that of input signal

d=zeros(1,n);

for i=1:n

if (rem(i-1,m)==0) d(i)=1;

end

end

%Correlating noisy signal and impulse train

cir=cxcorr1(y,d);

%plotting the original and reconstructed signal

m1=0:n/4;

Figure

plot(m1,x(m1+1),'r',m1,m*cir(m1+1));

Page 73: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

73

Result: Periodic signal have been extracted by correlation using matlab.

0 50 100 150 200 250 300-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

0 50 100 150 200 250 300-4

-3

-2

-1

0

1

2

3

4

Page 74: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

74

Experiment No:17

Weiner-Khinchine relations

Aim: To verify weiner-khinchine relations using matlab.

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program:

clc

clear all;

close all;

t=0:0.1:2*pi;

x=sin(2*t);

subplot(3,2,1);

plot(x);

au=xcorr(x,x);

subplot(3,2,2);

plot(au);

v=fft(au);

subplot(3,2,3);

plot(abs(v));

fw=fft(x);

Page 75: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

75

subplot(3,2,4);

plot(fw);

fw2=(abs(fw)).^2;

subplot(3,2,5);

plot(fw2);

Result: Weiner-khinchine relations using matlab have been verified.

0 10 20 30 40 50 60 70-1

-0.5

0

0.5

1

0 20 40 60 80 100 120 140-40

-20

0

20

40

0 20 40 60 80 100 120 1400

500

1000

-0.1 0 0.1 0.2 0.3 0.4 0.5 0.6-40

-20

0

20

40

0 10 20 30 40 50 60 700

500

1000

Page 76: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

76

Experiment No:18

CHECKING A RANDOM PROCESS FOR STATIONARITY IN WIDE

SENSE

Aim: To check random process for stationary in wide sense using matlab.

Requirements: A system with windows (XP/NT/2000/7)

MAT LAB Software.

Procedure: 1. Open matlab icon on the desktop

2. Open new editor window(ctrl+N)

3. Type the program and save with “.m” extension

4. Run the program

5. Observe the output in command window/figure window

Program:

clc;

clear all;

close all;

y = randn([1 40]);

my=round(mean(y));

z=randn([1 40]);

mz=round(mean(z));

vy=round(var(y));

vz=round(var(z));

t = sym('t','real');

h0=3;

x=y.*sin(h0*t)+z.*cos(h0*t);

mx=round(mean(x));

Page 77: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

77

k=2;

xk=y.*sin(h0*(t+k))+z.*cos(h0*(t+k));

x1=sin(h0*t)*sin(h0*(t+k));

x2=cos(h0*t)*cos(h0*(t+k));

c=vy*x1+vz*x1;

solve(c);

disp('values are constants, it does not dependent on time, so it is wide sence

stationary ')

Output: ans = 0

-2

values are constants, it does not dependent on time, so it is wide sence stationary

Result: Random process for stationary in wide sense stationary using matlab.

Page 78: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

78

1. Define Signal

2. Define determistic and Random Signal

3. Define Delta Function

4. Define Periodic and a periodic Signal

5. Define Symetric and Anti-Symmetric Signals

6. Define Continuous and Discrete Time Signals

7. What are the Different types of representation of discrete time signals

8. What are the Different types of representation of discrete time signals

9. What are the Different types of Operation performed on signals

10. What is System

11. What is Causal Signal

12. What are the Different types of Systems

13. What is Linear System

14. What is Time Invariant System

15. What is Static and Dynamic System

16. What is Even Signal

17. What is Odd Signal

18. Define the Properties of Impulse Signal

19. What is Causality Condition of the Signal

20. What is Condition for System Stability

21. Define Convolution

22. Define Properties of Convolution

23. What is the Sufficient condition for the existence of F.T

24. Define the F.T of a signal

25. State Paeseval’s energy theorem for a periodic signal

26. Define sampling Theorem

27. What is Aliasing Effect

28. what is Under sampling

29. What is Over sampling

Page 79: LIST OF EXPERIMENTS Experiment Name Page No. · 8. Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical Realizability and

Department of ECE Basic Simulation Lab Anurag College of Engineering

79

30. Define Correlation

31. Define Auto-Correlation

32. Define Cross-Correlation

33. Define Convolution

34. Define Properties of Convolution

35. What is the Difference Between Convolution& Correlation

36. What are Dirchlet Condition

37. Define Fourier Series

38. What is Half Wave Symmetry

39. What are the properties of Continuous-Time Fourier Series

40. Define Laplace-Transform

41. What is the Condition for Convergence of the Laplace Transform

42. What is the Region of Convergence(ROC)

43. State the Shifting property of L.T

44. State convolution Property of L.T

45. Define Transfer Function

46. Define Pole-Zeros of the Transfer Function

47. What is the Relationship between L.T & F.T &Z.T

48. Fined the Z.T of a Impulse and step

49. What are the Different Methods of evaluating inverse z-T

50. what are the ROC properties of a Z.T

51. Define Initial Value Theorem of a Z.T

52. Define Final Value Theorem of a Z.T

53. Define Nyquist Rate

54. Define the condition for distortionless transmission through the system

55. What is signal band width

56. What is system band width

57. What is the relationship between rise time and band width


Recommended