Sunteți pe pagina 1din 22

SIGNALS AND SYSTEMS USING MATLAB

Chapter 4 Frequency Analysis: The Fourier Series


Luis F. Chaparro

Eigenfunctions
x(t) = e j0t , < t < , input to a causal and stable LTI system
j0 t
steady state
output
y
(t)
=
e
H(j0)
Z
H(j0) =
h( )e j0 d = H(s)|s=j0
0

frequency response at 0
x(t) = e j0t is eigenfunction of LTI system
Example: RC circuit, voltage source be vs (t) = 4 cos(t + /4), R = 1 ,
C = 1F
Vc (s)
1
transfer function H(s) =
=
Vs (s) s + 1

2
H(j1) =
/4 frequency response at0 = 1
2

steady-state output vc (t) = 4|H(j1)| cos(t + /4 + H(j1)) = 2 2 cos(t)

2 / 22

Example: Lowpass filter using RC circuit


Input vs (t) = 1 + cos(10, 000t) to series RC circuit (R = C = 1)
dvc (t)
dt
jt
if input vs (t) = e output vc (t) = e jt H(j), then in o.d.e.
vs (t) = vc (t) +

e jt = e jt H(j)(1 + j) H(j) =

1
1
=
1 + j
1 + 2

vs (t) = cos(0t) + cos(10, 000t)


1
cos(10, 000t /2) 1
vc (t) 1 +
10, 000
attenuates higher frequency component (i.e., low-pass filter)

3 / 22

Complex exponential Fourier series


Fourier Series of periodic signal x(t), of fundamental period T0, is infinite sum of
orthonormal complex exponentials of frequencies multiples of fundamental
frequency 0 = 2/T0 (rad/sec) of x(t):
x(t) =

Xk e jk0t

k=

1
FS coefficients Xk =
T0

t0 +T0

x(t)e jk0t dt

t0

{e jk0t } are ortho-normal Fourier basis


Z t0+T0
Z t0+T0
1
1
e jk0t [e j`0t ]dt =
e j(k`)0t dt
T0 t0
T
0 t0
0 k 6= ` orthogonal
=
1 k = ` normal

4 / 22

Line spectrum

Parsevals power relation


Px : power of periodic signal x(t) of fundamental periodT0
Z t0 +T0

X
1
2
|Xk |2 ,
for any t0
|x(t)| dt =
Px =
T0 t0
k=

Periodic x(t) is represented in frequency by

Magnitude line spectrum |Xk | vs k0


Phase line spectrum Xk vs k0
Power line spectrum |Xk |2 vs k0
Real-valued periodic signal x(t), of fundamental period T0 ,

Xk = Xk
or equivalently
(i) |Xk | = |Xk |, i.e., magnitude |Xk | is even function of k0 .
(ii) Xk = Xk , i.e., phase Xk is odd function of k0

5 / 22

Trigonometric Fourier series

Real-valued, periodic signal x(t), of fundamental period T0,


x(t) =

X0
|{z}

+2

dccomponent

X
k=1

|Xk | cos(k0 t + k )
|
{z
}
k th harmonic

[ck cos(k0 t) + dk sin(k0 t)]

= c0 + 2

0 =

k=1

2
T0

Fourier coefficients {ck , dk }


ck
dk

Z t0 +T0
1
=
x(t) cos(k0 t) dt
T0 t0
Z t0 +T0
1
=
x(t) sin(k0 t) dt
T0 t0

k = 0, 1,
k = 1, 2,

Sinusoidal basis functions { 2 cos(k0t), 2 sin(k0t)}, k = 0, 1, , are


orthonormal in [0, T0]

6 / 22

Example: x(t) = B + A cos(0t + ) periodic of fundamental period T0


trigonometric Fourier series: X0 = B; |X1 | = A/2, X1 =
exponential Fourier series:
i
A h j(0 t+)
j(0 t+)
x(t) = B +
e
+e
2
Ae j
Ae j

X0 = B, X1 =
, X1 = X1 =
2
2
|Yk |

|Xk |
B

A
2

A
2

A
2
k0

Xk

A
2
k0

0
Yk

k0
0

k0

Line spectrum of x(t) = B + A cos(0 t) and of y (t) = B + A sin(0 t) (right).

7 / 22

Fourier coefficients from Laplace

x(t), periodic of fundamental period T0


period: x1(t) = x(t)[u(t t0) u(t t0 T0)], any t0
2
1
(fundamental frequency), k = 0, 1,
Xk = L [x1(t)]s=jk0 0 =
T0
T0
Example: x(t) periodic, T0 = 2, x1(t) = u(t) u(t 1)
x(t) =

m=

x1(t 2m) =

k=
jk

1
1e
Xk = L [x1(t)]s=jk =
2
jk

8 / 22

Xk e jkt
= e jk/2

sin(k/2)
k/2

Reflection and even and odd periodic signals


