1.1. 离散傅里叶变换

  • 傅里叶级数f(t)f(t)

f(t)=a02+n=1(ancosnωt+bnsinnωt) f(t) = \frac{a_{0}}{2} + \sum^{\infty}_{n=1}\biggr(a_{n}\cos n\omega t + b_{n}\sin n\omega t\biggr)

  • 其中:

ω=2πT \omega=\frac{2 \pi}{T}

an=2TT2T2f(t)cosnωtdt a_{n} = \frac{2}{T}\int_{-\frac{T}{2}}^{\frac{T}{2}}f(t) \cos n \omega t dt

bn=2TT2T2f(t)sinnωtdt b_{n} = \frac{2}{T}\int_{-\frac{T}{2}}^{\frac{T}{2}}f(t) \sin n \omega t dt

  • 欧拉公式:

ejθ=cosθ+jsinθ e^{j\theta}=\cos \theta + j\sin\theta

容易得到:

cosnωt=ejnωt+ejnωt2 \cos n\omega t = \frac{e^{jn \omega t}+e^{-j n \omega t}}{2}

sinnωt=jejnωtejnωt2 \sin n\omega t = -j\frac{e^{jn\omega t} - e^{-j n\omega t}}{2}

带入傅里叶级数中:

f(t)=a02+n=1(ancosnωt+bnsinnωt) f(t) = \frac{a_{0}}{2}+\sum_{n=1}^{\infty}\biggr(a_{n}\cos n\omega t + b_{n}sin n\omega t\biggr)

f(t)=a02+n=1[an×ejnωt+ejnωt2bn×jejnωtejnωt2] f(t)= \frac{a_{0}}{2}+\sum_{n=1}^{\infty}\biggr[a_{n}\times \frac{e^{jn \omega t}+e^{-j n \omega t}}{2} -b_{n}\times j\frac{e^{jn\omega t} - e^{-j n\omega t}}{2}\biggr]

f(t)=a02+n=1[anjbn2ejnωt+an+jbn2ejnωt] f(t)=\frac{a_{0}}{2}+\sum_{n=1}^{\infty}\biggr[\frac{a_{n}-j b_{n} }{2} e^{jn\omega t} + \frac{a_{n}+jb_{n}}{2} e^{-jn \omega t}\biggr ]

令:

c0=a02cn=anjbn2dn=an+jbn2 c_{0}=\frac{a_{0}}{2} \quad c_{n}=\frac{a_{n} - jb_{n}}{2} \quad d_{n}=\frac{a_{n}+jb_{n}}{2}

则:

f(t)=c0+n=1(cnejnωt+dnejnωt) f(t)= c_{0} + \sum_{n=1}^{\infty}\biggr(c_{n} e^{jn \omega t} + d_{n} e^{-jn\omega t}\biggr)

已知:

c0=1TT2T2f(t)dt c_{0}= \frac{1}{T}\int_{-\frac{T}{2}}^{\frac{T}{2}}f(t)dt

cn=1TT2T2f(t)(cosnωtjsinnωt)dt=1TT2T2f(t)ejnωtdt c_{n}=\frac{1}{T}\int_{-\frac{T}{2}}^{\frac{T}{2}}f(t)\biggr(\cos n \omega t - j\sin n\omega t\biggr)dt =\frac{1}{T}\int_{-\frac{T}{2}}^{\frac{T}{2}}f(t)e^{-jn\omega t}dt

dn=1TT2T2f(t)(cosnωt+jsinnωt)dt=1TT2T2f(t)ejnωtdt d_{n}=\frac{1}{T}\int_{-\frac{T}{2}}^{\frac{T}{2}}f(t)\biggr(\cos n \omega t + j \sin n\omega t \biggr)dt = \frac{1}{T}\int_{-\frac{T}{2}}^{\frac{T}{2}}f(t)e^{jn \omega t}dt

显然:

dn=cn d_{n} = c_{-n}

则:

n=1dnejnωt=n=1cnejnωt=n=1cnejnωt \sum_{n=1}^{\infty}d_{n}e^{jn\omega t} = \sum_{n=1}^{\infty}c_{-n}e^{-jn\omega t}=\sum_{n=-\infty}^{-1}c_{n}e^{jn\omega t}

f(t)=c0+n=1(cn×ejnωt+dn×ejnωt)=c0ej0ωt+n=1(cn×ejnωt+cn×ejnωt) f(t)= c_{0} + \sum_{n=1}^{\infty}\biggr(c_{n}\times e^{jn \omega t} + d_{n}\times e^{-jn\omega t}\biggr)=c_{0}e^{j0\omega t}+ \sum_{n=1}^{\infty}\biggr(c_{n}\times e^{jn \omega t} + c_{-n}\times e^{-jn\omega t}\biggr)

