Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

UNIVERSIDAD DE LAS FUERZAS ARMADAS ESPE

SIGNAL AND SYSTEMS


Fausto Granda G.

Sangolquí - Ecuador
Signal and Systems

Fourier Series representation of


Periodical signals.

References

• Oppenheim, A. Willsky, and H. Nawab, Signals and Systems, 2ª edición, 1997, Prentice Hall, ISBN # 0-13-814757-4.
• Hwei P. Hsu, “Signals and Systems”, 2nd Edition, McGrawHill Schaum Outlines, ISBN: 978-0-07-163473-1, 2011.
• Chaparro Luis, “Signal and Systems using Matlab”, Elsevier, Oxford UK, ISBN 978-0-12-374716-7 , 2011
Fourier Series

• The response of an LTI system to any input consisting of a linear combination


of basic signals is the same linear combination of the individual responses to
each of the basic signals. We have 2 options for analysis:

• Option 1 (convolution): These responses were all shifted versions of the unit
impulse response, leading to the convolution sum or integral.

• Option 2 (complex exponentials): the response of an LTI system to a


complex exponential also has a particularly simple form, which then provides
us with another convenient representation for LTI systems. The resulting
representations are known as the continuous-time and discrete-time
Fourier series and transform.
Fourier Series
• If the input to an LTI system is expressed as a linear combination of periodic
complex exponentials, the output can also be expressed in this form, with
coefficients that are related in a straightforward way to those of the input.

• The physical motivation for Fourier's work was the phenomenon of heat
propagation and diffusion. By 1807, Fourier had found series of harmonically
related sinusoids to be useful in representing the temperature distribution
through a body. In addition, he claimed that "any" periodic signal could be
represented by such a series.

Waves in the ocean


consist of the linear
combination of sinusoidal
waves with different spatial
periods or wavelengths.
Fourier Series-The response of LTI systems to complex exponentials

It is advantageous in the study of LTI systems to represent signals as linear


combinations of basic signals that possess the following two properties:

1. The set of basic signals can be used to construct a broad and useful
class of signals.

• 2. The response of an LTI system to each signal should be simple to


provide us with a representation for the response of the system to any signal
constructed as a linear combination of the basic signals.
Fourier Series-The response of LTI systems to complex exponentials

Very important for the study of LTI systems: the response of an LTI
system to a complex exponential input is the same complex exponential with
only a change in amplitude; that is:

where the complex amplitude factor H(s) or H( z) will in general be a function of


the complex variable s or z.

A signal for which the system output is a (possibly complex) constant times the
input is referred to as an eigenfunction of the system, and the amplitude factor
is referred to as the system's eigenvalue.
Fourier Series-The response of LTI systems to complex exponentials
For both continuous time and discrete time, if the input to an LTI system is
represented as a linear combination of complex exponentials, then the output
can also be represented as a linear combination of the same complex
exponential signals.

INPUT OUTPUT
Fourier series representation of continuous-time periodic signals

Periodic signal

Fundamental period

Basic periodic signals

harmonically related
complex exponentials

Linear combination of
harmonically related
complex exponentials
Fourier series representation of continuous-time periodic signals

Fourier series
representation
Fourier series representation of continuous-time periodic signals

Reference 1 Reference 2

Synthesis
equation

Analysis
equation

Complex
Fourier series representation of continuous-time periodic signals
Trigonometric Fourier Series:

https://falstad.com/fourier/
Trigonometric Fourier Series:

https://www.mathsisfun.com/calculus/fourier-series.html
Fourier series representation of continuous-time periodic signals
Trigonometric Fourier Series: even and odd signals

If a periodic signal x(t) is even, then bk= 0 and its Fourier series contains only
cosine terms:

If a periodic signal x(t) is odd, then ak= 0 and its Fourier series contains only sine
terms:
Fourier series -Examples
Given f(x) find its Fourier Series terms: ao, an, bn.
f 𝒙 = 𝒙2 + 𝒙 + 3 , −𝜋 ≤ 𝑥 ≤ 𝜋
Fourier series -Examples
Given x(t) find its Fourier Series terms: ao, an, bn. 𝑨𝑷𝑶𝑹𝑻𝑬:

𝒇 𝒙 = 𝒙2 + 𝒙 + 3 , −𝜋 ≤ 𝑥 ≤ 𝜋
∞ ∞
𝜋2 4 𝑛
2 𝑛+1
𝑓 𝑥 = + 3 + ෍ 2 −1 ∗ cos(𝑛𝑥) + ෍ −1 ∗ sin(𝑛𝑥)
3 𝑛 𝑛
𝑛=1 𝑛=1

