Accelerometer noise - Page 1
Forum section: electronics / general

author: shangaoren
author_rank: Regular Contributor
timestamp: December 09, 2020, 07:51:40 am
content: Hello,i don't know if i'm in the right section, if not please move or delete this message.I have a project where i have to detect a robotic arm move along one axis (translation) for this i tryied to compute his speed.My attempt was to take 1000 values of the sensor during a stand by phase to get a mean which represent the offset of the sensor.For the measure i use this formula to get the speed : current speed = old Speed + (current accel - offset )*time elpased since old valueMy problem is that i can see the increase and decrease of speed in my system but there is a drift, my speed is continuously increasing slowly, i don't know what i should do ? any ideas ?

author: macaba
author_rank: Regular Contributor
timestamp: December 09, 2020, 08:18:48 am
content: What accelerometer?You may want to use best-in-class ADXL355 to prove (or likely disprove) the concept, then cost optimise for a different part later if that is a concern.

author: shangaoren
author_rank: Regular Contributor
timestamp: December 09, 2020, 08:47:48 am
content: I'm using lsm330dlc from ST, i don't need a huge precision just be able to detect characteristic movements

author: Berni
author_rank: Super Contributor
timestamp: December 09, 2020, 10:39:31 am
content: Yep drift is always a problem with inertial sensors.Even the smallest errors of 0.001% eventually show up as drift as long as you let it run for long enough. So typically you need some extra sensor to augment and correct the errors or get a very high precision sensor.Inertial sensors accurate and stable enough to be directly used for inertial navigation are very expensive (more than the price of a new car)

author: shangaoren
author_rank: Regular Contributor
timestamp: December 09, 2020, 11:12:25 am
content: there is something i don't understand, the noise shouldn't be symetrical around my offset ?Is there no way to filter this ?

author: thinkfat
author_rank: Unknown
timestamp: December 09, 2020, 11:58:30 am
content: Quote from: shangaoren on December 09, 2020, 11:12:25 amThe noise may not be Gauss distributed. Also, you will have numerical instabilities, especially if you're doing integer-only math.Do you know in what frequency band the characteristic signal is? A low-pass only removes high frequency noise, to get rid of drift (effectively a slowly changing dc offset) maybe a band-pass will help?

author: macaba
author_rank: Regular Contributor
timestamp: December 09, 2020, 12:15:05 pm
content: Quote from: shangaoren on December 09, 2020, 08:47:48 amI didn't recommend the ADXL355 for precision, I recommended it for low noise. Assuming that everything else is correct (software, wiring, mounting) then I suspect you're seeing very low frequency noise. The LSM330DLC has 8.8x the noise in comparison.

author: Berni
author_rank: Super Contributor
timestamp: December 09, 2020, 12:28:12 pm
content: You are mixing the "noise amplitude" with "zero drift". They are two completely different things.This is where theory and practice diverge. In a perfect world with the perfect accelerometer your method would work. But a real sensor has all sorts of imperfections.The reason you can't "just filter the noise away" is that your noise distribution is constantly gathering around a different spot. This spot drifts around due to temperature, supply voltage variation, aging, radioactive particles hitting the ADC..etc

author: shangaoren
author_rank: Regular Contributor
timestamp: December 09, 2020, 01:08:52 pm
content: Quote from: Berni on December 09, 2020, 12:28:12 pmSo ? no solution ?

author: shangaoren
author_rank: Regular Contributor
timestamp: December 09, 2020, 01:25:43 pm
content: Quote from: thinkfat on December 09, 2020, 11:58:30 ami'm using float numbershow should i do to measure the noise frequency ?

author: thinkfat
author_rank: Unknown
timestamp: December 09, 2020, 02:42:45 pm
content: Quote from: shangaoren on December 09, 2020, 01:25:43 pmCompute an FFT.

