Accelerometer data from LSM9SD0

161 views
Skip to first unread message

Gustavo Sousa

unread,
May 27, 2015, 6:02:59 PM5/27/15
to drones-...@googlegroups.com
Hi guys,

I'm working on the backend driver for LSM9SD0. I started by working on the accelerometer and just wanted to know if I'm in the right path.
I'm with the following settings:
    - Sample rate of 800Hz
    - On-chip anti-alias filter bandwidth of 50Hz
    - Full range of 8g
    - Software filter (LowPassFilter2pVector3f) with sample frequency as 800Hz and cutoff frequency as 15Hz

I'm attaching two plots of one of the tests:
    1. The first one (accel_data.png) shows the data collected after the first 1000 samples;
    2. The second one (accel_data_1000_to_2000.png) shows only 1000 samples to give a closer view of what is happening.

Some information on the plots:
    - Channels Ch1, Ch3 and Ch3 refer, respectively, to x, y and z axes.
    - I skipped the first 1000 samples in both plots in order to allow a more realistic standard deviation calculation.
    - The blue and green line refer, respectively, to the raw and filtered data.
    - The values are already scaled.
    - The calibration offset isn't applied to this data yet.

I'd like to know how bad/good does it look.

So, comments and thoughts are greatly appreciated.

Thanks guys,
Gustavo Sousa
accel_data.png
accel_data_1000_to_2000.png

Randy Mackay

unread,
May 27, 2015, 10:51:48 PM5/27/15
to drones-...@googlegroups.com

 

     It would be good to set the range to 16g.

 

     Normally when we see the data it’s in m/s/s but I guess this data is in Gs?  So the Z is -1 which makes sense if it’s in Gs but normally we’d expect to see -9.81m/s/s.  Maybe that’s just the way it’s been plotted.

 

     If this is a bench test then the values look pretty noisy to me.  I wouldn’t expect 1.5m/s/s of noise in a bench test – but if it’s in your hand then it’s probably fine.

 

-Randy

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gustavo Sousa

unread,
May 28, 2015, 7:30:28 AM5/28/15
to drones-...@googlegroups.com
Hi Randy,

Thanks for the input.

Yes, the data is in units of G.

Looking at the standard deviations, the maximum one of the filtered data is at axis Z: 0.0282. Converting that to m/s/s we'll have a standard deviation of 0.0282*9.80665~=0.2766 m/s/s, which is less than 1.5 m/s/s.

Can I conclude then that the data is acceptable?

By the way, I'll test with a range of 16 G and come back with new graphs.

Cheers,
Gustavo Sousa

You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/UlSPql6eY2A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.

Randy Mackay

unread,
May 28, 2015, 7:43:32 AM5/28/15
to drones-...@googlegroups.com

Gustavo,

 

     Ah, my ability to multiply by 10x is not what it used to be.  Ok, a quick peek at some MPU6k acceleration data makes it look like that’s in the same ballpark so ‘yes’, looks ok I’d say.

Gustavo Sousa

unread,
May 29, 2015, 3:33:06 PM5/29/15
to drones-...@googlegroups.com
Hey guys,

I did the plotting with 16g range too.
I'm attaching the following plots:
    - New versions of the two previous plots (with 8g range).
    - Two new graphs with 16g-range acceleration data.

All graphs maintain a range on the ordinate from -1.2 to 0 g. Also, similarly to the previous graphs, the plotting starts after the first 1000 samples. For each pair or graphs, one has 25000 samples and other has 2000 (for a closer look).

So, with respect to what Randy pointed, the standard deviations of the filtered data for the big plots for tuple (x,y,z) in m/s/s are:
    - 8g-range: (0.1206, 0.0598, 0.2815)
    - 16g-range: (0.1275, 0.0716, 0.3128)

Since, they are lower than 1.5 m/s/s, I suppose they are good enough.

:)

Regards,
Gustavo Sousa
accel_8g_2000.png
accel_8g_25000.png
accel_16g_2000.png
accel_16g_25000.png

Víctor MV

unread,
May 31, 2015, 3:00:56 PM5/31/15
to drones-...@googlegroups.com
Hi Gustavo,

If you provide a pointer to your working branch we'll be happy to double check your results.
Regards,

Gustavo Sousa

unread,
Jun 2, 2015, 8:12:24 AM6/2/15
to drones-...@googlegroups.com, Víctor MV
Hi Víctor,


It's still a work in progress. I adapted it from your implementation (the one that extended AP_InertialSensor instead of being a backend) with some necessary changes and fixes. I also took a look at https://github.com/diydrones/ardupilot/blob/master/libraries/AP_InertialSensor/AP_InertialSensor_PX4.cpp so I could use similar configuration.

Apparently, the gyroscope is working fine. I still haven't been able to get accelerometer calibration to work though.

Thanks!

Best,
Gustavo Sousa

--

Gustavo Sousa

unread,
Jun 2, 2015, 8:14:04 AM6/2/15
to drones-...@googlegroups.com, Víctor MV

Gustavo Sousa

unread,
Jun 2, 2015, 8:17:05 AM6/2/15
to drones-...@googlegroups.com, Víctor MV
Oh man! The first link was wrong too hahaha
This is the link to my patch:

Sorry guys!
Reply all
Reply to author
Forward
0 new messages