Rotation degree on an imaginary axis

Hello math wizards I have a problem,

I need to get the degree of rotation on an imaginary axis using an accelerometer. I already have the degree of rotation on the X and Y axis using the the mathematical formula that we all know so well:

R = AccelX^2 + AccelY^2 + AccelZ^2
Ydegree = acos(AccelY/R)
Xdegree = acos(AccelX/R)

So what kind of calculations would I make if I wanted to measure degrees of rotation on an axis that is, for example, 60 degrees from the Y-Axis and 30 degrees from the X-Axis.

Here is a scenario to help you understand what I need. Imagine we have a tricopter. An accelerometer is placed directly in the center of the tricopter. Now i can measure pitch and roll of this tricopter using the math mentioned above. But what if i wanted to measure the the amount tilt of one of the arms/motors on the tricopter that is not aligned directly to either the X or Y axis. Lets say this arm/motor is 60 degrees from the Y axis and 30 degrees from the X axis (this is true if all the arms/motors are equidistant from each other), then how would I go about getting the tilt of this imaginary axis that represents the arm/motor of the tricopter?

Thanks for any responses pointing me in the right direction, some other people might be wondering this same question. :wink:

Well if your accelerometer is located on the axis of rotation, it won't measure any acceleration due to the rotation.

But if the accelerometer is located at some location which is not on the axis of rotation, it will measure an apparent acceleration
directed towards the axis of rotation. The accelerometer will observe the apparent "centrifugal force" effect on its active mass,
due to the circular motion, and will interpret this as an acceleration. The magnitude of the acceleration is proportional to the square of the instantaneous velocity of the location where the accelerometer is, and inversely proportion to the distance from the accelerometer to the nearest point of the axis of rotation.

You would need two or more accelerometers, to be able to distinguish the rotational acceleration from the linear acceleration of the entire object.

michinyon:
Well if your accelerometer is located on the axis of rotation, it won't measure any acceleration due to the rotation.

But if the accelerometer is located at some location which is not on the axis of rotation, it will measure an apparent acceleration
directed towards the axis of rotation. The accelerometer will observe the apparent "centrifugal force" effect on its active mass,
due to the circular motion, and will interpret this as an acceleration. The magnitude of the acceleration is proportional to the square of the instantaneous velocity of the location where the accelerometer is, and inversely proportion to the distance from the accelerometer to the nearest point of the axis of rotation.

You would need two or more accelerometers, to be able to distinguish the rotational acceleration from the linear acceleration of the entire object.

Maybe I am misunderstanding what you have said, but I am not currently trying to measure linear acceleration. With the math i provided above, I have converted the rotational acceleration to degrees of rotation on the X, Y and Z axis. Now I am trying to find the degree of rotation of my theoretical tricopter on the Pitch/Roll Axis as if I have rotated the accelerometer 60 degrees on the tricopter frame so that the X or Y axis now lines up with either the left or right motor.

There is no one that can help me with this? I have done some trig calculations of my own but I need to verify that my math is correct.

I use vectors and quaternions, and I find all these X's and Y's confusing. People quote equations such as you did in the first post on this thread, and my question would be, relative to what ? X and Y in which frame of reference ? If you want to just "assume" some frame of reference, then you need to state what assumption that is, I guess.

If the "arms" of you tricopter are rigid, then the answer to your question is surely trivial, isn't it ?

If you are only considering pitch and roll of your tricopter, and ignoring other movements, then, at any point in time, you can have an imaginary line in the horizontal plane through the centre of mass, so that any part of the object on one side of the line is tilted down, and the other side is tilted up. The additional inclination of the tricopter arm will depend on its orientation in respect of that line, in the azimuth plane.

For example, if the object has rolled to the right, then the imaginary line I was refering to, will correspond to the longitudinal axis of the craft. Any part of the object on the right of the line will be rolled down, and the part of the object on the left will be rolled up. If the roll angle is 'a', and the arm is located at some angle b from the front, measured clockwise, then the angle of the arm is going to be proportional to a.sin(b).

michinyon:
For example, if the object has rolled to the right, then the imaginary line I was refering to, will correspond to the longitudinal axis of the craft. Any part of the object on the right of the line will be rolled down, and the part of the object on the left will be rolled up. If the roll angle is 'a', and the arm is located at some angle b from the front, measured clockwise, then the angle of the arm is going to be proportional to a.sin(b).

It seems to me right here that you have the correct idea of what I am looking for. You have actually just helped me straighten out my thinking a little bit. Lets make sure I have this right:

So just like you said, if we are working with the roll angle 'a', and the arm angle 'b', I am able find the degree to which the arm has been rotated when rolling by doing a * sin(b) because of proportionality. Now lets say that I use 'c' to represent the pitch angle and 'd' to represent the angle between the arm and the pitch axis. I could now measure the angle of the arm if we are pitching by using c * sin(d). So does this mean that I can find the total angle of the arm due to both pitching and rolling by simply adding these two parts?:

arm rotation angle = a * sin(b) + c * sin(d)

If so, this confirms my math so far. And thanks for your time so far :D! It might be time that I study up on rotation matrices and quaternions to make everyone else's lives more easy!

You don't mean "imaginary axis", that has a very specific meaning in mathematics! "Arbitrary axis" is I think what you mean.

If you have the complete orientation information (which is usually a DCM or quarternion) then you can answer any such question
with geometry. But you have to be very careful to establish your frame of reference. Normally you would need 6 DoF (3 axis gyro +
3-axis accelerometer) to develop a resiliant and drift-free(*) estimate of orientation for a moving craft.

(*) Z-axis rotation will still drift unless you have a compass or other means to correct it.

If you don't have full 3D orientation information then errors get harder to control. If you don't have at least two axes of gyro
you'll have trouble stabilising a multi-copter.

MarkT:
You don't mean "imaginary axis", that has a very specific meaning in mathematics! "Arbitrary axis" is I think what you mean.

If you have the complete orientation information (which is usually a DCM or quarternion) then you can answer any such question
with geometry. But you have to be very careful to establish your frame of reference. Normally you would need 6 DoF (3 axis gyro +
3-axis accelerometer) to develop a resiliant and drift-free(*) estimate of orientation for a moving craft.

(*) Z-axis rotation will still drift unless you have a compass or other means to correct it.

If you don't have full 3D orientation information then errors get harder to control. If you don't have at least two axes of gyro
you'll have trouble stabilising a multi-copter.

Thank you for your help but I have all this figured out. I am working with a three axis gyro and accelerometer, magnetometer and GPS all of which compensate for each other using kalman and complementary filters. I have compensated for the drift of the gyro and linear acceleration sensitivity of the accelerometer by using filters. I need the answer to my question which is how do I find the rotation in degrees on an "Arbitrary axis". This is a pretty simple question, and I appreciate your input, but and I am not asking for anything other then what I asked for in the original post.

Here's what I have so far regarding finding an arbitrary axis:
a = degrees of roll
b = degrees of separation between the roll axis and the arbitrary arm axis
c = degrees of pitch
d = degrees of separation between the pitch axis and arbitrary arm axis

arbitrary angle = a * sin(b) + c * sin(d)

The simplest way to handle 3D geometry is with 3-vectors, dot and cross products, forget using Euler angles or spherical
coordinates for solving geometrical problems, its too hairy and complicated.

OK thanks a lot for the advice.