傅立葉轉換(Fourier Transform)

Mathematics   Yoshio    Sep 8th, 2023 at 8:00 PM    8    0   

泰勒展開式(Taylor Expansion)

泰勒級數 Taylor Series

Taylor Series

A Taylor series is a series expansion of a function about a point. A one-dimensional Taylor series is an expansion of a real function \(f(x)\) about a point \(x=a\) is given by

\[f(x)=f(a)+f'(a)(x-a)+\frac{f''(a)}{2!}(x-a)^2+\frac{f^{(3)}(a)}{3!}(x-a)^3+\cdots+\frac{f^{(n)}(a)}{n!}(x-a)^n\]

where \(n!\) denotes the factorial of \(f(n)\). In the more compact sigma notation, this can be written as

\[\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n\]




In mathematics, a Power Series is an infinite series of the form

\[f(x)=a_0+a_1(x\;-\;c)+a_2{(x\;-\;c)}^2+...+a_n{(x\;-\;c)}^n=\sum_{n=0}^\infty a_n(x\;-\;c)^n\]

When the center of the series is equal to zero, it is called by Maclaurin Series and takes the simpler form

\[f(x)=a_0+a_1x+a_2x^2+...+a_nx^n=\sum_{n=0}^\infty a_nx^n\]

A polynomial in a single indeterminate x can always be written in the form

\[f(x) = c_0 + c_1 x + c_2 x^2 + ...+ c_k x^k+...=\sum_{k=0}^\infty c_k x^k\]

\(f^{'}(x)=\frac{df(x)}{dx}=c_1+c_2\cdot2\cdot x+c_3\cdot3\cdot x^2+c_4\cdot4\cdot x^3+...\)

\(f^{''}(x)=\frac{df^{'}(x)}{dx}=c_2\cdot2\cdot1+c_3\cdot3\cdot2\cdot x+c_4\cdot4\cdot3\cdot x^2+...\)

\(f^{'''}(x)=\frac{df^{''}(x)}{dx}=c_3\cdot3\cdot2\cdot1+c_4\cdot4\cdot3\cdot2\cdot x+...\)

\(f^{(k)}(x)=\frac{df^{(k-1)}(x)}{dx}=c_k\cdot k!+c_{k+1}\cdot(k+1)!\cdot x+...\)

\(c_k = \frac{f^{(k)}(0)}{k!}\)

\[f(x)=f(0)+\frac{f'(0)}{1!}x+...+\frac{f^{(k)}(0)}{k!}x^k+...=\sum_{k=0}^\infty\frac{f^{(k)}(0)}{k!}x^k\]

\[f(x) = c_0 + c_1 x + c_2 x^2 + ...+ c_k x^k+...=\sum_{k=0}^\infty c_k x^k\]

When the center of the series moves to \(a\)

\[f(x)=f(a)+\frac{f^{'}(a)}{1!}(x-a)+...+\frac{f^{(k)}(a)}{k!}(x-a)^k+...=\sum_{k=0}^\infty\frac{f^{(k)}(a)}{k!}(x-a)^k\]




For Complex Function

\[f(z)=\sum_{n=0}^\infty a_n(z-z_0)^n,\;\left|z-z_0\right|<{R}\]

\[a_n=\frac{f^{(n)}(z_0)}{n!},\;n=0,1,2,...\]


Maclaurin series

Most Maclaurin series expressible in terms of elementary functions can be determined through the composition and combination of the following functions:

Function Maclaurin Series Interval of Convergence
\(\dfrac{1}{1-x}\) \(\displaystyle \sum_{k=0}^{\infty} x^k\) \(-1 < x < 1\)
\(e^x\) \(\displaystyle \sum_{k=0}^{\infty} \dfrac{x^k}{k!}\) \(-\infty < x < \infty\)
\(\ln(1+x)\) \(\displaystyle \sum_{k=1}^{\infty} \dfrac{(-1)^{k+1}x^k}{k}\) \(-1 < x \leqslant 1\)
\(\sin x\) \(\displaystyle \sum_{k=0}^{\infty} \dfrac{(-1)^k x^{2k+1}}{(2k+1)!}\) \(-\infty < x < \infty\)
\(\cos x\) \(\displaystyle \sum_{k=0}^{\infty} \dfrac{(-1)^k x^{2k}}{(2k)!}\) \(-\infty < x < \infty\)

Laurent series

In the mathematics, the Laurent series of a complex function \(f(z)\) is a representation of that function as a power series which includes terms of negative degree.

Suppose that \(f(z)\) is analytic on the annulus

\[A: r_1 < |z - z_0|\;{<}\;r_2\]

Then \(f(z)\) can be expressed as a series

\[f(z)=\sum_{n=0}^\infty a_n(z-z_0)^n+\sum_{n=1}^\infty\frac{b_n}{(z-z_0)^n}\]

The coefficients have the formulus

\[a_n=\frac1{2\pi i}\oint_C\frac{f(z)dz}{(z-z_0)^{n+1}},\;n=0,\;1,\;2,\;...\]

\[b_n=\frac1{2\pi i}\oint_C(z-z_0)^{n-1}f(z)dz,\;n=1,\;2,\;3,\;...\]

where \(C\) is any circle \(|z-z_0|=r\) inside the annulus

Furthermore

The series \(\sum_{n = 0}^{\infty} a_n (z - z_0)^n\) converges to an analytic function for \(|z - z_0| {<} r_2\).

It is called the analytic or regular part of the Laurent series. [positive powers] (Taylor series)

The series \(\sum_{n = 1}^{\infty} \dfrac{b_n}{(z - z_0)^n}\) converges to an analytic function for \(|z - z_0| {>} r_1\).

It is called the singular or principal part of the Laurent series. [negative powers]



\[f(z)=...+\frac{a_{-m}}{{(z-z_0)}^m}+\frac{a_{-m+1}}{{(z-z_0)}^{m-1}}+...+\frac{a_{-2}}{{(z-z_0)}^2}+\frac{a_{-1}}{z-z_0}+a_0+a_1(z-z_0)+...\]

\[f(z)=\sum_{n=-\infty}^\infty a_n(z-z_0)^n\]

\[a_n=\frac1{2\mathrm{πi}}\oint_C\frac{f(z)}{{(z-z_0)}^{n+1}}dz,\;z_o\;is\;not\;at\;ROC\]

\[f(z)=\sum_{n=-\infty}^\infty(\frac1{2\mathrm{πi}}\oint_C\frac{f(w)}{{(w-z_0)}^{k+1}}dw)(z-z_0)^n\]


Cauchy's integral formula

\[f(a)=\frac1{2\mathrm{πi}}\oint_C\frac{f(z)}{z-a}dz\]

Ex

\(let\;C\;be\;the\;contour\;described\;by\;\left|z-1\right|=4,\;To\;find\;\oint_C\frac{e^{3z}}{z-\mathrm{πi}}dz\;around\;the\;contour\;C\)

\(f(a)=\frac1{2\mathrm{πi}}\oint_C\frac{f(z)}{z-a}dz\)

Sol

\(\oint_C\frac{f(z)}{z-a}dz=2\mathrm{πi}\cdot f(a)=2\mathrm{πi}e^{3\mathrm{πi}}\)

\(=2\mathrm{πi}(\cos3\mathrm\pi+\mathrm{isin}3\mathrm\pi)=-2\mathrm{πi}\)

Ex

To find \(\frac1{2\mathrm{πi}}\oint_C\frac{\mathrm{cosπ}z}{z^2-1}dz,\;C\;is\;the\;area\;(-2-i,\;2-i,\;2+i,-2+i)\)

Sol

\(\frac1{2\mathrm{πi}}\oint_C\frac{\mathrm{cosπ}z}{(z+1)(z-1)}dz=\frac1{2\mathrm{πi}}\cdot\frac12(\oint_C\frac{\mathrm{cosπ}z}{(z-1)}dz-\oint_C\frac{\mathrm{cosπ}z}{(z+1)}dz)\)

\(=\frac1{2\mathrm{πi}}\cdot\frac12\mathrm{cosπ}-\frac1{2\mathrm{πi}}\cdot\frac12\cos(-\mathrm\pi)=0\)

Pf

\(\oint_C\frac{f(z)}{z-a}dz=\oint_\Gamma\frac{f(z)}{z-a}dz\)

\(z=a+\varepsilon e^{i\theta}\)

\(dz=\varepsilon ie^{i\theta}d\theta\)

\(=\int_0^{2\mathrm\pi}\frac{f(a+\varepsilon e^{i\theta})}{\varepsilon e^{i\theta}}\varepsilon ie^{i\theta}d\theta\)

\(=i\int_0^{2\mathrm\pi}f(a+\varepsilon e^{i\theta})d\theta\)

\(\lim_{\varepsilon\rightarrow0}\oint_C\frac{f(z)}{z-a}dz=\lim_{\varepsilon\rightarrow0}i\int_0^{2\mathrm\pi}f(a+\varepsilon e^{i\theta})d\theta\)

\(=i\int_0^{2\mathrm\pi}f(a)d\theta\)

\(=2\mathrm{πi}\cdot\mathrm f(\mathrm a)\)

\(\therefore f(a)=\frac1{2\mathrm{πi}}\oint_C\frac{f(z)}{z-a}dz\)

Cauchy's differentiation formula

\[f^{(n)}(a)=\frac{n!}{2\mathrm{πi}}\oint_C\frac{f(z)}{{(z-a)}^{n+1}}dz\]

Ex

\(let\;C\;be\;the\;contour\;described\;by\;\left|z\right|=2,\;To\;find\;\oint_C\frac{e^{iz}}{z^3}dz\;around\;the\;contour\;C\)

\(f^{(n)}(a)=\frac{n!}{2\mathrm{πi}}\oint_C\frac{f(z)}{{(z-a)}^{n+1}}dz\)

\(\oint_C\frac{e^{iz}}{z^3}dz={\left.\frac{2\mathrm{πi}}{2!}f''(z)\right|}_{z=0}\)

\(=\frac{2\mathrm{πi}}{2!}\cdot i\cdot i\cdot{\left.e^{iz}\right|}_{z=0}=-\mathrm{πi}\)

傅立葉級數(Fourier Series)

Fourier Series

Fourier series is used to describe a periodic signal in terms of cosine and sine waves. In other other words, it allows us to model any arbitrary periodic signal with a combination of sines and cosines.

Consider expressing the Fourier series as

\[f(x)=\sum_{n=-\infty}^{+\infty}(a_n\cos\;nx+b_n\sin\;nx)\]

where \[a_n=\frac1{2\pi}\int_{-\pi}^{+\pi}f(t)cos\;nxt\;dt\]

and \[b_n=\frac1{2\pi}\int_{-\pi}^{+\pi}f(t)\sin\;nxt\;dt\]


The usual Fourier series involving sines and cosines is obtained by taking \(f_{1}(x) = cosx\) and \(f_2(x)=sinx\). Since these functions form a complete orthogonal system over \([-π,π]\), the Fourier series of a function \(f(x)\) is given by

where

\(a_{0} = \)

\(a_{n} = \)

\(b_{n} = \)

and \(n=1, 2, 3, ....\) Note that the coefficient of the constant term \(a_0\) has been written in a special form compared to the general form for a generalized Fourier series in order to preserve symmetry with the definitions of \(a_n\) and \(b_n\).

Note that \(cosϕ\) is an even function, i.e. \(cos(−ϕ)=cosϕ\), and therefore \(a_{-n} = a_n\). Similarly, \(sinϕ\) is an odd function, i.e. \(sin(-ϕ)=-sinϕ\), and therefore \(b_{-n} =-b_n\) . Thus, we can combine the terms with the positive and negative \(n\) of the same absolute value, which will result in doubled coefficients \(2a_n\) and \(2b_n\) for \(n > 0\), while the terms with \(n < 0\) will be dropped. Since the terms with \(n = 0\) do not have a pair, they will not be doubled, so \(a_0\) will remain the same, and \(b_0\) can be omitted since \(b_0 = 0\).


\(f(x)=\sum_{k=0}^\infty(A_k\cos\frac{2\pi kx}T+B_k\sin\frac{2\pi kx}T)\)

\(=A_0+\sum_{k=1}^\infty(A_k\cos\frac{2\pi kx}T+B_k\sin\frac{2\pi kx}T)\)

\(A_0:\;DC\;component\)

\(\frac{2\pi}T:\;fundamental\;component\)

\(\cos(\omega x),\;\cos(\frac{2\pi x}T),\;\cos(2\pi fx)\)

\(f:Hz,\;\omega=2\pi f=\frac{2\pi}T\)

\(\int_Tf(x)dx=\int_TA_0dx+\sum_{k=1}^\infty\int_TA_k\cos\frac{2\pi kx}Tdx+\sum_{k=1}^\infty\int_TB_k\sin\frac{2\pi kx}Tdx\)

\(=A_0T\)

\(\therefore A_0=\frac1T\int_Tf(t)dt\), mean value, average in one period


\(\int_Tf(x)\cos\frac{2\pi mx}Tdx,\;m=1,2,3,..\)

\(=\int_TA_0\cos\frac{2\pi mx}Tdx+\sum_{k=1}^\infty\int_TA_k\cos\frac{2\pi kx}T\cos\frac{2\pi mx}Tdx+\sum_{k=1}^\infty\int_TB_k\sin\frac{2\pi kx}T\cos\frac{2\pi mx}Tdx\)

\(\cos\frac{2\pi kx}T\cos\frac{2\pi mx}T=\frac12\lbrack\cancel{\cos\frac{2\pi}T(k+m)x}+\cos\frac{2\pi}T(k-m)x\rbrack\)

\(\sin\frac{2\pi kx}T\cos\frac{2\pi mx}T=\frac12\lbrack\cancel{\sin\frac{2\pi}T(k+m)x}+\cancel{\sin\frac{2\pi}T(k-m)x}\rbrack\)

\(\Rightarrow\int_Tf(x)\cos\frac{2\pi mx}Tdx=\int_TA_m\cos^2\frac{2\pi mx}Tdx=\frac12A_mT\)

\(A_m=\frac2T\int_Tf(x)\cos\frac{2\pi mx}Tdx\)

\(A_k=\frac2T\int_Tf(x)\cos\frac{2\pi kx}Tdx\)

Similarly, we have \(B_k=\frac2T\int_Tf(x)\sin\frac{2\pi kx}Tdx\)

For a periodic function, which satisfies Dirichlet condition, it can be expressed by a Fourier series.

\({\widetilde f}_T(t)==A_0+\sum_{k=1}^M(A_k\cos\frac{2\pi kt}T+B_k\sin\frac{2\pi kt}T)\)

\(M\;is\;large\;enough,\;but\;M<\infty\)

existence, uniqueness


Dirichlet conditions:

1. The number of discontinuous points is finite in one period.

2. The number of maximum and minimum points is finite in one period. \(\sin(\frac1x)\)

3. The function is absolutely integrable in one period.

Although each of the infinite number of sinusoidal functions is continuous, their sum may be discontinuous.



\(\int_Tf_T(x)\sin m\omega_0xdx,\;m=1,2,3,..\)

\(=\int_TA_0\sin m\omega_0xdx+\sum_{k=1}^\infty\int_TA_k\cos k\omega_0x\cdot\sin m\omega_0xdx+\sum_{k=1}^\infty\int_TB_k\sin k\omega_0x\cdot\sin m\omega_0xdx\)

\(\int_TA_0\sin m\omega_0xdx=0\)

\(\int_T\cos k\omega_0x\cdot\sin m\omega_0xdx=\frac12\int_T\lbrack\sin(k+m)\omega_0x-s\mathrm{in}(k-m)\omega_0x\rbrack dx=0\)

\(\int_T\sin k\omega_0x\cdot\sin m\omega_0xdx=\frac12\int_T\lbrack\cos(k-m)\omega_0x-\cos(k+m)\omega_0x\rbrack dx\)

\(=\frac12\int_T\lbrack\cos(k-m)\omega_0x=\left\{\begin{array}{l}\frac T2,\;k=m\\0,\;k\neq m\end{array}\right.\)


\(f(x)=A_0+\sum_{k=1}^\infty(A_k\cos\frac{2\pi kx}T+B_k\sin\frac{2\pi kx}T)\)

where \(A_0=\frac1T\int_Tf(x)dx\)

\(A_k=\frac2T\int_Tf(x)\cos\frac{2\pi kx}Tdx\)

\(B_k=\frac2T\int_Tf(x)sin\frac{2\pi kx}Tdx\)


Fourier Series


\(f_T(t)=A_0+\sum_{k=1}^\infty A_k\cos k\omega_0t+\sum_{k=1}^\infty B_k\sin k\omega_0t,\;-\infty\;<\;t\;<\;\infty\)

\(A_0=\frac1T\int_Tf(t)dt\)

\(A_k=\frac2T\int_Tf(t)\cos k\omega_0t\;dt\)

\(B_k=\frac2T\int_Tf(t)\sin k\omega_0t\;dt\)

\(\omega_0=\frac{2\pi}T\)

\(\{\omega_0,\;2\omega_0,\;3\omega_0,...\}\)

\(If\;f(x)\;is\;an\;even\;function,\;f(x)=A_0+\sum_{k=1}^\infty A_k\cos k\omega_0x\)

\(If\;f(x)\;is\;an\;odd\;function,\;f(x)=\sum_{k=1}^\infty A_k\sin k\omega_0x\)


Finite Duration Function


\(f(t)=f_T(t),\;a\;\leq\;t\;<\;b\)

\(f(t)=A_0+\sum_{k=1}^\infty(A_k\cos k\omega_0t+B_k\sin k\omega_0t),\;a\;\leq\;t\;<\;b\)

A finite duration function can not be uniquely expressed by a Fourier Series.


\(\cos k\omega_0x=\frac12(e^{jk\omega_0x}+e^{-jk\omega_0x})\)

\(\sin k\omega_0x=\frac1{2j}(e^{jk\omega_0x}-e^{-jk\omega_0x})\)

\(f_T(x)=A_0+\sum_{k=1}^\infty\lbrack\frac{A_k}2(e^{jk\omega_0x}+e^{-jk\omega_0x})+\frac{B_k}{2j}(e^{jk\omega_0x}-e^{-jk\omega_0x})\rbrack\)

\(f_T(x)=A_0+\sum_{k=1}^\infty(\frac{A_k}2+\frac{B_k}{2j})e^{jk\omega_0x}+\sum_{k=1}^\infty(\frac{A_k}2-\frac{B_k}{2j})e^{-jk\omega_0x}\)

\(f_T(x)=A_0+\sum_{k=1}^\infty(\frac{A_k}2+\frac{B_k}{2j})e^{jk\omega_0x}+\sum_{m=-1}^{-\infty}(\frac{A_{-m}}2-\frac{B_{-m}}{2j})e^{jm\omega_0x}\)

\(=A_0+\sum_{k=1}^\infty C_ke^{jk\omega_0x}+\sum_{m=-1}^{-\infty}C_{-m}e^{jm\omega_0x}\)

\(C_k=\frac12(A_k-jB_k),\;C_{-m}=\frac12(A_{-m}+jB_{-m})\)

\(f_T(x)=C_0+\sum_{k=1}^\infty(C_ke^{jk\omega_0x}+C_{-k}e^{-jk\omega_0x})=\sum_{k=-\infty}^\infty C_ke^{jk\omega_0x}\)

\(where\;C_0=A_0\)

\(C_k=\left\{\begin{array}{l}\frac12(A_k-jB_k),\;k>0\\\frac12(A_{-k}+jB_{-k}),\;k<0\end{array}\right.\)

\(C_k=\frac12(A_k-jB_k)=\vert C_k\vert e^{j\phi_k}\)

\(where\;\vert C_k\vert=\vert C_{-k}\vert=\frac12\sqrt{A_k^2+B_k^2},\)

\(\phi_k=-\phi_{-k}=-\tan^{-1}(\frac{B_k}{A_k})\;and\;C_{-k}=C_k^\ast\)

magnitude: even

phase: odd


\(f_T(t)=\sum_{k=-\infty}^\infty C_ke^{jk\omega_0t}\)

\(\int_Tf_T(t)e^{-jm\omega_0t}dt,\;(m:given)\)

\(=\int_T\sum_{k=-\infty}^\infty C_ke^{jk\omega_0t}e^{-jm\omega_0t}dt\)

\(=\sum_{k=-\infty}^\infty C_k\int_Te^{j(k-m)\omega_0t}dt\)

\(=C_m\int_Tdt=TC_m\)

\(\Rightarrow C_k=\frac1T\int_Tf_T(t)e^{-jk\omega_0t}dt,\;k\in\mathcal Z\)

\(C_k^\ast=\frac1T\int_Tf_T(t)e^{jk\omega_0t}dt,\;k\in\mathcal Z\)

\(=\frac1T\int_Tf_T(t)e^{-j(-k)\omega_0t}dt\)

\(=C_{-k}\)

\(C_k=\vert C_k\vert e^{j\phi_k}=\vert C_k\vert\cos\phi_k+j\vert C_k\vert\sin\phi_k\)



[Ex] \(f(x)=\left\{\begin{array}{l}2,\;-1\leq x<1\\0,\;-2.5\leq x<-1,\;1\leq x<2.5\end{array}\right.\)

\(f(t)=A_0+\sum_{k=1}^\infty A_k\cos k\omega_0t+\sum_{k=1}^\infty B_k\sin k\omega_0t,\;T=5\)

\(=\sum_{k=-\infty}^\infty C_ke^{jk\omega_0x}\)

\(A_0=\frac15\int_{-1}^12dt=\frac45\)

\(A_k=\frac25\int_{-1}^12\cos k\omega_0tdt=\frac25\int_{-1}^12\cos k\frac{2\pi}5tdt\)

\(=\frac45\frac5{2k\pi}\left.\sin k\frac{2\pi}5\right|_{-1}^1=\frac4{k\pi}\sin\frac{2k\pi}5\)

\(B_k=\frac25\int_{-1}^12\sin k\frac{2\pi}5tdt\)

\(=\frac45\frac5{2k\pi}\left.cosk\frac{2\pi}5\right|_{-1}^1=0\)

\(C_k=\frac15\int_{-1}^12\cdot e^{-jk\omega_0t}dt\)

\(=\frac25\frac1{-jk\omega_0}\left.e^{-jk\omega_0t}\right|_{-1}^1\)

\(=\frac{2j}{5k}\cdot\frac5{2\pi}(e^{-jk\omega_0}-e^{jk\omega_0})\)

\(=\frac j{k\pi}\cdot-2j\cdot\sin k\omega_0=\frac2{k\pi}\sin k\frac{2\pi}5\)

\(C_k^\ast=C_{-k}=\frac2{k\pi}\sin k\frac{2\pi}5\)

\(\vert C_k\vert=\vert\frac2{k\pi}\sin k\frac{2\pi}5\vert\)

\(\phi_k=\left\{\begin{array}{l}0,\;C_k\;>\;0\\\pi,\;C_k\;<\;0\end{array}\right.\)

\(\phi_{-k}=\left\{\begin{array}{l}0,\;C_{-k}\;>\;0\\-\pi,\;C_{-k}\;<\;0\end{array}\right.\)




\(C_k=\frac2{k\pi}\sin k\frac{2\pi}5=\frac{\sin\frac{2k\pi}5}{\frac{2k\pi}5\cdot{\frac54}}=\frac45\sin\frac{2k}5\pi=(0.8)\sin(0.4k\pi)\)


The Power of periodic function

by mean-square value \(P=\frac1T\int_Tf_T^2(x)dx\)

\(P=\frac1T\int_T(\sum_{k=-\infty}^\infty C_ke^{jk\omega_0x}\sum_{n=-\infty}^\infty C_ke^{jn\omega_0x})dx\)

\(=\frac1T\int_T(\sum_{k=-\infty}^\infty C_ke^{jk\omega_0x}\sum_{m=-\infty}^\infty C_{-m}e^{-jm\omega_0x})dx\)

\(=\frac1T\int_T(\sum_{k=-\infty}^\infty\sum_{m=-\infty}^\infty C_kC_{-m}e^{j(k-m)\omega_0x})dx\)

\(=\sum_{k=-\infty}^\infty\sum_{m=-\infty}^\infty\frac1T\int_TC_kC_{-m}e^{j(k-m)\omega_0x}dx\)

\(\int_TC_kC_{-m}e^{j(k-m)\omega_0x}dx=0\;for\;k\neq m\)

\(P=\sum_{k=-\infty}^\infty\frac1T\int_TC_kC_{-k}dx\)

\(=\sum_{k=-\infty}^\infty C_kC_{-k}=\sum_{k=-\infty}^\infty C_kC_k^\ast=\sum_{k=-\infty}^\infty\vert C_k\vert^2\)

Finally, we obtain the Parseval’s theorem as

\(P=\frac1T\int_Tf_T^2(x)dx=\sum_{k=-\infty}^\infty\vert C_k\vert^2\)

Parseval's Theorem

\(\int_{-\infty }^{\infty }s^{2}(t)dt=\int_{-\infty }^{\infty }\left ( \left | S(f) \right | \right )^{2}df \nonumber\)

\(f{(x)}\sim\frac{a_0}2+\sum_{n=1}^\infty{(a_n\cos nx+b_n\sin nx)}\)

\(\frac1\pi\int_{-\pi}^\pi{\vert f^2{(x)}\vert}{}{\mathrm d}x=\frac{{a_0}^2}2+\sum_{n=1}^\infty{({a_n}^2+{b_n}^2)}\)

\(f{(x)}=\sum_{n=-\infty}^\infty c_ne^{jnx},\;where\;c_n=\frac1{2\pi}\int_{-\pi}^\pi f{(t)}e^{-jnt}{}{\mathrm d}t\)

Then \(\frac1{2\pi}\int_{-\pi}^\pi{\vert f{(x)}\vert}^2{}{\mathrm d}x=\sum_{n=-\infty}^\infty{\vert c_n\vert}^2\)


[Ex] \(f{(x)}={\{\begin{array}{l}0,\;-\pi\;\leq\;x\;\leq0\\1,\;0\;<\;x\;\leq\;\pi\end{array}}.\)

\(a_0=\frac1\pi\int\limits_{-\pi}^\pi f{(x)}dx=\frac1\pi\int\limits_0^\pi1dx=\frac1\pi⋅\pi=1.\)

\(for\;n\neq0\)

\(a_n=\frac1\pi\int\limits_{-\pi}^\pi f{(x)}\cos\;nxdx=\frac1\pi\int\limits_0^\pi1⋅\cos\;nxdx=\frac1\pi{\lbrack{{(\frac{\sin\;nx}n)}\vert}_0^\pi\rbrack}=\frac1{\pi n}⋅0=0,\)

\(b_n=\frac1\pi\int\limits_{-\pi}^\pi f{(x)}\sin\;nxdx=\frac1\pi\int\limits_0^\pi1⋅\sin\;nxdx=\frac1\pi{\lbrack{{(-\frac{\cos\;nx}n)}\vert}_0^\pi\rbrack}=-\frac1{\pi n}⋅{(\cos\;n\pi-\cos\;0)}=\frac{1-\cos\;n\pi}{\pi n}.\)

Since \(\cos\;n\pi={(-1)}^n,\)

\(b_n=\frac{1-{(-1)}^n}{\pi n}.\)

\(f{(x)}=\frac12+\sum_{n=1}^\infty\frac{1-{(-1)}^n}{\pi n}\sin\;nx.\)

\(f{(x)}=\frac12+\frac{1-{(-1)}}\pi\sin\;x+\frac{1-{(-1)}^2}{2\pi}\sin\;2x+\frac{1-{(-1)}^3}{3\pi}\sin\;3x+\frac{1-{(-1)}^4}{4\pi}\sin\;4x+\frac{1-{(-1)}^5}{5\pi}\sin\;5x+\dots\)

\(=\frac12+\frac2\pi\sin\;x+\frac2{3\pi}\sin\;3x+\frac2{5\pi}\sin\;5x+\dots\)

Complex Form of Fourier Series

Using the well-known Euler's formulas

\(\cos\varphi=\frac{e^{i\varphi}+e^{-i\varphi}}2,\;\;\sin\varphi=\frac{e^{i\varphi}-e^{-i\varphi}}{2i},\)

we can write the Fourier series of the function in complex form:

\(f\left(x\right)=\frac{a_0}2+\sum_{n=1}^\infty\left(a_n\cos nx+b_n\sin nx\right)=\frac{a_0}2+\sum_{n=1}^\infty\left(a_n\frac{e^{inx}+e^{-inx}}2+b_n\frac{e^{inx}-e^{-inx}}{2i}\right)\)

\(=\frac{a_0}2+\sum_{n=1}^\infty\frac{a_n-ib_n}2e^{inx}+\sum_{n=1}^\infty\frac{a_n+ib_n}2e^{-inx}=\sum_{n=-\infty}^\infty c_ne^{inx}.\)

Here we have used the following notations:

\(c_0=\frac{a_0}2,\;\;c_n=\frac{a_n-ib_n}2,\;\;c_{-n}=\frac{a_n+ib_n}2.\)

The coefficients \(c_n\) are called complex Fourier coefficients. They are defined by the formulas

\(c_n=\frac1{2\pi}\int\limits_{-\pi}^\pi f\left(x\right)e^{-inx}dx,\;\;n=0,\pm1,\pm2,\dots\)

If necessary to expand a function \(f(x)\) of period \(2L\), we can use the following expressions:

\(f\left(x\right)=\sum_{n=-\infty}^\infty c_ne^\frac{in\pi x}L,\)

where \(c_n=\frac1{2L}\int\limits_{-L}^Lf\left(x\right)e^{-\frac{in\pi x}L}dx,\;\;n=0,\pm1,\pm2,\dots\)

傅立葉轉換(Fourier Transform)

Fourier Transform

Fourier transform

\[\hat f(\xi)=\int_{-\infty}^\infty f(x)\;e^{-i2\pi\xi x}\,dx,\quad\forall\xi\in\mathbb{R}\]

Inverse transform

\[f(x)=\int_{-\infty}^\infty\hat f(\xi)\;e^{i2\pi\xi x}\,d\xi,\quad\forall\;x\in\mathbb{R}\]

The functions \(f\) and \(\hat {f}\) are referred to as a Fourier transform pair.

\(f(x)\overset{\mathcal F}\leftrightarrow\hat f(\xi)\)
\(\delta(x)\;\overset{\mathcal F}\leftrightarrow1\)

Angular frequency \(\omega\)

When the independent variable (\(x\)) represents time (often denoted by \(t\), the transform variable (\(\xi\)) represents frequency (often denoted by \(f\). For example, if time is measured in seconds, then frequency is in hertz. The Fourier transform can also be written in terms of angular frequency, \(\omega =2\pi \xi\), whose units are radians per second.

The substitution \(\xi ={\tfrac {\omega }{2\pi }}\)

\({\hat f}_3(\omega)\triangleq\int_{-\infty}^\infty f(x)⋅e^{-i\omega x}{}dx={\hat f}_1(\frac\omega{2\pi})\)

\(\xi={\frac\omega{2\pi}}\;\Rightarrow\;d\xi={\frac{d\omega}{2\pi}}\)

\(f(x)=\int_{-\infty}^\infty\hat f(\xi)\;e^{i2\pi\xi x}\,d\xi\;\Rightarrow f(x)=\int_{-\infty}^\infty\hat f(\frac\omega{2\pi})\;e^{i\omega x}\frac{d\omega}{2\pi}\)

We simply replace \(\hat f(\frac\omega{2\pi})\) by \(\hat f(\omega)\), the integral range still from \(-\infty\) to \(\infty\)
\(f(x)=\frac1{2\pi}\int_{-\infty}^\infty{\hat f}_3(\omega)⋅e^{i\omega x}d\omega\)

the Fourier transform is no longer a unitary transformation, and there is less symmetry between the formulas for the transform and its inverse. Those properties are restored by splitting the \(2\pi \) factor evenly between the transform and its inverse, which leads to another convention:

\({\hat f}_2(\omega)\triangleq\frac1{\sqrt{2\pi}}\int_{-\infty}^\infty f(x)⋅e^{-i\omega x}dx=\frac1{\sqrt{2\pi}}{\hat f}_1(\frac\omega{2\pi})\)

\(f(x)\triangleq\frac1{\sqrt{2\pi}}\int_{-\infty}^\infty{\hat f}_2(\omega)⋅e^{i\omega x}d\omega\)

Summary of popular forms of the Fourier transform, one-dimensional
ordinary frequency ξ (Hz) unitary \({\displaystyle {\begin{aligned}{\widehat {f}}_{1}(\xi )\ &\triangleq \ \int _{-\infty }^{\infty }f(x)\,e^{-i2\pi \xi x}\,dx={\sqrt {2\pi }}\ \ {\widehat {f}}_{2}(2\pi \xi )={\widehat {f}}_{3}(2\pi \xi )\\f(x)&=\int _{-\infty }^{\infty }{\widehat {f}}_{1}(\xi )\,e^{i2\pi x\xi }\,d\xi \end{aligned}}}\)
angular frequency ω (rad/s) unitary \({\displaystyle {\begin{aligned}{\widehat {f}}_{2}(\omega )\ &\triangleq \ {\frac {1}{\sqrt {2\pi }}}\ \int _{-\infty }^{\infty }f(x)\,e^{-i\omega x}\,dx={\frac {1}{\sqrt {2\pi }}}\ \ {\widehat {f}}_{1}\!\left({\frac {\omega }{2\pi }}\right)={\frac {1}{\sqrt {2\pi }}}\ \ {\widehat {f}}_{3}(\omega )\\f(x)&={\frac {1}{\sqrt {2\pi }}}\ \int _{-\infty }^{\infty }{\widehat {f}}_{2}(\omega )\,e^{i\omega x}\,d\omega \end{aligned}}}\)
non-unitary \({\displaystyle {\begin{aligned}{\widehat {f}}_{3}(\omega )\ &\triangleq \ \int _{-\infty }^{\infty }f(x)\,e^{-i\omega x}\,dx={\widehat {f}}_{1}\left({\frac {\omega }{2\pi }}\right)={\sqrt {2\pi }}\ \ {\widehat {f}}_{2}(\omega )\\f(x)&={\frac {1}{2\pi }}\int _{-\infty }^{\infty }{\widehat {f}}_{3}(\omega )\,e^{i\omega x}\,d\omega \end{aligned}}}\)
Generalization for n -dimensional functions
ordinary frequency ξ (Hz) unitary \({\displaystyle {\begin{aligned}{\widehat {f}}_{1}(\xi )\ &\triangleq \ \int _{\mathbb {R} ^{n}}f(x)e^{-i2\pi \xi \cdot x}\,dx=(2\pi )^{\frac {n}{2}}{\widehat {f}}_{2}(2\pi \xi )={\widehat {f}}_{3}(2\pi \xi )\\f(x)&=\int _{\mathbb {R} ^{n}}{\widehat {f}}_{1}(\xi )e^{i2\pi \xi \cdot x}\,d\xi \end{aligned}}}\)
angular frequency ω (rad/s) unitary \({\displaystyle {\begin{aligned}{\widehat {f}}_{2}(\omega )\ &\triangleq \ {\frac {1}{(2\pi )^{\frac {n}{2}}}}\int _{\mathbb {R} ^{n}}f(x)e^{-i\omega \cdot x}\,dx={\frac {1}{(2\pi )^{\frac {n}{2}}}}{\widehat {f}}_{1}\!\left({\frac {\omega }{2\pi }}\right)={\frac {1}{(2\pi )^{\frac {n}{2}}}}{\widehat {f}}_{3}(\omega )\\f(x)&={\frac {1}{(2\pi )^{\frac {n}{2}}}}\int _{\mathbb {R} ^{n}}{\widehat {f}}_{2}(\omega )e^{i\omega \cdot x}\,d\omega \end{aligned}}}\)
non-unitary \({\displaystyle {\begin{aligned}{\widehat {f}}_{3}(\omega )\ &\triangleq \ \int _{\mathbb {R} ^{n}}f(x)e^{-i\omega \cdot x}\,dx={\widehat {f}}_{1}\left({\frac {\omega }{2\pi }}\right)=(2\pi )^{\frac {n}{2}}{\widehat {f}}_{2}(\omega )\\f(x)&={\frac {1}{(2\pi )^{n}}}\int _{\mathbb {R} ^{n}}{\widehat {f}}_{3}(\omega )e^{i\omega \cdot x}\,d\omega \end{aligned}}}\)

The 1D Fourier transform is:

\(f_T(t)=\sum_{k=-\infty}^\infty C_ke^{jk\omega_0t}\)

\(C_k=\frac1T\int_Tf_T(x)e^{-jk\omega_0x}dx\)

\(\therefore f_T(t)=\sum_{k=-\infty}^\infty\frac1T\int_{-\frac T2}^\frac T2f_T(x)e^{-jk\omega_0x}dx\cdot e^{jk\omega_0t},\;\omega_0=\frac{2\pi}T\)

(A) Interval duration: \(a\leq t\leq b\)

(B) Interval duration: \(-\infty<t<\infty\)

\(\omega_0=\frac{2\pi}T=\triangle\omega\rightarrow0\)

\(k\omega_0\simeq\omega\)

\(f_T(t)=\sum_{k=-\infty}^\infty\frac{\triangle\omega}{2\pi}\int_{-\infty}^\infty f_T(x)e^{-j\omega x}dx\cdot e^{jk\triangle\omega t}\)

\(\int_{-\infty}^\infty f_T(x)e^{-j\omega x}dx=F(\omega)\)

\(f_T(t)=\int_{-\infty}^\infty\frac1{2\pi}F(\omega)e^{j\omega t}d\omega\)


\(\left\{\begin{array}{l}f(t)=\frac1{2\pi}\int_{-\infty}^\infty F(\omega)e^{j\omega t}d\omega\\F(\omega)=\int_{-\infty}^\infty f(t)e^{-j\omega t}dt\end{array}\right.\)

\(Fourier\;transform\;of\;f(t):\;F(\omega)\)

\(ℱ\{f(t)\}=F(\omega)\)

\(ℱ^{-1}\{F(\omega)\}=f(t)\)


Fourier Transform

\(ℱ\{f(t)\}=\int_{-\infty}^\infty f(t)e^{-j\omega t}dt\)

Inverse Fourier Transform

\(ℱ^{-1}\{F(\omega)\}=\frac1{2\pi}\int_{-\infty}^\infty F(\omega)e^{j\omega t}d\omega=f(t)\)


The 3D Fourier transform is:

\(\left\{\begin{array}{l}f(x)=\frac1{{(2\pi)}^3}\int_{-\infty}^\infty F(\omega)e^{j\omega x}d^3\omega=ℱ^{-1}\lbrack F(\omega)\rbrack\\F(\omega)=\int_{-\infty}^\infty f(x)e^{-j\omega x}d^3x=ℱ\lbrack f(x)\rbrack\end{array}\right.\)

Consider a spacetime plane-wave \(e^{ikx}=e^{i(\omega t-kx)}\)

\(f(x)=\frac1{{(2\pi)}^4}\int_{-\infty}^\infty F(k)e^{-jkx}d^4\omega=\frac1{{(2\pi)}^4}\int_{-\infty}^\infty F(k)e^{-j(\omega t-kx)}d^4\omega\)

\(F(k)=\int_{-\infty}^\infty f(x)e^{jkx}d^4x=\int_{-\infty}^\infty f(x)e^{j(\omega t-kx)}d^4x\)


Multi-Dimensional Fourier Transform

\(F(k_1,k_2,\dots,k_d)=\int_{-\infty}^\infty dx_1\;e^{-ik_1x_1}\;\int_{-\infty}^\infty dx_2\;e^{-ik_2x_2}\,\cdots\,\int_{-\infty}^\infty dx_d\;e^{-ik_dx_d}\,f(x_1,x_2,\dots,x_N)\)

\(F(\vec k)=\int\;f(\vec x)e^{-i\,\vec k\cdot\vec x}d^dx\)

\(f(\vec x)=\int\;F(\vec k)e^{i\,\vec k\cdot\vec x}\frac{d^dk}{(2\pi)^d}\)

\(\delta^d(\vec x-\vec x')=\int e^{\left[i\vec k\cdot\left(\vec x-\vec x'\right)\right]}\frac{d^dk}{(2\pi)^d}\)

\(\int\,f(\vec x)\delta^d(\vec x-\vec x')d^dx=f(\vec x')\)


The Fourier transform (FT) is a transform that converts a function into a form that describes the frequencies present in the original function. The output of the transform is a complex-valued function of frequency. The Fourier transform can also be generalized to functions of several variables on Euclidean space, sending a function of 3-dimensional 'position space' to a function of 3-dimensional momentum (or a function of space and time to a function of 4-momentum).

The Fourier transform of the expression \(f = f(x)\) with respect to the variable \(x\) at the point \(w\) is

\[F{(w)}=ℱ\lbrack f(x)\rbrack=c\int\limits_{-\infty}^\infty f{(x)}e^{iswx}dx\]

\(c\) and \(s\) are parameters of the Fourier transform. The fourier function uses \(c = 1, s = -1\).

\[F(m,n)=ℱ\lbrack f(x,y)\rbrack=\sum_{x=0}^{M-1}\sum_{y=0}^{N-1}{f(x,y)e^{-j\frac{2\pi mx}M}}e^{-j\frac{2\pi ny}N}\]

where \(0\leq m\leq M-1\) and \(0\leq n\leq N-1\)



Dirac Delta Function

The Dirac function \(δ(x)\) has the sifting property. If \(f\) is continuous at point \(a\):
\[\int_{-\infty}^\infty f(t)\delta(t-a)\operatorname dt=f(a)\]

The Fourier transform of a translated Dirac is a complex exponential:
\[\delta(t-a)\overset{\;\;FT\;\;}{\leftrightarrow} e^{-ia\omega}\]


Impulse Train

Lets consider \(it(x)=\sum_{p\in\mathcal Z}\delta(x-pT)\) is a train of \(T\)-spaced impulses and we can compute its Fourier transform.
\(it(x)=\sum_{k\in\mathcal Z}c_ke^{ik\Omega x}\)

where \(\Omega=\frac{2\pi}T\)

\(c_k=\frac1T\int_{-\frac T2}^\frac T2it(t)e^{-ik\Omega t}\operatorname dt=\frac1T\int_{-\frac T2}^\frac T2\sum_{p\in\mathcal Z}\delta(t-pT)e^{-ik\Omega t}\operatorname dt\)
\(=\frac1T\sum_{p\in\mathcal Z}\int_{-\frac T2}^\frac T2\delta(t-pT)e^{-ik\Omega t}\operatorname dt\)

\(\delta(t-pT)=0\;over\;the\;interval\;\left[-\frac T2,\frac T2\right]\;for\;p\neq0\)

\(c_k=\frac1T\int_{-\frac T2}^\frac T2\delta(t)e^{-ik\Omega t}\operatorname dt=\frac1T\underbrace{\int_{-\infty}^\infty e^{-ik\Omega t}\operatorname dt}_{=e^{-ik\Omega0}=1}=\frac1T\)

\[it(x)=\frac1T\sum_{k\in\mathcal Z}e^{ik\Omega x}\]

\(e^{-ik\Omega(-x)}\overset{FT}\leftrightarrow2\pi\delta(-(-\Omega)-k\Omega)\)

\(e^{ik\Omega x}\overset{FT}\leftrightarrow2\pi\delta(\Omega-k\Omega)\)

\(e^{i\omega_0x}\overset{FT}\leftrightarrow2\pi\delta(\omega-\omega_0)\)

\(1\overset{FT}\leftrightarrow2\pi\delta(\omega)\)


Properties of Continuous-Time Fourier Transform (CTFT)

Fourier Transform

The Fourier transform of a continuous-time function \(x(t)\) is defined as,

\[X(\omega)=ℱ\lbrack x(t)\rbrack=\int_{-\infty}^\infty x(t)e^{-j\omega t}dt\]


Inverse Fourier Transform

The inverse Fourier transform of a continuous-time function is defined as,

\[x(t)=ℱ^{-1}\lbrack X(\omega)\rbrack=\frac1{2\pi}\int_{-\infty}^\infty X(\omega)e^{j\omega t}d\omega\]




\(F(\omega)=\int_{-\infty}^\infty f(t)e^{-j\omega t}dt\)

\(F(-\omega)=\int_{-\infty}^\infty f(t)e^{j\omega t}dt=F^\ast(\omega)\)

\(\left|F(\omega)\right|=\left|F(-\omega)\right|,\;even\;function\)

\(\angle F(\omega)=-\angle F(-\omega),\;odd\;function\)





Short-Time Fourier Transform (STFT)

Short-time Fourier transform (STFT), is a Fourier-related transform used to determine the sinusoidal frequency and phase content of local sections of a signal as it changes over time.

STFT is a method of analysis used for analyzing non-stationary signals. It extracts several frames of signals with a window that moves with time. If the time window is sufficiently narrow, each frame extracted can be viewed as stationary so that Fourier transform can be used. With the window moving along the time axis, the relation between the variance of frequency and time can be identified.




Fourier Transform (FT)

Time domain signals transfer to Frequency domain signals

\[F{(\omega)}=\int\limits_{-\infty}^\infty f{(t)}e^{-i\omega t}dt\]



Short-Time Fourier Transform (STFT)

\[F{(\tau,\omega)}=\int\limits_{-\infty}^\infty f{(t)}w{(t-\tau)}e^{-i\omega t}dt\]

where \(\omega (t)\) represents the sliding window that emphasizes local frequency components within it. The size of the window is related to the time resolution and frequency resolution of STFT. The shorter the window, the higher the time resolution. However, this is usually accompanied by poor frequency resolution. For a long window, the frequency resolution is high, but the time resolution is low. This phenomenon reflects Heisenberg's uncertainty principle.

Different window shapes produce different results, and Origin provides up to nine different windows for addressing specific needs: Rectangle, Welch, Triangular, Bartlett, Hanning, Hamming, Blackman, Gaussian and Kaiser.

The window function, is commonly a Hann window or Gaussian window centered around zero.


Discrete-time Fourier transform (DTFT)

離散時間傅立葉轉換

The discrete-time Fourier transform (DTFT) is analogous to a Fourier series, except instead of starting with a periodic function of time and producing discrete sequence over frequency, it starts with a discrete sequence in time and produces a periodic function in frequency. It is the transform-pair relationship between a discrete-time signal and its continuous-frequency transform. The utility of this frequency domain function is rooted in the Poisson summation formula.

The DTFT is often used to analyze samples of a continuous function. The term discrete-time refers to the fact that the transform operates on discrete data, often samples whose interval has units of time. From uniformly spaced samples it produces a function of frequency that is a periodic summation of the continuous Fourier transform of the original continuous function.

Periodic Function in Frequency



Inverse Discrete-Time Fourier Transform (IDTFT)

The inverse discrete-time Fourier transform (IDTFT) is defined as the process of finding the discrete-time sequence \(x(n)\) from its frequency response \(X(ω)\).




\(\mathrm{\mathit{x}\mathrm{\left(\mathit{n}\right)}\:\mathrm{=}\: \frac{1}{2\pi}\int_{-\pi}^{\pi}\mathit{X}\mathrm{\left(\mathit{\omega}\right)}\mathit{e}^{\mathit{j\omega n}}\:\mathit{d\omega}}\)








Discrete Time Fourier Series

DTFS

In continuous-time Fourier series, periodic signals are represented as sum of complex exponentials. The continuous-time Fourier representation of periodic signal takes a form of infinite series whereas discrete time Fourier representation is of finite series, as a result of this, there is no convergence issue with DTFS.

The Definition of DTFS

The discrete time Fourier series representation is given as
\(x\lbrack n\rbrack=\sum_{n=0}^{N-1}C_ke^{j(\frac{2\pi}N)kn}\)

Where \(C_k\) is Fourier series coeffficient and given as
\(C_k=\frac1N\sum_{n=0}^{N-1}x\lbrack n\rbrack e^{-j(\frac{2\pi}N)kn}\)

Thus \(C_k\) and \(x[n]\) makes discrete time Fourier series coefficient pair
\(x\lbrack n\rbrack\overset{DTFS}\leftrightarrow C_k\)


Features of DTFS
  1. Fourier series representation of discrete and periodic signal is also discrete and periodic.
  2. \(C_k\) is periodic with \(N\). i.e. \(C_k=C_{k+N}\)
  3. Fourier series for discrete time periodic signal is a finite sum defined entirely by the value of signal itset over one period, the series always converges.
  4. \(C_k\) repeats every \(2\pi\) interval along \(\Omega\) scale.

Summary Table of DTFS Properties
Time Domain Frequency Domain

Synthesis (Inverse Fourier Transform)

\[x\lbrack n\rbrack=\sum_{k=0}^{N-1}a_ke^{jk\frac{2\pi}Nn}\]

Analysis (Fourier Transform)

\[a_k=\frac1N\sum_{n=0}^{N-1}x\lbrack n\rbrack e^{-jk\frac{2\pi}Nn}\]

Real Signals

\[x\lbrack n\rbrack\in\mathcal R\]

Symmetry in Fourier transform

\[a_{-k} = a_k^\star\]

Even Signals

\[x[-n] = x[n]\]

Real Fourier transform

\[a_k \text{ is real}\]

Odd Signals

\[x[-n] = -x[n]\]

Imaginary Fourier transform

\[a_k \text{ is imaginary}\]

Difference

\[x[n] - x[n-1]\]
\[(1-e^{-j \frac{2\pi}{N} k})a_k\]

Time Shift

\[x[n-n_0]\]

Phase factor

\[e^{-j k \frac{1\pi}{N} n_0} a_k\]

Convolution

\[x\lbrack n\rbrack\ast N y\lbrack n\rbrack=\sum_{k=0}^{N-1}x\lbrack k\rbrack y\lbrack n-k\rbrack\]

Multiplication

\[N a_k b_k\]

Multiplication

\[x[n] y[n]\]

Convolution

\[\sum_{n=0}^{N-1}a_nb_{k-n}\]

Discrete Time Fourier Transform

The extension of discrete-time Fourier series for discrete-time aperiodic signals gives discrete-time Fourier transform. The frequency domain description of discrete-time signal is continuous function of \(\Omega\) tha can take any value over continuous interval from \(-\infty\) to \(+\infty\) and it is periodic function of frequency with period \(2\pi\)


The Definition of DTFT

Consider a discrete-time signal \(x[n]\). Its discrete-time Fourier transform (DTFT) is defined as
\({\mathcal F}_{DTFT}\{x(n)\}=X(\Omega)=\sum_{n=-\infty}^\infty x\lbrack n\rbrack e^{-j\Omega n}\)

Where \(\Omega\) is discrete time frequency in "rad/numbers". The transform \(X(\Omega)\) is frequency domain description of \(x[n]\). Thus \(x[n]\) and \(X(\Omega)\) makes Fourier transform pair as
\(\underbrace{x(n)}_{Discrete\;Aperiodic}\xrightarrow{DTFT}\underbrace{X(\Omega)}_{Periodic\;continuous}\)

and the inverse DTFT with maps the frequency domain description \(X(\Omega)\) back into time is given as
\(\mathcal F_{DTFT}^{-1}\{X(\Omega)\}=\frac1{2\pi}\int_{2\pi}X(\Omega)e^{j\Omega n}d\Omega\)

Note some books use different notations \(X(j\omega),\;X(\Omega),\;X(j\Omega),\;X(e^{j\Omega}),\;X(e^{j\omega})\)


Nature of Fourier Spectrum and Periodicity of DTFT

\(X(\Omega)\), the frequency domain representation is continuous function of \(\Omega\) which can take any value over a continuous interval from \(-\infty\) to \(+\infty\), Also, \(X\Omega\) is periodic function of \(\Omega\) with period of \(2\pi\). It follows that

\(X(\Omega)=X(\Omega+2\pi)\)

\(X(\Omega+2\pi)=\sum_{n=-\infty}^\infty x\lbrack n\rbrack e^{-j(\Omega+2\pi)n}=\sum_{n=-\infty}^\infty x\lbrack n\rbrack e^{-j\Omega n}e^{-j2\pi n}\)
\(=\sum_{n=-\infty}^\infty x\lbrack n\rbrack e^{-j\Omega n}=X(\Omega)\)


Distortionless Transmission

In many applications it is required that the output waveform (signal) be a replica of input. Transmission is said to be distortionless if input \(x[n]\) and output \(y[n]\) satisfy the ondition
\[y\lbrack n\rbrack=k\;x\lbrack n-n_0\rbrack\]

where \(k\) is a constant and accounts for scaling in amplitude and \(n_0\) accounts for the delay (in samples) is assumed to be an integer.

Discrete Fourier transform (DFT)

In mathematics, the discrete Fourier transform (DFT) converts a finite sequence of equally-spaced samples of a function into a same-length sequence of equally-spaced samples of the discrete-time Fourier transform (DTFT), which is a complex-valued function of frequency.


The discrete Fourier transform (DFT) is a method for converting a sequence of \(N\) complex numbers \(x_0, x_1, ..., x_{N-1}\)

\[ X_k = \sum_{n=0}^{N-1} x_n e^{-2\pi i kn/N}, \]

for \( 0 \le k \le N-1.\)

The \(x_i\) are thought of as the values of a function, or signal, at equally spaced times \(t=0,1,…,N−1\). he output \(X_k\) is a complex number which encodes the amplitude and phase of a sinusoidal wave with frequency \(\frac kN\) cycles per time unit. (This comes from Euler's formula: \(e^{2\pi ikn/N}=\cos(2\pi kn/N)+i\sin(2\pi kn/N)\)) The effect of computing the \(X_k\) is to find the coefficients of an approximation of the signal by a linear combination of such waves. Since each wave has an integer number of cycles per \(N\) time units, the approximation will be periodic with period \(N\). This approximation is given by the inverse Fourier transform

\[x_n=\frac1N\;\sum_{k=0}^{N-1}X_ke^{2\mathrm{πikn}/\mathrm N}\]

It is a consequence of orthogonality with respect to the complex dot product.


The DFT is useful in many applications, including the simple signal spectral analysis outlined above. Knowing how a signal can be expressed as a combination of waves allows for manipulation of that signal and comparisons of different signals:

Digital files (jpg, mp3, etc.) can be shrunk by eliminating contributions from the least important waves in the combination.

Different sound files can be compared by comparing the coefficients \(X_k\) of the DFT.

Radio waves can be filtered to avoid "noise" and listen to the important components of the signal.


DFT including sampling interval

Using the standard definition of the DFT omits the sampling interval (or sampling distance) \(\displaystyle \Delta t\) n cases where the index corresponds to the sampling interval according to \(\displaystyle n\Delta t=t\)

To express the DFT consistently with the Fourier transform, including the sampling intervals, the sampling interval can be included explicitly as

\(\displaystyle X_{k}=\Delta t\sum _{n=0}^{N-1}x_{n}\cdot e^{-i2\pi {\tfrac {k}{N}}n}\)

Note: most software libraries don't use this form but rather use the relative form, including their corresponding FFT implementations.

The corresponding inverse transform then becomes:

\(\displaystyle x_{n}=\Delta f\sum _{k=0}^{N-1}X_{k}\cdot e^{i2\pi {\tfrac {k}{N}}n}\)

where the frequency spacing is \(\displaystyle \Delta f={\frac {1}{\Delta tN}}\)

DFT example A

Find the DFT of \((x_0,x_1,x_2,x_3) = (0,1,0,0).\)


In this case, \[ X_k = \sum_{n=0}^3 x_n e^{-2\pi i kn/4} = e^{-2\pi i k/4}. \] So \( X_0 = 1, X_1 = -i, X_2 = -1, X_3 = i.\) The answer is \( (1,-i,-1,i).\)

Proceeding as in the previous example, this gives the expansion \[ x_n = 1 - i e^{2\pi i n/4} - e^{4\pi i n/4} + i e^{6\pi i n/4}. \] Converting the complex coefficients to complex exponentials gives \[ \begin{align} x_n &= 1 + e^{6\pi i/4} e^{2\pi i n/4} + e^{4\pi i/4} e^{4\pi i n/4} + e^{2\pi i/4} e^{6 \pi i n/4} \\ &= 1 + e^{2\pi i(n+3)/4} + e^{2\pi i (2n+2)/4} + e^{2\pi i (3n+1)/4}. \end{align} \] This is an example of phase shifting occurring in the sum. Taking the real parts of both sides gives a sum of cosine waves: \[ x_n = 1 + \cos(2\pi n/4 + 3\pi/2) + \cos(4\pi n/4 + \pi) + \cos(6\pi n/4 + \pi/2), \] where the addition of \(3\pi/2, \pi, \pi/2\) has the effect of shifting the waves forward by \( 270^\circ, 180^\circ, 90^\circ,\) respectively.



Discrete Fourier Transform is with real and imaginary parts - \(ReX(i)\) cosine wave amplitudes and \(ImX(i)\) sine wave amplitudes.


DFT example B

Determine the 8-point DFT of the sequence x(n)={1,1,1,1,1,1,0,0}


\[X(\mathrm{k})=\sum_{n=0}^{N-1} x(\mathrm{n}) \mathrm{e}^{-j 2 \pi k n / N} k=0,1, \ldots N-1\]

for \(N = 8\)

\[X(\mathrm{k})=\sum_{n=0}^7 x(\mathrm{n}) \mathrm{e}^{-j \pi k n / 4} k=0,1,2 \ldots . . N-1\\\]

for \(N = 0\)

\(\begin{aligned} X(0) & =\sum_{n=0}^7 x(n) \\\\ \mathrm{X}(0) & =\mathrm{x}(0)+\mathrm{x}(1)+\mathrm{x}(2)+\mathrm{x}(3)+\mathrm{x}(4)+\mathrm{x}(5)+\mathrm{x}(6)+\mathrm{x}(7) \\\\ & =1+1+1+1+1+1+0+0 \\\\ & =6 \end{aligned}\)

for \(N = 1\)

\(\begin{aligned} X(1) & =\sum_{n=0}^7 x(n) \mathrm{e}^{-j \pi n / 4} \\\\ \mathrm{X}(1) & =\mathrm{x}(0)+\mathrm{x}(1) \mathrm{e}^{-\mathrm{j} \pi / 4}+\mathrm{x}(2) \mathrm{e}^{-\mathrm{j} \pi / 2}+\mathrm{x}(3) \mathrm{e}^{-\mathrm{j} 3 \pi / 4}+\mathrm{x}(4) \mathrm{e}^{-\mathrm{j} \pi}+\mathrm{x}(5) \mathrm{e}^{-\mathrm{j} 5 \pi / 4}+\mathrm{x}(6) \mathrm{e}^{-\mathrm{j} 3 \pi / 2}+\mathrm{x}(7) \mathrm{e}^{-\mathrm{j} 7 \pi / 4} \\\\ & =1+0.707-\mathrm{j} 0.707-\mathrm{j}-0.707-\mathrm{j} 0.707-1-0.707+\mathrm{j} 0.707 \quad=-0.707-\mathrm{j} 1.707\\ \end{aligned}\)

for \(N = 2\)

\begin{aligned} X(2) & =\sum_{n=0}^7 x(n) e^{-j \pi n / 2} \\\\ X(2) & =x(0)+\mathrm{x}(1) \mathrm{e}^{-\mathrm{j} \pi / 2}+\mathrm{x}(2) \mathrm{e}^{-\mathrm{j} \pi}+\mathrm{x}(3) \mathrm{e}^{-\mathrm{j} 3 \pi / 2}+\mathrm{x}(4) \mathrm{e}^{-\mathrm{j} 2 \pi}+\mathrm{x}(5) \mathrm{e}^{-\mathrm{j} 5 \pi / 2}+\mathrm{x}(6) \mathrm{e}^{-\mathrm{j} 3 \pi}+\mathrm{x}(7) \mathrm{e}^{-\mathrm{j} 7 \pi / 2} \\\\ & =1-\mathrm{j}-1+\mathrm{j}+1-\mathrm{j} \\\\ & =1-\mathrm{j}\\ \end{aligned}

for \(N = 3\)

\(\begin{aligned} X(3) & =\sum_{n=0}^7 x(n) e^{-j 3 \pi n / 4} \\\\ X(3) & =x(0)+x(1) e^{-j 3 \pi / 4}+\mathrm{x}(2) \mathrm{e}^{-\mathrm{j} \pi / 2}+\mathrm{x}(3) \mathrm{e}^{-\mathrm{j} 9 \pi / 4}+\mathrm{x}(4) \mathrm{e}^{-\mathrm{j} 3 \pi}+\mathrm{x}(5) \mathrm{e}^{-\mathrm{j} 15 \pi / 4}+\mathrm{x}(6) \mathrm{e}^{-\mathrm{j} 9 / / 4}+\mathrm{x}(7) \mathrm{e}^{-\mathrm{j} 21 \pi / 4} \\\\ & =1-0.707-\mathrm{j} 0.707+\mathrm{j}+0.707-\mathrm{j} 0.707-1+0.707+\mathrm{j} 0.707 \\\\ & =0.707+\mathrm{j} 0.293\\ \end{aligned}\)

for \(N = 4\)

\(\begin{aligned} X(4) & =\sum_{n=0}^7 x(n) \mathrm{e}^{-j \pi n}\\ \\ X(4) & =\mathrm{x}(0)+\mathrm{x}(1) \mathrm{e}^{-j \pi}+\mathrm{x}(2) \mathrm{e}^{-j \pi 2}+\mathrm{x}(3) \mathrm{e}^{-j \pi 3}+\mathrm{x}(4) \mathrm{e}^{-\mathrm{j} \pi 4}+\mathrm{x}(5) \mathrm{e}^{-\mathrm{j} \pi 5}+\mathrm{x}(6) \mathrm{e}^{-j \pi 6}+\mathrm{x}(7) \mathrm{e}^{-\mathrm{j} \pi 7} \\\\ & =1-1+1-1+1-1=0 \end{aligned}\\\)

for \(N = 5\)

\(\begin{aligned} X(5) & =\sum_{n=0}^7 x(n) e^{-j 5 \pi n / 4} \\\\ X(5) & =x(0)+\mathrm{x}(1) \mathrm{e}^{-\mathrm{j} 5 \pi / 4}+\mathrm{x}(2) \mathrm{e}^{-\mathrm{j} 5 \pi / 2}+\mathrm{x}(3) \mathrm{e}^{-\mathrm{j} 5 \pi n / 4}+\mathrm{x}(4) \mathrm{e}^{-\mathrm{j} 5 \pi}+\mathrm{x}(5) \mathrm{e}^{-\mathrm{j} 25 \pi / 4}+\mathrm{x}(6) \mathrm{e}^{-\mathrm{j} 15 \pi / 2}+\mathrm{x}(7) \mathrm{e}^{-\mathrm{j} 35 \pi / 4} \\\\ & =1-0.707+\mathrm{j} 0.707-\mathrm{j}+0.707+\mathrm{j} 0.707-1+0.707-\mathrm{j} 0.707 \\\\ & =0.707-\mathrm{j} 0.293\\ \end{aligned}\)

for \(N = 6\)

\(\begin{aligned} X(6) & =\sum_{n=0}^7 x(n) e^{-j 3 \pi n / 2} \\\\ \mathrm{X}(6) & =\mathrm{x}(0)+\mathrm{x}(1) \mathrm{e}^{-\mathrm{j} 3 \pi / 2}+\mathrm{x}(2) \mathrm{e}^{-\mathrm{j} 3 \pi}+\mathrm{x}(3) \mathrm{e}^{-\mathrm{j} 9 \pi / 2}+\mathrm{x}(4) \mathrm{e}^{-\mathrm{j} 6 \pi}+\mathrm{x}(5) \mathrm{e}^{-\mathrm{j} 15 \pi}+\mathrm{x}(6) \mathrm{e}^{-\mathrm{j} 9 \pi}+\mathrm{x}(7) \mathrm{e}^{-\mathrm{j} 21 \pi / 2} \\\\ & =1+\mathrm{j}-1-\mathrm{j}+1+\mathrm{j} \Rightarrow \quad=1+\mathrm{j}\\ \end{aligned}\)

for \(N = 7\)

\(\begin{aligned} \mathrm{X}(7) & =\mathrm{x}(0)+\mathrm{x}(1) \mathrm{e}^{-\mathrm{j} 7 \pi / 4}+\mathrm{x}(2) \mathrm{e}^{-\mathrm{j} 7 \pi / 2}+\mathrm{x}(3) \mathrm{e}^{-\mathrm{j} 21 \pi / 4}+\mathrm{x}(4) \mathrm{e}^{-\mathrm{j} 7 \pi}+\mathrm{x}(5) \mathrm{e}^{-\mathrm{j} 35 \pi / 4}+\mathrm{x}(6) \mathrm{e}^{-\mathrm{j} 21 \pi / 2}+\mathrm{x}(7) \mathrm{e}^{-\mathrm{j} 49 \pi / 4} \\\\ & =1+0.707+\mathrm{j} 0.707+\mathrm{j}-0.707+\mathrm{j} 0.707-1-0.707-\mathrm{j} 0.707 \\\\ = & -0.707+\mathrm{j} 1.707 \\\\ & \mathrm{X}(\mathrm{K})=\{6,0.707-\mathrm{j} 1.707,1-\mathrm{j}, 0.707+\mathrm{j} 0.293,0,0.707-\mathrm{j} 0.293,1+\mathrm{j},-0.707+\mathrm{j} 1.707\}\\ \end{aligned}\)


DFT example C

This example demonstrates how to apply the DFT to a sequence of length \({\displaystyle N=4}\) and the input vector

\(\mathbf x[n]=\begin{bmatrix}x_0\\x_1\\x_2\\x_3\end{bmatrix}=\begin{bmatrix}1\\2-i\\-i\\-1+2i\end{bmatrix}\)

\(\left\{\begin{array}{l}\begin{array}{rl}{\mathrm X}_0&=\mathrm e^{-\mathrm i2\mathrm\pi0⋅0/4}⋅1+\mathrm e^{-\mathrm i2\mathrm\pi0⋅1/4}⋅(2-\mathrm i)+\mathrm e^{-\mathrm i2\mathrm\pi0⋅2/4}⋅(-\mathrm i)+\mathrm e^{-\mathrm i2\mathrm\pi0⋅3/4}⋅(-1+2\mathrm i)=2\end{array}\\\begin{array}{rl}{\mathrm X}_1&=\mathrm e^{-\mathrm i2\mathrm\pi1⋅0/4}⋅1+\mathrm e^{-\mathrm i2\mathrm\pi1⋅1/4}⋅(2-\mathrm i)+\mathrm e^{-\mathrm i2\mathrm\pi1⋅2/4}⋅(-\mathrm i)+\mathrm e^{-\mathrm i2\mathrm\pi1⋅3/4}⋅(-1+2\mathrm i)=-2-2\mathrm i\end{array}\\\begin{array}{rl}X_2&=e^{-i2\pi2⋅0/4}⋅1+e^{-i2\pi2⋅1/4}⋅(2-i)+e^{-i2\pi2⋅2/4}⋅(-i)+e^{-i2\pi2⋅3/4}⋅(-1+2i)=-2i\end{array}\\\begin{array}{rl}X_3&=e^{-i2\pi3⋅0/4}⋅1+e^{-i2\pi3⋅1/4}⋅(2-i)+e^{-i2\pi3⋅2/4}⋅(-i)+e^{-i2\pi3⋅3/4}⋅(-1+2i)=4+4i\end{array}\end{array}\right.\)

\(\mathbf X[k]=\begin{bmatrix}X_0\\X_1\\X_2\\X_3\end{bmatrix}=\begin{bmatrix}2\\-2-2i\\-2i\\4+4i\end{bmatrix}\)


Fast Fourier Transform (FFT)

Fourier transform


The Fourier transform is a widely used mathematical tool for converting signals from time to frequency domains. It decomposes a signal into a sum of sinusoidal functions with different frequencies, amplitudes, and phases.


The red and blue sinusoids have a phase difference of \(θ\)

The red sinusoid can be described by peak amplitude (1), peak-to-peak (2), RMS (3), and wavelength (4).


The two sinusoid signals cross product is not zero if they are not orthognal.





The Convolution Property

Why is convolution in time domain equivalent to frequency multiplication?

\(x(t)\ast h(t)\leftrightarrow X(\omega)H(\omega)\)

Let us show that. To start, let

\(y(t)=\int_{-\infty}^\infty x(\tau)h(t-\tau)d\tau=x(t)\ast h(t)\)

Then we can take the Fourier Transform of \(y(t)\) and plug in the convolution integral for \(y(t)\) (notice how we've marked the integrals with \(dt\) and \(d\tau\) to keep track of them):

\(Y(\omega)=\int_{-\infty,dt}^\infty y(t)e^{-j\omega t}dt=\int_{-\infty,dt}^\infty\int_{-\infty,d\tau}^\infty x(\tau)h(t-\tau)d\tau e^{-j\omega t}dt\)

Now, let's switch the order of the two integrals (this is valid in all but the most pathological cases):

\(Y(\omega)=\int_{-\infty,d\tau}^\infty x(\tau)\int_{-\infty,dt}^\infty h(t-\tau)e^{-j\omega t}dtd\tau\;\;\;\;let\;u=t-\tau\)

\(=\int_{-\infty,d\tau}^\infty x(\tau)\int_{-\infty,du}^\infty h(u)e^{-j\omega(u+\tau)}dud\tau\)

\(=\int_{-\infty,d\tau}^\infty x(\tau)e^{-j\omega\tau}d\tau\int_{-\infty,du}^\infty h(u)e^{-j\omega u}du\)

\(=X(\omega)H(\omega)\)

Therefore,

\(y(t)=x(t)\ast h(t)\leftrightarrow Y(\omega)=X(\omega)H(\omega)\)

We've just shown that the Fourier Transform of the convolution of two functions is simply the product of the Fourier Transforms of the functions. This means that for linear, time-invariant systems, where the input/output relationship is described by a convolution, you can avoid convolution by using Fourier Transforms. This is a very powerful result.

Multiplication of Signals

Our next property is the Multiplication Property. It states that the Fourier Transform of the product of two signals in time is the convolution of the two Fourier Transforms.

\(x_1(t)x_2(t)\leftrightarrow\frac1{2\pi}X_1(\omega)\ast X_2(\omega)\)

\(x_1(t)x_2(t)\leftrightarrow\frac1{2\pi}\int_{-\infty}^\infty X_1(u)X_2(\omega-u)du\)


Proof: \(ℱ\lbrack x_1(t)x_2(t)\rbrack=\int_{-\infty}^\infty x_1(t)x_2(t)e^{-j\omega t}dt\)


Now, write \(x_1 (t)\) as an inverse Fourier Transform.

\(ℱ\lbrack x_1(t)x_2(t)\rbrack=\int_{-\infty,dt}^\infty\left[\frac1{2\pi}\int_{-\infty,da}^\infty X_1(a)e^{-jat}da\right]x_2(t)e^{-j\omega t}dt\)

\(=\frac1{2\pi}\int_{-\infty,da}^\infty X_1(a)\int_{-\infty,dt}^\infty x_2(t)e^{-j(\omega-a)t}dtda\)

\(=\frac1{2\pi}\int_{-\infty,da}^\infty X_1(a)X_2(\omega-a)da\)

\(=\frac1{2\pi}X_1(\omega)\ast X_2(\omega)\)


Frequency Shifting or Modulation

\(ℱ\left[e^{j\omega_0t}x(t)\right]=\int_{-\infty}^\infty e^{j\omega_0t}x(t)e^{-j\omega t}dt\)

\(=\int_{-\infty}^\infty x(t)e^{-j(\omega-\omega_0)t}dt\)

\(=X(\omega-\omega_0)\)

\(x(t)e^{j\omega_0t}\leftrightarrow X(\omega-\omega_0)\)


What is "Convolution"?

Digital Signal Processing: How do you explain (without doing any calculation), that convolution in time domain should imply multiplication in frequency domain?


Multiplying two periodic signals means adding their frequencies.

A periodic signal is \(e^{i\omega_1t}\) and if you multiply it to some other signal \(e^{i\omega_2t}\) you get \(e^{i(\omega_1+\omega_2)t}\).

The point of the frequency domain is you make a signal up out of a bunch of different frequencies, i.e.

\(f(t)={\textstyle\sum_m}a_me^{i\omega_mt}\)

But to take a simple example, let's have

\(f(t)=a_1e^{i\omega_0t}+a_2e^{i2\omega_0t}\)

\(g(t)=b_1e^{i\omega_0t}+b_2e^{i2\omega_0t}\)

If you want to multiply them, you have

\(\left(a_1e^{i\omega_0t}+a_2e^{i2\omega_0t}\right)\left(b_1e^{i\omega_0t}+b_2e^{i2\omega_0t}\right)\)

\(=a_1b_1e^{i2\omega_0t}+(a_1b_2+a_2b_1)e^{i3\omega_0t}+a_2b_2e^{i4\omega_0t}\)

But this is just what is meant by the convolution of \(a\) and \(b\).



Convolution vs. cross-correlation ?!

Understanding Discrete Convolution as Polynomial Multiplication

Multiplication of polynomials and convolution

suppose you had two polynomials \(f\) and \(g\) given by

\(f(x) = \sum_{i=0}^m a_i x^i, \quad g(x) = \sum_{j=0}^n b_j x^j.\)

Then their product is

\(f(x)g(x) = \sum_{i=0}^m \sum_{j=0}^n a_i b_j x^i x^j.\)

If we wish to write this in standard form (i.e. as a sum of single powers of \(x\)), then we need to consider powers of degree \(i+j=k\). Rewriting slightly,

\(f(x)g(x) = \sum_{i=0}^m \sum_{j=0}^n a_{k-j} b_j x^k.\)

\(k\) ranges from \(0\) to \(m+n\), but now our sums are coupled since \(j\) depends on \(k\). This dependence is exactly that \(j\) ranges from \(0\) to \(k\). The easy way to see this is just by writing out a few cases, but logically it follows because \(a_0x^0b_kx^k\) results in a power of \(k\). Thus

\(f(x)g(x) = \sum_{k=0}^{m+n}\left( \sum_{j=0}^k a_{k-j} b_j\right) x^k.\)

The term inside the parentheses is the discrete convolution of the coefficients.

The fact that convolution shows up when doing products of polynomials is pretty closely tied to group theory and is actually very important for the theory of locally compact abelian groups. It provides a direct avenue of generalization from discrete groups to continuous groups. The discrete convolution is a very important aspect of \(ℓ^1\), which makes it clear that a lot of the setting for LCA groups is in \(L^1\).


Periodic Convolution (aka Circular Convolution)

same as FIR

\[\begin{align} y[n] &=x[n] * h[n] \nonumber \\ &=\sum_{k=-\infty}^{\infty} x[k] h[n-k] \end{align} \nonumber\]

\(x(n)=\{1,2,3,1\}\)

\(y(n)=\{4,3,2,2\}\)

\(h(n)=x(n)\ast y(n)\)

\(\begin{array}{cccc}1&2&3&1\\4&3&2&2\end{array}\)

\(\begin{array}{ccccccc}4&8&12&4&&&\\&3&6&9&3&&\\&&2&4&6&2&\\&&&2&4&6&2\end{array}\)

\(\begin{array}{ccccccc}4&11&20&19&13&8&2\\13&8&2&&<&<&<\\17&19&22&19&&&\end{array}\)

Proof:

\(DFT\lbrack x(n)\rbrack=X(k)=(7,\;-2-j,1,-2+j)\)

\(DFT\lbrack y(n)\rbrack=Y(k)=(11,\;2-j,1,2+j)\)

\(DFT\lbrack h(n)\rbrack=H(k)=X(k)\times Y(k)\)

\(H(k)=(77,-5,1,-5)\)

\(h(n)=IDFT\lbrack H(k)\rbrack=(17,19,22,19)\)

\(x(n)\ast y(n)=X(k)\times Y(k)\)

Fast Fourier Transform (FFT)

FFT

The output of the FFT is a complex vector containing information about the frequency content of the signal. The magnitude tells you the strength of the frequency components relative to other components. The phase tells you how all the frequency components align in time.

The Fast Fourier Transform (FFT) is a way to reduce the complexity of the Fourier transform computation from \(O(n^2)\) to \(O(n\;log\;n)\) which is a dramatic improvement.


Illustration of the FFT process. The colors indicate if an element is treated as an even array (red) or an odd array (green). The geometrical shapes allow to associate the elements which are in the same subarray. The multiplicative coefficients applied to the odd elements are also represented. This somewhat complicated diagram is the key to what follows. Feel free to spend some time to understand it.


\(k\) Binary representation of \(k\) Reverse binary representation Index of \(\widehat f\lbrack k\rbrack\)
0 000 000 0
1 001 100 4
2 010 010 2
3 011 110 6
4 100 001 1
5 101 101 5
6 110 011 3
7 111 111 7

Diagram of the FFT with a permuted input. The colors and symbols are the same as in the first illustration

Eight-point

where \(\omega=e^{-\frac{2\mathrm{πi}}8}=\frac{1-i}{\sqrt2}\)

note that \(\omega^{8+n}=\omega^n\)

DFT and its IDFT

DFT maxtrix \(\widetilde S_N^\ast\) and the corresponding normalized inverse DFT matrix \({\widetilde S}_N\) implies \(\;\;\widetilde S_N^\ast{\widetilde S}_N=I\). Such a complex matrix IDFT is said to be unitary. Reverse elements order of each column except first row.

Conversion in system matrices of DFT and IDFT obtained by replacing i by -i.


Butterfly Diagram for an 8-Point DIT FFT (Decimation in Time)


Butterfly Diagram for an 8-Point DIF FFT (Decimation in Frequency)




\[\tiny \begin{bmatrix} {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{0}}} & {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{0}}} & {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{0}}} & {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{0}}} \\ {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{1}}} & {\color{blue}{\omega^{2}}} & {\color{red}{\omega^{3}}} & {\color{blue}{\omega^{4}}} & {\color{red}{\omega^{5}}} & {\color{blue}{\omega^{6}}} & {\color{red}{\omega^{7}}} \\ {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{2}}} & {\color{blue}{\omega^{4}}} & {\color{red}{\omega^{6}}} & {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{2}}} & {\color{blue}{\omega^{4}}} & {\color{red}{\omega^{6}}} \\ {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{3}}} & {\color{blue}{\omega^{6}}} & {\color{red}{\omega^{1}}} & {\color{blue}{\omega^{4}}} & {\color{red}{\omega^{7}}} & {\color{blue}{\omega^{2}}} & {\color{red}{\omega^{5}}} \\ {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{4}}} & {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{4}}} & {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{4}}} & {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{4}}} \\ {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{5}}} & {\color{blue}{\omega^{2}}} & {\color{red}{\omega^{7}}} & {\color{blue}{\omega^{4}}} & {\color{red}{\omega^{1}}} & {\color{blue}{\omega^{6}}} & {\color{red}{\omega^{3}}} \\ {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{6}}} & {\color{blue}{\omega^{4}}} & {\color{red}{\omega^{2}}} & {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{6}}} & {\color{blue}{\omega^{4}}} & {\color{red}{\omega^{2}}} \\ {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{7}}} & {\color{blue}{\omega^{6}}} & {\color{red}{\omega^{5}}} & {\color{blue}{\omega^{4}}} & {\color{red}{\omega^{3}}} & {\color{blue}{\omega^{2}}} & {\color{red}{\omega^{1}}} \\ \end{bmatrix} \begin{bmatrix} {\color{blue}{a_0}} \\ {\color{red}{a_1}} \\ {\color{blue}{a_2}} \\ {\color{red}{a_3}} \\ {\color{blue}{a_4}} \\ {\color{red}{a_5}} \\ {\color{blue}{a_6}} \\ {\color{red}{a_7}} \end{bmatrix}. \]

\[\tiny \left[ \begin{array}{cccc|cccc} {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{0}}} & {\color{red}{\omega^{0}}} & {\color{red}{\omega^{0}}} & {\color{red}{\omega^{0}}} \\ {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{2}}} & {\color{blue}{\omega^{4}}} & {\color{blue}{\omega^{6}}} & {\color{red}{\omega^{1}}} & {\color{red}{\omega^{3}}} & {\color{red}{\omega^{5}}} & {\color{red}{\omega^{7}}} \\ {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{4}}} & {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{4}}} & {\color{red}{\omega^{2}}} & {\color{red}{\omega^{6}}} & {\color{red}{\omega^{2}}} & {\color{red}{\omega^{6}}} \\ {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{6}}} & {\color{blue}{\omega^{4}}} & {\color{blue}{\omega^{2}}} & {\color{red}{\omega^{3}}} & {\color{red}{\omega^{1}}} & {\color{red}{\omega^{7}}} & {\color{red}{\omega^{5}}} \\ \hline {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{0}}} & {\color{red}{\omega^{4}}} & {\color{red}{\omega^{4}}} & {\color{red}{\omega^{4}}} & {\color{red}{\omega^{4}}} \\ {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{2}}} & {\color{blue}{\omega^{4}}} & {\color{blue}{\omega^{6}}} & {\color{red}{\omega^{5}}} & {\color{red}{\omega^{7}}} & {\color{red}{\omega^{1}}} & {\color{red}{\omega^{3}}} \\ {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{4}}} & {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{4}}} & {\color{red}{\omega^{6}}} & {\color{red}{\omega^{2}}} & {\color{red}{\omega^{6}}} & {\color{red}{\omega^{2}}} \\ {\color{blue}{\omega^{0}}} & {\color{blue}{\omega^{6}}} & {\color{blue}{\omega^{4}}} & {\color{blue}{\omega^{2}}} & {\color{red}{\omega^{7}}} & {\color{red}{\omega^{5}}} & {\color{red}{\omega^{3}}} & {\color{red}{\omega^{1}}} \\ \end{array} \right] \begin{bmatrix} {\color{blue}{a_0}} \\ {\color{blue}{a_2}} \\ {\color{blue}{a_4}} \\ {\color{blue}{a_6}} \\ {\color{red}{a_1}} \\ {\color{red}{a_3}} \\ {\color{red}{a_5}} \\ {\color{red}{a_7}} \end{bmatrix} \]

\[\tiny \begin{bmatrix} \omega^0 & \omega^0 & \omega^0 & \omega^0 \\ \omega^0 & \omega^2 & \omega^4 & \omega^6 \\ \omega^0 & \omega^4 & \omega^0 & \omega^4 \\ \omega^0 & \omega^6 & \omega^4 & \omega^2 \end{bmatrix} \begin{bmatrix} a_0 \\ a_2 \\ a_4 \\ a_6 \end{bmatrix}, \begin{bmatrix} \omega^0 & \omega^0 & \omega^0 & \omega^0 \\ \omega^1 & \omega^3 & \omega^5 & \omega^7 \\ \omega^2 & \omega^6 & \omega^2 & \omega^6 \\ \omega^3 & \omega^1 & \omega^7 & \omega^5 \\ \end{bmatrix} \begin{bmatrix} a_1 \\ a_3 \\ a_5 \\ a_7 \end{bmatrix}, \begin{bmatrix} \omega^4 & \omega^4 & \omega^4 & \omega^4 \\ \omega^5 & \omega^7 & \omega^1 & \omega^3 \\ \omega^6 & \omega^2 & \omega^6 & \omega^2 \\ \omega^7 & \omega^5 & \omega^3 & \omega^1 \end{bmatrix} \begin{bmatrix} a_1 \\ a_3 \\ a_5 \\ a_7 \end{bmatrix}. \]

\[\tiny \begin{align*} \begin{bmatrix} \omega^0 & \omega^0 & \omega^0 & \omega^0 \\ \omega^1 & \omega^3 & \omega^5 & \omega^7 \\ \omega^2 & \omega^6 & \omega^2 & \omega^6 \\ \omega^3 & \omega^1 & \omega^7 & \omega^5 \\ \end{bmatrix} \begin{bmatrix} a_1 \\ a_3 \\ a_5 \\ a_7 \end{bmatrix} &= \begin{bmatrix} \omega^0 & & & \\ & \omega^1 & & \\ & & \omega^2 & \\ & & & \omega^3 \end{bmatrix} \begin{bmatrix} \omega^0 & \omega^0 & \omega^0 & \omega^0 \\ \omega^0 & \omega^2 & \omega^4 & \omega^6 \\ \omega^0 & \omega^4 & \omega^0 & \omega^4 \\ \omega^0 & \omega^6 & \omega^4 & \omega^2 \end{bmatrix} \begin{bmatrix} a_1 \\ a_3 \\ a_5 \\ a_7 \end{bmatrix} \\ \begin{bmatrix} \omega^4 & \omega^4 & \omega^4 & \omega^4 \\ \omega^5 & \omega^7 & \omega^1 & \omega^3 \\ \omega^6 & \omega^2 & \omega^6 & \omega^2 \\ \omega^7 & \omega^5 & \omega^3 & \omega^1 \end{bmatrix} \begin{bmatrix} a_1 \\ a_3 \\ a_5 \\ a_7 \end{bmatrix} &= \begin{bmatrix} \omega^4 & & & \\ & \omega^5 & & \\ & & \omega^6 & \\ & & & \omega^7 \end{bmatrix} \begin{bmatrix} \omega^0 & \omega^0 & \omega^0 & \omega^0 \\ \omega^0 & \omega^2 & \omega^4 & \omega^6 \\ \omega^0 & \omega^4 & \omega^0 & \omega^4 \\ \omega^0 & \omega^6 & \omega^4 & \omega^2 \end{bmatrix} \begin{bmatrix} a_1 \\ a_3 \\ a_5 \\ a_7 \end{bmatrix} \end{align*} \]








Fourier Signal Sifter

The method to retrieve signal frequency

One Question, if the sifter signal and sampling signal are different by a phase of angle 90 degrees?

DEFINING THE ENERGY OF THE SIGNAL AT A PARTICULAR FREQUENCY

The goal is to define a metric that can be used to help assess the prevalence of a particular frequency in our signal. This is achieved through the last step of the Fourier Transform with the summation and normalization step. In this case we are adding up all the points along the signal (k = 1 to k= N) and dividing though by the total number of points (N). This is equivalent to finding the average value across all the points on our wound up graph.

The center of mass concept is a physical analogy used to explain the Fourier transform. Just as the center of mass of an object represents its overall distribution of mass, the center of mass of a signal represents its overall distribution of frequencies.


Sifting Process

The spectral centroid is a measure used in digital signal processing to characterise a spectrum. It indicates where the center of mass of the spectrum is located. Perceptually, it has a robust connection with the impression of brightness of a sound. It is sometimes called center of spectral mass.






You will get 5% for each correct answer for single choice questions. In multiple choice question it might be up to 5%. At the end of the Quiz, your total score will be displayed. Maximum score is 100%.


FFT examples


How to compute frequency of data using FFT ?

calculate the magnitude of each DFT output bin: magnitude = sqrt(re*re+im*im)
find the bin with the largest magnitude, call its index i_max.
calculate the equivalent frequency of this bin: freq = i_max * Fs / N, here Fs = sample rate (Hz) and N = no of points in FFT.

The first bin in the FFT is DC (0 Hz), the second bin is Fs / N, where Fs is the sample rate and N is the size of the FFT. The next bin is 2 * Fs / N. To express this in general terms, the nth bin is n * Fs / N.

So if your sample rate, Fs is say 44.1 kHz and your FFT size, N is 1024, then the FFT output bins are at:


  0:   0 * 44100 / 1024 =     0.0 Hz
  1:   1 * 44100 / 1024 =    43.1 Hz
  2:   2 * 44100 / 1024 =    86.1 Hz
  3:   3 * 44100 / 1024 =   129.2 Hz
  4: ...
  5: ...
     ...
511: 511 * 44100 / 1024 = 22006.9 Hz
								

Note that for a real input signal (imaginary parts all zero) the second half of the FFT (bins from N / 2 + 1 to N - 1) contain no useful additional information (they have complex conjugate symmetry with the first N / 2 - 1 bins). The last useful bin (for practical aplications) is at N / 2 - 1, which corresponds to 22006.9 Hz in the above example. The bin at N / 2 represents energy at the Nyquist frequency, i.e. Fs / 2 ( = 22050 Hz in this example), but this is in general not of any practical use, since anti-aliasing filters will typically attenuate any signals at and above Fs / 2.

Nyquist frequency

In signal processing, the Nyquist frequency (or folding frequency), named after Harry Nyquist, is a characteristic of a sampler, which converts a continuous function or signal into a discrete sequence.

For example, audio CDs have a sampling rate of 44100 samples/second. At 0.5 cycle/sample, the corresponding Nyquist frequency is 22050 cycles/second (Hz). Conversely, the Nyquist rate for sampling a 22050 Hz signal is 44100 samples/second.

Humans can detect sounds in a frequency range from about 20 Hz to 20 kHz. (Human infants can actually hear frequencies slightly higher than 20 kHz, but lose some high-frequency sensitivity as they mature; the upper limit in average adults is often closer to 15–17 kHz.)


Parseval's theorem

In mathematics, Parseval's theorem usually refers to the result that the Fourier transform is unitary; loosely, that the sum (or integral) of the square of a function is equal to the sum (or integral) of the square of its transform.

\[\mathrm{ \mathit{E\mathrm{=}\int_{-\infty }^{\infty }\left | x\left ( t \right ) \right |^{\mathrm{2}}dt\mathrm{=}\frac{\mathrm{1}}{\mathrm{2}\pi }\int_{-\infty }^{\infty }\left | X\left ( \omega \right ) \right |^{\mathrm{2}}d\omega}}\]

The Parseval’s identity is also called energy theorem or Rayleigh’s energy theorem.

Convolution

Proof of fourier transformation of convolution of two signals

\(\int_{-\infty}^\infty f(t-\tau)g(\tau)\operatorname d\tau\)

\(\int_{-\infty}^\infty\lbrack\underbrace{\int_{-\infty}^\infty f(t-\tau)g(\tau)\operatorname d\tau}_{h(t)}\rbrack e^{-j\omega t}\operatorname dt\)

\(=\int_{-\infty}^\infty\int_{-\infty}^\infty f(t-\tau)g(\tau)e^{-j\omega t}\operatorname d\tau\operatorname dt\)

\(=\int_{-\infty}^\infty g(\tau)\int_{-\infty}^\infty f(t-\tau)e^{-j\omega t}\operatorname dt\operatorname d\tau\)

\(=\int_{-\infty}^\infty g(\tau)\int_{-\infty}^\infty f(s)e^{-j\omega(s+\tau)}\operatorname ds\operatorname d\tau\)

\(=\int_{-\infty}^\infty g(\tau)e^{-j\omega\tau}(\underbrace{\int_{-\infty}^\infty f(s)e^{-j\omega s}\operatorname ds}_{F(\omega)})\operatorname d\tau\)

\(=F(\omega)\underbrace{\int_{-\infty}^\infty g(\tau)e^{-j\omega\tau}\operatorname d\tau}_{G(\omega)}\)

\(=F(\omega)G(\omega)\)


Proof of fourier transformation of multiplication of two signals

\(ℱ\lbrack f(t)g(t)\rbrack=\int_{t=-\infty}^\infty\lbrack f(t)g(t)\rbrack e^{-j\omega t}dt\)

\(\because f(t)=\frac1{2\pi}\int_{\alpha=-\infty}^\infty F(\alpha)e^{j\alpha t}d\alpha\)

\(ℱ\lbrack f(t)g(t)\rbrack=\int_{t=-\infty}^\infty\lbrack\frac1{2\pi}\int_{\alpha=-\infty}^\infty F(\alpha)e^{j\alpha t}d\alpha\rbrack g(t)e^{-j\omega t}dt\)

\(=\frac1{2\pi}\int_{\alpha=-\infty}^\infty F(\alpha)\lbrack\int_{t=-\infty}^\infty g(t)e^{-j(\omega-\alpha)t}dt\rbrack d\alpha\)

\(\because G(\omega)=\int_{t=-\infty}^\infty g(t)e^{-j\omega t}dt\)

and replacing \(\omega\) with \(\omega-\alpha\), we get

\(G(\omega-\alpha)=\int_{t=-\infty}^\infty g(t)e^{-j(\omega-\alpha)t}dt\)

\(ℱ\lbrack f(t)g(t)\rbrack=\frac1{2\pi}\int_{\alpha=-\infty}^\infty F(\alpha)G(\omega-\alpha)d\alpha\)

Finally, we get \(ℱ\lbrack f(t)g(t)\rbrack=\frac1{2\pi}\lbrack F(\omega)\ast G(\omega)\rbrack\)

\(\because x_1(t)\ast x_2(t)=\int_{\tau=-\infty}^\infty x_1(\tau)x_2(t-\tau)d\tau\)

Total energy of \(f(t)\)

Parseval's theorem

\(E=\int_{-\infty}^\infty f(t)f^\ast(t)\operatorname dt\)

\(=\int_{-\infty}^\infty\left|f(t)\right|^2\operatorname dt\)

\(=\int_{-\infty}^\infty f^2(t)\operatorname dt\)

\(E=\int_{-\infty}^\infty f(t){(\underbrace{\frac1{2\mathrm\pi}\int_{-\infty}^\infty F(\omega)e^{j\omega t}d\omega}_{f(t)})}^\ast dt\)

\(=\int_{-\infty}^\infty f(t)(\frac1{2\mathrm\pi}\int_{-\infty}^\infty F^\ast(\omega)e^{-j\omega t}d\omega)dt\)

\(=\frac1{2\mathrm\pi}\int_{-\infty}^\infty\int_{-\infty}^\infty F^\ast(\omega)f(t)e^{-j\omega t}d\omega dt\)

\(=\frac1{2\mathrm\pi}\int_{-\infty}^\infty F^\ast(\omega)(\int_{-\infty}^\infty f(t)e^{-j\omega t}dt)d\omega\)

\(=\frac1{2\mathrm\pi}\int_{-\infty}^\infty F^\ast(\omega)F(\omega)d\omega\)

\(=\frac1{2\mathrm\pi}\int_{-\infty}^\infty\left|F(\omega)\right|^2d\omega\)




Fourier transform of periodic function

1.The FT of a periodic signal is not one, but (potentially) infinite impulses.

Assume an arbitrary periodic function \(f_T(t)\) with period \(T\) and consider its Fourier series representation in which \(\omega_0=\frac{2\pi}{T}\): \[f_T(t)=\sum_{n=-\infty}^{+\infty}c_n e^{j n \omega_0 t}\] Take the Fourier transform of the sides: \begin{align} \mathcal{F}\{f_T(t)\}=&\mathcal{F}\{\sum_{n=-\infty}^{+\infty}c_n e^{j n \omega_0 t}\}\\ =&c_n\sum_{n=-\infty}^{+\infty}\mathcal{F}\{ e^{j n \omega_0 t}\}\\ =&2\pi c_n\sum_{n=-\infty}^{+\infty}\delta(\omega-n\omega_0) \end{align} This means that the Fourier transform of a periodic signal is an impulse train where the impulse amplitudes are \(2\pi\) times the Fourier coefficients of that signal.


\(\because ℱ^{-1}\{2\mathrm\pi\cdot\delta(\omega-n\omega_0)\}\)

\(=\frac1{2\mathrm\pi}\int_{-\infty}^\infty2\mathrm\pi\cdot\delta(\omega-n\omega_0)e^{j\omega t}dt\)

\(=e^{jn\omega_0t}\)

\(e^{jn\omega_0t}\leftrightarrow2\pi\delta(\omega-n\omega_0)\)


\(\lbrack i\mathit.e\mathit.\mathit,e^{j\omega_0t}\mathit\:x\left(t\right)\overset{FT}{\mathit\leftrightarrow}X\left(\omega\mathit-\omega_0\right)\rbrack\)

\(F\left[1\mathit\:\mathit.e^{jn\omega_0t}\right]\mathit=2\pi\delta\left(\omega\mathit-n\omega_0\right)\)


\[f_T(t)=\sum_{n=-\infty}^{+\infty}c_n e^{j n\omega_0 t}\]

\[F_T(\omega)=2\mathrm\pi\sum_{n=-\infty}^{+\infty}{\mathrm c}_{n}\mathrm\delta(\mathrm\omega-{n\mathrm{ω}}_0)\]




Interpreting the amplitude of signals in fourier transform

Since the sines are orthogonal, the squared magnitude of the coefficients weighting the sines is proportional to the energy of each corresponding sine frequency.


Parseval's theorem

In mathematics, Parseval's theorem usually refers to the result that the Fourier transform is unitary; loosely, that the sum (or integral) of the square of a function is equal to the sum (or integral) of the square of its transform.
In physics, the most general form of this property is more properly called the Plancherel theorem.
In electrical engineering, Parseval's theorem is often written as:

\(\int_{-\infty}^\infty\vert x(t)\vert^2{}\mathrm dt=\frac{\displaystyle1}{\displaystyle2\pi}\int_{-\infty}^\infty\vert X(\omega)\vert^2{}\mathrm d\omega=\int_{-\infty}^\infty\vert X(2\pi f)\vert^2{}\mathrm df\)

The interpretation of this form of the theorem is that the total energy of a signal can be calculated by summing power-per-sample across time or spectral power across frequency.

The magnitude of \(X(ω)\) for a given \(ω\) signifies how much does the signal \(e^{jωt}\) exist in the signal \(x(t)\); indicated as an inner product between \(x(t)\) and \(e^{jωt}\).

For discrete time signals, the theorem becomes:

\(\sum_{n=-\infty}^\infty\vert x\lbrack n\rbrack\vert^2={\frac1{2\pi}}\int_{-\pi}^\pi\vert X_{2\pi}(\phi)\vert^2{\mathrm d}\phi\)

where \(X_{2\pi }\) is the discrete-time Fourier transform (DTFT) of \(x\) and \(\phi\) represents the angular frequency (in radians per sample) of \(x\)




Fourier Transform of Gaussian Signal

Fourier Transform of Gaussian Signal

For a continuous-time function \(x(t)\), the Fourier transform of \(x(t)\) can be defined as,
\[\mathrm{X(\omega)\:=\:\int_{-\infty }^{\infty} x\left(t\right)\:e^{-j\omega t}\:dt}\]

Gaussian Function The Gaussian function is defined as,
\[\mathrm{g_{a}\left(t\right) \:=\: e^{-at^{2}} ;\:\:for\:all \:t}\]

Therefore, from the definition of Fourier transform, we have,
\[\mathrm X(\mathrm\omega)=\mathcal F(e^{-at^2})=\int_{-\infty}^\infty\mathrm e^{-\mathrm{at}^2}\:\mathrm e^{-\mathrm{jωt}}\:\mathrm{dt}\]

\(\Rightarrow\:\mathrm X\left(\mathrm\omega\right)\:=\:\int_{-\infty}^\infty\:\mathrm e^{-\left(\mathrm{at}^2\:+\:\mathrm{jωt}\right)}\:\mathrm{dt}\)
\(=\int_{-\infty}^\infty\:\mathrm e^{-\left[\mathrm{at}^2\:+\:\mathrm{jωt}+\left(\frac{\mathrm{jω}}{2\sqrt{\mathrm a}}\right)^2\right]}\:\mathrm e^{\left(\frac{\mathrm{jω}}{2\sqrt{\mathrm a}}\right)^2}\mathrm{dt}\)
\(=\mathrm e^{-\left(\frac{\mathrm\omega^2}{4\mathrm a}\right)}\int_{-\infty}^\infty\:\mathrm e^{-\left(\sqrt{\mathrm a}\cdot\mathrm t+\frac{\mathrm{jω}}{2\sqrt{\mathrm a}}\right)^2}\mathrm{dt}\)

Let \(\sqrt{\mathrm a}\cdot\mathrm t+\frac{\mathrm{jω}}{2\sqrt{\mathrm a}}=u\)

Then \(\sqrt{\mathrm a}dt=du\;\Rightarrow\;dt=\frac{du}{\sqrt{\mathrm a}}\)

\(\therefore X(\omega)=\mathrm e^{-\left(\frac{\mathrm\omega^2}{4\mathrm a}\right)}\int_{-\infty}^\infty\:\frac{\mathrm e^{-u^2}}{\sqrt{\mathrm a}}du\)
\(=\frac{\mathrm e^{-\left(\frac{\mathrm\omega^2}{4\mathrm a}\right)}}{\sqrt{\mathrm a}}\int_{-\infty}^\infty\:\mathrm e^{-u^2}du\)

\(\because\int_{-\infty}^\infty\:\mathrm e^{-x^2}dx=\sqrt\pi\)

\(\Rightarrow X(\omega)=\frac{\mathrm e^{-\left(\frac{\mathrm\omega^2}{4\mathrm a}\right)}}{\sqrt{\mathrm a}}\cdot\sqrt\pi=\sqrt{\frac\pi a}\mathrm e^{-\left(\frac{\mathrm\omega^2}{4\mathrm a}\right)}\)

Therefore, the Fourier transform of the Gaussian functions,
\[\mathcal F(e^{-at^2})=\sqrt{\frac\pi a}\mathrm e^{-\left(\frac{\mathrm\omega^2}{4\mathrm a}\right)}\]

\[\mathrm e^{-\mathrm{at}^2}\overset{\mathrm{FT}}\leftrightarrow\sqrt{\frac{\mathrm\pi}{\mathrm a}}\mathrm e^{-\left(\frac{\mathrm\omega^2}{4\mathrm a}\right)}\]

The graphical representation of Gaussian function and its frequency spectrum is,



Fourier Transform of Gaussian Modulated Function

The Gaussian modulated signal is defined as
\(\mathrm x(\mathrm t)=\mathrm e^{-\mathrm{at}^2}{\mathrm{cosω}}_0\mathrm t\)

\(\Rightarrow\mathrm x(\mathrm t)=\mathrm e^{-\mathrm{at}^2}\cdot\frac12(\mathrm e^{{\mathrm{jω}}_0\mathrm t}+\mathrm e^{-{\mathrm{jω}}_0\mathrm t})\)

Therefore the Fourier transform of the Guassian modulated signaled is
\(\mathrm X(\mathrm\omega)=\frac12\mathcal F\{\mathrm e^{-\mathrm{at}^2}\mathrm e^{{\mathrm{jω}}_0\mathrm t}\}+\frac12\mathcal F\{\mathrm e^{-\mathrm{at}^2}\mathrm e^{-{\mathrm{jω}}_0\mathrm t}\}\)

By using frequency shifting property \(\mathrm e^{{\mathrm{jω}}_0\mathrm t}\mathrm x(\mathrm t)\overset{\mathrm{FT}}\leftrightarrow\mathrm X(\mathrm\omega+{\mathrm\omega}_0)\) of Fourier transform, we get
\(\mathcal F\{\mathrm e^{-\mathrm{at}^2}\mathrm e^{{\mathrm{jω}}_0\mathrm t}\}={\left.\mathcal F\{\mathrm e^{-\mathrm{at}^2}\}\right|}_{\mathrm\omega=(\mathrm\omega-{\mathrm\omega}_0)}\)
\(\mathcal F\{\mathrm e^{-\mathrm{at}^2}\mathrm e^{-{\mathrm{jω}}_0\mathrm t}\}={\left.\mathcal F\{\mathrm e^{-\mathrm{at}^2}\}\right|}_{\mathrm\omega=(\mathrm\omega+{\mathrm\omega}_0)}\)

\(\mathcal F\{e^{-at^2}\}=\sqrt{\frac\pi a}\mathrm e^{-\left(\frac{\mathrm\omega^2}{4\mathrm a}\right)}\)

Therefore the Fourier transform of Gaussian modulated function is, \(\mathrm X(\mathrm\omega)=\frac12\{\sqrt{\frac{\mathrm\pi}{\mathrm a}}\mathrm e^{-\left[\frac{\left(\mathrm\omega-{\mathrm\omega}_0\right)^2}{4\mathrm a}\right]}+\sqrt{\frac{\mathrm\pi}{\mathrm a}}\mathrm e^{-\left[\frac{\left(\mathrm\omega+{\mathrm\omega}_0\right)^2}{4\mathrm a}\right]}\}\)


Fourier Transform of Rectangle Function

rect(t)

Rectangle Function

\(rect(t)\;=\;\left\{\begin{array}{lc}1&\left|t\right|\leq\frac12\\0&otherwise\end{array}\right.\)

\(\mathrm F(\mathrm\omega)=\int_{-\infty}^\infty\mathrm{rect}(\mathrm t)\mathrm e^{-\mathrm{jωt}}\operatorname d\mathrm t=\int_{-\frac12}^\frac121\cdot\mathrm e^{-\mathrm{jωt}}\operatorname d\mathrm t\)
\(=\left.\frac1{-\mathrm{jω}}\mathrm e^{-\mathrm{jωt}}\right|_{-\frac12}^\frac12\)
\(=\frac1{-\mathrm{jω}}(\mathrm e^{-\mathrm j\frac{\mathrm\omega}2}-\mathrm e^{\mathrm j\frac{\mathrm\omega}2})\)
\(=\frac1{\mathrm\omega/2}\cdot\frac{\mathrm e^{\mathrm j\frac{\mathrm\omega}2}-\mathrm e^{-\mathrm j\frac{\mathrm\omega}2}}{2\mathrm j}\)
\(=\frac{\sin(\mathrm\omega/2)}{(\mathrm\omega/2)}\)

\[\mathrm F(\mathrm\omega)=\mathrm{sinc}(\mathrm\omega/2)\]



Fourier Transform of some Functions

The Dirac Delta

\[\delta(t)\Leftrightarrow1\]



DC

\[1\Leftrightarrow2\pi\delta(\omega)\]



Signum (Sign)

\[sgn(t)=u_0(t)-u_0(t-)\Leftrightarrow\frac2{j\omega}\]



Discrete Fourier Transform (DFT)

DFT

The discrete Fourier transform is a transformation that follows from the Fourier transform and is, as its name indicates, adapted for discrete signals.

The Fourier transform

for a function \(f\), its Fourier transform \(\hat f\) is defined by:
\[\hat{f}(\nu) = \int_{-\infty}^{+\infty}f(x)e^{-2i\nu x}\text{d}x\]

Discrete Time Fourier Transform (DTFT)​​

the Fourier transform of a signal is a continuous function of the variable \(\nu\).

  1. We sample or discretize the signal to analyze. This means that instead of working on the function that associates the value of the signal with the variable \(x\), we will work on a discrete series of values of the temporal signal. In the case of the DTFT, we sample with a constant step.

  2. We window the discretized signal. This means that we keep only a finite number of points of the signal.

  3. We sample the Fourier transform of the signal to obtain the discrete Time Fourier Transform.

  4. We window the discrete Fourier transform for storage.


A real Gaussian signal. The Fourier transform of a real Gaussian is also a real Gaussian in Frequency.

The signal which will be used as an example


More formally, we have:
\[f(x)=e^{-x^2},\;\widehat{f}(\nu)=\sqrt{\pi}e^{-({πν})^2}\]

Let's first look at the sampling. Mathematically, we can represent the process by the multiplication of the signal \(f\) by a Dirac comb of period \(T\), \(ш_T\). The Dirac comb is defined as follows:

\[ш_T(x) = \sum_{k=-\infty}^{+\infty}\delta(x-kT)\]

With \(δ\) the Dirac distribution. Here is the plot that we can obtain if we represent \(f\) and \(g={ш}_{T}\times f\) together:

The signal and the sampled signal.


The Fourier transform of the new \(g\) function is written,
\[\begin{aligned} \hat{g}(\nu) &= \int_{-\infty}^{+\infty} \sum_{k=-\infty}^{+\infty} \delta(x-kT) f(x) e^{-2i\pi x \nu} \text{d}x \\ &= \sum_{k=-\infty}^{+\infty}\int_{-\infty}^{+\infty}\delta(x-kT) f(x) e^{-2i\pi x \nu}\text{d}x \\ &= \sum_{k=-\infty}^{+\infty}f(kT)e^{-2i\pi kT\nu} \end{aligned}\]

If we put \(f[k]=f(kT)\) the sampled signal \(\nu_{ech} = \frac{1}{T}\) the sampling frequency, we have:

\[\hat{g} = \sum_{k=-\infty}^{+\infty}f[k]e^{-2i\pi k\frac{\nu}{\nu_{\text{ech}}}}\]

If we plot the Fourier transform of the starting signal \(\hat{f}\) and that of the sampled signal \(\hat{g}\), we obtain the following plot:

Fourier transform of the signal and its sampled signal


We can then look at the windowing process. There are several methods that each have their advantages, but we will focus here only on the rectangular window. The principle is simple: we only look at the values of \(f\) for \(x\) between \(-x_0\) and \(+x_0\). This means that we multiply the function \(f\) by a gate function \(Π_{x0}\) which verified,

\[\Pi_{x_0}(x) = \begin{aligned} 1 & \;\text{if}\; x\in[-x_0,x_0] \\ 0 & \;\text{else} \end{aligned} \]

Graphically, here is how we could represent \(h\) and \(f\) together.

Signal sampled and windowed


Concretely, this is equivalent to limiting the sum of the Dirac comb to a finite number of terms. We can then write the Fourier transform of \(h=\Pi_{x_0}\times\Pi ш_T\times f\)

\[\hat{h}(\nu) = \sum_{k=-k_0}^{+k_0}f[k]e^{-2i\pi k\frac{\nu}{\nu_{\text{ech}}}}\]

We can now proceed to the last step: sampling the Fourier transform. Indeed, we can only store a finite number of values on our computer and, as defined, the function \(\hat h\) is continuous. We already know that it is periodic, with period \(ν_{ech}\), so we can store only the values between \(0\) and \(ν_{ech}\). We still have to sample it, and in particular to find the adequate sampling step. It is clear that we want the sampling to be as "fine" as possible, in order not to miss any detail of the Fourier transform! For this we can take inspiration from what happened when we sampled \(f\): its Fourier transform became periodic, with period \(ν_{ech}\). Now the inverse Fourier transform (the operation that allows to recover the signal from its Fourier transform) has similar properties to the Fourier transform. This means that if we sample \(\hat h\) with a sampling step \(v_s\), then its inverse Fourier transform becomes periodic with period \(1/v_s\). This gives a low limit on the values that \(v_s\) can take ! Indeed, if the inverse transform has a period smaller than the width of the window ( \(1/v_s<2x_0\), then the reconstructed signal taken between \(-x_0\) and \(x_0\) will not correspond to the initial signal \(f\).

So we choose \(v_s=\frac1{2x_0}\) to discretize \(\hat{h}\). We use the same process of multiplication by a Dirac comb to discretize. In this way we obtain the Fourier transform of a new function \(l\):

\[\hat{l}(\nu) = \sum_{n=-\infty}^{+\infty} \delta(\nu-n\nu_s) \sum_{k=-k_0}^{+k_0}f[k]e^{-2i\pi k\frac{n\nu_s}{\nu_{\text{ech}}}}\]

This notation is a bit complicated, and we can be more interested in \(\hat{l}[n]=\hat{l}(n\nu_s)\)

\[\begin{aligned} \hat{l}[n] = \hat{l}(n\nu_s) &=& \sum_{k=-k_0}^{+k_0}f[k]e^{-2i\pi k\frac{n\nu_s}{\nu_{\text{ech}}}}\\ &=& \sum_{k=0}^{N-1}f[k]e^{-2i\pi k\frac{n}{N}} \end{aligned}\]

To get the last line, I re-indexed \(f[k]\) to start at 0, noting \(N\) the number of samples. I then assumed that the window size corresponded to an integer number of samples, i.e. that \(2x_0 = N\times T\), which is rewritten as \(N\times \nu_s = \nu_{ech}\). This expression is the discrete Fourier transform of the signal.

Sampling the Fourier transform of the sampled signal to obtain the discrete Fourier transform


This problem is solved quite simply by windowing the discrete Fourier transform. Since the transform has been periodized by the sampling of the starting signal, it is enough to store one period of the transform to store all the information contained in it. The choice which is generally made is to keep all the points between O and \(ν_{ech}\). This allows to use only positive \(n\), and one can easily reconstruct the plot of the transform if needed by inverting the first and the second half of the computed transform. In practice (for the implementation), the discrete Fourier transform is thus given by :

\[\forall n=0...(N-1),\; \hat{f}[n] = \sum_{k=0}^{N-1}f[k]e^{-2i\pi k\frac{n}{N}}\]

Windowing of the discrete Fourier transform for storage


Calculating the discrete Fourier transform

So we have at our disposal the expression of the discrete Fourier transform of a signal \(f\):

\[\hat{f}[n] = \sum_{k=0}^{N-1}f[k]e^{-2i\pi k\frac{n}{N}}\]

This s the expression of a matrix product which would look like this:
\[\hat{f} = \mathbf{M} \cdot f\]

with
\[\mathbf{M} = \begin{pmatrix} 1 & 1 & 1 & \dots & 1 \\ 1 & e^{-2i\pi 1 \times 1 / N} & e^{-2i\pi 2 \times 1 / N} & \dots & e^{-2i\pi 1\times (N-1)/N} \\ 1 & e^{-2i\pi 1 \times 2 \times 1 / N} & e^{-2i\pi 2 \times 2 / N} & \ddots & \vdots\\ \vdots & \vdots & \ddots & \ddots & e^{e-2i\pi (N-2)\times (N-1) / N}\\ 1 & e^{-2i\pi (N-1) \times 1/N} & \dots & e^{e-2i\pi (N-1) \times (N-2) / N} & e^{-2i\pi (N-1)\times (N-1) / N} \end{pmatrix}\]

Those in the know will notice that this is a Vandermonde matrix on the roots of the unit.


We notice that the sampling of the signal has led to the periodization of its Fourier transform. This leads to an important property in signal processing: the Nyquist-Shanon criterion, and one of its consequences, spectrum aliasing. I let you consult the Wikipedia article about this if you are interested, but you can have a quick idea of what happens if you draw the previous plot with a too large sampling: the bells of the sampled signal transform overlap.

Fourier transform of the signal and its sampled signal, illustrating aliasing




a) Upper-left: A Gaussian function has the same Gaussian shape in both time/space and frequency space
b) Upper-right: sampling Gaussian signal in the time space
c) Lower-left: Gaussian Frequency signal repeated in \(1/T\) as we sample it.
d) Lower-right: Discrete Fourier Transform of Gaussian function

Depiction of a Fourier transform (upper left) and its periodic summation (DTFT) in the lower left corner. The spectral sequences at (c) upper right and (d) lower right are respectively computed from (c) one cycle of the periodic summation of s(t) and (d) one cycle of the periodic summation of the s(nT) sequence. The respective formulas are (c) the Fourier series integral and (d) the DFT summation. Its similarities to the original transform, S(f), and its relative computational ease are often the motivation for computing a DFT sequence.

Fast Fourier Transform

FFT



Fourier Series

Sine-cosine form

\(f(x)=a_0+\sum_{n=1}^\infty a_n\cos(nx)+\sum_{n=1}^\infty b_n\sin(nx)\)

\(\left\{\begin{array}{l}a_0=\frac1{2\pi}\int_{-\pi}^\pi f(x)\operatorname dx\\a_n=\frac1\pi\int_{-\pi}^\pi f(x)\cos(nx)\operatorname dx\\b_n=\frac1\pi\int_{-\pi}^\pi f(x)sin(nx)\operatorname dx\end{array}\right.\)

If \(f(x)\) is a periodic function,
\(f(x)=\sum_{n=0}^\infty\lbrack a_n\cos(\frac{2n\pi}Tx)+b_n\sin(\frac{2n\pi}Tx)\rbrack\)
\(f(x)=a_0+\sum_{n=1}^\infty\lbrack a_n\cos(\frac{2n\pi}Tx)+b_n\sin(\frac{2n\pi}Tx)\rbrack\)

If \(f(x)\)'s period is \(2\pi\)

What kind of frequencies should we use?
\(\sin(x),\sin(2x),\sin(\frac x2),\cdots?\;\cos(x),\cos(2x),\cos(\frac x2),\cdots?\) or both?

\(\sin(x),\sin(2x),\sin(nx),\cdots,\;\cos(x),\cos(2x),\cos(nx),\cdots\;\Rightarrow OK\)

\(\sin(\frac x2),\sin(\frac x3),\sin(\frac83x),\cdots,\;\cos(\frac x2),\cos(\frac x3),\cos(\frac83x),\cdots\;\Rightarrow NO\)

\(f(x)=\underbrace{\frac{f(x)+f(-x)}2}_{even}+\underbrace{\frac{f(x)-f(-x)}2}_{odd}\)

\(f(x)=a_0+\sum_{n=1}^\infty a_n\cos(nx)+\sum_{n=1}^\infty b_n\sin(nx),\;N\in\mathcal N,\;a_n,b_n\in\mathcal R\)


The correlation between two functions can be done by their integral result.

\(\int_a^bf(x)g(x)\operatorname dx,\;\mathcal R\rightarrow\mathcal C\)



How to get \(a_n\) of \(f(x)\)?

[Ex] \(f(x)=a_0+a_1\cos(x)+a_2\cos(2x)+b_1\sin(x)+b_2\sin(2x)\)

\(f(x)=f(x+2\pi)\)

\(\int_{-\pi}^\pi f(x)\operatorname dx=\int_{-\pi}^\pi a_0\operatorname dx=2a_0\pi\;\rightarrow a_0=\frac1{2\pi}\int_{-\pi}^\pi f(x)\operatorname dx\)

\(\int_{-\pi}^\pi f(x)\cos(x)\operatorname dx=a_0\underbrace{\int_{-\pi}^\pi\cos(x)\operatorname dx}_0+a_1\underbrace{\int_{-\pi}^\pi\cos(x)\cos(x)\operatorname dx}_\pi+a_2\underbrace{\int_{-\pi}^\pi\cos(2x)\cos(x)\operatorname dx}_0+b_1\underbrace{\int_{-\pi}^\pi\sin(x)\cos(x)\operatorname dx}_0+b_2\underbrace{\int_{-\pi}^\pi\sin(2x)\cos(x)\operatorname dx}_0\)
\(=a_1\int_{-\pi}^\pi\frac12\lbrack\cos(2x)+1\rbrack\operatorname dx\)
\(\Rightarrow\int_{-\pi}^\pi f(x)\cos(x)\operatorname dx=a_1\pi\;\rightarrow a_1=\frac1\pi\int_{-\pi}^\pi f(x)\cos(x)\operatorname dx\)

\(\Rightarrow a_n=\frac1\pi\int_{-\pi}^\pi f(x)\cos(nx)\operatorname dx,\;n\geq1\)

\(\Rightarrow b_n=\frac1\pi\int_{-\pi}^\pi f(x)\sin(nx)\operatorname dx,\;n\geq1\)


\(f(x)=a_0+\sum_{n=1}^\infty a_n\cos(nx)+\sum_{n=1}^\infty b_n\sin(nx)\)

\(\left\{\begin{array}{l}a_0=\frac1{2\pi}\int_{-\pi}^\pi f(x)\operatorname dx\\a_n=\frac1\pi\int_{-\pi}^\pi f(x)\cos(nx)\operatorname dx\\b_n=\frac1\pi\int_{-\pi}^\pi f(x)sin(nx)\operatorname dx\end{array}\right.\)



\(\left\{\begin{array}{l}a_0=\frac1{2\pi}\int_{-\pi}^\pi f(x)\operatorname dx\\a_n=\frac1\pi\int_{-\pi}^\pi f(x)\cos(nx)\operatorname dx\\b_n=\frac1\pi\int_{-\pi}^\pi f(x)sin(nx)\operatorname dx\end{array}\right.\Rightarrow\left\{\begin{array}{l}\int_{-\pi}^\pi a_0\cos(nx)\operatorname dx=0\\\int_{-\pi}^\pi a_0\sin(nx)\operatorname dx=0\\\int_{-\pi}^\pi\cos(mx)\cos(nx)\operatorname dx\\\int_{-\pi}^\pi\sin(mx)\cos(nx)\operatorname dx\\\int_{-\pi}^\pi\sin(mx)\sin(nx)\operatorname dx\end{array}\right.\)

\(\left.\begin{array}{l}\int_{-\pi}^\pi a_0\cos(nx)\operatorname dx=0\\\int_{-\pi}^\pi a_0\sin(nx)\operatorname dx=0\end{array}\right\}\;\omega=2\pi\)

\(\left.\begin{array}{l}\int_{-\pi}^\pi\cos(mx)\cos(nx)\operatorname dx\\\int_{-\pi}^\pi\sin(mx)\cos(nx)\operatorname dx\\\int_{-\pi}^\pi\sin(mx)\sin(nx)\operatorname dx\end{array}\right\}\left\{\begin{array}{l}m=n\\m\neq n\end{array}\right.\)


\(\int_{-\pi}^\pi\cos(mx)\cos(nx)\operatorname dx=\frac12\int_{-\pi}^\pi\{\cos\lbrack(m+n)x\rbrack+\cos\lbrack(m-n)x\rbrack\}\operatorname dx=\left\{\begin{array}{lc}2\pi&(n=m)=0\\0&n\neq m\\\pi&(n=m)\neq0\end{array}\right.\)

\(\int_{-\pi}^\pi\sin(mx)\cos(nx)\operatorname dx=\frac12\int_{-\pi}^\pi\{\sin\lbrack(m+n)x\rbrack+\sin\lbrack(m-n)x\rbrack\}\operatorname dx=0\)

\(\int_{-\pi}^\pi\sin(mx)\sin(nx)\operatorname dx=-\frac12\int_{-\pi}^\pi\{\cos\lbrack(m+n)x\rbrack-\cos\lbrack(m-n)x\rbrack\}\operatorname dx=\left\{\begin{array}{lc}0&n\neq m\;or\;(n=m)=0\\\pi&(n=m)\neq0\end{array}\right.\)


Apply to any frequency not \(2\pi\)

\(\int_{-L}^L\sin(\frac{n\pi}Lx)\sin(\frac{m\pi}Lx)\operatorname dx=\left\{\begin{array}{ll}0&n\neq m\\0&(n=m)=0\\L&(n=m)\neq0\end{array}\right.\)

\(\int_{-L}^L\cos(\frac{n\pi}Lx)\cos(\frac{m\pi}Lx)\operatorname dx=\left\{\begin{array}{ll}0&n\neq m\\2L&(n=m)=0\\L&(n=m)\neq0\end{array}\right.\)

\(\int_{-L}^L\sin(\frac{n\pi}Lx)\cos(\frac{m\pi}Lx)\operatorname dx=0\)

\(\int_L^L\sin(\frac{n\pi}Lx)\operatorname dx=0\)

\(\int_L^L\cos(\frac{n\pi}Lx)\operatorname dx=0\)


Orthogonal Basis

\(\begin{bmatrix}1\\0\\0\end{bmatrix},\begin{bmatrix}0\\1\\0\end{bmatrix},\begin{bmatrix}0\\0\\1\end{bmatrix}\)



including \(cos(nx)\) and \(sin(nx)\)



\(\int_{-\pi}^\pi f(x)g(x)\operatorname dx\): inner product of two functions

\(\sqrt{\int_{-\pi}^\pi\left|f(x)\right|^2\operatorname dx}\): norm of a function


Hilbert Space

In mathematics, a Hilbert space is a real or complex inner product space that is also a complete metric space with respect to the metric induced by the inner product. It generalizes the notion of Euclidean space, to infinite dimensions. The inner product, which is the analog of the dot product from vector calculus, allows lengths and angles to be defined. Furthermore, completeness means that there are enough limits in the space to allow the techniques of calculus to be used. A Hilbert space is a special case of a Banach space.

A Hilbert space is a vector space \(H\) with an inner product \(\left\langle f,\;g\right\rangle\) such that the norm defined by
\(|f|=\sqrt{\left\langle f,f\right\rangle}\)

turns \(H\) into a complete metric space.



The overtones of a vibrating string. These are eigenfunctions of an associated Sturm–Liouville problem. The eigenvalues 1, ⁠½, ⅓, ... form the (musical) harmonic series.



Projection

\(\left\langle\overset\rightharpoonup a,\overset\rightharpoonup x\right\rangle=\left|\overset\rightharpoonup a\right|\left|\overset\rightharpoonup x\right|\cos(\theta)\)

\(Projection\;on\;x-axis:\frac{\left\langle\overset\rightharpoonup a,\overset\rightharpoonup x\right\rangle}{\left|\overset\rightharpoonup x\right|}\)

\(Projection\;on\;y-axis:\frac{\left\langle\overset\rightharpoonup a,\overset\rightharpoonup y\right\rangle}{\left|\overset\rightharpoonup y\right|}\)



Orthogonal basis but not a non-standard basis

\(\cos(x),\;\sin(x),\;\cos(2x),\;\sin(2x),\;\cdots\)

the norm of \(sin(nx)\): \(\sqrt{\int_{-\pi}^\pi\sin^2(nx)\operatorname dx}=\sqrt\pi\)

the norm of \(cos(nx)\): \(\sqrt{\int_{-\pi}^\pi cos^2(nx)\operatorname dx}=\sqrt\pi,\;(n\neq0)\)

the norm of \(1\): \(\sqrt{\int_{-\pi}^\pi1^2\operatorname dx}=\sqrt{2\pi}\)

\(\underbrace{1,\;\cos(x),\;\sin(x),\;\cos(2x),\;\sin(2x),\;\cdots}_{non\;standard\;basis}\;\Rightarrow\underbrace{\frac1{\sqrt{2\pi}},\;\;\frac{\cos(x)}{\sqrt\pi},\;\frac{\sin(x)}{\sqrt\pi},\;\frac{\cos(2x)}{\sqrt\pi},\;\frac{\sin(2x)}{\sqrt\pi},\;\cdots}_{standard\;basis}\)



\(f(x)\) with \(2\pi\) frequency signals projected on \(cos(2x)\) direction

\(\frac{\left\langle f(x),\cos(2x)\right\rangle}{\left|\cos(2x)\right|}=\frac{\int_{-\pi}^\pi f(x)cos(2x)\operatorname dx}{\sqrt{\int_{-\pi}^\pi cos^2(2x)\operatorname dx}}=\frac1{\sqrt\pi}\int_{-\pi}^\pi f(x)cos(2x)\operatorname dx\;\Rightarrow\frac1{\sqrt\pi}\int_{-\pi}^\pi f(x)cos(nx)\operatorname dx\)

\(f(x)\) with \(2\pi\) frequency signals projected on \(cos(2x)\) basis

\(\frac{\left\langle f(x),\cos(2x)\right\rangle}{\left|\cos(2x)\right|^2}=\frac1\pi\int_{-\pi}^\pi f(x)cos(2x)\operatorname dx=a_2\)






The Complex Fourier Transform

\(f(x)=a_0+\sum_{n=1}^\infty a_n\cos(nx)+\sum_{n=1}^\infty b_n\sin(nx)\)

\(\left\{\begin{array}{l}a_0=\frac1{2\pi}\int_{-\pi}^\pi f(x)\operatorname dx\\a_n=\frac1\pi\int_{-\pi}^\pi f(x)\cos(nx)\operatorname dx\\b_n=\frac1\pi\int_{-\pi}^\pi f(x)sin(nx)\operatorname dx\end{array}\right.\)


\(f(x)=\sum_{n=-\infty}^\infty c_ne^{inx}\)

\(c_n=\frac1{2\pi}\int_{-\pi}^\pi f(x)e^{-inx}dx\)


\(\left\{\begin{array}{l}\cos\theta=\frac{e^{i\theta}+e^{-i\theta}}2\\\sin\theta=\frac{e^{i\theta}-e^{-i\theta}}{2i}\end{array}\right.\)

\(f(x)=a_0+\sum_{n=1}^\infty a_n\cos(nx)+\sum_{n=1}^\infty b_n\sin(nx)\)
\(=a_0+\sum_{n=1}^\infty\frac{a_n}2(e^{inx}+e^{-inx})+\sum_{n=1}^\infty\frac{b_n}{2i}(e^{inx}-e^{-inx})\)
\(=\underbrace{a_0}_{c_0}+\sum_{n=1}^\infty\underbrace{(\frac{a_n-ib_n}2)}_{c_n}e^{inx}+\sum_{n=1}^\infty\underbrace{(\frac{a_n+ib_n}2)}_{c_{-n}}e^{-inx}\)
\(=c_0+\sum_{n=1}^\infty c_ne^{inx}+\sum_{n=1}^\infty c_{-n}e^{-inx}\)
\(=c_0+\sum_{n=1}^\infty c_ne^{inx}+\sum_{n=-1}^{-\infty}c_ne^{inx}\)
\(=\sum_{n=-\infty}^\infty c_ne^{inx}\)

\(\left\{\begin{array}{l}c_n=\frac{a_n-ib_n}2\\c_{-n}=\frac{a_n+ib_n}2\\c_0=a_0\end{array}\right.\;(n\geq1)\)


How to get \(c_n\)?

\(c_n=\frac{a_n-ib_n}2=\frac{{\displaystyle\frac1\pi}\int_{-\pi}^\pi f(x)\cos(nx)\operatorname dx-i\frac1\pi\int_{-\pi}^\pi f(x)\sin(nx)\operatorname dx}2\)
\(=\frac1{2\pi}\int_{-\pi}^\pi f(x)\cos(nx)\operatorname dx-i\frac1{2\pi}\int_{-\pi}^\pi f(x)\sin(nx)\operatorname dx\)
\(=\frac1{2\pi}\int_{-\pi}^\pi f(x)\lbrack\cos(nx)-i\sin(nx)\rbrack\operatorname dx\)

\(c_n=\frac1{2\pi}\int_{-\pi}^\pi f(x)e^{-inx}\operatorname dx\;(n\geq1)\)
\(c_{-n}=\frac1{2\pi}\int_{-\pi}^\pi f(x)e^{inx}\operatorname dx\;(n\geq1)\;\Rightarrow\;c_n=\frac1{2\pi}\int_{-\pi}^\pi f(x)e^{-inx}\operatorname dx\;(n\leq-1)\)
\(c_0=\frac1{2\pi}\int_{-\pi}^\pi f(x)\operatorname dx\)

\(\Rightarrow c_n=\frac1{2\pi}\int_{-\pi}^\pi f(x)e^{-inx}\operatorname dx,\;n\in\mathcal N\)


\(f(x)\in\mathcal Z\)

\(f(x)=g(x)+ih(x)\)
\(=\sum_{n=-\infty}^\infty g_ne^{inx}+i\sum_{n=-\infty}^\infty h_ne^{inx}\;(g_n,\;h_n\in\mathcal Z,\;(g_{-n},\;h_{-n})\;is\;the\;Complex\;conjugate\;of\;(g_n,\;h_n))\)
\(=\sum_{n=-\infty}^\infty\underbrace{(g_n+ih_n)}_{c_n}e^{inx}\)
\(c_n=g_n+ih_n\;\Rightarrow\;\overline{c_n}=\overline{g_n+ih_n}=\overline{g_n}-i\overline{h_n}=g_{-n}-ih_{-n}\)
\((c_{-n}=g_{-n}+ih_{-n})\neq\overline{c_n}\)


Complex Fourier Series

\(f(x)=\sum_{n=-\infty}^\infty c_ne^{inx}\)
\(c_n=\frac1{2\pi}\int_{-\pi}^\pi f(x)e^{-inx}\operatorname dx\)
\(\Rightarrow\int_{-\pi}^\pi e^{i(m-n)x}\operatorname dx=\left\{\begin{array}{lc}0&m\neq n\\2\pi&m=n\end{array}\right.\)

\(e^{inx}\rightarrow\left\{\begin{array}{lcc}n=0&f(x)=e^0=1&\\n=1&f(x)=e^{ix}&T=2\pi,\;\left\|f(x)\right\|=1\\n=2&f(x)=e^{i2x}&T=\pi,\;\left\|f(x)\right\|=1\\n=-1&f(x)=e^{-ix}&T=2\pi,\;\left\|f(x)\right\|=1\end{array}\right.\)

\(f(x)=\cdots+c_{-2}e^{-i2x}+c_{-1}e^{-ix}+c_0+c_1e^{ix}+c_2e^{i2x}+\cdots\)



The Orthogonality of Complex Basis

\(\cdots,e^{-i3x},e^{-i2x},e^{-ix},1,e^{ix},e^{i2x},e^{i3x},\cdots\)

\(\int_{-\pi}^\pi e^{imx}e^{inx}\operatorname dx\;\not>0\)

\(\int_{-\pi}^\pi e^{imx}e^{-inx}\operatorname dx=\int_{-\pi}^\pi e^{i(m-n)x}\operatorname dx=\left\{\begin{array}{lc}0&m\neq n\\2\pi&m=n\end{array}\right.\)



Standard basis for the field of complex numbers

\(\cdots,e^{-i3x},e^{-i2x},e^{-ix},1,e^{ix},e^{i2x},e^{i3x},\cdots\)

\(\int_{-\pi}^\pi e^{imx}e^{-inx}\operatorname dx=\left\{\begin{array}{lc}0&m\neq n\\2\pi&m=n\end{array}\right.,\;{\left\|e^{imx}\right\|}_C=\sqrt{2\pi}\)

\(period:\;2\pi,\;f(x)=\sum_{n=-\infty}^\infty c_ne^{inx}\)

\(f(x)\;\xrightarrow{FT}\left[\cdots,c_{-k},c_{-k+1},\cdots,c_{-2},c_{-1},c_0,c_1,c_2,\cdots,c_{k-1},c_k,\cdots\right]\)

\(period:\;T,\;f(x)=\sum_{n=-\infty}^\infty c_ne^{\frac{i2\pi n}Tx}\)

\(f(x)\;\xrightarrow{FT}\left[\cdots,c_{-k},c_{-k+1},\cdots,c_{-2},c_{-1},c_0,c_1,c_2,\cdots,c_{k-1},c_k,\cdots\right]\)


Discrete Fourier Transform

\(f(x)=\sum_{k=-\infty}^\infty c_ke^{ikx}\)

\(c_k=\frac1{2\pi}\int_{-\pi}^\pi f(x)e^{-ikx}\operatorname dx\)

\(e^{k\frac{2\pi i}N},\;(k=0,1,\cdots,N-1)\)



\(f(x)\) sampling

\(f(x)=\sum_{k=-\infty}^\infty c_ke^{ikx}\xrightarrow{x=\frac{2\pi}N}f_1=f(\frac{2\pi}N)=\sum_{k=-\infty}^\infty c_ke^{k\frac{2\pi i}N}\)

\(f(\frac{2\pi}N)=\cdots+c_{-2}e^{-2\cdot\frac{2\pi i}N}+c_{-1}e^{-1\cdot\frac{2\pi i}N}+c_0e^{0\cdot\frac{2\pi i}N}+c_1e^{1\cdot\frac{2\pi i}N}+c_2e^{2\cdot\frac{2\pi i}N}+\cdots+c_{k-1}e^{(k-1)\cdot\frac{2\pi i}N}+c_ke^{k\cdot\frac{2\pi i}N}+c_{k+1}e^{(k+1)\cdot\frac{2\pi i}N}+\cdots\)

\(what\;is\;e^{k\cdot\frac{2\pi i}N}?\)



\(f(\frac{2\pi}N)=\cdots+c_{-2}e^{-2\cdot\frac{2\pi i}N}+c_{-1}e^{-1\cdot\frac{2\pi i}N}+c_0e^{0\cdot\frac{2\pi i}N}+c_1e^{1\cdot\frac{2\pi i}N}+c_2e^{2\cdot\frac{2\pi i}N}+\cdots+c_{k-1}e^{(k-1)\cdot\frac{2\pi i}N}+c_ke^{k\cdot\frac{2\pi i}N}+c_{k+1}e^{(k+1)\cdot\frac{2\pi i}N}+\cdots\)
\(=(c_0+c_N+c_{-N}+c_{2N}+c_{-2N}+\cdots)e^{0\cdot\frac{2\pi i}N}\)
\(+(c_1+c_{N+1}+c_{-N+1}+c_{2N+1}+c_{-2N+1}+\cdots)e^{1\cdot\frac{2\pi i}N}\)
\(+(c_2+c_{N+2}+c_{-N+2}+c_{2N+2}+c_{-2N+2}+\cdots)e^{2\cdot\frac{2\pi i}N}\)
\(\dots\)
\(+(c_{N-1}+c_{2N-1}+c_{-1}+c_{3N-1}+c_{-N-1}+\cdots)e^{(N-1)\cdot\frac{2\pi i}N}\)

We don't need get infinite factors for each base. We could just keep one factor for each base.



\(f(\frac{2\pi}N)=\cdots+c_{-2}e^{-2\cdot\frac{2\pi i}N}+c_{-1}e^{-1\cdot\frac{2\pi i}N}+c_0e^{0\cdot\frac{2\pi i}N}+c_1e^{1\cdot\frac{2\pi i}N}+c_2e^{2\cdot\frac{2\pi i}N}+\cdots+c_{k-1}e^{(k-1)\cdot\frac{2\pi i}N}+c_ke^{k\cdot\frac{2\pi i}N}+c_{k+1}e^{(k+1)\cdot\frac{2\pi i}N}+\cdots\)
\(=(c_0+c_N+c_{-N}+c_{2N}+c_{-2N}+\cdots){\omega^0}\)
\(+(c_1+c_{N+1}+c_{-N+1}+c_{2N+1}+c_{-2N+1}+\cdots){\omega^1}\)
\(+(c_2+c_{N+2}+c_{-N+2}+c_{2N+2}+c_{-2N+2}+\cdots){\omega^2}\)
\(\dots\)
\(+(c_{N-1}+c_{2N-1}+c_{-1}+c_{3N-1}+c_{-N-1}+\cdots){\omega^{N-1}}\)


\(what\;is\;f(\frac{4\pi}N)?\)

\(f(2\cdot\frac{2\pi}N)=(c_0+c_N+c_{-N}+c_{2N}+c_{-2N}+\cdots){\omega^0}\)
\(+(c_1+c_{N+1}+c_{-N+1}+c_{2N+1}+c_{-2N+1}+\cdots){\omega^2}\)
\(+(c_2+c_{N+2}+c_{-N+2}+c_{2N+2}+c_{-2N+2}+\cdots){\omega^4}\)
\(\dots\)
\(+(c_{N-1}+c_{2N-1}+c_{-1}+c_{3N-1}+c_{-N-1}+\cdots){\omega^{2(N-1)}}\)

\(As\;\omega^N=1,\;for\;any\;k\in\mathcal Z,\;\omega^k\;will\;be\;one\;of\;\omega^0,\omega^1,\cdots,\omega^{N-1}\)

\(f(k\cdot\frac{2\pi}N)\;(k=0,1,\cdots,N-1)\;could\;be\;denoted\;by\;\omega^0,\omega^1,\cdots,\omega^{N-1}\)


If \(f(x)\) fourier series only contain \(c_0,c_1,c_2,\cdots,c_{N-1}\)

\(f(x)=c_0+c_1e^{ix}+c_2e^{i2x}+\cdots+c_{N-1}e^{i(N-1)x}\)

\(f(0\cdot\frac{2\pi}N)=c_0+c_1+c_2+\cdots+c_{N-1}\)
\(f(1\cdot\frac{2\pi}N)=c_0+c_1\omega+c_2\omega^2+\cdots+c_{N-1}\omega^{N-1}\)
\(f(2\cdot\frac{2\pi}N)=c_0+c_1\omega^2+c_2\omega^4+\cdots+c_{N-1}\omega^{2(N-1)}\)
\(f(3\cdot\frac{2\pi}N)=c_0+c_1\omega^3+c_2\omega^6+\cdots+c_{N-1}\omega^{3(N-1)}\)
\(\cdots\)
\(f((N-1)\cdot\frac{2\pi}N)=c_0+c_1\omega^{N-1}+c_2\omega^{2(N-1)}+\cdots+c_{N-1}\omega^{{(N-1)}^2}\)


DFT matrix

\(\overbrace{\underset{\Leftarrow Inverse\;Discrete\;Fourier\;Transform}{\underbrace{\begin{bmatrix}f_0\\f_1\\f_2\\f_3\\\vdots\\f_{N-1}\end{bmatrix}\overset{DFT}{\underset{IDFT}\rightleftarrows}\begin{bmatrix}1&1&1&1&\cdots&1\\1&\omega&\omega^2&\omega^3&\cdots&\omega^{N-1}\\1&\omega^2&\omega^4&\omega^6&\cdots&\omega^{2(N-1)}\\1&\omega^3&\omega^6&\omega^9&\cdots&\omega^{3(N-1)}\\\vdots&\vdots&\vdots&\vdots&\ddots&\vdots\\1&\omega^{N-1}&\omega^{2(N-1)}&\omega^{3(N-1)}&\cdots&\omega^{{(N-1)}^2}\end{bmatrix}\begin{bmatrix}c_0\\c_1\\c_2\\c_3\\\vdots\\c_{N-1}\end{bmatrix}}}}^{\Rightarrow Discrete\;Fourier\;Transform}\)

Fourier Matrix
\(\begin{bmatrix}1&1&1&1&\cdots&1\\1&\omega&\omega^2&\omega^3&\cdots&\omega^{N-1}\\1&\omega^2&\omega^4&\omega^6&\cdots&\omega^{2(N-1)}\\1&\omega^3&\omega^6&\omega^9&\cdots&\omega^{3(N-1)}\\\vdots&\vdots&\vdots&\vdots&\ddots&\vdots\\1&\omega^{N-1}&\omega^{2(N-1)}&\omega^{3(N-1)}&\cdots&\omega^{{(N-1)}^2}\end{bmatrix}\)


[Ex] \(f(x)=1+e^{ix}+e^{i2x}+e^{i3x}\)

N=4

\(f(0)=4,\;f(1\cdot\frac{2\pi}4)=f(2\cdot\frac{2\pi}4)=f(3\cdot\frac{2\pi}4)=0\)

\(\Rightarrow\omega=e^\frac{2\pi i}4=i\)

\(\begin{bmatrix}1&1&1&1\\1&\omega&\omega^2&\omega^3\\1&\omega^2&\omega^4&\omega^6\\1&\omega^3&\omega^6&\omega^9\end{bmatrix}^{-1}\begin{bmatrix}4\\0\\0\\0\end{bmatrix}=\begin{bmatrix}1\\1\\1\\1\end{bmatrix}\)

N=3

\(f(0)=4,\;f(\frac{2\pi}3)=1,\;f(2\cdot\frac{2\pi}3)=1\)

\(\omega=e^\frac{2\pi i}3=-\frac12+\frac{\sqrt3}2i\)

\(\begin{bmatrix}1&1&1\\1&\omega&\omega^2\\1&\omega^2&\omega^4\end{bmatrix}^{-1}\begin{bmatrix}4\\1\\1\end{bmatrix}=\begin{bmatrix}2\\1\\1\end{bmatrix}\)

\(\begin{bmatrix}{\color[rgb]{0.0, 0.0, 1.0}2}\\1\\1\end{bmatrix}\Rightarrow{\color[rgb]{0.0, 0.0, 1.0}2}\;is\;{\color[rgb]{0.0, 0.0, 1.0}1}+e^{ix}+e^{i2x}+{\color[rgb]{0.0, 0.0, 1.0}1}\cdot e^{i3x},\;({\color[rgb]{1.0, 0.0, 0.0}1}\cdot e^{-ix}+{\color[rgb]{1.0, 0.0, 0.0}1}+e^{ix}+e^{i2x})\;\begin{bmatrix}{\color[rgb]{1.0, 0.0, 0.0}1}\\1\\1\\{\color[rgb]{0.68, 0.46, 0.12}1}\end{bmatrix}\)

N=6

\(f(0)=4,\;f(1\cdot\frac{2\pi}6)=\sqrt3i,\;f(2\cdot\frac{2\pi}6)=1\)
\(f(3\cdot\frac{2\pi}6)=0,\;f(4\cdot\frac{2\pi}6)=1,\;f(5\cdot\frac{2\pi}6)=-\sqrt3i\)

\(\omega=e^\frac{2\pi i}6=\frac12+\frac{\sqrt3}2i\)

\(\omega_6^{-1}\begin{bmatrix}4\\\sqrt3i\\1\\0\\1\\-\sqrt3i\end{bmatrix}=\begin{bmatrix}1\\1\\1\\1\\0\\0\end{bmatrix}\)


DFT for Real number function

[Ex] \(f(x)=1+\cos(x)+\cos(2x)\)

\(f(x)=\frac12e^{-i2x}+\frac12e^{-ix}+1+\frac12e^{ix}+\frac12e^{i2x}\)

N=6

\(\omega_6^{-1}\begin{bmatrix}3\\1\\0\\1\\0\\1\end{bmatrix}=\begin{bmatrix}1\\0.5\\0.5\\0\\0.5\\0.5\end{bmatrix}\Rightarrow\begin{bmatrix}{\color[rgb]{0.0, 0.0, 1.0}1}&\frac12e^{-i2x}+\frac12e^{-ix}+\boxed{\color[rgb]{0.0, 0.0, 1.0}1}+\frac12e^{ix}+\frac12e^{i2x}\\{\color[rgb]{1.0, 0.0, 1.0}0}{\color[rgb]{1.0, 0.0, 1.0}.}{\color[rgb]{1.0, 0.0, 1.0}5}&\frac12e^{-i2x}+\frac12e^{-ix}+1+\boxed{{\color[rgb]{1.0, 0.0, 1.0}\frac12}e^{ix}}+\frac12e^{i2x}\\{\color[rgb]{0.9, 0.76, 0.02}0}{\color[rgb]{0.9, 0.76, 0.02}.}{\color[rgb]{0.9, 0.76, 0.02}5}&\frac12e^{-i2x}+\frac12e^{-ix}+1+\frac12e^{ix}+\boxed{{\color[rgb]{0.9, 0.76, 0.02}\frac12}e^{i2x}}\\0&\frac12e^{-i2x}+\frac12e^{-ix}+1+\frac12e^{ix}+\frac12e^{i2x}\\{\color[rgb]{0.0, 0.0, 1.0}0}{\color[rgb]{0.0, 0.0, 1.0}.}{\color[rgb]{0.0, 0.0, 1.0}5}&\boxed{{\color[rgb]{0.0, 0.0, 1.0}\frac12}e^{-i2x}}+\frac12e^{-ix}+1+\frac12e^{ix}+\frac12e^{i2x}\\{\color[rgb]{0.0, 0.0, 0.5}0}{\color[rgb]{0.0, 0.0, 0.5}.}{\color[rgb]{0.0, 0.0, 0.5}5}&\frac12e^{-i2x}+\boxed{{\color[rgb]{0.0, 0.0, 0.5}\frac12}e^{-ix}}+1+\frac12e^{ix}+\frac12e^{i2x}\end{bmatrix}\)

N=4

\(\omega_4^{-1}\begin{bmatrix}3\\0\\1\\0\end{bmatrix}=\begin{bmatrix}1\\0.5\\1\\0.5\end{bmatrix}\Rightarrow\begin{bmatrix}{\color[rgb]{0.0, 0.0, 1.0}1}&\frac12e^{-i2x}+\frac12e^{-ix}+\boxed{\color[rgb]{0.0, 0.0, 1.0}1}+\frac12e^{ix}+\frac12e^{i2x}\\{\color[rgb]{0.9, 0.76, 0.02}0}{\color[rgb]{0.9, 0.76, 0.02}.}{\color[rgb]{0.9, 0.76, 0.02}5}&\frac12e^{-i2x}+\frac12e^{-ix}+1+\boxed{{\color[rgb]{0.9, 0.76, 0.02}\frac12}e^{ix}}+\frac12e^{i2x}\\{\color[rgb]{1.0, 0.0, 1.0}1}&\boxed{{\color[rgb]{1.0, 0.0, 1.0}\frac12}e^{-i2x}}+\frac12e^{-ix}+1+\frac12e^{ix}+\boxed{{\color[rgb]{1.0, 0.0, 1.0}\frac12}e^{i2x}}\\{\color[rgb]{0.0, 0.5, 0.5}0}{\color[rgb]{0.0, 0.5, 0.5}.}{\color[rgb]{0.0, 0.5, 0.5}5}&\frac12e^{-i2x}+\boxed{{\color[rgb]{0.0, 0.5, 0.5}\frac12}e^{-ix}}+1+\frac12e^{ix}+\frac12e^{i2x}\end{bmatrix}\)

N=5

\(\omega_5^{-1}\begin{bmatrix}3\\0.5\\0.5\\0.5\\0.5\end{bmatrix}=\begin{bmatrix}1\\0.5\\0.5\\0.5\\0.5\end{bmatrix}=\begin{bmatrix}1&\frac12e^{-i2x}+\frac12e^{-ix}+\boxed1+\frac12e^{ix}+\frac12e^{i2x}\\0.5&\frac12e^{-i2x}+\frac12e^{-ix}+1+\boxed{\frac12e^{ix}}+\frac12e^{i2x}\\0.5&\frac12e^{-i2x}+\frac12e^{-ix}+1+\frac12e^{ix}+\boxed{\frac12e^{i2x}}\\0.5&\boxed{\frac12e^{-i2x}}+\frac12e^{-ix}+1+\frac12e^{ix}+\frac12e^{i2x}\\0.5&\frac12e^{-i2x}+\boxed{\frac12e^{-ix}}+1+\frac12e^{ix}+\frac12e^{i2x}\end{bmatrix}\)


\(\omega=e^\frac{2\pi i}N\Rightarrow\omega^k=e^{k\cdot\frac{2\pi i}N}\)


Characteristics of DFT

IDFT

\(\begin{bmatrix}f_0\\f_1\\f_2\\f_3\\\vdots\\f_k\\\vdots\\f_{N-1}\end{bmatrix}=\begin{bmatrix}1&1&1&1&\dots&1\\1&\omega&\omega^2&\omega^3&\dots&\omega^{N-1}\\1&\omega^2&\omega^4&\omega^6&\dots&\omega^{2(N-1)}\\1&\omega^3&\omega^6&\omega^9&\dots&\omega^{3(N-1)}\\\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\1&\omega^k&(\omega^k)^2&(\omega^k)^3&\dots&\omega^{k(N-1)}\\\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\1&\omega^{N-1}&\omega^{2(N-1)}&\omega^{3(N-1)}&\dots&\omega^{(N-1)(N-1)}\end{bmatrix}\begin{bmatrix}c_0\\c_1\\c_2\\c_3\\\vdots\\c_k\\\vdots\\c_{N-1}\end{bmatrix}\)

\(\omega=e^\frac{2\pi i}N\)

\(F_NF_N^\ast=N\begin{bmatrix}1&0&0\\0&\ddots&0\\0&0&1\end{bmatrix}\Rightarrow F_N^{-1}=\frac1NF_N^\ast\)

DFT

\(\frac1N\begin{bmatrix}1&1&1&1&\dots&1\\1&\overline\omega&\overline\omega^2&\overline\omega^3&\dots&\overline\omega^{N-1}\\1&\overline\omega^2&\overline\omega^4&\overline\omega^6&\dots&\overline\omega^{2(N-1)}\\1&\overline\omega^3&\overline\omega^6&\overline\omega^9&\dots&\overline\omega^{3(N-1)}\\\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\1&\overline\omega^k&(\overline\omega^k)^2&(\overline\omega^k)^3&\dots&\overline\omega^{k(N-1)}\\\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\1&\overline\omega^{N-1}&\overline\omega^{2(N-1)}&\overline\omega^{3(N-1)}&\dots&\overline\omega^{(N-1)(N-1)}\end{bmatrix}\begin{bmatrix}f_0\\f_1\\f_2\\f_3\\\vdots\\f_k\\\vdots\\f_{N-1}\end{bmatrix}=\begin{bmatrix}c_0\\c_1\\c_2\\c_3\\\vdots\\c_k\\\vdots\\c_{N-1}\end{bmatrix}\)

\(\overline\omega=e^{-\frac{2\pi i}N}\)

a useful property:
\(\begin{array}{rcl}\omega^0+\omega^1+\dots+\omega^{N-1}&{}={}&\frac{1-\omega^N}{1-\omega}\\&{}={}&\frac{1-1}{1-\omega}\\&{}={}&0\end{array}\)

Now consider the inner product between any two rows other than the first, say row \(p\) and row \(q\)

\(\left\langle row_p\vert row_q\right\rangle=1+(\omega^p)^\ast(\omega^q)+(\omega^{2p})^\ast(\omega^{2q})+\dots+(\omega^{p(N-1)})^\ast(\omega^{q(N-1)})\), Remember left-side conjugation
\(=1+\omega^{-p}\omega^q+\omega^{-2p}\omega^{2q}+\dots+\omega^{-p(N-1)}\omega^{q(N-1)}\), \({(\omega^k)}^\ast=\omega^{-k}\)
\(=1+\omega^{q-p}+(\omega^{q-p})^2+\dots+(\omega^{q-p})^{(N-1)}\), Exponent algebra
\(=\frac{1-(\omega^{q-p})^N}{1-\omega^{q-p}}\), Geometric series
\(=\frac{1-(\omega^N)^{q-p}}{1-\omega^{q-p}}\), Exponent algebra
\(=\frac{1-(1)^{q-p}}{1-\omega^{q-p}}\), \(\omega\) is an \(N_{th}\) root
\(=0\)



The DFT

\(\widetilde v=Dv\)

\(\begin{bmatrix}{\widetilde a}_0\\{\widetilde a}_1\\{\widetilde a}_2\\\vdots\\{\widetilde a}_{N-1}\end{bmatrix}{}={}\begin{bmatrix}1&1&1&\dots&1\\(\omega)^0&\omega&\omega^2&\dots&\omega^{N-1}\\(\omega^2)^0&\omega^2&\omega^4&\dots&\omega^{2(N-1)}\\(\omega^3)^0&\omega^3&\omega^6&\dots&\omega^{3(N-1)}\\\vdots&\vdots&\vdots&\vdots&\vdots\\(\omega^k)^0&\omega^k&(\omega^k)^2&\dots&\omega^{k(N-1)}\\\vdots&\vdots&\vdots&\vdots&\vdots\\(\omega^{N-1})^0&\omega^{N-1}&\omega^{2(N-1)}&\dots&\omega^{(N-1)(N-1)}\end{bmatrix}{}\begin{bmatrix}a_0\\a_1\\a_2\\\vdots\\a_{N-1}\end{bmatrix}\)

\(v=D^{-1}\widetilde v=\frac1ND^\dagger\widetilde v\)

\(\overline v=D^\dagger v\)

\(D^\dagger=the\;Discreate\;Fourier\;Transform\)

\((D^\dagger)^{-1}=\frac1ND=Inverse\;DFT\)


The unitary DFT

Because \(D^\dagger D = NI \neq I\), , the matrix \(D\) is not unitary.

This is rather simple to fix. Define
\(U_{DFT}=\frac1{\sqrt N}D\)
\(U_{DFT}^\dagger=\frac1{\sqrt N}D^\dagger\)
\(U_{DFT}^\dagger U_{DFT}=\frac1{\sqrt N}D^\dagger\frac1{\sqrt N}D=I\)


[Ex] \(\begin{bmatrix}4\\0\\0\\0\end{bmatrix},\;\omega=e^\frac{2\pi i}4=i,\;f(x)=\left\{\begin{array}{l}f(0\cdot\frac{2\pi}4)=4\\f(1\cdot\frac{2\pi}4)=0\\f(2\cdot\frac{2\pi}4)=0\\f(3\cdot\frac{2\pi}4)=0\end{array}\right.\)

\(f(x)=\sum_{k=-\infty}^\infty c_ke^{ikx}\)

\(f(0\cdot\frac{2\pi}4)\Rightarrow\left\{\begin{array}{l}=(\cdots+c_{-4}+c_0+c_4+\cdots)\omega^0\\+(\cdots+c_{-3}+c_1+c_5+\cdots)\omega^0\\+(\cdots+c_{-2}+c_2+c_6+\cdots)\omega^0\\+(\cdots+c_{-1}+c_3+c_7+\cdots)\omega^0\end{array}\right.\)

\(f(1\cdot\frac{2\pi}4)\Rightarrow\left\{\begin{array}{l}=(\cdots+c_{-4}+c_0+c_4+\cdots)\omega^0\\+(\cdots+c_{-3}+c_1+c_5+\cdots)\omega^1\\+(\cdots+c_{-2}+c_2+c_6+\cdots)\omega^2\\+(\cdots+c_{-1}+c_3+c_7+\cdots)\omega^3\end{array}\right.\)

\(f(2\cdot\frac{2\pi}4)\Rightarrow\left\{\begin{array}{l}=(\cdots+c_{-4}+c_0+c_4+\cdots)\omega^0\\+(\cdots+c_{-3}+c_1+c_5+\cdots)\omega^2\\+(\cdots+c_{-2}+c_2+c_6+\cdots)\omega^4\\+(\cdots+c_{-1}+c_3+c_7+\cdots)\omega^6\end{array}\right.\)

\(f(3\cdot\frac{2\pi}4)\Rightarrow\left\{\begin{array}{l}=(\cdots+c_{-4}+c_0+c_4+\cdots)\omega^0\\+(\cdots+c_{-3}+c_1+c_5+\cdots)\omega^3\\+(\cdots+c_{-2}+c_2+c_6+\cdots)\omega^6\\+(\cdots+c_{-1}+c_3+c_7+\cdots)\omega^9\end{array}\right.\)


\(\begin{bmatrix}f(0\cdot\frac{2\pi}4)\\f(1\cdot\frac{2\pi}4)\\f(2\cdot\frac{2\pi}4)\\f(3\cdot\frac{2\pi}4)\end{bmatrix}=\begin{bmatrix}1&1&1&1\\1&\omega&\omega^2&\omega^3\\1&\omega^2&\omega^4&\omega^6\\1&\omega^3&\omega^6&\omega^9\end{bmatrix}\begin{bmatrix}(\cdots+c_{-4}+c_0+c_4+\cdots)\\(\cdots+c_{-3}+c_1+c_5+\cdots)\\(\cdots+c_{-2}+c_2+c_6+\cdots)\\(\cdots+c_{-1}+c_3+c_7+\cdots)\end{bmatrix}\)

\(f(x)=1+e^{ix}+e^{i2x}+e^{i3x}\)

\(f(x)=1+e^{ix}+e^{i2x}+e^{-ix}\)

\(f(x)=\frac12e^{-ix}+1+e^{ix}+e^{i2x}+\frac12e^{i3x}\)

\(f(x)=1+\frac13e^{ix}+\frac13e^{i5x}+\frac13e^{i9x}+e^{i2x}+e^{i3x}\\f(x)=\frac12e^{-ix}+1+e^{ix}+e^{i2x}+\frac12e^{i3x}\)

\(f(x)=e^{ix}+e^{i2x}+e^{i3x}+e^{i4x}\)


Fourier Series

Expand \(f(x)\) by using the orthogonal set of trigonometric functions
\[f(x)=\frac{a_0}2+\sum_{n=1}^\infty(a_n\cos\frac{n\pi}px+b_n\sin\frac{n\pi}px)\]

Coefficients of each orthogonal function can be determined by inner product from \(-p\) to \(p\).

(i) coef. of \(1\): \(\int_{-p}^pf(x)\cdot1\operatorname dx=\int_{-p}^p\lbrack\frac{a_0}2+\sum_{n=1}^\infty(a_n\underbrace{\cos\frac{n\pi}px}_\cancel{\sin\frac{n\pi}px}+b_n\underbrace{\sin\frac{n\pi}px}_\cancel{-\cos\frac{n\pi}px})\rbrack dx=\frac{a_0}2\int_{-p}^pdx=a_0\cdot p\)

\(\therefore a_0=\frac1p\int_{-p}^pf(x)\operatorname dx\)

\(\Rightarrow c_n={\left.\frac{\left\langle f(x),\phi_n(x)\right\rangle}{\left\langle\phi_n(x),\phi_n(x)\right\rangle}\right|}_{\phi_n=1}=\frac{\int_{-p}^pf(x)\operatorname dx}{\int_{-p}^p1^2\operatorname dx}=\frac{a_0\cdot p}{2p}=\frac{a_0}2\)

(ii) coef. of \(\cos\frac{m\pi}px\): \(\int_{-p}^pf(x)\cdot\cos\frac{m\pi}px\operatorname dx=\int_{-p}^p\lbrack\underbrace{\frac{a_0}2\cdot\cos\frac{m\pi}px}_{=0}+\sum_{n=1}^\infty(a_n\underbrace{\cos\frac{m\pi}px\cdot\cos\frac{n\pi}px}_{\frac12\lbrack\cos\frac{(m+n)\pi}px+\cos\frac{(m-n)\pi}px\rbrack}+b_n\underbrace{\cos\frac{m\pi}px\cdot\sin\frac{n\pi}px}_{\frac12\lbrack\sin\frac{(m+n)\pi}px+\sin\frac{(m-n)\pi}px\rbrack=0})\rbrack dx\)

\(\int_{-p}^p\frac12\lbrack\cos\frac{(m+n)\pi}px+\cos\frac{(m-n)\pi}px\rbrack dx=\left\{\begin{array}{lc}0&m\neq n\\p&m=n\end{array}\right.\)

\(m=n,\;\int_{-p}^p{(\cos\frac{m\pi}px)}^2dx=\int_{-p}^p\frac{1+\cancel{\cos\frac{2m\pi}px}}2dx=p\)

(iiI) coef. of \(\sin\frac{m\pi}px\): \(\int_{-p}^pf(x)\cdot\sin\frac{m\pi}px\operatorname dx=\int_{-p}^p\lbrack\underbrace{\frac{a_0}2\cdot\sin\frac{m\pi}px}_{=0}+\sum_{n=1}^\infty(a_n\underbrace{\cos\frac{m\pi}px\cdot\sin\frac{n\pi}px}_{\frac12\lbrack\sin\frac{(m+n)\pi}px+\sin\frac{(m-n)\pi}px\rbrack=0}+b_n\underbrace{\sin\frac{m\pi}px\cdot\sin\frac{n\pi}px}_{\frac12\lbrack\cos\frac{(m-n)\pi}px-\sin\frac{(m+n)\pi}px\rbrack})\rbrack dx\)

\(\int_{-p}^p\frac12\lbrack\cos\frac{(m-n)\pi}px-\sin\frac{(m+n)\pi}px\rbrack dx=\left\{\begin{array}{l}0,\;m\neq n\\p,\;m=n\end{array}\right.\)

\(m=n,\;\int_{-p}^p{(\sin\frac{m\pi}px)}^2dx=\int_{-p}^p\frac{1-\cancel{\cos\frac{2m\pi}px}}2dx=p\)

\(\Rightarrow\left\{\begin{array}{l}a_n=\frac1p\int_{-p}^pf(x)\cdot\cos\frac{n\pi}px\operatorname dx\\b_n=\frac1p\int_{-p}^pf(x)\cdot\sin\frac{n\pi}px\operatorname dx\end{array}\right.\)


The Fourier series of a function \(f\) defined on the internal \([-p,p]\) is given by
\(f(x)=\frac{a_0}2+\sum_{n=1}^\infty(a_n\cos\frac{n\pi}px+b_n\sin\frac{n\pi}px)\)
where \(\left\{\begin{array}{l}a_0=\frac1p\int_{-p}^pf(x)\operatorname dx\\a_n=\frac1p\int_{-p}^pf(x)\cdot\cos\frac{n\pi}px\operatorname dx\\b_n=\frac1p\int_{-p}^pf(x)\cdot\sin\frac{n\pi}px\operatorname dx\end{array}\right.\)

\(f\): odd function \(\Rightarrow f(-x)=-f(x)\)

\(f\): even function \(\Rightarrow f(-x)=f(x)\)


Fourier cosine and sine series

For an even function \(f\) defined on the interval \([-p,p]\), the Fourier series is the Fourier cosine series:

\(f(x)=\frac{a_0}2+\sum_{n=1}^\infty a_n\cos\frac{n\pi}px\)

where \(\left\{\begin{array}{l}a_0=\frac1p\int_{-p}^pf(x)\operatorname dx\\a_n=\frac2p\int_0^pf(x)\cdot\cos\frac{n\pi}px\operatorname dx\end{array}\right.\)

For an odd function \(f\) defined on the interval \([-p,p]\), the Fourier series is the Fourier sine series:

\(f(x)=\sum_{n=1}^\infty b_n\sin\frac{n\pi}px\)

where \(b_n=\frac2p\int_0^pf(x)\cdot\sin\frac{n\pi}px\operatorname dx\)


Fast Fourier Transform (FFT)

\(\begin{bmatrix}1&1&1&1&\dots&1\\1&\overline\omega&\overline\omega^2&\overline\omega^3&\dots&\overline\omega^{N-1}\\1&\overline\omega^2&\overline\omega^4&\overline\omega^6&\dots&\overline\omega^{2(N-1)}\\1&\overline\omega^3&\overline\omega^6&\overline\omega^9&\dots&\overline\omega^{3(N-1)}\\\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\1&\overline\omega^k&(\overline\omega^k)^2&(\overline\omega^k)^3&\dots&\overline\omega^{k(N-1)}\\\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\1&\overline\omega^{N-1}&\overline\omega^{2(N-1)}&\overline\omega^{3(N-1)}&\dots&\overline\omega^{(N-1)(N-1)}\end{bmatrix}\begin{bmatrix}f_0\\f_1\\f_2\\f_3\\\vdots\\f_k\\\vdots\\f_{N-1}\end{bmatrix}\)

\(\begin{bmatrix}{\overline x}_1&{\color[rgb]{0.0, 0.0, 1.0}\overline x}_{\color[rgb]{0.0, 0.0, 1.0}2}&{\overline x}_3&{\color[rgb]{0.9, 0.76, 0.02}\overline x}_{\color[rgb]{0.9, 0.76, 0.02}4}\end{bmatrix}\begin{bmatrix}a_1\\{\color[rgb]{0.0, 0.0, 1.0}a}_{\color[rgb]{0.0, 0.0, 1.0}2}\\a_3\\{\color[rgb]{0.9, 0.76, 0.02}a}_{\color[rgb]{0.9, 0.76, 0.02}4}\end{bmatrix}=a_1{\overline x}_1+{\color[rgb]{0.0, 0.0, 1.0}a}_{\color[rgb]{0.0, 0.0, 1.0}2}{\color[rgb]{0.0, 0.0, 1.0}\overline x}_{\color[rgb]{0.0, 0.0, 1.0}2}+a_3{\overline x}_3+{\color[rgb]{0.9, 0.76, 0.02}a}_{\color[rgb]{0.9, 0.76, 0.02}4}{\color[rgb]{0.9, 0.76, 0.02}\overline x}_{\color[rgb]{0.9, 0.76, 0.02}4}\)

\(\begin{bmatrix}{\overline x}_1&{\color[rgb]{0.9, 0.76, 0.02}\overline x}_{\color[rgb]{0.9, 0.76, 0.02}4}&{\overline x}_3&{\color[rgb]{0.0, 0.0, 1.0}\overline x}_{\color[rgb]{0.0, 0.0, 1.0}2}\end{bmatrix}\begin{bmatrix}a_1\\{\color[rgb]{0.9, 0.76, 0.02}a}_{\color[rgb]{0.9, 0.76, 0.02}4}\\a_3\\{\color[rgb]{0.0, 0.0, 1.0}a}_{\color[rgb]{0.0, 0.0, 1.0}2}\end{bmatrix}=a_1{\overline x}_1+{\color[rgb]{0.9, 0.76, 0.02}a}_{\color[rgb]{0.9, 0.76, 0.02}4}{\color[rgb]{0.9, 0.76, 0.02}\overline x}_{\color[rgb]{0.9, 0.76, 0.02}4}+a_3{\overline x}_3+{\color[rgb]{0.0, 0.0, 1.0}a}_{\color[rgb]{0.0, 0.0, 1.0}2}{\color[rgb]{0.0, 0.0, 1.0}\overline x}_{\color[rgb]{0.0, 0.0, 1.0}2}\)

To swap items of row and column accordingly of matrix multiplication is able to keep the ordinary result.

\(F_4=\begin{bmatrix}1&1&1&1\\1&\overline\omega^1&\overline\omega^2&\overline\omega^3\\1&\overline\omega^2&\overline\omega^4&\overline\omega^6\\1&\overline\omega^3&\overline\omega^6&\overline\omega^9\end{bmatrix}\begin{bmatrix}f_0\\f_1\\f_2\\f_3\end{bmatrix}\)

\(\Rightarrow{\widetilde F}_4=\begin{bmatrix}1&1&1&1\\1&\overline\omega^2&\overline\omega^1&\overline\omega^3\\1&\overline\omega^4&\overline\omega^2&\overline\omega^6\\1&\overline\omega^6&\overline\omega^3&\overline\omega^9\end{bmatrix}\begin{bmatrix}f_0\\f_2\\f_1\\f_3\end{bmatrix}\)


\(\begin{bmatrix}1&1&1&1\\1&\overline\omega^1&\overline\omega^2&\overline\omega^3\\1&\overline\omega^2&\overline\omega^4&\overline\omega^6\\1&\overline\omega^3&\overline\omega^6&\overline\omega^9\end{bmatrix}\Rightarrow\begin{bmatrix}1&1&1&1\\1&\overline\omega^2&\overline\omega^1&\overline\omega^3\\1&\overline\omega^4&\overline\omega^2&\overline\omega^6\\1&\overline\omega^6&\overline\omega^3&\overline\omega^9\end{bmatrix}\)

\(\begin{bmatrix}{\color[rgb]{0.0, 0.0, 1.0}1}&{\color[rgb]{0.0, 0.0, 1.0}1}&{\color[rgb]{0.51, 0.5, 0.0}1}&{\color[rgb]{0.51, 0.5, 0.0}1}\\{\color[rgb]{0.0, 0.0, 1.0}1}&\color[rgb]{0.0, 0.0, 1.0}\overline\omega^2&\color[rgb]{0.51, 0.5, 0.0}\overline\omega^1&\color[rgb]{0.51, 0.5, 0.0}\overline\omega^3\\{\color[rgb]{0.9, 0.76, 0.02}1}&\color[rgb]{0.9, 0.76, 0.02}\overline\omega^4&\color[rgb]{0.7, 0.7, 0.7}\overline\omega^2&\color[rgb]{0.7, 0.7, 0.7}\overline\omega^6\\{\color[rgb]{0.9, 0.76, 0.02}1}&\color[rgb]{0.9, 0.76, 0.02}\overline\omega^6&\color[rgb]{0.7, 0.7, 0.7}\overline\omega^3&\color[rgb]{0.7, 0.7, 0.7}\overline\omega^9\end{bmatrix}\Rightarrow F_2=\begin{bmatrix}{\color[rgb]{0.0, 0.0, 1.0}1}&{\color[rgb]{0.0, 0.0, 1.0}1}\\{\color[rgb]{0.0, 0.0, 1.0}1}&\color[rgb]{0.0, 0.0, 1.0}\overline\omega^2\end{bmatrix},\;F_2=\begin{bmatrix}{\color[rgb]{0.9, 0.76, 0.02}1}&\color[rgb]{0.9, 0.76, 0.02}\overline\omega^4\\{\color[rgb]{0.9, 0.76, 0.02}1}&\color[rgb]{0.9, 0.76, 0.02}\overline\omega^6\end{bmatrix}=\begin{bmatrix}{\color[rgb]{0.0, 0.0, 1.0}1}&{\color[rgb]{0.0, 0.0, 1.0}1}\\{\color[rgb]{0.0, 0.0, 1.0}1}&\color[rgb]{0.0, 0.0, 1.0}\overline\omega^2\end{bmatrix}\)

\(\Rightarrow\begin{bmatrix}{\color[rgb]{0.51, 0.5, 0.0}1}&{\color[rgb]{0.51, 0.5, 0.0}1}\\\color[rgb]{0.51, 0.5, 0.0}\overline\omega^1&\color[rgb]{0.51, 0.5, 0.0}\overline\omega^3\end{bmatrix}=\begin{bmatrix}1&0\\0&\overline\omega\end{bmatrix}F_2,\;\begin{bmatrix}\color[rgb]{0.7, 0.7, 0.7}\overline\omega^2&\color[rgb]{0.7, 0.7, 0.7}\overline\omega^6\\\color[rgb]{0.7, 0.7, 0.7}\overline\omega^3&\color[rgb]{0.7, 0.7, 0.7}\overline\omega^9\end{bmatrix}=\begin{bmatrix}-1&0\\0&-\overline\omega\end{bmatrix}F_2\)

Let \(\begin{bmatrix}1&0\\0&\overline\omega\end{bmatrix}=D_2,\;\begin{bmatrix}-1&0\\0&-\overline\omega\end{bmatrix}=-D_2\)

\({\widetilde F}_4=\begin{bmatrix}F_2&D_2F_2\\F_2&-D_2F_2\end{bmatrix}\)

\(\Rightarrow{\widetilde F}_{2N}=\begin{bmatrix}F_N&D_NF_N\\F_N&-D_NF_N\end{bmatrix}\)

\(D_N=\begin{bmatrix}1&0&\cdots&0\\0&\overline\omega&\ddots&\vdots\\\vdots&\ddots&\ddots&0\\0&\cdots&0&\overline\omega^{N-1}\end{bmatrix}\)

\(\underline X=\begin{bmatrix}f_0\\f_1\\\vdots\\f_{N-1}\end{bmatrix}\)

\(F_N\underline X={\widetilde F}_N\begin{bmatrix}f_0\\f_2\\\vdots\\f_{N-2}\\f_1\\f_3\\\vdots\\f_{N-1}\end{bmatrix}=\begin{bmatrix}F_\frac N2&D_\frac N2F_\frac N2\\F_\frac N2&-D_\frac N2F_\frac N2\end{bmatrix}\begin{bmatrix}f_0\\f_2\\\vdots\\f_{N-2}\\f_1\\f_3\\\vdots\\f_{N-1}\end{bmatrix}\)

\(=\begin{bmatrix}I&D_\frac N2\\I&-D_\frac N2\end{bmatrix}\begin{bmatrix}F_\frac N2&0\\0&F_\frac N2\end{bmatrix}\begin{bmatrix}f_0\\f_2\\\vdots\\f_{N-2}\\f_1\\f_3\\\vdots\\f_{N-1}\end{bmatrix}\)

\(=\begin{bmatrix}I&D_\frac N2\\I&-D_\frac N2\end{bmatrix}\begin{bmatrix}F_\frac N2&0\\0&F_\frac N2\end{bmatrix}\begin{bmatrix}{\underline X}_{even}\\{\underline X}_{odd}\end{bmatrix}\)

\(\Rightarrow F_N\underline X=\begin{bmatrix}I&D_\frac N2\\I&-D_\frac N2\end{bmatrix}\begin{bmatrix}F_\frac N2{\underline X}_{even}\\F_\frac N2{\underline X}_{odd}\end{bmatrix}\)


\(\begin{bmatrix}X(0)\\X(1)\\X(2)\\X(3)\end{bmatrix}=\begin{bmatrix}\omega^0&\omega^0&\omega^0&\omega^0\\\omega^0&\omega^1&\omega^2&\omega^3\\\omega^0&\omega^2&\omega^4&\omega^6\\\omega^0&\omega^3&\omega^6&\omega^9\end{bmatrix}\begin{bmatrix}x(0)\\x(1)\\x(2)\\x(3)\end{bmatrix}\)

\(\begin{bmatrix}\omega^0&\omega^0&\omega^0&\omega^0\\\omega^0&\omega^1&\omega^2&\omega^3\\\omega^0&\omega^2&\omega^4&\omega^6\\\omega^0&\omega^3&\omega^6&\omega^9\end{bmatrix}=\begin{bmatrix}1&1&1&1\\1&\omega^1&\omega^2&\omega^3\\1&\omega^2&1&\omega^2\\1&\omega^3&\omega^2&\omega^1\end{bmatrix}\)

\(\begin{bmatrix}1&1&1&1\\1&\omega^1&\omega^2&\omega^3\\1&\omega^2&1&\omega^2\\1&\omega^3&\omega^2&\omega^1\end{bmatrix}=\begin{bmatrix}1&1&1&1\\1&\omega^2&\omega^1&\omega^3\\1&1&\omega^2&\omega^2\\1&\omega^2&\omega^3&\omega^1\end{bmatrix}\begin{bmatrix}1&0&0&0\\0&0&1&0\\0&1&0&0\\0&0&0&1\end{bmatrix}\;column\;2\;\&\;column\;3\;exchange\)

\(=\begin{bmatrix}{\color[rgb]{0.0, 0.0, 1.0}1}&{\color[rgb]{0.0, 0.0, 1.0}1}&{\color[rgb]{0.51, 0.5, 0.0}1}&{\color[rgb]{0.51, 0.5, 0.0}1}\\{\color[rgb]{0.0, 0.0, 1.0}1}&\color[rgb]{0.0, 0.0, 1.0}\omega^2&\color[rgb]{0.51, 0.5, 0.0}\omega^1&\color[rgb]{0.51, 0.5, 0.0}\omega^3\\{\color[rgb]{0.9, 0.76, 0.02}1}&{\color[rgb]{0.9, 0.76, 0.02}1}&\color[rgb]{1.0, 0.0, 0.0}\omega^2&\color[rgb]{1.0, 0.0, 0.0}\omega^2\\{\color[rgb]{0.9, 0.76, 0.02}1}&\color[rgb]{0.9, 0.76, 0.02}\omega^2&\color[rgb]{1.0, 0.0, 0.0}\omega^3&\color[rgb]{1.0, 0.0, 0.0}\omega^1\end{bmatrix}P_4\)

\(\begin{bmatrix}1&1\\1&\omega^2\end{bmatrix}=\begin{bmatrix}e^{-j\frac\pi2\cdot0\times0}&e^{-j\frac\pi2\cdot0\times1}\\e^{-j\frac\pi2\cdot1\times0}&e^{-j\frac\pi2\cdot1\times1}\end{bmatrix}=\begin{bmatrix}1&1\\1&-1\end{bmatrix}\)

\(M_4=\begin{bmatrix}1&1&1&1\\1&\omega^2&\omega^1&\omega^3\\1&1&\omega^2&\omega^2\\1&\omega^2&\omega^3&\omega^1\end{bmatrix}P_4=\begin{bmatrix}M_2&\begin{bmatrix}1&0\\0&\omega\end{bmatrix}M_2\\M_2&-\begin{bmatrix}1&0\\0&\omega\end{bmatrix}M_2\end{bmatrix}P_4\)

\(=\begin{bmatrix}M_2&D_2M_2\\M_2&-D_2M_2\end{bmatrix}P_4=\begin{bmatrix}I_2&D_2\\I_2&-D_2\end{bmatrix}\begin{bmatrix}M_2&0\\0&M_2\end{bmatrix}P_4\)

\(\Rightarrow\begin{bmatrix}X(0)\\X(1)\\X(2)\\X(3)\end{bmatrix}=\begin{bmatrix}I_2&D_2\\I_2&-D_2\end{bmatrix}\begin{bmatrix}M_2&0\\0&M_2\end{bmatrix}P_4\begin{bmatrix}x(0)\\x(1)\\x(2)\\x(3)\end{bmatrix}\)



\(\begin{bmatrix}X(0)\\X(1)\\X(2)\\X(3)\\X(4)\\X(5)\\X(6)\\X(7)\end{bmatrix}=\begin{bmatrix}\omega^{0\times0}&\omega^{0\times1}&\omega^{0\times2}&\omega^{0\times3}&\omega^{0\times4}&\omega^{0\times5}&\omega^{0\times6}&\omega^{0\times7}\\\omega^{1\times0}&\omega^{1\times1}&\omega^{1\times2}&\omega^{1\times3}&\omega^{1\times4}&\omega^{1\times5}&\omega^{1\times6}&\omega^{1\times7}\\\omega^{2\times0}&\omega^{2\times1}&\omega^{2\times2}&\omega^{2\times3}&\omega^{2\times4}&\omega^{2\times5}&\omega^{2\times6}&\omega^{2\times7}\\\omega^{3\times0}&\omega^{3\times1}&\omega^{3\times2}&\omega^{3\times3}&\omega^{3\times4}&\omega^{3\times5}&\omega^{3\times6}&\omega^{3\times7}\\\omega^{4\times0}&\omega^{4\times1}&\omega^{4\times2}&\omega^{4\times3}&\omega^{4\times4}&\omega^{4\times5}&\omega^{4\times6}&\omega^{4\times7}\\\omega^{5\times0}&\omega^{5\times1}&\omega^{5\times2}&\omega^{5\times3}&\omega^{5\times4}&\omega^{5\times5}&\omega^{5\times6}&\omega^{5\times7}\\\omega^{6\times0}&\omega^{6\times1}&\omega^{6\times2}&\omega^{6\times3}&\omega^{6\times4}&\omega^{6\times5}&\omega^{6\times6}&\omega^{6\times7}\\\omega^{7\times0}&\omega^{7\times1}&\omega^{7\times2}&\omega^{7\times3}&\omega^{7\times4}&\omega^{7\times5}&\omega^{7\times6}&\omega^{7\times7}\end{bmatrix}\begin{bmatrix}x(0)\\x(1)\\x(2)\\x(3)\\x(4)\\x(5)\\x(6)\\x(7)\end{bmatrix}\)

\(=\begin{bmatrix}1&1&1&1&1&1&1&1\\1&\omega^1&\omega^2&\omega^3&\omega^4&\omega^5&\omega^6&\omega^7\\1&\omega^2&\omega^4&\omega^6&1&\omega^2&\omega^4&\omega^6\\1&\omega^3&\omega^6&\omega^1&\omega^4&\omega^7&\omega^2&\omega^5\\1&\omega^4&1&\omega^4&1&\omega^4&1&\omega^4\\1&\omega^5&\omega^2&\omega^7&\omega^4&\omega^1&\omega^6&\omega^3\\1&\omega^6&\omega^4&\omega^2&1&\omega^6&\omega^4&\omega^2\\1&\omega^7&\omega^6&\omega^5&\omega^4&\omega^3&\omega^2&\omega^1\end{bmatrix}\begin{bmatrix}x(0)\\x(1)\\x(2)\\x(3)\\x(4)\\x(5)\\x(6)\\x(7)\end{bmatrix}\), where \(\omega=e^{-j\frac{2\pi}8}\)

\(=\begin{bmatrix}1&1&1&1&1&1&1&1\\1&\omega^2&\omega^4&\omega^6&\omega^1&\omega^3&\omega^5&\omega^7\\1&\omega^4&1&\omega^4&\omega^2&\omega^6&\omega^2&\omega^6\\1&\omega^6&\omega^4&\omega^2&\omega^3&\omega^1&\omega^7&\omega^5\\1&1&1&1&\omega^4&\omega^4&\omega^4&\omega^4\\1&\omega^2&\omega^4&\omega^6&\omega^5&\omega^7&\omega^1&\omega^3\\1&\omega^4&1&\omega^4&\omega^6&\omega^2&\omega^6&\omega^2\\1&\omega^6&\omega^4&\omega^2&\omega^7&\omega^5&\omega^3&\omega^1\end{bmatrix}\begin{bmatrix}1&0&0&0&0&0&0&0\\0&0&1&0&0&0&0&0\\0&0&0&0&1&0&0&0\\0&0&0&0&0&0&1&0\\0&1&0&0&0&0&0&0\\0&0&0&1&0&0&0&0\\0&0&0&0&0&1&0&0\\0&0&0&0&0&0&0&1\end{bmatrix}\begin{bmatrix}x(0)\\x(1)\\x(2)\\x(3)\\x(4)\\x(5)\\x(6)\\x(7)\end{bmatrix}\)

\(=\begin{bmatrix}{\color[rgb]{0.0, 0.0, 1.0}1}&{\color[rgb]{0.0, 0.0, 1.0}1}&{\color[rgb]{0.0, 0.0, 1.0}1}&{\color[rgb]{0.0, 0.0, 1.0}1}&{\color[rgb]{1.0, 0.0, 0.0}1}&{\color[rgb]{1.0, 0.0, 0.0}1}&{\color[rgb]{1.0, 0.0, 0.0}1}&{\color[rgb]{1.0, 0.0, 0.0}1}\\{\color[rgb]{0.0, 0.0, 1.0}1}&\color[rgb]{0.0, 0.0, 1.0}\omega^2&\color[rgb]{0.0, 0.0, 1.0}\omega^4&\color[rgb]{0.0, 0.0, 1.0}\omega^6&\color[rgb]{1.0, 0.0, 0.0}\omega^1&\color[rgb]{1.0, 0.0, 0.0}\omega^3&\color[rgb]{1.0, 0.0, 0.0}\omega^5&\color[rgb]{1.0, 0.0, 0.0}\omega^7\\{\color[rgb]{0.0, 0.0, 1.0}1}&\color[rgb]{0.0, 0.0, 1.0}\omega^4&{\color[rgb]{0.0, 0.0, 1.0}1}&\color[rgb]{0.0, 0.0, 1.0}\omega^4&\color[rgb]{1.0, 0.0, 0.0}\omega^2&\color[rgb]{1.0, 0.0, 0.0}\omega^6&\color[rgb]{1.0, 0.0, 0.0}\omega^2&\color[rgb]{1.0, 0.0, 0.0}\omega^6\\{\color[rgb]{0.0, 0.0, 1.0}1}&\color[rgb]{0.0, 0.0, 1.0}\omega^6&\color[rgb]{0.0, 0.0, 1.0}\omega^4&\color[rgb]{0.0, 0.0, 1.0}\omega^2&\color[rgb]{1.0, 0.0, 0.0}\omega^3&\color[rgb]{1.0, 0.0, 0.0}\omega^1&\color[rgb]{1.0, 0.0, 0.0}\omega^7&\color[rgb]{1.0, 0.0, 0.0}\omega^5\\{\color[rgb]{0.68, 0.46, 0.12}1}&{\color[rgb]{0.68, 0.46, 0.12}1}&{\color[rgb]{0.68, 0.46, 0.12}1}&{\color[rgb]{0.68, 0.46, 0.12}1}&\color[rgb]{0.0, 0.0, 0.5}\omega^4&\color[rgb]{0.0, 0.0, 0.5}\omega^4&\color[rgb]{0.0, 0.0, 0.5}\omega^4&\color[rgb]{0.0, 0.0, 0.5}\omega^4\\{\color[rgb]{0.68, 0.46, 0.12}1}&\color[rgb]{0.68, 0.46, 0.12}\omega^2&\color[rgb]{0.68, 0.46, 0.12}\omega^4&\color[rgb]{0.68, 0.46, 0.12}\omega^6&\color[rgb]{0.0, 0.0, 0.5}\omega^5&\color[rgb]{0.0, 0.0, 0.5}\omega^7&\color[rgb]{0.0, 0.0, 0.5}\omega^1&\color[rgb]{0.0, 0.0, 0.5}\omega^3\\{\color[rgb]{0.68, 0.46, 0.12}1}&\color[rgb]{0.68, 0.46, 0.12}\omega^4&{\color[rgb]{0.68, 0.46, 0.12}1}&\color[rgb]{0.68, 0.46, 0.12}\omega^4&\color[rgb]{0.0, 0.0, 0.5}\omega^6&\color[rgb]{0.0, 0.0, 0.5}\omega^2&\color[rgb]{0.0, 0.0, 0.5}\omega^6&\color[rgb]{0.0, 0.0, 0.5}\omega^2\\{\color[rgb]{0.68, 0.46, 0.12}1}&\color[rgb]{0.68, 0.46, 0.12}\omega^6&\color[rgb]{0.68, 0.46, 0.12}\omega^4&\color[rgb]{0.68, 0.46, 0.12}\omega^2&\color[rgb]{0.0, 0.0, 0.5}\omega^7&\color[rgb]{0.0, 0.0, 0.5}\omega^5&\color[rgb]{0.0, 0.0, 0.5}\omega^3&\color[rgb]{0.0, 0.0, 0.5}\omega^1\end{bmatrix}P_8\begin{bmatrix}x(0)\\x(1)\\x(2)\\x(3)\\x(4)\\x(5)\\x(6)\\x(7)\end{bmatrix}\)

\(M_8=\begin{bmatrix}1&1&1&1&1&1&1&1\\1&\omega^2&\omega^4&\omega^6&\omega^1&\omega^3&\omega^5&\omega^7\\1&\omega^4&1&\omega^4&\omega^2&\omega^6&\omega^2&\omega^6\\1&\omega^6&\omega^4&\omega^2&\omega^3&\omega^1&\omega^7&\omega^5\\1&1&1&1&\omega^4&\omega^4&\omega^4&\omega^4\\1&\omega^2&\omega^4&\omega^6&\omega^5&\omega^7&\omega^1&\omega^3\\1&\omega^4&1&\omega^4&\omega^6&\omega^2&\omega^6&\omega^2\\1&\omega^6&\omega^4&\omega^2&\omega^7&\omega^5&\omega^3&\omega^1\end{bmatrix}P_8\)

\(=\begin{bmatrix}M_4&\begin{bmatrix}1&0&0&0\\0&\omega^1&0&0\\0&0&\omega^2&0\\0&0&0&\omega^3\end{bmatrix}M_4\\M_4&-\begin{bmatrix}1&0&0&0\\0&\omega^1&0&0\\0&0&\omega^2&0\\0&0&0&\omega^3\end{bmatrix}M_4\end{bmatrix}P_8=\begin{bmatrix}M_4&D_4M_4\\M_4&-D_4M_4\end{bmatrix}P_8\)

\(M_8=\begin{bmatrix}M_4&D_4M_4\\M_4&-D_4M_4\end{bmatrix}P_8=\begin{bmatrix}\begin{bmatrix}M_2&D_2M_2\\M_2&-D_2M_2\end{bmatrix}P_4&D_4\begin{bmatrix}M_2&D_2M_2\\M_2&-D_2M_2\end{bmatrix}P_4\\\begin{bmatrix}M_2&D_2M_2\\M_2&-D_2M_2\end{bmatrix}P_4&-D_4\begin{bmatrix}M_2&D_2M_2\\M_2&-D_2M_2\end{bmatrix}P_4\end{bmatrix}P_8\)

\(=\begin{bmatrix}\begin{bmatrix}M_2&D_2M_2\\M_2&-D_2M_2\end{bmatrix}&D_4\begin{bmatrix}M_2&D_2M_2\\M_2&-D_2M_2\end{bmatrix}\\\begin{bmatrix}M_2&D_2M_2\\M_2&-D_2M_2\end{bmatrix}&-D_4\begin{bmatrix}M_2&D_2M_2\\M_2&-D_2M_2\end{bmatrix}\end{bmatrix}\begin{bmatrix}P_4&0\\0&P_4\end{bmatrix}P_8\)

\(=\begin{bmatrix}I_4&D_4\\I_4&-D_4\end{bmatrix}\begin{bmatrix}I_2&D_2&0_{2,2}&0_{2,2}\\I_2&-D_2&0_{2,2}&0_{2,2}\\0_{2,2}&0_{2,2}&I_2&D_2\\0_{2,2}&0_{2,2}&I_2&-D_2\end{bmatrix}\begin{bmatrix}M_2&0_{2,2}&0_{2,2}&0_{2,2}\\0_{2,2}&M_2&0_{2,2}&0_{2,2}\\0_{2,2}&0_{2,2}&M_2&0_{2,2}\\0_{2,2}&0_{2,2}&0_{2,2}&M_2\end{bmatrix}\begin{bmatrix}P_4&0_{4,4}\\0_{4,4}&P_4\end{bmatrix}P_8\)


\(P_8\begin{bmatrix}x\lbrack0\rbrack\\x\lbrack1\rbrack\\x\lbrack2\rbrack\\x\lbrack3\rbrack\\x\lbrack4\rbrack\\x\lbrack5\rbrack\\x\lbrack6\rbrack\\x\lbrack7\rbrack\end{bmatrix}=\begin{bmatrix}1&0&0&0&0&0&0&0\\0&0&1&0&0&0&0&0\\0&0&0&0&1&0&0&0\\0&0&0&0&0&0&1&0\\0&1&0&0&0&0&0&0\\0&0&0&1&0&0&0&0\\0&0&0&0&0&1&0&0\\0&0&0&0&0&0&0&1\end{bmatrix}\begin{bmatrix}x\lbrack0\rbrack\\x\lbrack1\rbrack\\x\lbrack2\rbrack\\x\lbrack3\rbrack\\x\lbrack4\rbrack\\x\lbrack5\rbrack\\x\lbrack6\rbrack\\x\lbrack7\rbrack\end{bmatrix}=\begin{bmatrix}x\lbrack0\rbrack\\x\lbrack2\rbrack\\x\lbrack4\rbrack\\x\lbrack6\rbrack\\x\lbrack1\rbrack\\x\lbrack3\rbrack\\x\lbrack5\rbrack\\x\lbrack7\rbrack\end{bmatrix}\)

\(\begin{bmatrix}P_4&0_{4,4}\\0_{4,4}&P_4\end{bmatrix}\begin{bmatrix}x\lbrack0\rbrack\\x\lbrack2\rbrack\\x\lbrack4\rbrack\\x\lbrack6\rbrack\\x\lbrack1\rbrack\\x\lbrack3\rbrack\\x\lbrack5\rbrack\\x\lbrack7\rbrack\end{bmatrix}=\begin{bmatrix}1&0&0&0&0&0&0&0\\0&0&1&0&0&0&0&0\\0&1&0&0&0&0&0&0\\0&0&0&1&0&0&0&0\\0&0&0&0&1&0&0&0\\0&0&0&0&0&0&1&0\\0&0&0&0&0&1&0&0\\0&0&0&0&0&0&0&1\end{bmatrix}\begin{bmatrix}x\lbrack0\rbrack\\x\lbrack2\rbrack\\x\lbrack4\rbrack\\x\lbrack6\rbrack\\x\lbrack1\rbrack\\x\lbrack3\rbrack\\x\lbrack5\rbrack\\x\lbrack7\rbrack\end{bmatrix}=\begin{bmatrix}x\lbrack0\rbrack\\x\lbrack4\rbrack\\x\lbrack2\rbrack\\x\lbrack6\rbrack\\x\lbrack1\rbrack\\x\lbrack5\rbrack\\x\lbrack3\rbrack\\x\lbrack7\rbrack\end{bmatrix}\)

\(\begin{bmatrix}X\lbrack0\rbrack\\X\lbrack1\rbrack\\X\lbrack2\rbrack\\X\lbrack3\rbrack\\X\lbrack4\rbrack\\X\lbrack5\rbrack\\X\lbrack6\rbrack\\X\lbrack7\rbrack\end{bmatrix}=\begin{bmatrix}I_4&D_4\\I_4&-D_4\end{bmatrix}\begin{bmatrix}I_2&D_2&0_{2,2}&0_{2,2}\\I_2&-D_2&0_{2,2}&0_{2,2}\\0_{2,2}&0_{2,2}&I_2&D_2\\0_{2,2}&0_{2,2}&I_2&-D_2\end{bmatrix}\begin{bmatrix}M_2&0_{2,2}&0_{2,2}&0_{2,2}\\0_{2,2}&M_2&0_{2,2}&0_{2,2}\\0_{2,2}&0_{2,2}&M_2&0_{2,2}\\0_{2,2}&0_{2,2}&0_{2,2}&M_2\end{bmatrix}\begin{bmatrix}x\lbrack0\rbrack\\x\lbrack1\rbrack\\x\lbrack2\rbrack\\x\lbrack3\rbrack\\x\lbrack4\rbrack\\x\lbrack5\rbrack\\x\lbrack6\rbrack\\x\lbrack7\rbrack\end{bmatrix}\)





FFT complexity

\(X_n=\sum_{k=0}^{\frac N2-1}x_{2n}⋅e^{\frac{-i⋅2\pi⋅k⋅n}{N/2}}+e^{\frac{-i⋅2\pi⋅n}N}\sum_{k=0}^{\frac N2-1}x_{2n+1}⋅e^{\frac{-i⋅2\pi⋅k⋅n}{N/2}}\)

\({\frac n{n_1}}O(n_1\log\;n_1)+\cdots+{\frac n{n_d}}O(n_d\log\;n_d)\)

\(=O{(n{\lbrack\log\;n_1+\cdots+\log\;n_d\rbrack})}=O(n\log\;n)\)


taking FFTs -- \(O(N \log N)\)
multiplying FFTs -- \(O(N)\)
inverse FFTs -- \(O(N \log N)\).
the total complexity is \(O(N \log N)\).

Window function

Time weighting windows

FFT Analyzers use time-weighting window functions to reduce spectral leakage. Such leakage phenomena cause amplitude errors in the frequency spectrum.

Spectral leakage

Spectral leakage is when the energy of frequency components in a signal is spread out to a broad range of spectral lines instead of being represented by single spectral lines.

Spectral leakage is the spreading of a signal's energy across neighboring frequencies in a Fourier transform analysis. This phenomenon occurs when a signal's frequency is not an integer multiple of the sampling rate, causing it to appear in more frequency bins than just its true frequency. To mitigate spectral leakage, you can apply window functions to the signal or record a longer segment of the signal to increase frequency resolution.



Windowing a sinusoid causes spectral leakage, even if the sinusoid has an integer number of cycles within a rectangular window. The leakage is evident in the 2nd row, blue trace. It is the same amount as the red trace, which represents a slightly higher frequency that does not have an integer number of cycles. When the sinusoid is sampled and windowed, its discrete-time Fourier transform also exhibits the same leakage pattern (rows 3 and 4). But when the DTFT is only sparsely sampled, at a certain interval, it is possible (depending on your point of view) to: (1) avoid the leakage, or (2) create the illusion of no leakage. For the case of the blue sinusoid DTFT (3rd row of plots, right-hand side), those samples are the outputs of the discrete Fourier transform (DFT). The red sinusoid DTFT (4th row) has the same interval of zero-crossings, but the DFT samples fall in-between them, and the leakage is revealed.



Two different ways to generate an 8-point Gaussian window sequence (σ = 0.4) for spectral analysis applications. MATLAB calls them "symmetric" and "periodic". The latter is also historically called DFT-even.



Spectral leakage characteristics of the functions in previous figure.


Concept of window functions

Time weighting techniques add a “window” with individual weighting coefficients to each time sample in an FFT time block. This primarily reduces those samples that cause spectral leakage. In effect, samples at the time block ends are reduced to zero (or heavily reduced), so that the discontinuities in the periodized time signal are removed.

Effective noise bandwidth (NBW)

The NBW (also referred to as the “Effective Noise Bandwidth”) is defined as the width of an ideal filter that transmits the same power from a white noise source as the given/used filter



The figure of a used practical filter and an ideal filter. The ideal filter transmits all frequency components contained within its NBW and removes all other components.


Ripple (max. amplitude error)

Ripple, also referred to as Flatness or Scalloping Loss indicates the maximum amplitude error within \(\pm\frac{\Delta f}2\) around a spectral line, and thereby determines the accuracy of the amplitude of the signal. This maximum amplitude error is also referred to as the maximum picket fence effect error.


Window functions do not completely remove spectral leakage, and sidelobes will still exist, but they are more attenuated. The selectivity parameters that describe such sidelobe characteristics are illustrated in the picture below:



Window types

The choice of which window function to use depends upon the frequency content of the signal. Some window functions have a relatively small NBW (Noise BandWidth) which provides good Frequency Resolution \(f_{NBW}\), like the Hanning window.
Good frequency resolution is desired for signals containing closely spaced frequency components of interest with similar amplitude levels.
Other window functions have greater \(NBW\) like the Flattop window, however Flat top performs better in the determination of exact amplitude levels due to its low ripple value.
If two closely spaced tones with very different amplitude levels need to be separable, then window functions with good selectivity should be used. For example, if you have a narrow 60 dB bandwidth and a small value for the highest sidelobe, it is more likely that the weak tonal component will be detectable from the energy spreading of the strong tonal component.
Illustrations below show simulations of some common window functions and their differences with respect to the NBW, ripple, and selectivity.



Simulations of commonly used window functions, indicating their different characteristics which are used to select which window to use for a certain analysis scenario.



Simulations of commonly used window functions, showing their sidelobe fall-off rate.



From the window function simulations illustrated above, the characteristic parameters for window functions can be determined. See the table below:

Window function NBW Ripple \(BW_{3dB}\) \(BW_{60dB}\) Shape factor Highest sidelobe Sidelobe fall-off rate per decade
Rectangular 1.00 \(\Delta f\) -3.92 dB 0.89 \(\Delta f\) 665 \(\Delta f\) 750 -13.3 dB -20 dB
Hanning(\(\alpha = 2\)) 1.50 \(\Delta f\) -1.42 dB 1.44 \(\Delta f\) 13.3 \(\Delta f\) 9.2 -31.5 dB -60 dB
Hamming 1.36 \(\Delta f\) -1.75 dB 1.30 \(\Delta f\) 94.1 \(\Delta f\) 72.4 -42.7 dB -20 dB
5-term Flat top* 3.77 \(\Delta f\) -0.01 dB 3.72 \(\Delta f\) 9.2 \(\Delta f\) 2.5 -93.0 dB -20 dB
Blackman 1.73 \(\Delta f\) -1.10 dB 1.64 \(\Delta f\) 9.2 \(\Delta f\) 5.6 -58.1 dB -60 dB
7-term Blackman-Harris 2.63 \(\Delta f\) -0.48 dB 2.48 \(\Delta f\) 10.2 \(\Delta f\) 4.1 -180 dB -20 dB

Magnitude and Phase in the output of the FFT

Extract amplitude of frequency components (amplitude spectrum)

The FFT function computes the complex DFT and the hence the results in a sequence of complex numbers of form \(X_{re} + j X_{im}\). The amplitude spectrum is obtained

\[|X[k]| = \sqrt{X_{re}^2 + X_{im}^2 } \]


Extract phase of frequency components (phase spectrum)

Extracting the correct phase spectrum is a tricky business. I will show you why it is so. The phase of the spectral components are computed as

\[\angle X[k] = tan^{-1} \left( \frac{X_{im}}{X_{re}} \right)\]

The Quaternion Fourier Transform (QFT)

The Quaternion Discrete Fourier Transform (QDFT)
yahoo




The Octonionic Fourier Transform (OFT)

ABCD