x(t) periodic of fundamental period T0, Fourier coefficients {Xk }
Reflection: Fourier coefficients of x(t) are {Xk }
Even x(t): {Xk } are real
x(t) = X0 + 2

Xk cos(k0t)

k=1

Odd x(t): {Xk } are imaginary


x(t) = 2

jXk sin(k0t)

k=1

Any periodic signal x(t) then x(t) = xe (t) + xo (t), xe (t) and xo (t) even and odd

components

Xk = Xek + Xok
Xek = 0.5[Xk + Xk ]
Xok = 0.5[Xk Xk ]

9 / 22

Example: periodic pulse train x(t), of fundamental period T0 = 1


x(t)
2

1.25 0.75

0.25

0.25

0.75

1.25

T0 = 1

Integral formula:

Laplace transform:

Fourier series:

1
Xk =
T0

1
X0 =
T0

3T0 /4

x(t)e j0 kt dt =

T0 /4
3T0 /4

1/4

x(t)dt =
T0 /4

sin(k/2)
, k 6= 0
(k/2)

2dt = 1
1/4

x1 (t 0.25) = 2[u(t) u(t 0.5)], X1 (s) = 2(e 0.25s e 0.25s )


sin(k/2)
1
Xk = L [x1 (t)] |s=jk0 =
k 6= 0
T0
k/2

X
sin(k/2) jk2t
x(t) =
e
(k/2)
k=

10 / 22

period of x(t)

real X(k)
1

2
1.5

0.5
Xk

0.5
0
0

0.2

0.4

0.6

0.8

0.5

100

50

100

phase line spectrum

0.8

2
1

0.6

Xk

|Xk|

magnitude line spectrum

0
50
k0 (rad/sec)

0.4

0
1

0.2

3
100

50

0
50
k0 (rad/sec)

100

100

50

0
50
k0 (rad/sec)

100

Top: period of x(t) and real Xk vs k0 ; bottom magnitude and phase line spectra

11 / 22

Example: Non-symmetric periodic signals


x(t)

1
2

y(t)

z(t) = x(t + 0.5), even, period: z1 (t) = 2[u(t + 0.5) u(t 0.5)]
2
Z1 (s) = [e 0.5s e 0.5s ]
s
1 2 jk/2
sin(0.5k)
Zk =
[e
e jk/2 ] =
realvalued
2 jk
0.5k
i
X
Xh
jk0 (t0.5)
jk/2
x(t) = z(t 0.5) =
Zk e
=
Zk e
e jkt
{z }
k
k |
Xk

Xk complex since x(t) neither even nor odd

12 / 22

Even and odd components of the period of y (t), 1 t 1


y1e (t)

y1o (t)

2
1

y1e (t) = [u(t + 1) u(t 1)] + [r (t + 1) 2r (t) + r (t 1)]


|
{z
} |
{z
}
rectangular pulse
triangular pulse
y1o (t) = [r (t + 1) r (t 1) 2u(t 1)] [u(t + 1) u(t 1)]
|
{z
} |
{z
}
triangular pulse
rectangular pulse
1
1 (1)k
Yek =
Y1e (s) |s=jk0 =
k 6= 0, Ye0 = 1.5
T0
(k)2
1
(1)k
Yok =
Y1o (s) |s=jk0 = j
k 6= 0, Yo0 = 0
T
k
0

Ye0 + Yo0 = 1.5 + 0 = 1.5
k=0
Yk =
Yek + Yok = (1 (1)k )/(k)2 + j(1)k /(k) k 6= 0

13 / 22

Example: Integration

Z
y (t) =

x(t)dt

x(t)

0.5

y(t) =

x(t)dt

Integral does not exist if the dc is not zero


Period

Period
0.5

0.5

0.4

0.3

y(t)

x(t)

0.5

0.1

1
0

0.5

1.5

0.5

1
t

1.5

0.4

0.3

0.2
0.1
0
0

0
1

20

40

60

2
0

<Yk

0.3

|Yk|

0.4

<Xk

|Xk|

0.2

0.2
0.1

20

40

60

0
0

14 / 22

2
1

20

40

60

0
0

20

40

60

Convergence of Fourier series


For Fourier series of x(t) to converge, it should:
be absolutely integrable,
have a finite number of maxima, minima and discontinuities.
FS equals x(t) at every continuity point and 0.5[x(t + 0+) + x(t + 0)] at every
discontinuity point
Example: Approximate train of pulses with x2(t) = + cos(0t) by
Minimize

Z
1
E2 =
|x(t) x2 (t)|2 dt, w.r.t. ,
T0 T0
Z
dE2
1
=
2[x(t) ]dt = 0
d
T0 T0
Z
dE2
1
=
2[x(t) cos(0 t) cos2 (0 t)]dt = 0
d
T
Z 0 T0
1
=
x(t)dt,
T0 T0
Z
2
=
x(t) cos(0 t)dt
T0 T0

