Low pass Filter - designing one

14 ビュー (過去 30 日間)
Bran
Bran 2014 年 1 月 16 日
コメント済み: Jeremy 2014 年 3 月 13 日
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
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 件)

Suneesh
Suneesh 2014 年 1 月 16 日

カテゴリ

Help Center および File ExchangeDigital and Analog Filters についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by