## Feedback Controllers - Making Hardware with Firmware. Part 6. Self-Calibration Related.

This article will consider the engineering of a self-calibration & self-test capability to enable the project hardware to be configured and its basic performance evaluated and verified, ready for the development of the low-latency controller DSP firmware and closed-loop applications. Performance specifications will be documented in due course, on the project website here.

- Part 6: Self-Calibration, Measurements and Signalling (this part)
- Part 5:

## Simplest Calculation of Half-band Filter Coefficients

Half-band filters are lowpass FIR filters with cut-off frequency of one-quarter of sampling frequency fs and odd symmetry about fs/4 [1]*. And it so happens that almost half of the coefficients are zero. The passband and stopband bandwiths are equal, making these filters useful for decimation-by-2 and interpolation-by-2. Since the zero coefficients make them computationally efficient, these filters are ubiquitous in DSP systems.

Here we will compute half-band...

## Feedback Controllers - Making Hardware with Firmware. Part 5. Some FPGA Aspects.

This part of the on-going series of articles looks at a variety of aspects concerning the FPGA device which provides the high-speed maths capability for the low-latency controller and the arbitrary circuit generator application. In due course a complete specification along with application examples will be maintained on the project website here.- Part 5: Some FPGA Aspects (this part)
- Part 4: Engineering of...

## Improved Three Bin Exact Frequency Formula for a Pure Real Tone in a DFT

IntroductionThis is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by extending the exact two bin formulas for the frequency of a real tone in a DFT to the three bin case. This article is a direct extension of my prior article "Two Bin Exact Frequency Formulas for a Pure Real Tone in a DFT"[1]. The formulas derived in the previous article are also presented in this article in the computational order, rather than the indirect order they were...

## There's No End to It -- Matlab Code Plots Frequency Response above the Unit Circle

Reference [1] has some 3D plots of frequency response magnitude above the unit circle in the Z-plane. I liked them enough that I wrote a Matlab function to plot the response of any digital filter this way. I’m not sure how useful these plots are, but they’re fun to look at. The Matlab code is listed in the Appendix.This post is available in PDF format for easy...

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

## Feedback Controllers - Making Hardware with Firmware. Part 4. Engineering of Evaluation Hardware

Following on from the previous abstract descriptions of an arbitrary circuit emulation application for low-latency feedback controllers, we now come to some aspects in the hardware engineering of an evaluation design from concept to first power-up. In due course a complete specification along with application examples will be maintained on the project website.- Part 1: Introduction
- Part 2:...

## Online DSP Classes: Why Such a High Dropout Rate?

Last year the IEEE Signal Processing Magazine published a lengthy article describing three university-sponsored online digital signal processing (DSP) courses [1]. The article detailed all the effort the professors expended in creating those courses and the courses' perceived values to students.

However, one fact that struck me as important, but not thoroughly addressed in the article, was the shocking dropout rate of those online courses. For two of the courses the article's...

## Two Bin Exact Frequency Formulas for a Pure Real Tone in a DFT

IntroductionThis is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by deriving exact formulas for the frequency of a real tone in a DFT. This time it is a two bin version. The approach taken is a vector based one similar to the approach used in "Three Bin Exact Frequency Formulas for a Pure Complex Tone in a DFT"[1]. The real valued formula presented in this article actually preceded, and was the basis for the complex three bin...

## Errata for the book: 'Understanding Digital Signal Processing'

Errata 3rd Ed. International Version.pdfErrata 3rd Ed. International Version.pdfThis blog post provides, in one place, the errata for each of the many different Editions/Printings of my book Understanding Digital Signal Processing.

If you would like the errata for your copy of the book, merely scroll down and click on the appropriate red line below. For the American versions of the various Editions of the book you'll need to know the "Printing Number" of your copy of 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...## A poor man's Simulink

Glue between Octave and NGSPICE for discrete- and continuous time cosimulation (download) Keywords: Octave, SPICE, Simulink

IntroductionMany DSP problems have close ties with the analog world. For example, a switched-mode audio power amplifier uses a digital control loop to open and close power transistors driving an analog filter. There are commercial tools for digital-analog cosimulation: Simulink comes to mind, and mainstream EDA vendors support VHDL-AMS or Verilog-A in their...

## Padé Delay is Okay Today

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

## Errata for the book: 'Understanding Digital Signal Processing'

Errata 3rd Ed. International Version.pdfErrata 3rd Ed. International Version.pdfThis blog post provides, in one place, the errata for each of the many different Editions/Printings of my book Understanding Digital Signal Processing.

If you would like the errata for your copy of the book, merely scroll down and click on the appropriate red line below. For the American versions of the various Editions of the book you'll need to know the "Printing Number" of your copy of the...

## An Efficient Full-Band Sliding DFT Spectrum Analyzer

In this blog I present two computationally efficient full-band discrete Fourier transform (DFT) networks that compute the 0th bin and all the positive-frequency bin outputs for an N-point DFT in real-time on a sample-by-sample basis.

An Even-N Spectrum Analyzer

The full-band sliding DFT (SDFT) spectrum analyzer network, where the DFT size N is an even integer, is shown in Figure 1(a). The x[n] input sequence is restricted to be real-only valued samples. Notice that the only real parts of...

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

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

