Well you can get by pretty far from observing the behavior, but it is useful. I attached a screenshot of the overo log video now.
- The top plot shows the throttle output in white and the throttle integral component in blue
- The middle plot shows velocity desired in white and the velocity estimate in blue
- The bottom plot shows the raw baro in blue, the filtered baro in white, and the altitude estimate in yellow and the set point in red (i remembered
A few interesting points. With a lower baro variance the state estimate is now tracking the filtered value better and seems to match the video better. Still needs more quantitive analysis. More importantly it does seem to increase the noise in the velocity estimate as a side effect. You see as a result quite a lot of noise in the throttle output. I need to see if there is any error in how the accels are handled to get a lower noise fusion, but if that is not the case I think some low pass filtering to reduce that noise will be beneficial.
Does anyone know any sources that discuss if it would be better to LPF the output versus the velocity before the PID. They are essentially the same right now because it's just a linear-time-invariant system and order doesn't matter, but perhaps if we want to add some damping there are important implications.
Speaking of damping, look carefully at the two velocity control curves. You can clearly see the phase delay between the desired and actual (not shocking) but that oscillation pattern makes me think some damping is required to get a tight enough control of position.