Instantaneous angular frequency is defined as: :\omega(t) = \frac{d\varphi(t)}{dt}, and
instantaneous (ordinary) frequency is defined as: :f(t) = \frac{1}{2\pi} \omega(t) = \frac{1}{2\pi} \frac{d\varphi(t)}{dt} where
φ(
t) must be the
unwrapped phase; otherwise, if
φ(
t) is wrapped, discontinuities in
φ(
t) will result in
Dirac delta impulses in
f(
t). The inverse operation, which always unwraps phase, is: :\begin{align} \varphi(t) &= \int_{-\infty}^t \omega(\tau)\, d\tau = 2 \pi \int_{-\infty}^t f(\tau)\, d\tau\\[5pt] &= \int_{-\infty}^0 \omega(\tau)\, d\tau + \int_0^t \omega(\tau)\, d\tau\\[5pt] &= \varphi(0) + \int_0^t \omega(\tau)\, d\tau. \end{align} This instantaneous frequency,
ω(
t), can be derived directly from the
real and imaginary parts of
sa(
t), instead of the
complex arg without concern of phase unwrapping. :\begin{align} \varphi(t) &= \arg\{s_\mathrm{a}(t)\} \\[4pt] &= \operatorname{atan2}(\mathcal{Im}[s_\mathrm{a}(t)],\mathcal{Re}[s_\mathrm{a}(t)]) + 2 m_1 \pi \\[4pt] &= \arctan\left( \frac{\mathcal{Im}[s_\mathrm{a}(t)]}{\mathcal{Re}[s_\mathrm{a}(t)]} \right) + m_2 \pi \end{align} 2
m1 and
m2 are the integer multiples of necessary to add to unwrap the phase. At values of time,
t, where there is no change to integer
m2, the derivative of
φ(
t) is :\begin{align} \omega(t) = \frac{d\varphi(t)}{dt} &= \frac{d}{dt} \arctan\left( \frac{\mathcal{Im}[s_\mathrm{a}(t)]}{\mathcal{Re}[s_\mathrm{a}(t)]} \right) \\[3pt] &= \frac{1}{1 + \left(\frac{\mathcal{Im}[s_\mathrm{a}(t)]}{\mathcal{Re}[s_\mathrm{a}(t)]} \right)^2} \frac{d}{dt} \left( \frac{\mathcal{Im}[s_\mathrm{a}(t)]}{\mathcal{Re}[s_\mathrm{a}(t)]} \right) \\[3pt] &= \frac{\mathcal{Re}[s_\mathrm{a}(t)] \frac{d\mathcal{Im}[s_\mathrm{a}(t)]}{dt} - \mathcal{Im}[s_\mathrm{a}(t)] \frac{d\mathcal{Re}[s_\mathrm{a}(t)]}{dt} }{(\mathcal{Re}[s_\mathrm{a}(t)])^2 + (\mathcal{Im}[s_\mathrm{a}(t)])^2 } \\[3pt] &= \frac{1}{|s_\mathrm{a}(t)|^2} \left(\mathcal{Re}[s_\mathrm{a}(t)] \frac{d\mathcal{Im}[s_\mathrm{a}(t)]}{dt} - \mathcal{Im}[s_\mathrm{a}(t)] \frac{d\mathcal{Re}[s_\mathrm{a}(t)]}{dt} \right) \\[3pt] &= \frac{1}{(s(t))^2 + \left(\hat{s}(t)\right)^2} \left(s(t) \frac{d\hat{s}(t)}{dt} - \hat{s}(t) \frac{ds(t)}{dt} \right) \end{align} For discrete-time functions, this can be written as a recursion: :\begin{align} \varphi[n] &= \varphi[n - 1] + \omega[n] \\ &= \varphi[n - 1] + \underbrace{\arg\{s_\mathrm{a}[n]\} - \arg\{s_\mathrm{a}[n - 1]\}}_{\Delta \varphi[n]} \\ &= \varphi[n - 1] + \arg\left\{\frac{s_\mathrm{a}[n]}{s_\mathrm{a}[n - 1]}\right\} \\ \end{align} Discontinuities can then be removed by adding 2 whenever Δ
φ[
n] ≤ −, and subtracting 2 whenever Δ
φ[
n] > . That allows
φ[
n] to accumulate without limit and produces an unwrapped instantaneous phase. An equivalent formulation that replaces the modulo 2 operation with a
complex multiplication is: :\varphi[n] = \varphi[n - 1] + \arg\{s_\mathrm{a}[n] \, s_\mathrm{a}^*[n - 1]\}, where the asterisk denotes
complex conjugate. The discrete-time instantaneous frequency (in units of radians per sample) is simply the advancement of phase for that sample :\omega[n] = \arg\{s_\mathrm{a}[n] \, s_\mathrm{a}^*[n - 1]\}. ==Complex representation==