0% found this document useful (0 votes)
97 views

Experiment 8

The document describes an experiment to construct a continuous time periodic signal from its Fourier series representation in MATLAB. It provides the theory behind Fourier series representation of periodic signals. The experiment involves defining the Fourier coefficients and using them to generate the component signals. These component signals are then summed to reconstruct the original signal. Plots of the component and reconstructed signals are included to verify the results. The experiment code uses two different approaches - explicitly defining the coefficients and using a for loop.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views

Experiment 8

The document describes an experiment to construct a continuous time periodic signal from its Fourier series representation in MATLAB. It provides the theory behind Fourier series representation of periodic signals. The experiment involves defining the Fourier coefficients and using them to generate the component signals. These component signals are then summed to reconstruct the original signal. Plots of the component and reconstructed signals are included to verify the results. The experiment code uses two different approaches - explicitly defining the coefficients and using a for loop.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Experiment 8

Aim:

To find the Continuous Time Periodic Signals from its Fourier Series Representation

Equipment: MATLAB software 7.0 and above


Theory:
A periodic signal with a fundamental period of T can be expressed as a linear combination of a set
of harmonically related complex exponentials (exponentials with a common period of T) as follows:
+

x (t )

k=

k (t)= a k e jkt = ak e
k=

jkt
Where k (t )=e =e

jk

(2T )t

jk

( 2T )t=

k=

ak e jk (2 F ) t

k =

are all periodic with a period of T. The representation of a periodic

signal in this way is referred to as Fourier series representation. The weights


are referred as Fourier series coefficients. Given a periodic function

ak

, in this representation

x ( t ) , it is possible determine its

Fourier series coefficients through the following integral.


jk

ak = x ( t ) e jkt dt = x (t)e
T

( 2T )t

dt= x (t) e j (2 F) t dt
T

This integral can be done over any time interval of length T, the period of the signal

x (t ).

Prog 1:
%Construct the continuous time periodic signal whose Fourier coefficients are
1
1
1
a0 =1, a1=a1 = , a2=a2 = , a3=a2=
%
4
2
3
>>t=-3:0.01:3;
>>x0=1;
>>x1=(1/4)*exp(j*(-1)*2*pi*t)+(1/4)*exp(j*(1)*2*pi*t);
>>y1=x0+x1;
>>x2=(1/2)*exp(j*(-2)*2*pi*t)+(1/2)*exp(j*(2)*2*pi*t);
>>y2=y1+x2;
>>x3=(1/3)*exp(j*(-3)*2*pi*t)+(1/3)*exp(j*(3)*2*pi*t);
>>x=x0+x1+x2+x3;

>>subplot(3,2,1);plot(t,x1)
>>axis([-3 3 -2 2]);title('x1(t)')
>>subplot(3,2,2);plot(t,y1)
>>axis([-3 3 -0.2 2]);title('x0(t)+x1(t)')
>>subplot(3,2,3);plot(t,x2)
>>axis([-3 3 -2 2]);title('x2(t)')
>>subplot(3,2,4);plot(t,y2)
1

% (Simulated) continuous time axis.


% Component for k=0 (average value).
% First harmonic components for k=-1 and k=1.
% Sum of mean and first components.
% Second harmonic components for k=-2 and
%k=2.
% Sum of all components up to 2nd order
% Third harmonic components for k=-3 and k=3
% Our signal, which is the sum of all components
% We now can use subplot commands to see
%harmonic components and reconstruction
% stages of our signal
% Choose the first part to plot x1(t)
%Choose the second part to plot %y1(t)=x0(t)
+x1(t)
% We go on to plot x2(t) and x3(t) and x(t)

>>axis([-3 3 -1 3]);title('x0(t)+x1(t)+x2(t)')
>>subplot(3,2,5);plot(t,x3);xlabel('t')
>>axis([-3 3 -1 1]);title('x3(t)')
>>subplot(3,2,6);plot(t,x);xlabel('t')
>>axis([-3 3 -1 4]);title('x(t)=x0(t)+x1(t)+x2(t)+x3(t)')
% Try the program by changing the values of the coefficients symmetrically and asymmetrically.
Prog 2:
% Construct the continuous time periodic signal from the Fourier coefficients using for loop
>>k1=input('The leftmost and right most index k respectively for the Fourier coefficients\n') % index k
>>k=k1(1):k1(2);
>>ak=input('The coefficients from left to right\n')
% coefficients
>>t=-3:0.01:3;
% (Simulated) continuous time axis
>>x = zeros(1,length(t));
% Initialization of the vector to hold our signal
>>for k=k(1):k(2)
% Construction of the signal from using Fourier series
>>x=x+ak(k-k1(1)+1)*exp(j*k*2*pi*t);
>>end
>>x=real(x);
% X = real(Z) returns the real part of the elements of the complex array Z.
>>plot(t,x)
Result:

Plot the output figures of the program (Attach the printed figures).

Conclusion:
In this experiment we have constructed the continuous time periodic signal from its Fourier series
co-efficient.
References:
1. Signals and Systems using Matlab
2. Signals and Systems with MATLAB Computing Steven
and Simulink Modeling
4. Signals & system 4th Ed.

Luis F. Chaparro
T. Karris
P. Ramesh Babu
R. Anandanatarajan

You might also like