New Video: Parametric Oscillations

Tim Wescott January 4, 2017

I just posted this last night.  It's kinda off-topic from the mission of the channel, but I realized that it had been months since I'd posted a video, and having an excuse to build on helped keep me on track.

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

Jason Sachs November 22, 20163 comments

Today’s topic is rounding in embedded systems, or more specifically, why you don’t need to worry about it in many cases.

One of the issues faced in computer arithmetic is that exact arithmetic requires an ever-increasing bit length to avoid overflow. Adding or subtracting two 16-bit integers produces a 17-bit result; multiplying two 16-bit integers produces a 32-bit result. In fixed-point arithmetic we typically multiply and shift right; for example, if we wanted to multiply some...

Some Thoughts on Sampling

Qasim Chaudhari November 15, 20162 comments

Some time ago, I came across an interesting problem. In the explanation of sampling process, a representation of impulse sampling shown in Figure 1 below is illustrated in almost every textbook on DSP and communications. The question is: how is it possible that during sampling, the frequency axis gets scaled by $1/T_s$ -- a very large number? For an ADC operating at 10 MHz for example, the amplitude of the desired spectrum and spectral replicas is $10^7$! I thought that there must be...

Matlab Code to Synthesize Multiplierless FIR Filters

Neil Robertson October 31, 20162 comments

This article presents Matlab code to synthesize multiplierless Finite Impulse Response (FIR) lowpass filters.

A filter coefficient can be represented as a sum of powers of 2.  For example, if a coefficient = decimal 5 multiplies input x, the output is $y= 2^2*x + 2^0*x$.  The factor of $2^2$ is then implemented with a shift of 2 bits.  This method is not efficient for coefficients having a lot of 1’s, e.g. decimal 31 = 11111.  To reduce the number of non-zero...

Wavelets II - Vanishing Moments and Spectral Factorization

Vincent Herrmann October 11, 2016

In the previous blog post I described the workings of the Fast Wavelet Transform (FWT) and how wavelets and filters are related. As promised, in this article we will see how to construct useful filters. Concretely, we will find a way to calculate the Daubechies filters, named after Ingrid Daubechies, who invented them and also laid much of the mathematical foundations for wavelet analysis.

Besides the content of the last post, you should be familiar with basic complex algebra, the...

Fibonacci trick

Tim Wescott October 10, 20164 comments

I'm working on a video, tying the Fibonacci sequence into the general subject of difference equations.

Here's a fun trick: take any two consecutive numbers in the Fibonacci sequence, say 34 and 55.  Now negate one and use them as the seed for the Fibonacci sequence, larger magnitude first, i.e.

$-55, 34, \cdots$

Carry it out, and you'll eventually get the Fibonacci sequence, or it's negative:

$-55, 34, -21, 13, -8, 5, -3, 2, -1, 1, 0, 1, 1 \cdots$

This is NOT a general property of difference...

The Power Spectrum

Neil Robertson October 8, 2016

Often, when calculating the spectrum of a sampled signal, we are interested in relative powers, and we don’t care about the absolute accuracy of the y axis.  However, when the sampled signal represents an analog signal, we sometimes need an accurate picture of the analog signal’s power in the frequency domain.  This post shows how to calculate an accurate power spectrum.

Parseval’s theorem [1,2] is a property of the Discrete Fourier Transform (DFT) that...

New Comments System (please help me test it)

Stephane Boucher October 4, 201618 comments

I thought it would take me a day or two to implement, it took almost two weeks...

But here it is, the new comments systems for blogs, heavily inspired by the forum system I developed earlier this year.  

Which means that:

  • You can easily add images, either by drag and drop or through the 'Insert Image' button
  • You can add MathML, TeX and ASCIImath equations and they will be rendered with Mathjax
  • You can add code snippets and they will be highlighted with highlights.js
  • You can edit...

Wavelets I - From Filter Banks to the Dilation Equation

Vincent Herrmann September 28, 20168 comments

This is the first in what I hope will be a series of posts about wavelets, particularly about the Fast Wavelet Transform (FWT). The FWT is extremely useful in practice and also very interesting from a theoretical point of view. Of course there are already plenty of resources, but I found them tending to be either simple implementation guides that do not touch on the many interesting and sometimes crucial connections. Or they are highly mathematical and definition-heavy, for a...

The Real Star of Star Trek

Rick Lyons September 25, 20168 comments

Unless you've been living under a rock recently, you're probably aware that this month is the 50-year anniversary of the original Star Trek show on American television. It's an anniversary worth noting, as did Time and Newsweek magazines with their special editions.


Over the years I've come to realize that a major star of the original Star Trek series wasn't an actor. It was a thing. The starship USS Enterprise! Before I explain my thinking, here's a little...

Spectral Flipping Around Signal Center Frequency

Rick Lyons November 8, 20074 comments

