cosc4317 lecture4 frequency01 fs
Embed Size (px)
TRANSCRIPT

8/7/2019 COSC4317 Lecture4 Frequency01 FS
1/56

8/7/2019 COSC4317 Lecture4 Frequency01 FS
2/56
Goal
In this module, we will look at the frequency domain
representation of signals
Different models are used depending on the nature of the
independent/dependent variable (Continuous vs. Discrete)
Next module applies these concepts to filtering techniques.
2

8/7/2019 COSC4317 Lecture4 Frequency01 FS
3/56
Time domain operations are often not very informative and/or
efficient in signal processing
Examples: nature of noise present (filtering); data that can be eliminated
(compression);
An alternative representation and characterization of signals
and systems can be made in transform domain
Essentially mathematical operators
The two domains or characterizations are complementary of
each other Most are invertible (You can get one from the other and vise versa)
Provide different insight to solving problems
Why Another Domain
3

8/7/2019 COSC4317 Lecture4 Frequency01 FS
4/56
Jean Baptiste Joseph Fourier
Fourier was born in Auxerre, France in 1768 Most famous for his work La Thorie Analitique de
la Chaleur published in 1822
Translated into English in 1878: The AnalyticTheory of Heat
Nobody paid much attention when the work was firstpublished
Had crazy idea (1807): Any periodic function can berewritten as a weighted sum of sines and cosines ofdifferent frequencies.
Many didnt believe him including Lagrange, Laplace,Poisson.
Not translated into English until 1878!
One of the most important mathematical theories inmodern era.
4

8/7/2019 COSC4317 Lecture4 Frequency01 FS
5/56
The Big Idea
Any function that periodically repeats itself can be expressed as a
an (infinite) sum of sines and cosines of different frequencies
each multiplied by a different coefficient a Fourier series
5
=

8/7/2019 COSC4317 Lecture4 Frequency01 FS
6/56
Example
6
The Fourier theory
shows how most real
functions can be
represented in termsof a basis of sinusoids.
The building block:
A sin( x + )
Add enough of them to get any
signal you want.Notice how we get closer andcloser to the original function as weadd more and more frequencies

8/7/2019 COSC4317 Lecture4 Frequency01 FS
7/56
Example
7

8/7/2019 COSC4317 Lecture4 Frequency01 FS
8/56
The concept/model was later expanded to accommodate different types ofsignals:
Fourier Series
For Periodic continuous functions
Fourier Transform
For any continuous function
functions that are not periodic (but whose area under the curve is finite) can beexpressed as the integral of sines and cosines multiplied by a weighing function.
Discrete Fourier Transform
For sampled sequence of data (digital data)
Digital signal processing uses the discrete Fourier transform, DFT (1D and 2D) Today, the concept of composing a signal in terms of basis functions (delta
functions, polynomilas, sinusoidal functions, wavelets, etc.) is taking forgranted and forms the basis of many fields including compression andfiltering, among many others.
Fourier Types
8

8/7/2019 COSC4317 Lecture4 Frequency01 FS
9/56
Frequency Family
9
Type of Function (Signal) Fourier Model Used
Signals that are continuous
and aperiodic
Fourier Transform
Signals that are continuous
and periodic
Fourier Series
Signals that are discrete
and aperiodic
Discrete Time Fourier
Transform (infinite sum)
Signals that are discrete
and periodic
Discrete Fourier
Transform (finite sum
discretized frequency)

