Josh 的复习总结之数字信号处理(Part 3——离散傅里叶变换 DFT)

闲来无事编点程 同时被 2 个专栏收录
7 篇文章 1 订阅
7 篇文章 1 订阅


《Josh 的复习总结之数字信号处理》系列文章目录:

      Part 1——离散时间信号和系统分析基础
      Part 2——离散傅里叶级数 DFS
👉 Part 3——离散傅里叶变换 DFT
      Part 4——快速傅里叶变换 FFT
      Part 5——部分 FFT 蝶形图
      Part 6——数字滤波器的基本结构
      Part 7——数字滤波器设计


1. 离散傅里叶变换(Discrete Fourier Transform, DFT)的定义

  取离散傅里叶级数的主值,得离散傅里叶变换
X ( k ) = X ~ ( k ) R N ( k ) = ∑ n = 0 N − 1 x ( n ) W N k n ,    k = 0 , 1 , ⋯   , N − 1 X\left(k\right)=\widetilde{X}\left(k\right)R_N\left(k\right)=\sum_{n=0}^{N-1}{x\left(n\right)W_N^{kn}},\ \ k=0,1,\cdots,N-1 X(k)=X (k)RN(k)=n=0N1x(n)WNkn,  k=0,1,,N1 x ( n ) = x ~ ( n ) R N ( n ) = 1 N ∑ k = 0 N − 1 X ( k ) W N − k n ,    n = 0 , 1 , ⋯   , N − 1 x\left(n\right)=\widetilde{x}\left(n\right)R_N\left(n\right)=\frac{1}{N}\sum_{k=0}^{N-1}{X\left(k\right)W_N^{-kn}},\ \ n=0,1,\cdots,N-1 x(n)=x (n)RN(n)=N1k=0N1X(k)WNkn,  n=0,1,,N1 X ~ ( k ) = X ( ( k ) ) N , x ~ ( n ) = x ( ( n ) ) N \widetilde{X}\left(k\right)=X\left(\left(k\right)\right)_N,\widetilde{x}\left(n\right)=x\left(\left(n\right)\right)_N X (k)=X((k))N,x (n)=x((n))N。其中 R N ( n ) R_N\left(n\right) RN(n) 表示矩形序列,表示取主值; ( ( n ) ) N \left(\left(n\right)\right)_N ((n))N 表示 n n n N N N 取余。

注:不同教材中取主值、取余的符号表述可能不同。


2. DFT 的矩阵算法

  若令 X = [ X ( 0 ) X ( 1 ) ⋯ X ( N − 1 ) ] T , x = [ x ( 0 ) x ( 1 ) ⋯ x ( N − 1 ) ] T X=\left[\begin{matrix}X\left(0\right)&X\left(1\right)&\cdots&X\left(N-1\right)\\\end{matrix}\right]^\mathrm{T},x=\left[\begin{matrix}x\left(0\right)&x\left(1\right)&\cdots&x\left(N-1\right)\\\end{matrix}\right]^\mathrm{T} X=[X(0)X(1)X(N1)]Tx=[x(0)x(1)x(N1)]T,则 DFT 和 IDFT 可分别表示为
X = D N x ,    x = D N − 1 X X=D_Nx,\ \ x=D_N^{-1}X X=DNx,  x=DN1X其中 Vandermonde 矩阵
D N = [ 1 1 1 ⋯ 1 1 W N 1 W N 2 ⋯ W N ( N − 1 ) 1 W N 2 W N 4 ⋯ W N 2 ( N − 1 ) ⋮ ⋮ ⋮ ⋮ 1 W N ( N − 1 ) W N 2 ( N − 1 ) ⋯ W N ( N − 1 ) 2 ] D_N=\left[\begin{matrix}1&1&1&\cdots&1\\1&W_N^1&W_N^2&\cdots&W_N^{\left(N-1\right)}\\1&W_N^2&W_N^4&\cdots&W_N^{2\left(N-1\right)}\\\vdots&\vdots&\vdots&&\vdots\\1&W_N^{\left(N-1\right)}&W_N^{2\left(N-1\right)}&\cdots&W_N^{\left(N-1\right)^2}\\\end{matrix}\right] DN=11111WN1WN2WN(N1)1WN2WN4WN2(N1)1WN(N1)WN2(N1)WN(N1)2 D N − 1 = 1 N [ 1 1 1 ⋯ 1 1 W N − 1 W N − 2 ⋯ W N − ( N − 1 ) 1 W N − 2 W N − 4 ⋯ W N − 2 ( N − 1 ) ⋮ ⋮ ⋮ ⋮ 1 W N − ( N − 1 ) W N − 2 ( N − 1 ) ⋯ W N − ( N − 1 ) 2 ] D_N^{-1}=\frac{1}{N}\left[\begin{matrix}1&1&1&\cdots&1\\1&W_N^{-1}&W_N^{-2}&\cdots&W_N^{-\left(N-1\right)}\\1&W_N^{-2}&W_N^{-4}&\cdots&W_N^{-2\left(N-1\right)}\\\vdots&\vdots&\vdots&&\vdots\\1&W_N^{-\left(N-1\right)}&W_N^{-2\left(N-1\right)}&\cdots&W_N^{-\left(N-1\right)^2}\\\end{matrix}\right] DN1=N111111WN1WN2WN(N1)1WN2WN4WN2(N1)1WN(N1)WN2(N1)WN(N1)2且有 D N − 1 = 1 N D N ∗ D_N^{-1}=\dfrac{1}{N}D_N^\ast DN1=N1DN


3. 离散傅里叶变换(DFT)的性质

3.1 线性性质

D F T [ a x 1 ( n ) + b x 2 ( n ) ] = a X 1 ( k ) + b X 2 ( k ) \mathrm{DFT}\left[ax_1\left(n\right)+{bx}_2\left(n\right)\right]=aX_1\left(k\right)+bX_2\left(k\right) DFT[ax1(n)+bx2(n)]=aX1(k)+bX2(k)

