我已经对采样频率为50 KHz的逆变器50Hz输出电流进行了1分钟的采样。我应该将时间分成200ms的包(0.2秒或主信号的10个周期),并对每个包进行FFT。这意味着每个包中有10000个样本(如果不是,我会用零填充或截断,这没有太大的区别)。我还应该提取高达9 KHz的频谱。低频结果正常,但高频结果错误(值是正确值的一半)。你能帮我理解我做错了什么吗?
我有一个想法,也许像下面的代码一样的事情正在发生在我的FFT中。只需将SF更改为10000,看看结果如何改变!
我有一个想法,也许像下面的代码一样的事情正在发生在我的FFT中。只需将SF更改为10000,看看结果如何改变!
in this code if you change the SF(sampling frequency) from 30000 to 10000,
the results for high frequncies will be distorted and disordered . why ?
SF = 30000; %sampling frequency
% signal
t = 0:1/SF:1-1/SF; % sample points
wave=15*sin(2*pi*1*t)+1*sin(2*pi*123*t)+2*sin(2*pi*203*t)+3*sin(2*pi*223*t)+4*sin(2*pi*331*t)+5*sin(2*pi*2812*t)+6*sin(2*pi*5752*t)+7*sin(2*pi*7993*t);
wavefft = fft(wave);
L=floor(size(wave,2)/2)+1; % removing the mirror side of spectrum
MagSpec = abs(wavefft(1:L))/(SF/2); %% removing the mirror side of the spectrum
and ranging the domain
plot(MagSpec);