필터 지우기
필터 지우기

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 CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by