3.2 用正变换计算逆变换

x ( n ) = 1 N [ ∑ k = 0 N − 1 X ∗ ( k ) W N n k ] ∗ ,    n = 0 , 1 , ⋯   , N − 1 x\left(n\right)=\frac{1}{N}\left[\sum_{k=0}^{N-1}{X^\ast\left(k\right)W_N^{nk}}\right]^\ast,\ \ n=0,1,\cdots,N-1 x(n)=N1[k=0N1X(k)WNnk],  n=0,1,,N1证明:
1 N [ ∑ k = 0 N − 1 X ∗ ( k ) W N n k ] ∗ = 1 N [ ∑ k = 0 N − 1 X ( k ) W N − n k ] = x ( n ) \frac{1}{N}\left[\sum_{k=0}^{N-1}{X^\ast\left(k\right)W_N^{nk}}\right]^\ast=\frac{1}{N}\left[\sum_{k=0}^{N-1}{X\left(k\right)W_N^{-nk}}\right]=x\left(n\right) N1[k=0N1X(k)WNnk]=N1[k=0N1X(k)WNnk]=x(n)

3.3 对称定理

D F T [ 1 N X ( n ) ] = x ( − k ) = x ( N − k ) \mathrm{DFT}\left[\frac{1}{N}X\left(n\right)\right]=x\left(-k\right)=x\left(N-k\right) DFT[N1X(n)]=x(k)=x(Nk)证明:
x ( − n ) = x ( N − n ) = 1 N ∑ k = 0 N − 1 X ( k ) W N − ( N − n ) k = 1 N ∑ k = 0 N − 1 X ( k ) W N n k ⟹ x ( − k ) = x ( N − k ) = ∑ n = 0 N − 1 [ X ( n ) N ] W N k n = D F T [ X ( n ) N ] \begin{aligned} &x\left(-n\right)=x\left(N-n\right)=\frac{1}{N}\sum_{k=0}^{N-1}{X\left(k\right)W_N^{-\left(N-n\right)k}}=\frac{1}{N}\sum_{k=0}^{N-1}{X\left(k\right)W_N^{nk}} \\ \Longrightarrow &x\left(-k\right)=x\left(N-k\right)=\sum_{n=0}^{N-1}{\left[\frac{X\left(n\right)}{N}\right]W_N^{kn}}=\mathrm{DFT}\left[\frac{X\left(n\right)}{N}\right] \end{aligned} x(n)=x(Nn)=N1k=0N1X(k)WN(Nn)k=N1k=0N1X(k)WNnkx(k)=x(Nk)=n=0N1[NX(n)]WNkn=DFT[NX(n)]

3.4 反转定理

D F T [ x ( − n ) ] = X ( − k ) \mathrm{DFT}\left[x\left(-n\right)\right]=X\left(-k\right) DFT[x(n)]=X(k)证明:
D F T [ x ( − n ) ] = ∑ n = 0 N − 1 x ( − n ) W N n k = 令 m = − n ∑ m = − ( N − 1 ) 0 x ( m ) W N − m k = ∑ m = 0 N − 1 x ( m ) W N m ⋅ ( − k ) = X ( − k ) \mathrm{DFT}\left[x\left(-n\right)\right]=\sum_{n=0}^{N-1}{x\left(-n\right)W_N^{nk}}\xlongequal{令m=-n}\sum_{m=-\left(N-1\right)}^{0}{x\left(m\right)W_N^{-mk}}=\sum_{m=0}^{N-1}{x\left(m\right)W_N^{m\cdot\left(-k\right)}}=X\left(-k\right) DFT[x(n)]=n=0N1x(n)WNnkm=n m=(N1)0x(m)WNmk=m=0N1x(m)WNm(k)=X(k)

3.5 序列的总和

∑ n = 0 N − 1 x ( n ) = ∑ n = 0 N − 1 x ( n ) W N k n ∣ k = 0 = X ( k ) ∣ k = 0 = X ( 0 ) \sum_{n=0}^{N-1}x\left(n\right)=\left.\sum_{n=0}^{N-1}{x\left(n\right)W_N^{kn}}\right|_{k=0}\left.=X\left(k\right)\right|_{k=0}=X\left(0\right) n=0N1x(n)=n=0N1x(n)WNknk=0=X(k)k=0=X(0)

3.6 序列的起始值

x ( 0 ) = 1 N ∑ k = 0 N − 1 X ( k ) W N − k n ∣ n = 0 = 1 N ∑ k = 0 N − 1 X ( k ) x\left(0\right)=\frac{1}{N}\left.\sum_{k=0}^{N-1}{X\left(k\right)W_N^{-kn}}\right|_{n=0}=\frac{1}{N}\sum_{k=0}^{N-1}X\left(k\right) x(0)=N1k=0N1X(k)WNknn=0=N1k=0N1X(k)

3.7 延长序列的 DFT

  将 N N N 点长序列 x ( n ) ( n = 1 , 2 , ⋯   , N − 1 ) x\left(n\right)\left(n=1,2,\cdots,N-1\right) x(n)(n=1,2,,N1) 补零延长 r N rN rN 点得到序列 g ( n ) g\left(n\right) g(n),即
