Student Projects

cancel
Showing results for 
Search instead for 
Did you mean: 

Posture estimation with the myRIO onboard accelerometer

Posture Estimation

1. Introduction

This demo is for posture estimation based on accelerometer in NI myRIO. Basic idea of posture estimation is evaluating the direction of a 3D object. Posture estimation can be applied to many domains such as auxiliary diagnosis, physical training, computer game control and so on.

2. Method

     2.1 Overview

2.png

     Fig. 1. Overview of the method

The basic idea of our method is to use tri-axis gravity acceleration to estimate the posture of NI myRIO. Fig. 1 is overview of our method. We can get tri-axis acceleration from the accelerometer in NI myRIO. Because the gravity acceleration is low frequency signal, we use a low-pass filter to get tri-axis gravity acceleration of NI myRIO. Based on the tri-axis gravity acceleration of NI myRIO and the standard gravity acceleration in geodetic coordinate system, we can calculate the rotation measurement. The posture of MyRIO can be evaluated based on the rotation measurement.

     2.2 Algorithm

The most important part is to get the rotation measurement. Because of rotation, gravity acceleration g rotate to a new coordinate system and become g’. However, we can get the vector g’ in original coordinate system (geodetic coordinate system). By calculating the Rotation Angle (1) and Rotation Vector (2) between vector g and g’, we can get the rotation measurement.

        1.pngrotation.png                                                                                                                                                                                                         Fig. 2. Rotation measurement

     2.3 Experiment

MyRIO.png

(a) Posture Estimation

fp.png

(b) Front Pannel

   Fig. 3 Experiment result

     2.4 Discussion

1) A little delay. We must use a low-pass filter to get gravity acceleration. Data communication between NI myRIO and desktop is based on network stream. Because of the low-pass filter and network stream, it will cause a little delay.

2) Limitation of accelerometer.  Only based on accelerometer, we cannot get the rotation of Yaw component. As Fig. 4 shows, although we rotate MyRIO, gravity acceleration is not change, so we cannot get the posture changed. If there is a gyroscope in NI myRIO, we can solve this problem.

         Yaw.png

Fig. 4. Cannot get Yaw component

3. Conclusion

This demo is for Posture Estimation based on accelerometer in NI myRIO. A low-pass filter is used to get gravity acceleration. However, only with gravity acceleration, we cannot get the Yaw rotation component. So, after we get the rotation angle and rotation vector, we set the Yaw rotation component to 0. If there is a gyroscope in NI myRIO we can get a better result because gyroscope has a good dynamic characteristic.

Comments
Kardell
Member
Member
on

Thanks for the code! I was testing it and when i run "desktop main.vi" i got "Error 53 occured at Invoke Node in NI_3D Picture control.lvlib:Load VRML File.vi->init_3D Model-vi->Desktop main.vi. Manager call not supported".

Any idea what i am doing wrong?

chijenl
Member
Member
on

Hi superjing,

 

Thanks a lot for the demo!

It worked really well on my myRIO.

 

Kind regards,

Chi.

Contributors