## A Beginner's Guide To Cascaded Integrator-Comb (CIC) Filters

This blog discusses the behavior, mathematics, and implementation of cascaded integrator-comb filters.

Cascaded integrator-comb (CIC) digital filters are computationally-efficient implementations of narrowband lowpass filters, and are often embedded in hardware implementations of decimation, interpolation, and delta-sigma converter filtering.

After describing a few applications of CIC filters, this blog introduces their structure and behavior, presents the frequency-domain...

## Are DSPs Dead ?

Are DSPs Dead ?Former Texas Instruments Sr. Fellow Gene Frantz and former TI Fellow Alan Gatherer wrote a 2017 IEEE article about the "death and rebirth" of DSP as a discipline, explaining that now signal processing provides indispensable building blocks in widely popular and lucrative areas such as data science and machine learning. The article implies that DSP will now be taught in university engineering programs as its linear systems and electromagnetics...

## Digging into an Audio Signal and the DSP Process Pipeline

In this post, I'll look at the benefits of using multiple perspectives when handling signals.A Pre-existing Audio FileLet's say we have an audio file of interest. Let's load it into Audacity and zoom in a little (using View → Zoom → Zoom In, multiple times). The figure illustrates the audio signal: just a basic single-tone signal.

By continuing to zoom into the signal, we eventually get to the point of seeing individual samples as illustrated below. Notice that I've marked one...

## A Simplified Matlab Function for Power Spectral Density

In an earlier post [1], I showed how to compute power spectral density (PSD) of a discrete-time signal using the Matlab function pwelch [2]. Pwelch is a useful function because it gives the correct output, and it has the option to average multiple Discrete Fourier Transforms (DFTs). However, a typical function call has five arguments, and it can be hard to remember how to set them all and how they default.

In this post, I create a simplified PSD function by putting a...

## Already 3000+ Attendees Registered for the Upcoming Embedded Online Conference

Chances are you already know, through the newsletter or banners on the Related sites, about the upcoming Embedded Online Conference.

Chances are you also already know that you have until the end of the month of February to register for free.

And chances are that you are one of the more than 3000 pro-active engineers who have already registered.

But If you are like me and have a tendency to do tomorrow what can be done today, maybe you haven't registered yet. You may...

## Fractional Delay FIR Filters

Consider the following Finite Impulse Response (FIR) coefficients:

b = [b0 b1 b2 b1 b0]

These coefficients form a 5-tap symmetrical FIR filter having constant group delay [1,2] over 0 to fs/2 of:

D = (ntaps – 1)/2 = 2 samples

For a symmetrical filter with an odd number of taps, the group delay is always an integer number of samples, while for one with an even number of taps, the group delay is always an integer + 0.5 samples. Can we design a filter...

## The DFT of Finite-Length Time-Reversed Sequences

Recently I've been reading papers on underwater acoustic communications systems and this caused me to investigate the frequency-domain effects of time-reversal of time-domain sequences. I created this blog because there is so little coverage of this topic in the literature of DSP.

This blog reviews the two types of time-reversal of finite-length sequences and summarizes their discrete Fourier transform (DFT) frequency-domain characteristics.The Two Types of Time-Reversal in DSP

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

## Update To: A Wide-Notch Comb Filter

This blog presents alternatives to the wide-notch comb filter described in Reference [1]. That comb filter, which for notational reasons I now call a 2-RRS wide notch comb filter, is shown in Figure 1. I use the "2-RRS" moniker because the comb filter uses two recursive running sum (RRS) networks.

The z-domain transfer function of the 2-RRS wide-notch comb filter, H2-RRS(z), is:

References

[1] R. Lyons, "A Wide-Notch Comb Filter", dsprelated.com Blogs, Nov. 24, 2019, Available...

## A Wide-Notch Comb Filter

This blog describes a linear-phase comb filter having wider stopband notches than a traditional comb filter.

Background

Let's first review the behavior of a traditional comb filter. Figure 1(a) shows a traditional comb filter comprising two cascaded recursive running sum (RRS) comb filters. Figure 1(b) shows the filter's co-located dual poles and dual zeros on the z-plane, while Figure 1(c) shows the filter's positive-frequency magnitude response when, for example, D = 9. The...## DSP Online Conference Update

As I write this blog post (August 24th), the DSP Online Conference is exactly one month away and we are very happy and excited with the way things are shaping up. There are currently 9 presentations confirmed and we are expecting at least three more to be added to the schedule in the next few days.

NOTE: The current schedule could still be modified so please check back often and update your calendar accordingly

## Already 3000+ Attendees Registered for the Upcoming Embedded Online Conference

Chances are you already know, through the newsletter or banners on the Related sites, about the upcoming Embedded Online Conference.

Chances are you also already know that you have until the end of the month of February to register for free.

And chances are that you are one of the more than 3000 pro-active engineers who have already registered.

