当前位置:网站首页>Selection of FFT sampling frequency and sampling points
Selection of FFT sampling frequency and sampling points
2022-07-28 00:33:00 【MR_ Prometheus】
Original signal : x ( t ) = 2.5 + s i n ( 2 π ∗ 100 t ) + 3 s i n ( 2 π ∗ 900 t ) x(t)=2.5+sin(2\pi *100t)+3sin(2\pi *900t) x(t)=2.5+sin(2π∗100t)+3sin(2π∗900t)
1、 According to Nyquist sampling theorem, it is guaranteed not to overlap and can restore the original signal information , Determine the minimum sampling frequency f s m i n = 1800 H z f_{smin}=1800 Hz fsmin=1800Hz.
2、 The maximum frequency resolution is 100Hz, Minimum total sampling time L m i n = 1 / 100 L_{min} =1/100 Lmin=1/100.
3、 according to L = N / f s L=N/f_s L=N/fs, Get the minimum number of sampling points N m i n = L m i n × f s m i n = 1800 / 100 = 18 N_{min}=L_{min}\times f_{smin}=1800/100=18 Nmin=Lmin×fsmin=1800/100=18.
4、 The base 2-FFT Required points N by 2 Exponentially times ( Zero filling or truncation are not considered , The number of sampling points is directly equal to FFT Count points ), Therefore, we can get more than N m i n N_{min} Nmin Of N The valueable sequence of N ( n ) = 32 , 64 , 128 , 256.... N(n)={32,64,128,256....} N(n)=32,64,128,256.....
5、 To ensure the accuracy of frequency and amplitude ( Bloggers understand that the original signal period obtained in this sampling time is an integer multiple , Try not to leak the spectrum ), Need to meet
m 1 × f s / N = f 1 = 100 , m 1 ∈ Positive integer m_1\times f_s/N=f_{1}=100,m_1∈ Positive integer m1×fs/N=f1=100,m1∈ Positive integer
m 2 × f s / N = f 2 = 900 , m 2 ∈ Positive integer m_2\times f_s/N=f_{2}=900,m_2∈ Positive integer m2×fs/N=f2=900,m2∈ Positive integer
6、 Combine the above two formulas to get m 2 m 1 = 9 \frac{m_2}{m_1}=9 m1m2=9
Yes m 1 、 m 2 and N m_1、m_2 and N m1、m2 and N Value in turn , Make up .
Make m 1 = 1 , m 2 = 9 , N = 32 m_1=1,m_2=9,N=32 m1=1,m2=9,N=32, obtain f s = 3200 f_s=3200 fs=3200
Make m 1 = 1 , m 2 = 9 , N = 64 m_1=1,m_2=9,N=64 m1=1,m2=9,N=64, obtain f s = 6400 f_s=6400 fs=6400
Make m 1 = 1 , m 2 = 9 , N = 128 m_1=1,m_2=9,N=128 m1=1,m2=9,N=128, obtain f s = 12800 f_s=12800 fs=12800
… wait
Make m 1 = 2 , m 2 = 18 , N = 32 m_1=2,m_2=18,N=32 m1=2,m2=18,N=32, obtain f s = 1600 < f s m i n f_s=1600<f_{smin} fs=1600<fsmin ( Give up )
Make m 1 = 2 , m 2 = 18 , N = 64 m_1=2,m_2=18,N=64 m1=2,m2=18,N=64, obtain f s = 3200 f_s=3200 fs=3200
Make m 1 = 2 , m 2 = 18 , N = 128 m_1=2,m_2=18,N=128 m1=2,m2=18,N=128, obtain f s = 6400 f_s=6400 fs=6400
Make m 1 = 2 , m 2 = 18 , N = 256 m_1=2,m_2=18,N=256 m1=2,m2=18,N=256, obtain f s = 12800 f_s=12800 fs=12800
… wait
Make m 1 = 3 , m 2 = 27 , N = 32 m_1=3,m_2=27,N=32 m1=3,m2=27,N=32, obtain f s ≈ 1066.7 < f s m i n f_s≈1066.7<f_{smin} fs≈1066.7<fsmin ( Give up )
Make m 1 = 3 , m 2 = 27 , N = 64 m_1=3,m_2=27,N=64 m1=3,m2=27,N=64, obtain f s ≈ 2133.3 f_s≈2133.3 fs≈2133.3
Make m 1 = 3 , m 2 = 27 , N = 128 m_1=3,m_2=27,N=128 m1=3,m2=27,N=128, obtain f s ≈ 4266.7 f_s≈4266.7 fs≈4266.7
Make m 1 = 3 , m 2 = 27 , N = 256 m_1=3,m_2=27,N=256 m1=3,m2=27,N=256, obtain f s ≈ 8533.3 f_s≈8533.3 fs≈8533.3
… waitSelect one set of data , N = 64 , f s = 6400 N=64,f_s=6400 N=64,fs=6400 Analyze :
%% [ Preprocessing ]
clc; % Clear the command window
clear; % Clear variables and functions in the workspace
clf; % Clears the current drawing
%% [ Sampling parameters ]
fs=6400; % sampling frequency (Hz)
ts=1/fs; % Sampling period (s)
N=64; % Number of sampling points ( individual )
n=0:N-1; % Sample point index
t=n*ts; % Sampling timeline
%% [ Sampled signal ]
fa=100; % The signal a The frequency of
fb=900; % The signal b The frequency of
xn=2.5+sin(2*pi*fa*t)+3*sin(2*pi*fb*t); % Sampled signal = The signal a+ The signal b
%% [FFT Handle ]
M=N; %FFT Count points
X=fft(xn,M); %FFT Output value
X=[X(1)/M,X(2:M)*2/M]; % Amplitude axis
k=0:M-1; % Frequency point index
f=fs*k/(M-1); % Frequency axis
%% [ Make a picture ]
stem(f,abs(X)); % Sequence diagram
xlabel(' frequency '); % Horizontal axis coordinates
ylabel(' Range '); % Vertical coordinates
title({
[' sampling frequency ',num2str(fs),' , Number of sampling points ',num2str(N)],['FFT Count points ',num2str(M)]});
grid; % Show table lines