g ( n ) = { x ( n ) , n = 0 , 1 , ⋯ , N − 1 0 , n = N , N + 1 , ⋯ r N − 1 g\left(n\right)= \begin{aligned} \begin{cases} x(n),&n=0,1,⋯,N-1\\ 0,&n=N,N+1,⋯rN-1 \end{cases} \end{aligned} g(n)={x(n),0,n=0,1,,N1n=N,N+1,rN1 g ( n ) g\left(n\right) g(n) 的DFT
G ( k ) = D F T [ g ( n ) ] = ∑ n = 0 r N − 1 g ( n ) e − j 2 π n k r N = ∑ n = 0 N − 1 g ( n ) e − j 2 π n ( k r ) N = X ( k r ) ,    k = 0 , 1 , ⋯   , r N − 1   \begin{aligned} G\left(k\right)&=\mathrm{DFT}\left[g\left(n\right)\right]=\sum_{n=0}^{rN-1}{g\left(n\right)e^{-j\frac{2\pi nk}{rN}}}=\sum_{n=0}^{N-1}{g\left(n\right)e^{-j\frac{2\pi n\left(\frac{k}{r}\right)}{N}}} \\ &=X\left(\frac{k}{r}\right),\ \ k=0,1,\cdots,rN-1\ \end{aligned} G(k)=DFT[g(n)]=n=0rN1g(n)ejrN2πnk=n=0N1g(n)ejN2πn(rk)=X(rk),  k=0,1,,rN1 由此, G ( k ) G\left(k\right) G(k) X ( k ) X\left(k\right ) X(k)具有相同的形状,但 G ( k ) G\left(k\right) G(k) 的频谱间隔比 X ( k ) X\left(k\right) X(k) 的小。即通过补零,频谱变得更加细致。但是补零不能提高频谱分辨能力。

3.8 有限长序列的圆周特性

3.8.1 圆周移位(周期化→移位→取主值)

x ( ( n − m ) ) N R N ( n ) = { x ( n − m ) , m ⩽ n ⩽ N − 1 x ( N − m + n ) , 0 ⩽ n ⩽ m x\left(\left(n-m\right)\right)_NR_N\left(n\right)= \begin{aligned} \begin{cases} x\left(n-m\right),&m\leqslant n\leqslant N-1 \\ x\left(N-m+n\right),&0\leqslant n\leqslant m \end{cases} \end{aligned} x((nm))NRN(n)={x(nm),x(Nm+n),mnN10nm

3.9.2 圆周反转(周期化→反转→取主值)

x ( ( − n ) ) N R N ( n ) = { x ( 0 ) , n = 0 x ( N − n ) , 1 ⩽ n ⩽ N − 1 x\left(\left(-n\right)\right)_NR_N\left(n\right)= \begin{aligned} \begin{cases} x\left(0\right),&n=0 \\ x\left(N-n\right),&1\leqslant n\leqslant N-1 \end{cases} \end{aligned} x((n))NRN(n)={x(0),x(Nn),n=01nN1

3.8.3 有限长序列的时间圆周移位定理(可以通过 DFS 证明)

D F T [ x ( ( n + m ) ) N R N ( n ) ] = W N − m k X ( k ) \mathrm{DFT}\left[x\left(\left(n+m\right)\right)_NR_N\left(n\right)\right]=W_N^{-mk}X\left(k\right) DFT[x((n+m))NRN(n)]=WNmkX(k)由此,有限长序列的圆周移位导致频谱线性相移,而对频谱幅度无影响

3.8.4 限长序列的频率圆周移位定理(调制特性,可以通过 DFS 证明)

I D F T [ X ( ( k + l ) ) N R N ( k ) ] = W N n l x ( n ) = e − j 2 π N n l x ( n ) \mathrm{IDFT}\left[X\left(\left(k+l\right)\right)_NR_N\left(k\right)\right]=W_N^{nl}x\left(n\right)=e^{-j\frac{2\pi}{N}nl}x\left(n\right) IDFT[X((k+l))NRN(k)]=WNnlx(n)=ejN2πnlx(n)由此,时域序列的调制等效于频域的圆周移位,且可以推得
D F T [ x ( n ) cos ⁡ ( 2 π n l N ) ] = 1 2 [ X ( ( k − l ) ) N + X ( ( k + l ) ) N ] R N ( k ) \mathrm{DFT}\left[x\left(n\right)\cos{\left(\frac{2\pi nl}{N}\right)}\right]=\frac{1}{2}\left[X\left(\left(k-l\right)\right)_N+X\left(\left(k+l\right)\right)_N\right]R_N\left(k\right) DFT[x(n)cos(N2πnl)]=21[X((kl))N+X((k+l))N]RN(k) D F T [ x ( n ) sin ⁡ ( 2 π n l N ) ] = 1 2 [ X ( ( k − l ) ) N − X ( ( k + l ) ) N ] R N ( k ) \mathrm{DFT}\left[x\left(n\right)\sin{\left(\frac{2\pi nl}{N}\right)}\right]=\frac{1}{2}\left[X\left(\left(k-l\right)\right)_N-X\left(\left(k+l\right)\right)_N\right]R_N\left(k\right) DFT[x(n)sin(N2πnl)]=21[X((kl))NX((k+l))N]RN(k)

3.8.5 DFT的圆周对称性

3.8.5.1 奇序列和偶序列的 DFT

奇序列的 DFT
x ( n ) = − x ( − n ) = − x ( ( − n ) ) N R N ( n ) → X ( k ) = − X ( − k ) = − X ( ( N − k ) ) N R N ( k ) x\left(n\right)=-x\left(-n\right)=-x\left(\left(-n\right)\right)_NR_N\left(n\right)\rightarrow X\left(k\right)=-X\left(-k\right)=-X\left(\left(N-k\right)\right)_NR_N\left(k\right) x(n)=x(n)=x((n))NRN(n)X(k)=X(k)=X((Nk))NRN(k)偶序列的 DFT
x ( n ) = x ( − n ) = x ( ( − n ) ) N R N ( n ) → X ( k ) = X ( − k ) = X ( ( N − k ) ) N R N ( k ) x\left(n\right)=x\left(-n\right)=x\left(\left(-n\right)\right)_NR_N\left(n\right)\rightarrow X\left(k\right)=X\left(-k\right)=X\left(\left(N-k\right)\right)_NR_N\left(k\right) x(n)=x(n)=x((n))NRN(n)X(k)=X(k)=X((Nk))NRN(k)

3.8.5.2 序列的对称分解

  普通序列 x ( n ) x\left(n\right) x(n) 的共轭对称分量和共轭反对称分量分别为
x e ( n ) = 1 2 [ x ( n ) + x ∗ ( − n ) ] ,    x o ( n ) = 1 2 [ x ( n ) − x ∗ ( − n ) ] x_e\left(n\right)=\frac{1}{2}\left[x\left(n\right)+x^\ast\left(-n\right)\right],\ \ x_o\left(n\right)=\frac{1}{2}\left[x\left(n\right)-x^\ast\left(-n\right)\right] xe(n)=21[x(n)+x(n)],  xo(n)=21[x(n)x(n)]对有限长序列的 DFT 进行分析时,定义周期共轭对称分量和周期共轭反对称分量分别为
x e p ( n ) = 1 2 [ x ( ( n ) ) N + x ∗ ( ( − n ) ) N ] R N ( n ) = 1 2 [ x ( n ) + x ∗ ( N − n ) ] x_{ep}\left(n\right)=\frac{1}{2}\left[x\left(\left(n\right)\right)_N+x^\ast\left(\left(-n\right)\right)_N\right]R_N\left(n\right)=\frac{1}{2}\left[x\left(n\right)+x^\ast\left(N-n\right)\right] xep(n)=21[x((n))N+x((n))N]RN(n)=21[x(n)+x(Nn)] x o p ( n ) = 1 2 [ x ( ( n ) ) N − x ∗ ( ( − n ) ) N ] R N ( n ) = 1 2 [ x ( n ) − x ∗ ( N − n ) ] x_{op}\left(n\right)=\frac{1}{2}\left[x\left(\left(n\right)\right)_N-x^\ast\left(\left(-n\right)\right)_N\right]R_N\left(n\right)=\frac{1}{2}\left[x\left(n\right)-x^\ast\left(N-n\right)\right] xop(n)=21[x((n))Nx((n))N]RN(n)=21[x(n)x(Nn)]二者关系为
x e p ( n ) = [ x e ( n ) + x e ( n − N ) ] R N ( n ) ,    x o p ( n ) = [ x o ( n ) + x o ( n − N ) ] R N ( n ) x_{ep}\left(n\right)=\left[x_e\left(n\right)+x_e\left(n-N\right)\right]R_N\left(n\right),\ \ x_{op}\left(n\right)=\left[x_o\left(n\right)+x_o\left(n-N\right)\right]R_N\left(n\right) xep(n)=[xe(n)+xe(nN)]RN(n),  xop(n)=[xo(n)+xo(nN)]RN(n)

3.8.5.3 共轭复序列的 DFT

D F T [ x ∗ ( n ) ] = X ∗ ( ( N − k ) ) N \mathrm{DFT}\left[x^\ast\left(n\right)\right]=X^\ast\left(\left(N-k\right)\right)_N DFT[x(n)]=X((Nk))N D F T [ x ∗ ( − n ) ] = X ∗ ( k ) \mathrm{DFT}\left[x^\ast\left(-n\right)\right]=X^\ast\left(k\right) DFT[x(n)]=X(k)证明:
D F T [ x ∗ ( n ) ] = ∑ n = 0 N − 1 x ∗ ( n ) W N k n = [ ∑ n = 0 N − 1 x ( n ) W N − k n ] ∗ = X ∗ ( − k ) = X ∗ ( ( N − k ) ) N \mathrm{DFT}\left[x^\ast\left(n\right)\right]=\sum_{n=0}^{N-1}{x^\ast\left(n\right)W_N^{kn}}=\left[\sum_{n=0}^{N-1}{x\left(n\right)W_N^{-kn}}\right]^\ast=X^\ast\left(-k\right)=X^\ast\left(\left(N-k\right)\right)_N DFT[x(n)]=n=0N1x(n)WNkn=[n=0N1x(n)WNkn]=X(k)=X((Nk))N D F T [ x ∗ ( − n ) ] = ∑ n = 0 N − 1 x ∗ ( − n ) W N k n = [ ∑ n = 0 N − 1 x ( − n ) W N − k n ] ∗ = [ ∑ m = − N + 1 0 x ( m ) W N k m ] ∗ = [ ∑ n = 0 N − 1 x ( n ) W N k n ] ∗ = X ∗ ( k ) \begin{aligned} \mathrm{DFT}\left[x^\ast\left(-n\right)\right]&=\sum_{n=0}^{N-1}{x^\ast\left(-n\right)W_N^{kn}}=\left[\sum_{n=0}^{N-1}{x\left(-n\right)W_N^{-kn}}\right]^\ast \\ &=\left[\sum_{m=-N+1}^{0}{x\left(m\right)W_N^{km}}\right]^\ast=\left[\sum_{n=0}^{N-1}{x\left(n\right)W_N^{kn}}\right]^\ast=X^\ast\left(k\right) \end{aligned} DFT[x(n)]=n=0N1x(n)WNkn=[n=0N1x(n)WNkn]=[m=N+10x(m)WNkm]=[n=0N1x(n)WNkn]=X(k)

3.8.5.4 复数序列的 DFT

x ( n ) = x r ( n ) + j x i ( n ) x\left(n\right)=x_r\left(n\right)+jx_i\left(n\right) x(n)=xr(n)+jxi(n) ↕ ↕ \quad\quad\quad\updownarrow\qquad\quad \updownarrow X ( k ) = X e p ( k ) + X o p ( k ) X\left(k\right)=X_{ep}\left(k\right)+X_{op}\left(k\right) X(k)=Xep(k)+Xop(k)证明:
X e p ( k ) = D F T [ x r ( n ) ] = 1 2 D F T [ x ( n ) + x ∗ ( n ) ] = 1 2 [ X ( k ) + X ∗ ( N − k ) ] X_{ep}\left(k\right)=\mathrm{DFT}\left[x_r\left(n\right)\right]=\frac{1}{2}\mathrm{DFT}\left[x\left(n\right)+x^\ast\left(n\right)\right]=\frac{1}{2}\left[X\left(k\right)+X^\ast\left(N-k\right)\right] Xep(k)=DFT[xr(n)]=21DFT[x(n)+x(n)]=21[X(k)+X(Nk)] X o p ( k ) = D F T [ j x i ( n ) ] = 1 2 D F T [ x ( n ) − x ∗ ( n ) ] = 1 2 [ X ( k ) + X ∗ ( N − k ) ] X_{op}\left(k\right)=\mathrm{DFT}\left[{jx}_i\left(n\right)\right]=\frac{1}{2}\mathrm{DFT}\left[x\left(n\right)-x^\ast\left(n\right)\right]=\frac{1}{2}\left[X\left(k\right)+X^\ast\left(N-k\right)\right] Xop(k)=DFT[jxi(n)]=21DFT[x(n)x(n)]=21[X(k)+X(Nk)]且由 3.8.5.3 共轭复序列的 DFT 可推知
X e p ( k ) = X e p ∗ ( N − k )     ( 实 部 相 等 , 虚 部 相 反 ) X_{ep}\left(k\right)=X_{ep}^\ast\left(N-k\right)\ \ \ (实部相等,虚部相反) Xep(k)=Xep(Nk)   () X o p ( k ) = − X o p ∗ ( N − k ) ( 实 部 相 反 , 虚 部 相 等 ) X_{op}\left(k\right)=-X_{op}^\ast\left(N-k\right)(实部相反,虚部相等) Xop(k)=Xop(Nk)()

3.8.5.5 DFT 的奇偶虚实特性

x ( n ) x(n) x(n) X ( k ) X(k) X(k)
实部为偶,虚部为奇
实部为奇,虚部为偶
实偶实偶
实奇虚奇
虚偶虚偶
虚奇实奇

3.8.6 圆周卷积定理

注:此处用 ⊙ \odot 表示圆周卷积,不同教材中圆周卷积的符号表述可能不同。

3.8.6.1 时域圆周卷积定理

x ( n ) = x 1 ( n ) ⊙ x 2 ( n ) = y ~ ( n ) = ∑ m = 0 N − 1 x 1 ( m ) [ x 2 ( ( n − m ) ) N R N ( n ) ] = I D F T [ X 1 ( k ) ⋅ X 2 ( k ) ] \begin{aligned} x\left(n\right)=x_1\left(n\right)\odot x_2\left(n\right)&=\widetilde{y}\left(n\right)=\sum_{m=0}^{N-1}{x_1\left(m\right)\left[x_2\left(\left(n-m\right)\right)_NR_N\left(n\right)\right]} \\ &=\mathrm{IDFT}\left[X_1\left(k\right)\cdot X_2\left(k\right)\right] \end{aligned} x(n)=x1(n)x2(n)=y (n)=m=0N1x1(m)[x2((nm))NRN(n)]=IDFT[X1(k)X2(k)]

3.8.6.2 频域圆周卷积定理

X ( k ) = X 1 ( k ) ⊙ X 2 ( k ) = X ~ ( k ) R N ( k ) = 1 N ∑ l = 0 N − 1 X 1 ( l ) [ X 2 ( ( k − l ) ) N R N ( k ) ] = D F T [ x 1 ( n ) ⋅ x 2 ( n ) ] \begin{aligned} X\left(k\right)=X_1\left(k\right)\odot X_2\left(k\right)&=\widetilde{X}\left(k\right)R_N\left(k\right)=\frac{1}{N}\sum_{l=0}^{N-1}{X_1\left(l\right)\left[X_2\left(\left(k-l\right)\right)_NR_N\left(k\right)\right]} \\ &=\mathrm{DFT}\left[x_1\left(n\right)\cdot x_2\left(n\right)\right] \end{aligned} X(k)=X1(k)X2(k)=X (k)RN(k)=N1l=0N1X1(l)[X2((kl))NRN(k)]=DFT[x1(n)x2(n)]

3.8.6.3 圆周卷积和线性卷积的关系

  长度为 L L L 的序列 x 1 ( n ) x_1\left(n\right) x1(n) 和长度为 M M M 的序列 x 2 ( n ) x_2\left(n\right) x2(n) 的周期卷积是二者的线性卷积的以 N N N 为周期的周期延拓,若满足
N ⩾ L + M − 1 N\geqslant L+M-1 NL+M1则周期卷积的主值序列即圆周卷积与线性卷积完全相同,即 x 1 ( n ) ⊙ x 2 ( n ) = x 1 ( n ) ∗ x 2 ( n ) x_1\left(n\right)\odot x_2\left(n\right)=x_1\left(n\right)\ast x_2\left(n\right) x1(n)x2(n)=x1(n)x2(n)

3.8.6.4 圆周卷积的矩阵算法

y = h ⊙ x = [ h 1 0 ⋯ 0 h m ⋯ h 2 h 1 ⋯ 0 0 ⋯ ⋮ ⋮ ⋮ ⋮ ⋯ h m h m − 1 ⋯ 0 0 ⋯ 0 h m ⋯ h 1 0 ⋯ 0 0 ⋮ h 1 ⋯ ⋮ ⋮ h m − 1 ⋮ ⋯ 0 0 ⋯ h m h m − 1 ⋯ ] N × N ⋅ [ x 1 x 2 ⋮ x n 0 ⋮ 0 ] N × 1 y=h\odot x=\left[\begin{matrix}h_1&0&\cdots&0&h_m&\cdots\\h_2&h_1&\cdots&0&0&\cdots\\\vdots&\vdots&&\vdots&\vdots&\cdots\\h_m&h_{m-1}&\cdots&0&0&\cdots\\0&h_m&\cdots&h_1&0&\cdots\\0&0&&\vdots&h_1&\cdots\\\vdots&\vdots&&h_{m-1}&\vdots&\cdots\\0&0&\cdots&h_m&h_{m-1}&\cdots\\\end{matrix}\right]_{N\times N}\cdot\left[\begin{matrix}x_1\\x_2\\\vdots\\x_n\\0\\\vdots\\0\\\end{matrix}\right]_{N\times1} y=hx=h1h2hm0000h1hm1hm00000h1hm1hmhm000h1hm1N×Nx1x2xn00N×1也可先计算线性卷积以 N N N 为周期进行周期化后取主值得到圆周卷积。注意周期化时 N < m + n − 1 N<m+n-1 N<m+n1 的情况,此时会出现重叠,重叠部分相加后才是圆周卷积的结果。

3.8.7 重叠相加法和重叠保留法

 已知序列
x ( n ) = { 2 , − 3 , 4 , 5 , − 6 , 7 , 8 , − 9 , − 10 , 11 , − 12 , − 13 , − 14 } ( 0 ⩽ n ⩽ 12 ) x\left(n\right)=\left\{2,-3,4,5,-6,7,8,-9,-10,11,-12,-13,-14\right\}\left(0\leqslant n\leqslant12\right) x(n)={2,3,4,5,6,7,8,9,10,11,12,13,14}(0n12) h ( n ) = { 1 , − 2 , − 3 } ( 0 ⩽ n ⩽ 2 ) h\left(n\right)=\left\{1,-2,-3\right\}(0\leqslant n\leqslant2) h(n)={1,2,3}(0n2)  试分别用重叠相加法和重叠保留法计算线性卷积,取分段长度 L = 5 L=5 L=5

解:①重叠相加法
   将长序列 x ( n ) x\left(n\right) x(n) 分段,每段长度为 5 5 5
x 1 ( n ) = { 2 , − 3 , 4 , 5 , − 6 } x 2 ( n ) = { 7 , 8 , − 9 , − 10 , 11 } x 3 ( n ) = { − 12 , − 13 , − 14 } \begin{aligned} &x_1\left(n\right)=\left\{2,-3,4,5,-6\right\} \\ &x_2\left(n\right)=\left\{7,8,-9,-10,11\right\} \\ &x_3\left(n\right)=\left\{ -12,-13,-14\right\} \end{aligned} x1(n)={2,3,4,5,6}x2(n)={7,8,9,10,11}x3(n)={12,13,14}   用圆周卷积计算计算各段与 h ( n ) h\left(n\right) h(n) 的线性卷积,下划线标注部分是需要重叠相加的部分
y 1 ( n ) = { 2 , − 7 , 4 , 6 , − 28 , − 3 , 18 ‾ } y 2 ( n ) = { 7 , − 6 ‾ , − 46 , − 16 , 58 , 8 , − 33 ‾ } y 3 ( n ) = { − 12 , 11 ‾ , 48 , 67 , 42 } \begin{aligned} &y_1\left(n\right)=\left\{2,-7,4,6,-28,\underline{-3,18}\right\}\\ &y_2\left(n\right)=\left\{\underline{7,-6},-46,-16,58,\underline{8,-33}\right\}\\ &y_3\left(n\right)=\left\{\underline{-12,11},48,67,42\right\} \end{aligned} y1(n)={2,7,4,6,28,3,18}y2(n)={7,6,46,16,58,8,33}y3(n)={12,11,48,67,42}   将各段结果重叠相加,连接成线性卷积结果
y ( n ) = { 2 , − 7 , 4 , 6 , − 28 , 4 , 12 , − 46 , − 16 , 58 , − 4 , − 22 , 48 , 67 , 42 } y\left(n\right)=\left\{2,-7,4,6,-28,\mathbf{4},\mathbf{12},-46,-16,58,-\mathbf{4},-\mathbf{22},48,67,42\right\} y(n)={2,7,4,6,28,4,12,46,16,58,4,22,48,67,42}
  ②重叠保留法
   将长序列 x ( n ) x\left(n\right) x(n) 分段,每段长度为 5 5 5
x 1 ( n ) = { 0 , 0 , 2 ‾ , − 3 , 4 } x 2 ( n ) = { − 3 , 4 ‾ , 5 , − 6 , 7 } x 3 ( n ) = { − 6 , − 7 ‾ , 8 , − 9 , − 10 } x 4 ( n ) = { − 9 , − 10 ‾ , 11 , − 12 , − 13 } x 5 ( n ) = { − 12 , − 13 ‾ , − 14 , 0 , 0 } \begin{aligned} &x_1\left(n\right)=\left\{\underline{0,0,2},-3,4\right\}\\ &x_2\left(n\right)=\left\{\underline{-3,4},5,-6,7\right\}\\ &x_3\left(n\right)=\left\{\underline{-6,-7},8,-9,-10\right\}\\ &x_4\left(n\right)=\left\{\underline{-9,-10},11,-12,-13\right\}\\ &x_5\left(n\right)=\left\{\underline{-12,-13},-14,0,0\right\} \end{aligned} x1(n)={0,0,2,3,4}x2(n)={3,4,5,6,7}x3(n)={6,7,8,9,10}x4(n)={9,10,11,12,13}x5(n)={12,13,14,0,0}   用圆周卷积计算计算各段与 h ( n ) h\left(n\right) h(n) 的线性卷积,下划线标注部分是需要舍去的部分
y 1 ( n ) = { 1 , − 12 ‾ , 2 , − 7 , 4 } y 2 ( n ) = { 1 , − 11 ‾ , 6 , 28 , 4 } y 3 ( n ) = { 41 , 49 ‾ , 12 , − 46 , − 16 } y 4 ( n ) = { 53 , 47 ‾ , 58 , − 4 , − 22 } y 5 ( n ) = { − 12 , 11 ‾ , 48 , 67 , 42 } \begin{aligned} &y_1\left(n\right)=\left\{\underline{1,-12},2,-7,4\right\}\\ &y_2\left(n\right)=\left\{\underline{1,-11},6,28,4\right\}\\ &y_3\left(n\right)=\left\{\underline{41,49},12,-46,-16\right\}\\ &y_4\left(n\right)=\left\{\underline{53,47},58,-4,-22\right\}\\ &y_5\left(n\right)=\left\{\underline{-12,11},48,67,42\right\} \end{aligned} y1(n)={1,12,2,7,4}y2(n)={1,11,6,28,4}y3(n)={41,49,12,46,16}y4(n)={53,47,58,4,22}y5(n)={12,11,48,67,42}   将各段重叠部分舍去,连接成线性卷积结果
y ( n ) = { 2 , − 7 , 4 , 6 , − 28 , 4 , 12 , − 46 , − 16 , 58 , − 4 , − 22 , 48 , 67 , 42 } y\left(n\right)=\left\{2,-7,4,6,-28,4,12,-46,-16,58,-4,-22,48,67,42\right\} y(n)={2,7,4,6,28,4,12,46,16,58,4,22,48,67,42}

3.9 Parseval 定理(能量守恒)

∑ n = 0   N − 1 x 2 ( n ) = 1 N ∑ k = 0 N − 1 ∣ X ( k ) ∣ 2 \sum_{n=0\ }^{N-1}{x^2\left(n\right)}=\frac{1}{N}\sum_{k=0}^{N-1}\left|X\left(k\right)\right|^2 n=0 N1x2(n)=N1k=0N1X(k)2

3.10 DFT 与 z z z 变换

X ( k ) = ∑ n = 0 N − 1 x ( n ) W N n k = ∑ n = 0 N − 1 x ( n ) e − j 2 π N n k = ∑ n = 0 N − 1 x ( n ) z − n ∣ z = e j 2 π N k = X ( z ) ∣ z = e j 2 π N k = ∑ n = 0 N − 1 x ( n ) e − j ω n ∣ ω = 2 π N k ( k = 0 , 1 , ⋯   , N − 1 ) \begin{aligned} X\left(k\right)&=\sum_{n=0}^{N-1}{x\left(n\right)W_N^{nk}}=\sum_{n=0}^{N-1}{x\left(n\right)e^{-j\frac{2\pi}{N}nk}}=\left.\sum_{n=0}^{N-1}{x\left(n\right)z^{-n}}\right|_{z=e^{j\frac{2\pi}{N}k}} \\ &=\left.X\left(z\right)\right|_{z=e^{j\frac{2\pi}{N}k}}=\left.\sum_{n=0}^{N-1}{x\left(n\right)e^{-j\omega n}}\right|_{\omega=\frac{2\pi}{N}k}\left(k=0,1,\cdots,N-1\right) \end{aligned} X(k)=n=0N1x(n)WNnk=n=0N1x(n)ejN2πnk=n=0N1x(n)znz=ejN2πk=X(z)z=ejN2πk=n=0N1x(n)ejωnω=N2πk(k=0,1,,N1)因此 x ( n ) x\left(n\right) x(n) 的 DFT 的 N N N 个系数即为 x ( n ) x\left(n\right) x(n) z z z 变换 X ( z ) X\left(z\right) X(z) 在单位圆上 N N N 等分的取样点。


4. 频域取样的点数限制

  设 M M M 点序列 x ( n ) x\left(n\right) x(n) z z z 变换为 X ( z ) X\left(z\right) X(z),DTFT 为 X ( e j ω ) X\left(e^{j\omega}\right) X(ejω),则有

X ( z ) X\left(z\right) X(z) 的单位圆上均匀采样 N N N 点,其 IDFT 是序列 x ( n ) x\left(n\right) x(n) 以周期 N N N 进行周期延拓后的主值序列;
X ( e j ω ) X\left(e^{j\omega}\right) X(ejω) 的一个周期内均匀采样 N N N 点,其 IDFT 是序列 x ( n ) x\left(n\right) x(n) 以周期 N N N 进行周期延拓后的主值序列;
X ( e j ω ) X\left(e^{j\omega}\right) X(ejω) 的一个周期内均匀采样 M M M 点,其 IDFT 是序列 x ( n ) x\left(n\right) x(n) 本身。

由此,对于列长为M的有限长序列 x ( n ) x\left(n\right) x(n),频域取样不失真的条件是取样点数 N N N 满足
N ⩾ M N\geqslant M NM并且对于无限长序列 x ( n ) x\left(n\right) x(n),无论 N N N 取值如何,都不可能消除混叠,只能随着取样点 N N N 增加而接近 x ( n ) x\left(n\right) x(n)


5. 内插公式

  用 DFT 表示 ZT
X ( z ) = ∑ n = 0 N − 1 x ( n ) z − n = ∑ n = 0 N − 1 [ 1 N ∑ k = 0 N − 1 X ( k ) W N − n k ] z − n = 1 N ∑ k = 0 N − 1 [ X ( k ) ∑ n = 0 N − 1 ( W N − k z − 1 ) n ] = 1 N ∑ k = 0 N − 1 X ( k ) 1 − W N − k n z − N 1 − W N − k z − 1 = 1 N ∑ k = 0 N − 1 X ( k ) 1 − z − N 1 − W N − k z − 1 = 1 − z − N N ∑ k = 0 N − 1 X ( k ) 1 − W N − k z − 1 = ∑ k = 0 N − 1 X ( k ) φ k ( z ) \begin{aligned} X\left(z\right)&=\sum_{n=0}^{N-1}{x\left(n\right)z^{-n}}=\sum_{n=0}^{N-1}{\left[\frac{1}{N}\sum_{k=0}^{N-1}{X\left(k\right)W_N^{-nk}}\right]z^{-n}}=\frac{1}{N}\sum_{k=0}^{N-1}\left[X\left(k\right)\sum_{n=0}^{N-1}\left(W_N^{-k}z^{-1}\right)^n\right] \\ &=\frac{1}{N}\sum_{k=0}^{N-1}{X\left(k\right)\frac{1-W_N^{-kn}z^{-N}}{1-W_N^{-k}z^{-1}}}=\frac{1}{N}\sum_{k=0}^{N-1}{X\left(k\right)\frac{1-z^{-N}}{1-W_N^{-k}z^{-1}}} \\ &=\frac{1-z^{-N}}{N}\sum_{k=0}^{N-1}\frac{X\left(k\right)}{1-W_N^{-k}z^{-1}}=\sum_{k=0}^{N-1}{X\left(k\right)\varphi_k\left(z\right)} \end{aligned} X(z)=n=0N1x(n)zn=n=0N1[N1k=0N1X(k)WNnk]zn=N1k=0N1[X(k)n=0N1(WNkz1)n]=N1k=0N1X(k)1WNkz11WNknzN=N1k=0N1X(k)1WNkz11zN=N1zNk=0N11WNkz1X(k)=k=0N1X(k)φk(z)其中 X ( z ) X\left(z\right) X(z) 的内插公式
φ k ( z ) = 1 N ⋅ 1 − z − N 1 − W N − k z − 1 \varphi_k\left(z\right)=\frac{1}{N}\cdot\frac{1-z^{-N}}{1-W_N^{-k}z^{-1}} φk(z)=N11WNkz11zN  用 DFT 表示 DTFT
X ( e j ω ) = X ( z ) ∣ z = e j ω = ∑ k = 0 N − 1 X ( k ) φ k ( e j ω ) = ∑ k = 0 N − 1 X ( k ) φ ( ω − k 2 π N ) X\left(e^{j\omega}\right)=\left.X\left(z\right)\right|_{z=e^{j\omega}}=\sum_{k=0}^{N-1}{X\left(k\right)\varphi_k\left(e^{j\omega}\right)}=\sum_{k=0}^{N-1}X\left(k\right)\varphi\left(\omega-k\frac{2\pi}{N}\right) X(ejω)=X(z)z=ejω=k=0N1X(k)φk(ejω)=k=0N1X(k)φ(ωkN2π)其中内插函数
φ ( ω ) = 1 N sin ⁡ ( ω N 2 ) sin ⁡ ( ω 2 ) e − j ω ( N − 1 2 ) \varphi\left(\omega\right)=\frac{1}{N}\frac{\sin{\left(\frac{\omega N}{2}\right)}}{\sin{\left(\frac{\omega}{2}\right)}}e^{-j\omega\left(\frac{N-1}{2}\right)} φ(ω)=N1sin(2ω)sin(2ωN)ejω(2N1)时域取样定理说明,对频域带限的信号,可对其进行时域取样而不丢失任何信息。频域取样理论说明,时间有限的信号(有限长序列),也可对其进行频域取样(DFT)而不丢失任何信息。


6. 用 DFT 对连续时间信号逼近的问题

6.1 混叠现象

  时域采样会引起频谱周期化,通过 f s ⩾ 2 f h f_s\geqslant 2f_h fs2fh 消除。

6.2 频谱泄露现象

  取用有限个数据,即将信号截断的过程,等同于将信号乘以窗函数。如果窗函数是矩形窗,在时域内将信号截断相当于乘以矩形窗,而在频域中则相当于原信号的频谱与矩形窗的频谱卷积,使得原信号的频谱被展宽,造成频谱泄露。通常通过选择频谱特性更接近于 δ ( k ) \delta\left(k\right) δ(k) 的函数来减少频谱泄露。

6.3 栅栏效应

  用 DFT 计算频谱时,采样点为基频的整数倍,由此观察到的频谱特征时有限的,若在两个取样点之间有剧烈的频谱变化,将无法检测出来。通常通过在原序列的末端添加一些零值点来改变周期内的点数,从而在保持原有频谱连续形式不变的情况下,变更了谱线的位置,原来看不到的频谱分量就能移动到可见的位置上。

6.4 DFT 参数的选择

6.4.1 取样频率 f s f_s fs(由取样定理)

f s ⩾ 2 f h f_s\geqslant 2f_h fs2fh

6.4.2 取样周期 T T T

T = 1 f s ⩽ 1 2 f h T=\frac{1}{f_s}\leqslant\frac{1}{2f_h} T=fs12fh1

6.4.3 频率分辨率(频率分量间的增量) F F F

F = f s N F=\frac{f_s}{N} F=Nfs F F F 越小,频率分辨率越高。

6.4.4 最小记录长度(周期性函数的有效周期) t p t_p tp

t p = 1 F = N T t_p=\frac{1}{F}=NT tp=F1=NT

6.4.5 一个记录长度内的点数 N N N

N ⩾ 2 f h F N\geqslant\frac{2f_h}{F} NF2fh

注:最高频率 f h f_h fh 和频率分辨率 F F F 存在矛盾,即
f h ↑ → f s ⩾ 2 f h f s ↑ → T = 1 f s T ↑ → N 给定时 t p ↓ ⟶ F ↑ ( 频率分辨率 ↓ ) f_h\uparrow \xrightarrow{f_s\geqslant 2f_h}f_s\uparrow \xrightarrow{T=\frac{1}{f_s}}T\uparrow \xrightarrow{N\text{给定时}}t_p\downarrow \longrightarrow F\uparrow \left( \text{频率分辨率}\downarrow \right) fhfs2fh fsT=fs1 TN给定时 tpF(频率分辨率)


上一篇:Part 2——离散傅里叶级数 DFS
下一篇:Part 4——快速傅里叶变换 FFT

  • 3
    点赞
  • 0
    评论
  • 0
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

相关推荐
©️2020 CSDN 皮肤主题: 猿与汪的秘密 设计师:白松林 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值