1
\$\begingroup\$

I would like to create a software simulation of an accelerometer (MPU-6000). As part of that simulation, I need to model the noise on the accelerometer signal. According to the datasheet of the chip, the noise is 400ug / root Hz:

MPU-6000 Accelerometer Specifications

In C++, I can use boost:random to generate normally distributed random numbers. However, the boost function takes a sigma value as a parameter.

Question: How can I calculate the value of the sigma parameter to correctly model the noise from the accelerometer?

Update:

If a normal distribution is inappropriate, how can I model the noise in software?

\$\endgroup\$

2 Answers 2

4
\$\begingroup\$

The sensor specifies its noise in terms of the input signal (acceleration), so the first thing you need to do is convert that to equivalent voltage noise, taking into account the gain settings you're using in the sensor and the interface circuitry.

The signal power in a series of normally-distributed samples is equal to the variance, which is the square of the standard deviation (sigma, σ). However, the numbers in your simulation represent voltages (or currents), not power. Therefore, you want to set σ equal to the equivalent noise voltage you calculated above, and then add these numbers to your simulated acceleration signal.

\$\endgroup\$
4
  • \$\begingroup\$ Do you need to multiply by the square root of the bandwith to calculate your noise, or is the power in ug per root Hz? \$\endgroup\$ Apr 16, 2014 at 13:03
  • \$\begingroup\$ So, if I have 16,384 LSB/g, then I have 6.55 LSB/root Hz. So the sigma is the square root of this: 2.56? Would that be correct? \$\endgroup\$ Apr 16, 2014 at 13:06
  • \$\begingroup\$ @Rocketmagnet: No, use the 6.55 number. These samples represent voltage, not power. \$\endgroup\$
    – Dave Tweed
    Apr 16, 2014 at 13:47
  • \$\begingroup\$ @ScottSeidman: No, the bandwidth is implicit in the sample rate being used in the simulation. We're talking about white noise here, so the total noise power automatically goes up with the sample rate (bandwidth). Each noise sample represents a certain amount of energy, and as you cram more of them into each second, you get more power. \$\endgroup\$
    – Dave Tweed
    Apr 16, 2014 at 13:50
1
\$\begingroup\$

Your updated question is bit more complex than the original question.

For what follows I assume ideal lab conditions.

To test the assumption of normality of the noise data you should take several measurements at a fixed sample rate at a fixed acceleration and use that data for a normality test. There are many of these tests but the two in most undergraduate text books are the Pearson \$\chi^2\$-test and the Kolmogorov-Smirnoff test.

I assume that you probably want to model the device as linear + noise. The usual linear regression also needs one extra hypothesis: The variance is statistically constant over different accelerations. The lack of this condition is called heteroscedasticity and there are methods for dealing with it.

My very rough guess is that this device is not actually linear and when you do these tests you will find the distributions are skewed by this fact.

There is a bit of a short-cut you could take. You don't really care if you actually model things exactly, you more care if you believe your final model is accurate enough. This is a different of area of statistical modeling called validation. Basically, you will build your model as linear + noise where noise is assumed normally distributed with the parameters from the data sheet. You then try to confirm that this model models the real life behavior of your physical device.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.