Accelerometer Filtering Causes Ripple

4 views (last 30 days)
darcy
darcy on 19 May 2020
Commented: Star Strider on 19 May 2020
I've got raw data for a triaxial accelerometer capturing at 50kHz. The data attached (AccZ), is the vertical acceleration component on the object when dropped vertically.
I've got to use the low-pass filter at 1650 to conform to SAE J211 for Impact Testing. However, im seeing the 50Hz noise likely from a grounding issue in my setup.
The large spikes are expected to increase, however after filtering there is a ripple just before the accerolemeter records a signicant spike. I've read in the forums about the spikes at the start of the data, but mine are occuring halfway through a dataset.
I'ved tried notch and bandpass but im still seeing the ripple in the data set just prior to impact. Any suggestions would be appreciated.
P.s. @StarStrider you seem to be the guru for this so i hope you see it!
---
% Sample code for Mathworks forum.
% AccZ = 9.80665*100*DAQdata_Acc(:,11); % Raw data, scaled with offsets.
%% Filter accelerations
load('AccZ.mat')
fc_low = 1650; %SAE J21, Impact Testing.
fs = 50000;
order = 4; % Fourth-order dictated by Standards for Low pass filter. Not mandatory for High Pass
[z,p,k]=butter(order,1650/(fs/2),'low');
[sos,g]=zp2sos(z,p,k);
AccZ_low=filtfilt(sos,g,AccZ);
% Apply highpass filter, 65Hz. I got this value from fft.
[z,p,k]=butter(order,65/(fs/2),'high');
[sos,g]=zp2sos(z,p,k);
AccZ_filt=filtfilt(sos,g,AccZ_low);
figure('units','normalized','outerposition',[0 0 1 1]);
subplot(2,1,1); plot([AccZ AccZ_low]);
title('Acc')
legend('Raw','lowpass')
grid on
subplot(2,1,2); plot([AccZ AccZ_filt]);
title('Acc')
legend('Raw','low_High')
grid on

Answers (1)

Star Strider
Star Strider on 19 May 2020
P.s. @StarStrider you seem to be the guru for this so i hope you see it!
I’m, a physician and biomedical engineer, so I’ve dealt with a lot of these problems over the years! It is always appropriate to email me through my Profile page, including the URL to a specific Question, if you want to bring it to my attention. I generally do not respond to emails, however citing to a specific Question will bring it to my attention (although I do not frequently monitor that account so there could be a delay of several hours to a day).
For the 50 Hz notch filter, one option is: Remove the 60 Hz Hum from a Signal . Another recent possibility is: Applying a Notch-filter to filter my MEP-data although I recommend the second-order-section representation, not an option in the instance in that Answer.
I am not certain what you are alluding to with respect to ‘ripple in the data set just prior to impact.’ I do not see any specific problems, although I have no recent experience (or specific expertise) with accelometers. What would you expect to see, for example on the basis of modeling?
  2 Comments
darcy
darcy on 19 May 2020
I'll remember to email you a link for any future problems, thanks!
Ive realised i didnt add the original data set so ive included it in this reply.
I would only expect a rapid increase, which is stil seen in the raw and after the low pass filter. However, for the second figure in the original post, there's a considerable drop before the rapid increase. The data trend is fine after applying the low pass filter, but the issues arise when i add a HPF to the already filtered data.
I've tried the first link you provided previously and that adds another instance on ringing when the accelerometer is stationary (screenshot attached).
Star Strider
Star Strider on 19 May 2020
My pleasure!
Filters themselves can occasionally introduce artifacts. I know nothing about ‘SAE J211’, however I assume that is an immutable requirement and cannot be changed. (The two filters together create a bandpass effect with the passbands of 65 to 1650 Hz.)
You do not mention if you first used a Fourier transform on ‘AccZ_low’ to determine the best frequency for the highpass filter. It is always best to do a Fourier transform so you know what the frequency components of the signal are.
The best way to determine if the filter is doing what you want is to use the freqz function. The second-order-section representation should guarantee stability, so I doubt stability is a problem for either one.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!