DSPRelated.com
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →

Fixed-Point Analysis of a PDM Modulator with GNU Octave's FXP Package

AHMED SHAHEINAHMED SHAHEIN ● September 22, 2026●2 comments

A thorough analysis of a first order PDM loop in fixed-point. The FXP package is valuable asset to analysis fixed-point impact on discrete systems at early stage of the design prior implementation.


Fixed-Point Simulation in GNU Octave—Without MATLAB

AHMED SHAHEINAHMED SHAHEIN ● April 11, 2026●7 comments

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


Decimators Using Cascaded Multiplierless Half-band Filters

Neil RobertsonNeil Robertson ● November 19, 2023

In my last post, I provided coefficients for several multiplierless half-band FIR filters. In the comment section, Rick Lyons mentioned that such filters would be useful in a multi-stage decimator. For such an application, any subsequent multipliers save on resources, since they operate at a fraction of the maximum sample frequency. We’ll examine the frequency response and aliasing of a multiplierless decimate-by-8 cascade in this article, and we’ll also discuss an interpolator cascade using the same half-band filters.


Multiplierless Half-band Filters and Hilbert Transformers

Neil RobertsonNeil Robertson ● October 7, 2023●8 comments

This article provides coefficients of multiplierless Finite Impulse Response 7-tap, 11-tap, and 15-tap half-band filters and Hilbert Transformers. Since Hilbert transformer coefficients are simply related to half-band coefficients, multiplierless Hilbert transformers are easily derived from multiplierless half-bands.


Simple Concepts Explained: Fixed-Point

Leandro StefanazziLeandro Stefanazzi ● January 24, 2023●12 comments

Fixed-point is the bridge between real-world values and integer arithmetic, and this post makes that bridge tangible with a hands-on ADC-to-gain example. It walks through mapping voltages to Q-format integers, choosing gain resolution in bits, and how multiplication adds bit growth and produces quantization error. Read it to build intuition for practical fixed-point choices when implementing DSP on FPGA or ASIC.


An Efficient Full-Band Sliding DFT Spectrum Analyzer

Rick LyonsRick Lyons ● April 1, 2021●7 comments

Rick Lyons shows two compact sliding DFT networks that compute the 0th bin and all positive-frequency outputs for even and odd N, running sample-by-sample on real input streams. The designs reduce computational workload versus a prior observer-based sliding DFT by using fewer parallel paths, while remaining guaranteed stable and avoiding the traditional comb delay-line. A simple initialization and streaming procedure makes them practical for real-time spectrum analysis.


Polynomial calculations on an FIR filter engine, part 1

Kendall Castor-PerryKendall Castor-Perry ● October 1, 2019●2 comments

FIR filter blocks can be repurposed as fast polynomial evaluators, offering hardware acceleration for non-linear compensation, function approximation, and harmonic synthesis, but they require careful scaling and coefficient management. This article outlines when to use binomial or fitted polynomials, compares Horner's nested evaluation with the direct power-sum approach, and highlights precision and overflow pitfalls on fixed-point engines like the Cypress DFB.


Part 11. Using -ve Latency DSP to Cancel Unwanted Delays in Sampled-Data Filters/Controllers

Steve MaslenSteve Maslen ● June 18, 2019●17 comments

Negative-latency DSP can cancel ADC, FPGA/DSP, DAC and propagation delays to deliver near-zero unwanted latency filtering. Steve Maslen explains how to split a digital filter into a simple feed gain b0 and an advanced DF3 block that produces samples one sample early, then recombine them so sampled-data delays cancel. MATLAB c2d examples, a PID case study and FPGA test-bed results show the technique is practical and proven, with active IP noted.


Controlling a DSP Network's Gain: A Note For DSP Beginners

Rick LyonsRick Lyons ● March 29, 2019●22 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.


Feedback Controllers - Making Hardware with Firmware. Part 10. DSP/FPGAs Behaving Irrationally

Steve MaslenSteve Maslen ● November 22, 2018

A practical approach to emulating lossy transmission lines in real time, using pole-zero approximations to replace irrational s-domain behaviors and enable FPGA implementation. The author shows 8-pole/zero fits for Zo(s) and a 6-pole/zero plus delay for P(s), validated against LTSpice and MATLAB. Conversion to sampled-data Zo(z) and biquad implementations is detailed, along with issues in single-precision arithmetic and mitigations such as mixed sample rates and partial-fraction decomposition.


A Fixed-Point Introduction by Example

Christopher FeltonChristopher Felton ● April 25, 2011●22 comments

