DSPRelated.com
Fixed-Point Simulation in GNU Octave—Without MATLAB

Fixed-Point Simulation in GNU Octave—Without MATLAB

AHMED SHAHEIN

Introducing pkg-fxp: a free, open-source fi-compatible fixed-point class


A Lesson in Statistics Using Random Sequences

A Lesson in Statistics Using Random Sequences

Neil Robertson

Statistics may come naturally to some people, but it is a difficult subject for many of us. Using simulations helps to remove some of the mystery of statistics. Luckily, it is trivial to produce a pseudo-random Gaussian or uniform sequence: a single command in Matlab (or Python) does it. In this article, I try to explain a few concepts using Gaussian and uniform random sequences generated in Matlab. First, we’ll generate a Gaussian sequence, calculate its variance, and plot a histogram and probability density function (PDF). Next, we’ll simulate the roll of a single die to illustrate a uniform distribution. Then we’ll simulate rolling two dice and finally, as an illustration of the Central Limit Theorem, we’ll sum the total when rolling several dice to obtain an approximately Gaussian distribution.


Simple but Effective Spectrum Averaging

Simple but Effective Spectrum Averaging

Neil Robertson
TimelessIntermediate

In this article, I provide a Matlab function that performs exponential PSD averaging, using first-order infinite impulse response (IIR) filtering to continuously average the PSD bins. This approach works well for computing the spectrum of a long-duration signal over time, because the spectrum is constantly updated as new PSD’s are computed. Conveniently, the time constant of the PSD averaging is determined by the single adjustable parameter α. I also provide a Matlab function for conventional (unweighted) PSD averaging. Neither function requires any canned code other than the Fast Fourier Transform (FFT), although I do use the Matlab hann window function for convenience.


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

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

Neil Robertson
TimelessIntermediate

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.


RF in Slow Motion: Sonifying a Wi-Fi7 Packet

RF in Slow Motion: Sonifying a Wi-Fi7 Packet

Dan Boschen
Still RelevantIntermediate

What would a 160 MHz OFDM waveform up in the 5 GHz U-NII band sound like if scaled to audio frequencies to keep the same wavelength (acoustic vs RF)?


Off Topic: The True Gravitational Geodesic

Off Topic: The True Gravitational Geodesic

Cedron Dawg
Still Relevant

The third of my off topic Physics series resulting in the true gravitational geodesic equation and some surprising results about gravity.


The Discrete Fourier Transform of Symmetric Sequences

The Discrete Fourier Transform of Symmetric Sequences

Neil Robertson
TimelessIntermediate

Symmetric sequences arise often in digital signal processing. Examples include symmetric pulses, window functions, and the coefficients of most finite-impulse response (FIR) filters, not to mention the cosine function. Examining symmetric sequences can give us some insights into the Discrete Fourier Transform (DFT). An even-symmetric sequence is centered at n = 0 and xeven(n) = xeven(-n). The DFT of xeven(n) is real. Most often, signals we encounter start at n = 0, so they are not strictly speaking even-symmetric. We’ll look at the relationship between the DFT’s of such sequences and those of true even-symmetric sequences.


How the Cooley-Tukey FFT Algorithm Works | Part 4 - Twiddle Factors

How the Cooley-Tukey FFT Algorithm Works | Part 4 - Twiddle Factors

Mark Newman
TimelessIntermediate

The beauty of the FFT algorithm is that it does the same thing over and over again. It treats every stage of the calculation in exactly the same way. However, this. “one-size-fits-all” approach, although elegant and simple, causes a problem. It misaligns samples and introduces phase distortions during each stage of the algorithm. To overcome this, we need Twiddle Factors, little phase correction factors that push things back into their correct positions before continuing onto the next stage.


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

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

Mark Newman
TimelessIntermediate

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.