Home > On-Demand Archives > Workshops >
Demystifying the Hilbert Transform
Dan Boschen - Watch Now - DSP Online Conference 2022 - Duration: 02:29:24
Workshop Description
In this workshop, Dan will introduce the Hilbert Transform and the Analytic Signal, and the various uses for them. Dan will review the fundamental points in understanding the Hilbert Transform intuitively and then he will show practical implementations and applications both in the analog and digital signal processing domains. Key limitations and gotchas will be presented that every designer should be aware of. Dan will demonstrate creative implementations using Python, and provide similar scripts compatible with MATLAB. Attendees will gain a more intuitive insight of key signal processing concepts using complex signals that are applicable to a wide range of applications.
Workshop Instructions
Thank you for your interest in the Demystifying the Hilbert Transform workshop! Below are the installation instructions for Python in case you want to follow along hands-on with the examples given or run the examples later.
Option 1: Easy path to Python: Install the Anaconda Individual Edition which will have all the tools we will be using: https://www.anaconda.
Option 2: Alternative manual path to Python: As a minimum install we will be using Python 3, Numpy, Matplotlib, and Scipy:
Install python: https://www.python.
From command window type:
pip install ipython
pip install numpy
pip install matplotlib
pip install scipy
(if you encounter any difficulty with installing the packages, see this page: https://packaging.
Note: We will not be debugging any installation issues in the Workshop, and a Python installation is not necessary to follow along with the workshop presentation. Having a Python installation running with the above libraries is convenient if you want to follow along hands-on, as Dan will be demonstrating the material using Python. A Jupyter Notebook of the material presented will also be distributed here after the workshop for future reference, along with similar scripts that work in Matlab or Octave. If you would like further basics on running the Notebook, please see this link:
https://www.datacamp.com/
This guide was created with the help of AI, based on the presentation's transcript. Its goal is to give you useful context and background so you can get the most out of the session.
What this presentation is about and why it matters
This talk demystifies the Hilbert transform and the analytic signal, two closely related tools that let you convert real waveforms into complex (I/Q) representations, extract amplitude and phase separately, and perform parity-free frequency shifts and envelope/instantaneous-frequency measurements. The speaker explains both the theory (time- and frequency-domain definitions, minimum-phase relationships) and the practical engineering trade-offs for implementing Hilbert transforms in analog and digital systems.
Why it matters: in communications, RF, audio and general DSP, working with complex/analytic signals saves spectrum, simplifies demodulation, avoids image problems when translating frequencies, and gives robust ways to measure instantaneous frequency and envelope. The talk highlights what ideal theory promises and what realizable circuits and filters actually deliver — including pitfalls of FFT-based shortcuts and the practical benefits of FIR designs.
Who will benefit the most from this presentation
- Signal processing engineers and students who design or analyze modulation/demodulation chains (IQ mixers, single-sideband, image rejection).
- RF/wireless practitioners who must trade analog complexity for digital processing (front-end quadrature hybrids, ADC front-ends, baseband processing).
- Anyone implementing envelope detectors, instantaneous-frequency estimators, or minimum-phase reconstructions from magnitude data.
- DSP learners who want an intuitive picture of positive/negative frequencies, phasors, and how complex signals are built and used in practice.
What you need to know
The presentation assumes basic undergraduate signals and systems exposure. Below are the key concepts and compact formulas that help you follow the talk.
- Complex phasors and I/Q: represent a tone as a rotating vector. Use $e^{j\theta}$ so magnitude and phase are explicit. A complex sample has two real-valued paths: I (real) and Q (imag).
- Positive and negative frequencies: a real cosine equals two complex exponentials: $\cos(\omega t)=\tfrac{1}{2}(e^{j\omega t}+e^{-j\omega t})$. The rotation direction distinguishes positive vs negative frequency.
- Hilbert transform (time/frequency views): time-domain definition as convolution
$\mathcal{H}\{x(t)\} = x(t)*\dfrac{1}{\pi t}$
and frequency-domain action: multiply positive frequencies by $-j$ and negative frequencies by $+j$. A compact sign formulation is$X_H(\omega)= -j\,\mathrm{sgn}(\omega)\,X(\omega)$
- Analytic signal: form a one-sided spectrum (positive frequencies only) by combining the real signal and its Hilbert transform:
$x_a(t)=x(t)+j\,\mathcal{H}\{x(t)\}$
The analytic signal makes envelope and phase easy: envelope $=|x_a(t)|$, instantaneous phase $=\angle x_a(t)$, instantaneous frequency $=\dfrac{d}{dt}\angle x_a(t)$. - Realizability and causality: the ideal Hilbert kernel $1/(\pi t)$ is noncausal and infinite. Practical implementations delay and truncate the impulse response (FIR/IIR), introducing ripple and phase/amplitude trade-offs.
- Minimum-phase relation: for stable minimum-phase systems the log-magnitude and phase are Hilbert pairs. If $H(\omega)=|H(\omega)|e^{j\phi(\omega)}$, then roughly
$\phi(\omega) = -\mathcal{H}\{\ln|H(\omega)|\}$
(sign conventions aside). This is useful when you can measure magnitude but not phase. - Implementation options: analog quadrature couplers, phase-tracking all-pass networks, FIR designs (windowed/Kaiser, least-squares, Remez) and FFT-based block methods. Each has complexity/performance/delay trade-offs. FIR designs deliver excellent amplitude/phase balance; FFT methods are convenient but can produce time-domain aliasing and wrap-around artifacts.
Glossary
- Hilbert transform — linear operator that shifts the phase of each frequency component by ±90° and is used to form analytic signals.
- Analytic signal — complex signal with no negative-frequency components; created by adding $j$ times the Hilbert transform to a real signal.
- Quadrature (90°) — two signals whose phase differs by 90°; these form the I and Q channels.
- I/Q (In-phase/Quadrature) — real-valued pair representing a complex sample used throughout communications systems.
- Minimum-phase — causal system with the smallest possible phase (group delay) consistent with a given magnitude response.
- FFT / DFT — efficient algorithm (FFT) to compute the discrete Fourier transform (DFT); used in block Hilbert implementations but subject to circular-convolution effects.
- DTFT — discrete-time Fourier transform; continuous-frequency representation of sampled signals, useful when discussing periodic frequency-domain replication.
- Impulse response — time-domain response of an LTI system to an impulse; its Fourier transform is the system frequency response.
- Group delay — derivative of phase vs frequency; relates phase slope to time delay of signal envelopes.
- Phase-tracking network — analog or digital network that approximates a fixed quadrature relationship across a band.
Final note
Dan Boschen's presentation promises a practical, intuition-first tour of the Hilbert transform. Expect clear phasor-based explanations, crisp comparisons of analog and digital implementations, code-driven demonstrations, and concrete design guidance (including filter choices and gotchas with FFT methods). If you want to move beyond formula memorization and learn how to use analytic signals and Hilbert transforms in real systems, this talk — plus the promised Jupyter/MATLAB notebooks — is an excellent and very usable resource.
Great presentation as always on Hilbert Transform and its usage. Thank you for sharing the slides and Python Notebook
Thank you Jose! I am glad you enjoyed it.
Fantastic presentation as always. Thank You Dan!
Dave Comer (Unofficial Dan Boshen/Rick Lyons NM Fan Club Organizer) ;)
Ha! Very nice, thank you Dave.
Hi Dan, finally watching this! there's always so much to learn from your classes!
Question about minimum phase filters, last year I asked a question to fred harris about why in a PLL we always seem to use IIR filters and not FIRs. His answer was that IIRs are minimum phase while FIRs add delays therefore can potentially create instabilities.
I remember from your telecom course you said that if there are analog delays in a transfer function (for example due to cable/transmission delays) that can also cause instabilities, by pushing poles to the PI limit.
So I took that for granted until I saw a presentation about this project:
https://github.com/ha5ft/pllpy
https://www.youtube.com/watch?v=mApnDERqKR8
There they use a range of blocks rather than simply IIR filters, blocks that definitely can add significant delays, like an FFT as a frequency discriminator.
So things are not necessarily clear cut, there's a bit more flexibility that can be added to the design of a PLL. What's your thought?
Thanks,
Emanuele
Hi Emanuele- I am glad you enjoyed the presentation. Yes any delays that are added will reduce the phase margin in a control loop. I'll email you with further details since your question isn't related to this presentation.
Please find the Python notebook for this presentation on the left-hand side, under "Files Provided by the Speaker(s)" (you'll need to be registered and logged in)
Are the slides and the code going to be located here?
Yes I will be posting a pdf of the presentation, the Python Jupyter Notebook and Matlab code by the end of this week
11:56:16 From Leonard : counting to 13 11:57:27 From Brewster LaMacchia : AM radio detector? 12:07:55 From Michael Kirkhart : "The Analytic Impulse" link: http://andrewduncan.net/air/ 12:24:33 From Marek Klemes : Note that Hilbert filter does not pass DC, so your signal should not contain DC. What is the math analogy to the impulse response at t=0? 12:26:15 From Dan Boschen : 4 12:26:20 From Marek Klemes : What is the value of Hilbert impulse response at t=0? 12:34:41 From mnapier : Application I seen for Hilbert is a tracking PLL. You have a reference frequency that you want to lock some other rate or tone generator to. Take the Hilbert for analytic signal. ATAN2 to get phase. The phase is sampled at a fixed rate (means only compute at fixed rate) and compare to phase accumulator. Run PLL error loop. 12:35:03 From mnapier : Mark 12:40:57 From Michael Kirkhart : Decibel dust 12:41:14 From mnapier : Below the ADC noise. 12:41:41 From Tim : Your x-axis is labelled in samples/cycle, but it looks more like radians? 12:47:25 From Stephane to Dan Boschen(Direct Message) : Feel free to go overtime if you need to 12:48:00 From Tim : Thanks! 13:12:45 From JohnP : Discrete prolate spheroidal (Slepian) sequences ? 13:13:11 From Michael Kirkhart : Discrete Prolate Spheroidal Sequences 13:13:46 From Michael Kirkhart : A link comparing DPSS and Kaiser: https://www.dsprelated.com/freebooks/sasp/Kaiser_Window.html 13:19:20 From mnapier : Thanks for a great presentation. 13:19:34 From Yair Mazal : thanks a lot 13:20:27 From Al Anway : best presentation I've ever seen! 13:20:37 From mnapier : In SDR we call it a rotator. 13:21:50 From mnapier : Because it take the spectrum and rotates it around the unit circle. 13:21:56 From Brewster LaMacchia : This was great. In the past I somewhat blindly used the Hilbert but never really looked under the hood - was saving that for a rainy day... It is raining here (Boston area) today. 13:22:09 From Michael Kirkhart : This was an excellent presentation! This helped clear up some confusion I had on analytic signals and why they are important, and why the Hilbert transform is useful (needed to create analytic signals from real signals). 13:25:18 From JohnP : I use hybrid couplers/combiners all the time. Never realized they realized Davey Hilbert's function. 13:25:52 From Michael Kirkhart : Can you make the presentation available? 13:26:25 From Stephane : This presentation is being recorded and will be uploaded later today. 13:27:13 From Michael Kirkhart : Cool! I will need to watch it at least one more time to gain a better understanding (much like Professor harris's lectures). 13:27:46 From Al Anway : your doppler shift reference reminds me of a cool way to do audio phlanging. 13:29:20 From mnapier : Audio application is a strobe tuner. Uses phase to track small differences in frequency. 13:29:48 From Brewster LaMacchia : as an audio person, it's pretty rare to have complex numbers in the processing other than a FFT->process->IFTT path 13:30:10 From Radu Pralea : what signal processing book was that (keeping the whole presentation real)? 13:32:51 From Michał Knioła : Thank you!

I believe I found a subtle error in my presentation: On Slide 22 I restricted the condition shown to "Minimum Phase Systems" where I don't believe that is actually the case: For any one sided waveform in one domain, the other domain will have the property that the real and imaginary components are related by the Hilbert Transform (so the frequency response for causal time domain systems, or the time response for the one-sided spectrum of the Analytic Waveform). I was confusing the relationship between the Magnitude and Phase (not real and imaginary), in which case the minimum phase restriction does apply: For a minimum phase system, the frequency response is uniquely determined by the magnitude response or phase response alone as I detail on Slide 49.