f(t)=c0ej0ωt+n=1(cn×ejnωt+cn×ejnωt)=c0ej0ωt+n=1(cn×ejnωt)+n=1cn×ejnωt) f(t)=c_{0}e^{j0\omega t}+ \sum_{n=1}^{\infty}\biggr(c_{n}\times e^{jn \omega t} + c_{-n}\times e^{-jn\omega t}\biggr)= c_{0}e^{j0\omega t}+ \sum_{n=1}^{\infty}\biggr(c_{n}\times e^{jn \omega t}) + \sum_{n=-\infty}^{-1} c_{n}\times e^{jn\omega t}\biggr)

  • 最终可得:

f(t)=n=+cnejnωt f(t)= \sum_{n=-\infty}^{+\infty}c_{n}e^{jn\omega t}

1.1.1. 快速傅里叶变换FFT

一维傅里叶变换DFT

DFT表示为: F(u)=x=0N1f(x)ej2πuxN,u=0,...,N1 F(u)=\sum_{x=0}^{N-1}f(x)e^{\frac{-j2\pi ux}{N}},u=0,...,N-1 IDFT表示为: f(x)=1Nu=0N1F(u)ej2πuxN,x=0,...,N1 f(x) = \frac{1}{N}\sum_{u=0}^{N-1}F(u)e^{\frac{j2\pi ux}{N}},x=0,...,N-1 W=ej2πN W=e^{\frac{-j2\pi}{N}}

则: F(u)=x=0N1f(x)Wux,u=0,...,N1 F(u)=\sum_{x=0}^{N-1}f(x)W^{ux},u=0,...,N-1

f(x)=1Nu=0N1F(u)Wux,x=0,...,N1 f(x) = \frac{1}{N}\sum_{u=0}^{N-1}F(u)W^{-ux},x=0,...,N-1

因为W因子具有周期性和对称性 Wu±rN=ej2πu±rNN=ej2πNu×ej2πr=ej2πNu=Wu W^{u\pm rN}=e^{-j2\pi\frac{u\pm rN}{N}} =e^{-j\frac{2\pi}{N}u}\times e^{\mp j2\pi r}=e^{-j\frac{2 \pi}{N}u} = W^{u}

Wu±N2=ej2πN(u±N2)=ej2πNu×ejπ=ej2πNu=Wu W^{u\pm \frac{N}{2}}=e^{-j\frac{2\pi}{N}(u \pm \frac{N}{2})} =e^{-j\frac{2\pi}{N}u}\times e^{\mp j\pi}=-e^{-j\frac{2 \pi}{N}u} = -W^{u}

所以,合理安排重复出现的相乘运算,减少计算工作量

  • 一个长为4的数字序列,求其离散傅里叶变换DFT

F(u)=x=03f(x)Wux=f(0)W0+f(1)W1+f(2)W2+f(3)W3 F(u)=\sum_{x=0}^{3}f(x)W^{ux}=f(0)W^{0}+f(1)W^{1}+f(2)W^{2}+f(3)W^{3}

