Friday, March 17, 2017

hilbert transform - What is the easiest, most straight-forward way to prove this about minimum-phase filters?


Using the "unitary" or "ordinary frequency" or "Hz" convention for the continuous Fourier Transform:


$$ \begin{align} X(f) \triangleq \mathscr{F}\{x(t)\} &= \int\limits_{-\infty}^{\infty} x(t) \, e^{-j 2 \pi f t} \, dt \\ \\ x(t) = \mathscr{F}^{-1}\{X(f)\} &= \int\limits_{-\infty}^{\infty} X(f) \, e^{j 2 \pi f t} \, df \\ \end{align} $$


So we learn that the Hilbert transform maps a signal or function in the time domain to another in the same domain:



$$ \begin{align} \hat{x}(t) \triangleq \mathscr{H}\{x(t)\} &= \frac{1}{\pi t} \circledast x(t) \\ \\ &= \int\limits_{-\infty}^{\infty} \frac{1}{\pi u} \, x(t-u) \, du \\ \\ &= \int\limits_{-\infty}^{\infty} \frac{1}{\pi (t-u)} \, x(u) \, du \\ \end{align} $$


and the Hilbert transformer is LTI, so we know that $ \hat{x}(t-\tau) = \mathscr{H}\{x(t-\tau)\}$ . And, even though LTI, we know that a Hilbert transformer is not causal (but, given enough delay, we can realize an approximation to a Hilbert transformer as well, to a given non-zero error, as we want).


And we know that this LTI Hilbert transformer has frequency response


$$ \begin{align} \hat{X}(f) & \triangleq \mathscr{F}\{\hat{x}(t)\} \\ \\ & = -j \, \operatorname{sgn}(f) X(f) \\ \\ & = \begin{cases} e^{-j \pi/2} \, X(f) \qquad & f>0 \\ 0 \qquad & f=0 \\ e^{+j \pi/2} \, X(f) \qquad & f<0 \\ \end{cases} \\ \end{align} $$


where, of course, $X(f) \triangleq \mathscr{F}\{x(t)\}$ . So all positive frequency components are shifted in phase by -90° and all negative frequency components are phase shifted by +90°. None of the amplitudes are affected except for DC, which is wiped out. That's fundamentally what a Hilbert transformer does.


From this we know about analytic signals:


$$\begin{align} x_\text{a}(t) & \triangleq x(t) + j\hat{x}(t) \\ \\ X_\text{a}(f) & = X(f) + j\hat{X}(f) \\ & = X(f) + j( -j \, \operatorname{sgn}(f) X(f) ) \\ & = (1 + \operatorname{sgn}(f)) \, X(f) \\ \\ & = \begin{cases} 2 X(f) \qquad & f>0 \\ X(f) \qquad & f=0 \\ 0 \qquad & f<0 \\ \end{cases} \\ \end{align}$$


So, if we have a complex-valued time-domain signal, $x_\text{a}(t)$ in which the real and imaginary parts of this signal form a Hilbert-transform pair, then in the frequency domain, all negative frequency components have zero-amplitude. Because of the symmetrical nature of the Fourier transform, we have duality and can reverse the roles of time $t$ and frequency $f$. This means, if we have a complex-valued frequency-domain spectrum, $X(f)$ in which the real and imaginary parts of this spectrum form a Hilbert-transform pair, then in the time domain, all negative time components have zero-amplitude.


Stated again, but substituting impulse response $h(t)$ for $x(t)$, and frequency response $H(f)$ for $X(f)$, we know


$$ \Im\{h(t)\} = \mathscr{H}\big\{\Re\{h(t)\}\big\} \iff H(f) = 0 \quad \forall f<0 $$



and similarly


$$ \Im\{H(f)\} = -\mathscr{H}\big\{\Re\{H(f)\}\big\} \iff h(t) = 0 \quad \forall t<0 $$


where $H(f) \triangleq \mathscr{F}\{h(t)\}$


An LTI system described by impulse response $h(t)$ that is zero for all $t$ that is negative, is what we call a "causal system", because the impulse response does not respond to the driving impulse until that driving impulse occurs in time. So for every realizable, real-time LTI system (which must be causal), the real and imaginary parts of the frequency response are a Hilbert pair in the frequency domain. None of this is particularly surprizing or special.


