Modeling a Continuous-Time System with Matlab

Many of us are familiar with modeling a continuous-time system in the frequency domain using its transfer function H(s) or H(jω).  However, finding the time response can be challenging, and traditionally involves finding the inverse Laplace transform of H(s).  An alternative way to get both time and frequency responses is to transform H(s) to a discrete-time system H(z) using the impulse-invariant transform [1,2].  This method provides an exact match to the continuous-time...

ESC Boston's Videos are Now Up

June 5, 2017

In my last blog, I told you about my experience at ESC Boston and the few videos that I was planning to produce and publish.  Here they are, please have a look and any feedback (positive or negative) is appreciated.

Short Highlight

This is a very short (one minute) montage of some of the footage that I shot at the show & conference.  In future shows, I absolutely need to insert clips here and there of engineers saying a few words about the conference (why they...

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

Exact Near Instantaneous Frequency Formulas Best at Peaks (Part 1)

May 12, 2017
Introduction

This is an article that is a another digression from trying to give a better understanding of the Discrete Fourier Transform (DFT). Although it is not as far off as the last blog article.

A new family of formulas for calculating the frequency of a single pure tone in a short interval in the time domain is presented. They are a generalization of Equation (1) from Rick Lyons' recent blog article titled "Sinusoidal Frequency Estimation Based on Time-Domain Samples"[1]. ...

Back from ESC Boston

NOT going to ESC Boston would have allowed me to stay home, in my comfort zone.

NOT going to ESC Boston would have saved me from driving in the absolutely horrible & stressful Boston traffic1.

NOT going to ESC Boston would have saved me from having to go through a full search & questioning session at the Canada Customs on my return2.

2017/06/06 update: Videos are now up!

So two days...

A Beginner's Guide to OFDM

In the recent past, high data rate wireless communications is often considered synonymous to an Orthogonal Frequency Division Multiplexing (OFDM) system. OFDM is a special case of multi-carrier communication as opposed to a conventional single-carrier system.

The concepts on which OFDM is based are so simple that almost everyone in the wireless community is a technical expert in this subject. However, I have always felt an absence of a really simple guide on how OFDM works which can...

A Recipe for a Common Logarithm Table

April 29, 2017
Introduction

This is an article that is a digression from trying to give a better understanding to the Discrete Fourier Transform (DFT).

A method for building a table of Base 10 Logarithms, also known as Common Logarithms, is featured using math that can be done with paper and pencil. The reader is assumed to have some familiarity with logarithm functions. This material has no dependency on the material in my previous blog articles.

If you were ever curious about how...

Sinusoidal Frequency Estimation Based on Time-Domain Samples

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 dsprelated.com. 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"...

Three Bin Exact Frequency Formulas for a Pure Complex Tone in a DFT

April 13, 2017
Introduction

This is an article to hopefully give a better understanding to the Discrete Fourier Transform (DFT) by deriving exact formulas for the frequency of a complex tone in a DFT. This time it is three bin versions. Although the problem is similar to the two bin version in my previous blog article "A Two Bin Exact Frequency Formula for a Pure Complex Tone in a DFT"[1], a slightly different approach is taken using linear algebra concepts. Because of an extra degree of freedom...

Launch of Youtube Channel: My First Videos - Embedded World 2017

I went to Embedded World 2017 in Nuremberg with an ambitious plan; I would make video highlights of several exhibits (booths) to be presented to the *Related sites audience.  I would try to make the vendors focus their pitch on the essential in order to produce a one to three minutes video per booth.

So far my experience with making videos was limited to family videos, so I knew I had lots of reading to do and lots of Youtube videos and tutorials to watch.  Trade shows are...

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.

...

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

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

The Most Interesting FIR Filter Equation in the World: Why FIR Filters Can Be Linear Phase

This blog discusses a little-known filter characteristic that enables real- and complex-coefficient tapped-delay line FIR filters to exhibit linear phase behavior. That is, this blog answers the question:

What is the constraint on real- and complex-valued FIR filters that guarantee linear phase behavior in the frequency domain?

I'll declare two things to convince you to continue reading.

Declaration# 1: "That the coefficients must be symmetrical" is not a correct

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

Signed serial-/parallel multiplication

February 16, 2014

Keywords: Binary signed multiplication implementation, RTL, Verilog, algorithm

Summary
• A detailed discussion of bit-level trickstery in signed-signed multiplication
• Algorithm based on Wikipedia example
• Includes a Verilog implementation with parametrized bit width
Signed serial-/parallel multiplication

A straightforward method to multiply two binary numbers is to repeatedly shift the first argument a, and add to a register if the corresponding bit in the other argument b is set. The...

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

Goertzel Algorithm for a Non-integer Frequency Index

October 7, 2013

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