Hi Pixhawk team and users.
For several weeks we have been struggling with tuning the position control of our recently built drone intended for indoor use. The drone behaves nicely when controlled manually, with both critically dampened actions. However when it comes to the MPC (Multicopter Position Controller) we simply can’t get the drone tuned in.
We are using an Optitrack Motion Capture system to provide X, Y, Z and Yaw measurements to the drone. The average measurement standard deviation (the standard deviation varies slightly in the room hence an average) is around 1mm and the Mocap measurements is published to the ATT_POS_MOCAP topic with 50 Hz.
The log plots from an offboard control with the best tuning that we have been able to achieve is shown here: https://logs.px4.io/plot_app?log=cfed906a-ed95-400e-92ff-f16d85eee0ae
We are in general unhappy about the overshoot and especially that the position hold fluctuates +/- 25 cm.
If we increase the gains to try and lower the overshoots the drone ends up oscillating as seen in this video: https://www.dropbox.com/s/ph8dvvbq9u03j5i/2017-10-02%2010.41.18.mov
As a plan towards resolving some of the tuning issues we decided to try and tune the z-position controller only, to see if we could achieve any better z-position hold (the drone tends to wobble up and down).
What confuses me though, is that we were able to tune the z-position controller such that it didn’t make any fast oscillations and was able to hold the z-position nicely for 5-10 seconds, but the drone would always make a bigger drop in altitude (>20 cm) eventually and then slowly recover.
The log plots from the best altitude hold we have been able to achieve is shown here: https://logs.px4.io/plot_app?log=03149179-3878-4756-a16a-352a45f6f3e5
Do you have any suggestions what to try and in which direction we should look for the problem?
We have already tried to reduce vibrations as much as possible and we have verified (through the log) that the Mocap measurements are indeed available and are deemed steady and reliable.
Are the problems related to Position Controller tuning (MPC) or Position Estimator tuning (LPE)?
The Ulog flight logs can be downloaded from here: