Re: Tuning crazyflie for smooth, stable and responsive flight
Posted: Sun Oct 08, 2017 10:23 pm
Hey all, it's been a while. Here's some updates for those who are curious: I've made some changes to how UART is handled that lets us reduce the syslink task priorty. However, I also determined that the massive 20ms+ spikes only happen when connected through USB instead of OTA, so it's less of a concern. I also prototyped using DMA, but haven't gotten around to finishing it. It's more of a nice-to-have since there's plenty of CPU available to handle UART interrupts on syslink.
Also made changes to synchronize the IMU data ready signal with the stabilization loop, which gets rid of that constant latency ramp. With both of these changes we're down below 100us of latency. Doesn't seem to make a ton of difference to flight performance though. The main thing I'm focused on eliminating is uncontrolled oscillations during throttle punch outs - seems to expose some instability that's probably related to other issues. I poked around at some ideas I had but didn't get anywhere yet.
I also played around with reducing the DLPF (adds quite a bit of latency), tuning the AHRS algorithm (but the problem happens in acro mode too, where errors in the attitude estimation wouldn't be relevant) and changing the software low pass filter. Nothing has really made a dent in the problem yet, so this is going to need some deeper investigation. Perhaps I'll need to dust off the SD card deck so I can get some data logs of what actually happens during a throttle punch out
Also made changes to synchronize the IMU data ready signal with the stabilization loop, which gets rid of that constant latency ramp. With both of these changes we're down below 100us of latency. Doesn't seem to make a ton of difference to flight performance though. The main thing I'm focused on eliminating is uncontrolled oscillations during throttle punch outs - seems to expose some instability that's probably related to other issues. I poked around at some ideas I had but didn't get anywhere yet.
I also played around with reducing the DLPF (adds quite a bit of latency), tuning the AHRS algorithm (but the problem happens in acro mode too, where errors in the attitude estimation wouldn't be relevant) and changing the software low pass filter. Nothing has really made a dent in the problem yet, so this is going to need some deeper investigation. Perhaps I'll need to dust off the SD card deck so I can get some data logs of what actually happens during a throttle punch out