MCT 2 Fourier

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

Fourier Transformation

© PFH Private Hochschule Göttingen 1


Example
Consideration of electrical signals in the
▪ Time domain (e.g. with an oscilloscope)
▪ Frequency domain (e.g. with a spectrum analyzer)

Many applications for which the spectrum is required:


Diagnostics, almost all audio applications
Compression: Discrete Cosine Transform (DCT) to JPEG, MP3, Shazam
© PFH Private Hochschule Göttingen 2
Fourie Series
Example: A simple periodic waveform

A periodic waveform is one which repeats itself over time

© PFH Private Hochschule Göttingen 3


Fourier Transform
From Fourier series to time continuous Fourier transform

1.) (Fourier Series) Decomposition into cosine and sine parts

2.) (Fourier Series) Amplitude and phase representation form

3.) (Fourier Series) Fourier series in the complex exponential form of representation

4.) (Fourier Transform) Transition from Fourier series to the continuous Fourier transform

5.) (Fourier Transform) Transition from continuous Fourier transform to the continuous discrete Fourier
transform

6.) (Fourier Transform) Transition from continuous Fourier transform to the discrete Fourier transform

© PFH Private Hochschule Göttingen 4


Fourier Transform
Fouriere Series

Fourier’s theorem states that any periodic function y(t) may be decomposed into
an infinite series of sine and cosine functions

a0
y (t ) := + y (t ) := a0 +
2
+ a1  cos(0  t ) + a2  cos(2  0  t ) +
+ a1  cos(0  t ) + a2  cos(2  0  t ) +
+ b1  sin(0  t ) + b2  sin(2  0  t ) +
+ b1  sin(0  t ) + b2  sin(2  0  t ) +


a0 
y (t ) := +   an  cos(n  0  t ) + bn  sin(n  0  t )  y (t ) := a0 +   an  cos(n  0  t ) + bn  sin(n  0  t ) 
2 n =1 n =1

© PFH Private Hochschule Göttingen 5


Fourier Transform
Fourier series

Mathematically, a waveform which repeats over some interval To may be


described as y(t) = y(t + To).
The period of the waveform is To for a fundamental frequency of ωo or fo

2   rad 
0 = = 2    f0 
T0  s 

1
T0 =  s
f0

1
f0 =  Hz 
T0

© PFH Private Hochschule Göttingen 6


Fouriere series only for periodic signals
Definition of the Fourier series

a0 
y (t ) := +   an  cos(n  0  t ) + bn  sin(n  0  t )  y (t ) := a0 +   an  cos(n  0  t ) + bn  sin(n  0  t ) 
2 n =1 n =1

The coefficients an and bn are determined by solving the following integral equations
T0
T0
2 1
 y(t )  dt
2 a0 =
a0 =
T0  T0
y (t )  dt Mean value
T0 0

2
T0
T0
2
 y(t )  cos ( n    t )  dt
2
2
an =  y (t )  cos ( n  0  t )  dt an = 0
T0 T
T0 0
− 0
2
T0
2 T0
2 2
bn =  y (t )  sin ( n  0  t )  dt bn =  y(t )  sin ( n    t )  dt
0
T0 T T0 0
− 0
2
© PFH Private Hochschule Göttingen 7
Calculating the coefficients

2 L = 2

  nx   nx   
f ( x ) = a0 +   an  cos   + bn  sin   f ( x ) = a0 +   an  cos ( nx ) + bn  sin ( nx ) 
n =1   L   L  n =1

2
1
1
f ( x )  dx
a0 =  f ( x )  dx
2 L 2L
a0 = 2 0

2
1
1  n x 
an =  f ( x )  cos   dx
an =
  f ( x )  cos ( nx ) dx
L 2L  L  0

2
 n x  1
1
bn =  f ( x )  sin   dx
bn =
  f ( x )  sin ( nx ) dx
L 2L  L  0

© PFH Private Hochschule Göttingen 8


Calculating the coefficients
Some usefull integrals

+2 +2

 sin ( n  x )  dx = 0
0
 sin ( n  x )  sin ( m  x )  dx = 0
