## The DFT Output and Its Dimensions

The Discrete Fourier Transform, or DFT, converts a signal from discrete time to discrete frequency. It is commonly implemented as and used as the Fast Fourier Transform (FFT). This article will attempt to clarify the format of the DFT output and how it is produced.

Living in the real world, we deal with real signals. The data we typically sample does not have an imaginary component. For example, the voltage sampled by a receiver is a real value at a particular point in time. Let’s...

## Amplitude modulation and the sampling theorem

I am working on the 11th and probably final chapter of Think DSP, which follows material my colleague Siddhartan Govindasamy developed for a class at Olin College. He introduces amplitude modulation as a clever way to sneak up on the Nyquist–Shannon sampling theorem.

Most of the code for the chapter is done: you can check it out in this IPython notebook. I haven't written the text yet, but I'll outline it here, and paste in the key figures.

Convolution...

## Exponential Smoothing with a Wrinkle

This is an article to hopefully give a better understanding to the Discrete Fourier Transform (DFT) by providing a set of preprocessing filters to improve the resolution of the DFT. Because of the exponential nature of sinusoidal functions, they have special mathematical properties when exponential smoothing is applied to them. These properties are derived and explained in this blog article.

Basic Exponential Smoothing

Exponential smoothing is also known as...

## Differentiating and integrating discrete signals

I am back at work on Think DSP, adding a new chapter on differentiation and integration. In the previous chapter (which you can read here) I present Gaussian smoothing, show how smoothing in the time domain corresponds to a low-pass filter in the frequency domain, and present the Convolution Theorem.

In the current chapter, I start with the first difference operation (diff in Numpy) and show that it corresponds to a high-pass filter in the frequency domain. I use historical stock...

## Discrete-Time PLLs, Part 1: Basics

Design Files: Part1.slx

Hi everyone,

In this series of tutorials on discrete-time PLLs we will be focusing on Phase-Locked Loops that can be implemented in discrete-time signal proessors such as FPGAs, DSPs and of course, MATLAB.

In the first part of the series, we will be reviewing the basics of continuous-time baseband PLLs and we will see some useful mathematics that will give us insight into the inners working of PLLs. In the second part, we will focus on...

## 60 numbers

This blog title is inspired from the Peabody award-winning Radiolab episode 60 words. Radiolab is well known for its insightful stories on Science with an amazing sound design. Today's blog is about decoding Radiolab's theme music (actually, just a small "Mmm Newewe" part of it hereafter called the Radiolab sound). I have been taking this online course on Audio Signal Processing where we are taught how to analyze sounds...

## 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. To review, the theorem states that a band-limited signal, with the highest frequency of $f_{max}$, can be completely reconstructed from its samples if the sampling rate, $f_{s}$, is at least twice the signal bandwidth. If the...

## Summary of ROC Rules

This is a very short guide on how to find all possible outcomes of a system where Region of Convergence (ROC) and the original signal is not known.

Summary of ROC RulesFor a causal system the ROC extends outwards.For a non-causal system the ROC extends inwards.For a two-sided system, the ROC can extend inwards or outwards from every pole. The ROC cannot contain any polesThe system is stable if the unity circle is included in the ROCOne Pole System...## 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.

Any real band-limited signal along with its Hilbert transformed pair form an analytic signal. We normally use the analytic signal for modulation. A modulated signal is actually a carrier or the sine signal that one attribute of it is changing with time which is our signal....

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

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. Then, we can take the CSV file and open it in Weka. Once in Weka, we have a lot of paths to consider in order to classify it. I use the term classify loosely since there are many things you can do with data sets...

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

- Octaveforge / Matlab design script. Download: here
- 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

Digital-to-analog conversion connects digital...

## Understanding and Implementing the Sliding DFT

IntroductionIn many applications the detection or processing of signals in the frequency domain offers an advantage over performing the same task in the time-domain. Sometimes the advantage is just a simpler or more conceptually straightforward algorithm, and often the largest barrier to working in the frequency domain is the complexity or latency involved in the Fast Fourier Transform computation. If the frequency-domain data must be updated frequently in a...

## The Number 9, Not So Magic After All

This blog is not about signal processing. Rather, it discusses an interesting topic in number theory, the magic of the number 9. As such, this blog is for people who are charmed by the behavior and properties of numbers.

