I am a controls engineer, studying aerospace controls systems and I have been in a lot of confusion lately. Coming from a purely academic background I have little experience in implementing controllers on real systems, and in my recent attempt at doing so, I have run into a bunch of problems. I have a few questions regarding the same:
-
One of the first problems I faced was estimating model parameters, and that got me thinking, how does ArduCopter estimate the model parameters like Inertia, thrust coefficients, drag coefficients etc…? Every user will have a different battery weight, different from esize, different motor type etc… so how does the attitude controller in ardupilot account for that?
-
The generic attitude controller will output a desired torque vector, because after all the controller acts on the dynamical system! So how does ArduCopter map these torques (equivalently thrusts…) to pwm values to be sent to the motors? Currently I am getting a curve fitting done via matlab to experimentally acquired data to get a relation between thrust and pwm. I feel this is overkill and I was wondering how Arducopter takes care of this.
-
I noticed that AP_Motors and AC_AttitudeControl both do a lot of manipulations to the throttle values. Could some please take out some time to explain this briefly to me? Or to mention my larger question, I needed some tips to keep in mind when implementing flight controllers, and would appreciate anything anyone can send my way. It could be anything simple from arm checks and failsafes to more intricate things like throttle modification etc.
Implementation is an art in itself and Ardupilot is the perfect example of that, it would be great if I could learn some of this art from the community!
PS: It is obvious that ardupilot does not use a model reference type controller, but does it have some iterative method to improve the tuning for the particular copter it is controlling? Even so, you need a “starting” point of controller parameters, and how does ardupilto decide these?
I know that the majority of the community has “absolutely no time” to deal with anything non ArduPilot related, but perhaps you could spare a few moments during your coffee breaks for my question?