Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1/16
1
ck
T
t 0 T
t0
x(t )e
jk0t
dt
Integrate over
any complete
period
1
c0
T
t0 T
t0
x (t )dt
1
a0
T
t0 T
t0
x (t )dt
2 t0 T
ak x (t ) cos k0t dt
T t0
2
bk
T
t0 T
t0
x (t )sin k0t dt
Integrate over
any complete
period
3/16
A0 c0
Ak ak2 bk2
Ak 2 ck
k 1, 2, 3,
k ck
bk
k tan
ak
1
Recall you can convert from any form into any other form using some
simple equations!
Thus I tend to always find the ck and then convert to other forms if
needed.
Why do I prefer to find the ck?
Only one integral to actually do (although it is complex valued!)
Integrals involving exponential are usually easier than for sinusoids!
4/16
-2
-1
T 2 0
1 t0 T
ck x (t )e jk0t dt
T t0
choose t0 0
1 2
x (t )e jk t dt
2 0
2
1 1 jk t
dt 0 e jk t dt
1e
1
2 0
1 1 jk t
dt
e
Not valid for
0
2
1
1 1
jk t
e
2 jk
0
k = 0 so
have to do
that case
separately!
2
rad / sec
2
Im
j
e jk 1
2( k )
Re
1, k even
1, k odd
0, k even, 0
ck j
k , k odd
1 1 j 0 t
1 1
c0 1e
dt 1dt
0
2
2 0
1
DC Level (also
c0
called DC Offset)
2
5/16
a0 c0
1
2 , k 0
ck 0, k even, 0
j
, k odd
k
ak 2 Reck , k 1, 2, 3,
bk 2 Imck , k 1, 2, 3,
1
,
ak 2
0,
0,
bk 2
k
k 0
k 0
k even
, k odd
6/16
A0 c0
1
2 , k 0
ck 0, k even, 0
j
, k odd
k
Ak 2 ck
k 1, 2, 3,
k ck
1
2 , k 0
Ak 0, k even
2
, k odd
k
N/A, k 0
k N/A, k even
, k odd
2
x(t )
t
Noting that cosines have even symmetry and sines have odd symmetry it
is not surprising that an even x(t) needs only cosine components in the
Sine-Cosine Form:
Sine-Cosine Form
Exp. Form
Amp.-Phase Form
bk 0
ck Are Real
c0 a0
ck
1
2
ak jbk
k 1, 2, 3,
ck 12 ak jbk
A0 c0
Ak 2 ck
k 1, 2, 3,
k ck
8/16
x(t )
t
Noting that cosines have even symmetry and sines have odd symmetry it
is not surprising that an ODD x(t) needs only sine components in the
Sine-Cosine Form:
Sine-Cosine Form
Exp. Form
Amp.-Phase Form
ak 0
ck Are Imag
k 2
k 0
k 0
k 0
c0 a0
ck
1
2
ak jbk
k 1, 2, 3,
1
ck 2 ak jbk
A0 c0
Ak 2 ck
k 1, 2, 3,
k ck
9/16
-2
-1
T 2 0
2
rad / sec
2
Sine-Cosine Form
Exp. Form
Amp.-Phase Form
ak 0
ck Are Imag
k 2
k 0
k 0
k 0
1
,
ak 2
0,
0,
bk 2
k
k 0
k 0
k even
, k odd
0, k even, 0
ck j
k , k odd
N/A, k 0
k N/A, k even
, k odd
2
10/16
1
c0
T
t0 T
x (t )dt
t0
x(t )
x (3Ts )
One Period
x (4Ts )
Area
Ts
1
x(3Ts ) x(4Ts ) Ts
2
N points
( N 1)Ts
t
11/16
So we can use samples of the integrand to compute all the trapezoid areas and
then use those to approximate the integral.
Fortunately, MATLAB has a command called trapz that does just this!
1
ck
T
t 0 T
t0
x(t )e jk0t dt
x is the vector that holds the signal samples over one period
t is a vector that holds the time values spaced Ts seconds apart
T is the period of the signal
wo is the fundamental frequency in rad/sec
12/16
x(t )
Example
20
One Period
N points
Ts
( N 1)Ts
T = 4 sec
Important Issues:
How to choose sampling interval Ts?
How to set largest k value??
These
Are
Related!!
13/16
x (t )
ce
k K
jk 2 f 0t
o 2 f 0
f0 1 T
14/16
ce
k K
jk 2 f 0 t
Must be appropriate
20
15
10
Approx. Signal
5
0
-5
0
0.5
1.5
2
t (seconds)
2.5
3.5
4
15/16
25
20
15
Red: k = -10:10
Green: k = -100:100
10
5
0
-5
0
0.5
1.5
2.5
3.5
t (seconds)