当前位置:网站首页>Signal processing: < three > DFT and FFT
Signal processing: < three > DFT and FFT
2022-07-24 10:46:00 【Summer is cool and autumn falls】
signal processing :< One > DFT and FFT
DFT, Discrete Fourier transform , Fourier transform is discrete in both time domain and frequency domain , The time domain sampling of the signal is transformed into its DTFT Frequency domain sampling of .
1、 DFT Mathematical expression
X [ k ] = ∑ n = 0 N x [ n ] W N k n = ∑ n = 0 N x [ n ] e − j 2 π k n N X[k] = \sum\limits_{n = 0}^N {x[n]} W_N^{kn} = \sum\limits_{n = 0}^N {x[n]} {e^{ - j\frac{ {2\pi k{\rm{n}}}}{N}}} X[k]=n=0∑Nx[n]WNkn=n=0∑Nx[n]e−jN2πkn
among 0 ≤ k ≤ N {0 \le k \le N} 0≤k≤N.
It can be seen from the above formula , do DFT need N 2 N^2 N2 Multiple complex multiplication and N ( N − 1 ) N(N-1) N(N−1) Sub complex addition 【 Find a point X[k] need N N N Multiple complex multiplication and N − 1 N-1 N−1 Sub complex addition 】, And a complex number multiplication is made up of 4 Times real number multiplication and 2 Sub real number addition constitutes , A plural addition consists of 2 Sub real number addition constitutes , The specific explanation is as follows :
( a + j b ) ∙ ( c + j d ) = [ a c − b d ] + j [ a d + b c ] ( a + j b ) + ( c + j d ) = [ a + c ] + j [ b + d ] \begin{array}{l} \left( {a + jb} \right) \bullet \left( {c + jd} \right) = \left[ {ac - bd} \right] + j\left[ {ad + bc} \right]\\ \left( {a + jb} \right) + \left( {c + jd} \right) = \left[ {a + c} \right] + j[b + d] \end{array} (a+jb)∙(c+jd)=[ac−bd]+j[ad+bc](a+jb)+(c+jd)=[a+c]+j[b+d] therefore , do DFT need 4 N 2 4N^2 4N2 Times real number multiplication and ( 2 N 2 + 2 N 2 − 2 N ) or [ 2 ( 2 N 2 − N ] (2N^2+2N^2-2N) or [2(2N^2-N] (2N2+2N2−2N) or [2(2N2−N] Sub real number addition . To reduce complexity , Raises the FFT Algorithm , Its idea is to use the idea of decomposition to N spot DFT The calculation of is decomposed into smaller DFT Calculate and use the complex number W N k n W_N^{kn} WNkn Calculation of periodicity and symmetry of .
2 、 W N k n W_N^{kn} WNkn The understanding of the
W N k n = e − j 2 π k n / N = c o s ( j 2 π k n / N ) − j s i n ( j 2 π k n / N ) W_N^{kn}=e ^{-j2\pi kn/N}=cos(j2 \pi kn/N)-jsin(j2 \pi kn/N) WNkn=e−j2πkn/N=cos(j2πkn/N)−jsin(j2πkn/N), W N k n W_N^{kn} WNkn yes W N W_N WN Of kn The next power , W N 1 = e − j 2 π k n / N = c o s ( j 2 π / N ) − j s i n ( j 2 π / N ) W_N^{1}=e ^{-j2\pi kn/N}=cos(j2 \pi /N)-jsin(j2 \pi /N) WN1=e−j2πkn/N=cos(j2π/N)−jsin(j2π/N), W N 1 W_N^{1} WN1 It can be understood as the unit circle 360 Keratosis into N N N Share , therefore $W_N^{1} It's actually a value that rotates on the unit circle of the complex plane . As shown in the figure below : Set the unit circle to 360 Divided into 8 Share , Then each copy corresponds to 45 degree .
It is not difficult to get the properties of the rotation factor from the graph :
a) periodic : W N a + N = W N a W_N^{a+N}=W_N^{a} WNa+N=WNa
b) symmetry : W N a + N / 2 = − W N a W_N^{a+N/2}=-W_N^{a} WNa+N/2=−WNa
c) Scalability : W N 2 = − W N / 2 1 W_N^{2}=-W_{N/2}^{1} WN2=−WN/21
2 、FFT The understanding of the
2.1 Fourier transform based on time

