Evaluate Window Functions for the Discrete Fourier Transform
Spectral leakage makes DFTs of continuous sinewaves misleading, and windowing is the practical workaround. This post supplies Matlab code to plot spectra of windowed sinewaves and compute figures of merit, so you can compare windows such as flattop and Chebyshev. See how sidelobe level, mainlobe bandwidth, processing loss, noise bandwidth, and scallop loss trade off to guide your window choice.
Feedback Controllers - Making Hardware with Firmware. Part 10. DSP/FPGAs Behaving Irrationally
A practical approach to emulating lossy transmission lines in real time, using pole-zero approximations to replace irrational s-domain behaviors and enable FPGA implementation. The author shows 8-pole/zero fits for Zo(s) and a 6-pole/zero plus delay for P(s), validated against LTSpice and MATLAB. Conversion to sampled-data Zo(z) and biquad implementations is detailed, along with issues in single-precision arithmetic and mitigations such as mixed sample rates and partial-fraction decomposition.
Design a DAC sinx/x Corrector
Neil Robertson provides a compact Matlab function and coefficient tables for designing linear-phase FIR sinx/x correctors to undo the DAC sinc roll-off. The post explains the sinc_corr(ntaps,fmax,fs) call, shows worked examples with ntaps=5 and different fmax values, and demonstrates fixed-point quantization including a k=512 example and CSD digit guidance. Practical notes cover corrector gain and input back-off to avoid clipping.
Feedback Controllers - Making Hardware with Firmware. Part 9. Closing the low-latency loop
This article demonstrates combining DSP and feedback-control on an Intel Cyclone floating-point FPGA to build low-latency closed-loop circuit emulators and controllers. Using a single floating-point biquad at 1.6 Msps, an IFFT multi-tone 4.096 ms capture for wideband measurement, and MATLAB references for verification, the author achieves sub-nanosecond timing insight and applies DSP phase compensation to cancel about 100 pF of PCB parasitics.
Digital PLL’s, Part 3 – Phase Lock an NCO to an External Clock
Phase-locking a numerically controlled oscillator to an external clock that is unrelated to system clocks is practical and largely unexplored. Neil Robertson presents a time-domain digital PLL that converts the ADC-sampled clock into I/Q with a Hilbert transformer and measures phase error with a compact complex phase detector. The post shows loop-filter coefficient formulas and simulations that reveal how ADC quantization and Gaussian clock noise map into NCO phase noise and how loop bandwidth shapes the result.
ADC Clock Jitter Model, Part 2 – Random Jitter
Neil Robertson shows how to simulate ADC sample-clock random jitter in Matlab, moving from band-limited Gaussian noise to wideband and close-in phase noise. The post highlights practical artifacts such as aliasing of wideband clock noise, the 20*log10 dependence of jitter sidebands on input frequency, and why cubic interpolation plus a custom noise_filter produces accurate rms and spectral results engineers can trust.
ADC Clock Jitter Model, Part 1 – Deterministic Jitter
Clock jitter on ADC sample clocks corrupts high-frequency signals, and this post builds a practical MATLAB model to show exactly how deterministic (periodic) jitter maps into phase modulation and discrete sidebands. The author explains a parabolic-interpolation approach using twice-rate samples, demonstrates examples from single tones to pulses, and matches simulation spectra to closed-form sideband formulas so engineers can predict jitter effects.
Phase or Frequency Shifter Using a Hilbert Transformer
A Hilbert transformer converts a real input into an analytic I+jQ pair, enabling phase shifts and frequency shifts while keeping real inputs and outputs. This article shows Matlab implementations (31-tap FIR with Hamming or Blackman windows), derives y = I cosθ - Q sinθ for phase and frequency shifting, and highlights practical limits from finite taps and coefficient/NCO quantization.
Coefficients of Cascaded Discrete-Time Systems
Multiplying discrete-time transfer functions is just polynomial multiplication, and polynomial multiplication is convolution. Neil Robertson shows that the numerator and denominator coefficients of cascaded systems come from convolving the individual coefficient vectors, then demonstrates the idea with MATLAB code and a 2nd-order IIR cascade that yields a 4th-order response. The approach makes computing time and frequency responses straightforward.
Design IIR Filters Using Cascaded Biquads
High-order IIR filters are numerically sensitive, especially at low cutoff frequencies. This article shows how to implement a Butterworth lowpass as a cascade of second-order biquads, deriving the per-section coefficient formulas and giving a Matlab biquad_synth example. It explains computing denominator coefficients from pole pairs, using b = [1 2 1] with K = sum(a)/4 for unity DC gain, and highlights reduced quantization sensitivity.
ADC Clock Jitter Model, Part 2 – Random Jitter
Neil Robertson shows how to simulate ADC sample-clock random jitter in Matlab, moving from band-limited Gaussian noise to wideband and close-in phase noise. The post highlights practical artifacts such as aliasing of wideband clock noise, the 20*log10 dependence of jitter sidebands on input frequency, and why cubic interpolation plus a custom noise_filter produces accurate rms and spectral results engineers can trust.
Simulink-Simulation of SSB demodulation
This post walks through Simulink models that implement SSB demodulation and modulation, using Richard Lyons' phasing method as a foundation. It shows practical models for simple carrier multiplication and for the phasing method with cosine and -sin paths plus Hilbert filtering, and it highlights sampling, decimation, filter choices, and delay alignment to make the techniques work in simulation.
Instantaneous Frequency Measurement
Measuring carrier frequency quickly and with minimal data matters in radar and signal characterization. Parth Vakil explains the delay-and-multiply instantaneous frequency measurement technique, shows how analytic signals and multiple delays resolve the 2Ï€ ambiguity, and demonstrates noise, phase-wrapping, and interferer effects using MATLAB code. He also outlines practical mitigations like phase unwrapping and channelization.
Simple Discrete-Time Modeling of Lossy LC Filters
Converting a lossy LC filter into a discrete-time impulse response lets you analyze mixed analog and DSP systems in one time domain. This post walks through computing the LC frequency response via chain (ABCD) parameters including resistive losses, enforcing the Hermitian symmetry required for a real IDFT, and using the IDFT to produce an asymmetrical FIR impulse response. A 5th-order Butterworth example illustrates insertion loss and impulse-shape effects.
Design of an anti-aliasing filter for a DAC
If you need a practical way to design an anti-aliasing filter for a DAC, this post delivers an Octave/Matlab script that numerically optimizes a Laplace-domain transfer function for linear phase and arbitrary magnitude. The routine models the DAC sample-and-hold sinc response, compensates group delay automatically, and can include an optional multiplierless FIR equalizer. An example shows a 5.4 dB objective improvement and reduced analog Q for easier implementation.
Setting Carrier to Noise Ratio in Simulations
Setting the right Gaussian noise level is easy once you know the math. This post derives simple, practical equations to compute noise density and the rms noise amplitude needed to achieve a target carrier to noise ratio at a receiver output. It shows how to get the noise-equivalent bandwidth from a discrete-time filter, how to compute N0 and sigma, and includes a MATLAB set_cnr function to generate the noise vector.
Spline interpolation
Markus Nentwig provides a cookbook for segmented cubic spline interpolation that turns scattered or noisy data into efficient fixed-point functions. The article shows how to build third-order polynomial segments with explicit value and slope control via basis functions, solve scaling factors by least-squares in Octave/Matlab, and export coefficients for Verilog RTL evaluation using the Horner scheme and practical fixed-point tips.
Model Signal Impairments at Complex Baseband
Neil Robertson presents compact complex-baseband channel models for common signal impairments, implemented as short Matlab functions of up to seven lines. Using QAM examples and constellation plots, he demonstrates how interfering carriers, two-path multipath, sinusoidal phase noise, and Gaussian noise distort constellations and affect MER. The examples are lightweight and practical, making it easy to test receiver diagnostics and prototype adaptive-equalizer scenarios.
Least-squares magic bullets? The Moore-Penrose Pseudoinverse
Markus Nentwig walks through a practical way to remove power-line hum from measurements using the Moore-Penrose pseudoinverse. He builds a harmonic basis, computes pinv(basis) to get least-squares coefficients, and reconstructs and subtracts the hum, with a ready-to-run Matlab example. The post highlights limits and performance: basis-like signal components will be removed, and accuracy improves with the square root of sample count.
Feedback Controllers - Making Hardware with Firmware. Part 10. DSP/FPGAs Behaving Irrationally
A practical approach to emulating lossy transmission lines in real time, using pole-zero approximations to replace irrational s-domain behaviors and enable FPGA implementation. The author shows 8-pole/zero fits for Zo(s) and a 6-pole/zero plus delay for P(s), validated against LTSpice and MATLAB. Conversion to sampled-data Zo(z) and biquad implementations is detailed, along with issues in single-precision arithmetic and mitigations such as mixed sample rates and partial-fraction decomposition.
ADC Clock Jitter Model, Part 2 – Random Jitter
Neil Robertson shows how to simulate ADC sample-clock random jitter in Matlab, moving from band-limited Gaussian noise to wideband and close-in phase noise. The post highlights practical artifacts such as aliasing of wideband clock noise, the 20*log10 dependence of jitter sidebands on input frequency, and why cubic interpolation plus a custom noise_filter produces accurate rms and spectral results engineers can trust.
Matlab Code to Synthesize Multiplierless FIR Filters
Learn how to build multiplierless FIR lowpass filters in Matlab using Canonic Signed-Digit coefficients. The post explains converting Parks-McClellan floating-point taps to scaled integers, then to exact CSD digits, and includes two m-files that search maintap scaling to minimize signed digits while preserving the filter response. Practical notes cover external gain compensation, the 2/3 full-scale CSD limit, and sensitivity to pass/stop edges.
Feedback Controllers - Making Hardware with Firmware. Part I. Introduction
This first post kicks off a series on using DSP and feedback control with mixed-signal electronics and FPGAs to emulate two-terminal circuits and create low latency controllers. It frames circuit emulation as a feedback problem, highlights latency as the key practical constraint, and outlines the planned evaluation hardware, target devices, and software tools that will be used in later MATLAB/Simulink and FPGA work.
Model a Sigma-Delta DAC Plus RC Filter
Sigma-delta digital-to-analog converters (SD DAC’s) are often used for discrete-time signals with sample rate much higher than their bandwidth. For the simplest case, the DAC output is a single bit, so the only interface hardware required is a standard digital output buffer. Because of the high sample rate relative to signal bandwidth, a very simple DAC reconstruction filter suffices, often just a one-pole RC lowpass. In this article, I present a simple Matlab function that models the combination of a basic SD DAC and one-pole RC filter. This model allows easy evaluation of the overall performance for a given input signal and choice of sample rate, R, and C.
Add the Hilbert Transformer to Your DSP Toolkit, Part 1
Learn how the Hilbert transformer creates a 90-degree phase-shifted quadrature component without down-conversion, and why it is simply a special FIR filter. Part 1 defines the transformer, derives its ideal frequency response H(ω)=j for ω<0 and -j for ω≥0, and walks through Matlab examples that demonstrate phase shifting and image attenuation for bandpass signals.
Discrete Wavelet Transform Filter Bank Implementation (part 2)
David Valencia walks through practical differences between the discrete wavelet transform and the discrete wavelet packet transform, showing why DWPT yields symmetric frequency resolution while DWT favors a single high-pass branch. He explains how Noble identities let you collapse multi-branch filter banks into equivalent single convolutions, then compares block convolution matrices with chain-processing and links to MATLAB code for both approaches.
Feedback Controllers - Making Hardware with Firmware. Part 2. Ideal Model Examples
An engineer's guide to building ideal continuous-time models for hardware emulation, using TINA Spice, MATLAB and Simulink to validate controller and circuit behavior. The article shows how a passive R-C network can be emulated by an amplifier, a current measurement and a summer, with Spice, MATLAB and Simulink producing coincident Bode responses. Small phase differences between MATLAB and Simulink are noted, and sampled-data issues are slated for the next installment.
Modeling Anti-Alias Filters
Modeling anti-alias filters brings textbook aliasing examples to life. This post shows how to build discrete-time models G(z) for analog Butterworth and Chebyshev lowpass anti-alias filters, compares bilinear transform and impulse invariance, and simulates ADC input/output including aliasing of sinusoids and Gaussian noise. It concludes that impulse invariance gives better stopband accuracy and includes Matlab helper functions.
Feedback Controllers - Making Hardware with Firmware. Part 3. Sampled Data Aspects
This article digs into practical sampled-data issues you must address when building feedback controllers for circuit emulation. It highlights a common MATLAB versus Simulink discrepancy caused by DAC holding, explains why FOH (ramp-invariant) c2d conversion matters, and surveys latency, bit depth, filter and precision trade-offs. It also lists candidate ADCs, DACs and FPGAs used in a real evaluation platform to guide hardware choices.
Modeling a Continuous-Time System with Matlab
Neil Robertson demonstrates a practical workflow for converting a continuous-time transfer function H(s) into an exact discrete-time H(z) using Matlab's impinvar. He walks through a 3rd-order Butterworth example, shows how to match impulse and step responses, and compares frequency response and group delay so engineers can see where the discrete model stays accurate and when sampling-rate limits cause departure.