8/7/2019 COSC4317 Lecture4 Frequency01 FS
10/56
Math Background
Complex Numbers (we will use i or j interchangeably)
j2 = 1 or
C= R + j I
R is the real part and I is the imaginary part
C*= R j I
Complex conjugate (replacing each j with j)
Can be easily viewed in an ReIm Plane (as 2tuple vector)
The magnitude is given by
C can also be written as
22 IRC
)sin(cos CjCC
2//2),/(tan 1 RI
10
1j

8/7/2019 COSC4317 Lecture4 Frequency01 FS
11/56
Magnitude and Phase in the Complex
Plane
The graph show the
magnitude and phase of a
complex number z
11
22 IRz
2//2),/(tan 1 RI

8/7/2019 COSC4317 Lecture4 Frequency01 FS
12/56
Magnitude and Phase in the Complex
Plane
Another way (very
important way) to write
the complex number is as
an exponential
12
jezz

8/7/2019 COSC4317 Lecture4 Frequency01 FS
13/56
Special case of the Unit Circle
13
je

8/7/2019 COSC4317 Lecture4 Frequency01 FS
14/56
Multiplication
14
When you multiply two complex numbers, their magnitudes
multiply:
and their phases add:
This can be easily seen in the exponential notation
)()()( yxxy
xxxy
111
jezz 222 jezz)(
2121212121  jjj ezzezezzz

8/7/2019 COSC4317 Lecture4 Frequency01 FS
15/56
For a complex number z:
z = a + bj
Its conjugates is given by :z* = a  bj
The complex conjugate z has
the same real part but opposite imaginary part, and
the same magnitude but opposite phase.
Complex Conjugates

8/7/2019 COSC4317 Lecture4 Frequency01 FS
16/56
Adding z + z*, cancels the imaginary parts to leave a real
number:
(a + bj) + (a bj) = 2a
Multiplying z . Z* gives the real number equal to z2:
(a + bj)(a bj) = a2 (bj)2 = a2 + b2
Complex Conjugates

8/7/2019 COSC4317 Lecture4 Frequency01 FS
17/56
Eulers Formula
Eulers formula uses exponential notation to encode complex
numbersuses j in the exponent to differentiate from real
numbers
Eulers formula:
Eulers formula allows us to rewrite C (generic complex number) as
Adding and subtracting these formulas, Euler obtained thefollowing expressions for cos and sin:
)sin()cos( jej
jeCC
17
)sin()cos( je j

8/7/2019 COSC4317 Lecture4 Frequency01 FS
18/56
Eulers Formula: Graphical
Interpretation
18
)(zjezz

8/7/2019 COSC4317 Lecture4 Frequency01 FS
19/56
What is (2 + 2j)(3 + 3j)?
Suppose that we already have these numbers in magnitude
phase notation:
Eulers Formula: Application
19
224422 j 239933 j
4/)2
2(tan)22(1
j 4/3)3
3(tan)33( 1j
/4je2222 j/4j3e2333 j
12e)12(e)12(
ee)2322(
e23.e22)33)(22(
)j(/4)3/4j(
/4j3/4j
/4j3/4jjj

8/7/2019 COSC4317 Lecture4 Frequency01 FS
20/56
Suppose that we take a complex number
and raise it to some power n:
zn has magnitude zn and phase
Powers of Complex Numbers
20
)(zjezz
jnn
njn
ez
ezz
)(zn

8/7/2019 COSC4317 Lecture4 Frequency01 FS
21/56
What is jn for various n?
Powers of Complex Numbers:
Example
21
...
1
1
1
2/44
2/33
2/22
2/
0
2/
j
j
j
j
j
ej
jej
ej
jejj
ej

8/7/2019 COSC4317 Lecture4 Frequency01 FS
22/56
Series Representation
22

8/7/2019 COSC4317 Lecture4 Frequency01 FS
23/56
23

8/7/2019 COSC4317 Lecture4 Frequency01 FS
24/56
Math Background
Even & Odd functions
24

8/7/2019 COSC4317 Lecture4 Frequency01 FS
25/56
Math Background
Any function can be decomposed as a sum of the even
and odd part
f(t) = fe(t) + fo(t), where:
One of the functions used extensively in Fourier
transforms is the Sinc function, defined as:
25

8/7/2019 COSC4317 Lecture4 Frequency01 FS
26/56
The term used to find the frequency content/components of a
signal is called Analysis or Decomposition
The term used to create a signal (in time) from its frequency
content/components is called Synthesis or Composition
Transform Terminology
26

8/7/2019 COSC4317 Lecture4 Frequency01 FS
27/56
Fourier Series
Frequency domain representation of periodic signals
There are many forms for the Fourier Series including the
Trigonometric and complex representations
We will emphasize the complex representation and then relate it to the
trigonometric representation.
27

8/7/2019 COSC4317 Lecture4 Frequency01 FS
28/56
A periodic signal x(t), has a Fourier series if it satisfies the
following conditions:
1. x(t) is absolutely integrable over any period, namely
2. x(t) has only a finite number of maxima and minima over
any period
3. x(t) has only a finite number of discontinuities over anyperiod
Dirichlet Conditions
28
0
)(T
dttx

8/7/2019 COSC4317 Lecture4 Frequency01 FS
29/56
Fourier Series
With f0=1/T0 and0=2f0
Notation: x(t) akwhere the double arrow signifies the invertibility
of one form to the other
Note that each complex exponential that makes up the sum isan integer multiple of0, the fundamental frequency. Hence, the complex exponentials are harmonically related
The coefficients ck, aka Fourier (series) coefficients, are possiblycomplex Fourier series (and all other types of Fourier transforms) are complex
valued! That is, there is a magnitude and phase (angle) term to the Fouriertransform!
This is the only unknown that is to be calculated from the waveform x(t)
29
k
tjk
kectx0)(
tjke 0

8/7/2019 COSC4317 Lecture4 Frequency01 FS
30/56
Fourier Series
Synthesis Part:
k0: kth integer multiple kth harmonic of the fundamental
frequency 0
ck: Fourier coefficients how much of kth harmonic exists in the
signal
ck: Magnitude of the kth harmonic (magnitude spectrum of
x(t))
k: Phase of the kth harmonic (phase spectrum of x(t))
30
k
tjk
kectx0)(

8/7/2019 COSC4317 Lecture4 Frequency01 FS
31/56
Fourier Series
Analysis Part:
The limits of the integral can be chosen to cover any interval of T0 (in
many book written as meaning integrate over any interval of lengthT)
Note that, while x(t) is a sum, ckare obtained through an integral of
complex values.
If x(t) is real, then the coefficients satisfy ck=c*k, that is ck=ck
c0 is the DC/Average value of the signal
c1 is the fundamental frequency
31
00
0
0)(1
0
Ttt
tt
tjk
k dtetxT
c
0T

8/7/2019 COSC4317 Lecture4 Frequency01 FS
32/56
Proof of how to get Fourier
coefficients
Graduate Student
In the proof, our Fourier coefficient is ak
32

8/7/2019 COSC4317 Lecture4 Frequency01 FS
33/56
Example01
33.20,2
1
,2
1
),2
11(),
2
11(,1
:aretscoefficienseriesFourier
)
2
1)
2
1)
2
11()
2
11(1)(
][2
1][][
2j
11x(t)
:)e(e2
1
sinand
)e(e2
1cosforidentityEuleruse
)4
2cos(cos2sin1)(
)4/(
2
)4/(
2
110
2)4/(2)4/(
4/24/2
jj
jj
000
0000
000000
kforcecec
jc
jcc
eeeee
j
e
j
tx
eeeeee
j
ttttx
k
jj
tjjtjjtjtj
tjtjtjtjtjtj

8/7/2019 COSC4317 Lecture4 Frequency01 FS
34/56
Example02
34

8/7/2019 COSC4317 Lecture4 Frequency01 FS
35/56
Example03
35

8/7/2019 COSC4317 Lecture4 Frequency01 FS
36/56
Trigonometric Form of FS
Trigonometric Form 1:
Trigonometric Form 2:
36
1
000 sincosn
nn tnbtnaatf
0
0
0
00
0
00
0
00
0
sin2
cos2
1
T
n
T
n
T
dttntfT
b
dttntfT
a
dttfT
a
n
nn
nnn
n
nn
a
b
bacac
tncctf
1
22
00
1
00
tan
and,,where
cos This form is obtained from thetrigonometric identity
a cos(x) + b sin(x) = c cos(x + )

8/7/2019 COSC4317 Lecture4 Frequency01 FS
37/56
Example
Fundamental period
T0 =
Fundamental frequency
f0 = 1/T0 = 1/ Hz
0 = 2 /T0 = 2 rad/s
.asamplitudeindecreaseand161
8504.02sin
2
161
2504.02cos
2
504.0121
2sin2cos
20
2
20
2
2
0
20
1
0
nban
ndtnteb
ndtntea
edtea
ntbntaatf
nn
t
n
t
n
t
n
nn
0
1et/2
f(t)
12
2sin42cos161
21504.0
n
ntnntn
tf

8/7/2019 COSC4317 Lecture4 Frequency01 FS
38/56
Compact Trigonometric
Fundamental period
T0 =
Fundamental frequency
f0 = 1/T0 = 1/ Hz
0 = 2 /T0 = 2 rad/s na
b
n
baC
aC
n
nb
na
a
ntCCtf
n
n
n
nnn
o
n
n
n
nn
4tantan
161
2504.0
504.0
161
8504.0
161
2504.0
504.0
2cos
11
2
22
0
2
2
0
1
0
0
1et/2
f(t)
1
1
2
4tan2cos
161
2504.0504.0
n
nnt
n
tf

8/7/2019 COSC4317 Lecture4 Frequency01 FS
39/56
Relationship among the forms
39
00
5.0
5.0
acjbacc
jbac
nnnn
nnn
00
5.05.0
dc
eddc njnnnn

8/7/2019 COSC4317 Lecture4 Frequency01 FS
40/56
f() and F() must contain the same information.
It is very important to know that the Fourier series is
completely reversible
It provides onetoone transform of signals from/to a time
domain representation f(t) to/from a frequency domain
representation FS().
It is a mathematical prism to separate a function into
various components
It allows a frequency content(spectral) analysis of a signal.
Final Notes on FS
40

8/7/2019 COSC4317 Lecture4 Frequency01 FS
41/56
Pay close attention to these properties as many of them will
apply to the other transforms later on
Properties of Fourier Series

8/7/2019 COSC4317 Lecture4 Frequency01 FS
42/56
Properties of Fourier Series

8/7/2019 COSC4317 Lecture4 Frequency01 FS
43/56
Properties of Fourier Series

8/7/2019 COSC4317 Lecture4 Frequency01 FS
44/56
Properties of Fourier Series

8/7/2019 COSC4317 Lecture4 Frequency01 FS
45/56
Properties of Fourier Series

8/7/2019 COSC4317 Lecture4 Frequency01 FS
46/56
Properties of Fourier Series

8/7/2019 COSC4317 Lecture4 Frequency01 FS
47/56
Properties of Fourier Series
FS R i f Di

8/7/2019 COSC4317 Lecture4 Frequency01 FS
48/56
Given a discretetime periodic signal with fundamental period
of N and fundamental frequency 0=2/N
FS Representation of Discrete
Time Periodic Signals
48
1
0
1
0
)/2(0][N
k
N
k
nNjk
k
njk
k eaeanx
1
0
1
0
)/2(][][1
0
N
n
N
n
nNjknjk
k enxenxN
a
k
FS
anx ][
FS R i f Di

8/7/2019 COSC4317 Lecture4 Frequency01 FS
49/56
ak: Fourier series coefficients or spectral coefficients
Differences to continuoustime case
Discretetime Fourier series is finite
There are only N distinct discretetime complex exponential signals
ejk(2/N)n that are periodic with period N (harmonically related signals).)
No mathematical issues with convergencediscretetime Fourier series
representation always exists
ak= ak+N
FS Representation of Discrete
Time Periodic Signals
49
FS R i f Di

