So I ran a few more tests this morning fiddling with the horizontal speed PIDs to maintain drift tuning. And actually, I think they worked with just the PID D gain set. Trouble is, D-gain tends to be spiky normally as it tracks change in error rather than absolute error, so any minor wobbles tend to lead to big changes in output. Throw into the mix the noise the accelerometer is renowned to produce and you have a recipe for disaster. And that’s what happened.
On the plus side, she did maintain her overall position around her taking off point; on the minus side, she deviated several meters either side while doing so.
One of those deviations smashed her into the kids’ swings, ripping off her video camera – the cable got cut, but I think the RaspiCam should be OK. In the same crash the leg / frame were distorted more than ever before – once again, repairable, but I am starting to think I may need to take her to the village park for testing!
- I’m wondering if I can do a running average of the accelerometer output to reduce the noise?
- There is scope to reduce the DLPF in the MPU6050 from the 20Hz I’m using down to 5Hz – I think that’s my easiest step to try next
- I do need to consider swapping to a horizontal acceleration rather than speed PID – perhaps now’s the time to do that, as it opens up the use of I gain for smoothing – the down side is that you’d only quickly nudge the joystick to change movement since it’s controlling acceleration rather than speed.
- Finally, I’ll see if I can do something to add physical filtering to isolate the breadboard from the frame better – I have some silicone foam tape 1cm thick that the breadboard could sit on – this is a bit of a faffy rebuild those, so this is the last step – it turns out fixing Phoebe’s distorted frame meant she was in enough pieces I could add the new padded circuit, so we’ll see what effect that has.