我是靠谱客的博主 默默西装,最近开发中收集的这篇文章主要介绍一维离散傅里叶变换(DFT)和逆变换(IDFT)公式的一种推导单独视角:DFT公式的推导单独视角:IDFT公式的推导综合视角:DFT, IDFT公式组的系数修正,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

索引

  • 单独视角:DFT公式的推导
  • 单独视角:IDFT公式的推导
  • 综合视角:DFT, IDFT公式组的系数修正

单独视角:DFT公式的推导

  由博文一维连续傅里叶变换和逆变换公式的一种推导,设 f ( t ) fleft( t right) f(t)是一个连续的时间信号,其一维连续Fourier变换可取为
F ( u ) = ∫ − ∞ ∞ f ( t ) e − j 2 π u t d t Fleft( u right)=int_{-infty }^{infty }{fleft( t right){{e}^{-j2pi ut}}dt} F(u)=f(t)ej2πutdt

步骤一
  从某一时刻(记为 0 0 0时刻)开始,每经过时间间隔 Δ T Delta T ΔT就对连续函数 f ( t ) fleft( t right) f(t)采样一次,共采样 N N N次。对连续函数 f ( t ) fleft( t right) f(t)等间隔采样就得到一个离散序列
f ( Δ T ) , f ( 2 Δ T ) , ⋯   , f ( N Δ T ) fleft( Delta T right),fleft( 2Delta T right),cdots ,fleft( NDelta T right) f(ΔT),f(2ΔT),,f(NΔT)
记为
f ⌢ ( 0 ) ,   f ⌢ ( 1 ) ,   ⋯   ,   f ⌢ ( N − 1 ) oversetfrown{f}left( 0 right),text{ }oversetfrown{f}left( 1 right),text{ }cdots ,text{ }oversetfrown{f}left( N-1 right) f(0), f(1), , f(N1)
而对于其他没采样到的点,即 ∀ t ∉ { Δ T ,   2 Δ T , ⋯ N Δ T } forall tnotin left{ Delta T,text{ }2Delta T,cdots NDelta T right} t/{ΔT, 2ΔT,NΔT},视该点处采样的函数值
f ( t ) = 0 fleft( t right)=0 f(t)=0

步骤二
  将一维连续Fourier变换公式进行拆解
F ( u ) = ∫ − ∞ ∞ f ( t ) e − j 2 π u t d t = ∫ − ∞ 0 + ∫ 0 N Δ T + ∫ N Δ T ∞ f ( t ) e − j 2 π u t d t = ∫ − ∞ 0 + ∫ N Δ T ∞ f ( t ) e − j 2 π u t d t + ∫ 0 N Δ T f ( t ) e − j 2 π u t d t = 0 + ∫ 0 N Δ T f ( t ) e − j 2 π u t d t = ∫ 0 N Δ T f ( t ) e − j 2 π u t d t = F 1 ( u ) begin{aligned} & Fleft( u right)=int_{-infty }^{infty }{fleft( t right){{e}^{-j2pi ut}}dt} \ & =int_{-infty }^{0}{+int_{0}^{NDelta T}{+int_{NDelta T}^{infty }{fleft( t right){{e}^{-j2pi ut}}dt}}} \ & =int_{-infty }^{0}{+int_{NDelta T}^{infty }{fleft( t right){{e}^{-j2pi ut}}dt}}+int_{0}^{NDelta T}{fleft( t right){{e}^{-j2pi ut}}dt} \ & =0+int_{0}^{NDelta T}{fleft( t right){{e}^{-j2pi ut}}dt} \ & =int_{0}^{NDelta T}{fleft( t right){{e}^{-j2pi ut}}dt} \ & ={{F}_{1}}left( u right) \ end{aligned} F(u)=f(t)ej2πutdt=0+0NΔT+NΔTf(t)ej2πutdt=0+NΔTf(t)ej2πutdt+0NΔTf(t)ej2πutdt=0+0NΔTf(t)ej2πutdt=0NΔTf(t)ej2πutdt=F1(u)