8/7/2019 COSC4317 Lecture4 Frequency01 FS
50/56
The set of coefficients
is commonly referred to as the Npoint discrete Fourier
transform (DFT) of a finite duration signal x[n] with x[n] = 0
outside the interval 0

8/7/2019 COSC4317 Lecture4 Frequency01 FS
51/56
51
P i f Di Ti F i

8/7/2019 COSC4317 Lecture4 Frequency01 FS
52/56
Similar to the continuous case
Properties of Discrete Time Fourier
Series
52

8/7/2019 COSC4317 Lecture4 Frequency01 FS
53/56
Matlab
To use the CT Fourier transform, you need to have thesymbolic toolbox for Matlab installed. If this is so, trytyping:
>> syms t;>> fourier(cos(t))
>> fourier(cos(2*t))
>> fourier(sin(t))
>> fourier(exp(t^2))Note also that the ifourier() function exists so
>> ifourier(fourier(cos(t)))
Matlab
53

8/7/2019 COSC4317 Lecture4 Frequency01 FS
54/56

8/7/2019 COSC4317 Lecture4 Frequency01 FS
55/56

8/7/2019 COSC4317 Lecture4 Frequency01 FS
56/56
Great site to learn about Signals, Convolution, and Linear
Systems.
http://www.jhu.edu/~signals/
John Hopkins Website
56
http://www.jhu.edu/~signals/http://www.jhu.edu/~signals/