author: Berni
author_rank: Super Contributor
timestamp: December 09, 2020, 04:31:49 pm
content: Quote from: shangaoren on December 09, 2020, 01:08:52 pmWithout adding additional hardware, no.If you do find a solution that does it then you should license the algorithm to the accelerometer manufacturers as im sure they would gladly pay you a few million dollars for a math solution that can make there cheap $1 MEMS accelerometers have the drift specifications equal to the >10 000 dollar accelerometers used for inertial guidance in intercontinental missiles.Quote from: shangaoren on December 09, 2020, 01:25:43 pmPretty sure your accelerometer is spitting out fixed point values, i have yet to see a MEMS accelerometer chip that outputs in floating-point.

author: shangaoren
author_rank: Regular Contributor
timestamp: December 09, 2020, 04:49:46 pm
content: Quote from: Berni on December 09, 2020, 04:31:49 pmYes output values are signed 16Bits values but i do all the calculus on the micro using float numbers

author: shangaoren
author_rank: Regular Contributor
timestamp: December 09, 2020, 05:00:47 pm
content: There is something i don't get, how cheap UAVs with cheap IMUs are able to stay flat in the air with such drift in accelerometer ?

author: thinkfat
author_rank: Unknown
timestamp: December 09, 2020, 05:07:28 pm
content: Quote from: shangaoren on December 09, 2020, 05:00:47 pmDo they, actually?PS: even cheap IMUs are not just accelerometers. They typically combine at least an accelerometer, a gyroscope and maybe even a compass. They then combine measurements from all sources into a system model and integrate them using a Kalman filter. And they're still not able to maintain their position without drift.

author: shangaoren
author_rank: Regular Contributor
timestamp: December 09, 2020, 05:14:52 pm
content: Yeah i worked in the racing drone sector (not on the sensor and regulation part sadly) and these can maintain flat and if no wind to push them keep their position using only an IMU, that's pretty impressive

author: Berni
author_rank: Super Contributor
timestamp: December 09, 2020, 05:29:03 pm
content: The MEMS gyroscopes in the drone IMUs for level flight also have drift issues, but they solve it by also having accelerometers and magnetometers to correct it. The short term responsive data comes from the drifty gyro, but the non drifty (because it's not being integrated over time) attitude is used from accelerometers and magnetometers, those instead have noise and interference issues that the clean but drifty gyro is used to correct for.So none of the sensors on their own are actually good enough for the job, its only once data from all sensors is combined together to correct each other's shortcomings does it become usable.But this was just for getting a fast reliable stable attitude measurement. To correct for positional drift over the long term an additional position sensor needs to be included. This can be in the form of a barometric altitude sensor to correct for Z and the use of GPS for X and Y locations. This gets combined together in a similar way to get the result.There is also a scientific article out there how someone used a MEMS gyroscope to mesure the earths own rotation (Such gyros are way too drifty to normaly do this) by using a mechanical stage to flip the orientation of the gyro and constantly calibrate out its own drift, after a lot of data processing and averaging out poped the correct rotation rate of the planet.

author: shangaoren
author_rank: Regular Contributor
timestamp: December 09, 2020, 05:41:24 pm
content: Quote from: Berni on December 09, 2020, 05:29:03 pmI know that magnetometer isn't mandatory as we doesn't use it although it was present. I remember that the one that did the regulation and sensor measurement said that accelerometer was very noisy and gyro drifted over the time yes. But in my case i have no rotation possible that's why i thougth i didn't need gyroscope ( there is one in my sensor)I have some position and moment that i know my board isn't moving but the drift is too fast to reset position

author: thinkfat
author_rank: Unknown
timestamp: December 09, 2020, 07:57:27 pm
content: There's certainly a reason why RTK ready GPS receivers are popular with the drone crowd.

author: shangaoren
author_rank: Regular Contributor
timestamp: December 10, 2020, 07:36:43 am
content: Quote from: thinkfat on December 09, 2020, 07:57:27 pmdon't misunderstand me, i'm talking about racing drone which doesn't care about absolute position, autonomous drones needs a bit more sensors