0
+2 +2

 cos ( n  x )  dx = 0
0
 cos ( n  x )  cos ( m  x )  dx = 0
0
+2 +2

 sin ( n  x )  dx =   sin ( n  x )  cos ( m  x )  dx = 0


2

0 0
+2 +2

 cos 2 ( n  x )  dx =   sin ( n  x )  cos ( n  x )  dx = 0


0 0

© PFH Private Hochschule Göttingen 9


Calculating the coefficients

2
2
a0 =
  f ( x )  dx
0

2 2 2 2 2 2

 f ( x )  dx = a  dx + a  cos ( x ) dx + a  cos ( 2 x ) dx + a  cos ( 3x ) dx +


0
0
0
1
0
2
0
3
0
+ an  cos ( nx ) dx
0
2 2 2 2
+b1  sin ( x ) dx + b2  sin ( 2 x ) dx + b3  sin ( 3 x ) dx + + bn  sin ( nx ) dx
0 0 0 0

2

 f ( x )  dx = a  x 0 = a0   2 − 0 = 2  a0
2
0
0
2
1
a0 =
2  f ( x )  dx
0
© PFH Private Hochschule Göttingen 10
Calculating the coefficients
2
1
an =
  f ( x )  cos ( nx ) dx
0

2 2

 f ( x )  cos ( nx )  dx = a0  cos ( nx )  dx +
0 0
2 2 2 2
+ a1  cos ( x )  cos ( nx )  dx + a2  cos ( 2 x )  cos ( nx )  dx + a3  cos ( 3x )  cos ( nx )  dx + + an  cos 2 ( nx ) dx
0 0 0 0
2 2 2 2
+b1  sin ( x )  cos ( nx )  dx + b2  sin ( 2 x )  cos ( nx )  dx + b3  sin ( 3 x )  cos ( nx )  dx + + bn  sin ( nx )  cos ( nx )  dx
0 0 0 0
2 2

 f ( x )  cos ( nx )  dx = a  cos ( nx ) dx
2
n
0 0
2

 f ( x )  cos ( nx )  dx = a
0
n 

2
1
an =   f ( x )  cos ( nx )  dx
 0 © PFH Private Hochschule Göttingen 11
Calculating the coefficients
2
1
bn =
  f ( x )  sin ( nx ) dx
0

2 2

 f ( x )  sin ( nx )  dx = a0  sin ( nx )  dx +
0 0
2 2 2 2
+ a1  cos ( x )  sin ( nx )  dx + a2  cos ( 2 x )  sin ( nx )  dx + a3  cos ( 3 x )  sin ( nx )  dx + + an  cos ( nx )  sin ( nx )  dx
0 0 0 0
2 2 2 2
+b1  sin ( x )  sin ( nx )  dx + b2  sin ( 2 x )  sin ( nx )  dx + b3  sin ( 3 x )  sin ( nx )  dx + + bn  sin 2 ( nx )  dx
0 0 0 0
2 2

 f ( x )  sin ( nx )  dx = b  sin ( nx ) dx
2
n
0 0
2

 f ( x )  sin ( nx )  dx = b
0
n 

2
1
bn =   f ( x )  sin ( nx )  dx
 0 © PFH Private Hochschule Göttingen 12
Fouriere series
Special case: point symmetry to the origin (odd function) y ( t ) = − y ( −t )


y (t ) =  bn  sin(n  0  t ) 
n =0
y (t )
2  ŷ
0 =
T0

a0 = 0 No mean value t
− ŷ
an = 0

T0
2 T0
2
bn =  y (t )  sin ( n  0  t )  dt
T0 T0

2

© PFH Private Hochschule Göttingen 13


Fouriere series
Special case: axial symmetry to the ordinate (even function) y ( t ) = y ( −t )

y (t ) =   an  cos(n  0  t ) 
n =0
y (t )
2 
0 = ŷ
T0
T0
2 t
2
a0 =
T0 
T
y (t )  dt Mean value
− ŷ
− 0
2

T0
2 T0
2
an =  y (t )  cos ( n  0  t )  dt
T0 T0