For decades I've thought the number 9 had tricky, almost magical, qualities. Many people feel the same way. I have a book on number theory, whose chapter 8 is titled "Digits — and the Magic of 9", that discusses all sorts of interesting mathematical characteristics of the...

## Specifying the Maximum Amplifier Noise When Driving an ADC

I recently learned an interesting rule of thumb regarding the use of an amplifier to drive the input of an analog to digital converter (ADC). The rule of thumb describes how to specify the maximum allowable noise power of the amplifier [1].

The Problem Here's the situation for an ADC whose maximum analog input voltage range is –VRef to +VRef. If we drive an ADC's analog input with an sine wave whose peak amplitude is VP = VRef, the ADC's output signal to noise ratio is maximized. We'll...

## Computing Chebyshev Window Sequences

Chebyshev windows (also called Dolph-Chebyshev, or Tchebyschev windows), have several useful properties. Those windows, unlike the fixed Hanning, Hamming, or Blackman window functions, have adjustable sidelobe levels. For a given user-defined sidelobe level and window sequence length, Chebyshev windows yield the most narrow mainlobe compared to any fixed window functions.

However, for some reason, detailed descriptions of how to compute Chebyshev window sequences are not readily available...

## FIR sideways (interpolator polyphase decomposition)

An efficient implementation of a symmetric-FIR polyphase 1:3 interpolator that doesn't follow the usual tapped delay line-paradigm. The example exploits the impulse response symmetry and avoids four multiplications out of 10. keywords: symmetric polyphase FIR filter implementation ASIC Matlab / Octave implementation

IntroductionAn interpolating FIR filter can be implemented with a single tapped delay line, possibly going forwards and backwards for a symmetric impulse response. To...

## Understanding and Relating E_{b}/N_{o}, SNR, and other Power Efficiency Metrics

Introduction

Evaluating the performance of communication systems, and wireless systems in particular, usually involves quantifying some performance metric as a function of Signal-to-Noise-Ratio (SNR) or some similar measurement. Many systems require performance evaluation in multipath channels, some in Doppler conditions and other impairments related to mobility. Some have interference metrics to measure against, but nearly all include noise power as an impairment. Not all systems are...

## Spline interpolation

A cookbook recipe for segmented y=f(x) 3rd-order polynomial interpolation based on arbitrary input data. Includes Octave/Matlab design script and Verilog implementation example. Keywords: Spline, interpolation, function modeling, fixed point approximation, data fitting, Matlab, RTL, Verilog

IntroductionSplines describe a smooth function with a small number of parameters. They are well-known for example from vector drawing programs, or to define a "natural" movement path through given...

## The Exponential Nature of the Complex Unit Circle

IntroductionThis is an article to hopefully give an understanding to Euler's magnificent equation:

$$ e^{i\theta} = cos( \theta ) + i \cdot sin( \theta ) $$

This equation is usually proved using the Taylor series expansion for the given functions, but this approach fails to give an understanding to the equation and the ramification for the behavior of complex numbers. Instead an intuitive approach is taken that culminates in a graphical understanding of the equation.

Complex...## Minimum Shift Keying (MSK) - A Tutorial

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

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

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

## 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...## A Simple Complex Down-conversion Scheme

Recently I was experimenting with complex down-conversion schemes. That is, generating an analytic (complex) version, centered at zero Hz, of a real bandpass signal that was originally centered at ±fs/4 (one fourth the sample rate). I managed to obtain one such scheme that is computationally efficient, and it might be of some mild interest to you guys. The simple complex down-conversion scheme is shown in Figure 1(a).It works like this: say we have a real xR(n) input bandpass...

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

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

- Octaveforge / Matlab design script. Download: here
- 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

Digital-to-analog conversion connects digital...

## Goertzel Algorithm for a Non-integer Frequency Index

If you've read about the Goertzel algorithm, you know it's typically presented as an efficient way to compute an individual kth bin result of an N-point discrete Fourier transform (DFT). The integer-valued frequency index k is in the range of zero to N-1 and the standard block diagram for the Goertzel algorithm is shown in Figure 1. For example, if you want to efficiently compute just the 17th DFT bin result (output sample X17) of a 64-point DFT you set integer frequency index k = 17 and N =...