Low pass Filter - designing one

8 vues (au cours des 30 derniers jours)
Bran
Bran le 16 Jan 2014
Commenté : Jeremy le 13 Mar 2014
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 commentaire
Jeremy
Jeremy le 13 Mar 2014
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.

Connectez-vous pour commenter.

Réponses (1)

Suneesh
Suneesh le 16 Jan 2014

Catégories

En savoir plus sur Digital and Analog Filters dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by