2

bn = 0
© PFH Private Hochschule Göttingen 14
Fouriere series
Example: Rectangle function

 u (t )
y (t ) =  bn  sin(n  0  t ) 
n =0 U0

a0 = an = 0
t
T0

2 2
−U 0
bn =  y (t )  sin ( n  0  t )  dt −T0 T0
T0 T0 2 2

2
T0

© PFH Private Hochschule Göttingen 15


Fouriere series
Example: Rectangle function

y (t ) =  bn  sin(n  0  t ) 
n =0 U0
a0 = an = 0
T0

2 2 t
bn =  y (t )  sin ( n  0  t )  dt
T0 T
− 0
−U 0
2 −T0 T0
2 2
0 T0

2 2
 T0
bn =   −U 0  sin ( n  0  t )  dt +  U 0  sin ( n  0  t )  dt 
T0  T0 0 
− 2 
1
 sin (  t )  dt = −  cos (  t )

bn =
2 U0

T0 n  0

 −  − cos ( n  0  t )  −To /2 +  − cos ( n  0  t )  0
0 To /2

© PFH Private Hochschule Göttingen 16
Fouriere series
Example: Rectangle function
0 T0

2 2

bn =   −U 0  sin ( n  0  t )  dt +  U 0  sin ( n  0  t )  dt  U0
T0  T0 0 
− 2 

1 t
 sin (  t )  dt = − 
 cos (  t )
−U 0
−T0 T0
2

 
2
2 U
bn =  0  −  − cos ( n  0  t )  −To /2 +  − cos ( n  0  t )  0
0 To /2

T0 n  0 T0

2 U0    T    T  
bn =   −  −1 + cos  n  0  0   +  − cos  n  0  0  + 1 
T0 n  0    2    2  

2 U 0   T    T  
bn =    1 − cos  n  0  0   − cos  n  0  0  − 1 
T0 n  0    2    2  
© PFH Private Hochschule Göttingen 17
Fouriere series
Example: Rectangle function u (t )
2 U 0   T   U0
bn =     2 − 2  cos  n  0  0   
T0 n  0    2  
4 U 0   T  
bn =    1 − cos  n  0  0   
T0 n  0    2   t
−U 0
with 0  T0 = 2  

yields to: T0

4 U 0
bn =
n  
 
 1 − cos ( n   ) 

 4 U 0
 if n is odd
bn =  n  
 0 if n is even
© PFH Private Hochschule Göttingen 18
Fouriere series
Example: Rectangle function

y (t ) =  bn  sin(n  0  t )  U0
n =0

a0 = an = 0
t
T0

2 2 −U 0
bn =  y (t )  sin ( n  0  t )  dt −T0 T0
2
T0 2
T0

2
T0
4 U 0 
bn =
n  

 1 − cos ( n   )   y (t ) = bn   sin(n  0  t ) 
n =0

 4 U 0 4 U 
 if n is odd y (t ) =   sin(n  0  t )  2n − 1 = ?
bn =  n   n   n =0
 0 if n is even
© PFH Private Hochschule Göttingen 19
Fouriere series
Example: Rectangle function

4 U 0  sin ( ( 2n + 1)  0  t )
u (t ) = 
 n =0 2n + 1

u (t ) u (t )

u (t )
U0

t
−U 0

T0

4 U 0  sin ( 30t ) sin ( 50t ) sin ( 70t ) sin ( 90t ) 


u (t ) =  sin(0t ) + + + + + 
  3 5 7 9 
© PFH Private Hochschule Göttingen 20
Fouriere series
Example: Rectangle function

© PFH Private Hochschule Göttingen 21


Fouriere series
Example: Rectangle function

Approximating a square waveform with a Fourier series

 4 U 0
 if n is odd
bn =  n  
 0 if n is even

© PFH Private Hochschule Göttingen 22


Fouriere series
Example: Rectangle function

Approximating a square waveform with a Fourier series


a (n)

b (n)

© PFH Private Hochschule Göttingen 23


Fouriere series
Using the Magnitude and phase description

The sine and cosine terms in the Fourier series may be combined into a single
sinusoid with a phase shift using the relation