For n=1
Plot[[//math:t^2+t+3//],FourierTrig
Series[[//math:t^2+t+3//],t,[//mat
h:1//]],{t,-pi,pi}]

For n=5
Plot[[//math:t^2+t+3//],FourierTrig
Series[[//math:t^2+t+3//],t,[//mat
h:5//]],{t,-pi,pi}]
Fourier series -Examples
Given f(x) find its Fourier Series terms: ao, an, bn.

𝒇 𝒙 = 𝒙2 + 𝒙 + 3 , −𝜋 ≤ 𝑥 ≤ 𝜋

WOLFRAM
x^2+x+3 for x=-pi to pi Fourierseries[x^2+x+3,x,1] Fourierseries[x^2+x+3,x,5] Fourierseries[x^2+x+3,x,10]
Fourier Series-Exercises
Given f(t) find its Fourier Series terms: ao, an, bn.

(2/pi)*[[integrate (pi/2) from x=0 to pi/2]+ [integrate (pi-x) from x=pi/2 to pi]]

(2/pi)*[[integrate (pi/2)*cos(n*2*x) from x=0 to pi/2]+ [integrate (pi-x)*cos(n*2*x) from x=pi/2 to pi]]

(2/pi)*[[integrate (pi/2)*sin(n*2*x) from x=0 to pi/2]+ [integrate (pi-x)*sin(n*2*x)


from x=pi/2 to pi]]

3*pi/8+sum { [1/(2*pi*i^2)*((-1)^i-1)*cos(2*i*t)] + [ (1/(2*i))*sin(2*i*t)] }, i=1 to 10


Fourier Series-Exercises
Given f(t) find its Fourier Series terms: ao, an, bn.

3*pi/8+sum { [1/(2*pi*i^2)*((-1)^i-1)*cos(2*i*t)] + [ (1/(2*i))*sin(2*i*t)] }, i=1 to 10


𝜋 𝜋
𝜋
2 2𝜋 න (𝜋 − 𝑡) cos 2𝑛 𝑡 𝑑𝑡 =
𝑎𝑛 = න cos 2𝑛 𝑡 𝑑𝑡 + න (𝜋 − 𝑡) cos 2𝑛 𝑡 𝑑𝑡 𝜋
𝜋 0 2 𝜋 2
2
𝜋−𝑡 cos 2𝑛 𝑡
2 𝜋 𝜋
𝜋 − 𝑡 sin 2𝑛 𝑡 𝑐𝑜𝑠 2𝑛 𝑡
𝜋 +
2 sin 2𝑛𝑡
𝑎𝑛 = sin 2𝑛 𝑡 0 + −
𝜋 4𝑛 2𝑛 2𝑛 2 𝜋 −1
2 - 2𝑛
𝜋 cos 2𝑛𝑡
2 𝜋 𝜋− 0−0 1 − −1 𝑛
0 −
𝑎𝑛 = 0−0 + 2 − (2𝑛)2
𝜋 4𝑛 2𝑛 2𝑛 2
2 −1 𝑛 − 1 −1 𝑛 − 1 𝜋
𝑎𝑛 = = න (𝜋 − 𝑡) sin 2𝑛 𝑡 𝑑𝑡 =
𝜋 2𝑛 2 2𝜋 𝑛 2 𝜋
2
𝜋
𝜋
2 2𝜋 𝜋−𝑡 sin 2𝑛 𝑡
𝑏𝑛 = න sin 2𝑛 𝑡 𝑑𝑡 + න (𝜋 − 𝑡) sin 2𝑛𝑡 𝑑𝑡
𝜋 0 2 𝜋 +
2 cos 2𝑛𝑡
−1 −
𝜋 𝜋 2𝑛
2 𝜋 2
𝜋 − 𝑡 cos 2𝑛 𝑡 𝑠𝑖𝑛 2𝑛 𝑡
𝑏𝑛 = − cos 2𝑛 𝑡 + − −
𝜋 4𝑛 0 2𝑛 2𝑛 2 𝜋 −
2
𝜋 𝑛
cos 2𝜋𝑘 = 1 2 𝜋 −1 −2 (0 − 0)
cos 𝜋𝑘 = −1 𝑛 𝑏𝑛 = − −1 𝑛 − 1 − 2 −
𝜋 4𝑛 2𝑛 2𝑛 2
𝑨𝑷𝑶𝑹𝑻𝑬: 𝑨𝑳𝑬𝑿 𝑺𝑶𝑻𝑶
2 𝜋 𝑛
𝜋 −1 𝑛 − 2 𝟐 𝝅
𝑏𝑛 = − −1 −1 − = ∗
𝜋 4𝑛 4𝑛 𝝅 𝟒𝒏
1
𝑏𝑛 =
𝜋
𝜋
2𝑛
2 2𝜋 3𝜋 ∞
𝑎𝑜 = න 𝑑𝑡 + න (𝜋 − 𝑡)𝑑𝑡 =
𝜋 0 2 𝜋 4 3𝜋 −1 𝑛 − 1 1
2 𝑓 𝑡 = +෎ cos 2𝑛 𝑡 + sin(2𝑛 𝑡 )
8 2𝜋𝑛2 2𝑛
𝑛=1
Fourier Series-Exercises
1) Piecewise[{{pi/2,0<t<pi/2},{pi-t,pi/2<t<pi}}]
2) FourierSeries[Piecewise[{{pi/2,0<t<pi/2},{pi-t,pi/2<t<pi}}],t,2]
3) FourierSeries[Piecewise[{{pi/2,0<t<pi/2},{pi-t,pi/2<t<pi}}],t,6]

1) 2) 3)
Fourier Series-Exercises
1) Piecewise[{{pi/2,0<t<pi/2},{pi-t,pi/2<t<pi}}]
2) Plot[FourierTrigSeries[[//math:Piecewise[{{pi/2,0<t<pi/2},{pi-t,pi/2<t<pi}}]//],t,[//math:16//]],{t,-pi,pi}]
3) FourierTrigSeries[[//math:Piecewise[{{pi/2,0<t<pi/2},{pi-t,pi/2<t<pi}}]//],t,[//math:12//]],{t,-pi,pi}]

More code, easy


plot[FourierTrigSeries[Piecewise[{{pi/2,0≤t<pi/2},{pi-t,pi/2≤t≤pi}}],t,10]]
FourierTrigSeries[Piecewise[{{pi/2,0≤t<pi/2},{pi-t,pi/2≤t≤pi}}],t,12]

1) 2) 3)
𝑨𝒑𝒐𝒓𝒕𝒆: 𝑫𝒂𝒏𝒊𝒆𝒍𝒂 𝑨𝒍𝒗𝒂𝒓𝒆𝒛
Fourier Series-Exercises
syms t k P n;
assume(k,'Integer')
a = @(f,t,k,P) int(f*cos(k*pi*t/P),t,-P,P)/P;
b = @(f,t,k,P) int(f*sin(k*pi*t/P),t,-P,P)/P;
fs=@(f,t,n,P)
a(f,t,0,P)/2+symsum(a(f,t,k,P)*cos(k*pi*t/P)+b(f,t,k,P)*sin(k*pi*t/P),k,1,n);

%Funcion
f=pi/2*(heaviside(t)-heaviside(t-pi/2))+(heaviside(t-pi/2)-heaviside(t-pi))*(pi-t);
P=pi;

N=6; %términos del desarrollo en serie


pretty(fs(f,t,N,P))
hold on
ezplot(f,[-P P])
hg=ezplot(fs(f,t,N,P),[-P P]);
set(hg,'color','r')
set(gca,'XTick',-pi:pi/2:pi)
set(gca,'XTickLabel',{'-\pi','-\pi/2','0','\pi/2','\pi'})
set(gca,'YTick',0:pi/2:pi)
set(gca,'YTickLabel',{'0','\pi/2','\pi'})
hold off
grid on
xlabel('t')
ylabel('f(t)')
title('Serie de Fourier')
𝑨𝒑𝒐𝒓𝒕𝒆: 𝑫𝒂𝒏𝒊𝒆𝒍𝒂 𝑨𝒍𝒗𝒂𝒓𝒆𝒛
Fourier Series-Exercises

%armónicos
figure
k=1:N;
ak=a(f,t,k,P)
pretty(a(f,t,k,P))
bk=b(f,t,k,P)
pretty(b(f,t,k,P))
subplot(2,1,1)

stem(ak)
xlabel('k');
ylabel('a(k)')

subplot(2,1,2)
stem(bk)
xlabel('k');
ylabel('b(k)')
𝑨𝒑𝒐𝒓𝒕𝒆: 𝑫𝒂𝒏𝒊𝒆𝒍𝒂 𝑨𝒍𝒗𝒂𝒓𝒆𝒛
Fourier Series-Exercises
clear , clf, clc, close all
syms x n
%f=input('ingrese las funciones entre corchetes []
separadas por espacios');
%p=input('ingrese los puntos en que estan evaluadas las
funciones entre corchetes [] separadas por espacios'); COEFICIENTES
f=[3*pi/2];%funciones
p=[0 pi/2];%intervalos
f=sym(f);
a0=0;
for i=1:length(f)
a0=a0+int(f(i),'x',p(i),p(i+1));
end
disp('coeficiente A0:')
a0=(a0/pi);
pretty(a0)
an=0;
for i=1:length(f)
an=an+int(f(i)*cos(n*x),'x',p(i),p(i+1));
end
disp('coeficiente An:')
an=(an/pi)
an=subs(an,{cos(pi*n),sin(pi*n)},{(-1)^n,0});
pretty(an)
bn=0;
for i=1:length(f)
bn=bn+int(f(i)*sin(n*x),'x',p(i),p(i+1));
end
disp('coeficiente Bn:')
bn=(bn/pi);
bn=subs(bn,{cos(pi*n),sin(pi*n)},{(-1)^n,0});
pretty(bn)
𝑎𝑛

2/pi *( integrate (pi/2)(SIN(2kt)) from 0to pi /2+ integrate (pi-t)(sin(2kt)) from pi/2 to pi)

𝑨𝑷𝑶𝑹𝑻𝑬: 𝑨𝑳𝑬𝑿 𝑺𝑶𝑻𝑶

𝑏𝑛

2/pi *( integrate (pi/2)(cos(2kt)) from 0to pi /2+ integrate (pi-t)(cos(2kt)) from pi/2 to pi)
Fourier Series-Exercises
Given f(t) find its Fourier Series terms: ao, an, bn.
Fourier Series-Exercises
Given f(t) find its Fourier Series terms: ao, an, bn.

(1/a)* ( integrate (b/a*x+b)*cos(pi*n*x/a) dx from (1/a)* ( integrate (b/a*x+b)*sin(pi*n*x/a) dx from x=-


x=-a to 0 + integrate (-b/a*x+b)*cos(pi*n*x/a) dx a to 0 + integrate (-b/a*x+b)*sin(pi*n*x/a) dx from
from x=0 to a ) x=0 to a )

(1/a)* ( integrate (b/a*x+b) dx from x=-a to 0 + integrate


(-b/a*x+b) dx from x=0 to a )
Fourier Series-Exercises
Given f(t) find its Fourier Series terms: ao, an, bn.

B=5
-pi <A < pi ,

WOLFRAM 5/2+2*5*sum[((1-(-1)^n)/(pi^2*n^2))*cos(pi*n*t/pi),{n,1,5}]
CONVERGENCE OF THE FOURIER SERIES

According Fourier: any periodic signal could be represented by a Fourier


series. Although this is not quite true, it is true that Fourier series can be used
to represent an extremely large class of periodic signals.

In some cases, the analysis equation may diverge; that is, the value obtained
for some of the coefficients ak may be infinite.

Moreover, even if all of the coefficients of the Fourier Series are finite, when
these coefficients are substituted into the synthesis equation the resulting
infinite series may not converge to the original signal x(t).
DIRCHILET CONDITIONS

A set of conditions, developed by P. L. Dirichlet, guarantees that x(t) equals


its Fourier series representation, except at isolated values of t for which x(t) is
discontinuous. The Dirichlet conditions are as follows:

Condition 1. Over any period, x(t) must be absolutely integrable; that is


DIRCHILET CONDITIONS

A set of conditions, developed by P. L. Dirichlet, guarantees that x(t) equals


its Fourier series representation, except at isolated values of t for which x(t) is
discontinuous. The Dirichlet conditions are as follows:

Condition 2. there are no more than a finite number of maxima and minima
during any single period of the signal.

Condition 1: ok

Condition 2: violates the


second Dirichlet condition
DIRCHILET CONDITIONS

A set of conditions, developed by P. L. Dirichlet, guarantees that x(t) equals


its Fourier series representation, except at isolated values of t for which x(t) is
discontinuous. The Dirichlet conditions are as follows:

Condition 3. In any finite interval of time, there are only a finite number of
discontinuities. Furthermore, each of these discontinuities is finite.

Condition 1: ?

Condition 2: ?

Condition 3: violates the


third Dirichlet condition
Power Content of a Periodic Signal:

Parseval's identity (or Parseval's theorem) for the Fourier series.


Fourier Series-Exercises

Individual work:

1) Find the Analysis


equations
2) Find the sinthesys
equation
3) Plot the f(t) and
compare with the
fourier series, for n=2,
n=5, n=8

plot(2*sum[(1-(-
1)^n)/(pi*n)*sin(pi*n*t
/2),{n,1,5}],{t,0,10})

To plot some
segments of the
summation
Fourier Series- References

Fourier harmonics in LTSPICE: https://www.youtube.com/watch?v=93yJHKGV7bM


Interesting link with instructions how to understand the Fourier harmonics in LTPICE.

You might also like