Accelerometer question for IMU Experts

I'm sure there's plenty of experienced IMU builders on this board who can resolve this question (see here: http://www.diydrones.com/forum/topics/gyrospes-vs-acceleometers?x=1&id=705844%3ATopic%3A85220&page=1#comments (starting at the 5th comment) and here: http://www.rcgroups.com/forums/showthread.php?t=1066119&page=30 (starting at post #443) for more discussions). In fact the question may even have been answered here earlier (in which case I apologize for re-asking it, but I couldn't find it). The question has both a practical aspect in terms of IMU component & s/w design and a theoretical one in terms of trying to understand the relevant physics. Read carefully, because I don't think this is a noobie question.Assume a 3-axis accelerometer is mounted close to the center of gravity of a quadrotor with the Z axis of the sensor aligned reasonably well with the thrust axis of the rotors and the X and Y axes aligned with 2 of the arms of the quad. If the flying quad is at a non-zero bank angle (i.e. is rotated about the x-axis from a level hover), what will the Y axis accelerometers read? In this case, the vehicle will be accelerating laterally in the earth axes (and possibly vertically depending on the magnitude of the thrust vector compared to the gravitational one). One school of thought claims that the Y accelerometer in this case should read effectively zero (assuming that aerodynamic drag, vibration due to rotors, noise, errors due to sensor misalignment, coriolis and centripetal forces, etc. are either negligible or accounted for). The reasoning is that all the forces should be coming from the rotor thrust, which is always in the Z body axis for a quad. By a similar argument, the X axis accelerometer should also read zero for any pitch angle. (I think the argument holds to some extent for helicopters as well, but the force vector will not always be in the Z body axis direction due to rotor flapping.)The opposing argument is that there are plenty of quadrotors out there that use accelerometers to self-level, perhaps as part of a Kalman or complementary filter algorithm. It would seem unlikely for them to work as well as we know they do if the X and Y sensors were reading zero regardless of the vehicle tilt. How do we resolve this conundrum? Is the model of how accelerometers work flawed? I believe it is valid to model the resultant output of any accelerometer by determining the net force and subtracting the gravitational force vector. This works if the sensor is stationary (it will read as if it were accelerating away from the ground at 1 g), or if it is in free-fall (reads zero). Is this model correct in general for arbitrary motion? Are these other forces on the quad that I'm ignoring important somehow?I'd prefer if your answer includes one or more of the following: time history graphs of a FLYING vehicle (we know we can measure tilt of a stationary sensor), or a free body diagram, or a set of equations, or a reference to a textbook or paper. As I said, I'm trying to understand the physics of the situation.Here's a picture, if it helps: http://www.diydrones.com/forum/attachment/download?id=705844%3AUploadedFi58%3A91201 This shows the forces in the earth vertical axis as being balanced, but I don't think that condition is necessary for the X body axis accelerometer to read zero.Thanks in advance.- Roy
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Roy,

    The question you keep asking, and it is a good one, is what will the accelerometers read. The answer is relatively simple. The accelerometers will measure the acceleration caused by the net external forces acting on the body, except gravity. If you consider the situation we talked about earlier where the thrust (Z-axis) is equal to the weight of the aircraft, and the body is rotated about the Y-axis by some small angle, and there is no (or very little) velocity in the X-axis (and therefore no drag), then the only net external force causing an acceleration is the thrust. The Z accelerometer will read -1 g and all others will read zero. Since the forces are not balanced, the aircraft will accelerate in the Z and X axes. If you consider the same situation, but there is some drag force resisting the forward velocity, then you have another external force acting in the X and Z axes. If the aircraft is not accelerating in any axis, then the pitch and roll angles can be easily calculated from the accelerometer readings. If the aircraft is accelerating, then that same calculation will give inaccurate values. That is where gyros give you meaningful data.

    I can't speak to what is happening inside an autohover system in a high-end helicopter. My best guess is that there are gyros in addition to the accelerometers. The accelerometers could be used to detect lateral and vertical movements only, and some other system (gyros?) detect rotations. My experience is with inertial navigation systems.
  • The human pilot is a factor because he can manually compensate for drift in the pitch and roll estimates, even if the accels aren't working, and even without realizing that he is doing it (humans are good at doing feedback control unconsciously...)
  • bGatti,

    Ummm, OK. Now imagine there's an accelerometer inside the marble that can magically align itself with the table top. Tell me what it will read.

    Also, I don't think the human pilot is a factor in this question.

    - Roy
  • Roy,
    imaging you have set a marble on a table. accel is all on Z, x & Y are zero as you state. Now you tip the table, The marble starts sliding down, this lowers the accel on z and increases the accel in some lateral direction. This accel continues until drag stop the marble from increasing its speed. Assuming one increases thrust, the z accel can be returned to 1, but the sideways motion continues to increase - that is acceleration.

    Also, you've introduced a human pilot with global awareness. That changes everything...
  • Roy, Xander,

    My personal opinion is that accels seem to "work" because gyro integration works well enough in the short-term, and in the long term, the mistaken use of the accels simply pulls pitch and roll estimates slowly to zero. It looks like this "works" because, on average, you are probably close to zero anyway; at least, when you are hovering.

    I have a AscTec quadrotor that I will eventually use to collect some data, to see if what I am saying is right. Unfortunately, I fried the UART pins on the autopilot so that I can't talk to it anymore... I'm in the process of fixing it.
  • Xander,

    The flips don't bother me - you can always ignore the accelerometers based on estimated attitude being too far from zero and/or the Z_axis accelerometer too far from 1 g. Its the near-hover leveling / gyro bias compensation that baffles me.

    - Roy
  • But you do see quads doing flips, and supposedly stabilizing better with the assistance of accelerometers. Which does not at all agree with the physics and leaves me (and Roy I believe) a bit baffled.
  • Roy,

    You're certainly correct in that in the unbalanced force case (when the vehicle is still accelerating and drag forces are negligible), the accelerometer will measure an acceleration along the body-z axis of a magnitude (g / cos(theta)). Therefore, lateral acceleration while maintaining altitude is indistinguishable from pure vertical acceleration (at least using only an accelerometer).

    This is why I wouldn't use an accelerometer to measure tilt on an unstable platform like a helicopter. Kalman filters can't magically make dynamic effects like this disappear, and misinterpreting the accelerometer reading in this way and combining it with gyro or magnetometer measurements will actually make the attitude estimate wrong in the accelerating case. I guess this is why you don't see many (any?) hobby helicopter autopilots doing aerobatics yet!

    - Daniel
  • Brian,

    OK, I think I buy your argument that if the vehicle is not physically accelerating, the X and Y (body axis) accelerometers will not read zero and we can therefore use them (along with the Z axis sensor) to determine tilt. I realize now that this is what Tom was trying to say as well (sorry about the mis-understanding. I should have followed my own advice and drawn the drag on the free-body diagram).

    I'm not sure I agree that the NED Y forces are short lived. Unless all the quad is doing is moving purely vertically (in the NED sense), there will be significant NED X and Y accelerations, both commanded and due to winds. If there's any hope of building a position-hold IMU, those accelerations have to be sensed.

    Please go on and discuss your thoughts on the un-balanced NED-Y force case.

    - Roy
  • The equations that get me there:
    Body_Z*cos(angle)=NED_Z (1)
    Body_Z*sin(angle)=NED_Y (2)
    Body_Y=NED_Y*cos(angle)-NED_Z*sin(angle) (3)
    sub eq (1) and (2) into (3)
    Body_Y=Body_Z*sin(angle)*cos(angle)-Body_Z*sin(angle)*cos(angle)=0
This reply was deleted.