cancel
Showing results for 
Search instead for 
Did you mean: 

Residual offset in vertical speed computed with motionFX

JulienD
Senior

Hello,

 

I'm experimenting with algobuilder, motionFX and IKS01A3 + SMK1229AAA.

Btw, very cool app for investigation.

My goal is to obtain vertical speed. As motionFX provide gravity vector with magnitude 1 (let's call it G) and linear acceleration vector (let's call it A).

I computed the vertical acceleration with the dot product A.G which leads to

Ax * Gx + Ay * Gy +Az * Gz

It looks like this method gives the expected result: I get the "same" curve for the "same" vertical movement whatever the orientation of the device and whatever the direction of the movement. (I used quotes for "same" because I'm moving the device by hand ie the movement is not an exact reproduction of the previous one).

 

However, it seems that there's an offset in result which depends on the orientation. It is particularly visible when the device is not moving: there's still a residual computed speed. If I flip the board, the residual speed is inverted.

You can see it on the screenshot.

JulienD_0-1704382188464.png

Here are my questions:

- Is my computation right?

- Is there a way to remove this offset without using another sensor?

 

Thanks

Julien

 

1 ACCEPTED SOLUTION

Accepted Solutions
Miroslav BATEK
ST Employee

I think your calculation if correct. But there always will be some residual acceleration and if you integrate it to get the speed will be drifting.

I would propose to use MotionVC library - Vertical context which is using accelerometer and pressure sensor and can provide you vertical speed. You can find more details in the user manual:
https://www.st.com/content/ccc/resource/technical/document/user_manual/group1/40/a4/0c/23/54/f3/4b/25/DM00542666/files/DM00542666.pdf/jcr:content/translations/en.DM00542666.pdf

The library together with example application is available in X-CUBE-MEMS1 package.

https://www.st.com/en/embedded-software/x-cube-mems1.html

 

 

View solution in original post

2 REPLIES 2
Miroslav BATEK
ST Employee

I think your calculation if correct. But there always will be some residual acceleration and if you integrate it to get the speed will be drifting.

I would propose to use MotionVC library - Vertical context which is using accelerometer and pressure sensor and can provide you vertical speed. You can find more details in the user manual:
https://www.st.com/content/ccc/resource/technical/document/user_manual/group1/40/a4/0c/23/54/f3/4b/25/DM00542666/files/DM00542666.pdf/jcr:content/translations/en.DM00542666.pdf

The library together with example application is available in X-CUBE-MEMS1 package.

https://www.st.com/en/embedded-software/x-cube-mems1.html

 

 

Hi Miroslav,

 

Thanks for you answer.

I'm looking for a solution much more faster than VC.

I did many attemps with differents strategies or sensors and I'm not far to conclude that it is not possible today... :(

 

thanks again.

Julien