Research by Ryan Beall and Chaz Henderson:
I did a little more refining of the model from the data previously described/collected from the Pixhawk. The following are the results of System Identification and PID optimization.
The overall performance of the bank angle controller was suboptimal for our first flights. It appeared to oscillate in numerous log files (2-3 degrees amplitude with a period of 0.5-1 seconds). This was indicative of gains that were too high. A significantly more accurate model was produced by finding a very clean step response in the data as seen below:
This was generated with regression so you can see that it doesn’t fit perfectly. However, it was clear that this model was a drastic improvement to the previously submitted model. The regression was also used to model the servo delay (0.04 seconds). This was more of a black box approach and neglected any cross coupling in the yaw axis (fairly good assumption for this airframe) The model above is:
As expected, this model is slightly over damped as seen by the pole-zero plot
Using gains that were close to default (what was used on initial flight), the following was the estimated response for a +-25 degree roll step response:
This performance is very close to what was observed in the flight data logs which is very reassuring that the model is a remarkably close approximation of the aircraft/autopilot system as a whole.
Updating/tuning the PID values based on this approximate model, resulted in the following improved simulated performance
The PID values in the above illustration are as follows and will be used for the next flight evolution.
Note that the P gain was cut in half and the I and D were decreased slightly. These are pretty low gains compared to most aircraft but this airframe has an absolutely INSANE roll rate and my intuition of cutting the gain in half was well in alignment with the model's prediction. Hopefully we see verified results on the next test flight... until then...
Fly Safe Fly Fast