kriswiner / LSM9DS0

LSM9DS0 9DOF sensor AHRS sketch
39 stars 16 forks source link

Sample rate questions #5

Open ssfrr opened 9 years ago

ssfrr commented 9 years ago

I have a few questions related to sample rates:

  1. Are there guidelines for choosing the anti-aliasing filter cutoffs, or more information about the filters? Typically I'd want to get rid of frequencies higher than half the sample rate (Nyquist) but without knowing how steep the filter is it's hard to know what the relation between the sample rate and the anti-aliasing filter should be. I'm assuming these filters are analog prior to the sensor's internal ADC, right?
  2. The LSM9DS0 is weird in that the accelerometer and gyro units don't sample simultaneously. In your code you're not doing anything fancy to manage the different sample rates or synchronize with the fusion update rate, so from a signal processing standpoint it's equivalent to doing no interpolation (i.e. the signals look like stair-steps). I guess this basically ends up being an additional noise source which the fusion should filter out, but I was wondering if there would be any benefit to interpolating the sensor data readings, basically resampling so that the different signal are synchronized.

If you have any insight based on your experience or from the literature it would be super helpful.

kriswiner commented 9 years ago

Hi Spencer,

Typically the bandwidth is set at 10-20% of the sample rate; I usually use 200 Hz sample rate and 40 or 50 Hz bandwidth with good results, but the choice does depend on the application. Yes, the signals are analog until converted to digital by the ASIC.

All 6- and 9-axis motion sensors are the same this way, they read one sensor at a time ASFAIK. However, you can have the data loaded into the FIFO at a fixed rate and then burst read the FIFO; this is a way to have the data time stamped but it isn't really representative of when the analog sensor experienced the signal, rather when the digitized data was loaded into the FIFO. Still, this can work for a lot of applications.

I'm afraid I don't have much more to offer.

Kris -----Original Message----- From: Spencer Russell [mailto:notifications@github.com] Sent: January 1, 2015 2:14 PM To: kriswiner/LSM9DS0 Subject: [LSM9DS0] Sample rate questions (#5)

I have a few questions related to sample rates:

  1. Are there guidelines for choosing the anti-aliasing filter cutoffs, or more information about the filters? Typically I'd want to get rid of frequencies higher than half the sample rate (Nyquist) but without knowing how steep the filter is it's hard to know what the relation between the sample rate and the anti-aliasing filter should be. I'm assuming these filters are analog prior to the sensor's internal ADC, right?
  2. The LSM9DS0 is weird in that the accelerometer and gyro units don't sample simultaneously. In your code you're not doing anything fancy to manage the different sample rates or synchronize with the fusion update rate, so from a signal processing standpoint it's equivalent to doing no interpolation (i.e. the signals look like stair-steps). I guess this basically ends up being an additional noise source which the fusion should filter out, but I was wondering if there would be any benefit to interpolating the sensor data readings, basically resampling so that the different signal are synchronized.

If you have any insight based on your experience or from the literature it would be super helpful.

Reply to this email directly or view it on GitHub https://github.com/kriswiner/LSM9DS0/issues/5 . https://github.com/notifications/beacon/AGY1qp-93f_I8_sHpocNVF-b21yV914iks5 ndb4VgaJpZM4DNqsf.gif