Question about filtering the noisy IK results

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
farzaneh yazdani
Posts: 9
Joined: Sun May 31, 2015 11:20 pm

Question about filtering the noisy IK results

Post by farzaneh yazdani » Fri Dec 09, 2016 12:27 am

Dear All,
I am working on gait kinematics using ‘gait 2392’ model. it seems that the results of inverse kinematic for the pelvis are noisy (would you please take a look at the attached file). I am sure that scaling is performed with the minimum error (RMS = 0.01234)
Now the questions are:
1) What is the source of the noise in IK results?
2) As I want to use principal component analysis to compare the IK patterns I need to filter the IK results by MATLAB software, so which kind of filtering do you suggest to make the results smoother? do you think that "butterworth 4th order,cut off 6" could help?
...Any help would be very appreciative.

Farzaneh Yazdani
PhD Candidate, SUMS school of Rehabilitation Sciences
Attachments
pelvic tilt.png
pelvic tilt.png (38.66 KiB) Viewed 664 times

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Question about filtering the noisy IK results

Post by Dimitar Stanev » Fri Dec 09, 2016 1:15 am

Hi,

Think IK as a fitting process, that tries to minimize the marker error. Thus, you will not get smooth coordinates, since there is not any dependency between the time instances. OpenSim uses low pass IIR filter on the coordinates, but I think this does not guarantee continuity. You can also try to construct smooth splines on the data and to ensure that they are continuous.

https://github.com/opensim-org/opensim- ... l.cpp#L160

Best

User avatar
farzaneh yazdani
Posts: 9
Joined: Sun May 31, 2015 11:20 pm

Re: Question about filtering the noisy IK results

Post by farzaneh yazdani » Fri Dec 09, 2016 4:49 am

Dear Dimitar,
thanks a lot for your reply.
I filtered the data using "butterworth 4th order, cut off 6" then i performed Qubic Spline function on them for the purpose of time normalization.
would you please take a look at attached file to see the result?
I'm afraid if the data were manipulated too much.

I really appreciate your help.

Farzaneh Yazdani
PhD Candidate, SUMS school of Rehabilitation Sciences
Attachments
filt.tilt.png
filt.tilt.png (26.38 KiB) Viewed 640 times

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Question about filtering the noisy IK results

Post by Dimitar Stanev » Fri Dec 09, 2016 7:28 am

It seems good, except for the initial value. I would suggest you to try and add more degrees in the spline model. You need to find a trade off between a good fit and over-fitting.

User avatar
farzaneh yazdani
Posts: 9
Joined: Sun May 31, 2015 11:20 pm

Re: Question about filtering the noisy IK results

Post by farzaneh yazdani » Sat Dec 10, 2016 2:04 am

Dear Dimitar,
I have a basic question about filtering,i would be really grateful if you could answer.
in my previous project i performed data processing with V3D software, in this software i was able to firstly apply low pass filter on marker trajectories, then calculating the IK ( joint angles for example) but now in Opensim which i cant filter the trajectories at first, the results of inverse kinematic should be filtered to reduce noise.
my question is: does it practically influence the final results? in other words, does the IK results differ when i filter trajectories at first in compare with the situation when the filtering is applied on angle data after calculating IK ?

Farzaneh Yazdani
PhD Candidate, SUMS school of Rehabilitation Sciences

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Question about filtering the noisy IK results

Post by Dimitar Stanev » Sat Dec 10, 2016 11:08 am

Think the filter operation as something that transforms your data. Since you filter you loose some information, that you believe its unnecessary. It does not mean that you can improve the prediction. There are many types of filters, and your filter can alter the trajectory, thus you may get very different results if you apply your filter latter (A * B != B * A).

The problem is why you want to filter? Do you observe disturbances in your measurements? Then do you know what is the origin of this noise to filter it out. Or do you want to get a smooth trajectory? If your recorded trajectory presents noise you have to study the origin of the noise and see how to attenuate it without altering the real trajectory. If you want to get a smooth trajectory then you fit some model that can explain the trajectory.

Best

User avatar
farzaneh yazdani
Posts: 9
Joined: Sun May 31, 2015 11:20 pm

Re: Question about filtering the noisy IK results

Post by farzaneh yazdani » Sat Dec 10, 2016 9:52 pm

i would like to filter the data because i decide to analyze joint kinematic patterns using Principal Component Analysis, and this method is very sensitive to small deviations on the pattern, so noisy joint kinematics could potentially induce errors.

best regards

Farzaneh Yazdani
PhD Candidate, SUMS school of Rehabilitation Sciences

POST REPLY