Computed Angle is flipping
2 views (last 30 days)
Show older comments
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!
0 Comments
Answers (1)
Deep Parikh
on 21 Oct 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.
0 Comments
See Also
Categories
Find more on Curve Fitting Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!