DSPRelated.com
Tutorials

Exact Near Instantaneous Frequency Formulas Best at Peaks (Part 1)

Cedron DawgCedron Dawg May 12, 2017

Cedron Dawg presents a new family of exact time-domain formulas to estimate the instantaneous frequency of a single pure tone. The methods generalize a known one-sample formula into k-degree neighbor-pair sums with spacing d, giving exact results in the noiseless case and tunable robustness in noise. The paper explains why real-tone estimates must be taken at peaks and shows the formulas also work for complex tones.


A Recipe for a Common Logarithm Table

Cedron DawgCedron Dawg April 29, 2017

Cedron Dawg shows how to construct a base-10 logarithm table from scratch using only pencil-and-paper math. The recipe combines simple series for e and ln(1+x) with clever factoring and neighbor-based recurrences so minimal square-root work is required. Along the way the post explains a practical algorithm, high-accuracy interpolation and inverse-log reconstruction so you can reproduce published log tables by hand.


Sinusoidal Frequency Estimation Based on Time-Domain Samples

Rick LyonsRick Lyons April 20, 201719 comments

Rick Lyons presents three time-domain algorithms for estimating the frequency of real and complex sinusoids from samples. He shows that the Real 3-Sample and Real 4-Sample estimators, while mathematically exact, fail in the presence of noise and can produce biased or invalid outputs. The Complex 2-Sample (Lank-Reed-Pollon) estimator is more robust but can be biased at low SNR and near 0 or Fs/2, so narrowband filtering is recommended.


Three Bin Exact Frequency Formulas for a Pure Complex Tone in a DFT

Cedron DawgCedron Dawg April 13, 20171 comment

Cedron Dawg derives closed-form three-bin frequency estimators for a pure complex tone in a DFT using a linear algebra view that treats three adjacent bins as a vector. He shows any vector K orthogonal to [1 1 1] yields a = (K·Z)/(K·D·Z) and derives practical K choices including a Von Hann (Pascal) kernel and a data-driven projection. The post compares estimators under noise and gives simple selection rules.


A Two Bin Exact Frequency Formula for a Pure Complex Tone in a DFT

Cedron DawgCedron Dawg March 20, 20179 comments

Cedron Dawg derives an exact two-bin frequency formula for a pure complex tone in the DFT, eliminating amplitude and phase to isolate frequency via a complex quotient and the complex logarithm. He presents an adjacent-bin simplification that replaces a complex multiply with a bin offset plus an atan2 angle, and discusses integer-frequency handling and aliasing. C source and numerical examples show the formula working in practice.


DFT Bin Value Formulas for Pure Complex Tones

Cedron DawgCedron Dawg March 17, 2017

Cedron Dawg derives closed-form DFT bin formulas for single complex exponentials, eliminating the need for brute-force summation and showing how phase acts as a uniform rotation of all bins. He also gives a Dirichlet-kernel form that yields the magnitude as (M/N)|sin(δN/2)/sin(δ/2)|, explains the large-N sinc limit, and includes C code to verify the results.


Canonic Signed Digit (CSD) Representation of Integers

Neil RobertsonNeil Robertson February 18, 2017

Canonic Signed Digit (CSD) encoding slashes the number of nonzero bits in integer coefficients, enabling multiplierless FIR filters implemented with shifts and adds. This post uses MATLAB code to demonstrate CSD rules, show how negative values work, and plot the distribution of signed digits as bit width changes. It finishes with practical techniques to minimize signed digits per coefficient for area and power efficient filter designs.


Minimum Shift Keying (MSK) - A Tutorial

Qasim ChaudhariQasim Chaudhari January 25, 201717 comments

How does MSK achieve both excellent spectral efficiency and a constant-envelope signal suitable for nonlinear amplifiers? This tutorial builds MSK step‑by‑step from binary FSK, shows the minimum frequency spacing and continuous‑phase construction, and then recasts MSK as an OQPSK (pseudo‑symbol) representation. It finishes by generalizing MSK into CP‑FSK and the wider CPM family so you can connect practical pulse shapes and modulation indices to performance.


New Video: Parametric Oscillations

Tim WescottTim Wescott January 4, 2017

Tim Wescott just posted a short new video titled "Parametric Oscillations." It’s a little off-topic for the channel, but he used the project as an excuse to break a months-long posting drought. If you follow his work, this quick update shows how small builds can rekindle momentum and prompt informal explorations of oscillation behavior.


