Home > On-Demand Archives > Workshops >
Quick Start on Control Loops with Python
Dan Boschen - Watch Now - DSP Online Conference 2023 - Duration: 03:11:29
Control loops are ubiquitous in various applications where we wish to maintain or stabilize process variables to a desired set point or value. The speaker, Dan Boschen, brings a wealth of experience in the mixed signal (digital or analog) practical control loop design of microwave synthesizers, modems and radio transceivers, and, most recently, atomic clocks.
In this live workshop, Dan will first provide an overview of control loop theory sufficient for the implementation of a Phase-Lock-Loop (PLL). Topics covered will include:
- Transfer Functions
- Loop Order and Tracking
- Stability
- Bode and Nyquist Plots
- Noise Transfer Functions
PLL implementations in both the analog and all-digital domain will be detailed for practical implementation. The modeling and simulation of control loops will be demonstrated with use of the free Python programming language.
This is a great opportunity for anyone wishing to get a quick jump start on practical control loop implementations in both the digital and analog domains, and to see what Python can offer for use in the simulation and modeling of control loops.
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
Quick Start on Control Loops with Python is a practical workshop that teaches how to model, design and simulate control loops — especially phase-locked loops (PLLs) — using Python. The talk connects classical control concepts (transfer functions, poles and zeros, Bode/Nyquist stability analysis) to practical RF and mixed-signal implementations: analog PLLs with VCOs and phase‑frequency detectors, and all‑digital PLLs built from numerically controlled oscillators (NCOs), accumulators and discrete-time loop filters.
Why it matters: control loops are everywhere in communications and signal processing — carrier and timing recovery in receivers, automatic gain control, frequency synthesis, and high-precision systems like atomic clocks. Understanding how to model loops, check stability, set loop bandwidth and evaluate noise transfer is essential to predict real behavior and to design robust, fast, low-jitter systems. The workshop emphasizes hands-on simulation with free Python tools so you can iterate designs quickly and test real signals.
Who will benefit the most from this presentation
- RF and microwave engineers designing PLL-based synthesizers or receivers.
- DSP engineers implementing digital control loops, NCOs or clock and data recovery.
- Graduate students and advanced undergraduates learning control theory applied to signals and communications.
- Practitioners who want a compact, practical path from theory to implementation using Python (Jupyter notebooks included).
- Anyone curious about phase noise budgeting, loop bandwidth trade-offs, or how analog and digital loops map to each other.
What you need to know
This talk assumes a basic familiarity with signals and linear systems. To get the most from the workshop, review these key ideas and notations beforehand:
- Complex phasors: A sinusoid can be represented as a rotating phasor $e^{j\omega t}$ with magnitude and angle. This viewpoint makes amplitude/phase manipulations and spectral reasoning intuitive.
- Fourier and Laplace transforms: Frequency response is $H(j\omega)$ (Fourier); Laplace $H(s)$ with $s=\sigma+j\omega$ generalizes to growth/decay and simplifies integrals. Poles/zeros of $H(s)$ determine system dynamics and stability.
- Z-transform: For discrete-time models use $z$ with the mapping $z=e^{sT}$. The unit circle $|z|=1$ corresponds to $s=j\omega$. Low-frequency digital behavior often maps where $s\approx z-1$.
- Transfer functions and blocks: Know how to model common blocks: integrator $\frac{1}{s}$ (continuous) and accumulator or $\frac{z}{z-1}$ (discrete). VCO in phase units contributes $\frac{K_v}{s}$; an NCO maps to a $\frac{K_v}{z-1}$-like behavior.
- Open-loop vs. closed-loop: The closed-loop transfer from an input to output follows $H_{cl}(s)=\frac{G(s)}{1+G(s)}$, where $G(s)$ is the open-loop gain. Roots of $1+G(s)=0$ are the closed-loop poles.
- Stability and margins: Use Bode plots to estimate phase and gain margin (phase margin = how far from −180° the loop is at the 0 dB crossing). For complex cases, Nyquist is the rigorous tool.
- Loop order and type: The number of integrators (poles at the origin) defines loop type and steady-state tracking (e.g., a type‑II loop can eliminate steady-state frequency error). Order affects transient behaviour and design knobs (PI/PID)
- Loop filters: A PI filter in the loop provides proportional and integral action (zero + integrator); PID adds derivative. Placement of P/I gains and chosen time constants determine bandwidth and damping.
- Noise transfer: Different noise sources (reference, VCO, quantization) couple through different forward paths; model each as an input and use transfer functions to predict composite phase noise and jitter.
- Practical mapping: How analog concepts map to digital: integrators ⇄ accumulators, delays ⇄ $z^{-1}$, analog 1/s ⇄ digital $\frac{1}{z-1}$ approximations near DC. Sampling and quantization effects matter.
Glossary
- PLL (Phase-Locked Loop) — A feedback loop that locks the phase of a VCO or NCO to a reference using a phase detector and loop filter.
- FLL (Frequency-Locked Loop) — A loop that uses frequency error (discriminator) rather than phase; useful when only frequency information is available.
- VCO / NCO — VCO: voltage-controlled oscillator (analog). NCO: numerically controlled oscillator (digital accumulator + LUT).
- Phase Detector (PD / PFD) — Converts phase difference into an error (voltage or digital count). PFD adds wide capture range by detecting frequency as well.
- Loop Filter (PI, PID) — Filters the detector output to shape loop dynamics; PI provides proportional and integral action for stability and steady-state error control.
- Transfer Function — System representation $H(s)$ or $H(z)$ relating input to output in the Laplace/z domains.
- Poles and Zeros — Roots of denominator/numerator of a transfer function; pole locations determine natural frequencies and decay rates.
- Phase/Gain Margin — Measures of how close the loop is to instability (phase margin measured at 0 dB crossing, gain margin at −180° crossing).
- Phase Noise — Spectral density of short-term phase fluctuations of an oscillator; important for jitter and system performance.
- Bode / Nyquist plots — Frequency-domain tools to assess magnitude/phase vs. frequency (Bode) and map encirclements of −1 for robust stability tests (Nyquist).
Final notes
Dan Boschen's workshop balances solid theory with practical tools and examples. Expect clear explanations that connect Laplace/z-domain reasoning to real hardware and to all‑digital implementations, plus hands‑on Python/Jupyter demos you can reuse. If you want a compact, practical path from control theory to deployable PLLs (analog or digital) and an understanding of how loop design affects phase noise and lock behavior, this presentation is a very helpful next step.
Thanks again Dan. We all can't get enough of this stuff, cos we all forget. Hope you took Roy out for a walk in the dreary MA weather. Looking forward to the Notebook to try out some things - thanks for putting it together.
Is there any update on when the Jupyter notebook script file will be available?
I will upload it early next week; I am adding some additional interesting details that I want to validate over the weekend.
OK. Thanks for letting me know. Great presentation by the way! I'm looking forward so much to the Jupyter notebook next week.
That was fun! Typos on Sheet 42 (At 15 GHz, slope is 600 MHz/V) and Slide 54 (z-1 in final denominator should be tau1). Corrected on uploaded copy of presentation. zip file of the Python simulation will be posted shortly.

The Python Notebook for the workshop can now be downloaded under 'Files Provided by the Speaker(s)' on the left-hand side (you'll need to be logged in to access).