[F(0)F(1)F(2)F(3)]=[W0W0W0W0W0W1W2W3W0W2W4W6W0W3W6W9]=[f(0)f(1)f(2)f(3)] \left[\begin{matrix}F(0) \\ F(1) \\ F(2) \\ F(3)\end{matrix}\right]= \left[\begin{matrix}W^{0} & W^{0} & W^{0} & W^{0}\\ W^{0} & W^{1} & W^{2} & W^{3}\\W^{0} & W^{2} & W^{4} & W^{6}\\W^{0} & W^{3} & W^{6} & W^{9} \end{matrix}\right]=\left[\begin{matrix}f(0)\\f(1)\\f(2)\\f(3)\end{matrix}\right]

  1. W的对称性 W2=W0 W^{2}=-W^{0}

    W3=W1 W^{3} = -W^{1}

  2. W的周期性 W4=W0 W^{4}=-W^{0}

    W6=W2 W^{6}=-W^{2}

    W9=W1 W^{9}=-W^{1}

    [F(0)F(1)F(2)F(3)]=[W0W0W0W0W0W1W2W3W0W2W4W6W0W3W6W9][f(0)f(1)f(2)f(3)] \left[\begin{matrix}F(0)\\F(1)\\F(2)\\F(3)\end{matrix}\right]= \left[\begin{matrix} W^{0} & W^{0} & W^{0} & W^{0}\\ W^{0} & W^{1} & W^{2} & W^{3}\\W^{0} & W^{2} & W^{4} & W^{6}\\W^{0} & W^{3} & W^{6} & W^{9}\end{matrix}\right] \left[\begin{matrix}f(0)\\f(1)\\f(2)\\f(3)\end{matrix}\right]

    =[11111W11W111111W11W1][f(0)f(1)f(2)f(3)] =\left[\begin{matrix}1 & 1 & 1 &1 \\ 1 & W^{1}& -1 & -W^{1}\\1 & -1 &1 &-1 \\ 1 & -W^{1}& -1 & W^{1}\\ \end{matrix}\right]\left[\begin{matrix}f(0)\\f(1)\\f(2)\\f(3)\end{matrix}\right]

    =[f(0)+f(2)+(f(1)+f(3))f(0)f(2)+[f(1)f(3)]W1f(0)+f(2)[f(1)+f(3)]f(0)f(2)[f(1)f(3)]W1] =\left[\begin{matrix} f(0)+f(2)+(f(1)+f(3))\\f(0)-f(2)+[f(1)-f(3)]W^{1}\\f(0)+f(2)-[f(1)+f(3)]\\f(0)-f(2)-[f(1)-f(3)]W^{1} \end{matrix} \right]

    F(u)=x=0N1f(x)ej2πuxN=x=0N1f(x)WNux=x=0N/21f(2x)WN2ux+x=0N/21f(2x+1)WNu(2x+1) F(u)=\sum_{x=0}^{N-1}f(x)e^{\frac{-j2\pi ux}{N}}=\sum_{x=0}^{N-1}f(x)W^{ux}_{N}=\sum_{x=0}^{N/2-1}f(2x)W^{2ux}_{N}+ \sum_{x=0}^{N/2-1}f(2x+1)W^{u(2x+1)}_{N}

    M=N2 M=\frac{N}{2} 则: F(u)=x=0M1f(2x)WMux+x=0M1f(2x+1)WMuxWNu F(u)=\sum_{x=0}^{M-1}f(2x)W^{ux}_{M}+ \sum_{x=0}^{M-1}f(2x+1)W^{ux}_{M}W^{u}_{N}

    F(u)=Fe(u)+WNuFo(u)0uM F(u) = F_{e}(u) + W_{N}^{u}F_{o}(u) \quad 0 \le u \le M

    **分成奇数项和偶数项之和**

1.1.2. 总结

  • 将原函数分为奇数项和偶数项,通过不断的一个奇数一个偶数的相加(减),最终得到需要的结果

  • FFT是将复杂的运算变成两个数相加(减)的简单运算的重复。 F(u)=Fe(u)+WNu+MF0(u) F(u) = F_{e}(u) + W^{u+M}_{N}F_{0}(u)

    F(u+M)=Fe(u)WNuF0(u) F(u+M) = F_{e}(u) - W^{u}_{N}F_{0}(u)

    例子:

    一个长为8的数字序列,利用FFT算法求其DFT。

    131

1.1.3. 二维离散傅里叶变换

F(u,v)=x=0M1y=0N1f(x,y)ej2π(xuM+yvN)x,u=0,1,....,M1y,v=0,1,2...N1 F(u,v) = \sum_{x=0}^{M-1}\sum_{y=0}^{N-1}f(x,y)e^{-j2\pi (\frac{xu}{M}+\frac{yv}{N})} \quad x,u =0,1,....,M-1 \quad y,v= 0,1,2...N-1

f(u,v)=1MNx=0M1y=0N1F(u,v)ej2π(xuM+yvN)x,u=0,1,....,M1y,v=0,1,2...N1 f(u,v) = \frac{1}{MN}\sum_{x=0}^{M-1}\sum_{y=0}^{N-1}F(u,v)e^{j2\pi (\frac{xu}{M}+\frac{yv}{N})} \quad x,u =0,1,....,M-1 \quad y,v= 0,1,2...N-1

例:

先按列变换(也可以先按行变换)

135

1.1.4. 卷积定理

如果 F(f(t))=F(μ)F(h(t))=H(μ)F[f(t)h(t)]=F(μ)H(μ) \quad F(f(t)) = F(\mu) \quad F(h(t))=H(\mu) \quad \Rightarrow \quad F[f(t)\star h(t) ] = F(\mu) \cdot H(\mu)

Copyright © ZHOUWEN all right reserved,powered by GitbookLatest updated: 2023-03-21 23:38:33

results matching ""

    No results matching ""