Download fall16tech_III_3

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Large numbers wikipedia , lookup

Functional decomposition wikipedia , lookup

Series (mathematics) wikipedia , lookup

Bra–ket notation wikipedia , lookup

Karhunen–Loève theorem wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Transcript
Guerino Mazzola (Fall 2016©): Introduction to Music Technology
III Digital Audio
III.3 (M Oct 24)
Complex Fourier representation
(preliminaries to FFT)
Guerino Mazzola (Fall 2016©): Introduction to Music Technology
Have made calculations of this type in finite Fourier theory for the Nyquist theorem
w(t) = A0 + A1 sin(2.ft+Ph1) + A2 sin(2.2ft+Ph2) + A3 sin(2.3ft+Ph3) +...
Amsin(2.mft+Phm) = amcos(2.mft) + bmsin(2.mft)
w(t) = A0 + a1cos(2.ft) + b1sin(2.ft)+ a2cos(2.2ft) + b2sin(2.2ft)+...
For complex calculations, the calculus with sinusoidal functions are usless,
need more elegant approach!
Guerino Mazzola (Fall 2016©): Introduction to Music Technology
Recall the circle representation of sinusoidal functions:
cos(x) + i.sin(x)
¬ = plane of complex
numbers
sin(x)
i = √-1
1
cos(x)
Have the famous Euler formula: cos(x) + i.sin(x) = eix
cos(x+y) + i.sin(x+y) = ei(x+y) = eix . eiy = [cos(x) + i.sin(x)] . [cos(y) + i.sin(y)]
= [cos(x).cos(y) - sin(x).sin(y)] + i[sin(x).cos(y) +cos(x).sin(y)]
Guerino Mazzola (Fall 2016©): Introduction to Music Technology
Translate Fourier’s formula into the complex number representation:
cos(x) + i.sin(x) = eix
cos(-x) + i.sin(-x) = e−ix
= cos(x) − i.sin(x)
cos(x) + i.sin(x) = eix
+ cos(x) − i.sin(x) = e−ix
cos(x) = (eix + e−ix)/2
sin(x) = (eix − e−ix)/2i
= 2cos(x) = eix +e−ix
w(t) =
= a0 + a1cos(2.ft) + b1sin(2.ft)+ a2cos(2.2ft) + b2sin(2.2ft)+...
= c0 + c1 e i2.ft + c−1 e−i2.ft + c2 e i2.2ft + c−2 e−i2.2ft + c3 e i2.3ft + c−3 e−i2.3ft +...
a0 = c0
w(t) = ∑n = 0, ±1, ±2, ±3, ... cn e i2.nft
n > 0:
an = cn + c−n
bn = i(cn− c−n)
Guerino Mazzola (Fall 2016©): Introduction to Music Technology
Translate the finite Fourier’s formula into the complex number representation:
w(rΔ) = a0 + ∑m = 1,2,3,...n-1 amcos(2.mf. rΔ) + bmsin(2.mf. rΔ) + bnsin(2.nft. rΔ)
We only consider a special case, which is easy to write down,
but it shows the general situation!
Namely: a sound sample from t = 0 to t = 1, period P = 1 sec, i.e.
fundamental frequency f = 1 Hz
whence Δ = 1/N = 1/2n and rΔ =r/N, r = 0,1,2,... N-1
We may then write:
wr = w(rΔ) = w(r/N) = ∑m = 0, 1, 2, 3, ... N-1 cm e i2.mr/N
Why no negative indices? In fact, we have them, but they are somewhat hidden:
e i2.mr/N . e i2.m(N-r)/N = e i2.mr/N +i2.m(N-r)/N = e0 = 1, so
e i2.m(N-r)/N = e i2.-mr/N
−m = negative
Also, cN-m = complex conjugate to cm since the am, bm are all real numbers.
Therefore we have a total of N/2 independent complex coefficients,
i.e. N real coefficients as required from the original formula.
The representation
Guerino Mazzola (Fall 2016©): Introduction to Music Technology
wr = w(rΔ) = w(r/N) = ∑m = 0, 1, 2, 3, ... N-1 cm e i2.mr/N
identifies the sequence w = (w0,w1,w2,…,wN-1) as a vector in the N-dimensional
complex space ¬N. So our samples of fundamental frequency f = 1 are identified
with the vectors w ∈ ¬N. On this space, we have a scalar product — similar to
the highschool formula (u,v) = |u|.|v|.cos(u,v):
v
= complex conjugate
u
Have N exponential functions e0, e1, e2,... eN-1 that are represented as vectors in ¬N
em = (em(r) = ei2.mr/N)r = 0,1,2,...N-1
eq
〈em, em〉 = 1, 〈em, eq〉 = 0 m ≠ q
= orthogonality relations mentioned above!
The e0, e1, e2,... eN-1 = orthonormal basis like for
normal 3 space! (ortho ~ perpendicular, normal ~ length 1)
They replace the sinusoidal functions!
90o
90o
90o
em
el
Guerino Mazzola (Fall 2016©): Introduction to Music Technology
Every sound sample vector w = (w0,w1,w2,…,wN-1) in ¬N can be
written as a linear combination
w = ∑m = 0, 1, 2, 3, ... N-1 cm em
of the exponential functions, and the (uniquely determined) coefficients cm
are calculated via
cm = 〈w, em〉 =(1/N). ∑r = 0, 1, 2, 3, ... N-1 wr e-i2.mr/N
eq
90o
90o
90o
em
el