## Maximum Likelihood Estimation

Any observation has some degree of noise content that makes our observations uncertain. When we try to make conclusions based on noisy observations, we have to separate the dynamics of a signal from noise.

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

## Deconvolution by least squares (Using the power of linear algebra in signal processing).

When we deal with our normal discrete signal processing operations, like FIR/IIR filtering, convolution, filter design, etc. we normally think of the signals as a constant stream of numbers that we put in a sequence

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

## Phase and Amplitude Calculation for a Pure Real Tone in a DFT: Method 1

IntroductionThis is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by deriving exact formulas for the phase and amplitude of a non-integer frequency real tone in a DFT. The linearity of the Fourier Transform is exploited to reframe the problem as the equivalent of finding a set of coordinates in a specific vector space. The found coordinates are then used to calculate the phase and amplitude of the pure real tone in the DFT. This article...

## 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 deriving an exact formula for the frequency of a real tone in a DFT. According to current teaching, this is not possible, so this article should be considered a major theoretical advance in the discipline. The formula is presented in a few different formats. Some sample calculations are provided to give a numerical demonstration of the formula in use. This article is...

## DFT Bin Value Formulas for Pure Real Tones

IntroductionThis is an article to hopefully give a better understanding to the Discrete Fourier Transform (DFT) by deriving an analytical formula for the DFT of pure real tones. The formula is used to explain the well known properties of the DFT. A sample program is included, with its output, to numerically demonstrate the veracity of the formula. This article builds on the ideas developed in my previous two blog articles:

## DFT Graphical Interpretation: Centroids of Weighted Roots of Unity

IntroductionThis is an article to hopefully give a better understanding to the Discrete Fourier Transform (DFT) by framing it in a graphical interpretation. The bin calculation formula is shown to be the equivalent of finding the center of mass, or centroid, of a set of points. Various examples are graphed to illustrate the well known properties of DFT bin values. This treatment will only consider real valued signals. Complex valued signals can be analyzed in a similar manner with...

## 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...## Sum of Two Equal-Frequency Sinusoids

Some time ago I reviewed the manuscript of a book being considered by the IEEE Press publisher for possible publication. In that manuscript the author presented the following equation:

Being unfamiliar with Eq. (1), and being my paranoid self, I wondered if that equation is indeed correct. Not finding a stock trigonometric identity in my favorite math reference book to verify Eq. (1), I modeled both sides of the equation using software. Sure enough, Eq. (1) is not correct. So then I...

## A Recipe for a Basic Trigonometry Table

IntroductionThis is an article that is give a better understanding to the Discrete Fourier Transform (DFT) by showing how to build a Sine and Cosine table from scratch. Along the way a recursive method is developed as a tone generator for a pure tone complex signal with an amplitude of one. Then a simpler multiplicative one. Each with drift correction factors. By setting the initial values to zero and one degrees and letting it run to build 45 values, the entire set of values needed...

## Instantaneous Frequency Measurement

I would like to talk about the oft used method of measuring the carrier frequency in the world of Signal Collection and Characterization world. It is an elegant technique because of its simplicity. But, of course, with simplicity, there come drawbacks (sometimes...especially with this one!).

In the world of Radar detection and characterization, one of the key characteristics of interest is the carrier frequency of the signal. If the radar is pulsed, you will have a very wide bandwidth, a...

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

## Simulink-Simulation of SSB demodulation

≥≥≥ Simulink-Simulation of SSB demodulation or modulation from the article “Understanding the ‘Phasing Method’ of Single Sideband Demodulation” by Richard Lyons Josef HoffmannThe article “Understanding the ‘Phasing Method’ of Single Sideband Demodulation” by Richard Lyons is a very good description of this topic. The block representation from the figures are clear and easy to understand. They are predestined for a simulation in Simulink. The simulation can help...

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

## Fibonacci trick

I'm working on a video, tying the Fibonacci sequence into the general subject of difference equations.

