DSPRelated.com

The Exponential Nature of the Complex Unit Circle

Cedron DawgCedron Dawg March 10, 20155 comments

Euler's equation links exponential scaling and rotation by translating a distance along the unit-circle circumference into a complex value. Cedron Dawg develops an intuitive geometric view, using integer and fractional powers of i to show how points, roots of unity, and multiplication behave as additive moves along that circumference. The article also connects this picture to radians and the conventional Taylor-series proof for broader perspective.


Sum of Two Equal-Frequency Sinusoids

Rick LyonsRick Lyons September 4, 20146 comments

Rick Lyons exposes a frequent trig mistake and delivers complete closed-form expressions for collapsing two equal-frequency sinusoids into a single sinusoid. Using complex-exponential phasor addition and equating real and imaginary parts, he compiles easy-to-use tables for cosine+cosine, sine+sine, and cosine+sine cases and shows how to derive each form. Engineers get corrected identities and compact derivations useful for analysis and communications.


Constrained Integer Behavior

Christopher FeltonChristopher Felton May 26, 2014

Overflow and underflow are not always bugs, they can be useful in DSP when fixed-width integers wrap during processing. Christopher Felton demonstrates with moving-average (recursive-windowed-averager) and CIC filter examples how 2's complement wraparound in MyHDL's modbv cancels between an integrator and a comb via pole-zero cancellation. He also covers fixed-point resizing choices, saturation versus wrap, and how rounding error can accumulate.


DSP Related Math: Nice Animated GIFs

Stephane BoucherStephane Boucher April 24, 20143 comments

Stephane Boucher collected a compact set of animated GIFs that make common DSP math click visually. He spotted popular posts on the ECE subreddit and aggregated DSP-focused GIFs in one place to speed intuition and teaching. Examples include the relationship between sin and cos with right triangles, constructing a square wave from an infinite series, and the continuous Fourier transform pair of the rect and sinc functions.


Signed serial-/parallel multiplication

Markus NentwigMarkus Nentwig February 16, 2014

Struggling with costly wide adders for signed multiplication on FPGAs? Markus Nentwig unpacks a neat bit-level trick that turns two's-complement signed-signed multiplication into a serial-parallel routine using only a one-bit wider adder. Learn how flipping sign bits and a small, controlled constant cancel lets you avoid full sign-extension, and get a parametrized Verilog RTL plus synthesis notes to try it yourself.


Finding the Best Optimum

Tim WescottTim Wescott November 4, 2013

Optimization is seductive but often misleading, especially when mathematical models don't match messy reality. Tim Wescott shares stories from circuits and communications to show how chasing the theoretical global optimum can waste time and money. He recommends framing 'best' in practical terms, validating models, and optimizing for cost and impact so products ship on time and actually work in the real world.


Is It True That j is Equal to the Square Root of -1 ?

Rick LyonsRick Lyons September 16, 20136 comments

A viral YouTube video claimed that saying j equals the square root of negative one is wrong. Rick Lyons shows the apparent paradox comes from misusing square-root identities with negative arguments, not from the usual definition of j. He argues it is safer to define j by j^2 = -1 and illustrates how careless root operations produce contradictions in two appendices.


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.


FIR sideways (interpolator polyphase decomposition)

Markus NentwigMarkus Nentwig September 12, 20129 comments

Markus Nentwig presents a compact way to implement a symmetric FIR interpolator by rethinking the usual tapped delay line. The 1:3 polyphase example uses separate delay lines per coefficient to skip multiplies on known zeros and exploit symmetry, cutting multiplications substantially; a Matlab/Octave demo and notes on ASIC-friendly implementation are included to help evaluate real-world cost tradeoffs.


Simulink-Simulation of SSB demodulation

Josef HoffmannJosef Hoffmann June 13, 20211 comment

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.


Phase and Amplitude Calculation for a Pure Complex Tone in a DFT

Cedron DawgCedron Dawg January 6, 2018

Cedron Dawg derives compact, exact formulas to recover the phase and amplitude of a single complex tone from a DFT bin when the tone frequency is known. The paper turns the complex bin value into closed-form expressions using a sine-fraction amplitude correction and a simple phase shift, and includes working code plus a numeric example for direct implementation.


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)}.


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.


The First-Order IIR Filter -- More than Meets the Eye

Neil RobertsonNeil Robertson November 16, 20257 comments

While we might be inclined to disdain the simple first-order infinite impulse response (IIR) filter, it is not so simple that we can’t learn something from it. Studying it can teach DSP math skills, and it is a very useful filter in its own right. In this article, we’ll examine the time response of the filter, compare the first-order IIR filter to the FIR moving average filter, use it to smooth a noisy signal, compute the functional form of the impulse response, and find the frequency response.


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.


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.


Correlation without pre-whitening is often misleading

Peter KootsookosPeter Kootsookos February 18, 20089 comments
White Lies

Correlation, as one of the first tools DSP users add to their tool box, can automate locating a known signal within a second (usually larger) signal. The expected result of a correlation is a nice sharp peak at the location of the known signal and few, if any, extraneous peaks.

A little thought will show this to be incorrect: correlating a signal with itself is only guaranteed to give a sharp peak if the signal's samples are uncorrelated --- for example if the signal is composed...


Constrained Integer Behavior

Christopher FeltonChristopher Felton May 26, 2014

Overflow and underflow are not always bugs, they can be useful in DSP when fixed-width integers wrap during processing. Christopher Felton demonstrates with moving-average (recursive-windowed-averager) and CIC filter examples how 2's complement wraparound in MyHDL's modbv cancels between an integrator and a comb via pole-zero cancellation. He also covers fixed-point resizing choices, saturation versus wrap, and how rounding error can accumulate.