Low pass Filter - designing one
조회 수: 14 (최근 30일)
이전 댓글 표시
Hi there I am currently trying to perform FFT on an acceleration signal. I have values in terms of g values, ie 0.95g etc.
I have produced a FFT plot using the following code and the Hamming window
clc
clear all;
x1=load('TEXT PILOT CC LANKLE_converted_1.txt');
x=x1(:,1);
win = hamming(length(x));
%win=ones(length(x),1);
y=x.*win;
NFFT = 2.^nextpow2(length(x));
FFTX = fft(y,NFFT)/length(x);
Fs=60;
figure(3)
%plotting
f = Fs/2*linspace(0,1,NFFT/2+1);
cyclespersecond=2*abs(FFTX(1:NFFT/2+1));
% Plot single-sided amplitude spectrum.
plot(f,2*abs(FFTX(1:NFFT/2+1)))
title('Single-Sided Amplitude Spectrum of y(t)')
xlabel('Frequency (Hz)')
ylabel('|Y(f)|')
I get a high spike at 0 and was thinking this could be due to G. I want to look at walking running etc and so I dont want to get rid of many low frequencies just this high one as I can barely see the other peaks in the spectrum as a result. I thought of using a low pass filter but really dont know where to start in designing them as I have never used it before. Also I was wondering if subtracting the mean would make my peaks more clear?
Also could this poor spectrum be due to lots of noise?
Any help or advice would be appreciated.
댓글 수: 1
Jeremy
2014년 3월 13일
The high spike at zero is present because of the DC (frequency = 0Hz) component of the signal. You should subtract the average of the signal to get rid of DC.
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Digital and Analog Filters에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!