an cos ( n  o  t ) + bn sin ( n  o  t ) = An  sin(n  0  t + n )

Proof:
a  cos (  ) + b  sin (  ) = A  sin( +  )

Expand the right-hand side:

a  cos (  ) + b  sin (  ) = A  sin (  ) cos( ) + A  cos (  ) sin( )


a  cos (  ) + b  sin (  ) = A  cos( ) sin (  ) + A  sin( ) cos (  )

© PFH Private Hochschule Göttingen 24


Fouriere series
Using the Magnitude and phase description

Equating the coefficients of cos(θ) and sin(θ) for both expressions

a  cos (  ) + b  sin (  ) = A  cos( ) sin (  ) + A  sin( ) cos (  )


a  cos (  ) = A  sin( ) cos (  )
b  sin (  ) = A  cos( ) sin (  )

a = A  sin( )
b = A  cos( )
Dividing, we get the following expression for the phase shift
a A  sin( ) a a
=  = tan ( )   = tan −1  
b A  cos( ) b b
© PFH Private Hochschule Göttingen 25
Fouriere series
Using the Magnitude and phase description

The magnitude is found by squaring and adding terms


a 2 + b 2 = A2  sin 2 ( ) + A2  cos 2 ( )

= A2  sin 2 ( ) + cos 2 ( ) 
=1

= A2

A = a 2 + b2

© PFH Private Hochschule Göttingen 26


Fouriere series
Using the Magnitude and phase description

The sine and cosine terms in the Fourier series may be combined into a single
sinusoid with a phase shift using the relation

y (t ) = A0 +  An  cos(n  0  t + n )
n =1

A0 = a0

An = an2 + bn2

 bn 
n = − tan −1  
 n
a
© PFH Private Hochschule Göttingen 27
Fouriere series
Using the complex exponential form

The complex exponential form is developed based on expanding sine and cosine
functions in the sine-cosine form into their exponential expressions using Euler’s
formula and regrouping these exponential terms
Euler’s formula is given by

e  jx = cos ( x )  j  sin ( x ) x


e jx + e − jx
cos ( x ) =
2
e − e − jx
jx
sin ( x ) =
2j

© PFH Private Hochschule Göttingen 28


Fouriere series
Using the complex description

( )
y (t ) = A  e j (t + ) + e − j (t + ) = A  ( e jt  e j + e − jt  e − j )
y (t ) = c  e jt + c *  e − jt

c = A  e j = A  ( cos  + j  sin  )
c * = A  e − j = A  ( cos  − j  sin  )

© PFH Private Hochschule Göttingen 29


Complex Fouriere series
Example: harmonic function

Fouriere series in the complex notation



y (t ) = c
n =−
n  e jn0t

T0
1
 y (t )  e
− jn0t
cn =  dt
T0 0

T0 T0

cn =
1
T0 0 
 y (t )  ( cos ( n  0  t ) − j  sin ( n  0  t ) ) 
  dt =
1
T0  y ( t )  e − jn0t
 dt
0

© PFH Private Hochschule Göttingen 30


Fouriere series
Calculation for the coefficients (complex values)

T T

 dt =   y (t )  ( cos ( n0t ) − j  sin ( n0t ) )  dt


1 0 1 0
cn =   y (t )  e − j n0t

T0 0 T0 0

T T

 dt =   y (t )  ( cos ( n0t ) + j  sin ( n0t ) )  dt = cn*


1 0 1 0
c− n =   y (t )  e j n0t

T0 0 T0 0

 
 
 − jn0t 
y (t ) = c n  e jn0t = c0 +   cn  e
n =1 
jn0t
+ cn  e
*

n =− a0 Pointer Pointer 
 counterclockwise clockwise 
© PFH Private Hochschule Göttingen 31
Fouriere series
Calculation for the coefficients (complex values)
an = cn + c− n = 2  Re  cn 
bn = j  ( cn − c− n ) = −2  Im  cn 
a − j  bn 1
T0 T0
1
cn = n
2
=
T0 0 y(t )  cos ( n0t )  dt + j  T0  y(t )  sin ( n t )  dt
0
0

