Digital or analogue filtering?

I'm trying to self learn the art of signal processing whilst moving through my third year pure maths degree.

Sorry if my terminology is incorrect however I hope I am understandable!

I am looking at data which is coming from an accelerometer, distance data from a separate sensor and time data incrementing by 0.01 seconds e.g. to be clear in case my terminology is incorrect I have a dataset which has a row for each 0.01 seconds with the row having data from the accelerometer and distance sensors. I believe this means the data is sampled at 100 Hz.

Please can someone confirm that my choice of using a digital filter is correct?

My reasoning is that the data is not analogue and is digital and as such I should not use a standard Butterworth (or other) filter and should look for a digital version. Is this reasoning correct?

I want to use the data to compare the second derivative with respect to time of the distance with the RSS of acceleration and before I do this I want to 'clean' up the data as much as possible and it is my understanding that filtering will give me this.

I am using Octave to perform the maths and have various pieces of code to filter the data, however I do not feel like I understand the filter settings I should use! Before I start to try and understand the filter settings are all my assumptions and reasoning reasonable?

My Octave code for my filter is as follows:

%I use Octave, however I believe Matlab will be very similar if not identical

% I believe that my sample frequency is 100 Hz.
mysamf = 100;

% Nyquist frequency. I believe this is set to half the sample frequency
Fnyq = mysamf/2;

% I do not understand the cut-off frequency, however I set it to 45
% I can see through plotting the results that it does make an impact.
mycutf=45;

% Here I create a 1st order Butterworth filter, using the above restrictions.
[b,a]=butter(2, mycutf/Fnyq);

% I pass my dataset that contains the displacements.
output=filter(b,a,v_dist);


Edit:

I realize I should have explained this at the beginning however I didn't think that the source of the data would influence the filtering approach (digital/analogue).

My Sensor data is coming from a Pogo stick - the acceleometer mounted at the base of the stick and a displacement sensor measuring the movement of the stick and spring assembly.

The Pogo stick is being used by a Gazelle on steroids so is going wild, however is always bouncing around on and off axis, big jumps small hops, soft ground hard ground.

Thanks,

Sam.

• Hi!. It seems you are on the right track. Can you put some code, so that we could help... – Fat32 Oct 28 '18 at 19:28
• Before filtering, it is convenient to explore your data set and estimate how much noise it really has. If the data is very clean, you may not need a filter at all. – MBaz Oct 28 '18 at 19:44
• you have 2 related inputs that are from a physical object, while a bit beyond simple filtering, a Kalman Filter would probably be most appropriate for the data you describe – Stanley Pawlukiewicz Oct 28 '18 at 23:37
• @MBaz This is a really good point. Is there a way that I can test if a filter is required? – Samil Horper Oct 29 '18 at 19:36
• @StanleyPawlukiewicz That's really interesting you said that, I had stumbled across this filter whilst reading around the topic. Do you know if Octave has an easy pathway to implement a Kalman Filter? I've read a couple of nice walkthroughs of how a Kalman Filter works however I'm struggling to implement it. – Samil Horper Oct 29 '18 at 20:04