Você está na página 1de 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

Você também pode gostar