Signals and Systems (Lab) Resource Person : Hafiz Muhammad Ijaz

32
Signals and Systems (Lab) Resource Person : Hafiz Muhammad Ijaz COMSATS Institute of Information Technology Lahore Campus

description

Signals and Systems (Lab) Resource Person : Hafiz Muhammad Ijaz - PowerPoint PPT Presentation

Transcript of Signals and Systems (Lab) Resource Person : Hafiz Muhammad Ijaz

Slide 1

Signals and Systems (Lab)

Resource Person : Hafiz Muhammad Ijaz

COMSATS Institute of Information Technology Lahore Campus

EXPERIMENT # 8Fourier Transform and its Properties.

In Previous LabIntroduction to Fourier SeriesComplex Exponential Fourier Series RepresentationTrigonometric Fourier series RepresentationProperties of Fourier seriesLinearityTime ShiftingTime ReversalSignal MultiplicationParsevals Identity

In this LabIntroduction to Fourier TransformHow to compute Fourier Transform and Inverse Fourier Transform using MATLAB?Implementation of Fourier Transform PairsProperties of Fourier TransformLinearityTime ShiftingFrequency ShiftingScaling in Time and FrequencyTime ReversalFourier Transform of the Even and Odd Part of a SignalConvolution in Time and FrequencyParsevals TheoremIntroduction to Fourier TransformThe mathematical expression of Fourier transform is

The mathematical expression of Inverse Fourier transform is

The Fourier transform of a signal is called (frequency) spectrum.

Example:Plot the Fourier transform of the continuous time signal x(t) = cos(t)Solution: syms t wx=cos(t)X=fourier (x,w)w1=[-4:0.05:4]X=subs(X,w,w1)for i=1:length(X) if X(i) == inf X(i) = 1 endendplot(w1,X)legend ('F[cos(t)]')

Example:Plot the Fourier transform of the signal

x(t) = sin(t) / (t)Example: Compute the Fourier transform of the functionSolution:

syms t wx=exp(-t^2); fourier(x) Xf=int(x*exp(-j*w*t),t,-inf,inf) xt=ifourier(Xf,t)

ans =pi^(1/2)/exp(w^2/4)Xf =pi^(1/2)/exp(w^2/4)

xt= 1/exp(t^2)

Fourier Transform PairsVerify the Fourier transform pair

where is a rectangular pulse of duration, given by

Solution:syms t w Tx=heaviside(t+T/2)-heaviside(t-T/2);xx=subs(x,T,4);subplot(2,1,1)ezplot(xx,[ -4 4])legend('x(t)') x1=fourier(x,w) ww=[-10:.1:-.1 .1:.1:10];X=subs(x1,w,ww)X=subs(X,T,4);subplot(2,1,2)plot(ww,X)xlabel('\Omega rad/s')legend('X(\Omega)')

Properties of Fourier TransformTime and Frequency ShiftingTime shifting Property can be written as

Frequency shifting Property is given as

Solutionsyms t wx=cos(t);t0=2;xt0=cos(t-t0);Left=fourier(xt0,w)X=fourier(x,w);Right=exp(-j*w*t0)*X

syms t wx=cos(t);w0=2;Le=exp(j*w0*t)*x;Left=fourier(Le,w)X=fourier(x,w);Right=subs(X,w,w-w0)Scaling in Time and FrequencyScaling in Time domain is given as

Scaling in frequency can be written as

Solutionsyms t wb=3;x=heaviside(t+1)-heaviside(t-1);ezplot(x,[-2 2]);legend('x(t)')

FT of x(t)X=fourier(x,w);ezplot(X,[-40 40]);legend('X(\Omega)')xlabel('\Omega')

Signal x(bt) , b=3xb=subs(x,t,b*t);ezplot(xb, [-2 2]);legend('x(bt), b=3');

FT of x(bt)Xb=fourier(xb,w);ezplot(Xb, [-40 40])legend('F(x(bt))')xlabel('\Omega')

X(bw)

Ri=subs(X,w,w/b);Right=(1/abs(b))*Ri;ezplot(Right,[-40 40]);legend('(1/|b|)*X(\Omega/b)')xlabel('\Omega')

Time ReversalVerify the time reversal property for the signal x(t)=t u(t)

Solutionsyms t wx=t*heaviside(t);X=fourier(x,w) ; Right=subs(X,w,-w) x_t=subs(x,t,-t);Left=fourier(x_t,w)

Right =- 1/w^2 - pi*i*dirac(w, 1) Left =- 1/w^2 + pi*i*dirac(-w, 1)DualitySatisfy the Duality property for the signal mentioned below.

Solutionsyms t wx=exp(-t)*heaviside(t);X=fourier(x)Xt=subs(X,w,t)Left=fourier(Xt) x_w=subs(x,t,-w);Right=2*pi*x_wLeft =2*pi*heaviside(-w)*exp(w) Right =2*pi*heaviside(-w)*exp(w)Differentiation in Time and FrequencyFor the signal x(t)

Differentiation in time domain is given as

Differentiation in Frequency domain can be written as

Solutionsyms t wx=exp(-3*t)*heaviside(t);der=diff(x,t); Left=fourier(der,w) X=fourier(x,w);Right=j*w*X Left=fourier(t*x,w) der=diff(X,w);Right=j*derLeft =1 - 3/(i*w + 3)

Right =(i*w)/(i*w + 3)

Left =1/(i*w + 3)^2 Right =1/(i*w + 3)^2IntegrationFor a given signal x(t)

Integration property can be written as

Satisfy the integration property for

Solutionsyms t r wx=exp(r)*heaviside(-r)+exp(-r)*heaviside(r);integ=int(x,r,-inf,t);Left=fourier(integ,w) X=fourier(x,w);X0=subs(X,w,0);Right=(1/(j*w))*X+pi*X0*dirac(w)

Left = 2*pi*dirac(w) + ((1/(- 1 + w*i) - 1/(1 + w*i))*i)/w

Right = 2*pi*dirac(w) + ((1/(- 1 + w*i) - 1/(1 + w*i))*i)/w

Convolution in Time and Frequency

Solutionsyms t wx=exp(-t^2); Et=int((abs(x))^2,t,-inf,inf) ; eval(Et) X=fourier(x,w); Ew=(1/(2*pi))*int((abs(X))^2,w,-inf,inf);eval(Ew)

ans =1.2533

ans =1.2533

Parsevals TheoremParsvels Identity can be written as

Satisfy the Parsvels Identity using input signal