Christopher Felton walks through binary fixed-point representation with clear examples and a simple W=(wl,iwl,fwl) notation. He argues for designing to range and resolution rather than bit counts, then shows how multiplication and addition affect bit growth and alignment. These concrete examples make it easy to see why rounding, resizing, and radix-point bookkeeping are essential in DSP implementations.


Understanding and Preventing Overflow (I Had Too Much to Add Last Night)

Jason SachsJason Sachs ● December 4, 2013

Integer overflow is stealthier than you think, and in embedded systems it can break control loops or corrupt data. Jason Sachs walks through the usual culprits, including addition, subtraction, multiplication, shifting and Q15 fixed-point traps, plus C-specific pitfalls such as undefined signed overflow and INT_MIN edge cases. He then lays out practical defenses: prefer fixed-width types, widen and saturate intermediates, enable wraparound where appropriate, and reason about modular congruence for compound arithmetic.


Round Round Get Around: Why Fixed-Point Right-Shifts Are Just Fine

Jason SachsJason Sachs ● November 22, 2016●3 comments

Jason Sachs explains why, in most embedded systems, simple bitwise right-shifts are an acceptable way to do fixed-point division rather than paying the runtime cost to round. He shows the cheap trick of adding 2^(N-1) to implement round-to-nearest, explains unbiased "round-to-even" issues, and compares arithmetic error to much larger ADC and sensor errors. The takeaway: save cycles unless your algorithm or inputs require extra precision.


Feedback Controllers - Making Hardware with Firmware. Part 10. DSP/FPGAs Behaving Irrationally

Steve MaslenSteve Maslen ● November 22, 2018

A practical approach to emulating lossy transmission lines in real time, using pole-zero approximations to replace irrational s-domain behaviors and enable FPGA implementation. The author shows 8-pole/zero fits for Zo(s) and a 6-pole/zero plus delay for P(s), validated against LTSpice and MATLAB. Conversion to sampled-data Zo(z) and biquad implementations is detailed, along with issues in single-precision arithmetic and mitigations such as mixed sample rates and partial-fraction decomposition.


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.


Shared-multiplier polyphase FIR filter

Markus NentwigMarkus Nentwig ● July 31, 2013●7 comments

One multiplier and a dual-port RAM can implement an arbitrary m/n polyphase FIR resampler on an FPGA, Markus Nentwig demonstrates. The post focuses on practical implementation details, including a parametrized Verilog design, pipelined MAC control, and a Matlab testbench for verification. It shows how bank indexing and pipeline delay compensation let you multiplex many coefficient banks efficiently for resource-constrained FPGA designs.


Dealing With Fixed Point Fractions

Mike RosingMike Rosing ● January 5, 2016●3 comments

Fixed-point fractional math is easy to botch, and this post lays out pragmatic ways to avoid those mistakes. It clarifies the difference between integer and fractional overflow, shows how Q notation helps track binary-point scaling, and explains why multiplies add sign bits that may require shifting. Read for concrete FPGA strategies: keeping bit growth, selective shifts, or aggressive normalization, plus testing tips.


Part 11. Using -ve Latency DSP to Cancel Unwanted Delays in Sampled-Data Filters/Controllers

Steve MaslenSteve Maslen ● June 18, 2019●17 comments

Negative-latency DSP can cancel ADC, FPGA/DSP, DAC and propagation delays to deliver near-zero unwanted latency filtering. Steve Maslen explains how to split a digital filter into a simple feed gain b0 and an advanced DF3 block that produces samples one sample early, then recombine them so sampled-data delays cancel. MATLAB c2d examples, a PID case study and FPGA test-bed results show the technique is practical and proven, with active IP noted.


Spline interpolation

Markus NentwigMarkus Nentwig ● May 11, 2014●7 comments

Markus Nentwig provides a cookbook for segmented cubic spline interpolation that turns scattered or noisy data into efficient fixed-point functions. The article shows how to build third-order polynomial segments with explicit value and slope control via basis functions, solve scaling factors by least-squares in Octave/Matlab, and export coefficients for Verilog RTL evaluation using the Horner scheme and practical fixed-point tips.


Data Types for Control & DSP

Tim WescottTim Wescott ● April 26, 2016●6 comments

Control engineers often default to double precision, but Tim Wescott shows that choice can waste CPU cycles on embedded targets. He separates numeric representation into floating point, integer, and fixed-point, then walks through the tradeoffs, including quantization, overflow, and performance. A concrete PID example highlights why integrator precision and ADC scaling should drive your choice of data type rather than habit.