Here's a fun trick: take any two consecutive numbers in the Fibonacci sequence, say 34 and 55. Now negate one and use them as the seed for the Fibonacci sequence, larger magnitude first, i.e.

$-55, 34, \cdots$

Carry it out, and you'll eventually get the Fibonacci sequence, or it's negative:

$-55, 34, -21, 13, -8, 5, -3, 2, -1, 1, 0, 1, 1 \cdots$

This is NOT a general property of difference...

## Some Thoughts on Sampling

Some time ago, I came across an interesting problem. In the explanation of sampling process, a representation of impulse sampling shown in Figure 1 below is illustrated in almost every textbook on DSP and communications. The question is: how is it possible that during sampling, the frequency axis gets scaled by $1/T_s$ -- a very large number? For an ADC operating at 10 MHz for example, the amplitude of the desired spectrum and spectral replicas is $10^7$! I thought that there must be...

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

## Resolving 'Can't initialize target CPU' on TI C6000 DSPs - Part 1

Introduction

Today I am going to discuss some of the basics that can help prevent errors that frustrate some users. The information is directed toward TI C6000 family DSPs, but much of it also applies to other TI DSPs. In many cases they represent the user's first involvement with using Code Composer Studio [CCS] and a target board. It has been my experience that the primary cause of the "Can't initialize target CPU" error message and similar messages like "Error connecting to...

## 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...## Exponential Smoothing with a Wrinkle

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

## Modelling a Noisy Communication Signal in MATLAB for the Analog to Digital Conversion Process

A critical thing to realize while modeling the signal that is going to be digitally processed is the SNR. In a receiver, the noise floor (hence the noise variance and hence its power) are determined by the temperature and the Bandwidth. For a system with a constant bandwidth, relatively constant temperature, the noise power remains relatively constant as well. This implies that the noise variance is a constant.

In MATLAB, the easiest way to create a noisy signal is by using...

## Feedback Controllers - Making Hardware with Firmware. Part 3. Sampled Data Aspects

Some Design and Simulation Considerations for Sampled-Data ControllersThis article will continue to look at some aspects of the controllers and electronics needed to create emulated physical circuits with real-world connectivity and will look at the issues that arise in sampled-data controllers compared to continuous-domain controllers. As such, is not intended as an introduction to sampled-data systems.

- Part 1: Introduction

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

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

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

## Feedback Controllers - Making Hardware with Firmware. Part 8. Control Loop Test-bed

This part in the series will consider the signals, measurements, analyses and configurations for testing high-speed low-latency feedback loops and their controllers. Along with basic test signals, a versatile IFFT signal generation scheme will be discussed and implemented. A simple controller under test will be constructed to demonstrate the analysis principles in preparation for the design and evaluation of specific controllers and closed-loop applications.

Additional design...## Filtering Noise: The Basics (Part 1)

IntroductionFinding signals in the presence of noise is one of the fundamental quests of the discipline of signal processing. Noise is inherently random by nature, so a probability oriented approach is needed to develop a mathematical framework for filtering (i.e. removing/suppressing) noise. This framework or discipline, formally referred to as stochastic signal processing, is often taught in graduate level engineering programs and is covered from different perspectives in excellent...

## A Two Bin Solution

IntroductionThis 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...## Correlation without pre-whitening is often misleading

White LiesCorrelation, as one of the first tools DSP users add to their tool box, can automate locating a known signal within a second (usually larger) signal. The expected result of a correlation is a nice sharp peak at the location of the known signal and few, if any, extraneous peaks.

A little thought will show this to be incorrect: correlating a signal with itself is only guaranteed to give a sharp peak if the signal's samples are uncorrelated --- for example if the signal is composed...

## Constrained Integer Behavior

The wheels go round and round, round and round ...Integer arithmetic is ubiquitous in digital hardware implementations, it's prolific in the control and data-paths. When using fixed width (constrained) integers, overflow and underflow is business as usual.

Building with IntegersThe subtitle of this post mentions a wheel - before I get to the wheel I want to look at an example. The recursive-windowed-averager (rwa, a.k.a moving average)...