Code Snippets Section Now LIVE
A new code-sharing section on DSPRelated is now live, giving engineers a central place to browse and share DSP code snippets. Take a few minutes to rate and comment on snippets you can judge, or apply to become a contributor and upload your own examples. You can also learn about the contributor reward program and send feedback to help the community grow, says Stephane Boucher.
Discrete Wavelet Transform Filter Bank Implementation (part 1)
David Valencia walks through a practical implementation of discrete wavelet transform filter banks, focusing on cascading branches and efficient equivalent filters. He contrasts DWT and DFT resolution behavior and shows how cascading the low-pass branch sharpens frequency division while the high-pass path remains unchanged. Code pointers and a preview of formfilters() demonstrate how to compute only the needed samples by combining filters with upsampling.
Personal presentation and greetings
David Valencia joins DSPRelated from Mexico City and brings hands-on DSP projects and code. He plans to share Spectrum Digital DSK6713 examples covering GPIO control, external memory, and expansion port access, with MATLAB, C and TI DSP C implementations. Expect wavelet transform filter bank code, and occasional FPGA and CPLD notes. Stay tuned for practical, hardware-focused DSP resources.
Least-squares magic bullets? The Moore-Penrose Pseudoinverse
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.
New Code Sharing Section & Reward Program for Contributors!
UPDATE (11/02/2010): The code section is now live.
UPDATE 2 (01/31/2011): The reward program has changed. A flat fee of $20 per code snippet submitted will now be paid.
_______________
I am very happy to finally announce the imminent launch of the new code sharing section. My vision for this new section is a rich library of high quality code snippets for the DSP community, from processor specific functions to Matlab or Scilab routines, from the simplest filter...
Fitting Filters to Measured Amplitude Response Data Using invfreqz in Matlab
This blog post has been moved to the code snippet section and can now be found HERE. Please update your bookmark. Thanks!
Radio Frequency Distortion Part II: A power spectrum model
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.
Understanding Radio Frequency Distortion
Markus Nentwig breaks down how analog RF nonlinearities appear in a complex baseband model so you can simulate and predistort real transmitters. The article shows that even-order terms vanish in-band under narrowband assumptions, while odd-order products collapse to |BB(t)|^(n-1) BB(t) and do not depend on the carrier frequency. It also explains bandwidth scaling and includes a MATLAB example plus measured PA coefficients.
Computing FFT Twiddle Factors
Rick Lyons gives two compact algorithms to compute individual twiddle factors for radix-2 DIF and DIT FFTs, handy when you need only a subset of outputs such as in pruned FFTs. He explains stage indexing, provides closed-form formulas including the bit-reversal step for DIT, and walks through N=8 examples so you can implement the twiddle-angle calculations directly.
Knowledge Mine for Embedded Systems
A little-known interactive portal makes learning embedded systems surprisingly practical and visual. The site is organized into four main areas: embedded systems design, design lifecycle, design methods, and design tools. Each section uses clickable system block diagrams so you can jump from a block, for example a MAC unit, to a focused page with detailed explanations. It’s a handy, ready reference for DSP and embedded engineers.
Correlation without pre-whitening is often misleading
White LiesCorrelation, 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...
Code Snippets Suggestions
Despite being only a couple of months old, the Code Snippet section ( DSPRelated.com/code.php ) already contains tens of snippets, thanks to the contributors who have taken the time to share their code.
But let's not stop here - there is room for several hundreds more snippets before the database can be said to cover a decent portion of the DSP field.
To keep the momentum going, I will do two things:
First, I am modifying the rewards program. Instead of...
Make Hardware Great Again
US weakness in 5G and the coming AI race stems from a deeper problem, hardware decline and lack of CPU innovation. Jeff Brower argues that the software-only narrative has hollowed out semiconductor leadership, leaving only a few chipmakers and blocking vital R&D. He calls for targeted government action, funding for neural-net chips, and an industrial Hardhattan Project to rebuild CPU and hardware capabilities.
DSP Papers, Articles, Theses, etc
Stephane Boucher invites the DSP community to help expand DSPRelated's Papers and Theses repository, which currently lists just over 100 documents. He asks contributors to find and submit recent DSP PDFs, ideally from the last ten years, and notes that each approved submission enters the submitter into a draw for Michael Parker's Digital Signal Processing 101; the draw is planned for early April.
[Book Review] Numpy 1.5 Beginner's Guide
Christopher Felton's review gives a pragmatic take on Ivan Idris's Numpy 1.5 Beginner's Guide, praising its hands-on, exercise-driven approach while flagging several shortcomings. He finds the book a useful starting point for newcomers to Python numerical computing thanks to practical examples and a chapter on testing, but warns the title, incomplete installation guidance, and some factual errors may mislead readers.
Deesspee #5
Peter Kootsookos's Deesspee #5 is a very short micro-post simply titled "Computers". It acts as a minimalist flag in the Deesspee series pointing readers toward the computing topic on DSPRelated; click through to view the original entry and any context or discussion. This compact post is useful if you track the author's brief topic markers or short-format updates.
New Code Sharing Section & Reward Program for Contributors!
UPDATE (11/02/2010): The code section is now live.
UPDATE 2 (01/31/2011): The reward program has changed. A flat fee of $20 per code snippet submitted will now be paid.
_______________
I am very happy to finally announce the imminent launch of the new code sharing section. My vision for this new section is a rich library of high quality code snippets for the DSP community, from processor specific functions to Matlab or Scilab routines, from the simplest filter...
GPS - some terminology!
Hi!
For my first post, I will share some information about GPS - Global Positioning System. I will delve one step deeper than a basic explanation of how a GPS system works and introduce some terminology.
GPS, like we all know is the system useful for identifying one's position, velocity, & time using signals from satellites (referred to as SV or space vehicle in literature). It uses the principle of trilateration (not triangulation which is misused frequently) for...
Approximating the area of a chirp by fitting a polynomial
Once in a while we need to estimate the area of a dataset in which we are interested. This area could give us, for example, force (mass vs acceleration) or electric power (electric current vs charge).
Looking For a Second Toolbox? This One's For Sale
A battered blue toolbox once used by Steve Wozniak during Apple’s early days is now up for auction, complete with a self-adhesive label bearing his name. Rick Lyons notes the 13 x 7 x 5 inch steel box shows heavy wear and includes a three-section lid tray, it currently resides in Italy and is listed with an estimated price around $25,000, shippable to buyers.
Digital Filter Instructions from IKEA?
This is a wordless example of a folded FIR filter. Swedish “Bygglek†= build and play.
Fitting Filters to Measured Amplitude Response Data Using invfreqz in Matlab
This blog post has been moved to the code snippet section and can now be found HERE. Please update your bookmark. Thanks!
Polar Coding Notes: A Simple Proof
Lyons Zhang presents a compact, elementary derivation of channel polarization for binary-input discrete memoryless channels. The note leverages Mrs. Gerber's Lemma to bound conditional entropies and follows the Alsan-Telatar averaging argument to show mediocre channels vanish. The proof sidesteps martingale convergence and recovers the standard result that the fraction of good channels approaches the channel capacity.
Analytic Signal
In communication theory and modulation theory we always deal with two phases: In-phase (I) and Quadrature-phase (Q). The question that I will discuss in this blog is that why we use two phases and not more.
The 2024 DSP Online Conference
The post announces the fifth annual DSP Online Conference, marking the event’s 5th anniversary and featuring renowned DSP practitioners including fred harris, Rick Lyons, Julius Orion Smith III, and Dan Boschen. It outlines access options—purchased passes provide on-demand viewing of all sessions through September 2025—and explains the daily release structure, with new sessions posted at 6 AM EDT and a chat/forum for each presentation. The article describes select live Q&A interactions hosted via Zoom (informal, 30-minute sessions) and lists three scheduled live presentations: Dan Boschen’s workshop on October 30 at 11 AM EDT and Fred Harris’s talks on October 31 at 10 AM and noon EDT. Recordings of live presentations are promised to appear on-demand shortly after they conclude.
Compressive Sensing - Recovery of Sparse Signals (Part 1)
The amount of data that is generated has been increasing at a substantial rate since the beginning of the digital revolution. The constraints on the sampling and reconstruction of digital signals are derived from the well-known Nyquist-Shannon sampling theorem...
Unit Testing for Embedded Algorithms
Unit testing is a best practice for embedded algorithm development, and Anthony Ricke shows how to apply it to DSP code so host and target behave identically. He demonstrates writing unit tests, stubbing Blackfin fixed-point functions in the workstation, and using test-driven development to safely port and optimize an average-calculation example. The SourceForge examples make the approach practical to adopt.
The Nature of Circles
Averaging angles the usual way can produce nonsense: the mean of 0 and 359 degrees is not 179.5 when working with circular data. Peter Kootsookos shows the correct approach using vectorial or phasor averaging, converting angles to unit complex numbers and taking the argument of their sum. The short post points to directional statistics and a related IEEE paper for deeper details.
Project update-1 : Digital Filter Blocks in MyHDL and their integration in pyFDA
By week 5 the project delivered parameterized MyHDL implementations of multiple digital filter topologies and started integration with PyFDA. The post walks through a behavioral direct-form I FIR, cascaded second-order-section implementations for FIR and IIR using structural modeling, and a parallel IIR design that concatenates per-section outputs for final summation. All designs infer order and coefficients from PyFDA, with examples in the filter-blocks repository.
Off Topic: The True Gravitational Geodesic
The third of my off topic Physics series resulting in the true gravitational geodesic equation and some surprising results about gravity.
























