フィルターのクリア

FFT Peaks Resolver Signal

6 ビュー (過去 30 日間)
Sven Sinsen
Sven Sinsen 2017 年 9 月 13 日
回答済み: Christoph F. 2017 年 9 月 13 日
Hello to all,
I wanted to create a FFT for a resolver Signal. The excitation voltage has a frequency of 5kHz, so I expected one Peak to be at that point. But when I plot the FFT, the Peak is located at 10kHz? The lower frequency for the resolver revolutions seems to be right.
This is my code for generating the FFT:
%%FFT Resolver
Fs = 80000;
fn = Fs/2;
N = length(r_sin);
df = Fs/N;
x_fa = 0 : df : Fs-df;
fft_sin = fftshift(abs(fft(r_sin, N))/N);
fft_cos = fftshift(abs(fft(r_cos, N))/N);
plot(x_fa-fn,[20*log10(fft_sin) 20*log10(fft_cos)])
title('Resolver FFT')
xlabel('Frequency [Hz]')
ylabel('Amplitude [dB]')
legend('sin', 'cos')
xlim([0 40000])
ylim([-150 -20])
Is my code wrong or is this the correct behavior?
Thanks a lot in advance!
Regards, Sven

採用された回答

Christoph F.
Christoph F. 2017 年 9 月 13 日
t=0:(1/80000):(79999/80000);
r_sin=sin(2*pi*5000*t).';
r_cos=sin(2*pi*5000*t).';
If applied to synthetic input signals, the code produces the expected results (peaks at +/-5000 Hz). Maybe the frequency in the actual signal is at 10 kHz, or the actual signal was sampled at 40kHz instead of 80kHz?

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by