DSPRelated.com

Update To: A Wide-Notch Comb Filter

Rick LyonsRick Lyons December 9, 2019

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

Rick LyonsRick Lyons November 24, 201918 comments

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

Rick LyonsRick Lyons September 24, 201933 comments

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 LyonsRick Lyons July 4, 201919 comments

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 LyonsRick Lyons May 28, 20194 comments

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 LyonsRick Lyons May 24, 20195 comments

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 LyonsRick Lyons May 20, 20198 comments

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 LyonsRick Lyons March 29, 201922 comments

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 LyonsRick Lyons February 20, 20198 comments

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

Rick LyonsRick Lyons January 16, 201911 comments

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.


The Number 9, Not So Magic After All

Rick LyonsRick Lyons October 1, 20146 comments

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 LyonsRick Lyons March 30, 200826 comments

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

Rick LyonsRick Lyons January 4, 201616 comments

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

Rick LyonsRick Lyons September 24, 201610 comments

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 LyonsRick Lyons November 3, 200712 comments

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 LyonsRick Lyons June 23, 200821 comments

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 LyonsRick Lyons August 18, 201517 comments

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 LyonsRick Lyons November 19, 200817 comments

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

Rick LyonsRick Lyons December 27, 201725 comments

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

Rick LyonsRick Lyons December 14, 201112 comments

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.