Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Drift correction in Solid-State gyroscope

Status
Not open for further replies.

CCD

New Member
Hi friends,
a few months back I used the solid-state gyroscope ADXRS150 for designing an angular position measurement unit, which would feedback the angular position to control the movement of a rotary platform, whenever the platform was rotated (conventional sensors like pot or the rotary encoder were already ruled out due to some placement constraints)
The drift correction was done digitally by measuring drift for 10sec using a microcontroller(ATmega32) and then storing the value for subtraction from subsequent measurements (proportional to the time of measurement).
The circuit worked great since the measuring times were less than 10sec always and there was a rest period between measurements (giving enough time for drift corrections)

part of the circuit, gyro interface, is given here:
Design with Microcontrollers: Rate or Position measurement using Solid State Gyroscope

Now, I want to use the same unit for position measurement for longer time (>10 minutes). But the drift is quite heavy, giving errors in the position (my earlier drift correction method is not able to prevent drift for longer durations).

Could anyone suggest some better ways of controlling drift of the gyro?? It would be much better if it can be done in software..

-----------
Design with Microcontrollers
 
Are you saying the drift rate is not constant over that period of time?

A varying drift rate could be caused by small power supply voltage or temperature changes so you many need to stabilize those. To stabilize the temperature you could cover the circuit to prevent drafts and allow the circuit to stabilize for at least a half hour with power on before using.

Otherwise I don't know how you can correct for a varying drift.
 
Last edited:
Are you saying the drift rate is not constant over that period of time?

A varying drift rate could be caused by small power supply voltage or temperature changes so you many need to stabilize those. To stabilize the temperature you could cover the circuit to prevent drafts and allow the circuit to stabilize for at least a half hour with power on before using.

Otherwise I don't know how you can correct for a varying drift.

That's right crutschow, the drift is varying with time.
Initially there was a problem with supply, but that's solved by replacing with a better one. And since I'm testing the circuit in a closed AC room, there is no significant variation in temperature..
Any other clue??

------------
Design with Microcontrollers
 
AC can cause small temperature variations due to drafts from the vents. Thus you may need to enclose the circuit to keep the drafts off the circuit. A cardboard box will work for this. And then let the circuit stabilize with power on before using.

If that doesn't work then you may have to see if there's a gryo built with lower intrinsic drift. Analog Devices makes numerous gyros and one may have better characteristics for your application.
 
I tend to add in a compass for that kind of thing because everything else I know of involves a lot of measuremenet and calibration over temperature and/or crazy statistical math which I do not know. A lot of it involves in doing a lot of measurements at different temperatures (at the very least) at different rotation rates and accelerations to figure out the scale factor variation and the bias varations. And then using some crazy statistical math to estimate the bias while it's running.

But for all practical purposes (calibration turntables and temperature ovens cost thousands of dollars), I would say that it is not possible to do such a thing with such a cheap sensor by itself. They don't even specify the random walk for it because it's not something the sensor was ever designed to do alone for such a long time. Try augmenting a compass onto it, then it should be no problem. You don't need a perfect Earth's magnetic field...just a constant one to reference to in your location.

Silicon Sensing - GLOSSARY

Could you use a small hall sensor or something like that just have to have a fixed reference point whenever you pass it?
 
Last edited:
I've not applied temperature compensation yet, though I'm reading the temperature using the on-board temperature sensor of the gyroscope and displaying it on LCD.
In the application notes, they mention about three point temperature compensation, is that something like measuring the drift over three different temperature zones and then giving respective correction for the drift when gyro is in a particular temeprature zone??

------------
Design with Microcontrollers
 
It's not measuring drift at 3 temperatures. It's measuring the scale factor (and maybe the bias along with statistical estimation). But what do you mean when you say you are measuring the drift? I don't think that is correct because it implies you can get a set number for drift. Unless you are saying drift is all the combined error from the changing bias, scale factor, and integration errors. This drift error is not set which is one of the problems. It varies with time, even under set conditions. You can't say that at 2 minutes, it will be off by X degrees.

But it's still pretty hard (and expensive) to even build a turntable to spin the gyro at a known rate and keep it at a known temperature to get those measurements. It's easier, more reliable, and cheaper to just add in a compass if you can.

If you could get the scale factor it would help, but assuming the scale factor is symmetrical, regardless of how incorrect it is, it would cancel out over time assuming your thing turned approximately equal rates. It would only make a real difference in the long run if your thing spent more time turning in one direction than the other or operated under temperature changes. THe bias is probably more of a problem, but it's also harder to correct for since you have to estimate since it is always randomly changing.

How exactly are you "measuring drift"? What is it that you're measuring and what are you doing with it?
 
Last edited:
How exactly are you "measuring drift"? What is it that you're measuring and what are you doing with it?

Ok, what I'm doing is this:
I'm converting the gyro rate-out signal into pulses using voltage to frequency converter (0-10khz for rate out of 0-80 deg/sec in any direction). This pulses are fed to uc counter, which counts them. So, it's equivalent to integrating the rate out. Hence, the counter value is directly proportional to the angular position of the platform.
when a command is given to rotate the platform, the uc starts counting pulses and keeps converting it into degree angle for displaying on LCD.
Now, even if platform is static and uc is given command to measure angle, it starts counting pulses. Ideally, the VFC o/p should be dc (no pulses) but due to the gyro drift and various offsets, the VFC outputs pulses. Hence, the uc displays some angle even if the platform is static (position covered=0 deg). This angle is what I call 'drift'.