15 / 22

Time and frequency shifting

Periodic signal x(t)


Time-shifting: x(t0 ) remains periodic of the same fundamental period
x(t) {Xk } x(t t0) Xk e jk0t0 = |Xk |e j(Xk k0t0)
only change in phase
Frequency-shifting:
x(t)e j1 t is periodic of fundamental period T0 if 1 = M0 , for an integer M 1,
for 1 = M0 , M 1, the Fourier coefficients Xk are shifted to frequencies
k0 + 1 = (k + M)0
the modulated signal is real-valued by multiplying x(t) by cos(1 t).

16 / 22

Example: Modulating cos(20t) with


a periodic train of square pulses

x1(t) = 0.5[1 + sign(sin(t))] =
with a sinusoid

1 sin(t) 0
0 sin(t) < 0

x2(t) = sin(t).

0.5

0.5
x2(t)

x1(t)

0.5

0.5

2
t

2
t

0.2
|X2k|

|X1k|

0.2
0.1
0
0

50

100

150

0.1
0
0

50

100

150

Modulated square-wave x1 (t) cos(20t) (left) and modulated cosine x2 (t) cos(20t)

17 / 22

Response of LTI systems to periodic signals

Periodic input x(t) of causal and stable LTI system, with impulse response h(t), by
eigenfunction property of LTI systems

Fourier series x(t) = X0 + 2

X
k=1

yss (t) = X0|H(j0)| + 2

X
k=1

|Xk | cos(k0t + Xk )

0 =

2
T0

|Xk ||H(jk0)| cos(k0t + Xk + H(jk0))

where H(jk0) = |H(jk0)|e jH(jk0)H(s)|s=jk0


frequency response of the system at k0

18 / 22

Example: Lowpass filtering using RC circuit with


1
1 + s/100
sin(k/2) j2kt
e
k/2

transfer function H(s) =


input x(t) =

|Ha(j)|

k=,6=0

y(t)
x(t)

0.5

0.4

0.5

0.3
0.2

20

40

60

80

100

0.1
x(t), y(t)

0
0

0
0.1

<H(j )

0.2
0.3

0.5
0.4
0.5

1
0

20

40

60
(rad/sec)

80

100

0.2

0.4

0.6

0.8

1
t (sec)

1.2

1.4

1.6

1.8

Left: magnitude and phase response of the low-pass RC filter at harmonic frequencies. Right: response
due to the train of pulses x(t). Actual signal values are given by the dashed line, and the filtered signal
is indicated by the continuous line

19 / 22

Derivatives and integrals of Periodic Signals

Derivative:

Derivative dx(t)/dt of periodic signal x(t) is periodic of the same


fundamental period. If {Xk } are the coefficients of the Fourier series of x(t), the
Fourier coefficients of dx(t)/dt are
jk0Xk ,

0 fundamental frequency ofx(t)

Integral: Zero-mean, periodic signal y (t) with Fourier coefficients {Yk },

integral z(t) =

y ( )d

Yk
k integer 6= 0
jk0
X
2
1
0 = .
Z0 =
Ym
jm0
T0

Zk =

m6=0

20 / 22

Example: Derivative
period of x(t) : x1 (t) = 2r (t) 4r (t 0.5) + 2r (t 1), 0 t 1, T0 = 1
dx(t)
Gk
g (t) =
k 6= 0
Xk =
dt
jk0
period of g (t) : g1 (t) = dx1 (t)/dt = 2u(t) 4u(t 0.5) + 2u(t 1)
(1)(k+1) (cos(k) 1)
Gk
=
Xk =
jk0
2k 2
X0 = 0.5 from plot of x(t)

k 6= 0

Integral
Z

x(t) =

g ( )d, (G0 = 0)

(1)(k+1) (cos(k) 1)
Gk
=
Xk =
j0 k
2k 2

X
X
Gm
X0 =
= 0.5
j2m
m=,m6=0

k 6= 0
(1)m+1

m=,m6=0

21 / 22

sin(m/2)
(m/2)

2

Basic Properties of Fourier Series


Signals and constants
Linearity
Parsevals power relation
Differentiation

x(t), y (t) periodic


with period T0 , ,
x(t) + y (t)
Z
1
Px =
|x(t)|2 dt
T0 T0
dx(t)
Zdt
t

Integration
Time shifting
Frequency shifting
Symmetry

Multiplication

Xk , Yk
Xk + Yk
X
Px =
|Xk |2
k

jk0 Xk

x(t 0 )dt 0 only if X0 = 0

x(t )

e jM0 t x(t)
x(t) real

z(t) = x(t)y (t)

Xk
k 6= 0
jk0
e j0 Xk
XkM
|Xk | = |Xk | even
function of k
Xk = Xk odd
function of k
X
Zk =
Xm Ykm
m

22 / 22

S-ar putea să vă placă și