SlideShare ist ein Scribd-Unternehmen logo
1 von 58
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 1
Babaria Institute of Technology
Electrical Engineering Department
Semester :4 Branch:EE
Subject: Signals & Systems (2141005) Experiment No. 1
Aim: To familiarize with MATLAB software, general functions and signal processing
toolbox functions.
The name MATLAB stands for MATrix LABoratory produced by Mathworks Inc., USA. It is a
matrix-based powerful software package for scientific and engineering computation and
visualization. Complex numerical problems can be solved in a fraction of the time that
required with other high level languages. It provides an interactive environment with
hundreds of built -in –functions for technical computation, graphics and animation. In
addition to built-in-functions, user can create his own functions.
MATLAB offers several optional toolboxes, such as signal processing, control systems, neural
networks etc. It is command driven software and has online help facility.
MATLAB has three basic windows normally; command window, graphics window and edit
window.
Command window is characterized by the prompt ‘>>’.
All commands and the ready to run program filename can be typed here. Graphic window
gives the display of the figures as the result of the program. Edit window is to create
program files with an extension .m.
Some important commands in MATLAB
Help : List topics on which help is available
Help command name: Provides help on the topic selected
Demo : Runs the demo program
Who : Lists variables currently in the workspace
Whos : Lists variables currently in the workspace with their size
Clear : Clears the workspace, all the variables are removed
Clear x,y,z : Clears only variables x,y,z
Quit: Quits MATLAB
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 2
Some of the frequently used built-in-functions in Signal Processing Toolbox
filter(b.a.x): Syntax of this function is Y = filter(b.a.x)
It filters the data in vector x with the filter described by vectors
a and b to create the filtered data y.
fft (x): It is the DFT of vector x
ifft (x) : It is the DFT of vector x
conv (a,b) : Syntax of this function is C = conv (a,b)
It convolves vectors a and b. The resulting vector is ofLength,
Length (a) + Length (b)-1
deconv(b,a): Syntax of this function is [q,r] = deconv(b,a)
It deconvolves vector q and the remainder in vector r such that
b = conv(a,q)+r
butter(N,Wn): Designs an Nth order lowpass digital Butterworth filter and
returns the filter coefficients in length N+1 vectors B
(numerator) and A (denominator). The coefficients are listed in
descending powers of z. The cutoff frequency Wn must be 0.0
< Wn < 1.0, with 1.0 corresponding tohalf the sample rate.
buttord(Wp, Ws, Rp, Rs): Returns the order N of the lowest order digital Butterworth
filter that loses no more than Rp dB in the passband and has at
least Rs dB of attenuation in the stopband. Wp and Ws are the
passband and stopband edge frequencies, Normalized from 0
to 1 ,(where 1 corresponds to pi rad/sec)
Cheby1(N,R,Wn) : Designs an Nth order lowpass digital Chebyshev filter with R
decibels of peak-to-peak ripple in the passband. CHEBY1
returns the filter coefficients in length N+1 vectors B
(numerator) and A (denominator). The cutoff frequency Wn
must be 0.0 < Wn < 1.0, with 1.0 corresponding to half the
sample rate.
Cheby1(N,R,Wn,'high'): Designs a highpass filter.
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 3
Cheb1ord(Wp, Ws, Rp, Rs): Returns the order N of the lowest order digital Chebyshev
Type I filter that loses no more than Rp dBin the passband and
has at least Rs dB of attenuation in the stopband. Wp and Ws
are the passband and stopband edge frequencies, normalized
from 0 to 1 (where 1 corresponds to pi radians/sample)
cheby2(N,R,Wn) : Designs an Nth order lowpass digital Chebyshev filter with the
stopband ripple R decibels down and stopband edge
frequency Wn. CHEBY2 returns the filter coefficients in length
N+1 vectors B (numerator) and A. The cutoff frequency Wn
must be 0.0 < Wn < 1.0, with 1.0 corresponding to half the
sample rate.
cheb2ord(Wp, Ws, Rp, Rs): Returns the order N of the lowest order digital Chebyshev
Type II filter that loses no more than Rp dB in the passband
and has at least Rs dB of attenuation in the stopband. Wp and
Ws are the passband and stopband edge frequencies.
abs(x): It gives the absolute value of the elements of x. When x is
complex, abs(x) is the complex modulus (magnitude) of the
elements of x.
angle(H): It returns the phase angles of a matrix with complex elements
in
radians.
freqz(b,a,N) : Syntax of this function is [h,w] = freqz(b,a,N) returns the
Npoint
frequency vector w in radians and the N-point complex
frequency response vector h of the filter b/a.
stem(y) : It plots the data sequence y aa stems from the x axis
terminated
with circles for the data value.
stem(x,y): It plots the data sequence y at the values specified in x.
ploy(x,y) : It plots vector y versus vector x. If x or y is a matrix, then the
vector is plotted versus the rows or columns of the
matrix,cwhichever line up.
title(‘text’): It adds text at the top of the current axis.
xlabel(‘text’): It adds text beside the x-axis on the current axis.
ylabel(‘text’): It adds text beside the y-axis on the current axis.
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 4
Experiment :2
To plot graph of Continuous Time Signals
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 5
Unit step function
Program :
T=30;
x=ones(1,T);
t=0:1:T-1
plot(t,x);
grid on;
xlabel('time(sec)')
ylabel('x(t)')
Output :
0 5 10 15 20 25 30
0
0.5
1
1.5
2
time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 6
Unit ramp function
Program :
t=0:0.03:4;
x=t;
plot(t,x)
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
0 1 2 3 4
0
1
2
3
4
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 7
Unit parabolic function
Program :
t=0:0.01:2;
x=t.^2/2;
plot(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
0 0.5 1 1.5 2
0
0.5
1
1.5
2
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 8
Impulse function
Program :
for t = 0;
x = 1;
end;
plot(t,x);
stem(t,x)
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
-1 -0.5 0 0.5 1
0
0.2
0.4
0.6
0.8
1
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 9
Rectangular pulse function
Program :
t=-1:0.001:1;
x=rectpuls(t);
plot(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
-1 -0.5 0 0.5 1
0
0.2
0.4
0.6
0.8
1
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 10
Triangular pulse function
Program :
t=-1:0.002:1;
x=tripuls(t);
plot(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output:
Signum function
-1 -0.5 0 0.5 1
0
0.2
0.4
0.6
0.8
1
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 11
Program :
t=-10:0.001:10;
x=sign(t);
plot(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output:
-10 -5 0 5 10
-1
-0.5
0
0.5
1
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 12
Sinc function
Program :
t =-4:0.05:4;
x=sinc(t);
plot(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output:
-4 -2 0 2 4
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 13
Gaussian function
Program :
t=-5:0.03:5;
a=1;
x=exp(-a*t.^2);
plot(t,x)
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
-5 0 5
0
0.2
0.4
0.6
0.8
1
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 14
Sinusoidal signal
Program :
t=0:0.01:2;
x=2*sin(pi*t);
plot(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
0 0.5 1 1.5 2
-2
-1
0
1
2
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 15
Real exponential signals
Program :
t=0:0.04:4;
x=2*exp(1*t);
plot(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output : 1. a>0
0 1 2 3 4
0
10
20
30
40
50
60
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 16
Program :
t=0:0.04:4;
x=2*exp(-1*t);
plot(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output : 2. a<0
Program :
0 1 2 3 4
0
0.2
0.4
0.6
0.8
1
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 17
t=0:0.04:4;
x=2*exp(0*t);
plot(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output : 3. a=0
0 1 2 3 4
-1
-0.5
0
0.5
1
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 18
Complex exponential function
Program :
t=-10:0.001:10;
c=complex(0,1);
x=exp(c*t);
plot(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
-10 -5 0 5 10
-1
-0.5
0
0.5
1
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 19
Program :
t=-10:0.001:10;
c=complex(-1,12);
x=exp(c*t);
plot(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
-10 -5 0 5 10
-2
-1
0
1
2
3
x 10
4
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 20
Program :
t=-10:0.001:10;
c=complex(1,12);
x=exp(c*t);
plot(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
-10 -5 0 5 10
-2
-1
0
1
2
3
x 10
4
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 21
Experiment :3
To plot graph of Discrete Time Signals
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 22
Unit step sequence
Program :
T=30;
x=ones(1,T);
t=0:1:T-1
stem(t,x);
grid on;
xlabel('time(sec)')
ylabel('x(t)')
Output :
0 5 10 15 20 25 30
0
0.2
0.4
0.6
0.8
1
time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 23
Unit ramp sequence
Program :
t=0:0.5:4;
x=t;
stem(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
0 1 2 3 4
0
1
2
3
4
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 24
Unit impulse sequence
Program :
for t = 0;
x = 1;
end;
plot(t,x);
stem(t,x)
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
-1 -0.5 0 0.5 1
0
0.2
0.4
0.6
0.8
1
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 25
Exponential sequence
Program :
t=0:0.35:4;
x=2.^t;
stem(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
0 1 2 3 4
0
10
20
30
40
50
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 26
Program :
t=0:0.35:4;
x=0.2.^t;
stem(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
0 1 2 3 4
0
0.2
0.4
0.6
0.8
1
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 27
Program :
t=0:0.35:4;
x=-0.2.^t;
stem(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
0 1 2 3 4
-1
-0.8
-0.6
-0.4
-0.2
0
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 28
Program :
t=0:0.35:4;
x=-2.^t;
stem(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
0 1 2 3 4
-15
-10
-5
0
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 29
Sinusoidal sequence
Program :
t=0:0.1:2;
x=2*sin(pi*t);
stem(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
0 0.5 1 1.5 2
-2
-1
0
1
2
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 30
Complex exponential sequence
Program :
t=-10:0.3:10;
c=complex(0.3,4);
x=exp(c*t);
stem(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
-10 -5 0 5 10
-15
-10
-5
0
5
10
15
20
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 31
Program :
t=-10:0.3:10;
c=complex(0.3,4);
x=exp(c*t);
stem(t,x);
grid on;
xlabel('Time(sec)')
ylabel('x(t)')
Output :
-10 -5 0 5 10
-15
-10
-5
0
5
10
15
20
Time(sec)
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 32
Experiment :04
To perform signal operation using
stimulink
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 33
Program : u(t)-u(t-1)
Output :
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 34
Program : r(t)-2r(t-1)+r(t-2)
Output :
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 35
Program : r(t)-2u(t-1)-r(t-2)
Output :
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 36
Program : r(t)-r(t-1)-u(t-1)
Output :
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 37
Experiment :05
To perform the convolution sum
of discrete time signal.
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 38
Program :
a=[ 1 -1 2 3];
b=[ 1 -2 3 -1];
z=conv(a,b);
m=length(z);
y=0:m-1;
stem(y,z);
Output :
0 1 2 3 4 5 6
-5
0
5
10
a
b
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 39
Program :
a=[ 1 2 3 2];
b=[ 1 2 2];
z=conv(a,b);
m=length(z);
y=0:m-1;
stem(y,z);
Output :
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
0
5
10
15
a
b
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 40
Program :
a=[ 1 4 3 2];
b=[ 1 3 2 1];
z=conv(a,b);
m=length(z);
y=0:m-1;
stem(y,z);
Output :
0 1 2 3 4 5 6
0
5
10
15
20
a
b
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 41
Program:
a=[ 1 -2 3 1];
b=[ 2 -3 -2];
z=conv(a,b);
m=length(z);
y=0:m-1;
stem(y,z);
Output:
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-10
-5
0
5
10
a
b
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 42
Experiment :06
To perform z-transform using
MATLAB
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 43
Program :
syms f n;
f=2^n;
ztrans(f);
Output :
z/(z - 2)
Program :
syms f n w;
f=cos(n);
ztrans(f);
Output :
(z*(z - cos(1)))/(z^2 - 2*cos(1)*z + 1)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 44
Program :
syms f n w;
f=2^n+3^n;
ztrans(f);
Output :
z/(z - 2) + z/(z - 3)
Program :
syms f n w;
f=(n^2)*(2^n);
ztrans(f);
Output :
(z^2/4 + z/2)/(z/2 - 1)^3
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 45
Experiment :07
To plot zeros and poles in the z-plane
using MATLAB.
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 46
Program :
syms n d z
n=[1 1];
d=[1 2 3 4];
sys=tf(n,d),disp(z);
zplane(n,d);
Output :
s + 1
s^3 + 2 s^2 + 3 s + 4
-2 -1.5 -1 -0.5 0 0.5 1 1.5
-1.5
-1
-0.5
0
0.5
1
1.5
2
Real Part
ImaginaryPart
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 47
Program :
syms n d z
n=[1 0.5];
d=[1 1 1];
sys=tf(n,d),disp(z);
zplane(n,d);
Output :
s + 0.5
s^2 + s + 1
-1.5 -1 -0.5 0 0.5 1 1.5
-1
-0.5
0
0.5
1
Real Part
ImaginaryPart
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 48
Program :
syms n d z
n=[3 0];
d=[1 6 9];
sys=tf(n,d),disp(z);
zplane(n,d);
Output :
3 s
s^2 + 6 s + 9
-3 -2 -1 0 1
-1
-0.5
0
0.5
1
22
Real Part
ImaginaryPart
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 49
Program :
syms n d z
n=[1 1 0];
d=[1 3 1 1];
sys=tf(n,d),disp(z);
zplane(n,d);
Output :
s^2 + s
s^3 + 3 s^2 + s + 1
-2.5 -2 -1.5 -1 -0.5 0 0.5 1
-1
-0.5
0
0.5
1
2
Real Part
ImaginaryPart
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 50
Experiment -08
To perform FFT using MATLAB.
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 51
1. Program:
a = input('enter sequence');
b = length(a);
x = fft(a,b)
Output:
Enter sequence[1 2 3 4]
x =
10.0000 -2.0000 + 2.0000i -2.0000 -2.0000 - 2.0000i
2. Program :
a = input('enter sequence');
b = length(a);
x = fft(a,b)
Output :
enter sequence[5 7 9 5]
x =
26.0000 -4.0000 - 2.0000i 2.0000
-4.0000 + 2.0000i
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 52
Experiment -09
To perform IFFT using MATLAB.
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 53
1. Program:
a = input('Enter sequence');
b = length(a);
x = ifft(a,b)
Output:
Enter sequence[1 2 3 4]
x =
2.5000 -0.5000 - 0.5000i -0.5000
-0.5000 + 0.5000i
2. Program :
a = input('Enter sequence');
b = length(a);
x = ifft(a,b)
Output:
Enter sequence[2 5 8 6]
x =
5.2500 -1.5000 - 0.2500i -0.2500
-1.5000 + 0.2500i
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 54
Experiment - 10
To verify sampling theorem using
MATLAB.
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 55
Program:
T=0.04; % Time period of 50 Hz
signal
t=0:0.0005:0.02;
f = 1/T;
n1=0:40;
size(n1)
xa_t=sin(2*pi*2*t/T);
plot(200*t,xa_t);
title('Continuous signal');
grid on;
xlabel('t');
ylabel('x(t)');
Output:
0 0.5 1 1.5 2 2.5 3 3.5 4
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Continuous signal
t
x(t)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 56
Program:
ts1=0.002; %>Nyquist rate
n=0:20;
x_ts1=2*sin(2*pi*n*ts1/T);
stem(n,x_ts1);
grid on;
title('greater than Nq');
xlabel('n');
ylabel('x(n)');
Output:
0 2 4 6 8 10 12 14 16 18 20
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
greater than Nq
n
x(n)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 57
Program:
ts2=0.01; %=Nyquist rate
n=0:4;
x_ts2=2*sin(2*sym('pi')*n*ts2/T);
stem(n,x_ts2);
grid on;
title('Equal to Nq');
xlabel('n');
ylabel('x(n)');
Output:
0 0.5 1 1.5 2 2.5 3 3.5 4
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
Equal to Nq
n
x(n)
SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1
ELECTRICALDEPARTMENT
BITS EDU CAMPUS Page 58
Program:
ts3=0.1; %<Nyquist rate
n=0:10;
x_ts3=2*sin(2*pi*n*ts3/T);
stem(n,x_ts3);
grid on;
title('less than Nq');
xlabel('n');
ylabel('x(n)');
Output:
0 1 2 3 4 5 6 7 8 9 10
-2.5
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
x 10
-14 less than Nq
n
x(n)

Weitere ähnliche Inhalte

Was ist angesagt?

Digital Signal Processing-Digital Filters
Digital Signal Processing-Digital FiltersDigital Signal Processing-Digital Filters
Digital Signal Processing-Digital FiltersNelson Anand
 
Noise Performance of CW system
Noise Performance of CW systemNoise Performance of CW system
Noise Performance of CW systemDr Naim R Kidwai
 
Computing DFT using Matrix method
Computing DFT using Matrix methodComputing DFT using Matrix method
Computing DFT using Matrix methodSarang Joshi
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filtersop205
 
Digital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysisDigital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysisChandrashekhar Padole
 
Digital signal Processing all matlab code with Lab report
Digital signal Processing all matlab code with Lab report Digital signal Processing all matlab code with Lab report
Digital signal Processing all matlab code with Lab report Alamgir Hossain
 
Circular convolution Using DFT Matlab Code
Circular convolution Using DFT Matlab CodeCircular convolution Using DFT Matlab Code
Circular convolution Using DFT Matlab CodeBharti Airtel Ltd.
 
4.4 diversity combining techniques
4.4   diversity combining techniques4.4   diversity combining techniques
4.4 diversity combining techniquesJAIGANESH SEKAR
 
Signals and systems( chapter 1)
Signals and systems( chapter 1)Signals and systems( chapter 1)
Signals and systems( chapter 1)Fariza Zahari
 
2. classification of signals
2. classification of signals 2. classification of signals
2. classification of signals MdFazleRabbi18
 
Fast fourier transform
Fast fourier transformFast fourier transform
Fast fourier transformchitra raju
 
Matlab source codes section | Download MATLAB source code freerce-codes
Matlab source codes section | Download MATLAB source code freerce-codesMatlab source codes section | Download MATLAB source code freerce-codes
Matlab source codes section | Download MATLAB source code freerce-codeshafsabanu
 

Was ist angesagt? (20)

Digital Signal Processing-Digital Filters
Digital Signal Processing-Digital FiltersDigital Signal Processing-Digital Filters
Digital Signal Processing-Digital Filters
 
Noise Performance of CW system
Noise Performance of CW systemNoise Performance of CW system
Noise Performance of CW system
 
Computing DFT using Matrix method
Computing DFT using Matrix methodComputing DFT using Matrix method
Computing DFT using Matrix method
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filters
 
Digital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysisDigital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysis
 
Sampling
SamplingSampling
Sampling
 
Dif fft
Dif fftDif fft
Dif fft
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
 
digital filter design
digital filter designdigital filter design
digital filter design
 
DSP PPT
DSP PPTDSP PPT
DSP PPT
 
Digital signal Processing all matlab code with Lab report
Digital signal Processing all matlab code with Lab report Digital signal Processing all matlab code with Lab report
Digital signal Processing all matlab code with Lab report
 
Circular convolution Using DFT Matlab Code
Circular convolution Using DFT Matlab CodeCircular convolution Using DFT Matlab Code
Circular convolution Using DFT Matlab Code
 
4.4 diversity combining techniques
4.4   diversity combining techniques4.4   diversity combining techniques
4.4 diversity combining techniques
 
Solved problems
Solved problemsSolved problems
Solved problems
 
Convolution
ConvolutionConvolution
Convolution
 
Signals and systems( chapter 1)
Signals and systems( chapter 1)Signals and systems( chapter 1)
Signals and systems( chapter 1)
 
2. classification of signals
2. classification of signals 2. classification of signals
2. classification of signals
 
Fast fourier transform
Fast fourier transformFast fourier transform
Fast fourier transform
 
Linear block code
Linear block codeLinear block code
Linear block code
 
Matlab source codes section | Download MATLAB source code freerce-codes
Matlab source codes section | Download MATLAB source code freerce-codesMatlab source codes section | Download MATLAB source code freerce-codes
Matlab source codes section | Download MATLAB source code freerce-codes
 

Ähnlich wie signal and system

Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Amairullah Khan Lodhi
 
Signals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 BatchSignals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 BatchAmairullah Khan Lodhi
 
Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01Sagar Gore
 
Digital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE studentsDigital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE studentsUR11EC098
 
BS LAB Manual (1).pdf
BS LAB Manual  (1).pdfBS LAB Manual  (1).pdf
BS LAB Manual (1).pdfssuser476810
 
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf Loren Schwappach
 
Tutorial on convolutional neural networks
Tutorial on convolutional neural networksTutorial on convolutional neural networks
Tutorial on convolutional neural networksHojin Yang
 
DSP_Lab_MAnual_-_Final_Edition[1].docx
DSP_Lab_MAnual_-_Final_Edition[1].docxDSP_Lab_MAnual_-_Final_Edition[1].docx
DSP_Lab_MAnual_-_Final_Edition[1].docxParthDoshi66
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabBilawalBaloch1
 
DSP_Lab_MAnual_-_Final_Edition.pdf
DSP_Lab_MAnual_-_Final_Edition.pdfDSP_Lab_MAnual_-_Final_Edition.pdf
DSP_Lab_MAnual_-_Final_Edition.pdfParthDoshi66
 
A Novel Methodology for Designing Linear Phase IIR Filters
A Novel Methodology for Designing Linear Phase IIR FiltersA Novel Methodology for Designing Linear Phase IIR Filters
A Novel Methodology for Designing Linear Phase IIR FiltersIDES Editor
 

Ähnlich wie signal and system (20)

Dsp lab manual
Dsp lab manualDsp lab manual
Dsp lab manual
 
Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual
 
Signals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 BatchSignals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 Batch
 
Dsp manual
Dsp manualDsp manual
Dsp manual
 
dsp.pdf
dsp.pdfdsp.pdf
dsp.pdf
 
Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01
 
Digital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE studentsDigital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE students
 
BS LAB Manual (1).pdf
BS LAB Manual  (1).pdfBS LAB Manual  (1).pdf
BS LAB Manual (1).pdf
 
Multirate sim
Multirate simMultirate sim
Multirate sim
 
Dsp file
Dsp fileDsp file
Dsp file
 
13005810.ppt
13005810.ppt13005810.ppt
13005810.ppt
 
Introduction to Adaptive filters
Introduction to Adaptive filtersIntroduction to Adaptive filters
Introduction to Adaptive filters
 
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
 
Tutorial on convolutional neural networks
Tutorial on convolutional neural networksTutorial on convolutional neural networks
Tutorial on convolutional neural networks
 
R Language Introduction
R Language IntroductionR Language Introduction
R Language Introduction
 
DSP_Lab_MAnual_-_Final_Edition[1].docx
DSP_Lab_MAnual_-_Final_Edition[1].docxDSP_Lab_MAnual_-_Final_Edition[1].docx
DSP_Lab_MAnual_-_Final_Edition[1].docx
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
DSP_Lab_MAnual_-_Final_Edition.pdf
DSP_Lab_MAnual_-_Final_Edition.pdfDSP_Lab_MAnual_-_Final_Edition.pdf
DSP_Lab_MAnual_-_Final_Edition.pdf
 
A Novel Methodology for Designing Linear Phase IIR Filters
A Novel Methodology for Designing Linear Phase IIR FiltersA Novel Methodology for Designing Linear Phase IIR Filters
A Novel Methodology for Designing Linear Phase IIR Filters
 
DSP Mat Lab
DSP Mat LabDSP Mat Lab
DSP Mat Lab
 

Mehr von SAURAV DAYAL SING

POWER GENERATION SCENERIO IN INDIA
POWER GENERATION SCENERIO IN INDIAPOWER GENERATION SCENERIO IN INDIA
POWER GENERATION SCENERIO IN INDIASAURAV DAYAL SING
 
Bulk oil and min oil circuit breaker
Bulk oil and min oil circuit breakerBulk oil and min oil circuit breaker
Bulk oil and min oil circuit breakerSAURAV DAYAL SING
 
Theory of HVDC transmission
Theory of HVDC transmission Theory of HVDC transmission
Theory of HVDC transmission SAURAV DAYAL SING
 
THE FABRICATION OF REGULATED DC POWER SUPPLY
THE FABRICATION OF REGULATED DC POWER SUPPLYTHE FABRICATION OF REGULATED DC POWER SUPPLY
THE FABRICATION OF REGULATED DC POWER SUPPLYSAURAV DAYAL SING
 
THEORY OF PRODUCTION AND COST
THEORY OF PRODUCTION AND COSTTHEORY OF PRODUCTION AND COST
THEORY OF PRODUCTION AND COSTSAURAV DAYAL SING
 
ELECTRICAL LAMPS AND THEIR TYPES
ELECTRICAL LAMPS AND THEIR TYPESELECTRICAL LAMPS AND THEIR TYPES
ELECTRICAL LAMPS AND THEIR TYPESSAURAV DAYAL SING
 
UKAI HYDRO POWER PLANT VISIT
UKAI HYDRO POWER PLANT VISITUKAI HYDRO POWER PLANT VISIT
UKAI HYDRO POWER PLANT VISITSAURAV DAYAL SING
 

Mehr von SAURAV DAYAL SING (7)

POWER GENERATION SCENERIO IN INDIA
POWER GENERATION SCENERIO IN INDIAPOWER GENERATION SCENERIO IN INDIA
POWER GENERATION SCENERIO IN INDIA
 
Bulk oil and min oil circuit breaker
Bulk oil and min oil circuit breakerBulk oil and min oil circuit breaker
Bulk oil and min oil circuit breaker
 
Theory of HVDC transmission
Theory of HVDC transmission Theory of HVDC transmission
Theory of HVDC transmission
 
THE FABRICATION OF REGULATED DC POWER SUPPLY
THE FABRICATION OF REGULATED DC POWER SUPPLYTHE FABRICATION OF REGULATED DC POWER SUPPLY
THE FABRICATION OF REGULATED DC POWER SUPPLY
 
THEORY OF PRODUCTION AND COST
THEORY OF PRODUCTION AND COSTTHEORY OF PRODUCTION AND COST
THEORY OF PRODUCTION AND COST
 
ELECTRICAL LAMPS AND THEIR TYPES
ELECTRICAL LAMPS AND THEIR TYPESELECTRICAL LAMPS AND THEIR TYPES
ELECTRICAL LAMPS AND THEIR TYPES
 
UKAI HYDRO POWER PLANT VISIT
UKAI HYDRO POWER PLANT VISITUKAI HYDRO POWER PLANT VISIT
UKAI HYDRO POWER PLANT VISIT
 

Kürzlich hochgeladen

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 

Kürzlich hochgeladen (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

signal and system

  • 1. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 1 Babaria Institute of Technology Electrical Engineering Department Semester :4 Branch:EE Subject: Signals & Systems (2141005) Experiment No. 1 Aim: To familiarize with MATLAB software, general functions and signal processing toolbox functions. The name MATLAB stands for MATrix LABoratory produced by Mathworks Inc., USA. It is a matrix-based powerful software package for scientific and engineering computation and visualization. Complex numerical problems can be solved in a fraction of the time that required with other high level languages. It provides an interactive environment with hundreds of built -in –functions for technical computation, graphics and animation. In addition to built-in-functions, user can create his own functions. MATLAB offers several optional toolboxes, such as signal processing, control systems, neural networks etc. It is command driven software and has online help facility. MATLAB has three basic windows normally; command window, graphics window and edit window. Command window is characterized by the prompt ‘>>’. All commands and the ready to run program filename can be typed here. Graphic window gives the display of the figures as the result of the program. Edit window is to create program files with an extension .m. Some important commands in MATLAB Help : List topics on which help is available Help command name: Provides help on the topic selected Demo : Runs the demo program Who : Lists variables currently in the workspace Whos : Lists variables currently in the workspace with their size Clear : Clears the workspace, all the variables are removed Clear x,y,z : Clears only variables x,y,z Quit: Quits MATLAB
  • 2. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 2 Some of the frequently used built-in-functions in Signal Processing Toolbox filter(b.a.x): Syntax of this function is Y = filter(b.a.x) It filters the data in vector x with the filter described by vectors a and b to create the filtered data y. fft (x): It is the DFT of vector x ifft (x) : It is the DFT of vector x conv (a,b) : Syntax of this function is C = conv (a,b) It convolves vectors a and b. The resulting vector is ofLength, Length (a) + Length (b)-1 deconv(b,a): Syntax of this function is [q,r] = deconv(b,a) It deconvolves vector q and the remainder in vector r such that b = conv(a,q)+r butter(N,Wn): Designs an Nth order lowpass digital Butterworth filter and returns the filter coefficients in length N+1 vectors B (numerator) and A (denominator). The coefficients are listed in descending powers of z. The cutoff frequency Wn must be 0.0 < Wn < 1.0, with 1.0 corresponding tohalf the sample rate. buttord(Wp, Ws, Rp, Rs): Returns the order N of the lowest order digital Butterworth filter that loses no more than Rp dB in the passband and has at least Rs dB of attenuation in the stopband. Wp and Ws are the passband and stopband edge frequencies, Normalized from 0 to 1 ,(where 1 corresponds to pi rad/sec) Cheby1(N,R,Wn) : Designs an Nth order lowpass digital Chebyshev filter with R decibels of peak-to-peak ripple in the passband. CHEBY1 returns the filter coefficients in length N+1 vectors B (numerator) and A (denominator). The cutoff frequency Wn must be 0.0 < Wn < 1.0, with 1.0 corresponding to half the sample rate. Cheby1(N,R,Wn,'high'): Designs a highpass filter.
  • 3. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 3 Cheb1ord(Wp, Ws, Rp, Rs): Returns the order N of the lowest order digital Chebyshev Type I filter that loses no more than Rp dBin the passband and has at least Rs dB of attenuation in the stopband. Wp and Ws are the passband and stopband edge frequencies, normalized from 0 to 1 (where 1 corresponds to pi radians/sample) cheby2(N,R,Wn) : Designs an Nth order lowpass digital Chebyshev filter with the stopband ripple R decibels down and stopband edge frequency Wn. CHEBY2 returns the filter coefficients in length N+1 vectors B (numerator) and A. The cutoff frequency Wn must be 0.0 < Wn < 1.0, with 1.0 corresponding to half the sample rate. cheb2ord(Wp, Ws, Rp, Rs): Returns the order N of the lowest order digital Chebyshev Type II filter that loses no more than Rp dB in the passband and has at least Rs dB of attenuation in the stopband. Wp and Ws are the passband and stopband edge frequencies. abs(x): It gives the absolute value of the elements of x. When x is complex, abs(x) is the complex modulus (magnitude) of the elements of x. angle(H): It returns the phase angles of a matrix with complex elements in radians. freqz(b,a,N) : Syntax of this function is [h,w] = freqz(b,a,N) returns the Npoint frequency vector w in radians and the N-point complex frequency response vector h of the filter b/a. stem(y) : It plots the data sequence y aa stems from the x axis terminated with circles for the data value. stem(x,y): It plots the data sequence y at the values specified in x. ploy(x,y) : It plots vector y versus vector x. If x or y is a matrix, then the vector is plotted versus the rows or columns of the matrix,cwhichever line up. title(‘text’): It adds text at the top of the current axis. xlabel(‘text’): It adds text beside the x-axis on the current axis. ylabel(‘text’): It adds text beside the y-axis on the current axis.
  • 4. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 4 Experiment :2 To plot graph of Continuous Time Signals
  • 5. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 5 Unit step function Program : T=30; x=ones(1,T); t=0:1:T-1 plot(t,x); grid on; xlabel('time(sec)') ylabel('x(t)') Output : 0 5 10 15 20 25 30 0 0.5 1 1.5 2 time(sec) x(t)
  • 6. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 6 Unit ramp function Program : t=0:0.03:4; x=t; plot(t,x) grid on; xlabel('Time(sec)') ylabel('x(t)') Output : 0 1 2 3 4 0 1 2 3 4 Time(sec) x(t)
  • 7. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 7 Unit parabolic function Program : t=0:0.01:2; x=t.^2/2; plot(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : 0 0.5 1 1.5 2 0 0.5 1 1.5 2 Time(sec) x(t)
  • 8. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 8 Impulse function Program : for t = 0; x = 1; end; plot(t,x); stem(t,x) grid on; xlabel('Time(sec)') ylabel('x(t)') Output : -1 -0.5 0 0.5 1 0 0.2 0.4 0.6 0.8 1 Time(sec) x(t)
  • 9. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 9 Rectangular pulse function Program : t=-1:0.001:1; x=rectpuls(t); plot(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : -1 -0.5 0 0.5 1 0 0.2 0.4 0.6 0.8 1 Time(sec) x(t)
  • 10. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 10 Triangular pulse function Program : t=-1:0.002:1; x=tripuls(t); plot(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output: Signum function -1 -0.5 0 0.5 1 0 0.2 0.4 0.6 0.8 1 Time(sec) x(t)
  • 11. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 11 Program : t=-10:0.001:10; x=sign(t); plot(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output: -10 -5 0 5 10 -1 -0.5 0 0.5 1 Time(sec) x(t)
  • 12. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 12 Sinc function Program : t =-4:0.05:4; x=sinc(t); plot(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output: -4 -2 0 2 4 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Time(sec) x(t)
  • 13. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 13 Gaussian function Program : t=-5:0.03:5; a=1; x=exp(-a*t.^2); plot(t,x) grid on; xlabel('Time(sec)') ylabel('x(t)') Output : -5 0 5 0 0.2 0.4 0.6 0.8 1 Time(sec) x(t)
  • 14. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 14 Sinusoidal signal Program : t=0:0.01:2; x=2*sin(pi*t); plot(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : 0 0.5 1 1.5 2 -2 -1 0 1 2 Time(sec) x(t)
  • 15. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 15 Real exponential signals Program : t=0:0.04:4; x=2*exp(1*t); plot(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : 1. a>0 0 1 2 3 4 0 10 20 30 40 50 60 Time(sec) x(t)
  • 16. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 16 Program : t=0:0.04:4; x=2*exp(-1*t); plot(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : 2. a<0 Program : 0 1 2 3 4 0 0.2 0.4 0.6 0.8 1 Time(sec) x(t)
  • 17. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 17 t=0:0.04:4; x=2*exp(0*t); plot(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : 3. a=0 0 1 2 3 4 -1 -0.5 0 0.5 1 Time(sec) x(t)
  • 18. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 18 Complex exponential function Program : t=-10:0.001:10; c=complex(0,1); x=exp(c*t); plot(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : -10 -5 0 5 10 -1 -0.5 0 0.5 1 Time(sec) x(t)
  • 19. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 19 Program : t=-10:0.001:10; c=complex(-1,12); x=exp(c*t); plot(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : -10 -5 0 5 10 -2 -1 0 1 2 3 x 10 4 Time(sec) x(t)
  • 20. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 20 Program : t=-10:0.001:10; c=complex(1,12); x=exp(c*t); plot(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : -10 -5 0 5 10 -2 -1 0 1 2 3 x 10 4 Time(sec) x(t)
  • 21. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 21 Experiment :3 To plot graph of Discrete Time Signals
  • 22. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 22 Unit step sequence Program : T=30; x=ones(1,T); t=0:1:T-1 stem(t,x); grid on; xlabel('time(sec)') ylabel('x(t)') Output : 0 5 10 15 20 25 30 0 0.2 0.4 0.6 0.8 1 time(sec) x(t)
  • 23. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 23 Unit ramp sequence Program : t=0:0.5:4; x=t; stem(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : 0 1 2 3 4 0 1 2 3 4 Time(sec) x(t)
  • 24. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 24 Unit impulse sequence Program : for t = 0; x = 1; end; plot(t,x); stem(t,x) grid on; xlabel('Time(sec)') ylabel('x(t)') Output : -1 -0.5 0 0.5 1 0 0.2 0.4 0.6 0.8 1 Time(sec) x(t)
  • 25. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 25 Exponential sequence Program : t=0:0.35:4; x=2.^t; stem(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : 0 1 2 3 4 0 10 20 30 40 50 Time(sec) x(t)
  • 26. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 26 Program : t=0:0.35:4; x=0.2.^t; stem(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : 0 1 2 3 4 0 0.2 0.4 0.6 0.8 1 Time(sec) x(t)
  • 27. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 27 Program : t=0:0.35:4; x=-0.2.^t; stem(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : 0 1 2 3 4 -1 -0.8 -0.6 -0.4 -0.2 0 Time(sec) x(t)
  • 28. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 28 Program : t=0:0.35:4; x=-2.^t; stem(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : 0 1 2 3 4 -15 -10 -5 0 Time(sec) x(t)
  • 29. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 29 Sinusoidal sequence Program : t=0:0.1:2; x=2*sin(pi*t); stem(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : 0 0.5 1 1.5 2 -2 -1 0 1 2 Time(sec) x(t)
  • 30. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 30 Complex exponential sequence Program : t=-10:0.3:10; c=complex(0.3,4); x=exp(c*t); stem(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : -10 -5 0 5 10 -15 -10 -5 0 5 10 15 20 Time(sec) x(t)
  • 31. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 31 Program : t=-10:0.3:10; c=complex(0.3,4); x=exp(c*t); stem(t,x); grid on; xlabel('Time(sec)') ylabel('x(t)') Output : -10 -5 0 5 10 -15 -10 -5 0 5 10 15 20 Time(sec) x(t)
  • 32. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 32 Experiment :04 To perform signal operation using stimulink
  • 33. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 33 Program : u(t)-u(t-1) Output :
  • 34. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 34 Program : r(t)-2r(t-1)+r(t-2) Output :
  • 35. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 35 Program : r(t)-2u(t-1)-r(t-2) Output :
  • 36. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 36 Program : r(t)-r(t-1)-u(t-1) Output :
  • 37. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 37 Experiment :05 To perform the convolution sum of discrete time signal.
  • 38. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 38 Program : a=[ 1 -1 2 3]; b=[ 1 -2 3 -1]; z=conv(a,b); m=length(z); y=0:m-1; stem(y,z); Output : 0 1 2 3 4 5 6 -5 0 5 10 a b
  • 39. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 39 Program : a=[ 1 2 3 2]; b=[ 1 2 2]; z=conv(a,b); m=length(z); y=0:m-1; stem(y,z); Output : 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0 5 10 15 a b
  • 40. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 40 Program : a=[ 1 4 3 2]; b=[ 1 3 2 1]; z=conv(a,b); m=length(z); y=0:m-1; stem(y,z); Output : 0 1 2 3 4 5 6 0 5 10 15 20 a b
  • 41. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 41 Program: a=[ 1 -2 3 1]; b=[ 2 -3 -2]; z=conv(a,b); m=length(z); y=0:m-1; stem(y,z); Output: 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 -10 -5 0 5 10 a b
  • 42. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 42 Experiment :06 To perform z-transform using MATLAB
  • 43. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 43 Program : syms f n; f=2^n; ztrans(f); Output : z/(z - 2) Program : syms f n w; f=cos(n); ztrans(f); Output : (z*(z - cos(1)))/(z^2 - 2*cos(1)*z + 1)
  • 44. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 44 Program : syms f n w; f=2^n+3^n; ztrans(f); Output : z/(z - 2) + z/(z - 3) Program : syms f n w; f=(n^2)*(2^n); ztrans(f); Output : (z^2/4 + z/2)/(z/2 - 1)^3
  • 45. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 45 Experiment :07 To plot zeros and poles in the z-plane using MATLAB.
  • 46. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 46 Program : syms n d z n=[1 1]; d=[1 2 3 4]; sys=tf(n,d),disp(z); zplane(n,d); Output : s + 1 s^3 + 2 s^2 + 3 s + 4 -2 -1.5 -1 -0.5 0 0.5 1 1.5 -1.5 -1 -0.5 0 0.5 1 1.5 2 Real Part ImaginaryPart
  • 47. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 47 Program : syms n d z n=[1 0.5]; d=[1 1 1]; sys=tf(n,d),disp(z); zplane(n,d); Output : s + 0.5 s^2 + s + 1 -1.5 -1 -0.5 0 0.5 1 1.5 -1 -0.5 0 0.5 1 Real Part ImaginaryPart
  • 48. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 48 Program : syms n d z n=[3 0]; d=[1 6 9]; sys=tf(n,d),disp(z); zplane(n,d); Output : 3 s s^2 + 6 s + 9 -3 -2 -1 0 1 -1 -0.5 0 0.5 1 22 Real Part ImaginaryPart
  • 49. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 49 Program : syms n d z n=[1 1 0]; d=[1 3 1 1]; sys=tf(n,d),disp(z); zplane(n,d); Output : s^2 + s s^3 + 3 s^2 + s + 1 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 2 Real Part ImaginaryPart
  • 50. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 50 Experiment -08 To perform FFT using MATLAB.
  • 51. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 51 1. Program: a = input('enter sequence'); b = length(a); x = fft(a,b) Output: Enter sequence[1 2 3 4] x = 10.0000 -2.0000 + 2.0000i -2.0000 -2.0000 - 2.0000i 2. Program : a = input('enter sequence'); b = length(a); x = fft(a,b) Output : enter sequence[5 7 9 5] x = 26.0000 -4.0000 - 2.0000i 2.0000 -4.0000 + 2.0000i
  • 52. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 52 Experiment -09 To perform IFFT using MATLAB.
  • 53. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 53 1. Program: a = input('Enter sequence'); b = length(a); x = ifft(a,b) Output: Enter sequence[1 2 3 4] x = 2.5000 -0.5000 - 0.5000i -0.5000 -0.5000 + 0.5000i 2. Program : a = input('Enter sequence'); b = length(a); x = ifft(a,b) Output: Enter sequence[2 5 8 6] x = 5.2500 -1.5000 - 0.2500i -0.2500 -1.5000 + 0.2500i
  • 54. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 54 Experiment - 10 To verify sampling theorem using MATLAB.
  • 55. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 55 Program: T=0.04; % Time period of 50 Hz signal t=0:0.0005:0.02; f = 1/T; n1=0:40; size(n1) xa_t=sin(2*pi*2*t/T); plot(200*t,xa_t); title('Continuous signal'); grid on; xlabel('t'); ylabel('x(t)'); Output: 0 0.5 1 1.5 2 2.5 3 3.5 4 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Continuous signal t x(t)
  • 56. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 56 Program: ts1=0.002; %>Nyquist rate n=0:20; x_ts1=2*sin(2*pi*n*ts1/T); stem(n,x_ts1); grid on; title('greater than Nq'); xlabel('n'); ylabel('x(n)'); Output: 0 2 4 6 8 10 12 14 16 18 20 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 greater than Nq n x(n)
  • 57. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 57 Program: ts2=0.01; %=Nyquist rate n=0:4; x_ts2=2*sin(2*sym('pi')*n*ts2/T); stem(n,x_ts2); grid on; title('Equal to Nq'); xlabel('n'); ylabel('x(n)'); Output: 0 0.5 1 1.5 2 2.5 3 3.5 4 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 Equal to Nq n x(n)
  • 58. SIGNALS & SYSTEMS (2141005) EXPERIMENT- 1 ELECTRICALDEPARTMENT BITS EDU CAMPUS Page 58 Program: ts3=0.1; %<Nyquist rate n=0:10; x_ts3=2*sin(2*pi*n*ts3/T); stem(n,x_ts3); grid on; title('less than Nq'); xlabel('n'); ylabel('x(n)'); Output: 0 1 2 3 4 5 6 7 8 9 10 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 x 10 -14 less than Nq n x(n)