Update To: A Wide-Notch Comb Filter
This blog presents alternatives to the wide-notch comb filter described in Reference [1]. That comb filter, which for notational reasons I now call a 2-RRS wide notch comb filter, is shown in Figure 1. I use the "2-RRS" moniker because the comb filter uses two recursive running sum (RRS) networks.
The z-domain transfer function of the 2-RRS wide-notch comb filter, H2-RRS(z), is:
References
[1] R. Lyons, "A Wide-Notch Comb Filter", dsprelated.com Blogs, Nov. 24, 2019, Available...
A Wide-Notch Comb Filter
Traditional comb filters make very narrow stopband notches, which limits their ability to suppress broader interfering tones. Rick Lyons presents a linear-phase comb filter that produces wider stopband notches than the conventional design while preserving linear-phase behavior. The post also reviews the traditional cascaded recursive running-sum architecture, its co-located dual poles and zeros on the z-plane, and the placement of nulls at integer multiples of fs/D.
The Risk In Using Frequency Domain Curves To Evaluate Digital Integrator Performance
Frequency-response curves can be misleading when selecting a digital integrator, Rick Lyons shows, and he proves it with counterexamples using seven test signals. By comparing methods such as Simpson's 1/3 rule, Al-Alaoui, and Tick's rule on definite-integral tasks, Lyons demonstrates that a close match to the ideal frequency response does not guarantee accurate integrals, because input signal traits strongly affect results.
Reduced-Delay IIR Filters
Rick Lyons investigates a simple 2nd-order IIR modification that reduces passband group delay by just under one sample, inspired by Steve Maslen's reduced-delay concept. He walks through the conversion steps and compares z-plane, magnitude, and group-delay plots for Butterworth, elliptic, and Chebyshev prototypes, showing how zeros shift and stopband attenuation degrades. A linked PDF extends the study to 1st-, 3rd-, and 4th-order cases so you can follow the tradeoffs.
Somewhat Off Topic: Deciphering Transistor Terminology
Rick Lyons unpacks a small linguistic mystery in electronics, revealing why the transistor's middle terminal is called the "base". He traces the name to the 1949 Bell Labs "semiconductor triode", where the device sat on a metal base plate described as a large-area low-resistance contact, and notes that later transistor sandwich designs kept the name for historical reasons. The post includes original references and a few trivia nuggets.
Reducing IIR Filter Computational Workload
Rick Lyons demonstrates a simple, practical way to cut the multiply count for IIR lowpass and highpass filters by converting them into dual-path allpass structures. The conversion preserves the original magnitude response while drastically reducing multiplies per input sample, for example turning a 5th-order IIR that needs 11 multiplies into an equivalent allpass form needing only five. The linked PDF includes theory, implementation notes, a design example, and MATLAB code.
A Lesson In Engineering Humility
Rick Lyons revisits a remarkable 1948 Bell Labs project that implemented a 12-channel telephone PCM transmission system without using transistors. The original two-paper PDF shows how engineers converted analog audio into 7-bit serial pulse-code streams sampled at 8000 samples per second, and Lyons calls studying that work a true lesson in engineering humility. He places the papers alongside 1948 milestones such as Shannon's theory and early transistor developments.
Controlling a DSP Network's Gain: A Note For DSP Beginners
Rick Lyons calls out a simple but costly mistake beginners make when normalizing digital networks, scaling the input instead of the output. Using fixed-point examples he shows that pre-multiplying an A/D output by 1/8 throws away bits and costs about 18 dB of SQNR. The practical guidance is to place gain control as the final multiplication stage and beware a faulty Simpson's 1/3 integrator example.
Stereophonic Amplitude-Panning: A Derivation of the 'Tangent Law'
Rick Lyons presents a clear geometrical derivation of the stereophonic amplitude-panning Tangent Law, filling a gap left by common references. Using vector components and the equidistant speaker assumption to keep signals in phase, he arrives at the Tangent Law and isolates practical gain formulas gL and gR needed to place an apparent source at a desired panning angle. Engineers can apply Eqs. (12) and (14) directly.
A Brief Introduction To Romberg Integration
Romberg integration delivers dramatic accuracy gains for definite integrals by combining multiple trapezoidal approximations into a single highly accurate result. Rick Lyons demonstrates how just five samples can achieve 0.0038% error versus a trapezoidal rule needing 100 samples, and a 17-sample example hits 3.6×10−4% error. The post outlines the N-segment procedure, cost scaling, and links to MATLAB code.
An Efficient Linear Interpolation Scheme
A simple trick slashes the cost of linear interpolation to at most one multiply per output sample, and often to none. The post shows a zero-order-hold based network that preserves input samples, has a short L-1 transient, and lets 1/L scaling be implemented as a binary shift when L is a power of two. It also gives a fixed-point layout that moves scaling to the end to reduce quantization distortion.
Four Ways to Compute an Inverse FFT Using the Forward FFT Algorithm
Rick Lyons lays out four practical techniques to get an inverse FFT when you only have forward FFT software or FPGA cores available. The post highlights a classic data-reversal trick, a conjugate-symmetry optimized flow, and two methods that avoid reversals using data swapping or complex conjugation plus scaling. Each method notes when it is preferable so engineers can pick the least costly implementation.
Computing the Group Delay of a Filter
Rick Lyons presents a neat, practical way to get a filter's group delay directly from its impulse response using only DFTs. The method computes an N-point DFT of h(n) and of n·h(n), divides them in the frequency domain, and takes the real part to obtain group delay in samples, avoiding phase unwrapping. The post includes MATLAB code, a zero-division warning, and a caution that the method is reliable for FIR filters but not always for IIRs.
A Brief Introduction To Romberg Integration
Romberg integration delivers dramatic accuracy gains for definite integrals by combining multiple trapezoidal approximations into a single highly accurate result. Rick Lyons demonstrates how just five samples can achieve 0.0038% error versus a trapezoidal rule needing 100 samples, and a 17-sample example hits 3.6×10−4% error. The post outlines the N-segment procedure, cost scaling, and links to MATLAB code.
Goertzel Algorithm for a Non-integer Frequency Index
Rick Lyons demonstrates how to run the Goertzel algorithm with a non-integer frequency index k, letting you target DTFT frequencies that do not align with DFT bin centers. He interprets Rajmic and Sysel's generalization, provides a simple implementation, and presents a real-valued reformulation that reduces the final multiplies for real inputs. Example Matlab code is included to reproduce and adapt the technique.
Generating Complex Baseband and Analytic Bandpass Signals
Rick Lyons gathers and compares practical methods for creating complex baseband and analytic bandpass signals in one compact reference. The post clarifies definitions, lists time and frequency domain techniques from quadrature sampling to FFT-based analytic generation, and notes implementation tradeoffs such as sample-rate constraints, Hilbert transformer use, and phase linearity concerns. Engineers get a quick Hit Parade of options and pointers to deeper references.
Linear-phase DC Removal Filter
Rick Lyons presents a practical, multiplier-free way to remove DC while preserving linear phase by cascading D-point moving-average filters. He shows how choosing D as a power of two gives bit-shift scaling, how a dual-MA yields a narrow transition band with modest ripple, and how a quad-MA drives ripple down to near inaudible levels while noting the fixed-point accumulator sizing required.
Using Mason's Rule to Analyze DSP Networks
When algebra gets messy, Rick Lyons shows how Mason's Rule cuts through the tedium to produce z-domain transfer functions for even nested-feedback DSP networks. The post gives a clear step-by-step procedure, definitions, and worked examples including a biquad, a DC-bias remover, and a complex multi-loop network. It also points to a public MATLAB routine to automate the bookkeeping.
FFT Interpolation Based on FFT Samples: A Detective Story With a Surprise Ending
Rick Lyons follows a numerical mismatch from a published astronomy paper into a short detective story about FFT interpolation. He shows a commonly published interpolation formula produces large errors, explains why the algebraic approximations fail, and presents several correct alternatives with algebraic simplifications that greatly reduce computation. Engineers get both the debugging lesson and practical, lower‑cost formulas for evaluating X(k) between FFT bins.
The Most Interesting FIR Filter Equation in the World: Why FIR Filters Can Be Linear Phase
Rick Lyons pulls back the curtain on a little-known coefficient constraint that makes complex-coefficient FIR filters exhibit linear phase. Rather than simple symmetry of real coefficients, the key is a conjugate-reflection relation involving the filter phase at DC, which collapses to ordinary symmetry for real taps. The post includes derivations, intuition using the inverse DTFT, and a Matlab example to verify the result.
The Number 9, Not So Magic After All
Rick Lyons dismantles the mystique around the number 9 by showing its 'magic' stems from our base-10 system rather than any unique numeral power. He walks through classic 9 tricks, including digit-sum divisibility, digital-root behavior, and division patterns, then generalizes them to base-B where digit B-1 plays the same role. The post is a short, playful link between recreational arithmetic and radix thinking.
Linear-phase DC Removal Filter
Rick Lyons presents a practical, multiplier-free way to remove DC while preserving linear phase by cascading D-point moving-average filters. He shows how choosing D as a power of two gives bit-shift scaling, how a dual-MA yields a narrow transition band with modest ripple, and how a quad-MA drives ripple down to near inaudible levels while noting the fixed-point accumulator sizing required.
Optimizing the Half-band Filters in Multistage Decimation and Interpolation
Multistage decimation and interpolation by powers of two get a lot cheaper if you size each half-band filter differently. Rick Lyons walks through spectra for three-stage examples that show why early stages can use narrower filters for decimation while interpolation reverses the order, and how aliasing and images are handled by later stages. Learn a simple rule to cut multipliers without sacrificing performance.
An s-Plane to z-Plane Mapping Example
A misleading online diagram prompted Rick Lyons to reexamine how s-plane points map to the z-plane. He spotted apparent errors in the original figure, drew a corrected mapping, and invites readers to inspect both diagrams and point out any remaining mistakes. The short post is a quick visual primer for engineers who rely on accurate s-plane to z-plane mappings in analysis and design.
A Differentiator With a Difference
Rick Lyons presents a compact, practical FIR differentiator that combines central-difference noise attenuation with a much wider linear range. The proposed ydif(n) doubles the usable frequency range to about 0.34π (0.17fs), uses ±1/16 coefficients so multiplications become simple 4-bit right shifts, and has an exact three-sample group delay for easy synchronization with other signals.
Computing Large DFTs Using Small FFTs
Rick Lyons demonstrates a practical trick for computing large N-point DFTs by combining multiple smaller radix-2 FFTs when only limited FFT sizes are available. He walks through 16-point and 24-point examples using two and three 8-point FFTs, shows how to assemble outputs with twiddle factors, and explains a symmetry that reduces twiddle storage to N/4 values. The method supports non-power-of-two DFT lengths.
The Most Interesting FIR Filter Equation in the World: Why FIR Filters Can Be Linear Phase
Rick Lyons pulls back the curtain on a little-known coefficient constraint that makes complex-coefficient FIR filters exhibit linear phase. Rather than simple symmetry of real coefficients, the key is a conjugate-reflection relation involving the filter phase at DC, which collapses to ordinary symmetry for real taps. The post includes derivations, intuition using the inverse DTFT, and a Matlab example to verify the result.
Computing the Group Delay of a Filter
Rick Lyons presents a neat, practical way to get a filter's group delay directly from its impulse response using only DFTs. The method computes an N-point DFT of h(n) and of n·h(n), divides them in the frequency domain, and takes the real part to obtain group delay in samples, avoiding phase unwrapping. The post includes MATLAB code, a zero-division warning, and a caution that the method is reliable for FIR filters but not always for IIRs.
An Efficient Linear Interpolation Scheme
A simple trick slashes the cost of linear interpolation to at most one multiply per output sample, and often to none. The post shows a zero-order-hold based network that preserves input samples, has a short L-1 transient, and lets 1/L scaling be implemented as a binary shift when L is a power of two. It also gives a fixed-point layout that moves scaling to the end to reduce quantization distortion.
Accurate Measurement of a Sinusoid's Peak Amplitude Based on FFT Data
Measuring a sinewave's peak from FFT data can be severely biased by scalloping loss, producing errors up to 36.3 percent. Rick Lyons demonstrates how to apply a flat-top window via frequency-domain convolution to the FFT bins, cutting maximum amplitude error to about 0.02 dB compared with 3.9 dB for rectangular windows. The post includes Matlab code and practical caveats for reliable use.