So, when i say 'drift measurement', it means I'm measuring the total number of pulses captured (counter value) in static condition for 10sec, and I store this value in memory. During subsequent measurements, I subtract this value (normalised with time) from the counter value of the new measurement.
This thing has worked nicely for short measurements (I had tried without drift correction also, but it gave a huge error in position!). So, I was pretty confident about my 'drift correction' method!
Ofcourse, it's not only drift correction but combination of Drift+offset voltage correction.

Now, the trouble comes when the same thing is used for longer duration!!
 
Oh wow. That's lucky I wish I had access to one of those. I think the rate table will only let you figure out the scale factors more accurately. It won't help too much with the bias.

Okay, I see. So I guess if you measure 5 degrees of drift CCW over 10s during the calibration period, then you add in 5 degrees / 10s = 0.5degrees/s during your integration? So your drift value is an indirect measurement of your bias (and a bit of scale factor too but let's only pay attention to bias for now since with a rate table and controlled temperatures the scale factor uncertainty is solved). A constant drift value implies a constant bias value but we know the bias itself drifts which is the whole problem- it's unknown. Over a 10s period it might remain constant enough for your recently measured drift value to be accurate, but it will change. Even if you directly measure the bias this way and use it in your calculation like that, it will still change.

So with your rate table if you can get more accurate scale factors, and you might be able to use a Kalman filter to estimate the bias. You'd have to learn how they work though and I can't help you there as I don't understand it myself.

Another thing you might consider is to branch off the gyro output through a very effective low-pass filter (effective enough to greatly filter out the AC components due to motion, but not effective enough to filter out the AC component from the drifting bias) and then keep the average of for the last 10s of measurements from that and mathematically use that as your bias. It may not be spot on, but it would help you keep the bias value somewhere near the actual one rather than relying on a bias measured 10 minutes ago.
 
Last edited:
Hi CCD,

a gyro only drifts if its mechanical construction lacks precision.

Gyros are used in aviation with long lasting stable conditions. A gyro started caged and released after spin-up should keep its rotation axis for at least 12 hours without any drift regardless of temperature changes.

If mechanical resistance is high the spin motor has to appy extra torque to maintain rpm. This torque slowly topples the gyro. The drive should work without any acceleration during free gyro mode.

Why don't you get yourself an LN3 platform, salvaged from an outdated McDonnel Douglas F (RF)-4 (Phantom)?

The maximum error of this platform was 2NM between Leck GAF (northern Germany) and Goose Bay (New Foundland), approximately 2,700NM.

Boncuk
 
Gyros are used in aviation with long lasting stable conditions. A gyro started caged and released after spin-up should keep its rotation axis for at least 12 hours without any drift regardless of temperature changes.

If mechanical resistance is high the spin motor has to apply extra torque to maintain rpm. This torque slowly topples the gyro. The drive should work without any acceleration during free gyro mode.

Hi Boncuk,
What you are referring is a mechanical gyro with spin motor, but I'm using here a solid-state gyro without any motor, so no problem of mechanical resistance or the torque variations.
BTW, I checked out the LN3 platform on a website, looks quite huge for my application.

Another thing you might consider is to branch off the gyro output through a very effective low-pass filter (effective enough to greatly filter out the AC components due to motion, but not effective enough to filter out the AC component from the drifting bias)

I'm passing the gyro rate-output through 15Hz low-pass filter before feeding it to the next stages, as my rotary platform doesn't change directions very fast.
Do you think the VFC could be creating trouble here? I'm using LM231 for voltage to frequency conversion. I've used circuit shown in its datasheet as 'precision voltage-to-frequency converter'. They claim VFC nonlinearity 0.024% of fullscale
 
Hi CCD,

admitted, the LN3 is a pretty huge piece of equipment, but small compared to the almost purely mechanical PHI (position and homing indicator) made by TELDIX. :)

I guess you mean VCO (VCF) which is causing trouble in your circuit. For an experiment you might use an LM13700 (National Semiconductor), an operational transconductance amplifier with linearizing diodes and buffers.

The datasheet contains lots of application examples, like voltage controlled amplifiers and filters as well as VCO examples.

Regards

Hans
 
For an experiment you might use an LM13700 (National Semiconductor), an operational transconductance amplifier with linearizing diodes and buffers.

The datasheet contains lots of application examples, like voltage controlled amplifiers and filters as well as VCO examples.

Hi Hans,
that's quite a nice piece of an IC, with datasheet loaded with application circuits. I'll get hold of one for testing out its VCO capability along with the VCO which I'm using currently(LM231) to rule out possibility of its contribution in the drift.
I have still got over a week to try out some more possibilities of capturing drift.

Thanks!
 
Hi CCD,

I hope very much you get the drift problem solved with this chip.

All the best.

Kind regards

Hans
 
Do you think the VFC could be creating trouble here? I'm using LM231 for voltage to frequency conversion. I've used circuit shown in its datasheet as 'precision voltage-to-frequency converter'. They claim VFC nonlinearity 0.024% of fullscale
Can you monitor the output of the ADXRS150 with a digital voltmeter? That will tell you if the gryo or the VFC is drifting.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top