So (as Matt anticipated) there is something more about relating the real and imaginary parts of something regarding LTI systems that is a bit surprizing (or, at least, is not trivial). We have two definitions or descriptions of LTI systems or LTI filters that are in this class called "minimum-phase filters":



  1. LTI filters with rational transfer functions (of which the numerator and denominator can be factored resulting in roots that are called zeros and poles, respectively) in which both poles and zeros lie in the left-half plane:


$$ H\left( \frac{s}{j 2 \pi} \right) = A \frac{(s-q_1)(s-q_2)...(s-q_M)}{(s-p_1)(s-p_2)...(s-p_N)} \qquad \qquad M \le N $$


Required for stability: $ \Re\{p_n\} < 0 $ for all $1 \le n \le N$



Required for minimum phase: $ \Re\{q_m\} < 0 $ for all $1 \le m \le M$


These filters are called "minimum phase" because for any zero $q_m$ in the left half-plane, an All-pass filter having a pole at precisely the same location will cancel that zero and will reflect it to the right half-plane:


$$ H_\text{AP}\left( \frac{s}{j 2 \pi} \right) = \frac{s+q_m}{s-q_m} $$


This all-pass filter has frequency response with magnitude of exactly 0 dB for all frequencies:


$$ |H_\text{AP}(f)| = 1 \qquad \qquad \forall f $$


but the phase angle is not zero, this APF adds (negative) phase shift:


$$ \arg \{ H_\text{AP}(f) \} = -2 \arctan\left(\frac{2 \pi f - \Im\{q_m\}}{-\Re\{q_m\}}\right) $$


The resulting cascaded filter $H\left( \frac{s}{j 2 \pi} \right) \cdot H_\text{AP}\left( \frac{s}{j 2 \pi} \right)$ with the zero $q_m$ reflected to the right half-plane has the same magnitude as the original filter (having all zeros in the left half-plane), but has more (negative) phase shift. More phase delay and more group delay. The "minimum-phase" filter is the only filter having exactly the same magnitude response that has less (negative) phase shift than any of the clones with APFs reflecting zeros to the right half-plane.


A "Maximum-phase" filter is one where all of the zeros live in the right half-plane or $\Re\{ q_m \} \ge 0$ .


So the second definition of a minimum-phase filter specifies exactly how this minimum-phase response is related to the magnitude response:




  1. An LTI system or filter


$$ H(f) = |H(f)| e^{j \arg\{H(f)\}} = |H(f)| e^{j \phi(f)} $$


is minimum phase if and only if the natural phase response, in radians, is the negative of the Hilbert transform of the natural logarithm of the magnitude response:


$$ \phi(f) \triangleq \arg\{ H(f) \} = -\mathscr{H}\big\{ \ln( |H(f)| ) \big\} $$


since


$$\begin{align} H(f) & = |H(f)| e^{j \phi(f)} \\ & = e^{\ln(|H(f)|)} e^{j \phi(f)} \\ & = e^{\ln(|H(f)|) + j \phi(f)} \\ & = e^{\ln(H(f))} \\ \end{align}$$


this is relating the real and imaginary parts of the complex natural $\log()$ of the frequency response. Say we can construct a hypothetical LTI filter, $G(f)$ with complex frequency response equal to that complex logarithm


$$\begin{align} G(f) & = \ln(H(f)) \\ & = \ln(|H(f)|) + j \phi(f) \\ & = \Re\{G(f)\} + j \Im\{G(f)\} \\ \end{align}$$



$$\begin{align} \Im\{G(f)\} & = \phi(f) = -\mathscr{H}\big\{ \ln( |H(f)| ) \big\} \\ & = -\mathscr{H}\big\{ \Re\{G(f)\} \big\} \\ \end{align}$$


then the impulse response corresponding to $G(f)$ would be causal:


$$ \mathscr{F}^{-1}\{ G(f) \} = g(t) = 0 \qquad \qquad \forall t<0 $$


The purpose of this question is to resolve the two definitions of a minimum-phase filter. If, given the first definition, I don't see any direct reason why the hypothetical $G(f) = \ln(H(f))$ should have a causal impulse response $g(t)$.


The only way to resolve the two definitions directly is to consider:


$$ H(f) = A \frac{(j2\pi f-q_1)(j2\pi f-q_2)...(j2\pi f-q_M)}{(j2\pi f-p_1)(j2\pi f-p_2)...(j2\pi f-p_N)}$$


(assume for the moment that $A>0$)


