Motor Calibration Routine to Improve Stability Proposal

Hey guys, just kicking around a stability improvement idea in my head.  Thought I'd put it out to the group and get some opinions before I got whole hog on it.

A little background:
Some of you may be familiar with AeroQuad code.  I feel from a flying standpoint, they are much better at maintaining stability.  I think some of that has to do with the in flight levelling that they do.  Essentially, they do sensor calibration, on take off.  Assuming that all props are balanced, the craft will go up level, and the calibration will zeroes the accelerometer readings.
My proposal:
What I was thinking was to take this one step further.  Rather than just zeroing out the accelerometer readings on take off, I would run a motor calibration routine.  Since we all may have different motors and frame weights and sizes, and even within the same equipment there may be variance, the calibration routine would use the accelerometers to figure out the weight and power of the motors, and apply this to the stability routines.
The calibration would basically something like this:
1- Place the drone on level ground.
2- Start the motors at the lowest level, and sample the accelerometers.
3- Increase the motor speed, which sampling the accelerometers, and record the readings and pwm to the motors. (making sure that we don't get too high that we take off)
The result is that we now have a power to weight curve, and we now know how much motor power will result in how much force, as well as which motors are stronger than another.  We can now apply a correction vector to account for any motor or frame imbalance to the DCM matrix.  We can also predict what angle the drone will be when we apply roll and pitch, because we know how much force each motor can apply, and the weight of the drone.
What do you folks think?  Will this work, and increase stability and possibly improve the leans problem, which is due to no knowing the difference between inertial acceleration due to motor force, and gravity?(since we now know what force the motor applies for a particular pwm value)

Views: 430

Reply to This

Replies to This Discussion

Are you trying to assess the vibration for some sort of nulling so the accelerometer readings don't need to be filtered so much before use?

Vibration aside, if the frame doesn't physically move the the accelerometer readings will be constant.

Strain sensors on the arms or some other way of measuring the force applied by the motors to the frame would be required to measure motor mechanical output with a stationary frame.

That's the big question I have.  Is the accelerometer a force gauge?  Just sitting no force than just gravity, it can read 9.81.  If I apply a force in the z direction opposite to gravity, then the z component of the accelerometer reading will go down, right?  

My idea is to map the pwm value applied to the attached motors to the force measured by the accelerometer.  Once we know this, then also knowing the flying weight of the drone will actually allow me to calculate the angle of the drone relative to the pwm values applied to the motors.  It will help to cancel out any inertial forces in the air due to motor thrust.  Ultimately, to fix the drifting issues, called the "leans".

The accelerometers can be imagined as measuring the force on a little test mass inside the device package. If the accelerometer doesn't move the mass experiences no force change.

You can test this easily:

Start up your APM and connect to the Planner. Go to the Flight Data tab and then select the Status tab below the HUD.

Watch the values for ax, ay, az. These are the accelerometer outputs. You can also monitor ax, ay, az on the tuning graph.

While the airframe is sitting on the floor, push down on it. If the az value increases then the accelerometer is measuring force on the frame.

Or, pull up on one of the motors, but not enough to lift the frame from the floor.  You could even hold it down with one hand and pull up on a motor with the other. Do you see significant changes in the accelerometer readings?

You're right.  So only movement can be measured.  So, any motor calibration will have to be in the air or while it's sitting on something that can allow it to move with motor thrust.  This might be safer than calibrating in the air.  Or maybe tethered drone.

Reply to Discussion


© 2020   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service