SS Manual
SS Manual
SS Manual
of
SIGNAL AND SYSTEMS
Bachelor of Technology
In
ENGINEERING
INDIA
List of Experiment
Signals can be classified into different categories depending on the characteristics of the
time (independent) variable and the values they take. continuous-time signals are defined for
every value of time and they take on values in the continuous interval (a,b).Discrete time signals
are defined only at certain specific values of time.
A. Standard Continuous Time signals
1. Unit Impulse signal
The impulse signal is a signal is a signal with infinite magnitude and zero duration,but
with unit area . Mathematically ,impulse signal is defined as,
x(t)
2
1 2 t
4.Parabolic signal
The parabolic signal is defined as, x(t)
x(t) = A t2 / 2 ; for t ≥ 0 4.5A
= 0 ;
2A
0.5A
0 1 2 3 t
5. Sinusoidal signal
The sinusoidal signal is defined as,
X(t) = A sin ( Ω0t + Φ)
Where, Ω0 = 2πF0 = 2π/T =Angular frequency in rad/sec
F0 =frequency in cycles/sec or Hz
T= Time period in sec
t
-a 0 a
7.signum signal
The signum signal is defined as the sign of independent variable t.
Therefore ,the signum signal is expressed as, x(t)
x(t) = sgn(t) = 1 ; t > 0 1
=0 ; t=0 t
= -1 ; t < 0 0
8.sinc singnal -1
The sinc signal is defined as,
x(t) = sinc (t) =sin t/ t ; -∞ < t < ∞
9. Gaussian signal
The Gaussian signal is defined as,
x(t) = ga(t) = e-(a^2)(t^2) ; -∞ < t < ∞
MATLAB CODE:
%*************************program to plot some standard signals******************
tmin=-5;
dt=0.1;
tmax=5;
t=tmin :dt:tmax; % set a time vector.
%********************** unit impulse signal**************************************
x1=1;
x2=0;
x=x1.*(t==0)+x2.*(t~=0);
subplot(3,3,1);
plot(t,x);
xlabel(‘t’);
ylabel(‘x(t)’);
title(‘unit impulse signal’);
**************************** unit step signal************************
x1=1;
x2=0;
x=x1.*(t>=0)+x2.*(t<0);
subplot(3,3,2);
plot(t,x);
xlabel(‘t’);
ylabel(‘x(t)’);
title(‘unit step signal’);
%*************************** unit ramp signal ****************************
x1=t;
x2=0;
x=x1.*(t>=0)+x2.*(t<0);
subplot(3,3,3);
plot(t,x);
xlabel(‘t’);
ylabel(‘x(t)’);
title(‘unit ramp signal’);
%************************** parabolic signal ***********************
A=0.4;
x1=(A*(t.^2))/2;
x2=0;
x=x1.*(t>=0)+x2.*(t<0);
subplot(3,3,4);
plot(t,x);
xlabel(‘t’);
ylabel(‘x(t)’);
title(‘parabolic signal’);
%******************************** sinusoidal signal
T=2;
F=1/T;
x= sin(2*pi*F*t);
subplot(3,3,5);
plot(t,x);
xlabel(‘t’);
ylabel(‘x(t)’);
title(‘sinusoidal signal’);
x(t)
x(t)
0.5 0.5
0 0 0
-5 0 5 -5 0 5 -5 0 5
t t t
parabolic signal sinusoidal signal triangular pulse signal
5 1 1
x(t)
x(t)
(t)
0 0.5
0 -1 0
-5 0 5 -5 0 5 -5 0 5
t t t
signum signal sinc signal gaussian signal
1 1 1
x(t)
x(t)
x(t)
0 0 0.5
-1 -1 0
-5 0 5 -5 0 5 -5 0 5
t t t
Experiment No.2
Theory:
a. Amplitude Scaling
b. Time Scaling
a. Amplitude Scaling:
Let x(t) be a continuous time signal. Now Ax(t) is the amplitude scaled version of x(t) ,
where A is a constant. when |A| >1,then Ax(t) is amplitude magnified version of x(t) and when
|A| <1,then Ax(t) is the amplitude attenuated version of x(t).
b. Time Scaling:
If x(t) is continuous time signal ,then x(At) is the time scaled version of x(t),where A is a
constant. when |A|>1,then x(At) is the time compressed version of x(t) and when |A|<1,then
x(At) is the time expanded version of x(t).
2.Folding:
The folding of continuous time signal x(t) is performed by changing the sign of time base
t in the signal x(t)
The folding operation produces a signal x(-t) which is the mirror image of the original
signal x(t) with respect to the time origin t=0.
3. Time shifting
The time shifting of a continuous time signal x(t) is performed by replacing the
independent variable t by –m to get the time shifted signal x(t-m),where m represents the time
shift in seconds.
In x(t-m),if m is positive, then the time shift results in a delay by m seconds. The Delay
results in shifting the original signal x(t) to right, to generate the time shifted signal x(t-m).
In x(t-m), if m is negative, then the time shift results in a advance by m seconds. The advance
results in shifting the original signal x(t) to left, to generate the time shifted signal x(t-m).
The addition of two continuous time signals is performed by adding the value of the two
signals corresponding to same instant of time.
The sum of two x1(t) and x2(t) is a signal y(t), whose value at any instant is equal to the
sum of the value of these two signals at that instant.
The Multiplication of two continuous time signals is performed by Multiplying the value
of the two signals corresponding to same instant of time.
The product of two x1(t) and x2(t) is a signal y(t), whose value at any instant is equal to
the product of the value of these two signals at that instant.
The signals may exhibit symmetry or antisymmetry with respect to t=0.when a signal
exhibit symmetry with respect to t=0, then it is called an even signal. Therefore, the even signal
satisfies the condition the condition, x(-t) = x(t).
when a signal exhibit antisymmetry with respect to t=0, then it is called an odd signal.
Therefore, the odd signal satisfies the condition the condition, x(-t) = -x(t).
MATLAB code
tmin =-3;
tmax=5;
dt=0.2;
t=tmin:dt:tmax;
y0 =y(t);
y1 =1.5 * y(t);
y2 =0.5 * y(t);
y3 =y(2*t);
y4 = y(0.5 *t);
y5 =y(t-2);
y6=y(t+2);
x1(t)
x2(t)
x(t)
2 2 2
0 0 0
-2 0 2 4 -2 0 2 4 -2 0 2 4
t t t
signal x(t) commpressed signal x(t) expanded signal x(t)
4 4 4
x(0.5t)
x(2t)
x(t)
2 2 2
0 0 0
-2 0 2 4 -2 0 2 4 -2 0 2 4
t t t
signal x(t) Delayed signal x(t) Advanced signal x(t)
4 4 4
x(t+2)
x(t-2)
x(t)
2 2 2
0 0 0
-2 0 2 4 -2 0 2 4 -2 0 2 4
t t t
x=linspace(0,2*pi,100);
a=sin(x);
b=cos(x);
c=a+b;
y=plot(x,a,x,b,'*',x,c,'+');
1.5
0.5
-0.5
-1
-1.5
0 1 2 3 4 5 6 7
t=-2:1:2;
x1=[1 2 3 4 5 ];
x2=[1 2 3 4 5 ];
subplot(4,4,3);
stem(t,x1);
title('signal one');
ylabel('ampli---->');
xlabel('n---->');
subplot(4,4,4);
stem(t,x2);
title('signal two');
ylabel('ampli--->');
xlabel('n-->');
y=x1.*x2;
subplot(4,4,5);
stem(t,y);
ylabel('ampli---->');
xlabel('n--->');
Folding
t=0:1:4;
x=[0 1 2 3 4];
subplot(4,4,13);
stem(t,x);
title('input signal');
ylabel('amplication----->');
xlabel('n------------>');
hold on;
t1=t.*-1;
subplot(4,4,14);
stem(t1,x);
hold off;
title('folding sequence');
ylabel('ampli----->');
xlabel('n----->');
n =-3:3;
xn = [0 0 0 1 1 1 1];
xN = [1 1 1 1 0 0 0];
xN = fliplr(xn);
xN = xn(length(xn):-1:1);
xe =(xn+xN)/2;
xo =(xn-xN)/2;
subplot(3,1,1);stem(n,xn);axis([-4 4 -1 1.5])
grid;
ylabel('x[n]')
title('Demonstration of Even-Odd Decomposition')
subplot(3,1,2);stem(n,xe);axis([-4 4 -1 1.5])
grid;ylabel('xe[n]')
subplot(3,1,3);stem(n,xo);axis([-4 4 -1 1.5])
grid;ylabel('xo[n]');xlabel('n')
1
x[n]
-1
-4 -3 -2 -1 0 1 2 3 4
1
xe[n]
-1
-4 -3 -2 -1 0 1 2 3 4
1
xo[n]
-1
-4 -3 -2 -1 0 1 2 3 4
n
Experiment No.3
Theory:
A system is said to be static or memoryless if the output at any time depends on only the input at
that same time. Otherwise, the system is said to be dynamic or to have memory.
A system is called time-invariant if its input-output characteristics do not change with time i.e. if
a time shifts (delay or advance) in the input signal causes the same time shift in the output signal.
Thus, for a continuous-time system, the system is time-invariant if
{ ( − )} = ( − )
for any real value of . For a discrete-time system, the system is time-invariant (or shift-
invariant) if
{ [ − ]} = [ − ]
for any integer k. if system does not satisfy the above equations then it is said to be time-variant. To
check a system for time-invariance, we can compare the shifted output with the output produced
by the shifted input.
The system is said to be linear if it possesses two important properties i.e. additivity and
homogeneity (or scaling) properties. In other words, the system is linear if it satisfies the
following two conditions
a. Additivity
Given that Tx1 = y1 and Tx2 = y2 then
{ + }= +
for any signals x1 and x2.
The system which does not satisfy the above two conditions is said to be nonlinear system.
A system is called causal if its output y (t) at an arbitrary time t = t0 depends on only the input x
(t) for t ≤ t0. That is, the output of a causal system at the present time depends on only the present
and/or past values of the input, not on its future values. Thus, in a causal system, it is not
possible to obtain an output before an input is applied to the system. A system is called non-
causal if it is not causal. Examples of non-causal systems are
( ) = ( + 1)
[ ] = [− ]
Note that all memoryless systems are causal, but not vice versa.
| |≤
MATLAB Code:
if length(x1)>length(x2)
x2=[x2 zeros(1,length(x1)-length(x2))];
else
x1=[x1 zeros(1,length(x2)-length(x1))];
end
X=a1*x1+a2*x2;
Y=a*X+b;
Y1=a*x1+b;
Y2=a*x2+b;
Y3=a1*Y1+a2*Y2;
if Y==Y3
disp('given system is linear');
else
disp('given system is non linear ');
end
subplot(2,1,1);
plot(abs(Y));
subplot(2,1,2);
plot(abs(Y3));
Result:
35
30
25
20
15
1 1.5 2 2.5 3 3.5 4
40
35
30
25
20
1 1.5 2 2.5 3 3.5 4
subplot(2,1,1);
plot((yd));
title('delayed output ');
subplot(2,1,2);
plot((y1));
title('output with delayed input ');
Result:
enter the sequence [4 5 6 7]
enter the delay factor 2
enter the coefficient a 2
enter the constant b 3
given system is time variant
delayed output
20
15
10
0
1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
15
10
0
1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
Experiment No.4
Theory:
The convolution of two continuous time signals x1(t) and x2(t) is defined as,
1.Commutative:
2. Associative:
3. Distributive:
Matlab code:
subplot(3 ,1 ,1);plot(t,x1);
xlabel('t');ylabel('x1(t)');
title('signal x1(t)');
subplot(3 ,1 ,2);plot(t,x2);
xlabel('t');ylabel('x2(t)');
title('signal x2(t)');
signal x1(t)
1
x1(t)
0.5
0
0 1 2 3 4 5 6 7 8 9 10
t
signal x2(t)
1
x2(t)
0.5
0
0 1 2 3 4 5 6 7 8 9 10
t
signal,x3(t) =x1(t)*x2(t)
400
x3(t)/dt
200
0
0 100 200 300 400 500 600
t/dt
Experiment No. 5
Theory:
1. Linearity
If
( )↔ ( )
and
( )↔ ( )
then
( )+ ( )↔ ( )+ ( )
2. Time Shifting:
If
( )↔ ( )
then
( − )↔ ( )
3. Frequency Shifting:
If
( )↔ ( )
then
( )↔ ( − )
4. Time Scaling:
If
( )↔ ( )
then
1
( )↔
| |
where a is a real constant. This property indicates that scaling the time variable t by the factor a
causes an inverse scaling of the frequency variable by 1⁄ as well as an amplitude scaling of
( ⁄ ) by 1 ⁄ | |. Thus the time scaling property implies that time compression of a signal (a >
1) results in its spectral expansion and that time expansion of the signal (a < 1) results in its
spectral compression.
5. Time Reversal:
If
( )↔ ( )
then
(− ) ↔ (− )
Thus, time reversal of ( ) produces a like reversal of the frequency axis for ( ).
Because of the similarity between the formulae for the Fourier transform and its inverse, a
correspondence between the frequency-domain and time-domain can be derived by carefully
choosing the arguments of a given transform pair. With appropriate substitutions into the integrals for
the transform and its inverse, it can be shown that :
If
( )↔ ( )
then
( )↔2 ( )
This relationship is called duality.
If
( )↔ ( )
then
( )
↔ ( )
The above equation shows that the effect of differentiation in the time domain is the multiplication of
( ) by in the frequency domain.
If
( )↔ ( )
then
( )
(− ) ( ) ↔
If
( )↔ ( )
then
1
( ) ↔ (0) ( ) + ( )
Since integration is the inverse of differentiation, above equation shows that the frequency
domain operation corresponding to time-domain integration is multiplication by 1⁄ , but an
additional term is needed to account for a possible dc component in the integrator output. Hence,
unless (0) = 0, a dc component is produced by the integrator.
10. Convolution:
If
( )↔ ( )
and
( )↔ ( )
then
( )∗ ( )↔ ( ) ( )
The above equation is referred to as the time convolution theorem, and it states that convolution
in the time domain becomes multiplication in the frequency domain.
11. Multiplication:
If
( )↔ ( )
and
( )↔ ( )
then
1
( ) ( )↔ ( )∗ ( )
2
The multiplication property is the dual property of convolution and is often referred to as the
frequency convolution theorem. Thus, multiplication in the time domain becomes convolution in the
frequency domain.
MATLAB code:
%Fourier Transform%
function[x]=Fourier_Transform(x);
N=length(x)
w=-pi
for i=1:1:100
n=1:1:N
e=exp(-j*w*n)
xft(i)=x*e'
w=w+(2*pi)/100
end
subplot(2,2,1)
plot(abs(xft))
title('absolute of X')
subplot(2,2,2)
plot(phase(xft))
title('phase of X')
subplot(2,2,3)
plot(real(xft))
title('real of X')
subplot(2,2,4)
plot(imag(xft))
title('imagnary of X')
if length(x1)>length(x2)
x2=[x2 zeros(1,length(x1)-length(x2))];
else
x1=[x1 zeros(1,length(x2)-length(x1))];
end
x3=a1*x1+a2*x2;
X1=Fourier_Transform(x1);
X2=Fourier_Transform(x2);
X3=Fourier_Transform(x3);
X4=a1*X1+a2*X2;
figure;
subplot(2,1,1);
plot(abs(X3));
xlabel('frequency');
ylabel('magnitude');
title('frequency response in time domain');
subplot(2,1,2);
plot(abs(X4));
xlabel('frequency');
ylabel('magnitude');
title('frequency response in frequency domain');
Result:
absolute of X phase of X
100 30
20
50
10
0 0
0 50 100 0 50 100
real of X imagnary of X
100 100
50
50
0
0
-50
-50 -100
0 50 100 0 50 100
25
magnitude
20
15
10
1 1.5 2 2.5 3 3.5 4
frequency
frequency response in frequency domain
30
25
magnitude
20
15
10
1 1.5 2 2.5 3 3.5 4
frequency
Result:
absolute of X phase of X
100 30
20
50
10
0 0
0 50 100 0 50 100
real of X imagnary of X
100 100
50
50
0
0
-50
-50 -100
0 50 100 0 50 100
4
1
1 1.5 2 2.5 3 3.5 4
1
1 1.5 2 2.5 3 3.5 4
Result:
4) % to study time scale property of Fourier transform
x1=input('enter the sequence ');
a=input('enter the scale factor ');
xa=x1.*a;
Xa=Fourier_transform(xa);
X1=Fourier_transform(x1);
X2=X1/a;
X3=(1/abs(a))*X2;
subplot(2,1,1);
plot((Xa));
title('in freq domain');
subplot(2,1,2);
plot((X3));
title('in time domain');
Result:
in freq domain
8
2
1 1.5 2 2.5 3 3.5 4
in time domain
1
0.8
0.6
0.4
0.2
1 1.5 2 2.5 3 3.5 4
Result:
in freq domain
-1
-2
-3
-4
1 1.5 2 2.5 3 3.5 4
in time domain
-1
-2
-3
-4
1 1.5 2 2.5 3 3.5 4
Experiment No. 6
Theory:
Let x(n) be a discrete time signal defined in the range 0 < n < ∞ .And X(z) is Z-transform
of x(n).
X(z) = ∑ ( ) Z-n
MATLAB CODE:
clear all;
syms n T a real;
syms z complex;
%(a) n
x=n;
disp('(a) z-transform of " n " is');
ztrans(x)
%(b) a^n
x= a^n;
disp('(b) z-transform of "a^n" is ');
ztrans(x)
%(c) n*(a^n)
x=n*(a^n);
disp('(c) z-transform of "n*(a^n)" is ');
ztrans(x)
%(d) exp(-a*n*T)
x=exp(-a*n*T)
disp('(d) z-transform of "exp(-a*n*T)" is ');
ztrans(x)
RESULT:
(a) z-transform of " n " is
ans =
z/(z - 1)^2
ans =
-z/(a - z)
ans =
z/(a*(z/a - 1)^2)
x=
1/exp(T*a*n)
ans =
z/(z - 1/exp(T*a))
Experiment No. 7
Theory:
( )
X(z) =
( )
G is scaling factor.
In above equation ,if the value of z is equal to one of the roots of numerator polynomial,
then the function X(z) will become zero.
Therefore the roots of numerator polynomial z1,z2,z3……..zN are called zeros of X(z).
Hence the zeros are defined as values z at which the function X(z) become zero.
In above equation ,if the value of z is equal to one of the roots of denominator
polynomial, then the function X(z) will become infinite.
Therefore the roots of denominator polynomial p1,p2,p3…….,pN are called poles of X(z).
Hence the poles are defined as values z at which the function X(z) become infinite.
MATLAB CODE:
den_coeff=[1 0 0.49];
disp('roots of denominators polynomial z^2+0.49 are poles .');
poles=roots(den_coeff)
H=tf('z');
Ts=0.1;
H=tf([num_coeff],[den_coeff],Ts);
zgrid on;
pzmap(H);
RESULT:
roots of numerator polynomial z^2+0.8Z+0.8 are zeros
zeros =
-0.4000 + 0.8000i
-0.4000 - 0.8000i
poles =
0 + 0.7000i
0 - 0.7000i
Pole-Zero Map
1
0.5/T
0.6/T 0.4/T
0.8 0.7/T 0.1 0.3/T
0.2
0.6 0.3
0.8/T 0.4 0.2/T
0.5
0.4 0.6
0.7
0.9/T 0.8 0.1/T
0.2
Imaginary Axis
0.9
/T
0
/T
-0.2
0.9/T 0.1/T
-0.4
0.8/T 0.2/T
-0.6
0.6/T 0.4/T
0.5/T
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
Real Axis
Experiment No. 8
Theory:
In order to perform a time domain signal x(t) to s-domain,multiply the signal by and
then integrate from -∞ to ∞.The transformed signal is represented as X(s) and the transformation
is denoted by the script letter ℒ .
{x(t)} = X(s) =∫ ( ) .
MATLAB CODE:
clear all;
syms t real;
syms a real;
syms s complex;
syms n real;
%a
x=t;
disp('(a) laplace transform of "t" is');
laplace(x)
%b
x=exp(-a*t);
disp('(b) laplace transform of "exp(-a*t)"is');
laplace(x)
%c
x=t*exp(-a*t);
disp('(c) laplace transfrom of "t*exp(-a*t)" is');
laplace(x)
%d
sg=real(s);
o=imag(s);
s=sg+(i*o);
x=cos(o*t);
disp('(d) laplace transform of "cos(o*t)" is');
laplace(x)
%e
x=sinh(o*t);
disp('(e) laplace transform of "sinh(o*t)" is ');
laplace(x)
%f
x=exp(-a*t)*sin(o*t);
disp('(f) laplace transform of "exp(-a*t)*sin(o*t" is ');
laplace(x)
%g
n=input('enter the value of n');
x=t^n;
disp('(g) laplace transform of "t^n" is ');
laplace(x)
%h
x=t^(n-1)/factorial (n-1);
disp('(h) laplace transform of "t^(n-1)/factorial (n-1)" is');
laplace(x)
%i
x=(t^n)*exp(-a*t);
disp('(i) laplace transform of "(t^n)*exp(-a*t)" is');
laplace(x)
%j
x=(t^(n-1)*exp(-a*t))/factorial (n-1);
disp('(j) laplace transform of "(t^(n-1)*exp(-a*t))/factorial (n-1" is');
laplace(x)
RESULT:
(a) laplace transform of "t" is
ans =
1/s^2
ans =
1/(a + s)
(c) laplace transfrom of "t*exp(-a*t)" is
ans =
1/(a + s)^2
ans =
ans =
ans =
ans =
6/s^4
ans =
1/s^3
ans =
6/(a + s)^4
1/(a + s)^3
Experiment No. 9
Theory:
The convolution theorem of Fourier transform says that, Fourier transform of convolution
of two signals is given by the product of the Fourier Transform of the individual signals .
MATLAB CODE:
syms t real;
x1=exp(-2*t).*heaviside(t);
x2=exp(-6*t).*heaviside(t);
x1=fourier(x1)
x2=fourier(x2)
y=x1*x2;
x3=ifourier(y,t)
result:
Fourier transform of x1(t) is
x1 =
1/(i*w + 2)
x2 =
1/(i*w + 6)
x3 =
((pi*heaviside(t))/(2*exp(2*t)) - (pi*heaviside(t))/(2*exp(6*t)))/(2*pi)
Experiment No. 10
Theory:
MATLAB CODE:
clear all;
syms t real;
x1t=(t^2-(2*t));
x2t=t;
x1s=laplace (x1t);
x2s=laplace(x2t);
x3s=x1s*x2s;
conl2=ilaplace(x3s);
simplify(conl2)
result:
ans =
(t^3*(t - 4))/12
MATLAB code:
syms n z
x1n=0.4^(n);
x2n=0.5^(n);
x1z=ztrans(x1n);
x2z=ztrans(x2n);
x3z=x1z*x2z;
conl2=iztrans(x3z);
simplify(conl2)
Result:
ans =
5*(1/2)^n - 4*(2/5)^n
Experiment No. 10
Theory:
MATLAB CODE:
clear all;
syms t real;
x1t=(t^2-(2*t));
x2t=t;
x1s=laplace (x1t);
x2s=laplace(x2t);
x3s=x1s*x2s;
conl2=ilaplace(x3s);
simplify(conl2)
result:
ans =
(t^3*(t - 4))/12
MATLAB code:
syms n z
x1n=0.4^(n);
x2n=0.5^(n);
x1z=ztrans(x1n);
x2z=ztrans(x2n);
x3z=x1z*x2z;
conl2=iztrans(x3z);
simplify(conl2)
Result:
ans =
5*(1/2)^n - 4*(2/5)^n