Description
I've had some strange and quite severe oscillations with a GriffinPro tilt quadplane recently when running master. The oscillations are bad enough that I am at risk of losing the aircraft. The odd thing is that running the same parameters on 4.5.7 I have not been able to reproduce the issue.
There are some complicating factors, so it isn't absolutely certain this is a regression, but I think it is worth looking into.
This is what happens on master:
notice the increasing amplitude of oscillation in QLOITER. Changing to QHOVER did allow it to slowly recover, but still huge overshoots.
This is the same parameters on 4.5.7:
there is still some overshoot, but not dangerous.
the complicating factors are:
- the tune is pretty bad. I don't know quite how I ended up with this tune, it is clearly a manual tune as it has round numbers for the gains. My past logs showed I changed to these gains sometime last year, but I can't remember why. Maybe some experiments I was doing at the time? The rate PID gains are clearly too low for the angle P gain of 10. I could retune it easily and make it fly a lot better, but my concern isn't getting a good tune, it is explaining why master seems much worse than 4.5.7 in case this impacts other users
- I recently increased the payload a bit, adding a RPi4 and a 4G radio, which I suspect is why it is worse now than it has been on previous flights, but as a percentage of total weight the extra payload is small (maybe 250g out of 10kg or so?)
- the ESCs are blheli32/dshot, but are going via a L431 DroneCAN adapter, so changes in the CAN code need to be considered as well as high level quadplane and attitude controller
Some things I've looked at:
- given the number of filtering changes in master compared to 4.5.7 I looked at the unfiltered vs filtered gyro data and I don't see any filter induced lag in the logs
- I'm intrigued by the flat bottom on the RATE.RDes graph above for master. That is probably the 75 deg/s limit from Q_A_RATE_R_MAX, but I don't see an equivalent flat bottom on the tests with 4.5.7. Some change in the rate limiting? Or just the different way of triggering the oscillation (I had to use the sticks to start the movement in 4.5.7 whereas with master it spontaneously oscillates when descending).
- i looked at the RPM feedback from the ESCs versus the demand in RCOU and I don't see any higher lag in master than in 4.5.7.
I haven't tested the 4.6.0 beta. To do that safely I think I'll need to retune first to get a safe set of gains, then use a script to switch to these gains to see if 4.6.0 is affected.
Logs are here:
http://uav.tridgell.net/tmp/GriffinProOscillation/