Hilbert Transform
The Hilbert Transform is a fundamental mathematical operation in signal processing. While the Fourier Transform tells you *what frequencies* are in a signal, the Hilbert Transform shifts the phase of those frequencies to help you understand the *instantaneous properties* of the signal.
Here is a breakdown of why it exists and how the math works.
The Motivation: The "Missing" Imaginary Part
Imagine you are analyzing an Amplitude Modulated (AM) radio signal. It consists of a very fast "carrier" wave whose peak height varies over time. The shape of those varying peaks is the "envelope" (the actual audio signal you want to hear).
If you look at the real, physical signal \(x(t)\) on an oscilloscope, it is just a 1D line oscillating rapidly above and below zero. Finding the mathematical equation for that smooth, bounding envelope is surprisingly difficult if you strictly stay in the realm of real numbers.
The Solution: Instead of viewing the signal as a 1D oscillation, what if we viewed it as the "shadow" (the real component) of a 2D rotating vector (a complex number)?
- The length of this rotating vector would be the perfect, smooth envelope (instantaneous amplitude).
- The angle of the vector would be the instantaneous phase.
To construct this 2D complex vector, we need the "imaginary" part. The Hilbert Transform is the mathematical tool that generates this exact missing imaginary part from a real signal.
The Math
1. Time Domain (The Definition)
Mathematically, the Hilbert transform of a real-valued continuous-time signal \(x(t)\), denoted as \(\hat{x}(t)\) or \(\mathcal{H}{x(t)}\), is defined as the convolution of \(x(t)\) with the function \(\frac{1}{\pi t}\):
\[\hat{x}(t) = \frac{1}{\pi} \text{p.v.} \int_{-\infty}^{\infty} \frac{x(\tau)}{t - \tau} d\tau\]
*(Note: "*\(\text{p.v.}\)*" stands for the Cauchy principal value, which is required because the integral has a singularity at *\(t = \tau\)*.)*
2. Frequency Domain (The Intuition)
The convolution integral above looks nasty, but the Hilbert transform is beautifully simple in the frequency domain.
Let \(X(f)\) be the Fourier Transform of \(x(t)\). The Fourier Transform of the Hilbert transform, \(\mathcal{F}{\hat{x}(t)}\), is:
\[\mathcal{F}{\hat{x}(t)} = -j \cdot \text{sgn}(f) \cdot X(f)\]
Where \(\text{sgn}(f)\) is the signum function (+1 for positive frequencies, -1 for negative frequencies).
What this actually means:
- For all positive frequencies, multiply the components by \(-j\). In the complex plane, multiplying by \(-j\) is equivalent to shifting the phase by \(-90^\circ\) (\(-\pi/2\) radians).
- For all negative frequencies, multiply by \(+j\), which shifts the phase by \(+90^\circ\) (\(+\pi/2\) radians).
The Hilbert transform simply takes your signal, looks at all its constituent sine waves, and shifts them all by a quarter-wavelength (\(90^\circ\)). A \(\cos(\omega t)\) becomes a \(\sin(\omega t)\).
The Result: The Analytic Signal
Once you have \(x(t)\) and its Hilbert transform \(\hat{x}(t)\), you can combine them to create the Analytic Signal, \(x_a(t)\):
\[x_a(t) = x(t) + j\hat{x}(t)\]
Because of the \(+90^\circ\) and \(-90^\circ\) phase shifts, all the negative frequencies perfectly cancel out. The analytic signal has *no negative frequencies*, which makes mathematical analysis significantly cleaner.
From the analytic signal, you can trivially extract the two most important instantaneous properties of the wave:
- Instantaneous Amplitude (The Envelope):
\[A(t) = |x_a(t)| = \sqrt{x(t)^2 + \hat{x}(t)^2}\]
- Instantaneous Phase:
\[\phi(t) = \angle x_a(t) = \arctan\left(\frac{\hat{x}(t)}{x(t)}\right)\]
Taking the derivative of the instantaneous phase \(\phi(t)\) with respect to time yields the instantaneous frequency.