Wavelets II - Vanishing Moments and Spectral Factorization

Vincent HerrmannVincent Herrmann October 11, 2016

This post walks through how vanishing moments turn into concrete algebraic constraints on wavelet filter coefficients, and why that leads to Daubechies filters. It explains how a wavelet with A vanishing moments is orthogonal to all polynomials up to degree A minus one, and it shows how those continuous conditions become discrete sums like sum_k k^n h1(k)=0. Expect clear links between approximation power and filter length.


Model Signal Impairments at Complex Baseband

Neil RobertsonNeil Robertson December 11, 20197 comments

Neil Robertson presents compact complex-baseband channel models for common signal impairments, implemented as short Matlab functions of up to seven lines. Using QAM examples and constellation plots, he demonstrates how interfering carriers, two-path multipath, sinusoidal phase noise, and Gaussian noise distort constellations and affect MER. The examples are lightweight and practical, making it easy to test receiver diagnostics and prototype adaptive-equalizer scenarios.


Third-Order Distortion of a Digitally-Modulated Signal

Neil RobertsonNeil Robertson June 9, 2020

Amplifier third-order distortion is a common limiter in RF and communications chains, and Neil Robertson walks through why it matters using hands-on MATLAB simulations. He shows how a cubic nonlinearity creates IMD3 tones, causes spectral regrowth and degrades QAM constellations, and gives practical notes on estimating k3, computing ACPR from PSDs, and sampling considerations.


Multilayer Perceptrons and Event Classification with data from CODEC using Scilab and Weka

David NorwoodDavid Norwood November 25, 2015

For my first blog, I thought I would introduce the reader to Scilab [1] and Weka [2]. In order to illustrate how they work, I will put together a script in Scilab that will sample using the microphone and CODEC on your PC and save the waveform as a CSV file.


Interpolator Design: Get the Stopbands Right

Neil RobertsonNeil Robertson July 6, 20236 comments

In this article, I present a simple approach for designing interpolators that takes the guesswork out of determining the stopbands.


Setting Carrier to Noise Ratio in Simulations

Neil RobertsonNeil Robertson April 11, 2021

Setting the right Gaussian noise level is easy once you know the math. This post derives simple, practical equations to compute noise density and the rms noise amplitude needed to achieve a target carrier to noise ratio at a receiver output. It shows how to get the noise-equivalent bandwidth from a discrete-time filter, how to compute N0 and sigma, and includes a MATLAB set_cnr function to generate the noise vector.


There and Back Again: Time of Flight Ranging between Two Wireless Nodes

Qasim ChaudhariQasim Chaudhari October 23, 20175 comments

Conventional timestamping seems too coarse for centimeter-level RF ranging, yet many products claim and deliver that precision. This post unpacks the fundamentals behind high-resolution wireless ranging, contrasting common RF approaches such as RSSI, ToA, PoA, TDoA, and AoA. It also explains how device timestamps and counter registers work, giving engineers a practical starting point for implementing or evaluating time-of-flight ranging systems.


Learn About Transmission Lines Using a Discrete-Time Model

Neil RobertsonNeil Robertson January 12, 20222 comments

A simple discrete-time approach makes lossless transmission-line behavior easy to simulate and visualize. The post introduces MATLAB functions tline and wave_movie to model uniform lossless lines with resistive terminations, compute time and frequency responses, and animate travelling waves. A microstrip pulse example shows how reflections produce ringing and how source matching nearly eliminates it, making this a practical learning tool.


Coefficients of Cascaded Discrete-Time Systems

Neil RobertsonNeil Robertson March 4, 2018

Multiplying discrete-time transfer functions is just polynomial multiplication, and polynomial multiplication is convolution. Neil Robertson shows that the numerator and denominator coefficients of cascaded systems come from convolving the individual coefficient vectors, then demonstrates the idea with MATLAB code and a 2nd-order IIR cascade that yields a 4th-order response. The approach makes computing time and frequency responses straightforward.


A Two Bin Solution

Cedron DawgCedron Dawg July 12, 2019

Cedron Dawg shows how a real sinusoid's frequency, amplitude and phase can be recovered from only two adjacent DFT bins. The article derives exact two-bin formulas, gives a clear Gambas reference implementation, and demonstrates that accurate parameters can be obtained with very few samples when the tone lies between the bins. It also explains when the method breaks down and how the real-valued unfurling improves robustness.


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.