Professional Documents
Culture Documents
Pcs Lab Report 1 (Fa19bee 075)
Pcs Lab Report 1 (Fa19bee 075)
LAB # 1
Objectives
Required Equipments
Software
MATLAB
Procedure
Fourier series decomposed periodic functions or periodic signals into the sum of a
(possibly infinite) set of simple oscillating functions, namely sine’s and cosines (or
complex exponentials). The study of Fourier series is a branch of Fourier analysis.
In mathematics, the DFT is a specific kind of discrete transform, used in Fourier analysis.
It transforms one function into another, which is called the frequency domain
representation of the original function (which is often a function in the time domain).
The DFT requires an input function that is discrete. Such inputs are often created by
sampling a continuous function, such as a person’s voice. The discrete input function
must also have a limited (finite) duration, such as one period of a periodic sequence or a
windowed segment of a longer sequence.
Evaluate the Fourier series coefficients using:
Plot the magnitude |Dn| (in volts) and phase ∠Dn (in degrees0 of the first twenty-one
coefficients, Let {n = -10,……..0,…….10} versus frequency (in rad/sec).
Approximate g(t) using the first ten components of the Fourier series.
Plot two periods of g(t) directly i.e. by creating a vector of samples of g(t) and plotting
that vector.
Plot an approximation to g(t) using these first twenty-one terms of the exponential
Fourier series.
Tasks
Task
n = [-10:10];
z = n*(pi/4)
Dn = 0.25*exp(-1*z).*sinc 1(z);
magDn=abs(Dn);
argDn=angle(Dn) *(180/pi) ;
w= 0.5*n;
stem(w,magDn),xlabel(' Frequencyinrad/s ec (unitsofpi)')
grid
title('MagnitudeoftheExponentialFourierseriescoefficients')
stem(w,argDn),xlabel(' Frequencyinrad/s ec (unitsofpi)')
ylabel(' degrees' )
grid
title(' Phaseof theExponentialFourierseriescoefficients')
Task
n = [-10:10];
z = n*(pi/4)
Dn = 0.25*exp(-1*z).*sinc 1(z);
nwo=n*(pi/2);
t = [0: 0.01: 8]
BIG = nwo.*t;
g = Dn*exp(i*BIG)
w= 0.5*n;
plot(t, real(g)),
grid
xlabel(' second' )
title('Approximation to g(t) suing the first ten components of the Fourier series')
Task
function[y] = u(x)
y = 0.5+0.5*sign(x)
end
gt= (u(t)-u(t-1)) + (u(t-4) -u(t-5)) + u(t-8);
plot(t, gt),
grid
xlabel(' second' )
title(‘The real g(t)’)
axis ([0.8 -0.2 1.2])
Task
z=fft( g) ;
stem( t , z) ;
z1 =fftshift( z ) ;
n =[1 : 1 :1 2 8 ];
a=n-65;
f =0.5* a;
stem( f, abs ( z1 ) )
Task
Results
Conclusion