Waveform Synthesis
AIM: To perform waveform synthesis using Laplace Transforms of a given signal
OBJECTIVE: To perform waveform synthesis using Laplace Transform of a given signal.
EQUIPMENT:
PC with windows (95/98/XP/NT/2007).
MATLAB Software
THEORY:
laplace transform :
The bilateral Laplace transform is defined as follows:
%this program find the laplace transform of the given function f(t)
syms t
ft=input('define the function')
fs=laplace(ft);
disp('the laplace transform of the given function f(t) is')
disp(fs)
1. f(t)= (-4/3)e-t+(1/3)e2t.
define the function
ft = -4/3*exp(-t)+1/3*exp(2*t)
the Laplace transform of the given function f(t) is
-4/3/(s+1)+1/3/(s-2) i.e. –(4/3).(1/(s+1))+(1/3).(1/(s-2)).
2. f(t)=t2.sin(t).
define the function
ft = t^2*sin(t)
the laplace transform of the given function f(t) is
2/(s^2+1)^3*(-1+3*s^2).
3. f(t)=t2.e-2t.
define the function
ft = t^2*exp(-2*t)
the laplace transform of the given function f(t) is
2/(s+2)^3
4. f(t)=3e-2t- 2e-t
define the function
ft = 3*exp(-2*t)-2*exp(-t)
the laplace transform of the given function f(t) is
3/(s+2)-2/(s+1)
5. define the function
ft = dirac(t)
the Laplace transform of the given function f(t) is 1
%this program finds the inverse Laplace transform of given f(s)
syms s t;
fs=input('enter the laplace transform ')
ft=ilaplace(fs);
disp('the inverse Laplace transform of the given f(s) is')
disp(ft)
1.enter the Laplace transform
fs =1/(s+4)
the inverse Laplace transform of the given f(s) is
exp(-4*t)
2.enter the Laplace transform
fs =36/(s^2+3*s+36)
the inverse Laplace transform of the given f(s) is
8/5*15^(1/2)*exp(-3/2*t)*sin(3/2*15^(1/2)*t)
3.enter the Laplace transform
fs = (2*s^2+5*s+12)/(s^2+2*s+10)/(s+2)
the inverse Laplace transform of the given f(s) is
exp(-t)*cos(3*t)+exp(-2*t)
4. enter the Laplace transform
fs = 1/s
the inverse Laplace transform of the given f(s) is 1
5. enter the Laplace transform
fs = 1/s^3
the inverse Laplace transform of the given f(s) is 1/2*t^2
%This program performs the wave form synthesis of a stair case waveform
f=input('enter the sampling frequency')
T=1/f;
L=input('enter the lower bound for the time axis')
U=input('enter the upper bound for the time axis')
t=L:T:U;
x=zeros(1,length(t));
y=x;
for i=find(t==0):find(t==1)
x(i)=1;
end
x(find(t==1))=0;
for i=find(t==1):find(t==2)
x(i)=2;
end
x(find(t==2))=0;
for i=find(t==2):find(t==3)
x(i)=3;
end
z=find(diff(x)==1);
y(z(1)+1:length(y))=1;
subplot(2,2,1)
plot(t,x,'b')
xlabel('time')
ylabel('amplitude')
title('u(t)+u(t-1)+u(t-2) with f=1000;L=-1;U=3')
%axis([ x-axis(min) x-axis(max) y-axis(min) y-axis(max)])
axis([ -1 4 -0 4])
grid
subplot(2,2,2)
plot(t,y,'r')
xlabel('time')
ylabel('amplitude')
title('The First Constituent Step Function')
grid
axis([ -1 4 0 2])
y=y-y;
y(z(2)+1:length(y))=1;
subplot(2,2,3)
plot(t,y,'r')
xlabel('time')
ylabel('amplitude')
title('The Second Constituent Step Function')
grid
axis([ -1 4 0 2])
y=y-y;
y(z(3)+1:length(y))=1;
subplot(2,2,4)
plot(t,y,'r')
xlabel('time')
ylabel('amplitude')
title('The Third Constituent Step Function')
grid
axis([ -1 4 0 2])
Output:
(ii) x(t)=2u(t)-3u(t-2)+2u(t-4)
f=input('enter the sampling frequency')
T=1/f;
L=input('enter the lower bound for the time axis <0')
U=input('enter the upper bound for the time axis>4')
t=L:T:U;
x=zeros(1,length(t));
y=x;
for i=find(t==0):find(t==2)
x(i)=2;
end
x(find(t==2))=0;
for i=find(t==2):find(t==4)
x(i)=-3;
end
x(find(t==4))=0;
for i=find(t==4):find(t==U)
x(i)=2;
end
z=find(diff(x)==2);
y(z(1)+1:length(y))=2;
subplot(4,1,1)
plot(t,x,'b')
xlabel('time')
ylabel('amplitude')
title('2u(t)-3u(t-2)+2u(t-4) with f=1000,L=-1,U=6')
grid
subplot(4,1,2)
plot(t,y,'r')
xlabel('time')
ylabel('amplitude')
title('The First Constituent Step Function')
grid
y=y-y;
z=find(diff(x)==-5);
y(z(1)+1:length(y))=-5;
subplot(4,1,3)
plot(t,y,'r')
xlabel('time')
ylabel('amplitude')
title('The Second Constituent Step Function')
grid
y=y-y;
z=find(diff(x)==5);
y(z(1)+1:length(y))=5;
subplot(4,1,4)
plot(t,y,'r')
xlabel('time')
ylabel('amplitude')
title('The Third Constituent Step Function',2)
grid
OUTPUT:
enter the sampling frequency1000
f = 1000
enter the lower bound for the time axis <0-1
L = -1
enter the upper bound for the time axis>46
U = 6
CONCLUSION: In this experiment Laplace Transforms of various signals was computed and wave form synthesis was implemented.
OUTCOME: The Student must be able to understand the time domain to frequency domain in s-plan using MATLAB
-
UpdatedMar 03, 2020
-
Views4,422
Sampling theorem verification
Finding the even and odd parts of signal/sequence and real and imaginary parts of signal
Auto correlation and cross correlation between signals and sequences
Genaration of various signals and sequences
Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical reliability and stability properties
Basic operations on Matrices