DSPRelated.com

Python scipy.signal IIR Filtering: An Example

Christopher FeltonChristopher Felton May 19, 2013

Christopher Felton walks through using scipy.signal IIR filters to demodulate PWM signals, using spectrum and spectrogram analysis to show what works and what does not. He demonstrates using filtfilt to avoid phase delay, compares a single narrow IIR to a very high order FIR, and shows how staged IIR filtering and multirate ideas give much better attenuation. Includes an FPGA-ready MyHDL PWM model.


A Quadrature Signals Tutorial: Complex, But Not Complicated

Rick LyonsRick Lyons April 12, 201366 comments

Quadrature signals are essential in modern communications, yet complex numbers and the j operator intimidate many engineers. In this tutorial Rick Lyons uses phasor geometry, three-dimensional time and frequency plots, and practical I/Q sampling examples to demystify complex exponentials, negative frequency, and how to generate baseband complex signals. Read to get physical intuition and hands-on rules you can apply to modulation, demodulation, and DSP implementations.


Polyphase Filters and Filterbanks

Kyle Kyle March 19, 201310 comments

Kyle walks through practical polyphase filtering and analysis filterbanks, complete with Python code using numpy, scipy and matplotlib. The post shows how splitting an FIR into M polyphase legs gives identical, more efficient decimation while avoiding aliasing, and it flags the subtle reordering, zero padding and FFT versus IDFT ordering issues that trip many implementers. Includes runnable reference code and links for deeper theory.


Beat Notes: An Interesting Observation

Rick LyonsRick Lyons March 13, 20137 comments

Rick Lyons overturns a common intuition about beat notes, showing that adding two nearby audio tones yields an average-frequency tone whose amplitude fluctuates, rather than a separate low-frequency sinusoid. He contrasts multiplication and summation of sines, provides simple trigonometric insight, and includes Matlab audio demos to explain why aircraft engine "whump" sounds are amplitude fluctuations of the average engine frequency.


DSPRelated Finally on Twitter!

Stephane BoucherStephane Boucher February 20, 20132 comments

After resisting social networks, Stephane Boucher announces DSPRelated's move to Twitter and a few site improvements. Users can now sign in once to access DSPRelated, FPGARelated and EmbeddedRelated with the same account, and the site will post updates from @dsprelated, @embeddedrelated and @fpgarelated. To encourage followers, Boucher will occasionally tweet links that award prizes to the first visitors.


Using the DFT as a Filter: Correcting a Misconception

Rick LyonsRick Lyons February 18, 201316 comments

Some sources claim the DFT, when used as a filter, shifts spectral energy down to DC. Rick Lyons shows that this is not true for consecutive DFT-bin outputs and explains the cause of the confusion: the FIR interpretation requires reversing the usual twiddle-factor order. He derives the DFT-bin frequency response, shows the bandpass center at 2πm/N, and explains when decimation does produce a translation to zero Hz.


The Little Fruit Market: The Beginning of the Digital Explosion

Rick LyonsRick Lyons January 14, 20135 comments

A small fruit market in Mountain View became an unlikely cradle for the modern electronics era. Rick Lyons recounts how William Shockley’s lab at 391 San Antonio prompted the Traitorous Eight to form Fairchild, seeding Silicon Valley and spawning an industry whose transistor production quickly dwarfed grains of rice. The post ties that history to the everyday ubiquity of semiconductor devices.


Noise shaping

Markus NentwigMarkus Nentwig December 9, 20123 comments

Markus Nentwig presents a compact, practical introduction to noise shaping by treating quantization error as the first sample of a designed impulse response. He shows how to derive a noise shaper from a target spectrum, demonstrates the tradeoff between in-band noise reduction and total noise increase, and includes a Matlab example while highlighting clipping and stability caveats for sigma-delta contexts.


Two jobs

Stephane BoucherStephane Boucher December 5, 201223 comments

Stephane Boucher explains why EmbeddedRelated went quiet for a few months after a volunteer project demanded more of his time. He and his wife organized a clown-gymnastics show with 15 kids, sold more than 700 of 800 tickets, and raised $2,700 for the Tree of Hope. Now the shows are done and he plans to resume regular posting with new site features.


Coupled-Form 2nd-Order IIR Resonators: A Contradiction Resolved

Rick LyonsRick Lyons November 23, 20127 comments

Rick Lyons resolves a long-standing confusion about the coupled-form 2nd-order IIR resonator by deriving its correct z-domain transfer function and explaining why textbooks can appear to contradict pole plots. He shows that with infinite precision the coupled and standard denominators match, but finite-bit quantization of rcos(Θ) and rsin(Θ) changes the z^-2 coefficient and shifts pole positions. Read to learn the correct H(z) to predict quantized behavior and when the coupled form outperforms the standard design.


