I am making a gesture control bot using mpu6050 and avr 8 bit mega microcontroller.I has taken the raw values( Ax,Ay,Az,Gx,Gy,Gz). I wanted to know that what value and in which format I should feed to microcontroller for the condition like forward,backward,right,left to operate on the car.

I was thinking to find pitch and roll angle and feed to the if else condition to operate car. but it only uses accelerometer raw values and so whats the use of gyrometer in mpu. and how could I found the range of angle that I feed in (if ) condition for forward movement of car.

]]>DCM Tutorial paper

I made this observation previously without a reply regarding the formation of the DCM using K^B=-A and I^B=M using acc and mag measurements. These two vectors are not orthogonal hence can not be used in the DCM. However J=KxI is legitimate being normal to K & I.

The proper DCM would be: [(AxM)xA AxM A] where A and M is acc and mag measurements respectively .

]]>I was hasty in my last post. Your method won't work in either example.

Again sorry for spamming

]]> I did want to mention, that in the written scenario I gave where r lied on the z axis and we rotated around z and x simultaneously, can be expanded as you suggested above. That was a bad example……

However that again will not work in general. For example try doing that for the scenario above where w=[1,1,1] and r = [1,2,3].

Sorry for spamming. I just felt I had to clear this up.

Thanks again for the convo.

]]> Try to figure out the matrix proof… It's all that is needed.

0 r3 -r2 w1

R =-r3 0 r1 , w2 = W

r2 -r1 0 w3

If R is a 3×3 matrix and w is a 3×1 matrix R .W = R X W *where "." represents matrix multiplication

R . W = V

Therefore

R^-1 .V = W

but R is singular and therefore not invertible. So this can't be solved

]]>

w x r becomes (wo + wp) x r = w0 x r + wp x r , but wp x r is 0 since wp || r thus you end up with w0 x r where w0 is orthogonal with r.

so the rotation that the object is subject to does not have to be orthogonal to r , but we will only sense the component that is orthogonal to the Z axis with an accelerometer, you can improve somehow the algorithm by decomposing the gyro reading int two components as described above and using complimentary filter only on the compoennt that is orthogonal to r .

I am aware of the the situation you described. In this case the acceleromer's weight of the reading will act as a low-pass filter rather than giving a more exact reading of orientation. In practice this works out ok, especially when a magnetometer is used as well, things tend to average out.

]]>

Or is there a particular reason you're insisting upon this?

The formula you provided is for a unique situation where r is orthogonal to w. This is not the general case. Your formula will not work in general. It will only work in the special case where w is orthogonal to r.

]]>In your example w = (1,1,1) r = (1,2,3) are not orthogonal because their dot product is not zero:

https://www.wolframalpha.com/input/?i=Dot+%5B%7B1,1,1%7D+,%7B1,2,3%5D

]]>https://en.wikipedia.org/wiki/Talk:Angular_velocity

Scroll down to non-circular motion.

The Matrix proof above is enough however.

Thanks for the convo.

But the cross product can be written as a matrix equation.

]]>r = (1,2,3)

w X r = v = (1,-2,1)

v X r = (8,2,-4) *which is not in the same direction as w

R= -r3 0 r1 , w2 = W

r2 -r1 0 w3

If R is a 3×3 matrix and w is a 3×1 matrix R .W = R X W *where "." represents matrix multiplication

R . W = V

Therefore

R^-1 .V = W

but R is singular and therefore not invertible. So this can't be solved

Check equation 2.4 with an example and you will see that it is wrong.

]]>Sorry for wasting your time. ]]>

But kB cannot be always orthogonal too Wa. For example, what if we sit an object flat on the ground and then rotate it about the Z axis. Kb will be in the Z direction and so will Wa

]]>"The Magnitude of Va" = |Va| = |Wa||kB|sin(x) *again x is the angle between kB and Wa

solving for |Wa| : |Wa| = |Va| / |kB|sin(x)

"Wa has direction" = kB X Va

"The Magnitude of kB X Va" = |kB||Va|sin(Pi/2) = |kB||Va| *Pi/2 because kB and Va are orthogonal

therefore written as a unit vector

"Wa has direction" = (1 / |kB||Va| ) kB X Va

Now we multiply this last result by |Wa| (the magnitude of Wa) this gives us the magnitude and direction of Wa

Wa = [ |Va| / (|kB|sin(x) ) * 1 / (|kB||Va|) ] kB X Va = 1 / (kB^2 *sin(x) ) kB X Va

Thanks for the response.