But If you are like me and have a tendency to do tomorrow what can be done today, maybe you haven't registered yet. You may...

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

## 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...## Four Ways to Compute an Inverse FFT Using the Forward FFT Algorithm

If you need to compute inverse fast Fourier transforms (inverse FFTs) but you only have forward FFT software (or forward FFT FPGA cores) available to you, below are four ways to solve your problem.

Preliminaries To define what we're thinking about here, an N-point forward FFT and an N-point inverse FFT are described by:

$$ Forward \ FFT \rightarrow X(m) = \sum_{n=0}^{N-1} x(n)e^{-j2\pi nm/N} \tag{1} $$ $$ Inverse \ FFT \rightarrow x(n) = {1 \over N} \sum_{m=0}^{N-1}...## 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...

## How to Find a Fast Floating-Point atan2 Approximation

Context Over a short period of time, I came across nearly identical approximations of the two parameter arctangent function, atan2, developed by different companies, in different countries, and even in different decades. Fascinated with how the coefficients used in these approximations were derived, I set out to find them. This atan2 implementation is based around a rational approximation of arctangent on the domain -1 to 1:$$ atan(z) \approx \dfrac{z}{1.0 +...

## Understanding the 'Phasing Method' of Single Sideband Demodulation

There are four ways to demodulate a transmitted single sideband (SSB) signal. Those four methods are:

- synchronous detection,
- phasing method,
- Weaver method, and
- filtering method.

Here we review synchronous detection in preparation for explaining, in detail, how the phasing method works. This blog contains lots of preliminary information, so if you're already familiar with SSB signals you might want to scroll down to the 'SSB DEMODULATION BY SYNCHRONOUS DETECTION'...

## An Interesting Fourier Transform - 1/f Noise

Power law functions are common in science and engineering. A surprising property is that the Fourier transform of a power law is also a power law. But this is only the start- there are many interesting features that soon become apparent. This may even be the key to solving an 80-year mystery in physics.

It starts with the following Fourier transform:

The general form is tα ↔ ω-(α+1), where α is a constant. For example, t2 ↔...

## Handling Spectral Inversion in Baseband Processing

The problem of "spectral inversion" comes up fairly frequently in the context of signal processing for communication systems. In short, "spectral inversion" is the reversal of the orientation of the signal bandwidth with respect to the carrier frequency. Rick Lyons' article on "Spectral Flipping" at http://www.dsprelated.com/showarticle/37.php discusses methods of handling the inversion (as shown in Figure 1a and 1b) at the signal center frequency. Since most communication systems process...

## Design IIR Butterworth Filters Using 12 Lines of Code

While there are plenty of canned functions to design Butterworth IIR filters [1], it’s instructive and not that complicated to design them from scratch. You can do it in 12 lines of Matlab code. In this article, we’ll create a Matlab function butter_synth.m to design lowpass Butterworth filters of any order. Here is an example function call for a 5th order filter:

N= 5 % Filter order fc= 10; % Hz cutoff freq fs= 100; % Hz sample freq [b,a]=...## Computing FFT Twiddle Factors

Some days ago I read a post on the comp.dsp newsgroup and, if I understood the poster's words, it seemed that the poster would benefit from knowing how to compute the twiddle factors of a radix-2 fast Fourier transform (FFT).

Then, later it occurred to me that it might be useful for this blog's readers to be aware of algorithms for computing FFT twiddle factors. So,... what follows are two algorithms showing how to compute the individual twiddle factors of an N-point decimation-in-frequency...

## Python scipy.signal IIR Filtering: An Example

IntroductionIn the last posts I reviewed how to use the Python scipy.signal package to design digital infinite impulse response (IIR) filters, specifically, using the iirdesign function (IIR design I and IIR design II ). In this post I am going to conclude the IIR filter design review with an example.

Previous posts:

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

## Free DSP Books on the Internet

While surfing the "net" I have occasionally encountered signal processing books whose chapters could be downloaded to my computer. I started keeping a list of those books and, over the years, that list has grown to over forty books. Perhaps the list will be of interest to you.

Please know, all of the listed books are copyrighted. The copyright holders have graciously provided their books free of charge for downloading for individual use, but multiple copies must not be made or printed. As...

## Four Ways to Compute an Inverse FFT Using the Forward FFT Algorithm

If you need to compute inverse fast Fourier transforms (inverse FFTs) but you only have forward FFT software (or forward FFT FPGA cores) available to you, below are four ways to solve your problem.

Preliminaries To define what we're thinking about here, an N-point forward FFT and an N-point inverse FFT are described by:

$$ Forward \ FFT \rightarrow X(m) = \sum_{n=0}^{N-1} x(n)e^{-j2\pi nm/N} \tag{1} $$ $$ Inverse \ FFT \rightarrow x(n) = {1 \over N} \sum_{m=0}^{N-1}...## The DFT Magnitude of a Real-valued Cosine Sequence

This blog may seem a bit trivial to some readers here but, then again, it might be of some value to DSP beginners. It presents a mathematical proof of what is the magnitude of an N-point discrete Fourier transform (DFT) when the DFT's input is a real-valued sinusoidal sequence.

To be specific, if we perform an N-point DFT on N real-valued time-domain samples of a discrete cosine wave, having exactly integer k cycles over N time samples, the peak magnitude of the cosine wave's...

## Python scipy.signal IIR Filter Design

IntroductionThe following is an introduction on how to design an infinite impulse response (IIR) filters using the Python scipy.signal package. This post, mainly, covers how to use the scipy.signal package and is not a thorough introduction to IIR filter design. For complete coverage of IIR filter design and structure see one of the references.

Filter SpecificationBefore providing some examples lets review the specifications for a filter design. A filter...

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

## Delay estimation by FFT

Given x=sig(t) and y=ref(t), returns [c, ref(t+delta), delta)] = fitSignal(y, x);:Estimates and corrects delay and scaling factor between two signals Code snippetThis article relates to the Matlab / Octave code snippet: Delay estimation with subsample resolution It explains the algorithm and the design decisions behind it.