$$ \ln(|H(f)|) = \ln(A) + \sum_{m=1}^{M} \ln(|j2\pi f-q_m|) - \sum_{n=1}^{N} \ln(|j2\pi f-p_n|) $$


$$ \phi(f) \triangleq \arg\{H(f)\} = \sum_{m=1}^{M} \arg\{j2\pi f-q_m\} - \sum_{n=1}^{N} \arg\{j2\pi f-p_n\} $$


We know that the Hilbert transform of a constant function is zero, so



$$ \mathscr{H}\big\{ \ln(A) \big\} = 0 $$


then if we can prove that each remaining corresponding terms of the summations in $\ln(|H(f)|)$ and $\arg\{H(f)\}$ are Hilbert pairs, that is, if we can show


$$ \arg\{j2\pi f-q_m\} = -\mathscr{H}\big\{ \ln(|j2\pi f-q_m|) \big\} \qquad 1 \le m \le M $$


and


$$ \arg\{j2\pi f-p_n\} = -\mathscr{H}\big\{ \ln(|j2\pi f-p_n|) \big\} \qquad 1 \le n \le N $$


given that $\Re\{q_m\} < 0$ and $\Re\{p_n\} < 0$,


then we can show that


$$ \phi(f) \triangleq \arg\{ H(f) \} = -\mathscr{H}\big\{ \ln( |H(f)| ) \big\} $$


We don't have to worry much about phase wrapping when considering a single first-order term. Since the form is the same for both zeros and poles, considering just a single zero


$$\begin{align} \arg\{j2\pi f - q_m\} & = \arg\{j2\pi f - (\Re\{q_m\} + j \Im\{q_m\})\} \\ & = \arg\{-\Re\{q_m\} + j(2\pi f - \Im\{q_m\})\} \\ & = \arctan\left(\frac{2\pi f - \Im\{q_m\}}{-\Re\{q_m\}}\right) \\ \end{align}$$



and


$$\begin{align} \ln(|j2\pi f-q_m|) & = \ln(|j2\pi f - (\Re\{q_m\} + j \Im\{q_m\})|) \\ & = \ln(|-\Re\{q_m\} + j(2\pi f - \Im\{q_m\})|) \\ & = \ln\left( \sqrt{(-\Re\{q_m\})^2 + (2\pi f - \Im\{q_m\})^2} \ \right) \\ & = \tfrac12 \ln\big( (-\Re\{q_m\})^2 + (2\pi f - \Im\{q_m\})^2 \big) \\ \end{align}$$


So now it becomes a task to show that


$$ \arctan\left(\frac{2\pi f - \Im\{q_m\}}{-\Re\{q_m\}}\right) = -\mathscr{H}\Big\{ \tfrac12 \ln\big((-\Re\{q_m\})^2 + (2\pi f - \Im\{q_m\})^2 \big) \Big\} $$


Now remember that, in the time domain, the Hilbert transformer is LTI, so we know that $\hat{x}(t-\tau) = \mathscr{H}\{x(t-\tau)\}$ and it doesn't matter what $\tau$ is, it's just an offset to time $t$ in both input and output to the Hilbert transformer.


Here, in the frequency domain, the offset to frequency $f$ is $\frac{\Im\{q_m\}}{2 \pi}$, so without loss of generality, we can eliminate $\Im\{q_m\}$ from both sides:


$$ \arctan\left(\frac{2\pi f}{-\Re\{q_m\}}\right) = -\mathscr{H}\Big\{ \tfrac12 \ln\big((-\Re\{q_m\})^2 + (2\pi f)^2 \big) \Big\} $$


This breaks the problem down to a single real pole and real zero, both in the left half-plane. Now we can normalize out $-\Re\{q_m\}$ and the $2 \pi$ with the substitution:


$$ \omega \triangleq \frac{2\pi f}{-\Re\{q_m\}} $$


resulting in



$$\begin{align} \arctan(\omega) &= -\mathscr{H}\Big\{ \tfrac12 \ln\big((-\Re\{q_m\})^2 + (\omega \cdot (-\Re\{q_m\}))^2 \big) \Big\} \\ &= -\mathscr{H}\Big\{ \tfrac12 \ln\big((-\Re\{q_m\})^2 \cdot (1 + \omega^2) \big) \Big\} \\ &= -\mathscr{H}\Big\{ \ln(-\Re\{q_m\}) + \tfrac12 \ln(1 + \omega^2) \Big\} \\ &= -\mathscr{H}\Big\{ \tfrac12 \ln(1 + \omega^2) \Big\} \\ \end{align}$$