步骤三
  将 F 1 ( u ) {{F}_{1}}left( u right) F1(u)转换为黎曼和形式 F 2 ( u ) {{F}_{2}}left( u right) F2(u),具体地说,把区间 [ 0 , N Δ T ] left[ 0,NDelta T right] [0,NΔT]等间隔分成 N N N份,第 i i i个区间 k i = [ ( i − 1 ) Δ T , i Δ T ] {{k}_{i}}=left[ left( i-1 right)Delta T,iDelta T right] ki=[(i1)ΔT,iΔT] i = 1 , 2 , ⋯   , N i=1,2,cdots ,N i=1,2,,N,每个区间长度为 Δ T Delta T ΔT。在每个区间 k i {{k}_{i}} ki上取右端点的函数值 f ( i Δ T ) e − j 2 π u ⋅ ( i Δ T ) fleft( iDelta T right){{e}^{-j2pi ucenterdot left( iDelta T right)}} f(iΔT)ej2πu(iΔT)
F 2 ( u ) = ∑ i = 1 N [ f ( i Δ T ) e − j 2 π u ⋅ ( i Δ T ) ] ⋅ Δ T = ∑ n = 0 N − 1 [ f ( ( n + 1 ) Δ T ) e − j 2 π u ⋅ ( n + 1 ) Δ T ] ⋅ Δ T = ∑ n = 0 N − 1 [ f ⌢ ( n ) e − j 2 π u ⋅ ( n + 1 ) Δ T ] ⋅ Δ T begin{aligned} & {{F}_{2}}left( u right)=sumlimits_{i=1}^{N}{left[ fleft( iDelta T right){{e}^{-j2pi ucenterdot left( iDelta T right)}} right]centerdot Delta T} \ & =sumlimits_{n=0}^{N-1}{left[ fleft( left( n+1 right)Delta T right){{e}^{-j2pi ucenterdot left( n+1 right)Delta T}} right]centerdot Delta T} \ & =sumlimits_{n=0}^{N-1}{left[ oversetfrown{f}left( n right){{e}^{-j2pi ucenterdot left( n+1 right)Delta T}} right]centerdot Delta T} \ end{aligned} F2(u)=i=1N[f(iΔT)ej2πu(iΔT)]ΔT=n=0N1[f((n+1)ΔT)ej2πu(n+1)ΔT]ΔT=n=0N1[f(n)ej2πu(n+1)ΔT]ΔT

步骤四
  若规定采样开始点和结束点之间的时长是1个单位时间,即
N Δ T = 1 NDelta T=1 NΔT=1
则有
F 2 ( u ) = 1 N ∑ n = 0 N − 1 f ⌢ ( n ) e − j 2 π u n + 1 N ,   u = 0 , 1 , ⋯   , N − 1 {{F}_{2}}left( u right)=frac{1}{N}sumlimits_{n=0}^{N-1}{oversetfrown{f}left( n right){{e}^{-j2pi ufrac{n+1}{N}}}},text{ }u=0,1,cdots ,N-1 F2(u)=N1n=0N1f(n)ej2πuNn+1, u=0,1,,N1
这就可定义为DFT的一条公式。

其他形式
  在取相同的一维连续Fourier变换公式的基础上,更改步骤一如下。
步骤一
  从某一时刻(记为0时刻)开始,采样,然后经过时间间隔 Δ T Delta T ΔT才对 f ( t ) fleft( t right) f(t)采样一次,共采样 N N N次。采样最后一次时再过时间 Δ T Delta T ΔT才终止操作。对 f ( t ) fleft( t right) f(t)等间隔采样得到一个离散序列
f ( 0 ) ,   f ( Δ T ) ,   ⋯   ,   f ( ( N − 1 ) Δ T ) fleft( 0 right),text{ }fleft( Delta T right),text{ }cdots ,text{ }fleft( left( N-1 right)Delta T right) f(0), f(ΔT), , f((N1)ΔT)
记为
f ⌢ ( 0 ) ,   f ⌢ ( 1 ) ,   ⋯   ,   f ⌢ ( N − 1 ) oversetfrown{f}left( 0 right),text{ }oversetfrown{f}left( 1 right),text{ }cdots ,text{ }oversetfrown{f}left( N-1 right) f(0), f(1), , f(N1)

  原步骤二无需变动。

  原步骤三中只改动以下内容:在每个区间 k i = [ ( i − 1 ) Δ T ,   i Δ T ] {{k}_{i}}=left[ left( i-1 right)Delta T,text{ }iDelta T right] ki=[(i1)ΔT, iΔT]上取左端点的函数值 f ( ( i − 1 ) Δ T ) e − j 2 π u ⋅ ( i − 1 ) Δ T fleft( left( i-1 right)Delta T right){{e}^{-j2pi ucenterdot left( i-1 right)Delta T}} f((i1)ΔT)ej2πu(i1)ΔT

  在 N Δ T = 1 NDelta T=1 NΔT=1的限制下,就可以得到另一条公式
