...

the brain meets the operational definition of what a complex2 system is:

  • it's non-stationary (dynamical system whose model constants/parameters actually vary; system doesn't stay in an attractor)
  • non-linear behaviour, emergent properties (hard to determine from the observation of components alone, which number in the millions)
  • chaotic to initial conditions (slight differences lead to widely different states)
  • hierarchical organisation, scale-free structure, many-to-many relations among components, interconnectedness
  • phase transitions, equilibrium depends on critical states
  • noisy measurements, plus some rather stochastic processes (spiking)

dynamical systems basics

we'll distinguish between two kinds of systems:

  • stochastic
  • dynamical (deterministic). e.g. the harmonic oscilator:
|
|--\/\/\--mass
|
|----------------> x

From Hooke's law:

F=ma=kx(TeX formula:  F = ma = -kx )

therefore

md2xdt2=kx(TeX formula:   m \frac{d^2x}{dt^2} = -kx )

x(t)̈+kmx=0(TeX formula:   \ddot{x(t)} + \frac{k}{m}x = 0 )

x(t)̈+ω02x=0(TeX formula:   \ddot{x(t)} + ω_0^2 x = 0 )

we could have arrived at the same harmonic oscilator function using a pendulum, or an IC circuit.

in order to solve the differential equation, we partition it into two linear equations:

