Computed Angle is flipping

2 visualizzazioni (ultimi 30 giorni)
Simona Pernischova
Simona Pernischova il 13 Ago 2019
Risposto: Deep Parikh il 21 Ott 2019
Hi
I am computing the wrist angle for some wrist movements. I got the Euler angles from the axis of the forearm and the axis of the wrist, which I first unwrap, filter and then compute to the the right angle.
DF.W{n,1} = filtfilt(b,a,unwrap(LeftWrist{t,1})*pi/180);
Dorsiflex.W{n,1}=sign(DF.W{n,1}(:,2)).*acos(cos(DF.W{n,1}(:,1)).*cos(DF.W{n,1}(:,2)))*180/pi;
Sofar I never got this problem and always got nice angle curves from 0 to about +60 and then -60. But somehow the new data I got it flips the angle at -5°, which i really don't understand why.
I tbought of gimbal lock, but i tried it with different axis constelations and that doesn't solve the problem.
Glad for any helpful inputs :)
Thanks!

Risposte (1)

Deep Parikh
Deep Parikh il 21 Ott 2019
The "unwrap" function alters the input only when the difference between two consecutive data points is grater than π radians. You can chek the new data for the difference btween two consective data points. If the new data is smooth and not changing rapidly enough, the response oscillates between certain values rather than monotonusly increasing or decresing.

Categorie

Scopri di più su Curve Fitting Toolbox in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by