## PID Without a PhD

I both consult and teach in the area of digital control. Through both of these efforts, I have found that while there certainly are control problems that require all the expertise I can bring to bear, there are a great number of control problems that can be solved with the most basic knowledge of simple controllers, without resort to any formal control theory at all.

This article will tell you how to implement a simple controller in software and how to tune it without getting into heavy...

## Digital Envelope Detection: The Good, the Bad, and the Ugly

Recently I've been thinking about the process of envelope detection. Tutorial information on this topic is readily available but that information is spread out over a number of DSP textbooks and many Internet web sites. The purpose of this blog is to summarize various digital envelope detection methods in one place.

Here I focus on envelope detection as it is applied to an amplitude-fluctuating sinusoidal signal where the positive-amplitude fluctuations (the sinusoid's envelope)...

## Harmonic Notch Filter

My basement is covered with power lines and florescent lights which makes collecting ECG and EEG data  rather difficult due to the 60 cycle hum.  I found the following notch filter to work very well at eliminating the background signal without effecting the highly amplified signals I was looking for.

The notch filter is based on the a transfer function with the form $$H(z)=\frac{1}{2}(1+A(z))$$ where A(z) is an all pass filter. The original paper [1] describes a method to...

## A Useful Source of Signal Processing Information

I just discovered a useful web-based source of signal processing information that was new to me. I thought I'd share what I learned with the subscribers here on DSPRelated.com.

The Home page of the web site that I found doesn't look at all like it would be useful to us DSP fanatics. But if you enter some signal processing topic of interest, say, "FM demodulation" (without the quotation marks) into the 'Search' box at the top of the web page

and click the red 'SEARCH...

## 3 Good News

March 9, 20161 comment
Good News #1

Last week, I announced a new and ambitious reward program that will be funded by the new Vendors Directory.

This week, I am happy to announce that we have our firsts two sponsors!  Quantum Leaps & Abelon Systems have agreed to pay the sponsorship fee to be listed in the new Vendors Directory.  Because of their support, there is now some money in the reward pool ($1,000) and enough to pay for the firsts 500 'beers' awarded. Please... ## Padé Delay is Okay Today March 1, 20164 comments This article is going to be somewhat different in that I’m not really writing it for the typical embedded systems engineer. Rather it’s kind of a specialized topic, so don’t be surprised if you get bored and move on to something else. That’s fine by me. Anyway, let’s just jump ahead to the punchline. Here’s a numerical simulation of a step response to a $p=126, q=130$ Padé approximation of a time delay: Impressed? Maybe you should be. This... ## Go Big or Go Home - Generating$500,000 for Contributors

In a Nutshell
• A new Vendors Directory has been created
• Vendors will be invited to pay a sponsorship fee to be listed in the directory
• 100% of the basic sponsorship fee will be distributed to the *Related Sites community through a novel reward system
• The goal is for the directory to eventually generate - drum roll please -  \$500,000 on a yearly basis for contributing members on the *Related Sites
• Members will choose how the reward money gets distributed between...

## The New Forum is LIVE!

February 18, 20161 comment

After months of hard word, I am very excited to introduce to you the new forum interface.

Here are the key features:

1- Easily add images to a post by drag & dropping the images in the editor

2- Easily attach files to a post by drag & dropping the files in the editor

3- Add latex equations to a post and they will be rendered with Mathjax (tutorial)

4- Add a code snippet and surround the code with

## Autocorrelation and the case of the missing fundamental

[UPDATED January 25, 2016:  One of the examples was broken, also the IPython notebook links now point to nbviewer, where you can hear the examples.]

For sounds with simple harmonic structure, the pitch we perceive is usually the fundamental frequency, even if it is not dominant.  For example, here's the spectrum of a half-second recording of a saxophone.

The first three peaks are at 464, 928, and 1392 Hz.  The pitch we perceive is the fundamental, 464 Hz, which is close to...

## Generating pink noise

January 20, 20161 comment

In one of his most famous columns for Scientific American, Martin Gardner wrote about pink noise and its relation to fractal music.  The article was based on a 1978 paper by Voss and Clarke, which presents, among other things, a simple algorithm for generating pink noise, also known as 1/f noise.

The fundamental idea of the algorithm is to add up several sequences of uniform random numbers that get updated at different rates. The first source gets updated at...

## Spectral Flipping Around Signal Center Frequency

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...

## Waveforms that are their own Fourier Transform

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;...

## Some Observations on Comparing Efficiency in Communication Systems

March 17, 2011
Introduction

Engineering is usually about managing efficiencies of one sort or another. One of my favorite working definitions of an engineer says, "An engineer is somebody who can do for a nickel what any damn fool can do for a dollar." In that case, the implication is that the cost is one of the characteristics being optimized. But cost isn't always the main efficiency metric, or at least the only one. Consider how a common transportation appliance, the automobile, is optimized...

## The Swiss Army Knife of Digital Networks

This blog describes a general discrete-signal network that appears, in various forms, inside so many DSP applications.

Figure 1 shows how the network's structure has the distinct look of a digital filter—a comb filter followed by a 2nd-order recursive network. However, I do not call this useful network a filter because its capabilities extend far beyond simple filtering. Through a series of examples I've illustrated the fundamental strength of this Swiss Army Knife of digital networks...

## Computing Large DFTs Using Small FFTs

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...

## Generating Complex Baseband and Analytic Bandpass Signals

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...

## DSP Related Math: Nice Animated GIFs

I was browsing the ECE subreddit lately and found that some of the most popular posts over the last few months have been animated GIFs helping understand some mathematical concepts.  I thought there would be some value in aggregating the DSP related gifs on one page.

The relationship between sin, cos, and right triangles: Constructing a square wave with infinite series (see this...

## Design of an anti-aliasing filter for a DAC

August 18, 2012
Overview
• weighted numerical optimization of Laplace-domain transfer function
• linear-phase design, optimizes vector error (magnitude and phase)
• design process calculates and corrects group delay internally
• includes sinc() response of the sample-and-hold stage in the ADC
• optionally includes multiplierless FIR filter
Problem Figure 1: Typical FIR-DAC-analog lowpass line-up

Digital-to-analog conversion connects digital...