As shown in the figure : x ( n ) x(n) x(n) The sum of two sequences decomposed into even and odd numbers , namely 
x 1 ( n ) x1(n) x1(n) and x 2 ( n ) x2(n) x2(n) It's all the length of N / 2 N/2 N/2, x 1 ( n ) x_1(n) x1(n) Is an even sequence , x 2 ( n ) x_2(n) x2(n) Is an odd sequence , x 1 ( n ) = x ( 2 n ) x_1(n)=x(2n) x1(n)=x(2n), x 2 ( n ) = x ( 2 n + 1 ) x_2(n)=x(2n+1) x2(n)=x(2n+1), n = 0 , 1... N / 2 − 1 n=0,1...N/2-1 n=0,1...N/2−1. be
X ( k ) = ∑ n = 0 ( n by accidentally Count ) N x [ n ] W N k n + ∑ n = 0 ( n by p. Count ) N x [ n ] W N k n = ∑ n = 0 N / 2 − 1 x 1 [ n ] W N 2 k n + ∑ n = 0 N / 2 − 1 x [ n ] W N k ( 2 n + 1 ) X(k)= \sum\limits_{n = 0(n For the even )}^N {x[n]} W_N^{kn}+\sum\limits_{n = 0(n It's odd )}^N {x[n]} W_N^{kn}=\sum\limits_{n = 0}^{N/2-1} {x_1[n]} W_N^{2kn}+\sum\limits_{n = 0}^{N/2-1} {x[n]} W_N^{k(2n+1)} X(k)=n=0(n by accidentally Count )∑Nx[n]WNkn+n=0(n by p. Count )∑Nx[n]WNkn=n=0∑N/2−1x1[n]WN2kn+n=0∑N/2−1x[n]WNk(2n+1)
among X 1 ( k ) X_1(k) X1(k) and X 2 ( k ) X_2(k) X2(k) Respectively x 1 ( n ) x_1(n) x1(n) and x 2 ( n ) x_2(n) x2(n) Of N/2 spot DFT.
X 1 [ k ] = ∑ n = 0 N / 2 − 1 x 1 [ n ] W N / 2 k n X_1[k] = \sum\limits_{n = 0}^{N/2-1} {x_1[n]} W_{N/2}^{kn} X1[k]=n=0∑N/2−1x1[n]WN/2kn
X 2 [ k ] = ∑ n = 0 N / 2 − 1 x 2 [ n ] W N / 2 k n X_2[k] = \sum\limits_{n = 0}^{N/2-1} {x_2[n]} W_{N/2}^{kn} X2[k]=n=0∑N/2−1x2[n]WN/2kn
because X 1 ( k ) X_1(k) X1(k) and X 2 ( k ) X_2(k) X2(k) in N/2 For cycles , And we know from symmetry W N k + N / 2 = − W N k W_N^{k+N/2}=-W_N^{k} WNk+N/2=−WNk, therefore X(k) It can also be expressed as :
The operation of the above formula can be represented by the following figure , According to its shape, it is called butterfly operation .
It can be seen from the above figure that N spot DFT Decompose into N/2 Two points DFT, Calculating a dish operation requires 1 Multiple complex multiplication and 2 Sub complex addition . From the beginning N=8 For example ,
Calculate a N N N Dot DFT You need to calculate two N / 2 N/2 N/2 Of DFT and N/2 Butterfly operation of , By analogy , You can find , Calculation N Dot DFT Finally, it can be divided into N/2 Two DFT, Through induction, we can find ,N Dot DFT It can be divided into l o g 2 N log_2^{N} log2N level , Each level has N / 2 N/2 N/2 Butterfly operations constitute , Therefore, there are a total of N / 2 Time N/2 Time N/2 Time Multiplicative sum N N N Add again , One N N N Dot DFT All in all N / 2 l o g 2 N N/2log_2^{N} N/2log2N Multiple complex multiplication and N l o g 2 N Nlog_2^{N} Nlog2N
Direct calculation DFT And utilization FFT Calculation DFT For example, the following figure shows :
3、 Programming idea
3.1 In situ calculation







4、 Inverse Fourier transform



5、 Reference material
【1】 The fast Fourier transform FFT analysis
【2】 The fast Fourier transform (FFT) The derivation process of (DIT)
【3】 The fast Fourier transform FFTppt Courseware .ppt
【4】1024 spot fft Principle and fpga Realization
【5】 The fast Fourier transform FFT-PPT( fine
边栏推荐
- OSPF includes special area experiments, mGRE construction and re release
- 很佩服的一个Google大佬,离职了。。
- After the QT program minimizes the tray, a msgbox pops up. Click OK and the program exits. The problem is solved
- Erlang studies abroad
- Sentinel 实现 pull 模式规则持久化
- 用 Signal Processing Toolbox 软件对数据进行滤波
- [C Primer Plus Chapter 3 after class programming questions]
- 563 pages (300000 words) overall design scheme of smart Chemical Park (phase I)
- MySQL performance optimization (IV): how to use indexes efficiently and correctly
- Sentinel implements the persistence of pull pattern rules
猜你喜欢
随机推荐
Design of dual machine hot standby scheme
Intranet remote control tool under Windows
图像处理:浮点数转定点数
Configuration description and componentization development steps of various documents in the scaffold
常量指针、指针常量
MySQL performance optimization (IV): how to use indexes efficiently and correctly
Sentinel flow control quick start
MySQL - 更新表中的数据记录
[C Primer Plus Chapter 3 after class programming questions]
OSPF includes special area experiments, mGRE construction and re release
OSPF含特殊区域实验,MGRE构建和重发布
Sentinel three flow control effects
Scaffold document directory description and document exposure
Array element removal problem
Sentinel implements the persistence of pull pattern rules
MySQL - normal index
QT application prevents multiple opening, that is, single instance operation
A ten thousand word blog post takes you into the pit. Reptiles are a dead end [ten thousand word pictures]
Arduino + AD9833 波形发生器
[dish of learning notes dog learning C] initial level of pointer








![[personal summary] end of July 17, 2022](/img/56/8c69b171140ca38e16f0bbb7f344e3.jpg)
