Hardware specification part I: microcontroller and display

Before continuing work on the system subcomponents, I’m going to specify two basic hardware components: the microcontroller and the display.


First, for the microcontroller, I will use the TIVA LaunchPad (TM4C123GXL) as the foundation on which to build the Bispectrum Visualizer. Why? It provides a fast (75 MHz) 32 bit CPU with DSP-like capability thanks to its multiply-accumulate register. It also supports in-circuit debugging via its USB interface, is supported by good software libraries and development tools, and most importantly, I already have experience with the TIVA LaunchPad. Its 32 kb of RAM is rather constrained for the matrices of values that will represent the bispectra, but this will make the firmware design more interesting as a learning experience.

The TIVA LaunchPad provides headers to connect external circuitry. My plan is to design a PCB that fits into this header that implements all of the audio circuitry, including audio connectors, amplifier, and filter.

The board runs from a 3.3 V regulated supply that can drive up to 500 mA with overcurrent protection, powered by 5 V from a micro USB connection. This means the ADC of the onboard microcontroller will be able to digitize voltages in the range of 0 to 3.3 V – important to know when designing the amplifier and filter electronics.


And finally, for the display, I will use an existing display module already designed to connect to the TIVA LaunchPad, the Kentec QVGA Display BoosterPack (BOOSTXL-K350QVG-S1). Specifying this display now is important because it will define which header pins are free to use for my own circuit.

Anti-aliasing filter design part I: filter response

This post describes the rationale for selecting the magnitude and phase response of the anti-aliasing filter. (The hardware block diagram shows how this filter fits into the overall system.)

Phase response

The phase response of the filter – i.e. the relative time delay applied to each frequency – does not matter as far as the bispectrum is concerned. As I wrote in “A better definition of the bispectrum“, the bispectrum only depends on the relative phase between the signal frequencies f1, f2, and (f1 + f2) when bispectra are averaged and normalized. When the relative phase between these frequency components is constant across the averaged bispectra, the bispectrum is “hot”; when the phase between the components is not constant (i.e. random), it is “cold”. If the original signal is put through a filter prior to the calculation of the bispectrum, each of the frequency components f1, f2, and (f1 + f2) will undergo phase shifts of ϕ1, ϕ2, and ϕ3, respectively; each of these phase shifts will be constant because the bispectrum is independently calculated at every frequency triplet (f1, f2, f1 + f2). So whether the relative phases between frequency components are constant or random in the original signal, adding an unspecified but constant phase shift to each of these frequency components will not affect their phase differences with respect to one another. For this reason, the bispectrum is indifferent to the phase response of the filter. (Within reason of course – if a very long phase delay of 1 second existed in the filter, that would be a problem.)

So the phase response of the anti-aliasing filter need not be flat, despite the bispectrum depending heavily on the phase information present within the signal. Not having a strict requirement on the phase response actually helps us obtain a more desirable magnitude response, as explained in the next section.

Magnitude response

Let’s start with the fundamental response requirement. The anti-aliasing filter should ideally prevent all frequencies in an analog signal that are higher than half the sampling rate from reaching the analog-to-digital converter (ADC). So, we want a low pass type of magnitude response.

Next, let’s choose a particular shape for the low-pass response. I’m going to limit the options to what can be realized with an active filter. Since there will already be a power source in the system, it doesn’t take much additional work to get the benefits of an active filter compared to a passive filter.

This page provides a good introduction to the advantages and disadvantages of the four basic active filter responses. The Bessel, Butterworth, Chebyshev, and Elliptic responses provide progressively steeper roll-off in the transition band. But choosing a response with a steeper roll-off comes at the cost of a less flat phase response as well as progressively greater ripples in the pass and/or stop bands. Since we already know that a flat phase response is not needed, a response with a steeper roll-off can be chosen. Since a steeper roll-off can be achieved, the filter need not have as many components (have as high an order) than if the Bessel or Butterworth responses were used.

The Elliptic response would appear to be a good choice. The Elliptic response, however, has ripples in both the pass and stop bands. I’m willing to accept some ripples in the pass band, only because the bispectrum can probably tolerate some magnitude inaccuracy since the signal magnitude is a secondary determinant of bispectrum magnitude (the primary determinant is the relative phase relationships between frequency components). For the stop band, however, I want uniform attenuation because I don’t want to allow the potential for aliasing at much lower frequencies due to a decrease in stopband attenuation. The Chebyshev filter gives us a flat stopband and an adjustable level of ripple in the pass band. Allowing greater ripple in the pass band allows for a sharper cut-off, so this parameter can be adjusted to permit a trade-off between steepness and passband ripple.

To summarize, an anti-aliasing filter with a Chebyshev response is probably the best fit for the bispectrum visualizer because:

  • It has the sharpest possible roll-off while keeping a flat response in the stopband. This allows me to build a simpler filter with less components.
  • Its passband ripple can be adjusted to strike a balance between the sharpness of the roll-off versus passband ripple.

Next filter design steps

In a sequel post I will define the Chebyshev response parameters, such as passband ripple, cut-off frequency, stop frequency, and stopband attenuation, as well as determine the necessary filter order. In the same post I hope to select an existing electronic filter topology, select the components to obtain the desired response, and simulate the circuit to verify its performance.