## Filter a Rectangular Pulse with no Ringing

May 12, 201610 comments

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

## Dealing With Fixed Point Fractions

January 5, 20163 comments

Fixed point fractional representation always gives me a headache because I screw it up the first time I try to implement an algorithm. The difference between integer operations and fractional operations is in the overflow.  If the representation fits in the fixed point result, you can not tell the difference between fixed point integer and fixed point fractions.  When integers overflow, they lose data off the most significant bits.  When fractions overflow, they lose data off...

## The DFT Output and Its Dimensions

December 29, 20155 comments

The Discrete Fourier Transform, or DFT, converts a signal from discrete time to discrete frequency. It is commonly implemented as and used as the Fast Fourier Transform (FFT). This article will attempt to clarify the format of the DFT output and how it is produced.

Living in the real world, we deal with real signals. The data we typically sample does not have an imaginary component. For example, the voltage sampled by a receiver is a real value at a particular point in time. Let’s...

## Amplitude modulation and the sampling theorem

December 18, 20156 comments

I am working on the 11th and probably final chapter of Think DSP, which follows material my colleague Siddhartan Govindasamy developed for a class at Olin College.  He introduces amplitude modulation as a clever way to sneak up on the Nyquist–Shannon sampling theorem.

Most of the code for the chapter is done: you can check it out in this IPython notebook.  I haven't written the text yet, but I'll outline it here, and paste in the key figures.

Convolution...

## Exponential Smoothing with a Wrinkle

December 17, 20152 comments
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...

## Discrete-Time PLLs, Part 1: Basics

December 1, 20159 comments

Design Files: Part1.slx

Hi everyone,

In this series of tutorials on discrete-time PLLs we will be focusing on Phase-Locked Loops that can be implemented in discrete-time signal proessors such as FPGAs, DSPs and of course, MATLAB.

In the first part of the series, we will be reviewing the basics of continuous-time baseband PLLs and we will see some useful mathematics that will give us insight into the inners working of PLLs. In the second part, we will focus on...

## Compressive Sensing - Recovery of Sparse Signals (Part 1)

November 28, 2015

The amount of data that is generated has been increasing at a substantial rate since the beginning of the digital revolution. The constraints on the sampling and reconstruction of digital signals are derived from the well-known Nyquist-Shannon sampling theorem. To review, the theorem states that a band-limited signal, with the highest frequency of $f_{max}$, can be completely reconstructed from its samples if the sampling rate, $f_{s}$, is at least twice the signal bandwidth. If the...

## Analytic Signal

November 26, 20154 comments

In communication theory and modulation theory we always deal with two phases: In-phase (I) and Quadrature-phase (Q). The question that I will discuss in this blog is that why we use two phases and not more.

Any real band-limited signal along with its Hilbert transformed pair form an analytic signal. We normally use the analytic signal for modulation. A modulated signal is actually a carrier or the sine signal that one attribute of it is changing with time which is our signal....

## Multilayer Perceptrons and Event Classification with data from CODEC using Scilab and Weka

November 25, 2015

For my first blog, I thought I would introduce the reader to Scilab [1] and Weka [2].  In order to illustrate how they work, I will put together a script in Scilab that will sample using the microphone and CODEC on your PC and save the waveform as a CSV file.  Then, we can take the CSV file and open it in Weka.  Once in Weka, we have a lot of paths to consider in order to classify it.  I use the term classify loosely since there are many things you can do with data sets...

## Maximum Likelihood Estimation

November 24, 2015

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. This is the point that estimation starts. Any time that we analyse noisy observations to make decisions, we are estimating some parameters. Parameters are mainly used to simplify the description of a dynamic.

Noise by its definition is a...

## A brief look at multipath radio channels

October 31, 20078 comments

Summary: Discussion of multipath propagation and fading in radio links

Radio channels, their effects on communications links and how to model them are a popular topic on comp.dsp. Unfortunately, for many of us there is little or no opportunity to get any "hands-on" experience with radio-related issues, because the required RF measurement equipment is not that easily available.

This article gives a very simple example of a radio link that shows multipath propagation and...

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

October 30, 200715 comments

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

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

April 10, 2015
Introduction

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

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

October 30, 200713 comments

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

## Instant CIC

May 8, 20124 comments

Summary:

A floating point model for a CIC decimator, including the frequency response.

Description:

A CIC filter relies on a peculiarity of its fixed-point implementation: Normal operation involves repeated internal overflows that have no effect to the output signal, as they cancel in the following stage.

One way to put it intuitively is that only the speed (and rate of change) of every little "wheel" in the clockworks carries information, but its absolute position is...

## Hidden Linear Algebra in DSP

June 17, 20104 comments

Linear algebra (LA) is usually thought of as a blunt theoretical subject. However, LA is found hidden in many DSP algorithms used widely in practice.

An obvious clue in finding LA in DSP is the linearity assumption used in theoretical analysis of systems for modelling or design. A standard modelling example for this case would be linear time invariant (LTI) systems. LTI are usually used to model flat wireless communication channels. LTI systems are also used in the design of digital filter...

## Python number crunching faster? Part I

September 17, 20114 comments

Everyone has their favorite computing platform, regardless if it is Matlab, Octave, Scilab, Mathematica, Mathcad, etc.  I have been using Python and the common numerical and scientific packages available.  Personally, I have found this to be very useful in my work.  Lately there has been some chatter on speeding up Python.

From another project I follow, MyHDL, I was introduced to the Python JIT compiler,

## Exact Frequency Formula for a Pure Real Tone in a DFT

April 20, 20152 comments
Introduction

This 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

April 17, 20151 comment
Introduction

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

## Bank-switched Farrow resampler

August 13, 2011
Bank-switched Farrow resampler Summary

A modification of the Farrow structure with reduced computational complexity.Compared to a conventional design, the impulse response is broken into a higher number of segments. Interpolation accuracy is achieved with a lower polynomial order, requiring fewer multiplications per output sample at the expense of a higher overall number of coefficients.

Example code

This code snippet provides a Matlab / Octave implementation.And