傅立葉轉換(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\) 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.

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\)


傅立葉轉換(Fourier Transform)

Fourier Transform
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\)

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

\(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)\)


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\)



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\]




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 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 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}\)


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.

Future Study

Hilbert Transform
Gabor Transform
Riesz transform
wavelet transform
Markov chain
Z-transform
Advanced z-transform
Matched Z-transform method
Bilinear transform
Constant-Q transform
Discrete cosine transform (DCT)
Discrete Fourier transform (DFT)
Discrete-time Fourier transform (DTFT)
Impulse invariance Integral transform
Post's inversion formula Starred transform
Zak transform
Hankel transform
The Spectrogram and the Gabor Transform
Eigenvalues of the Laplacian