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

## New Video: Parametric Oscillations

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.

## Wavelets II - Vanishing Moments and Spectral Factorization

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

## The Power Spectrum

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

## Wavelets I - From Filter Banks to the Dilation Equation

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

## An s-Plane to z-Plane Mapping Example

While surfing around the Internet recently I encountered the 's-plane to z-plane mapping' diagram shown in Figure 1. At first I thought the diagram was neat because it's a good example of the old English idiom: "A picture is worth a thousand words." However, as I continued to look at Figure 1 I began to detect what I believe are errors in the diagram.

Reader, please take a few moments to see if you detect any errors in Figure 1.

...

## Digital PLL's -- Part 2

In Part 1, we found the time response of a 2nd order PLL with a proportional + integral (lead-lag) loop filter.  Now let’s look at this PLL in the Z-domain [1, 2].  We will find that the response is characterized by a loop natural frequency ωn and damping coefficient ζ.

Having a Z-domain model of the DPLL will allow us to do three things:

Compute the values of loop filter proportional gain KL and integrator gain KI that give the desired loop natural...

## Digital PLL's -- Part 1

1. Introduction

Figure 1.1 is a block diagram of a digital PLL (DPLL).  The purpose of the DPLL is to lock the phase of a numerically controlled oscillator (NCO) to a reference signal.  The loop includes a phase detector to compute phase error and a loop filter to set loop dynamic performance.  The output of the loop filter controls the frequency and phase of the NCO, driving the phase error to zero.

One application of the DPLL is to recover the timing in a digital...

## Peak to Average Power Ratio and CCDF

Peak to Average Power Ratio (PAPR) is often used to characterize digitally modulated signals.  One example application is setting the level of the signal in a digital modulator.  Knowing PAPR allows setting the average power to a level that is just low enough to minimize clipping.

However, for a random signal, PAPR is a statistical quantity.  We have to ask, what is the probability of a given peak power?  Then we can decide where to set the average...

## Filter a Rectangular Pulse with no Ringing

To filter a rectangular pulse without any ringing, there is only one requirement on the filter coefficients:  they must all be positive.  However, if we want the leading and trailing edge of the pulse to be symmetrical, then the coefficients must be symmetrical.  What we are describing is basically a window function.

Consider a rectangular pulse 32 samples long with fs = 1 kHz.  Here is the Matlab code to generate the pulse:

N= 64; fs= 1000; % Hz sample...

## There and Back Again: Time of Flight Ranging between Two Wireless Nodes

With the growth in the Internet of Things (IoT) products, the number of applications requiring an estimate of range between two wireless nodes in indoor channels is growing very quickly as well. Therefore, localization is becoming a red hot market today and will remain so in the coming years.

One question that is perplexing is that many companies now a days are offering cm level accurate solutions using RF signals. The conventional wireless nodes usually implement synchronization...

## Model Signal Impairments at Complex Baseband

In this article, we develop complex-baseband models for several signal impairments: interfering carrier, multipath, phase noise, and Gaussian noise.  To provide concrete examples, we’ll apply the impairments to a QAM system. The impairment models are Matlab functions that each use at most seven lines of code.  Although our example system is QAM, the models can be used for any complex-baseband signal.

I used a very simple complex-baseband model of a QAM system in my last

## Coefficients of Cascaded Discrete-Time Systems

March 4, 2018

In this article, we’ll show how to compute the coefficients that result when you cascade discrete-time systems.  With the coefficients in hand, it’s then easy to compute the time or frequency response.  The computation presented here can also be used to find coefficients of mixed discrete-time and continuous-time systems, by using a discrete time model of the continuous-time portion [1].

## Phase and Amplitude Calculation for a Pure Complex Tone in a DFT

January 6, 2018
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by deriving exact formulas to calculate the phase and amplitude of a pure complex tone from a DFT bin value and knowing the frequency. This is a much simpler problem to solve than the corresponding case for a pure real tone which I covered in an earlier blog article[1]. In the noiseless single tone case, these equations will be exact. In the presence of noise or other tones...

## Exponential Smoothing with a Wrinkle

Introduction

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

## Filter a Rectangular Pulse with no Ringing

To filter a rectangular pulse without any ringing, there is only one requirement on the filter coefficients:  they must all be positive.  However, if we want the leading and trailing edge of the pulse to be symmetrical, then the coefficients must be symmetrical.  What we are describing is basically a window function.

Consider a rectangular pulse 32 samples long with fs = 1 kHz.  Here is the Matlab code to generate the pulse:

N= 64; fs= 1000; % Hz sample...

## A Two Bin Solution

July 12, 2019
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by showing an implementation of how the parameters of a real pure tone can be calculated from just two DFT bin values. The equations from previous articles are used in tandem to first calculate the frequency, and then calculate the amplitude and phase of the tone. The approach works best when the tone is between the two DFT bins in terms of frequency.

The Coding...

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

One way to do that is fitting a curve on our data, and let's face it: this is not that easy. In this post we will work on this issue using Python and its packages. If you do not have Python installed on your system, check here how to...

## The Discrete Fourier Transform and the Need for Window Functions

The Discrete Fourier Transform (DFT) is used to find the frequency spectrum of a discrete-time signal.  A computationally efficient version called the Fast Fourier Transform (FFT) is normally used to calculate the DFT.  But, as many have found to their dismay, the FFT, when used alone, usually does not provide an accurate spectrum.  The reason is a phenomenon called spectral leakage.

Spectral leakage can be reduced drastically by using a window function in conjunction...

## Third-Order Distortion of a Digitally-Modulated Signal

June 9, 2020
Analog designers are always harping about amplifier third-order distortion.  Why?  In this article, we’ll look at why third-order distortion is important, and simulate a QAM signal with third-order distortion.

In the following analysis, we assume that signal phase at the amplifier output is not a function of amplitude.  With this assumption, the output y of a non-ideal amplifier can be written as a power series of the input signal x:

y=...