Gyroscope combined angular velocity

358 Views Asked by At

I have been beating my head against the wall for a week now so I thought I would now ask the question. I have a 3 axis accelerometer and 3 axis gyro. I am getting very accurate angles by combining the 2 with a combination filter. My issue is that I am attaching the gyro to a sword to get accurate information about swings but i need to know the angular velocity of the sword regardless of how the handle is in the users hand. I need to be able to calculate a downward swing or sideways swing even if down is actually no longer on the z axis anymore because the user has rotated the sword(which in turn rotates the gyro off its normal resting axis') on the x-axis . Does this all make sense? Any help would be greatly appreciated and I am not a physics professor so dumb things down for me if you can. I appreciate the help. I have found alot of good info on this site. Just not what I am looking for.

1

There are 1 best solutions below

0
On

I know the question is old, but I will provide some insight incase you are still working on the problem. Unfortunately, this problem is not as straightforward as it may seem. First, I do not know if you are attaching the accelerometer and gyro to the base of the sword or the tip of the sword. This would make a difference in how you would calculate the movement of the sword, but the math is mostly the same regardless. You should focus on two things.

  1. Tracking the position and orientation of the sensor. To do this, you need the equations that give you position, x, y, z, velocity, vx, vy, vz, and attitude, roll, pitch, yaw, provided accelerometer measurements and gyro measurements. Try looking into inertial navigation system (INS). There are many different formulation that lead to the same result and may provide insight to your problem. You may have to do quite a bit of reading to understand how to do this depending on your current knowledge of calculus, dynamics, and control.
  2. Updating the position based on motion. As time passes, the position and orientation will drift dramatically. You need to reduce the drift somehow. Perhaps, you can reset the position and orientation each time the sword is in the resting position. You could possibly detect if the sword is not moving very much and assume it is in the resting position and reset the position and orientation.
  3. If you are able to track the position of the sensor, you can then use the length of the sword and the position of the sensor to calculate your angular velocity and other parameters.

Keep in mind that

  • Position is a function of your previous position, time, and velocity

  • Velocity is a function of your previous velocity, time, attitude, and acceleration (from accelerometers)

  • Attitude is a function of your previous attitude, time, and rotation rate (from gyros)