{x(t)̇=ω0y(t)y(t)̇=ω0x(t)(TeX formula:  \left\{ \begin{array}{cc} \dot{x(t)} = -ω_0 y(t) \\ \dot{y(t)} = -ω_0 x(t) \\ \end{array} \right. )

therefore

x(t)=asen(ω0t)+bcos(ω0t)(TeX formula:  x(t) = a sen(ω_0t) + b cos(ω_0t) )

in order to determine the initial conditions/constants we rewrite the general solution as:

x(t)=a2+b2[aa2+b2sen(ω0t)+ba2+b2cos(ω0t)]=A[c1sen(ω0t)+c2sen(ω0t)](TeX formula:  x(t) = \sqrt{a^2 + b^2} \left[ \frac{a}{\sqrt{a^2 + b^2}} sen(ω_0t) + \frac{b}{\sqrt{a^2 + b^2}} cos(ω_0t) \right] = A[c_1 sen(ω_0t) + c_2 sen(ω_0t)] )

this has the property that 1<=cc1,c2<=1(TeX formula: -1 <= c ∈ {c_1, c_2} <= 1) , and c12c22=1(TeX formula: c_1^2 c_2^2 = 1) .

let φ0(TeX formula: φ_0) be the initial phase. therefore φ0|aa2+b2=cos(φ0)ba2+b2=cos(φ0)(TeX formula: ∃ \; φ_0 \; | \; \frac{a}{\sqrt{a^2 + b^2}} = cos(φ_0) ∧ \frac{b}{\sqrt{a^2 + b^2}} = cos(φ_0))

so:

x(t)=A[cos(φ0)sen(ω0t)+sen(φ0)sen(ω0t)]=(TeX formula:  x(t) = A[cos(φ_0) sen(ω_0t) + sen(φ_0) sen(ω_0t)] = )

A[sen(ω0t+φ0)](TeX formula:   A[sen(ω_0t + φ_0)] )

homework 1

linear independence of Fourier terms

let vn(x)=12aeinπax(TeX formula: v_n(x) = \frac{1}{\sqrt{2a}} e^{i \frac{nπ}{a}x}) with n=0,±1,±2,...(TeX formula: n = 0, ±1, ±2, ...) be functions on the interval [a,a](TeX formula: \left[−a, a\right]) . prove that vn·vm=δnm(TeX formula: v_n · v_m = δ_{nm}) , given the proper definition of the dot product.

let δnm={1n=m0nm(TeX formula: δ_{nm} = \left\{ \begin{array}{cc} 1 & ⇔ n=m \\                                         0 & ⇔ n≠m \\ \end{array} \right.) be Dirac's cummulative delta distribution; and let Vn·Vm=aadxVn(x)Vm(x)(TeX formula: V_n·V_m = ∫_{-a}^{a} dx\; V_n^⋆(x) V_m(x)) be the scalar product for functions of the vector basis defined by Vn(x)(TeX formula: V_n(x)) .

proof by modus ponens follows:

  • restatement of conditional premise

given the above definitions; if Vn·Vm=δnm(TeX formula: V_n·V_m = δ_{nm}) , then Vn(x)(TeX formula: V_n(x)) is an orthogonal basis. that is:

nm((Vn·Vn=1)(Vn·Vm=0;nm)Vn(x) is orthogonal)(TeX formula:  ∀n∀m \; ((V_n·V_n = 1) ∧ (V_n·V_m = 0; n≠m) ⇒ V_n(x) \text{ is orthogonal}) )

  • proof of the antecedent premise

indeed: nm((Vn·Vn=1)(Vn·Vm=0))(TeX formula: ∀n∀m \; ((V_n·V_n = 1) ∧ (V_n·V_m = 0)))

because:

(aadxVn(x)Vn(x)=1)(aadxVn(x)Vm(x)=0)(TeX formula:  ⊢ \left( ∫_{-a}^{a} dx\; V_n^⋆(x) V_n(x) = 1 \right) ∧ \left( ∫_{-a}^{a} dx\; V_n^⋆(x) V_m(x) = 0 \right) )

(aadx12aeinπx/a12aeinπx/a=1)(aadx12aeinπx/a12aeimπx/a=0)(TeX formula:  ⊢ \left( ∫_{-a}^{a} dx\; \frac{1}{\sqrt{2a}}e^{inπx/a} \frac{1}{\sqrt{2a}}e^{-inπx/a} = 1 \right) ∧ \left( ∫_{-a}^{a} dx\; \frac{1}{\sqrt{2a}}e^{inπx/a} \frac{1}{\sqrt{2a}}e^{-imπx/a} = 0 \right) )

(12aaadxeinπx/aeinπx/a=1)(12aaadxeinπx/aeimπx/a=0)(TeX formula:  ⊢ \left( \frac{1}{2a} ∫_{-a}^{a} dx\; e^{inπx/a} e^{-inπx/a} = 1 \right) ∧ \left( \frac{1}{2a} ∫_{-a}^{a} dx\; e^{inπx/a} e^{-imπx/a} = 0 \right) )

(12aaadxe(inπx/a)(inπx/a)=1)(12aaadxe(inπx/a)(imπx/a)=0)(TeX formula:  ⊢ \left( \frac{1}{2a} ∫_{-a}^{a} dx\; e^{(inπx/a)-(inπx/a)} = 1 \right) ∧ \left( \frac{1}{2a} ∫_{-a}^{a} dx\; e^{(inπx/a)-(imπx/a)} = 0 \right) )

(12aaadxe0=1)(12aaadxeiπx(nm)/a=0)(TeX formula:  ⊢ \left( \frac{1}{2a} ∫_{-a}^{a} dx\; e^0 = 1 \right) ∧ \left( \frac{1}{2a} ∫_{-a}^{a} dx\; e^{iπx(n-m)/a} = 0 \right) )

from Euler's formula:

(12aaadx=1)(12aaadx(cos(πx(nm)a)+isen(πx(nm)a))=0)(TeX formula:  ⊢ \left( \frac{1}{2a} ∫_{-a}^{a} dx = 1 \right) ∧ \left( \frac{1}{2a} ∫_{-a}^{a} dx\; (cos(\frac{πx(n-m)}{a}) + i\; sen(\frac{πx(n-m)}{a})) = 0 \right) )

(x2a|aa=1)(12aaadx(cos(πx(nm)a)+isen(πx(nm)a))=0)(TeX formula:  ⊢ \left( \left. \frac{x}{2a} \right|_{-a}^{a} = 1 \right) ∧ \left( \frac{1}{2a} ∫_{-a}^{a} dx\; (cos(\frac{πx(n-m)}{a}) + i\; sen(\frac{πx(n-m)}{a})) = 0 \right) )

from the integration of the odd function sen(πx(nm)a)(TeX formula: sen(\frac{πx(n-m)}{a})) over a zero-centered interval, [a,a](TeX formula: [-a, a]) :

(a2aa2a=1)(12aaadx(cos(πx(nm)a)+0)=0)(TeX formula:  ⊢ \left( \frac{a}{2a} - \frac{-a}{2a} = 1 \right) ∧ \left( \frac{1}{2a} ∫_{-a}^{a} dx\; (cos(\frac{πx(n-m)}{a}) + 0) = 0 \right) )

(1=1)(12aaadxcos(πx(nm)a)=0)(TeX formula:  ⊢ \left( 1 = 1 \right) ∧ \left( \frac{1}{2a} ∫_{-a}^{a} dx\; cos(\frac{πx(n-m)}{a}) = 0 \right) )

let u=πx(nm)a(TeX formula: u = \frac{πx(n-m)}{a}) ; then dudx=π(mn)a(TeX formula: \frac{du}{dx} = \frac{π(m-n)}{a}) .

(12aaacos(u)π(nm)adxaπ(nm)=0)(TeX formula:  ⊢ ⊤ ∧ \left( \frac{1}{2a} ∫_{-a}^{a} cos(u)\frac{π(n-m)}{a} \; dx\; \frac{a}{π(n-m)} = 0 \right) )

(a2aπ(nm)aacos(u)du=0)(TeX formula:  ⊢ ⊤ ∧ \left( \frac{a}{2aπ(n-m)} ∫_{-a}^{a} cos(u) \; du = 0 \right) )

(a2aπ(nm)[sen(u)]aa=0)(TeX formula:  ⊢ ⊤ ∧ \left( \frac{a}{2aπ(n-m)} \left[ sen(u) \right]_{-a}^{a} = 0 \right) )

(a2aπ(nm)[sen(π(a)(nm)a)sen(π(a)(nm)a)]=0)(TeX formula:  ⊢ ⊤ ∧ \left( \frac{a}{2aπ(n-m)} \left[ sen(\frac{π(a)(n-m)}{a}) - sen(\frac{π(-a)(n-m)}{a}) \right] = 0 \right) )

note that (nm)(TeX formula: (n-m) ∈ ℤ) . nm(sen(π(nm)))=0(TeX formula: ⊢ ∀n∀m \; (sen(π(n-m))) = 0)

(a2aπ(nm)[00]=0)(TeX formula:  ⊢ ⊤ ∧ \left( \frac{a}{2aπ(n-m)} \left[0 - 0 \right] = 0 \right) )

(TeX formula:  ⊢ ⊤ ∧ ⊤ )

  • conclusion

Vn(x)(TeX formula: ⊢ V_n(x)) is an orthogonal basis.

Fourier transform

the Fourier series represents a periodic function as a discrete linear combination of sines and cosines . on the other hand, the Fourier transform is capable of representing a more general set of functions, not restricted to being periodic. how is that achieved?

(for convenience, we will start from the series in complex exponential notation)

f(x)f0=n=1[ancos(nπxa)+bnsen(nπxa)](TeX formula:  f(x) -f_0  = ∑_{n=1}^∞ \left[ a_n cos\left( \frac{nπx}{a} \right) + b_n sen\left( \frac{nπx}{a} \right) \right] )

=(12aaaf(x)einπx/adx)αneinπx/a(TeX formula:  = ∑_{-∞}^∞ \underbrace{ \left( \frac{1}{2a} ∫_{-a}^{a} f(x)e^{-inπx/a} \;dx \right) }_{α_n} e^{inπx/a} )

if f(x)(TeX formula: f(x)) weren't periodic, the series would be representing it only at [a,a](TeX formula: [-a, a]) . nonetheless, we can make the interval arbitrarily large:

=lima(12aaaf(x)einπx/adx)αneinπx/a(TeX formula:  = lim_{a → ∞} ∑_{-∞}^∞ \underbrace{ \left( \frac{1}{2a} ∫_{-a}^{a} f(x)e^{-inπx/a} \;dx \right) }_{α_n} e^{inπx/a} )

let kn=nπa(TeX formula: k_n = \frac{nπ}{a}) , then Δk=πa(TeX formula: Δk = \frac{π}{a}) . substituting in the last expression yields:

=limaΔk(Δk)1(12a)(aaf(x)eiknxdx)(eiknx)(TeX formula:   = lim_{a → ∞} ∑_{-∞}^∞ Δk \left( Δk \right)^{-1} \left( \frac{1}{2a} \right) \left( ∫_{-a}^{a} f(x)e^{-ik_nx} \;dx \right) \left( e^{ik_nx} \right) )

=lima(πa)(a2aπ)(aaf(x)eiknxdx)(eiknx)(TeX formula:   = lim_{a → ∞} ∑_{-∞}^∞ \left( \frac{π}{a} \right) \left( \frac{a}{2aπ} \right) \left( ∫_{-a}^{a} f(x)e^{-ik_nx} \;dx \right) \left( e^{ik_nx} \right) )

=limΔk012πΔk(f(x)eiknxdx)(eiknx)(TeX formula:   = lim_{Δk → 0} \;\frac{1}{2π} ∑_{-∞}^∞ Δk \left( ∫_{-∞}^{∞} f(x)e^{-ik_nx} \;dx \right) \left( e^{ik_nx} \right) )

which is a Riemman sum for variable kn(TeX formula: k_n) :

=12πdkn(f(x)eiknxdx)(eiknx)(TeX formula:   = \frac{1}{2π} ∫_{-∞}^∞ dk_n\; \left( ∫_{-∞}^{∞} f(x)e^{-ik_nx} \;dx \right) \left( e^{ik_nx} \right) )

=(12π)2(f(x)eiknxdx)eiknxdkn(TeX formula:   = \left(\sqrt{\frac{1}{2π}}\right)^2 ∫_{-∞}^∞ \left( ∫_{-∞}^{∞} f(x)e^{-ik_nx} \;dx \right) e^{ik_nx} \;dk_n )

=12π(12πf(x)eiknxdx)Fourier transformeiknxdknInverse Fourier transform(TeX formula:   = \underbrace{ \frac{1}{\sqrt{2π}} ∫_{-∞}^∞ \underbrace{ \left( \frac{1}{\sqrt{2π}} ∫_{-∞}^{∞} f(x)e^{-ik_nx} \;dx \right) }_{\text{Fourier transform}} e^{ik_nx} \;dk_n }_{\text{Inverse Fourier transform}} )

properties

which symmetry properties does H(f) has if h(t) is:

  1. odd real
  2. odd imaginary
  3. odd complex

and which symmetry properties does h(t) has if H(f ) is:

  1. odd real
  2. even complex
  3. even imaginary

recall that:

H(f)=[r(t)+ij(t)][cos(2πft)+isen(2πft)]dt(TeX formula:  H(f) = ∫_{-∞}^∞ [r(t)+ij(t)][cos(2πft) + isen(2πft)]dt )

=[r(t)cos(2πft)+j(t)sen(2πft)]dt+i[j(t)cos(2πft)r(t)sen(2πft)]dt;(TeX formula:       =  ∫_{-∞}^∞ [r(t)cos(2πft)+j(t)sen(2πft)]dt + i∫_{-∞}^∞ [j(t)cos(2πft)-r(t)sen(2πft)]dt; )

h(t)=[R(f)+iJ(f)][cos(2πft)+isen(2πft)]dt(TeX formula:  h(t) = ∫_{-∞}^∞ [R(f)+iJ(f)][cos(2πft) + isen(2πft)]dt )

=[R(f)cos(2πft)+J(f)sen(2πft)]dt+i[J(f)cos(2πft)R(f)sen(2πft)]dt.(TeX formula:       =  ∫_{-∞}^∞ [R(f)cos(2πft)+J(f)sen(2πft)]dt + i∫_{-∞}^∞ [J(f)cos(2πft)-R(f)sen(2πft)]dt. )

odd real h(t)

we get rid of the imaginary part of H(f):

H(f)=[r(t)cos(2πft)+0)]dt+i[0r(t)sen(2πft)]dt(TeX formula:  H(f)  =  ∫_{-∞}^∞ [r(t)cos(2πft)+{0})]dt + i∫_{-∞}^∞ [{0}-r(t)sen(2πft)]dt )

from integration of an odd function (r(t)cos(2πft)) at a symmetric interval:

H(f)=0+i[r(t)sen(2πft)]dt(TeX formula:  H(f)  = {0} + i∫_{-∞}^∞ [r(t)sen(2πft)]dt )

sen(2πft)(TeX formula: sen(2πft)) is odd. H(f)(TeX formula: ∴ { H(f)}) is odd and imaginary.

odd imaginary h(t)

same reasoning:

H(f)=[0+j(t)sen(2πft)]dt+i[j(t)cos(2πft)0]dt(TeX formula:  H(f)  =  ∫_{-∞}^∞ [{0}+j(t)sen(2πft)]dt + i∫_{-∞}^∞ [j(t)cos(2πft)-{0}]dt )

H(f)=[j(t)sen(2πft)]dt+0(TeX formula:  H(f)  =  ∫_{-∞}^∞ [j(t)sen(2πft)]dt + {0} )

sen(2πft)(TeX formula: sen(2πft)) is odd. H(f)(TeX formula: ∴ {H(f)}) is odd and real.

odd h(t)

H(f)=[0+j(t)sen(2πft)]dt+i[0r(t)sen(2πft)]dt(TeX formula:  H(f) =  ∫_{-∞}^∞ [{0}+j(t)sen(2πft)]dt + i∫_{-∞}^∞ [{0}-r(t)sen(2πft)]dt )

sen(2πft)(TeX formula: sen(2πft)) is odd. H(f)(TeX formula: ∴ {H(f)}) is odd and complex.

odd real H(f)

h(t)=[R(f)cos(2πft)+0]dt+i[0R(f)sen(2πft)]dt(TeX formula:  h(t) =  ∫_{-∞}^∞ [R(f)cos(2πft)+{0}]dt + i∫_{-∞}^∞ [{0}-R(f)sen(2πft)]dt )

h(t)=0+iR(f)sen(2πft)dt(TeX formula:  h(t) =  {0} + i∫_{-∞}^∞ R(f)sen(2πft)dt )

sen(2πft)(TeX formula: sen(2πft)) is odd. h(t)(TeX formula: ∴ {h(t)}) is imaginary and odd.

complex even H(f)

h(t)=[R(f)cos(2πft)+0]dt+i[J(f)cos(2πft)0]dt(TeX formula:  h(t) =  ∫_{-∞}^∞ [R(f)cos(2πft)+{0}]dt + i∫_{-∞}^∞ [J(f)cos(2πft)-{0}]dt )

cos(2πft)(TeX formula: cos(2πft)) is even. h(t)(TeX formula: ∴ {h(t)}) is even and complex.

imaginary even H(f)

h(t)=[0+J(f)sen(2πft)]dt+i[J(f)cos(2πft)0]dt(TeX formula:  h(t) =  ∫_{-∞}^∞ [{0}+J(f)sen(2πft)]dt + i∫_{-∞}^∞ [J(f)cos(2πft)-{0}]dt )

h(t)=0+iJ(f)cos(2πft)dt(TeX formula:  h(t) =  {0} + i∫_{-∞}^∞ J(f)cos(2πft)dt )

cos(2πft)(TeX formula: cos(2πft)) is even. h(t)(TeX formula: ∴ {h(t)}) is even and imaginary.

convolution: graphical interpretation

let h(t)=et(TeX formula: h(t) = e^{−t}) for t ≥ 0, and h(t) = 0 elsewhere. also let x(t) = sen(t) for 0 ≤ t ≤ π/2 and x(t) = 0 elsewhere. graphically estimate the convolution of these two functions.

#!/usr/bin/env python3
# convolution graphical demo
# Copyright 2018 Isaac David
# License: GNU AGPLv3
%matplotlib inline
from ipywidgets import interactive, IntSlider, FloatSlider
import matplotlib.pyplot as plt
import numpy as np
import math
def x(t):
    if 0 <= t and t <= (math.pi / 2):
        return math.sin(t)
    else:
        return 0
def h(t):
    if t > 0:
        return math.exp(-t)
    else:
        return 0
def part_convolution(mini, t):
    time = np.arange(0, t, 0.01)
    x2 = []
    h2 = []
    for i in time:
        x2.append(x(i))
        h2.append(h(i))
    convolution = np.convolve(x2, h2, 'same') # produce array of 'same' size as x and h
    convolution_normalized = convolution / (max(convolution) + 0.001)
    # plotting
    fig=plt.figure(figsize=(12, 5))
    plt.plot(time, 2 * convolution_normalized)
    plt.plot(time, x2)
    plt.plot(time, h2[::-1]) # [::-1] reverses h2
    plt.ylim(0, max(2.2 * convolution_normalized))
    plt.xlim(-1, 5)
    plt.xlabel('t')
    plt.ylabel('conv(x, h) / max(convolution(x, h))')
    plt.axhline(0, color='gray')
    plt.show()
form = interactive(part_convolution,
                   t = FloatSlider(min=0, max=10, step=0.01, value=0.01),
                   mini = IntSlider(min=-10, max=0, step=1, value=0))
form

(Image "Figure ")

(Image "Figure ")

(Image "Figure ")

(Image "Figure ")
```

convolution theorem

y(t)=x(t)h(t)=x(τ)h(tτ)dτ(TeX formula: y(t) = x(t)∗h(t) = ∫_{-∞}^∞ x(τ)h(t-τ)dτ) is the convolution of functions x(t) y h(t). F[y(t)] denotes its Fourier transform:

F[y(t)]=y(t)e2πiftdt(TeX formula:  F[y(t)] = ∫_{-∞}^∞ y(t)e^{-2πift}dt )

=[x(τ)h(tτ)dτ]e2πiftdt(TeX formula:          = ∫_{-∞}^∞ \left[ ∫_{-∞}^∞ x(τ)h(t-τ)dτ \right] e^{-2πift}dt )

=x(τ)[h(tτ)e2πiftdt]dτ(TeX formula:          = ∫_{-∞}^∞ x(τ) \left[ ∫_{-∞}^∞ h(t-τ) e^{-2πift}dt \right]dτ )

let u=t-τ.

=x(τ)[h(u)e2πif(u+τ)du]dτ(TeX formula:          = ∫_{-∞}^∞ x(τ) \left[ ∫_{-∞}^∞ h(u)e^{-2πif(u+τ)}du \right]dτ )

=x(τ)[h(u)e2πifue2πifτdu]dτ(TeX formula:          = ∫_{-∞}^∞ x(τ) \left[ ∫_{-∞}^∞ h(u)e^{-2πifu}e^{-2πifτ}du \right]dτ )

=[x(τ)e2πifτdτ][h(u)e2πifudu](TeX formula:          = \left[ ∫_{-∞}^∞ x(τ) e^{-2πifτ}dτ \right] \left[ ∫_{-∞}^∞ h(u)e^{-2πifu}du \right] )

=X(f)H(f)(TeX formula:  = X(f)H(f))

therefore:

x(t)h(t)=F1[X(f)H(f)](TeX formula:  x(t)∗h(t) = F^{-1} \left[ X(f)H(f) \right] )

time-domain convolution is equivalent to frequency-domain product!

cross-correlation theorem

zx,h(t)=x(τ)h(t+τ)dτ(TeX formula: z_{x,h}(t) = ∫_{-∞}^∞ x(τ)h(t+τ)dτ) is the correlation of functions x(t) y h(t) as a function of a time lag between them. F[z(t)] denotes its Fourier transform:

F[z(t)]=z(t)e2πiftdt(TeX formula:  F[z(t)] = ∫_{-∞}^∞ z(t)e^{-2πift}dt )

=[x(τ)h(t+τ)dτ]e2πiftdt(TeX formula:          = ∫_{-∞}^∞ \left[ ∫_{-∞}^∞ x(τ)h(t+τ)dτ \right] e^{-2πift}dt )

=x(τ)[h(t+τ)e2πiftdt]dτ(TeX formula:          = ∫_{-∞}^∞ x(τ) \left[ ∫_{-∞}^∞ h(t+τ) e^{-2πift}dt \right]dτ )

let u=t+τ.

=x(τ)[h(u)e2πif(uτ)du]dτ(TeX formula:          = ∫_{-∞}^∞ x(τ) \left[ ∫_{-∞}^∞ h(u)e^{-2πif(u-τ)}du \right]dτ )

=x(τ)[h(u)e2πifue2πifτdu]dτ(TeX formula:          = ∫_{-∞}^∞ x(τ) \left[ ∫_{-∞}^∞ h(u)e^{-2πifu}e^{2πifτ}du \right]dτ )

=[x(τ)e2πifτdτ][h(u)e2πifudu](TeX formula:          = \left[ ∫_{-∞}^∞ x(τ) e^{2πifτ}dτ \right] \left[ ∫_{-∞}^∞ h(u)e^{-2πifu}du \right] )

=X*(f)H(f)(TeX formula:  = X^*(f)H(f))

therefore:

zx,h=F1[X*(f)H(f)](TeX formula:  z_{x,h} = F^{-1} \left[ X^*(f)H(f) \right] )

cross-correlation is equivalent to frequency domain product (with conjugate X(f)).

uncertainty principle

the more short-lived the wave in the time domain, the more widespread its power spectrum (a.k.a. frequency spectrum). vice versa.

discrete Fourier transform

the computation of a DFT is done segment by segment. the signal is multiplied by some "window" function (e.g. a square pulse) which is zero outside the window. this is known as windowing.

the effect of using a finite window is that unexisting frequencies appear at the power spectrum (around the original frequencies). this phenomenon is known as leakage. the explanation is evident from the convolution theorem: one can use similar reasoning to show that h(t)x(t)=F1[H(f)X(f)](TeX formula: h(t)x(t) = F^{-1} \left[ H(f)∗X(f) \right]) . therefore, multiplication by a window will induce a convolution in the frequency domain.

low frequencies (and therefore non-stationary systems) are the most problematic to compute a DFT for, since the window may not be long enough to capture them. there's no single test for stationarity. it can be tested for nonetheless, measuring the effect of varying window sizes on different parameters (centrality and spread statistics, Lyapunov exponent, etc.).

Whittaker–Shannon (sinc) interpolation

what function should we convolve the signal's Fourier transform with in order to obtain the same result as windowing it with a rectangular function? we will analyze the closely-related case of a square pulse window:

calculate the first three terms of the Fourier series for function f(x)={12nπx(2n+1)π1(2n+1)πx(2n+2)π(TeX formula: f(x) = \left\{ \begin{array}{cc} 1 & ⇔ 2nπ ≤ x ≤ (2n+1)π \\ -1 & ⇔ (2n+1)π ≤ x ≤ (2n+2)π \\ \end{array} \right.) , with n=0,±1,±2,...(TeX formula: n = 0, ±1, ±2, ...)

in terms of the Fourier series:

f(x)=12aaaf(x)dxf0+n=1[(1aaadxf(x)cos(nπxa))ancos(nπxa)+(1aaadxf(x)sen(nπxa))bnsen(nπxa)](TeX formula:  f(x) = \underbrace{ \frac{1}{2a}∫_{-a}^{a}f(x)dx}_{f_0} + ∑_{n=1}^∞ \left[ \underbrace{ \left( \frac{1}{a} ∫_{-a}^{a}dx\; f(x)cos\left( \frac{nπx}{a} \right) \right)}_{a_n} cos\left( \frac{nπx}{a} \right) + \underbrace{ \left( \frac{1}{a} ∫_{-a}^{a}dx\; f(x)sen\left( \frac{nπx}{a} \right) \right)}_{b_n} sen\left( \frac{nπx}{a} \right) \right] )

from the integration of odd functions ( f(x)cos(nπxa)(TeX formula: f(x)cos\left(\frac{nπx}{a}\right)) and f(x)(TeX formula: f(x)) ) at symmetrical interval ( [a,a](TeX formula: [-a, a]) ):

f(x)=0f0+n=1[(0)an(cos(nπxa))+(1aaadxf(x)sen(nπxa))bnsen(nπxa)](TeX formula:  ⊢ f(x) = \underbrace{0}_{f_0} + ∑_{n=1}^∞ \left[ \underbrace{\left(0\right)}_{a_n} \left( cos\left( \frac{nπx}{a} \right)\right) + \underbrace{ \left( \frac{1}{a} ∫_{-a}^{a}dx\; f(x)sen\left( \frac{nπx}{a} \right) \right)}_{b_n} sen\left( \frac{nπx}{a} \right) \right] )

f(x)=n=1(1aaadxf(x)sen(nπxa))bnsen(nπxa)(TeX formula:  ⊢ f(x) = ∑_{n=1}^∞ \underbrace{ \left( \frac{1}{a} ∫_{-a}^{a}dx\; f(x)sen\left( \frac{nπx}{a} \right) \right)}_{b_n} sen\left( \frac{nπx}{a} \right) )

we will consider the interval [a,a]=[π,π](TeX formula: [-a, a] = [-π, π]) , which includes a full period of f(x)sen(nπx/π)(TeX formula: f(x)sen(nπx/π)) for any n. therefore:

f(x)=n=1(1πππdxf(x)sen(nπxπ))bnsen(nπxπ)(TeX formula:  ⊢ f(x) = ∑_{n=1}^∞ \underbrace{ \left( \frac{1}{π} ∫_{-π}^{π}dx\; f(x)sen\left( \frac{nπx}{π} \right) \right)}_{b_n} sen\left( \frac{nπx}{π} \right) )

f(x)=n=11π(π0dx(1)sen(nx)+0πdx(+1)sen(nx))bnsen(nx)(TeX formula:  ⊢ f(x) = ∑_{n=1}^∞ \underbrace{ \frac{1}{π} \left( ∫_{-π}^{0} dx\; (-1)sen(nx) + ∫_{0}^{π}  dx\; (+1)sen(nx) \right)}_{b_n} sen(nx) )

f(x)=n=11π(1n[cos(nx)]π01n[cos(nx)]0π)bnsen(nx)(TeX formula:  ⊢ f(x) = ∑_{n=1}^∞ \underbrace{ \frac{1}{π} \left( \frac{1}{n} \left[ cos(nx) \right]_{-π}^{0} - \frac{1}{n} \left[ cos(nx) \right]_{0}^{π} \right)}_{b_n} sen(nx) )

f(x)=n=11nπ(cos(0)cos(nπ)cos(nπ)+cos(0))bnsen(nx)(TeX formula:  ⊢ f(x) = ∑_{n=1}^∞ \underbrace{ \frac{1}{nπ} \left( cos(0) - cos(-nπ) -cos(nπ) + cos(0) \right)}_{b_n} sen(nx) )

f(x)=n=11nπ(2cos(0)2cos(nπ))bnsen(nx)(TeX formula:  ⊢ f(x) = ∑_{n=1}^∞ \underbrace{ \frac{1}{nπ} \left( 2cos(0) - 2cos(nπ) \right)}_{b_n} sen(nx) )

f(x)=n=11nπ(22cos(nπ))bnsen(nx)(TeX formula:  ⊢ f(x) = ∑_{n=1}^∞ \underbrace{ \frac{1}{nπ} \left( 2 - 2cos(nπ) \right)}_{b_n} sen(nx) )

f(x)=n=11nπ({22n even2+2n odd)bnsen(nx)(TeX formula:  ⊢ f(x) = ∑_{n=1}^∞ \underbrace{ \frac{1}{nπ} \left( \left\{ \begin{array}{cc} 2-2 & ⇔ n \text{ even} \\ 2+2 & ⇔ n \text{ odd} \\ \end{array} \right. \right)}_{b_n} sen(nx) )

f(x)=n=1{0n even4nπsen(nx)n odd(TeX formula:  ⊢ f(x) = ∑_{n=1}^∞ \left\{ \begin{array}{cc} 0 & ⇔ n \text{ even} \\ \frac{4}{nπ}sen(nx) & ⇔ n \text{ odd} \\ \end{array} \right. )

f(x)=n=04π(2n+1)sen(x(2n+1))(TeX formula:  ⊢ f(x) = ∑_{n=0}^∞ \frac{4}{π(2n+1)}sen(x(2n+1)) )

=4πn=0sen(x(2n+1))2n+1(TeX formula:         = \frac{4}{π} ∑_{n=0}^∞ \frac{sen(x(2n+1))}{2n+1} )

f(x)=0f0+4πsen(x)+0+43πsen(3x)+0+45πsen(5x)+...(TeX formula:  ⊢ f(x) = \underbrace{0}_{f_0} + \frac{4}{π}sen(x) + 0 + \frac{4}{3π}sen(3x) + 0 + \frac{4}{5π}sen(5x) + ...)

f(x) could be just a discrete sample of a continuous signal, but because convolution with sinc(x) produces a continuous function (a sum of sine waves), the operation will fill in all the missing time points.

Nyquist-Shannon sampling theorem

continuous functions of bounded frequency bandwidth ("band-limited") contain a bounded amount of information. they can be perfectly represented using a function of countable (i.e. discrete) sets: the function's Fourier coefficient/phase pairs.

the Nyquist frequency is the maximum sampling frequency at which the digitization of a continuous signal still losses fidelity. that is, aliasing occurs:

fNyquist=2fmax(TeX formula:  f_{Nyquist} = 2 \; f_{max} )

sampling frequency should be greater than twice the maximum frequency in the power spectrum of the original signal.

undersampling results in the unconsidered high frequencies aliasing (adding up) over fNyquist(ffNyquist)(TeX formula: f_{Nyquist} - (f - f_{Nyquist})) at the frequency domain. oversampling is harmless, beyond being a waste of disk space.

testing for undersampling

what if the maximum frequency isn't known in advance? it is possible to test that the maximum frequency has been considered, because aliasing will make two power spectra of the same signal look dissimilar under two different sampling frequencies:

  1. register using two sampling frequencies, one greater than the one to test for the Nyquist criterion.
  2. compute both Fourier transforms.
  3. if they are simply scaled versions of one another, aliasing didn't occur. i.e. the ratio between two features (e.g. maxima) should stay constant.

  1. complexity doesn't imply using advanced math, for it can emerge from very simple descriptions (see rule 110 for instance). this page uses calculus (including some differential equations), inferential statistics (also the fundamentals of information theory), bits of graph theory and linear algebra; most (or all) of which should be familiar to STEM undergraduates. topics like Fourier analysis and chaos theory are introduced from there. 

  2. not to be confused with "complicated" or "difficult"