Most of us are familiar with the process of flipping the spectrum (spectral inversion) of a real signal by multiplying that signal's time samples by (-1)n. In that process the center of spectral rotation is fs/4, where fs is the signal's sample rate in Hz. In this blog we discuss a different kind of spectral flipping process.

Consider the situation where we need to flip the X(f) spectrum in Figure 1(a) to obtain the desired Y(f) spectrum shown in Figure 1(b). Notice that the center of...

Minimum Shift Keying (MSK) - A Tutorial

Qasim Chaudhari January 25, 20174 comments

Minimum Shift Keying (MSK) is one of the most spectrally efficient modulation schemes available. Due to its constant envelope, it is resilient to non-linear distortion and was therefore chosen as the modulation technique for the GSM cell phone standard.

MSK is a special case of Continuous-Phase Frequency Shift Keying (CPFSK) which is a special case of a general class of modulation schemes known as Continuous-Phase Modulation (CPM). It is worth noting that CPM (and hence CPFSK) is a...

Instantaneous Frequency Measurement

Parth Vakil February 5, 200820 comments

I would like to talk about the oft used method of measuring the carrier frequency in the world of Signal Collection and Characterization world. It is an elegant technique because of its simplicity. But, of course, with simplicity, there come drawbacks (sometimes...especially with this one!).

In the world of Radar detection and characterization, one of the key characteristics of interest is the carrier frequency of the signal. If the radar is pulsed, you will have a very wide bandwidth, a...

Optimizing the Half-band Filters in Multistage Decimation and Interpolation

Rick Lyons January 4, 201615 comments

This blog discusses a not so well-known rule regarding the filtering in multistage decimation and interpolation by an integer power of two. I'm referring to sample rate change systems using half-band lowpass filters (LPFs) as shown in Figure 1. Here's the story.

Figure 1: Multistage decimation and interpolation using half-band filters.

Multistage Decimation – A Very Brief Review

Figure 2(a) depicts the process of decimation by an integer factor D. That...

Sinusoidal Frequency Estimation Based on Time-Domain Samples

Rick Lyons April 20, 201715 comments

The topic of estimating a noise-free real or complex sinusoid's frequency, based on fast Fourier transform (FFT) samples, has been presented in recent blogs here on For completeness, it's worth knowing that simple frequency estimation algorithms exist that do not require FFTs to be performed . Below I present three frequency estimation algorithms that use time-domain samples, and illustrate a very important principle regarding so called "exact"...

Python scipy.signal IIR Filter Design Cont.

Christopher Felton June 19, 20127 comments

In the previous post the Python scipy.signal iirdesign function was disected.  We reviewed the basics of filter specification and reviewed how to use the iirdesign function to design IIR filters.  The previous post I only demonstrated low pass filter designs.  The following are examples how to use the iirdesign function for highpass, bandpass, and stopband filters designs.

Highpass Filter

The following is a highpass filter design for the different filter...

Computing Large DFTs Using Small FFTs

Rick Lyons June 24, 200815 comments

It is possible to compute N-point discrete Fourier transforms (DFTs) using radix-2 fast Fourier transforms (FFTs) whose sizes are less than N. For example, let's say the largest size FFT software routine you have available is a 1024-point FFT. With the following trick you can combine the results of multiple 1024-point FFTs to compute DFTs whose sizes are greater than 1024.

The simplest form of this idea is computing an N-point DFT using two N/2-point FFT operations. Here's how the trick...

Waveforms that are their own Fourier Transform

Steve Smith January 16, 200812 comments

Mea Culpa 

There are many scary things about writing a technical book. Can I make the concepts clear? It is worth the effort? Will it sell? But all of these pale compared to the biggest fear: What if I'm just plain wrong? Not being able to help someone is one thing, but leading them astray is far worse.

My book on DSP has now been published for almost ten years. I've found lots of typos, a few misstatements, and many places where the explanations confuse even me. But I have been lucky;...

Generating Complex Baseband and Analytic Bandpass Signals

Rick Lyons November 2, 20112 comments

There are so many different time- and frequency-domain methods for generating complex baseband and analytic bandpass signals that I had trouble keeping those techniques straight in my mind. Thus, for my own benefit, I created a kind of reference table showing those methods. I present that table for your viewing pleasure in this blog.

For clarity, I define a complex baseband signal as follows: derived from an input analog xbp(t)bandpass signal whose spectrum is shown in Figure 1(a), or...

A poor man's Simulink

Markus Nentwig January 24, 20153 comments

Glue between Octave and NGSPICE for discrete- and continuous time cosimulation (download) Keywords: Octave, SPICE, Simulink


Many DSP problems have close ties with the analog world. For example, a switched-mode audio power amplifier uses a digital control loop to open and close power transistors driving an analog filter. There are commercial tools for digital-analog cosimulation: Simulink comes to mind, and mainstream EDA vendors support VHDL-AMS or Verilog-A in their...