How to apply the division of finite differences to angles?

79 Views Asked by At

Like in this question Finite difference derivatives for angle variables with jumps, I am trying to calculate numerically the derivative of an angle $\alpha \in [-\pi, \pi]$ :

$$ \omega = \frac{d\alpha}{dt}$$

I have been able to use the forward difference :

$$ \omega_t \simeq \frac{\Delta \alpha_{t+1, t} }{\Delta t}$$

With:

$$\Delta \alpha_{t+1, t} = \alpha_{t+1} - \alpha_{t} \mod 2\pi $$

Then, in order to express $\Delta \alpha_{t+1, t} \in [-\pi, \pi]$, if $\Delta \alpha_{t+1, t} > \pi$, I take $\Delta \alpha_{t+1, t} = \Delta \alpha_{t+1, t} - 2 \pi$.

Question: How can I calculate finite differences of higher orders?

For example, in the central difference you need to divide by 2: $$ x'(t) \simeq \frac{x_{t+1} - x_{t-1}}{2\Delta t}$$ How should I do this division when using an angle?

  • If I apply it before taking the modulus, two similar angles in different turns should give $0$ but for example $\alpha_{t+1} = \pi$ and $\alpha_{t-1} = -\pi$ would give $\frac{\alpha_{t+1} - \alpha_{t-1}}{2} = \pi$.

  • If I apply it after, I would be reducing the interval to $\Delta \alpha_{t+1, t} \in [0, \pi]$!

In particular, I would be interested in realizing the Richardson 4th point extrapolation: $$ x'(t) \simeq \frac{-x_{t+2} + 8 x_{t+1} - 8 x_{t-1} + x_{t-2}}{12\Delta t}$$