×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Roller Coaster Analysis

Roller Coaster Analysis

Roller Coaster Analysis

(OP)
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

RE: Roller Coaster Analysis


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.

RE: Roller Coaster Analysis

(OP)
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.  

RE: Roller Coaster Analysis

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: Eng-Tips.com Forum Policies
Chinese prisoner wins Nobel Peace Prize

RE: Roller Coaster Analysis

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?
 

RE: Roller Coaster Analysis

A free tool is Octave, get Octave forge which has all the libraries included.

http://octave.sourceforge.net/index.html

%********************************************************
% 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.


 

RE: Roller Coaster Analysis

(OP)
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: http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html

(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?

RE: Roller Coaster Analysis

(OP)
NB Just rechecked my source data and there is an amplification of 207.3 so that last point is ok now.  

RE: Roller Coaster Analysis

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.

http://scidavis.sourceforge.net/index.html

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

http://scidavis.sourceforge.net/help/manual/x1527.html#sec-analysis-menu-table








  

RE: Roller Coaster Analysis

Rather than Octave, I have found SciLab to be very useful and free. Down load from www.scilab.org

RE: Roller Coaster Analysis

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.

 

RE: Roller Coaster Analysis

(OP)
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.

http://www.sensr.com/products/testing-and-development/gp1.php

http://www.microstrain.com/g-link.aspx#specs

Thanks a lot again for everyone's continued support

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close