Sampling Accelerometer and Gyro Data

edited May 2017 in General
This discussion was created from comments split from: Problems with acc/gyro sample rate in iOS.

Comments

  • hello Eric et al

    i'm a new comer... just purchased meta-tracker

    i too see the problem with the accelerometer and gyro sampling rate
    also, i see that for each sample (elapsed time point) there are 3 readings in all axes- what is that?
    is there a way to optimize the sample rate to be accurate through the FW?

    one more question, if i want to check displacement in an accurate manner, is it possible to do with the capabilities of the accelerometer? or gyro?
    my need is for the detection of relatively low frequencies: something in the range of 5-30Hz
  • How are you configuring the accelerometer and gyro?

    3 samples per elapsed time is answered on the GitHub issues page:

    If you want to correct the timestamps on the app side, use the steps outlined in this post:

    You'll have to use some form of sensor fusion to get accurate displacement as the accelerometer always has gravity factored into its measurements and gyros drift over time.  You should pick up a MetaMotion board to do these kinds of computations.
  • Eric hi,

    what do you mean by "How are you configuring the accelerometer and gyro?"?

    I read the explanations in the links you sent. there always seems to be a ~0.5Hz offset from the set up frequency

    where do I upload the version that takes care of that (2.8.2)?

    i'll look into the meta-motion sensor - but I don't know what you mean by "sensor fusion"- do you propose to work with 2 sensors simultaneously ?

  • Post the code you are using to configure the sensors so I can see what odr and range you are setting them to.  Also, describe in more detail what your sampling rate problems are.  How many samples are you actually receiving?  How many are you expecting?

    No, the ~0.5Hz difference is for that particular use case; it is not a global offset that applies for all sensor configurations and use cases.  The sensors themselves have a 1% error in the data rate so you will never get 100% accurate sampling rate.  Over a large sample of data, this margin of error is negligible.

    Sensor fusion is explained in this tutorial:

  • Eric hi,

    is there a thought on incorporating the sensor fusion into other products later upcoming versions? for example, the meta-tracker....

    where do I get the configuration code from?

  • Sensor fusion does not help the MetaTracker realize its intended purpose of environmental and asset monitoring.  Calculating displacement and performing similar motion analysis is what the MetaMotion boards are designed for which is why they come with sensor fusion and the necessary hardware to perform the computations.  

    However, if you that you absolutely need a MetaTracker with sensor fusion, please contact MbientLab directly with specifications on what hardware and firmware customization you require.

    You said you are experiencing sampling rate issues.  How are you getting data from your MetaTracker to conclude you are experiencing such an issue?  If you wrote your own app, then post the code you are currently running.  If you are using the MetaWear app from the Apple store, then let me know which settings were selected from the configuration screen.
  • Eric,

    I have run an experiment where I placed 2 sensors adjacently and in the exact same orientation then recorded gyro and accelerator data simultaneously at an identical frequency

    when I look at the data , I get what appears to be a DC shift on the amplitude  (constant gap) between sensors on the same axis....(this happens in more than one axis)

    why is that? I get the same thing on the gyro as well

    does it have something to do with intrinsic calibration of the sensors? if so, how do I get the calibration certificate? or other?


     

  • Please answer these questions so I can better help you resolve your issues:
    1. Are you writing your own app to retrieve the sensor data?
    2. What frequency are you sampling the sensors at?
    3. What acc and gyro data ranges are you using?
    Also, please post the sensor data you have received that demonstrate this issue.
  • hello Eric,


    1. Are you writing your own app to retrieve the sensor data? nope
    2. What frequency are you sampling the sensors at? 50Hz
    3. What acc and gyro data ranges are you using? all are between gyro: +/-1 ang/sec and accelerometer: max 1g

    btw, how do I know what is the code to configure the sensors??

  • i cannot post the data... can i attach a file in here?
  • image

    is that what u mean by config code? the red codes below the sensor name?

  • Since you're not writing your own app, I don't need you to show me code however, please tell me what app you are using and how you are using said app.

    You don't need to host the file, simply paste the contents in the thread or, if the files are too big, put them on a site like Pastebin.  
  • i am using the default metahub app....

    if this is what you meant i'll continue to elaborate


  • Yes. Also, in addition to my previous questions, which platform are you using MetaHub on?
  • do you mean which system? Win10
  • Ok, so what does the data you have been receiving look like?
This discussion has been closed.