Fourier Transform
基本的定义
严格来说, 傅里叶变换是Schwartz space 上的一一映射, 对于 L 1 L^1 L1, 即可积函数我们都可以找到其对应的傅里叶变换.
符号 | 定义 |
---|---|
傅里叶变换: f ^ ( u ) \hat{f}(u) f^(u) | ∫ − ∞ + ∞ f ( t ) e − j 2 π u t d t \int_{-\infty}^{+\infty} f(t) e^{-j2\pi u t} \mathrm{d}t ∫−∞+∞f(t)e−j2πutdt |
逆傅里叶变换: F ˇ ( t ) \check{F}(t) Fˇ(t) | ∫ − ∞ + ∞ F ( u ) e j 2 π t u d u \int_{-\infty}^{+\infty} F(u) e^{j2\pi tu} \mathrm{d}u ∫−∞+∞F(u)ej2πtudu |
离散傅里叶变换: F m = f ^ m F_m=\hat{f}_m Fm=f^m | ∑ n = 0 N − 1 f n e − j 2 π n m / N \sum_{n=0}^{N-1} f_n e^{-j2\pi nm/N} ∑n=0N−1fne−j2πnm/N |
离散逆傅里叶变换: f n = F ˇ n f_n = \check{F}_n fn=Fˇn | 1 N ∑ m = 0 N − 1 F m e j 2 π m n / N \frac{1}{N}\sum_{m=0}^{N-1} F_m e^{j2\pi mn /N} N1∑m=0N−1Fmej2πmn/N |
卷积: f ⋆ g ( t ) f \star g (t) f⋆g(t) | ∫ − ∞ + ∞ f ( τ ) g ( t − τ ) d τ \int_{-\infty}^{+\infty} f(\tau) g(t-\tau) \mathrm{d}\tau ∫−∞+∞f(τ)g(t−τ)dτ |
correlation: f ∙ g ( t ) f \bullet g(t) f∙g(t) | ∫ − ∞ + ∞ f ∗ ( τ ) g ( τ + t ) d τ \int_{-\infty}^{+\infty}f^*(\tau)g(\tau + t)\mathrm{d}\tau ∫−∞+∞f∗(τ)g(τ+t)dτ |
二元傅里叶变换: f ^ ( u , v ) \hat{f}(u, v) f^(u,v) | ∫ − ∞ + ∞ ∫ − ∞ + ∞ f ( t , z ) e − j 2 π u t e − j 2 π v z d t d z \int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty} f(t, z) e^{-j2\pi ut} e^{-j2\pi vz} \mathrm{d}t \mathrm{d}z ∫−∞+∞∫−∞+∞f(t,z)e−j2πute−j2πvzdtdz |
二元傅里叶逆变换: F ˇ ( t , z ) \check{F}(t, z) Fˇ(t,z) | ∫ − ∞ + ∞ ∫ − ∞ + ∞ F ( u , v ) e j 2 π t u e − j 2 π z v d t d z \int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty} F(u, v) e^{j2\pi tu} e^{-j2\pi zv} \mathrm{d}t \mathrm{d}z ∫−∞+∞∫−∞+∞F(u,v)ej2πtue−j2πzvdtdz |
二元卷积: f ⋆ g ( t , z ) f \star g (t, z) f⋆g(t,z) | ∫ − ∞ + ∞ ∫ − ∞ + ∞ f ( τ , ω ) g ( t − τ , z − ω ) d τ d ω \int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty} f(\tau, \omega) g(t - \tau, z - \omega) \mathrm{d}\tau \mathrm{d}\omega ∫−∞+∞∫−∞+∞f(τ,ω)g(t−τ,z−ω)dτdω |
共轭 | f ∗ ( t ) = [ r ( t ) + j i ( t ) ] ∗ = r ( t ) − j i ( t ) , r ( t ) , i ( t ) ∈ R f^*(t) = [r(t) + j i(t)]^* = r(t) - ji(t), \quad r(t), i(t) \in \mathbb{R} f∗(t)=[r(t)+ji(t)]∗=r(t)−ji(t),r(t),i(t)∈R |
注: 不同版本的傅里叶变换的定义存在系数上的差异.
性质
^ \hat{} ^ | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | ˇ \check{} ˇ | |
---|---|---|---|
1 | f ( t ) f(t) f(t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ( u ) F(u) F(u) |
2 | f ⋆ g ( t ) f \star g (t) f⋆g(t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ( u ) ⋅ G ( u ) F(u) \cdot G (u) F(u)⋅G(u) |
3 | f ∙ g ( t ) f \bullet g(t) f∙g(t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ∗ ( u ) ⋅ G ( u ) F^*(u) \cdot G(u) F∗(u)⋅G(u) |
4 | $f(t) \cdot g(t) $ | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ⋆ G ( u ) F \star G (u) F⋆G(u) |
5 | f ( t ) + g ( t ) f(t) + g(t) f(t)+g(t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ( u ) + G ( u ) F(u) + G(u) F(u)+G(u) |
6 | f ( t + t 0 ) f(t + t_0) f(t+t0) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | e j 2 π t 0 u F ( u ) e^{j2\pi t_0 u} F(u) ej2πt0uF(u) |
7 | f ( − t ) f(-t) f(−t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ( − u ) F(-u) F(−u) |
8 | F ( u ) = f ^ ( u ) F(u)=\hat{f}(u) F(u)=f^(u) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | f ( − t ) = f ^ ^ ( t ) f(-t) = \hat{\hat{f}}(t) f(−t)=f^^(t) |
以上 | 对于 | 离散 | 成立 |
9 | f ( a t ) f(at) f(at) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | $\frac{1}{ |
10 | f ′ ( t ) f'(t) f′(t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | j 2 π u F ( u ) j2\pi u F(u) j2πuF(u) |
11 | − j 2 π t f ( t ) -j2\pi tf(t) −j2πtf(t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ′ ( u ) F'(u) F′(u) |
12 | f ( R t ) f(R \mathbf{t}) f(Rt), R T R = I R^TR=I RTR=I | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ( R u ) F(R\mathbf{u}) F(Ru) |
注: 虽然以上性质除11外都是用了标量, 但是实际上对于一般的傅里叶变换也是成立的.
-
pass
-
卷积:
( f ⋆ g ) ^ ( u ) = ∫ f ⋆ g ( t ) e − j 2 π u t d t = ∫ ∫ f ( t − τ ) g ( τ ) d τ e − j 2 π u t d t = ∫ ∫ f ( t − τ ) g ( τ ) e − j 2 π u t d t d τ → F u b i n i = ∫ ∫ f ( t − τ ) e − j 2 π u ( t − τ ) d t g ( τ ) e − j 2 π u τ d τ = F ( u ) ⋅ G ( u ) . \begin{array}{ll} (f \star g)^{\hat{}}(u) &= \int f \star g (t) e^{-j2\pi u t} \mathrm{d}t \\ &= \int \int f(t-\tau) g (\tau) \mathrm{d}\tau e^{-j2\pi u t} \mathrm{d}t \\ &= \int \int f(t-\tau) g (\tau) e^{-j2\pi u t} \mathrm{d}t \mathrm{d}\tau \quad \rightarrow \mathrm{Fubini}\\ &= \int \int f(t-\tau) e^{-j2\pi u (t-\tau)} \mathrm{d}t \: g(\tau)e^{-j2\pi u\tau} \mathrm{d}\tau \quad \\ &= F(u) \cdot G(u). \end{array} (f⋆g)^(u)=∫f⋆g(t)e−j2πutdt=∫∫f(t−τ)g(τ)dτe−j2πutdt=∫∫f(t−τ)g(τ)e−j2πutdtdτ→Fubini=∫∫f(t−τ)e−j2πu(t−τ)dtg(τ)e−j2πuτdτ=F(u)⋅G(u).
⇐ \Leftarrow ⇐是类似的证明. -
correlation:
( f ∙ g ) ^ ( u ) = ∫ f ∗ g ( t ) e − j 2 π u t d t = ∫ ∫ f ∗ ( τ ) g ( τ + t ) d τ e − j 2 π u t d t = ∫ f ∗ ( τ ) ∫ g ( τ + t ) e − j 2 π u t d t d τ = G ( u ) ∫ f ∗ ( τ ) e j 2 π u τ d τ = G ( u ) [ ∫ f ( τ ) e − j 2 π u τ d τ ] ∗ = F ∗ ( u ) G ( u ) \begin{array}{ll} (f \bullet g)^{\hat{}}(u) &= \int f*g(t) e^{-j2\pi ut} \mathrm{d}t \\ &= \int \int f^*(\tau) g(\tau + t) \mathrm{d}\tau e^{-j2\pi ut} \mathrm{d}t \\ &= \int f^*(\tau) \int g(\tau + t) e^{-j2\pi ut} \mathrm{d}t \mathrm{d}\tau \\ &= G(u)\int f^*(\tau) e^{j2\pi u\tau} \mathrm{d}\tau \\ &= G(u)[\int f(\tau) e^{-j2\pi u\tau} \mathrm{d}\tau]^* \\ &= F^*(u)G(u) \end{array} (f∙g)^(u)=∫f∗g(t)e−j2πutdt=∫∫f∗(τ)g(τ+t)dτe−j2πutdt=∫f∗(τ)∫g(τ+t)e−j2πutdtdτ=G(u)∫f∗(τ)ej2πuτdτ=G(u)[∫f(τ)e−j2πuτdτ]∗=F∗(u)G(u) -
乘积的证明和上面是一样的, 无非是作用于 ˇ \check{} ˇ上.
-
pass
-
平移:
( f ( t + t 0 ) ) ^ = ∫ f ( t + t 0 ) e − j 2 π u t d t = e j 2 π u t 0 ∫ f ( t + t 0 ) e − j 2 π u ( t + t 0 ) d t = e j 2 π t 0 u F ( u ) . (f(t+t_0))^{\hat{}} = \int f(t+t_0) e^{-j2\pi ut} \mathrm{d}t =e^{j2\pi u t_0}\int f(t+t_0) e^{-j2\pi u(t+t_0)} \mathrm{d}t = e^{j2\pi t_0u} F(u). (f(t+t0))^=∫f(t+t0)e−j2πutdt=ej2πut0∫f(t+t0)e−j2πu(t+t0)dt=ej2πt0uF(u). -
逆:
( f ( − t ) ) ^ = ∫ f ( − t ) e − j 2 π u t d t = ∫ f ( t ) e j 2 π u t d t = F ( − u ) . (f(-t))^{\hat{}} = \int f(-t) e^{-j2\pi u t} \mathrm{d}t = \int f(t) e^{j2\pi u t} \mathrm{d}t = F(-u). (f(−t))^=∫f(−t)e−j2πutdt=∫f(t)ej2πutdt=F(−u). -
F ^ ( t ) = ∫ F ( u ) e j 2 π t u d u = ( F ( − u ) ) ˇ ( t ) = f ( − t ) \hat{F}(t) = \int F(u) e^{j2\pi t u} \mathrm{d}u = (F(-u))^{\check{}}(t) = f(-t) F^(t)=∫F(u)ej2πtudu=(F(−u))ˇ(t)=f(−t).
-
scaling:
( f ( a t ) ) ^ ( u ) = ∫ − ∞ + ∞ f ( a t ) e − j 2 π u t d t = 1 ∣ a ∣ ∫ − ∞ + ∞ f ( z ) e − j 2 π u a z d z = 1 ∣ a ∣ F ( u a ) . (f(at))^{\hat{}}(u) = \int_{-\infty}^{+\infty} f(at) e^{-j2\pi ut} \mathrm{d}t = \frac{1}{|a|}\int_{-\infty}^{+\infty} f(z) e^{-j2\pi \frac{u}{a}z} dz = \frac{1}{|a|} F(\frac{u}{a}). (f(at))^(u)=∫−∞+∞f(at)e−j2πutdt=∣a∣1∫−∞+∞f(z)e−j2πauzdz=∣a∣1F(au). -
导函数:
f ′ ( t ) = d d t ∫ − ∞ + ∞ F ( u ) e j 2 π t u d u = ∫ − ∞ + ∞ F ( u ) d d t e j 2 π t u d u = ∫ − ∞ + ∞ F ( u ) ( j 2 π u ) e j 2 π t u d u = ( j 2 π u F ( u ) ) ˇ . \begin{array}{ll} f'(t) &= \frac{\mathrm{d}}{\mathrm{d}t} \int_{-\infty}^{+\infty} F(u) e^{j2\pi t u} \mathrm{d}u \\ &= \int_{-\infty}^{+\infty} F(u) \frac{\mathrm{d}}{\mathrm{d}t} e^{j2\pi t u} \mathrm{d}u \\ &= \int_{-\infty}^{+\infty} F(u) (j2\pi u) e^{j2\pi t u} \mathrm{d}u \\ &= (j2\pi u F(u))^{\check{}}. \end{array} f′(t)=dtd∫−∞+∞F(u)ej2πtudu=∫−∞+∞F(u)dtdej2πtudu=∫−∞+∞F(u)(j2πu)ej2πtudu=(j2πuF(u))ˇ. -
同上
-
这个性质说明了, 对原图像加以旋转, 等价地在频域上加以同样的旋转.
G ( u ) = ∫ f ( R t ) e − j 2 π u T t d t = ∫ f ( x ) e − j 2 π ( R u ) T x ∣ R − 1 ∣ d x = ∫ f ( x ) e − j 2 π ( R u ) T x d x = F ( R u ) \begin{array}{ll} G(\mathbf{u}) &=\int f(R\mathbf{t}) e^{-j2 \pi \mathbf{u}^T \mathbf{t}} \mathrm{d}\mathbf{t} \\ &=\int f(\mathbf{x}) e^{-j2 \pi (R\mathbf{u})^T \mathbf{x}} |R^{-1}|\mathrm{d}\mathbf{x} \\ &=\int f(\mathbf{x}) e^{-j2 \pi (R\mathbf{u})^T \mathbf{x}} \mathrm{d}\mathbf{x} \\ &=F(R\mathbf{u}) \end{array} G(u)=∫f(Rt)e−j2πuTtdt=∫f(x)e−j2π(Ru)Tx∣R−1∣dx=∫f(x)e−j2π(Ru)Txdx=F(Ru)
对称性
主要指的:
-
奇函数
f ( x ) = − f ( − x ) . f(x) = -f(-x). f(x)=−f(−x). -
偶函数
f ( x ) = f ( − x ) . f(x) = f(-x). f(x)=f(−x). -
共轭对称
f ∗ ( x ) = f ( − x ) . f^*(x) = f(-x). f∗(x)=f(−x).
考查 f ( t ) = r ( t ) + j i ( t ) f(t)=r(t) + j i(t) f(t)=r(t)+ji(t)与 F ( u ) = R ( u ) + j I ( u ) F(u) = R(u) + j I(u) F(u)=R(u)+jI(u)之间的关系:
^ \hat{ } ^ | ⇔ \Leftrightarrow ⇔ | ˇ \check{ } ˇ | |
---|---|---|---|
1 | f ( t ) = r ( t ) f(t) = r(t) f(t)=r(t) | ⇔ \Leftrightarrow ⇔ | F ∗ ( u ) = F ( − u ) F^*(u) = F(-u) F∗(u)=F(−u) |
2 | f ( t ) = r ( t ) f(t)=r(t) f(t)=r(t) | ⇔ \Leftrightarrow ⇔ | R ( u ) = R ( − u ) , I ( u ) = − I ( − u ) R(u)=R(-u), I(u)=-I(-u) R(u)=R(−u),I(u)=−I(−u) |
3 | f ( t ) = j i ( t ) f(t) = ji(t) f(t)=ji(t) | ⇔ \Leftrightarrow ⇔ | F ∗ ( − u ) = − F ( u ) F^*(-u) = -F(u) F∗(−u)=−F(u) |
4 | f ( t ) = j i ( t ) f(t) = ji(t) f(t)=ji(t) | ⇔ \Leftrightarrow ⇔ | R ( u ) = − R ( − u ) , I ( u ) = I ( − u ) R(u)=-R(-u), I(u)=I(-u) R(u)=−R(−u),I(u)=I(−u) |
^ \hat{} ^ | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | ˇ \check{} ˇ | |
---|---|---|---|
5 | f ( − t ) ∈ R f(-t)\in \mathbb{R} f(−t)∈R | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ∗ ( u ) ∈ C F^*(u) \in \mathbb{C} F∗(u)∈C |
6 | f ( − t ) ∈ C f(-t) \in \mathbb{C} f(−t)∈C | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ( − u ) ∈ C F(-u) \in \mathbb{C} F(−u)∈C |
7 | f ∗ ( t ) ∈ C f^*(t) \in \mathbb{C} f∗(t)∈C | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ∗ ( − u ) ∈ C F^*(-u) \in \mathbb{C} F∗(−u)∈C |
8 | f ( t ) ∈ R f(t) \in \mathbb{R} f(t)∈R, 且 f ( t ) = f ( − t ) f(t) = f(-t) f(t)=f(−t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ( u ) ∈ R F(u) \in \mathbb{R} F(u)∈R, 且满足 F ( u ) = F ( − u ) F(u)=F(-u) F(u)=F(−u) |
9 | f ( t ) ∈ R f(t) \in \mathbb{R} f(t)∈R, 且 f ( t ) = − f ( − t ) f(t) = -f(-t) f(t)=−f(−t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ( u ) = j I ( u ) ∈ C F(u) = jI(u) \in \mathbb{C} F(u)=jI(u)∈C, 且 F ( u ) = − F ( − u ) F(u)=-F(-u) F(u)=−F(−u) |
10 | f ( t ) = j i ( t ) ∈ C f(t) = ji(t) \in \mathbb{C} f(t)=ji(t)∈C, 且 f ( t ) = f ( − t ) f(t) = f(-t) f(t)=f(−t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ( u ) = j I ( u ) ∈ C F(u) = jI(u) \in \mathbb{C} F(u)=jI(u)∈C, 且 F ( u ) = F ( − u ) F(u)=F(-u) F(u)=F(−u) |
11 | f ( t ) = j i ( t ) ∈ C f(t)=ji(t) \in \mathbb{C} f(t)=ji(t)∈C, 且 f ( t ) = − f ( − t ) f(t)=-f(-t) f(t)=−f(−t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ( u ) ∈ R F(u) \in \mathbb{R} F(u)∈R, 且满足 F ( u ) = − F ( − u ) F(u)=-F(-u) F(u)=−F(−u) |
12 | f ( t ) ∈ C f(t) \in \mathbb{C} f(t)∈C, 且 f ( t ) = f ( − t ) f(t) = f(-t) f(t)=f(−t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ( u ) ∈ C F(u) \in \mathbb{C} F(u)∈C, 且满足 F ( u ) = F ( − u ) F(u) = F(-u) F(u)=F(−u) |
13 | f ( t ) ∈ C f(t) \in \mathbb{C} f(t)∈C, 且 f ( t ) = − f ( − t ) f(t) = -f(-t) f(t)=−f(−t) | ⇔ F \mathop{\Leftrightarrow} \limits^{\mathcal{F}} ⇔F | F ( u ) ∈ C F(u) \in \mathbb{C} F(u)∈C, 且满足 F ( u ) = − F ( − u ) F(u) = -F(-u) F(u)=−F(−u) |
-
real ->( ⇐ \Leftarrow ⇐采用反证法即可)
F ∗ ( u ) = [ ∫ f ( t ) e − j 2 π u t d t ] ∗ = ∫ f ∗ ( t ) e j 2 π u t d t = ∫ f ( t ) e − j 2 π ( − u ) t d t → f ∗ ( t ) = r ∗ ( t ) = r ( t ) = F ( − u ) . \begin{array}{ll} F^*(u) &=[\int f(t) e^{-j2\pi ut} \mathrm{d}t]^* \\ &=\int f^*(t) e^{j2\pi ut} \mathrm{d}t \\ &=\int f(t) e^{-j2\pi (-u)t} \mathrm{d}t \rightarrow f*(t) = r^*(t) = r(t)\\ &=F(-u). \end{array} F∗(u)=[∫f(t)e−j2πutdt]∗=∫f∗(t)ej2πutdt=∫f(t)e−j2π(−u)tdt→f∗(t)=r∗(t)=r(t)=F(−u). -
由1易证.
-
imaginary ->
F ∗ ( − u ) = [ ∫ f ( t ) e j 2 π u t d t ] ∗ = ∫ f ∗ ( t ) e − j 2 π u t d t = ∫ − f ( t ) e − j 2 π u t d t → f ∗ ( t ) = − j i ( t ) = − f ( t ) = − F ( u ) . \begin{array}{ll} F^*(-u) &=[\int f(t) e^{j2\pi ut} \mathrm{d}t]^* \\ &=\int f^*(t) e^{-j2\pi ut} \mathrm{d}t \\ &=\int -f(t) e^{-j2\pi ut} \mathrm{d}t \rightarrow f^*(t) = -ji(t)=-f(t) \\ &=-F(u). \end{array} F∗(−u)=[∫f(t)ej2πutdt]∗=∫f∗(t)e−j2πutdt=∫−f(t)e−j2πutdt→f∗(t)=−ji(t)=−f(t)=−F(u). -
由3易证.
-
由性质6以及上述的对称性3可知 ( f ( − t ) ) ^ = F ( − u ) = F ∗ ( u ) (f(-t))^{\hat{}}= F(-u) = F^*(u) (f(−t))^=F(−u)=F∗(u).
-
由性质6可知 ( f ( − t ) ) ^ = F ( − u ) (f(-t))^{\hat{}} = F(-u) (f(−t))^=F(−u).
-
∫ f ∗ ( t ) e − j 2 π u t d t = [ ∫ f ( t ) e j 2 π u t d t ] ∗ = F ∗ ( − u ) . \int f^*(t) e^{-j2\pi ut} \mathrm{d}t = [\int f(t) e^{j2\pi ut} \mathrm{d}t]^* = F^*(-u). ∫f∗(t)e−j2πutdt=[∫f(t)ej2πutdt]∗=F∗(−u).
-
F ( u ) = ( f ( t ) ) ^ = ( f ( − t ) ) ^ = F ( − u ) = F ∗ ( u ) . F(u) = (f(t))^{\hat{}} = (f(-t))^{\hat{}} = F(-u) = F^*(u). F(u)=(f(t))^=(f(−t))^=F(−u)=F∗(u).
-
F ( u ) = ( f ( t ) ) ^ = − ( f ( − t ) ) ^ = − F ( − u ) = − F ∗ ( u ) . F(u) = (f(t))^{\hat{}} = -(f(-t))^{\hat{}} = -F(-u) = -F^*(u). F(u)=(f(t))^=−(f(−t))^=−F(−u)=−F∗(u).
-
F ( u ) = ( f ( t ) ) ^ = ( f ( − t ) ) ^ = F ( − u ) = − F ∗ ( u ) . F(u) = (f(t))^{\hat{}} = (f(-t))^{\hat{}} = F(-u) = -F^*(u). F(u)=(f(t))^=(f(−t))^=F(−u)=−F∗(u).
-
F ( u ) = ( f ( t ) ) ^ = − ( f ( − t ) ) ^ = − F ( − u ) = F ∗ ( u ) . F(u) = (f(t))^{\hat{}} = -(f(-t))^{\hat{}} = -F(-u) = F^*(u). F(u)=(f(t))^=−(f(−t))^=−F(−u)=F∗(u).
-
F ( u ) = ( f ( t ) ) ^ = ( f ( − t ) ) ^ = F ( − u ) . F(u) = (f(t))^{\hat{}} = (f(-t))^{\hat{}} = F(-u). F(u)=(f(t))^=(f(−t))^=F(−u).
-
F ( u ) = ( f ( t ) ) ^ = − ( f ( − t ) ) ^ = − F ( − u ) . F(u) = (f(t))^{\hat{}} = -(f(-t))^{\hat{}} = -F(-u). F(u)=(f(t))^=−(f(−t))^=−F(−u).
卷积
这里特别说明离散卷积的一个重要性质:
注意到
h
⋆
f
(
n
)
=
∑
k
=
0
N
−
1
h
(
n
−
k
)
f
(
k
)
=
a
n
T
f
,
a
(
n
)
=
[
h
(
0
)
,
h
(
n
−
1
)
,
⋯
,
h
(
n
−
N
+
1
)
]
,
h \star f (n) = \sum_{k=0}^{N-1} h(n-k) f(k) = a^T_n f, \\ a(n) = [h(0), h(n-1), \cdots, h(n-N+1)],
h⋆f(n)=k=0∑N−1h(n−k)f(k)=anTf,a(n)=[h(0),h(n−1),⋯,h(n−N+1)],
则
A
=
[
a
0
,
a
1
,
⋯
,
a
N
−
1
]
=
[
h
(
0
)
h
(
1
)
⋯
h
(
N
−
1
)
h
(
−
1
)
h
(
0
)
⋯
h
(
N
−
2
)
⋮
⋮
⋱
⋮
h
(
1
−
N
)
h
(
2
−
N
)
⋯
h
(
0
)
,
]
[
h
⋆
f
]
=
A
T
f
.
A = [a_0, a_1, \cdots, a_{N-1}] = \left [ \begin{array}{cccc} h(0) & h(1) &\cdots & h(N-1) \\ h(-1) & h(0) & \cdots & h(N-2)\\ \vdots & \vdots & \ddots & \vdots \\ h(1-N) & h(2-N) & \cdots & h(0), \end{array} \right ] [h \star f] = A^T f.
A=[a0,a1,⋯,aN−1]=⎣⎢⎢⎢⎡h(0)h(−1)⋮h(1−N)h(1)h(0)⋮h(2−N)⋯⋯⋱⋯h(N−1)h(N−2)⋮h(0),⎦⎥⎥⎥⎤[h⋆f]=ATf.
定义
h
′
(
n
)
=
h
(
−
n
)
,
h'(n) = h(-n),
h′(n)=h(−n),
则有
[
h
′
⋆
f
]
=
A
f
.
[h' \star f] = Af.
[h′⋆f]=Af.
FFT
考虑离散傅里叶变换:
F
m
=
∑
n
=
0
N
−
1
f
n
e
−
j
2
π
n
m
/
N
,
m
=
0
,
1
,
⋯
,
N
−
1.
F_m = \sum_{n=0}^{N-1} f_n e^{-j2\pi nm/N}, m=0,1,\cdots, N-1.
Fm=n=0∑N−1fne−j2πnm/N,m=0,1,⋯,N−1.
每次计算包含 N N N个乘法, 故傅里叶变换的计算量是 N 2 N^2 N2级别的.
下面假设
N
=
P
∗
Q
,
P
,
Q
∈
N
+
N = P * Q, P, Q \in \mathbb{N}^+
N=P∗Q,P,Q∈N+, 则
m
=
u
Q
+
v
,
u
=
0
,
1
,
⋯
,
P
−
1
,
v
=
0
,
1
,
⋯
,
Q
−
1
,
n
=
s
P
+
t
,
s
=
0
,
1
,
⋯
,
Q
−
1
,
t
=
0
,
1
,
⋯
,
P
−
1.
m = uQ + v, \quad u=0,1,\cdots, P-1, v=0,1,\cdots, Q-1, \\ n = sP + t, \quad s=0,1,\cdots, Q-1, t=0,1,\cdots, P-1. \\
m=uQ+v,u=0,1,⋯,P−1,v=0,1,⋯,Q−1,n=sP+t,s=0,1,⋯,Q−1,t=0,1,⋯,P−1.
注意到:
n
m
=
(
s
P
+
t
)
(
u
Q
+
v
)
=
s
u
N
+
s
v
P
+
t
m
.
nm = (sP + t)(uQ + v) = su N + svP + tm.
nm=(sP+t)(uQ+v)=suN+svP+tm.
此时,
m
,
n
m, n
m,n与唯一的
(
u
,
v
)
,
(
s
,
t
)
(u,v), (s, t)
(u,v),(s,t)匹配, 则傅里叶变换可以表示为:
KaTeX parse error: No such environment: align at position 8: \begin{̲a̲l̲i̲g̲n̲}̲ F_m &= \sum_{n…
令
F
v
t
:
=
∑
s
=
0
Q
−
1
f
s
P
+
t
e
−
j
2
π
s
v
/
Q
,
v
=
0
,
1
,
⋯
,
Q
−
1
,
t
=
0
,
1
,
⋯
,
P
−
1.
F_v^t := \sum_{s=0}^{Q-1} f_{sP+t} e^{-j2\pi sv /Q}, \quad v = 0,1, \cdots, Q-1, t=0,1,\cdots, P-1.
Fvt:=s=0∑Q−1fsP+te−j2πsv/Q,v=0,1,⋯,Q−1,t=0,1,⋯,P−1.
显然总共需要
Q
N
QN
QN次乘法, 而
F
m
=
∑
t
=
0
P
−
1
e
−
j
2
π
t
m
/
N
F
v
t
,
m
=
0
,
1
,
⋯
,
N
−
1
,
F
u
Q
+
v
=
∑
t
=
0
P
−
1
e
−
j
2
π
t
v
/
N
F
v
t
e
−
j
2
π
t
u
/
P
.
F_m = \sum_{t=0}^{P-1} e^{-j2\pi tm / N} F_v^t, \quad m=0,1,\cdots, N-1, \\ F_{uQ+v} = \sum_{t=0}^{P-1} e^{-j2\pi tv /N}F_v^t e^{-j2\pi tu / P} .
Fm=t=0∑P−1e−j2πtm/NFvt,m=0,1,⋯,N−1,FuQ+v=t=0∑P−1e−j2πtv/NFvte−j2πtu/P.
总共有
P
N
PN
PN次乘法, 故总共有
(
P
+
Q
)
N
(P+Q) N
(P+Q)N次乘法运算.
由于每个
F
t
F^t
Ft都是一个独立的傅里叶变换过程, 故倘若
Q
Q
Q能够进一步分解, 计算量可以进一步降低.
甚至, 若假设
N
=
P
J
N = P^J
N=PJ, 则可以证明最后的计算量可以分解为
P
J
N
=
P
N
log
P
N
,
PJN = P N\log_P N,
PJN=PNlogPN,
特别的, 常常
N
=
2
J
N=2^J
N=2J, 则计算量是
N
log
2
N
N\log_2 N
Nlog2N量级的.
注: 卷积运算 [ f ⋆ g ] n , n = 0 , ⋯ , N − 1 [f\star g]_n, n=0,\cdots, N-1 [f⋆g]n,n=0,⋯,N−1, 计算量也是 N 2 N^2 N2级别的, 但是通过FFT, 应当是 ( P N log P + 1 ) N (PN\log_P + 1)N (PNlogP+1)N乘法次数, 也是可以降低计算量的.
逆傅里叶变换实际上就是
F
∗
^
∗
=
[
∑
m
=
0
N
−
1
F
m
∗
e
−
j
2
π
m
n
/
N
]
∗
,
\hat{F^*}^* = [\sum_{m=0}^{N-1} F_m^* e^{-j2\pi mn/N}]^*,
F∗^∗=[m=0∑N−1Fm∗e−j2πmn/N]∗,
虽然下面的代码我并没有采取这种策略.
from typing import Iterable, Union
import numpy as np
def factorization(N: int):
for P in range(2, N + 1):
if N % P is 0:
return P
def dft(arr: Iterable, m: int):
N = len(arr)
basis = np.arange(N) * m * 2 * np.pi * 1j * -1
basis = np.exp(basis / N)
return arr @ basis
def idft(arr: Iterable, m: int):
N = len(arr)
basis = np.arange(N) * m * 2 * np.pi * 1j
basis = np.exp(basis / N) / N
return arr @ basis
def basis_dft(N: int):
basis = np.outer(np.arange(N), np.arange(N))
basis = basis * 2 * np.pi * 1j * -1
return np.exp(basis / N)
def basis_idft(N: int):
basis = np.outer(np.arange(N), np.arange(N))
basis = basis * 2 * np.pi * 1j
return np.exp(basis / N) / N
def fft(arr: Iterable) -> np.ndarray:
N = len(arr)
P = factorization(N)
if P is N:
return arr @ basis_dft(N)
Q = N // P
Fvt = np.array([fft(arr[t::P]) for t in range(P)]).T # Q x P
dummy = np.outer(np.arange(Q), np.arange(P))
dummy = np.exp((dummy * 2 * np.pi * 1j * -1) / N)
Fvt_ext = Fvt * dummy
return (Fvt_ext @ basis_dft(P)).T.flatten()
def ifft(arr: Iterable) -> np.ndarray:
N = len(arr)
P = factorization(N)
if P is N:
return arr @ basis_idft(N)
Q = N // P
Fvt = np.array([ifft(arr[t::P]) for t in range(P)]).T # Q x P
dummy = np.outer(np.arange(Q), np.arange(P))
dummy = np.exp((dummy * 2 * np.pi * 1j) / N)
Fvt_ext = Fvt * dummy
return (Fvt_ext @ basis_idft(P)).T.flatten()