F 2 ( u ) = 1 N ∑ n = 0 N − 1 f ⌢ ( n ) e − j 2 π u n N ,   u = 0 , 1 , ⋯   , N − 1 {{F}_{2}}left( u right)=frac{1}{N}sumlimits_{n=0}^{N-1}{oversetfrown{f}left( n right){{e}^{-j2pi ufrac{n}{N}}}},text{ }u=0,1,cdots ,N-1 F2(u)=N1n=0N1f(n)ej2πuNn, u=0,1,,N1

单独视角:IDFT公式的推导

  由博文一维连续傅里叶变换和逆变换公式的一种推导,设 f ( t ) fleft( t right) f(t)是一个连续的时间信号,其一维连续Fourier逆变换可取为
f ( t ) = 1 2 ∫ − ∞ ∞ F ( u ) e j 2 π u t d u fleft( t right)=frac{1}{2}int_{-infty }^{infty }{Fleft( u right){{e}^{j2pi ut}}du} f(t)=21F(u)ej2πutdu

  与DFT公式推导过程相似,可以得到IDFT的公式
f ( n ) = 1 2 N ∑ u = 0 N − 1 F ⌢ ( u ) e j 2 π n u + 1 N ,   n = 0 , 1 , ⋯   , N − 1 fleft( n right)=frac{1}{2N}sumlimits_{u=0}^{N-1}{oversetfrown{F}left( u right){{e}^{j2pi nfrac{u+1}{N}}}},text{ }n=0,1,cdots ,N-1 f(n)=2N1u=0N1F(u)ej2πnNu+1, n=0,1,,N1

f ( n ) = 1 2 N ∑ u = 0 N − 1 F ⌢ ( u ) e j 2 π n u N ,   n = 0 , 1 , ⋯   , N − 1 fleft( n right)=frac{1}{2N}sumlimits_{u=0}^{N-1}{oversetfrown{F}left( u right){{e}^{j2pi nfrac{u}{N}}}},text{ }n=0,1,cdots ,N-1 f(n)=2N1u=0N1F(u)ej2πnNu, n=0,1,,N1

综合视角:DFT, IDFT公式组的系数修正

  为了实现 f ( t ) fleft( t right) f(t)进行DFT,得到的结果进行IDFT还是得到 f ( t ) fleft( t right) f(t),我们需要考虑DFT和IDFT公式的系数。令
F ( u ) = c ∑ n = 0 N − 1 f ( n ) e − j 2 π u n N ,   u = 0 , 1 , ⋯   , N − 1 f ( n ) = d ∑ u = 0 N − 1 F ( u ) e j 2 π u n N ,   n = 0 , 1 , ⋯   , N − 1 begin{aligned} & Fleft( u right)=csumlimits_{n=0}^{N-1}{fleft( n right){{e}^{-jfrac{2pi un}{N}}}},text{ }u=0,1,cdots ,N-1 \ & fleft( n right)=dsumlimits_{u=0}^{N-1}{Fleft( u right){{e}^{jfrac{2pi un}{N}}}},text{ }n=0,1,cdots ,N-1 \ end{aligned} F(u)=cn=0N1f(n)ejN2πun, u=0,1,,N1f(n)=du=0N1F(u)ejN2πun, n=0,1,,N1

