Recently, I have been hearing a buzz word "phase delay" around the FPV community a lot. In plain words, phase delay is the delay between what the drone sees versus the reality, which could be several milliseconds behind. This causes a lot of issues, one very common analogy in real life is:
Two polite persons walking towards each other on the same lane and start to give way to each other, but only end up walking on the same lane again.
If one of the person knows the other person is going to give way to them, they could stop moving thus resolving the conflict.
This happens in the drone PID controller a lot too, especially on the D term, which is very senstive to such delays. However, in order to combat noises, we had to put on some filters on D term signal, thus it's inevitable to introduce some delays. Then how do we know how much D-term phase delay we have? I got this idea the other day, very easy!
From the previous blog, we know that D term is basically the slope of the gyro signal. We also know that at an apex of a trace, the slope should be 0. Which means, D term should be 0 if there's no phase delay at an apex of a gyro trace, but in reality, the D term will become 0 with some delay. Thus the time it takes for D to reaches 0 from the time of the gyro trace apex is then our D term phase delay. Here are some examples:
Note that when you look for the gyro signal apex, zoom in the the graph quite a bit to ensure an accurate marker position.