当前位置:网站首页>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 .
边栏推荐
- In the third week of July, the list of feigua data station B up main ranking list was released!
- Yuanuniverse office, the ultimate dream of migrant workers
- 看知名企业们如何利用 Web3进行产业重塑
- MySQL limit使用及超大分页问题解决
- ҈直҈播҈预҈告҈ |҈ 炎热盛夏,与Nono一起跨越高温“烤”验吧!
- JS event propagation capture stage bubbling stage onclick addeventlistener
- MATLAB如何将k线图设置为经典红绿配色?
- ҈ straight ҈ Broadcast ҈ Pre ҈ Report ҈ |҈ In hot summer, let's cross the high temperature and "bake" with nono!
- C# 事件相关的练习代码。
- JS 事件传播 捕获阶段 冒泡阶段 onclick addEventListener
猜你喜欢

Matlab | those matlab tips you have to know (4)

Remote monitoring of pump station

OpenVINO整合TensorFlow实现推理加速

It was dog days, but I was scared out of a cold sweat: how far is the hidden danger of driving safety from us?

FFT 采样频率和采样点数的选取

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

看知名企业们如何利用 Web3进行产业重塑

҈ straight ҈ Broadcast ҈ Pre ҈ Report ҈ |҈ In hot summer, let's cross the high temperature and "bake" with nono!

LeetCode 415. 字符串相加 和 43. 字符串相乘
![[C language] string reverse order (recursive implementation)](/img/a1/9e603321d364c7f457116bd9e462aa.png)
[C language] string reverse order (recursive implementation)
随机推荐
理解双亲委派模式
[21 day learning challenge] classmate K invites you to participate in the in-depth learning seminar
公司7月来了个软件测试工程师,一副毛头小子的样儿,哪想到是新一代卷王...
BuildForge 资料
In the third week of July, the list of feigua data station B up main ranking list was released!
学yolo需要什么基础?怎么学YOLO?
这种动态规划你见过吗——状态机动态规划之股票问题(中)
永州清洁级动物实验室建设选址注意事项
FFT 采样频率和采样点数的选取
Description and analysis of main parameters of R language r native plot function and lines function (type, PCH, CEX, lty, LWD, col, xlab, ylab)
30余年的元宇宙,为我们带来了什么?
2022 latest Tiktok live broadcast monitoring full set of monitoring (V) product details monitoring
Server open sensitive port
Possible reasons why there is no voltage in the corresponding channel, but the ADC value is changing greatly and is not equal to 0
"Digital economy, science and technology for the good" talk about dry goods
LeetCode 415. 字符串相加 和 43. 字符串相乘
҈ straight ҈ Broadcast ҈ Pre ҈ Report ҈ |҈ In hot summer, let's cross the high temperature and "bake" with nono!
Impulse attends the 2022 Forum on safe circulation of data elements Online - a special session in the field of government affairs, and helps the construction and innovative development of big data for
Intel AI practice day issue 56 | explore new trends in industry development
Matlab | those matlab tips you have to know (I)