F → = [ F ( 0 ) ,   F ( 1 ) ,   ⋯   ,   F ( n − 1 ) ] T f → = [ f ( 0 ) ,   f ( 1 ) ,   ⋯   ,   f ( n − 1 ) ] T begin{aligned} & overrightarrow{F}={{left[ Fleft( 0 right),text{ }Fleft( 1 right),text{ }cdots ,text{ }Fleft( n-1 right) right]}^{T}} \ & overrightarrow{f}={{left[ fleft( 0 right),text{ }fleft( 1 right),text{ }cdots ,text{ }fleft( n-1 right) right]}^{T}} \ end{aligned} F =[F(0), F(1), , F(n1)]Tf =[f(0), f(1), , f(n1)]T
则有
F → = A f → f → = B F → begin{aligned} & overrightarrow{F}=Aoverrightarrow{f} \ & overrightarrow{f}=Boverrightarrow{F} \ end{aligned} F =Af f =BF
其中
A N × N = c ( e − j 2 π N ⋅ 0 ⋅ 0 e − j 2 π N ⋅ 0 ⋅ 1 ⋯ e − j 2 π N ⋅ 0 ⋅ ( N − 1 ) e − j 2 π N ⋅ 1 ⋅ 0 e − j 2 π N ⋅ 1 ⋅ 1 ⋯ e − j 2 π N ⋅ 1 ⋅ ( N − 1 ) ⋮ ⋮ ⋱ ⋮ e − j 2 π N ⋅ ( N − 1 ) ⋅ 0 e − j 2 π N ⋅ ( N − 1 ) ⋅ 1 ⋯ e − j 2 π N ⋅ ( N − 1 ) ⋅ ( N − 1 ) ) B N × N = d ( e j 2 π N ⋅ 0 ⋅ 0 e j 2 π N ⋅ 0 ⋅ 1 ⋯ e j 2 π N ⋅ 0 ⋅ ( N − 1 ) e j 2 π N ⋅ 1 ⋅ 0 e j 2 π N ⋅ 1 ⋅ 1 ⋯ e j 2 π N ⋅ 1 ⋅ ( N − 1 ) ⋮ ⋮ ⋱ ⋮ e j 2 π N ⋅ ( N − 1 ) ⋅ 0 e j 2 π N ⋅ ( N − 1 ) ⋅ 1 ⋯ e j 2 π N ⋅ ( N − 1 ) ⋅ ( N − 1 ) ) begin{aligned} & {{A}_{Ntimes N}}=cleft( begin{matrix} {{e}^{-jfrac{2pi }{N}centerdot 0centerdot 0}} & {{e}^{-jfrac{2pi }{N}centerdot 0centerdot 1}} & cdots & {{e}^{-jfrac{2pi }{N}centerdot 0centerdot left( N-1 right)}} \ {{e}^{-jfrac{2pi }{N}centerdot 1centerdot 0}} & {{e}^{-jfrac{2pi }{N}centerdot 1centerdot 1}} & cdots & {{e}^{-jfrac{2pi }{N}centerdot 1centerdot left( N-1 right)}} \ vdots & vdots & ddots & vdots \ {{e}^{-jfrac{2pi }{N}centerdot left( N-1 right)centerdot 0}} & {{e}^{-jfrac{2pi }{N}centerdot left( N-1 right)centerdot 1}} & cdots & {{e}^{-jfrac{2pi }{N}centerdot left( N-1 right)centerdot left( N-1 right)}} \ end{matrix} right) \ & {{B}_{Ntimes N}}=dleft( begin{matrix} {{e}^{jfrac{2pi }{N}centerdot 0centerdot 0}} & {{e}^{jfrac{2pi }{N}centerdot 0centerdot 1}} & cdots & {{e}^{jfrac{2pi }{N}centerdot 0centerdot left( N-1 right)}} \ {{e}^{jfrac{2pi }{N}centerdot 1centerdot 0}} & {{e}^{jfrac{2pi }{N}centerdot 1centerdot 1}} & cdots & {{e}^{jfrac{2pi }{N}centerdot 1centerdot left( N-1 right)}} \ vdots & vdots & ddots & vdots \ {{e}^{jfrac{2pi }{N}centerdot left( N-1 right)centerdot 0}} & {{e}^{jfrac{2pi }{N}centerdot left( N-1 right)centerdot 1}} & cdots & {{e}^{jfrac{2pi }{N}centerdot left( N-1 right)centerdot left( N-1 right)}} \ end{matrix} right) \ end{aligned} AN×N=cejN2π00ejN2π10ejN2π(N1)0ejN2π01ejN2π11ejN2π(N1)1ejN2π0(N1)ejN2π1(N1)ejN2π(N1)(N1)BN×N=dejN2π00ejN2π10ejN2π(N1)0ejN2π01ejN2π11ejN2π(N1)1ejN2π0(N1)ejN2π1(N1)ejN2π(N1)(N1)
显然有
F → = A f → f → = B F → }   ⇒   F → = ( A B ) F → left. begin{aligned} & overrightarrow{F}=Aoverrightarrow{f} \ & overrightarrow{f}=Boverrightarrow{F} \ end{aligned} right}text{ }Rightarrow text{ }overrightarrow{F}=left( AB right)overrightarrow{F} F =Af f =BF   F =(AB)F
于是自然地想要令
  A B = I N × N ⇔ { ∀ k ∈ { 0 , 1 , ⋯   , N − 1 } ,   c d ∑ i = 0 N − 1 ( e − j 2 π N ⋅ i ⋅ k ⋅ e j 2 π N ⋅ i ⋅ k ) = c d N = 1 ∀ k 1 ≠ k 2 ,   c d ∑ i = 0 N − 1 ( e − j 2 π N ⋅ i ⋅ k 1 ⋅ e j 2 π N ⋅ i ⋅ k 2 ) = c d ∑ i = 0 N − 1 e j 2 π ( k 2 − k 1 ) N i = c d 1 − e j 2 π ( k 2 − k 1 ) N ⋅ N 1 − e j 2 π ( k 2 − k 1 ) N = 0 ⇔ c d = 1 N begin{aligned} & text{ }AB={{I}_{Ntimes N}} \ & Leftrightarrow left{ begin{aligned} & forall kin left{ 0,1,cdots ,N-1 right},text{ }cdsumlimits_{i=0}^{N-1}{left( {{e}^{-jfrac{2pi }{N}centerdot icenterdot k}}centerdot {{e}^{jfrac{2pi }{N}centerdot icenterdot k}} right)}=cdN=1 \ & forall {{k}_{1}}ne {{k}_{2}},text{ }cdsumlimits_{i=0}^{N-1}{left( {{e}^{-jfrac{2pi }{N}centerdot icenterdot {{k}_{1}}}}centerdot {{e}^{jfrac{2pi }{N}centerdot icenterdot {{k}_{2}}}} right)}=cdsumlimits_{i=0}^{N-1}{{{e}^{jfrac{2pi left( {{k}_{2}}-{{k}_{1}} right)}{N}i}}}=cdfrac{1-{{e}^{jfrac{2pi left( {{k}_{2}}-{{k}_{1}} right)}{N}centerdot N}}}{1-{{e}^{jfrac{2pi left( {{k}_{2}}-{{k}_{1}} right)}{N}}}}=0 \ end{aligned} right. \ & Leftrightarrow cd=frac{1}{N} \ end{aligned}  AB=IN×Nk{0,1,,N1}, cdi=0N1(ejN2πikejN2πik)=cdN=1k1=k2, cdi=0N1(ejN2πik1ejN2πik2)=cdi=0N1ejN2π(k2k1)i=cd1ejN2π(k2k1)1ejN2π(k2k1)N=0cd=N1

  因此最终我们得到DFT和IDFT的公式为
F ( u ) = c ∑ n = 0 N − 1 f ( n ) e − j 2 π u n N ,   u = 0 , 1 , ⋯   , N − 1 f ( n ) = d ∑ u = 0 N − 1 F ( u ) e j 2 π u n N ,   n = 0 , 1 , ⋯   , N − 1 c d = 1 N begin{matrix} Fleft( u right)=csumlimits_{n=0}^{N-1}{fleft( n right){{e}^{-jfrac{2pi un}{N}}}},text{ }u=0,1,cdots ,N-1 \ fleft( n right)=dsumlimits_{u=0}^{N-1}{Fleft( u right){{e}^{jfrac{2pi un}{N}}}},text{ }n=0,1,cdots ,N-1 \ cd=frac{1}{N} \ end{matrix} F(u)=cn=0N1f(n)ejN2πun, u=0,1,,N1f(n)=du=0N1F(u)ejN2πun, n=0,1,,N1cd=N1


  此外,我们指出,对称阵 A , B A,B A,B不可能为正交矩阵。事实上,有 A A T = B B T = O N × N ≠ I N × N A{{A}^{T}}=B{{B}^{T}}={{O}_{Ntimes N}}ne {{I}_{Ntimes N}} AAT=BBT=ON×N=IN×N
A A A为例子,计算 A A T A{{A}^{T}} AAT如下。
{ ∀ k ∈ { 0 , 1 , ⋯   , N − 1 } ,   c 2 ∑ i = 0 N − 1 ( e − j 2 π N ⋅ i ⋅ k ) 2 = c 2 ∑ i = 0 N − 1 e − j 4 π k N ⋅ i = c 2 1 − e − j 4 π k N ⋅ N 1 − e − j 4 π k N = 0 ∀ k 1 ≠ k 2 ,   c 2 ∑ i = 0 N − 1 ( e − j 2 π N ⋅ i ⋅ k 1 ) ( e − j 2 π N ⋅ i ⋅ k 2 ) = c 2 ∑ i = 0 N − 1 e − j 2 π ( k 1 + k 2 ) N ⋅ i = c 2 1 − e − j 2 π ( k 1 + k 2 ) N ⋅ N 1 − e − j 2 π ( k 1 + k 2 ) N = 0 ⇒   A A T = O N × N begin{aligned} & left{ begin{aligned} & forall kin left{ 0,1,cdots ,N-1 right},text{ }{{c}^{2}}sumlimits_{i=0}^{N-1}{{{left( {{e}^{-jfrac{2pi }{N}centerdot icenterdot k}} right)}^{2}}}={{c}^{2}}sumlimits_{i=0}^{N-1}{{{e}^{-jfrac{4pi k}{N}centerdot i}}}={{c}^{2}}frac{1-{{e}^{-jfrac{4pi k}{N}centerdot N}}}{1-{{e}^{-jfrac{4pi k}{N}}}}=0 \ & forall {{k}_{1}}ne {{k}_{2}},text{ }{{c}^{2}}sumlimits_{i=0}^{N-1}{left( {{e}^{-jfrac{2pi }{N}centerdot icenterdot {{k}_{1}}}} right)left( {{e}^{-jfrac{2pi }{N}centerdot icenterdot {{k}_{2}}}} right)}={{c}^{2}}sumlimits_{i=0}^{N-1}{{{e}^{-jfrac{2pi left( {{k}_{1}}+{{k}_{2}} right)}{N}centerdot i}}}={{c}^{2}}frac{1-{{e}^{-jfrac{2pi left( {{k}_{1}}+{{k}_{2}} right)}{N}centerdot N}}}{1-{{e}^{-jfrac{2pi left( {{k}_{1}}+{{k}_{2}} right)}{N}}}}=0 \ end{aligned} right. \ & \ & Rightarrow text{ }A{{A}^{T}}={{O}_{Ntimes N}} \ end{aligned} k{0,1,,N1}, c2i=0N1(ejN2πik)2=c2i=0N1ejN4πki=c21ejN4πk1ejN4πkN=0k1=k2, c2i=0N1(ejN2πik1)(ejN2πik2)=c2i=0N1ejN2π(k1+k2)i=c21ejN2π(k1+k2)1ejN2π(k1+k2)N=0 AAT=ON×N

最后

以上就是默默西装为你收集整理的一维离散傅里叶变换(DFT)和逆变换(IDFT)公式的一种推导单独视角:DFT公式的推导单独视角:IDFT公式的推导综合视角:DFT, IDFT公式组的系数修正的全部内容,希望文章能够帮你解决一维离散傅里叶变换(DFT)和逆变换(IDFT)公式的一种推导单独视角:DFT公式的推导单独视角:IDFT公式的推导综合视角:DFT, IDFT公式组的系数修正所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(38)

评论列表共有 0 条评论

立即
投稿
返回
顶部