Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Calculating gyroscope turn regardless of angle

Status
Not open for further replies.

brownt

Member level 3
Joined
Sep 25, 2017
Messages
63
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
597
Hi,

I am using an electronic gyroscope and accelerometer, and I want to calculate the degrees the device has turned regardless of any angle changes whilst it is turning. So for example with the Z gyroscope I can calculate a 90 degree turn accurately, but of course when I tilt the device, the Z gyroscope readings slow down relative to the angle. The steeper the angle the slower the readings. I guess tilt compensation is possible using trigonometry, but I have tried various things and I have not been able to get it right.

I want to be able to measure the degrees turned around a particular axis regardless of how the device is tilting during that turn.

I have also tried summing all the X, Y and Z values together, which might work but the gyroscope values change during any angle change, and that is added to the equation.

any ideas?

thanks
 

This is basically a matter of coordinate frame and how they transform once the object is subject to external forces.

The Z gyroscope axis is fixed on the device; If the device is rotated by 90 deg and you take a turn about the (old) Z axis, it will not be recorded by the device.
 

This is basically a matter of coordinate frame and how they transform once the object is subject to external forces.

The Z gyroscope axis is fixed on the device; If the device is rotated by 90 deg and you take a turn about the (old) Z axis, it will not be recorded by the device.

Yes that is understood. thanks. But how do I implement a coordinate frame?
 

This is basically a matter of coordinate frame and how they transform once the object is subject to external forces.

The Z gyroscope axis is fixed on the device; If the device is rotated by 90 deg and you take a turn about the (old) Z axis, it will not be recorded by the device.

What is the mathematical relationship between gyroscope output and angle.
When there is no angle the degrees per second around a gyroscope axis is at maximum, say 2000 dps. When the device is on a 45 degree pitch, what is now the gyroscope output, is it half. And is it linear through the angle change?
 

thanks. I have considered cosine. That would give a gyroscope output of 0.707 at 45 degrees pitch. Is that correct though. The physical tests I have done show 0.5 gyro output at 45 degrees pitch.
 

thanks for that. The reason why cosine does not rule is because it does not work. My physical tests show that when the device is on a 45 degree pitch, the output from the gyroscope is halved, but the cosine of 45 degrees is 0.707. How do I use that to produce a doubling of the output.
 

I have looked at the paper and it is beyond my understanding. The only part of the technicalities I understood was the final equation. angle = sqrt(x * x + y * y + z * z). Perhaps if I take the cosine of that angle and divide it into the relevant gyroscope output it will compensate for the angle change?
 

I don't see a reason why cosine law shouldn't rule in this case.

A paper related to your original question www.mdpi.com/1424-8220/11/9/8536/pdf

- - - Updated - - -

The reason why cosine does not rule is because it does not work.
That's not a reason. It's an observation apparently contradicting an assumption. To give a reason why the assumption is wrong, you have to derive the correct relation from physical law.
 

angle = sqrt(x * x + y * y + z * z)...

This cannot be an accurate formula: angle is dimensionless and the right-hand-side is L²

I do not understand what are these x, y and z quantities are ...

- - - Updated - - -

A paper related to your original question www.mdpi.com/1424-8220/11/9/8536/pdf...

The paper appears to be correct (not because I too have published a paper in the same journal) but it is true that transformations using rotational axes (also use Euler angles) can be confusing.

But what the application notes say?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top