That last term $\ln(-\Re\{q_m\})$ is eliminated because the Hilbert transform of a constant is zero.


So now, the bottom line, to prove the equivalence of the two definitions of what a minimum-phase filter is, we "simply" need to prove the identity above (or below).


Can someone, without using Contour Integration or Residue Theory or results from complex variable analysis, prove this fact? :


$$\begin{align} \arctan(\omega) &= -\tfrac12 \mathscr{H}\big\{ \ln(1 + \omega^2) \big\} \\ \\ &= -\tfrac12 \int\limits_{-\infty}^{\infty} \frac{1}{\pi u} \, \ln(1 + (\omega-u)^2) \, du \\ \\ &= -\tfrac12 \int\limits_{-\infty}^{\infty} \frac{1}{\pi (\omega-u)} \, \ln(1 + u^2) \, du \\ \end{align}$$



Answer



The Hilbert transform $\mathcal{H}\left\{f(\omega)\right\}$ with


$$f(\omega)=-\frac12\log(1+\omega^2)\tag{1}$$


can be calculated in the following way. First, note that


$$\frac{df(\omega)}{d\omega}=-\frac{\omega}{1+\omega^2}\tag{2}$$



From this table we know that


$$\mathcal{H}\left\{\frac{1}{1+\omega^2}\right\}=\frac{\omega}{1+\omega^2}\tag{3}$$


We also know that


$$\mathcal{H}\{\mathcal{H}\{f\}\}=-f\tag{4}$$


Combining $(3)$ and $(4)$ we get


$$\mathcal{H}\left\{\frac{\omega}{1+\omega^2}\right\}=\mathcal{H}\left\{\mathcal{H}\left\{\frac{1}{1+\omega^2}\right\}\right\}=-\frac{1}{1+\omega^2}\tag{5}$$


So, using $(2)$,


$$\mathcal{H}\left\{\frac{df(\omega)}{d\omega}\right\}=\frac{1}{1+\omega^2}\tag{6}$$


Now we also know that the Hilbert transform operator and the differentiation operator commute:


$$\mathcal{H}\left\{\frac{df(\omega)}{d\omega}\right\}=\frac{d}{d\omega}\mathcal{H}\{f(\omega)\}\tag{7}$$



which yields


$$\frac{d}{d\omega}\mathcal{H}\{f(\omega)\}=\frac{1}{1+\omega^2}\tag{8}$$


Integrating $(8)$ finally gives


$$\mathcal{H}\{f(\omega)\}=\arctan(\omega)\tag{9}$$




Note that this result can also be obtained using Mathematica (which I don't have available). According to this thread, the command


Integrate[-1/2*Log[1 + (\[Tau]*\[Nu])^2]/(\[Nu] - \[Omega]), {\[Nu], -Infinity, Infinity},
PrincipalValue -> True, Assumptions -> \[Tau] >0 && \[Omega] >0, GenerateConditions -> False]/Pi

gives



-ArcTan[\[Tau] \[Omega]]


The negative sign comes from the different definition of the Hilbert transform, as can be seen in the denominator of the integral in the Mathematica command.




I would like to add that the causality of the inverse Fourier transform of $\log H(j\omega)$, i.e., the causality of the complex cepstrum for a minimum-phase system $H(j\omega)$ can also be understood intuitively. Note that any zero of $H(s)$ in the right half-plane causes a singularity in $\log H(s)$ in the right half-plane, and consequently, the corresponding inverse Fourier transform must be two-sided because the region of convergence is a strip including the imaginary axis. Only if there are no zeros in the right half-plane (i.e., the system is minimum-phase) will $\log H(s)$ have all its singularities in the left half-plane, and the inverse transform yields a right-sided causal function.




From $(4)$ we can see another nice property of the Hilbert transform, namely that the inverse transform is simply given by the (forward) transform with a negative sign:


$$\mathcal{H}^{-1}\{f\}=-\mathcal{H}\{f\}\tag{10}$$


That means that for every Hilbert transform pair that we find, we get another one for free:


$$\mathcal{H}\{f\}=g\Longrightarrow\mathcal{H}\{g\}=-f\tag{11}$$


Applying $(11)$ to $(9)$ we find



$$\mathcal{H}\{\arctan(\omega)\}=-f(\omega)=\frac12\log(1+\omega^2)\tag{12}$$


No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...