Instantaneous phase and frequency are important concepts in signal processing that occur in the context of the representation and analysis of time-varying functions.[1] The instantaneous phase (also known as local phase or simply phase) of a complex-valued function s(t), is the real-valued function:
\varphi(t)=\arg\{s(t)\},
And for a real-valued function s(t), it is determined from the function's analytic representation, sa(t):[2]
\begin{align} \varphi(t)&=\arg\{sa(t)\}\\[4pt] &=\arg\{s(t)+j\hat{s}(t)\}, \end{align}
\hat{s}(t)
When φ(t) is constrained to its principal value, either the interval or, it is called wrapped phase. Otherwise it is called unwrapped phase, which is a continuous function of argument t, assuming sa(t) is a continuous function of t. Unless otherwise indicated, the continuous form should be inferred.
s(t)=A\cos(\omegat+\theta),
\begin{align} sa(t)&=Aej(\omega,\\ \varphi(t)&=\omegat+\theta. \end{align}
s(t)=A\sin(\omegat)=A\cos\left(\omegat-
\pi | |
2 |
\right),
\begin{align} sa(t)&=A
| ||||||
e |
,\\ \varphi(t)&=\omegat-
\pi | |
2 |
. \end{align}
Instantaneous angular frequency is defined as:
\omega(t)=
d\varphi(t) | |
dt |
,
f(t)=
1 | |
2\pi |
\omega(t)=
1 | |
2\pi |
d\varphi(t) | |
dt |
The inverse operation, which always unwraps phase, is:
\begin{align} \varphi(t)&=
t | |
\int | |
-infty |
\omega(\tau)d\tau=2\pi
t | |
\int | |
-infty |
f(\tau)d\tau\\[5pt] &=
0 | |
\int | |
-infty |
\omega(\tau)d\tau+
t | |
\int | |
0 |
\omega(\tau)d\tau\\[5pt] &=\varphi(0)+
t | |
\int | |
0 |
\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\{sa(t)\}\\[4pt] &=\operatorname{atan2}(l{Im}[sa(t)],l{Re}[sa(t)])+2m1\pi\\[4pt] &=\arctan\left(
l{Im | |
[s |
a(t)]}{l{Re}[sa(t)]}\right)+m2\pi \end{align}
2m1 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)=
d\varphi(t) | |
dt |
&=
d | |
dt |
\arctan\left(
l{Im | |
[s |
a(t)]}{l{Re}[sa(t)]}\right)\\[3pt] &=
1 | |||||
|
{l{Re}[sa(t)]}\right)2}
d | |
dt |
\left(
l{Im | |
[s |
a(t)]}{l{Re}[sa(t)]}\right)\\[3pt] &=
l{Re | |
[s |
a(t)]
dl{Im | |
[s |
a(t)]}{dt}-l{Im}[sa(t)]
dl{Re | |
[s |
a(t)]}{dt}
2 | |
}{(l{Re}[s | |
a(t)]) |
+
2 | |
(l{Im}[s | |
a(t)]) |
}\\[3pt] &=
1 | ||||||
|
\left(l{Re}[sa(t)]
dl{Im | |
[s |
a(t)]}{dt}-l{Im}[sa(t)]
dl{Re | |
[s |
a(t)]}{dt}\right)\\[3pt] &=
1 | |
(s(t))2+\left(\hat{s |
(t)\right)2}\left(s(t)
d\hat{s | |
(t)}{dt} |
-\hat{s}(t)
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\{sa[n]\}-\arg\{sa[n-1]\}}\Delta\\ &=\varphi[n-1]+\arg\left\{
sa[n] | |
sa[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\{sa[n]
*[n | |
s | |
a |
-1]\},
\omega[n]=\arg\{sa[n]
*[n | |
s | |
a |
-1]\}.
In some applications, such as averaging the values of phase at several moments of time, it may be useful to convert each value to a complex number, or vector representation:[3]
ei\varphi(t)=
sa(t) | |
|sa(t)| |
=\cos(\varphi(t))+i\sin(\varphi(t)).
This representation is similar to the wrapped phase representation in that it does not distinguish between multiples of 2 in the phase, but similar to the unwrapped phase representation since it is continuous. A vector-average phase can be obtained as the arg of the sum of the complex numbers without concern about wrap-around.