Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Roller Coaster Analysis 1

Status
Not open for further replies.

RideAnalyser

Structural
Jan 26, 2011
5
0
0
GB
Hi everyone.

I'm looking to see if anyone would be kind enough to help me out with a few basic questions I'm looking for answers for.

Part of my job involves the analysis of the accelerations that are experienced by passengers on roller coasters. This involves fixing accelerometers to rides and analysing the data that they produce. I'm required to post process the data with " a 4-pole, single pass, Butterworth low pass filter using a corner frequency (Fc) of 5 Hz". I am sampling my data at 150 Hz and I am not interested in any acceleration peaks that are less than 200 ms in duration.

Could anyone please explain what a Butterworth filter is in laymans terms and why it is needed in this scenario?

If you need any extra information then please just leave a comment or message and I will get back to you as soon as possible.

Thank you very much
 
Replies continue below

Recommended for you


The Butterworth filter is a classic design which has a nominally flat response within the 'passband', i.e. your frequencies, from 0Hz to just under 5Hz, are not significantly attenuated.

The 'corner frequency' (or cutoff frequency) of the filter is the point at which the attenuation increases to 3dB compared to the 'flat' region, and from this point starts to attenuate the higher frequncies at 20dB per decade (or 6dB per octave) per order of filter (20n). For your filter specification of '4-pole' means n = 4, therefore you can expect 20x4 giving an attenuation of 80dB decade / 24dB octave above 5Hz.

The reason you want a low-pass filter is to weight the readings by frequency in a known way, so that above 5Hz the data is of increasingly less interest.
 
Sorry that is a typo and is meant to read 50 though as I understand it we should be sampling at 12*5Hz = 60 Hz in order to minimise any aliasing.
 
You need a low pass filter of some sort to filter out transient spikes that are not germane to the problem at hand. Massive, yet short, shocks aren't usually transmitted to, or felt by, the human senses.

The Butterworth filter is both maximally flat AND has a more linear phase response than other similar filters. Whether that's critical to your application, I don't really know. But, you need a filter, no matter what.

TTFN

FAQ731-376
Chinese prisoner wins Nobel Peace Prize
 
Given the price of storage and processing (both essentially free these days), and given that a typical rollar coaster ride doesn't last more than a couple minutes, why not simply up the sampling rate (above the sensor response) to avoid aliasing, record everything and sort it out later in the analysis phase?

Let's say: 16 sensors, 16-bit capture, 1 kHz rate, three minutes? A few MB, maybe 10MB, of raw data to crunch later?
 
A free tool is Octave, get Octave forge which has all the libraries included.


%********************************************************
% load a comma seperated variable file from excel
% eliminate everything that is not numbers first
% including empty cells, matrix is upper left justified in the sheet


matrix=load data1.CSV; % filename
[rw cl]=size(matrix)

x=matrix:),1); % select the first column for analysis

fs=50; % enter the sample rate per second.
cutoff=5; % enter the cutoff frequency in hz
n=4; % filter order

wc=(cutoff*2)/fs; % normalize to 0 - 1

[b,a] = butter(n, Wc) % low pass filter with cutoff pi*Wc radians

% b is the cooefecient for the numerator and a for the denominator

y = filter (b, a, x); % apply the filter design to the data

save("-ascii","outdata.csv","y"); % save the file back


Not guaranteed to be bug free but if try it reply back and i will look at what might be wrong.
 
Thanks. I will try that out. What other options do I have in post processing the signal in terms of software? Also how do these work? Ideally I would be interested in some sort of program that will allow you to input the raw values from the accelerometer and then "press a button" that applies this specific filter to it.

At the moment the best I have come up with is an excel spreadsheet in conjunction with the following formula derived from:
(1*G11)+(4*G12)+(6*G13)+(4*G14)+ (1*G15)+(-0.1873794924*H11)+(1.0546654059*H12)+(-2.3139884144*H13)+(2.3695130072*H14)

Is this a valid approach to filtering my data?

Also as a note I have found that my results come out approximately 208 times too large. Why would this occur? Is some degree of rescaling needed after filtering data?
 
I think the easiest thing is Octave if you have to do this many times, as once the setup is complete you only have to change the
filename at the top.

Here is an updated list which i tested myself.




% load a comma seperated variable file from excel
% eliminate everything that is not numbers first
% including empty cells, matrix is upper left justified in the sheet

matrix=load("-ascii","data.csv"); % filename
[rw cl]=size(matrix)

x=matrix:),1); % select the first column for analysis

fs=150; % enter the sample rate per second.
cutoff=5; % enter the cutoff frequency in hz
n=4; % filter order



wc=(cutoff*2)/fs; % normalize to 0 - pi

[b,a] = butter(n, wc) % low pass filter with cutoff pi*Wc radians

%freqz(b,a);


% b is the cooefecient for the numerator and a for the denominator

y = filter (b, a, x); % apply the filter design to the data

save("-ascii","outdata.csv","y"); % save the file back


First download Octave forge from the site.
Install and make sure to check the box in installation for all the Octave Forge libraries.

Form your data in a text file in one column with nothing but the numbers sequential in time going down.

Copy the text from here and paste into a file with any name you like such as "filterroller.m" use a ".m" extension for this file and place it in Octaves "bin" directory.

Also place your input data file in this "bin" directory and then start octave.

After it starts it gives you a command screen.
Just type the name of your command file e.g "filterroller" and hit return.

If all goes well it returns to the prompt and you should have a new file created called "outdata.csv"

This you can directly load into excel to view.

As for your filter you already have i cannot judge it from your data as it seems to reference excel cells.

You can also try something called SciDavis.


It will let you copy a table into it and there is a filter dialog that lets you filter the data called FFTfilter

 
Scilab is certainly more user friendly but i have had bad experiences with it being buggy.

Scilab does have the functions to generate digital filters and process data with them. Certainly worth a look.

 
Thanks for the help guys. Sorry for the delay in responding but it's been hectic.

I will check out those programs first thing.

With regards to the accelerometer itself does anyone have any experiences (good or bad, preferably good) with any specific models.

The following two seem to be the best for me but I'm not sure if there is anything else out there that may be better.



Thanks a lot again for everyone's continued support
 
Status
Not open for further replies.
Back
Top