- Constantly change the sampling frequency and sampling points , Get the picture below :
first line : m 1 = 1 , m 2 = 9 m_1=1,m_2=9 m1=1,m2=9
The second line : m 1 = 2 , m 2 = 18 m_1=2,m_2=18 m1=2,m2=18
The third line : m 1 = 3 , m 2 = 27 m_1=3,m_2=27 m1=3,m2=27
- Analyze the above figure :
In every line , The frequency resolution is gradually doubled from left to right .
As shown in the two figures indicated by the double arrows in the figure below , The sampling frequency is different 、 The sampling points are the same 、FFT The result is the same , And with the increase of sampling points , The accuracy is gradually improved .
7、 According to the law summarized above , According to the accuracy requirements of the actual project and the configuration of software and hardware , Select the appropriate number of sampling points and sampling frequency .
边栏推荐
- y79.第四章 Prometheus大厂监控体系及实战 -- prometheus的服务发现机制(十)
- A great thinking problem cf1671d insert a progression
- Harmonyos 3 pure mode can limit the access to personal data of risk applications detected in Huawei's application market
- ҈直҈播҈预҈告҈ |҈ 炎热盛夏,与Nono一起跨越高温“烤”验吧!
- Read one line of string input each time (to be supplemented)
- 英特尔AI实践日第56期 | 探讨行业发展新趋势
- [leetcode] 547. Number of provinces (medium)
- Tiktok live broadcast monitoring - round robin 24 hours - live broadcast barrage
- Remote monitoring of pump station
- C event related exercise code.
猜你喜欢

MATLAB | 那些你不得不知道的MATLAB小技巧(四)
Database tuning - principle analysis and JMeter case sharing

What are the namespaces and function overloads of + and @ in front of MATLAB folder

MATLAB | 那些你不得不知道的MATLAB小技巧(三)

AI briefing how to use loss surfaces a model integration

7月第3周榜单丨飞瓜数据B站UP主排行榜发布!

点分治解析

学yolo需要什么基础?怎么学YOLO?

JS 事件传播 捕获阶段 冒泡阶段 onclick addEventListener

Matlab | those matlab tips you have to know (I)
随机推荐
What are the namespaces and function overloads of + and @ in front of MATLAB folder
MATLAB | 那些你不得不知道的MATLAB小技巧(四)
Camera and lidar calibration: gazebo simulation livox_ camera_ lidar_ Calibration ---- external parameter calibration calculation and result verification
火狐浏览器 Firefox 103 发布,提升高刷新率显示器下的性能
[leetcode] 547. Number of provinces (medium)
mysql分表之后怎么平滑上线?
LeetCode_位运算_中等_137.只出现一次的数字 II
永州分析实验室建设选址概述
Is there a general formula for tens of millions of players? B station is underestimated as a hot money opportunity!
Possible reasons why there is no voltage in the corresponding channel, but the ADC value is changing greatly and is not equal to 0
Remote solution of Internet of things system in Mechanical Engineering
Yongzhou plant cell laboratory construction layout plan
这种动态规划你见过吗——状态机动态规划之股票问题(中)
Remote monitoring of pump station
小程序助力智能家居生态平台
《数字经济 科技向善》大咖对谈干货来啦
公司7月来了个软件测试工程师,一副毛头小子的样儿,哪想到是新一代卷王...
Matlab | those matlab tips you have to know (2)
y79.第四章 Prometheus大厂监控体系及实战 -- prometheus的服务发现机制(十)
细数国产接口协作平台的六把武器!