IntroductionThere are many DSP-related problems, where an unknown timing between two signals needs to be determined and corrected, for example, radar, sonar,...

## Sensors Expo - Trip Report & My Best Video Yet!

This was my first time at Sensors Expo and my second time in Silicon Valley and I must say I had a great time.

Before I share with you what I find to be, by far, my best 'highlights' video yet for a conference/trade show, let me try to entertain you with a few anecdotes from this trip. If you are not interested by my stories or maybe don't have the extra minutes needed to read them, please feel free to skip to the end of this blog post to watch the...

## Who else is going to Sensors Expo in San Jose? Looking for roommate(s)!

This will be my first time attending this show and I must say that I am excited. I am bringing with me my cameras and other video equipment with the intention to capture as much footage as possible and produce a (hopefully) fun to watch 'highlights' video. I will also try to film as many demos as possible and share them with you.

I enjoy going to shows like this one as it gives me the opportunity to get out of my home-office (from where I manage and run the *Related sites) and actually...

## Crowdfunding Articles?

Many of you have the knowledge and talent to write technical articles that would benefit the EE community. What is missing for most of you though, and very understandably so, is the time and motivation to do it.

But what if you could make some money to compensate for your time spent on writing the article(s)? Would some of you find the motivation and make the time?

I am thinking of implementing a system/mechanism that would allow the EE community to...

## Embedded World 2018 - More Videos!

After the interview videos last week, this week I am very happy to release two more videos taken at Embedded World 2018 and that I am proud of.

For both videos, I made extensive use of my two new toys, a Zhiyun Crane Gimbal and a Sony a6300 camera.

The use of a gimbal like the Zhiyun makes a big difference in terms of making the footage look much more stable and cinematographic.

As for the Sony camera, it takes fantastic slow-motion footage and...

## Embedded World 2018 - The Interviews

Once again this year, I had the chance to go to Embedded World in Nuremberg Germany. And once again this year, I brought my video equipment to try and capture some of the most interesting things at the show.

Something new this year, I asked Jacob Beningo if he would partner with me in doing interviews with a few vendors. I would operate the camera while Jacob would ask the right questions to the vendors to make them talk about the key products/features that...

## Finally got a drone!

As a reader of my blog, you already know that I have been making videos lately and thoroughly enjoying the process. When I was in Germany early this summer (and went 280 km/h in a porsche!) to produce SEGGER's 25th anniversary video, the company bought a drone so we could get an aerial shot of the party (at about the 1:35 mark in this video). Since then, I have been obsessing on buying a drone for myself and finally made the move a few weeks ago - I acquired a used DJI...

## SEGGER's 25th Anniversary Video

Chances are you will find this video more interesting to watch if you take five minutes to first read the story of the week I spent at SEGGER's headquarters at the end of June.

The video is only a little more than 2 minutes long. If you decide to watch it, make sure to go full screen and I would really love to read your thoughts about it in the comments down bellow. Do you think a video like this succeeds in making the viewer want to learn more about the company?...

## Went 280km/h (174mph) in a Porsche Panamera in Germany!

Those of you who've been following my blog lately already know that I am going through some sort of mid-life crisis that involves going out there to meet people and make videos. It all started with Embedded World early this year, then continued at ESC Boston a couple of months ago and the latest chapter just concluded as I returned from Germany after spending a week at SEGGER's headquarters to produce a video to highlight their 25th anniversary.

## Going back to Germany!

A couple of blog posts ago, I wrote that the decision to go to ESC Boston ended up being a great one for many different reasons. I came back from the conference energized and really happy that I went.

These feelings were amplified a few days after my return when I received an email from Rolf Segger, the founder of SEGGER Microcontroller (check out their very new website), asking if I would be interested in visiting their headquarters...