Hilbert Transform and Analytic Signal
Rotate harmonics into quadrature and trace the amplitude of an analytic signal.
By Riano · Published · Updated · Report a correction
Hilbert Transform and Analytic Signal
The Hilbert transform rotates every harmonic component of a signal by 90 degrees (π/2 radians), turning a real signal into its quadrature component. Combined, they form a complex-valued analytic signal which allows us to define the instantaneous amplitude and phase.
Worked Example: Single Harmonics
For periodic trigonometric signals, we multiply by -i*sign(k). Let's calculate the Hilbert transform of a simple cosine wave.
- Start with the signal
f(x) = cos(x)evaluated at phasex = π/4. The value iscos(π/4) = 0.7071067811865476. - The Hilbert transform shifts a cosine into a sine. Thus
H[f](x) = sin(x). Atx = π/4, the value issin(π/4) = 0.7071067811865475. - The analytic signal is
Z(x) = f(x) + iH[f](x). The amplitude issqrt(f² + H²). - For
x = π/4, the amplitude issqrt(cos(π/4)² + sin(π/4)²) = sqrt(0.5 + 0.5) = 1.0.
Experimenting with the Module
Open the Hilbert Transform and Analytic Signal module to explore how the transform affects different types of signals.
- Select the Cosine signal and change the Phase to pi/4. Observe the Signal value and Hilbert value are approximately 0.707.
- Change the Signal to Sine. The Hilbert transform of a sine wave is negative cosine, making the Hilbert value roughly -0.707 at phase pi/4.
- Switch to the Two harmonics signal. The amplitude trace is no longer a constant line, but a varying envelope bounding the signal.
- Select DC plus cosine. The DC offset (a constant term) passes through without rotation in the signal, while the Hilbert transform evaluates to 0.0 at phase pi.
Limitations
The module explicitly uses exact finite Fourier modes rather than arbitrary numerical integrations. It demonstrates the properties of the transform over periodic trigonometric functions where the frequency content is perfectly known. In practical discrete applications, windowing effects, finite-data edge conventions, and the Discrete Fourier Transform (FFT) introduce artifacts not modeled in these pure harmonic examples. Furthermore, constant terms are explicitly retained without rotation in this ideal model.
References
The mathematical properties and Python implementations of the Hilbert Transform are discussed in the SciPy documentation:
- scipy.signal.hilbert - Computes the analytic signal, whose real part is the original signal and imaginary part is the Hilbert transform.
Experience it interactively
Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Hilbert Transform and Analytic Signal module.
Try Hilbert Transform and Analytic Signal on Riano →