Compute Modulation Error Ratio (MER) for QAM
Neil Robertson shows how to define and compute Modulation Error Ratio (MER) for QAM using a simplified baseband model and decision-slice errors. The post derives per-symbol and averaged MER formulas, explains when MER tracks carrier-to-noise ratio under AWGN and matched root-Nyquist filters, and provides example Pav values for QAM-16 and QAM-64 plus a Matlab script and practical tips.
Plotting Discrete-Time Signals
Neil Robertson demonstrates a practical interpolate-by-8 FIR approach to make sampled signals look like their continuous-time counterparts when plotted. The post explains a 121-tap filter designed for signals up to 0.4*fs, shows Matlab examples for a sinusoid and a filtered pulse, and highlights the transient and design trade-offs so you can reproduce clean plots with the supplied interp_by_8.m code.
Interpolation Basics
Neil Robertson demonstrates interpolation by an integer factor using a frequency-domain approach, showing how zero-insertion followed by an FIR low-pass filter reconstructs a higher-rate signal. The article walks through spectra, passband and stopband selection, and a 41-tap Parks-McClellan filter example applied to a Chebyshev-window test signal. Matlab code and percent-error plots are included so engineers can reproduce and evaluate the method.
A Direct Digital Synthesizer with Arbitrary Modulus
Need exact sampled tones on a coarse grid without a huge sine table? This post shows how to build a Direct Digital Synthesizer with an arbitrary modulus so the output frequency is exactly k·fs/L, using a look-up table as small as 20 entries for the 10 MHz/0.5 MHz-step example. It also explains fixed-point LUT rounding, accumulator bit sizing, and how to produce quadrature outputs when L is multiple of 4.
IIR Bandpass Filters Using Cascaded Biquads
This post provides a Matlab function that builds Butterworth bandpass IIR filters by cascading second-order biquad sections. The biquad approach, implemented in Direct Form II, reduces sensitivity to coefficient quantization, which matters most for narrowband filters. The included biquad_bp function computes each section's feedforward and feedback coefficients plus gains from a lowpass prototype order, center frequency, bandwidth, and sampling rate.
Demonstrating the Periodic Spectrum of a Sampled Signal Using the DFT
This post makes a basic DSP principle tangible by computing the DFT over an extended set of bins and plotting the results. It demonstrates that a sampled signal's spectrum repeats every sampling rate, explains the k-to-frequency mapping, and contrasts common bin ranges such as 0..N-1 and -N/2..N/2-1. The write-up also highlights symmetry for real sequences and recommends using the FFT for efficiency.
Compute the Frequency Response of a Multistage Decimator
This post shows a practical way to compute the full frequency response of a multistage decimator by representing every stage at the input sample rate. The author walks through upsampling lower-rate FIR coefficients, convolving to form the overall impulse response, and taking a DFT, then demonstrates how aliasing and stopband placement affect the aliased components. Example Matlab code and plots illustrate each step.
Use Matlab Function pwelch to Find Power Spectral Density -- or Do It Yourself
Neil Robertson walks through using Matlab's pwelch and shows how to implement PSD estimation yourself with fft. The post uses concrete examples and complete m-files to demonstrate window selection, converting pxx (W/Hz) to W/bin, Welch DFT averaging, and a worked C/N0 calculation. Readers get practical, runnable recipes for accurate spectrum units, variance reduction with averaging, and peak-power extraction.
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.
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.
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 2
This post shows a simple practical route to a Hilbert transformer by starting from a half-band FIR filter and tweaking its symmetry. It walks through a 19-tap example synthesized with Matlab's firpm (Parks-McClellan), explains the required frequency scaling, and shows how even-numbered taps become (or can be forced) zero through symmetry and coefficient quantization. Useful design rules are summarized for choosing ntaps.
Demonstrating the Periodic Spectrum of a Sampled Signal Using the DFT
This post makes a basic DSP principle tangible by computing the DFT over an extended set of bins and plotting the results. It demonstrates that a sampled signal's spectrum repeats every sampling rate, explains the k-to-frequency mapping, and contrasts common bin ranges such as 0..N-1 and -N/2..N/2-1. The write-up also highlights symmetry for real sequences and recommends using the FFT for efficiency.
The Discrete Fourier Transform as a Frequency Response
Neil Robertson shows that the discrete frequency response H(k) of an FIR filter is exactly the DFT of its impulse response h(n). He derives the continuous H(ω) and discrete H(k) using complex exponentials for a four-tap FIR, then replaces h(n) with x(n) to recover the general DFT formula. The post keeps the math simple and calls out topics left for separate treatment, such as windowing and phase.
Find Aliased ADC or DAC Harmonics (with animation)
If a sinewave drives an ADC or DAC, device nonlinearities create harmonics that can fold back as aliases above Nyquist. This post shows a simple Matlab model, using an NCO, a static nonlinearity, and a DFT to generate spectra and reveal aliased harmonics, with animated illustrations to make aliasing intuitive. The approach works for both ADC and DAC measurement setups and highlights realistic effects like quantization noise.
Learn About Transmission Lines Using a Discrete-Time Model
A simple discrete-time approach makes lossless transmission-line behavior easy to simulate and visualize. The post introduces MATLAB functions tline and wave_movie to model uniform lossless lines with resistive terminations, compute time and frequency responses, and animate travelling waves. A microstrip pulse example shows how reflections produce ringing and how source matching nearly eliminates it, making this a practical learning tool.
Add a Power Marker to a Power Spectral Density (PSD) Plot
Read absolute power directly from a PSD plot with a simple MATLAB helper. The author presents psd_mkr, a function that computes the PSD with pwelch and overlays a power marker in three modes: normal for narrowband tones, band-power for integrated power over a specified bandwidth, and 1 Hz for noise density readings. Examples show how bin summing, window loss, and scalloping are handled for accurate measurements.
Peak to Average Power Ratio and CCDF
Setting digital modulator levels depends on peak-to-average power ratio, because random signals produce occasional high peaks that cause clipping. This post shows how to compute the CCDF of PAPR from a signal vector, with MATLAB code and examples for a sine wave and Gaussian noise. The examples reveal the fixed 3.01 dB PAPR of a sine and the need for large sample counts to capture rare AWGN peaks.
Design IIR Highpass Filters
Neil Robertson walks through a compact, six-step procedure to synthesize IIR Butterworth highpass filters using pre-warping and the bilinear transform. The post gives the pole transformations, the placement of N zeros at z=1, the scaling to unity gain at fs/2, and a ready-to-run MATLAB hp_synth implementation that reproduces MATLAB's butter results.
Canonic Signed Digit (CSD) Representation of Integers
Canonic Signed Digit (CSD) encoding slashes the number of nonzero bits in integer coefficients, enabling multiplierless FIR filters implemented with shifts and adds. This post uses MATLAB code to demonstrate CSD rules, show how negative values work, and plot the distribution of signed digits as bit width changes. It finishes with practical techniques to minimize signed digits per coefficient for area and power efficient filter designs.
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.
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.
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.
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.
Learn to Use the Discrete Fourier Transform
Discrete-time sequences arise in many ways: a sequence could be a signal captured by an analog-to-digital converter; a series of measurements; a signal generated by a digital modulator; or simply the coefficients of a digital filter. We may wish to know the frequency spectrum of any of these sequences. The most-used tool to accomplish this is the Discrete Fourier Transform (DFT), which computes the discrete frequency spectrum of a discrete-time sequence. The DFT is easily calculated using software, but applying it successfully can be challenging. This article provides Matlab examples of some techniques you can use to obtain useful DFT’s.
Multiplierless Half-band Filters and Hilbert Transformers
This article provides coefficients of multiplierless Finite Impulse Response 7-tap, 11-tap, and 15-tap half-band filters and Hilbert Transformers. Since Hilbert transformer coefficients are simply related to half-band coefficients, multiplierless Hilbert transformers are easily derived from multiplierless half-bands.
Add the Hilbert Transformer to Your DSP Toolkit, Part 2
This post shows a simple practical route to a Hilbert transformer by starting from a half-band FIR filter and tweaking its symmetry. It walks through a 19-tap example synthesized with Matlab's firpm (Parks-McClellan), explains the required frequency scaling, and shows how even-numbered taps become (or can be forced) zero through symmetry and coefficient quantization. Useful design rules are summarized for choosing ntaps.
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.
Third-Order Distortion of a Digitally-Modulated Signal
Amplifier third-order distortion is a common limiter in RF and communications chains, and Neil Robertson walks through why it matters using hands-on MATLAB simulations. He shows how a cubic nonlinearity creates IMD3 tones, causes spectral regrowth and degrades QAM constellations, and gives practical notes on estimating k3, computing ACPR from PSDs, and sampling considerations.