a + j  bn 1
T0 T0
1
c− n = c = n
*
n = 0 y (t )  cos ( n0 t )  dt − j   y(t )  sin ( n t )  dt
0
2 T0 T0 0

An = 2  ( cn  c− n ) = 2  cn = 2  c− n
 Im ( cn ) 
n = tan −1  
 Re ( cn ) 
A
cn = cn  e jn = n  e jn
2
An − jn
c− n = cn* = c− n  e − jn = e
2 © PFH Private Hochschule Göttingen 32
Time domain signal x(t) Fourier series expansion

© PFH Private Hochschule Göttingen 33


Time domain signal x(t) Fourier series expansion

© PFH Private Hochschule Göttingen 34


Time domain signal x(t) Fourier series expansion

© PFH Private Hochschule Göttingen 35


Time domain signal x(t) Fourier series expansion

© PFH Private Hochschule Göttingen 36


Fouriere Series
Example

y (t )

© PFH Private Hochschule Göttingen 37


Transition to the Fourier transform

y (t ) = c n  e jn0t T0 → 
n =− 0 → d  → 0
T0 n0 → 
1
 y (t )  e
− jn0t
cn =  dt
T0 0

 
T0
 2

y (t ) =   0  y ( )  e
− jn0
 d   e jn0t
n =−  2 
 −T0 2

 02 
T

1
y (t ) =
2
   y ( )  e
n =−  −T0
− jn0
 d   e jn0t  0

 2

© PFH Private Hochschule Göttingen 38


Transition to the Fourier transform
  
1
y (t ) = lim    y ( )  e − j  d   e jt  d 
2 d →0 n =−  − 

1

  jt
y (t ) = −  − y ( )  e − j
 d   e  d
2 
Fourier transform Fourier transform
as a function of ω as a function of f
 
→ Y ( j ) =  y(t )  e
− j  t
 dt → Y(f )=  y(t )  e
− j 2  f t
 dt
− −
 
1
 Y ( j )  e  Y ( f )e
j  t
→ y (t ) =  d → y (t ) = j 2  f t
 df
2  − −

© PFH Private Hochschule Göttingen 39


Transition to the Fourier transform
Continuous-time/continuous frequency Fourier transform

Fourier transform Inverse Fourier transform


 
1
Y ( j ) = y ( t )  e − jt  dt y (t ) =  (  )  jt
 d
−
 2 −
Y j e

 

Y(f )= y ( t )  e − j2  f t  dt y (t ) =  ( )  j 2  f t


 df

− −
Y f e

e − j t = cos (  t ) − j  sin (  t ) e j t = cos (  t ) + j  sin (  t )


© PFH Private Hochschule Göttingen 40
The Fourier transform
Example rectangle impuls

f (t )
A
 A if − T  t  T
f (t ) =  2 2
0 otherwise
− 𝑇ൗ2 𝑇ൗ
2
t


F ( j ) =  f ( t ) e
− jt
 dt
−

▪ We are looking for the spectrum of the above time signal curve!

▪ Which frequencies are contained in the above signal?


© PFH Private Hochschule Göttingen 41
The Fourier transform
Example rectangle impuls
f (t )
A

− 𝑇ൗ2 𝑇ൗ
2
t

amplitude density
T
 2
F ( j ) =  f ( t ) e
− jt
 dt = A   e − jt  dt
− −T
2
T 2

 ( e jT 2 − e − jT 2 )
A − jt A
=− e =
j −T 2
j

F ( j ) = A 
(
j  2  sin T )
2 = A (
sin T
2 ) frequency in rad/s
j  
2
sin T ( ) 2 1 2  2 2  3 2  4
F ( j ) = A  T  2
T
2
© PFH Private Hochschule Göttingen 42
The Fourier transform
Example rectangle impuls

f (t )
A

amplitude density
− 𝑇ൗ2 𝑇ൗ
2
t

F ( j ) = A  T 
(
sin T
2 )
T
2

(
sin T
2 )=0
T = k   frequency in rad/s
2