Polar Coding Notes: Channel Combining and Channel Splitting

Lyons ZhangLyons Zhang October 19, 2018

Lyons Zhang walks through the core algebra of polar coding, showing how channel combining builds the vector channel W_N from N copies of a binary-input DMC using the polar transform G_N = B_N F^{⊗n}. The notes then define channel splitting, derive the coordinate-channel transition probabilities from the chain rule, and present the recursive formulas that let you compute W_{2N}^{(2i-1)} and W_{2N}^{(2i)} from W_N^{(i)}.


Off-Topic: A Fluidic Model of the Universe

Cedron DawgCedron Dawg February 2, 20226 comments

Cedron Dawg develops a Newtonian, fluidic model where space is a compressible "fluff" and particle motion is governed by a simple refractive steering equation. He shows how rho = ln n links index, permittivity and permeability to a gravity-like potential, derives a massive-particle steering law, and works through orbit and disk solutions that produce MOND-like effects while conflicting with General Relativity. The paper highlights concrete formulas and numerics to test the hypothesis.


Radio Frequency Distortion Part II: A power spectrum model

Markus NentwigMarkus Nentwig October 11, 20101 comment

Markus Nentwig presents a power-spectrum model that predicts RF nonlinear distortion from spectral power values instead of time-domain signals. The model computes distortion as repeated convolutions with a frequency-reversed replica and uses an FFT/IFFT trick with real-valued arithmetic for very high efficiency, making it suitable for system-level simulations and interference-aware radios. It is accurate for OFDM-like, Gaussian-amplitude signals when spectral binning is sufficiently fine; narrowband cases require denser bins.


Least-squares magic bullets? The Moore-Penrose Pseudoinverse

Markus NentwigMarkus Nentwig October 24, 20109 comments

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.


Filter a Rectangular Pulse with no Ringing

Neil RobertsonNeil Robertson May 12, 201610 comments

You can filter a rectangular pulse with no ringing simply by using an FIR whose coefficients are all positive, and make them symmetric to get identical leading and trailing edges. This post walks through a MATLAB example that convolves a normalized Hanning window with a 32-sample rectangular pulse, showing that window length controls edge duration and that shorter windows widen the spectrum. It also notes this is not a QAM pulse-shaping solution.


Compute Images/Aliases of CIC Interpolators/Decimators

Neil RobertsonNeil Robertson November 1, 20202 comments

CIC filters provide multiplier-free interpolation and decimation for large sample-rate changes, but their images and aliases can trip up designs. This post supplies two concise Matlab functions and hands-on examples to compute interpolator images and decimator aliases, showing spectra and freqz plots. Readers will learn how interpolation ratio and number of stages alter passband, stopband, and aliasing behavior.


Weighted least-squares FIR with shared coefficients

Markus NentwigMarkus Nentwig May 23, 2012

Markus Nentwig demonstrates how to design FIR filters that share coefficients across delay taps, allowing multiplier reuse and reduced implementation cost. He reimplements Lawson's iterative reweighted least-squares for complex-valued FIRs and provides Matlab/Octave code you can adapt for nonstandard constraints. The post explains iteration weight logic, the Toeplitz special-case with Levinson-Durbin, and practical trade-offs between multiplier count and stopband performance.


How the Cooley-Tukey FFT Algorithm Works | Part 3 - The Inner Butterfly

Mark NewmanMark Newman November 25, 2024

At the heart of the Cooley-Tukey FFT algorithm lies a butterfly, a simple yet powerful image that captures the recursive nature of how the FFT works. In this article we discover the butterfly’s role in transforming complex signals into their frequency components with efficiency and elegance. Starting with the 2-point DFT, we reveal how the FFT reuses repeated calculations to save time and resources. Using a divide-and-conquer approach, the algorithm breaks signals into smaller groups, processes them through interleaving butterfly diagrams, and reassembles the results step by step.


New Discussion Group: DSP & FPGA

Stephane BoucherStephane Boucher September 11, 20078 comments

I have just created a new discussion group for engineers implementing DSP functions on FPGAs. The creation of this group has been on my todo list for a long time. If you want to join the group, send a blank email to: fpgadsp-subscribe@yahoogroups.com

As usual, it should take a few weeks before there are enough members for interesting discussions to get started.


There's No End to It -- Matlab Code Plots Frequency Response above the Unit Circle

Neil RobertsonNeil Robertson October 23, 20179 comments

If you want a fresh way to inspect a digital filter, this post introduces plotfil3d, a compact MATLAB function that wraps the magnitude response around the unit circle in the Z-plane so you can view it in 3D. It uses freqz to compute H(z) in dB for N points and accepts an optional azimuth to change the viewing angle; the code is provided in the appendix.