## Time Machine, Anyone?

Abstract: Dispersive linear systems with negative group delay have caused much confusion in the past. Some claim that they violate causality, others that they are the cause of superluminal tunneling. Can we really receive messages before they are sent? This article aims at pouring oil in the fire and causing yet more confusion :-).

IntroductionIn this article we reproduce the results of a physical experiment...

## Half-band filter on Xilinx FPGA

1. DSP48 Slice in Xilinx FPGAThere are many DSP48 Slices in most Xilinx® FPGAs, one DSP48 slice in Spartan6® FPGA is shown in Figure 1, the structure may different depending on the device, but broadly similar.

Figure 1: A whole DSP48A1 Slice in Spartan6 (www.xilinx.com)

2. Symmetric Systolic Half-band FIRFigure 2: Symmetric Systolic Half-band FIR Filter

3. Two-channel Symmetric Systolic Half-band FIRFigure 3: 2-Channel...

## Adaptive Beamforming is like Squeezing a Water Balloon

Adaptive beamforming was first developed in the 1960s for radar and sonar applications. The main idea is that signals can be captured using multiple sensors and the sensor outputs can be combined to enhance the signals propagating from specific directions and attenuate (null out) signals from other directions. It has grown immensely in recent years as processors have become faster and cheaper. Today, adaptive beamforming applications include smart speakers (like the Amazon Echo),...

## Using the DFT as a Filter: Correcting a Misconception

I have read, in some of the literature of DSP, that when the discrete Fourier transform (DFT) is used as a filter the process of performing a DFT causes an input signal's spectrum to be frequency translated down to zero Hz (DC). I can understand why someone might say that, but I challenge that statement as being incorrect. Here are my thoughts.

Using the DFT as a Filter It may seem strange to think of the DFT as being used as a filter but there are a number of applications where this is...

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

## Multiplying Two Binary Numbers

I just encountered what I think is an interesting technique for multiplying two integer numbers. Perhaps some of the readers here will also find it interesting.

Here's the technique: assume we want to multiply 18 times 17. We start by writing 18 and 17, side-by-side in column A and column B, as shown at the top of Figure 1. Next we divide the 18 at the top of column A by two, retaining only the integer part of the division, and double the 17 at the top of column B. The results of those two...

## Design study: 1:64 interpolating pulse shaping FIR

This article is the documentation to a code snippet that originated from a discussion on comp.dsp.

The task is to design a root-raised cosine filter with a rolloff of a=0.15 that interpolates to 64x the symbol rate at the input.

The code snippet shows a solution that is relatively straightforward to design and achieves reasonably good efficiency using only FIR filters.

Motivation: “simple solutions?”## 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...

## Is It True That *j* is Equal to the Square Root of -1 ?

A few days ago, on the YouTube.com web site, I watched an interesting video concerning complex numbers and the j operator. The video's author claimed that the statement "j is equal to the square root of negative one" is incorrect. What he said was:

He justified his claim by going through the following exercise, starting with:

Based on the algebraic identity:

the author rewrites Eq. (1) as:

If we assume

Eq. (3) can be rewritten...

## Data Types for Control & DSP

There's a lot of information out there on what data types to use for digital signal processing, but there's also a lot of confusion, so the topic bears repeating.

I recently posted an entry on PID control. In that article I glossed over the data types used by showing "double" in all of my example code. Numerically, this should work for most control problems, but it can be an extravagant use of processor resources. There ought to be a better way to determine what precision you need...

## Demonstrating the Periodic Spectrum of a Sampled Signal Using the DFT

One of the basic DSP principles states that a sampled time signal has a periodic spectrum with period equal to the sample rate. The derivation of can be found in textbooks [1,2]. You can also demonstrate this principle numerically using the Discrete Fourier Transform (DFT).

The DFT of the sampled signal x(n) is defined as:

$$X(k)=\sum_{n=0}^{N-1}x(n)e^{-j2\pi kn/N} \qquad (1)$$

Where

X(k) = discrete frequency spectrum of time sequence x(n)

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

## Design IIR Band-Reject Filters

In this post, I show how to design IIR Butterworth band-reject filters, and provide two Matlab functions for band-reject filter synthesis. Earlier posts covered IIR Butterworth lowpass [1] and bandpass [2] filters. Here, the function br_synth1.m designs band-reject filters based on null frequency and upper -3 dB frequency, while br_synth2.m designs them based on lower and upper -3 dB frequencies. I’ll discuss the differences between the two approaches later in this...

## Coupled-Form 2nd-Order IIR Resonators: A Contradiction Resolved

This blog clarifies how to obtain and interpret the z-domain transfer function of the coupled-form 2nd-order IIR resonator. The coupled-form 2nd-order IIR resonator was developed to overcome a shortcoming in the standard 2nd-order IIR resonator. With that thought in mind, let's take a brief look at a standard 2nd-order IIR resonator.

Standard 2nd-Order IIR Resonator A block diagram of the standard 2nd-order IIR resonator is shown in Figure 1(a). You've probably seen that block diagram many...