An APM Analyzer/Tuner?
"What if "..... What if we had a whole additional computer to analyze and tune our APM's for us?
Can't we design a computer to "feel" the oscillations drift etc. better then we can feel or see it? Can't a computer make the micro adjustments in the 0.001 range more accurate and quicker then we can?
Why not have a "analyzer/tuner" that plugs into our boards or resides on our quads or flying machines, that adjusts them for us?
I would be willing to invest $100 in a "analyzer/tuner", knowing that I will always be able to get a perfectly adjusted quad every time I add or change something or need to fly in radically different conditions.
As mentioned elsewhere, many new users get discouraged and some spend thousands in needless accidents. I know there will always be unhappy users, but what if we could make a significant change?
For example, a new user would simply plug the tuner into his flying machine making sure the sticks are in neutral. He would hold it in the air while gradually giving a little more throttle. The "tuner" gradually adjusts things till he could feel the flying machine stabilize itself. He would then put it in the air, letting go of the sticks and the “tuner” would make the fine tune adjustments for that particular flying machine in that particular wind etc.
If he changes motors (or updates his software :) or needs to fly in higher winds etc, he may need to plug the tuner in again.
What are your thoughts?
Rick
Replies
Hi Rick,
I have been thinking about how we could do some form of auto calibration. I think there are a couple of variable that could be tuned on the fly but I don't think that this is the solution for the majority of the variables. Also why carry around a big processor to tune a small one. If we do that we might as well just update the processor we have and do it all on the same board, if it can be done.
However, I was thinking that we do have a very big processor on our computer that we use to download logs. What I was thinking was that we could write a set of test movements that the copter could go through and record the raw sensor logs and attitude data. This data could then be used to create a virtual model of the copter and the optimal PID variables chosen. These can then be loaded back into the APM. I have played with this in matlab a little and the idea is feasible.
I was also thinking that the final tune is heavily dependent on the users preference so I was thinking we could create a critically damped solution and a under damped solution and a over damped solution.
The over damped solution is ultra stable but a little slower to react while the under damped solution will be a little faster to react but wobble a bit.
The other thing to remember that the stability properties are different at different throttle settings and forward flight speeds so this is also something that the user may have to make choices about.
So the idea is that we would get the copter flying in alt hold. Then hit the TEST button (probably ch7). After the dance finishes we download the logs and run the optimization.
Any way, I am a long way from this yet but I will start playing with these ideas next year some time.
As it is now with my quad in Stablized mode, I can often take my hands off the sticks and it sits there. Luck? Probably a large percentage and the fact that I have been flying in my yard that is somewhat sheltered from winds. At 3.5 kg (now) my goal is a 10 minute hover. This is just outisde the range for the battery and weight of the system.
This hobby is difficult for many newcomers because there are so many disciplines blended together. Anyone of them, if not done well, essentially scuttles the project.
Having a self calibrating machine would help once the build is to that point. With my build, only the basic calibrations have been performed: Leveling, ESCs. I am lucky enough, for now, to live where no magnetic offset is required. (at least I think that is stil the case for the NW corner of South Carolina). I have never performed the Quadrotor Dance (though I may have to before trusting a quad to run a mission autonomously).
As Bot Thoughts said, "Who calibrates the cablibrator?" What we are asking the machine to perform a task according to someone else's parameters. We humans adapt on the fly..usually (my wife is a school teacher, she could tell you stories to the contrary). The machine has limited sets of instructions and cannot reason its way out of situation. How many times have you attempted a task for someone only to have them tell you, 'That is not what I meant. Do it like this.' ?
Then again, the previous paragraph is starting to wander away from the subject and more to A.I. and not self calibration.
This is why the human should set the specifications and get out of the way during calibration. After calibration, the human would check to see if 'That is what I meant' - specifications being the measure.
-=Doug
Who calibrates the calibrator? :)
I like the concept -- boiled down to the most basic which is, surely it's possible to add some level of self-calibration to autopilot code. Not easy but possible. Not that I have a ton of experience with APM; I wrote my own autopilot for my rover and the same applies there.
For example, I'm in the middle of hand tuning the TBI system on my Jeep and wonder if there couldn't be some way for that kind of code to self-tune. It knows if it's rich or lean.
Likewise, some level of self-calibration of magnetometer may be possible (and come to think of it, may already be in MatrixPilot?). I recall seeing some papers and patents out there regarding compass (magnetometer) continuous self-calibration.
Gyro drift ... if you could sense the drift, that means you'd know what the real reference heading is and you could get rid of the gyro that is drifting, right?
Oscillation... not sure how you'd detect it.
I've been curious what would be required to auto-tune PID gains. Like, how do you detect overshoot versus undershoot. Intresting...
Interesting idea but I would think the human would have to get out of the loop to get a good calibration. What 'feels' stabilized to me might not be so with another.
We do this with our gradient amplifier systems. Get a signal, compare it to ideal, bump the PID, get another signal, etc.. until the software likes what it sees.
The tuner would have to break into the IMU loops.
The humans would have to ensure the RC part of the system is connected correctly - a common issue (I did it wrong too!).
I think this is where APM development will go..if they are not already cooking the recipie out of our site... (fade in the ominous music).
-=Doug