=
k  2 2 1 2  2 2  3 2  4
T Frequenz Hz
k f = 1Hz f = 2 Hz f = 3Hz f = 4 Hz
f =
T
© PFH Private Hochschule Göttingen 43
The Fourier transform
The Discrete Time Fourier Transform (DTFT) [discrete-time/continuous frequency]

Fourier-Transform
+
F ( j ) = 
−
f (t )  e − j t

Pre-condition

f s  2  f max Sampling frequency > 2* Signal frequency

N  Ts Oberservation window

© PFH Private Hochschule Göttingen 44


The Fourier transform
The Discrete Time Fourier Transform (DTFT) [discrete-time/continuous frequency]
Fourier-Transform

Y ( j ) =  y (t )  e
− jt
 dt
−
The sampling impulses are impulse or “ delta ” functions δ(t) spaced at intervals of Ts

Pre-condition

f s  2  f max Sampling frequency > 2* Signal frequency

N  Ts Oberservation window

© PFH Private Hochschule Göttingen 45


The Fourier transform
The Discrete Time Fourier Transform (DTFT) [discrete-time/continuous frequency]
Fourier-Transform

Y ( j ) =  y ( t )  e − jt  dt
−
The sampling impulses are impulse or “ delta ” functions δ(t) spaced at intervals of Ts

f (t ) =   ( t − nT )
n =−
s

ys ( t ) = y (t )   ( t − n  Ts )

ys ( t ) =  y(t )   ( t − n  T )
n =−
s

Since at the sample instants t = nT, this becomes



ys ( t ) =  y (n  T )   ( t − n  T )
n =−
s s

© PFH Private Hochschule Göttingen 46


The Fourier transform
The Discrete Time Fourier Transform (DTFT)

The Fourier transform of the sampled signal is



Yd ( j ) =  y (t )  e
s
− j  t
 dt
−

ys ( t ) =  y (n  T )   ( t − n  T )
n =−
s s

 
Yd ( j ) =   y (n  T )   ( t − n  T )  e
− j  t
s s  dt
− n =−
 
Yd ( j ) =   y (n  T )   ( t − n  T )  e
n =− −
s s
− j  t
 dt


Yd ( j ) =  y (n  T )  e
n =−
s
− j n Ts

© PFH Private Hochschule Göttingen 47


The Fourier transform
The Discrete Time Fourier Transform (DTFT)

The Fourier transform of the sampled signal is



Yd ( j ) =  y (n  T )  e
n =−
s
− j n Ts

Note that the delta function has been used here, and the property that

  (T )  f ( t )  dt = f (T )
−

Since t = nTs (time) and ωd = ωTs (frequency), this yields the Fourier transform of a
sampled signal as


Yd ( jd ) =  y (n  T )  e
n =−
s
− j nd

© PFH Private Hochschule Göttingen 48


The Fourier transform
The Discrete Time Fourier Transform (DTFT)

The Fourier transform of the sampled signal is



Yd ( j ) =  y (n  T )  e
n =−
s
− j n Ts

Since the angular frequency is still continuous, the inverse of the DTFT above is


1
y (n) =   Yd ( j )  e jn Ts  d 
2   −

© PFH Private Hochschule Göttingen 49


The Fourier transform
The Discrete Time Fourier Transform (DTFT)

The Fourier transform of the sampled signal is

n = N −1
Fd ( j ) = 
n =0
f (n  Ts )  e − j nTs

N −1 N −1
Fd ( j ) =  f (n  Ts )  cos(  n  Ts ) − j   f (n  Ts )  sin(  n  Ts )
n =0 n =0

− j nTs ( + 2 )
− j  nTs − j n( Ts + 2 )
e =e =e Ts

© PFH Private Hochschule Göttingen 50


The Fourier transform
The Discrete Time Fourier Transform (DTFT)

The discrete time Fourier transform is perodic

  2  
Fd ( j ) = Fd  j   +  
  Ts 

Matching between the continuous and discrete time Fourier transform

F ( j ) = Ts  Fd ( j )

© PFH Private Hochschule Göttingen 51

You might also like