The Filter Wizard issue 13: Buenos Notches! The Filter Wizard versus the vuvuzela Kendall Castor-Perry

Similar documents
The Filter Wizard issue 35: Turn linear phase into truly linear phase Kendall Castor-Perry

In this column, the Filter Wizard discusses a practical application of the time realignment filtering technique described in an earlier article.

The Filter Wizard issue 34: How linear phase filters can still cause phase distortion Kendall Castor-Perry

CHAPTER 14. Introduction to Frequency Selective Circuits

Experiment 2 Effects of Filtering

Part One. Efficient Digital Filters COPYRIGHTED MATERIAL

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015

Active Filter Design Techniques

3.2 Measuring Frequency Response Of Low-Pass Filter :

Signals & Systems for Speech & Hearing. Week 6. Practical spectral analysis. Bandpass filters & filterbanks. Try this out on an old friend

UNIT-3. Electronic Measurements & Instrumentation

ECE 5655/4655 Laboratory Problems

Equalizers. Contents: IIR or FIR for audio filtering? Shelving equalizers Peak equalizers

PHYS225 Lecture 15. Electronic Circuits

Part B. Simple Digital Filters. 1. Simple FIR Digital Filters

Frequency Selective Circuits

RTTY: an FSK decoder program for Linux. Jesús Arias (EB1DIX)

Glossary of VCO terms

DIGITAL FILTERS. !! Finite Impulse Response (FIR) !! Infinite Impulse Response (IIR) !! Background. !! Matlab functions AGC DSP AGC DSP

Project 2. Project 2: audio equalizer. Fig. 1: Kinter MA-170 stereo amplifier with bass and treble controls.

Acoustics, signals & systems for audiology. Week 4. Signals through Systems

Signal Processing. Introduction

EQ s & Frequency Processing

The Filter Wizard issue 21: A Fast-Settling Bias Voltage Filter with High Ripple Rejection Kendall Castor-Perry

Pattern Recognition. Part 6: Bandwidth Extension. Gerhard Schmidt

Signal Processing for Digitizers

Classic Filters. Figure 1 Butterworth Filter. Chebyshev

Laboratory Assignment 4. Fourier Sound Synthesis

The above figure represents a two stage circuit. Recall, the transfer function relates. Vout

For the system to have the high accuracy needed for many measurements,

Introduction. In the frequency domain, complex signals are separated into their frequency components, and the level at each frequency is displayed

Biosignal filtering and artifact rejection. Biosignal processing, S Autumn 2012

EE301 ELECTRONIC CIRCUITS

Spring 2014 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans. Homework #2. Filter Analysis, Simulation, and Design

This tutorial describes the principles of 24-bit recording systems and clarifies some common mis-conceptions regarding these systems.

Analog Lowpass Filter Specifications

4. Design of Discrete-Time Filters

EECS 452 Midterm Closed book part Winter 2013

Since the advent of the sine wave oscillator

IIR Filter Design Chapter Intended Learning Outcomes: (i) Ability to design analog Butterworth filters

Signals and Systems Lecture 6: Fourier Applications

Design of FIR Filters

225 Lock-in Amplifier

Terminology (1) Chapter 3. Terminology (3) Terminology (2) Transmitter Receiver Medium. Data Transmission. Direct link. Point-to-point.

APPENDIX A to VOLUME A1 TIMS FILTER RESPONSES

Audio Applications for Op-Amps, Part III By Bruce Carter Advanced Analog Products, Op Amp Applications Texas Instruments Incorporated

Subtractive Synthesis. Describing a Filter. Filters. CMPT 468: Subtractive Synthesis

Understanding Digital Signal Processing

Contents. Introduction 1 1 Suggested Reading 2 2 Equipment and Software Tools 2 3 Experiment 2

DSP Laboratory (EELE 4110) Lab#10 Finite Impulse Response (FIR) Filters

NAME STUDENT # ELEC 484 Audio Signal Processing. Midterm Exam July Listening test

Twelve voice signals, each band-limited to 3 khz, are frequency -multiplexed using 1 khz guard bands between channels and between the main carrier

Chapter 19. Basic Filters

Final Exam Solutions June 14, 2006

Signal Detection with EM1 Receivers

Communication Channels

Signal processing preliminaries

Lab Exercise PN: Phase Noise Measurement - 1 -

CHAPTER 2 FIR ARCHITECTURE FOR THE FILTER BANK OF SPEECH PROCESSOR

Impedance 50 (75 connectors via adapters)

Michael F. Toner, et. al.. "Distortion Measurement." Copyright 2000 CRC Press LLC. <

DSP-BASED FM STEREO GENERATOR FOR DIGITAL STUDIO -TO - TRANSMITTER LINK

Signal Processing Toolbox

Copyright S. K. Mitra

Biosignal filtering and artifact rejection. Biosignal processing I, S Autumn 2017

Phase Correction System Using Delay, Phase Invert and an All-pass Filter

ELEC3104: Digital Signal Processing Session 1, 2013

E Final Exam Solutions page 1/ gain / db Imaginary Part

ESE531 Spring University of Pennsylvania Department of Electrical and System Engineering Digital Signal Processing

Digital Filters - A Basic Primer

A102 Signals and Systems for Hearing and Speech: Final exam answers

RECOMMENDATION ITU-R F *, ** Signal-to-interference protection ratios for various classes of emission in the fixed service below about 30 MHz

LIMITATIONS IN MAKING AUDIO BANDWIDTH MEASUREMENTS IN THE PRESENCE OF SIGNIFICANT OUT-OF-BAND NOISE

Measurements 2: Network Analysis

FREQUENCY RESPONSE AND LATENCY OF MEMS MICROPHONES: THEORY AND PRACTICE

8.2 Common Forms of Noise

Problem Point Value Your score Topic 1 28 Filter Analysis 2 24 Filter Implementation 3 24 Filter Design 4 24 Potpourri Total 100

ELT Receiver Architectures and Signal Processing Fall Mandatory homework exercises

RFID Systems: Radio Architecture

3D Distortion Measurement (DIS)

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #1

Third-Method Narrowband Direct Upconverter for the LF / MF Bands

Orthonormal bases and tilings of the time-frequency plane for music processing Juan M. Vuletich *

Application Note 7. Digital Audio FIR Crossover. Highlights Importing Transducer Response Data FIR Window Functions FIR Approximation Methods

Chapter 3 Data and Signals 3.1

AUDL Final exam page 1/7 Please answer all of the following questions.

1. General Outline Project Proposal April 9, 2014 Kayla Esquivel and Jason Yang

Rec. ITU-R F RECOMMENDATION ITU-R F *,**

Linear Time-Invariant Systems

Equalization. Isolated Pulse Responses

ME scope Application Note 01 The FFT, Leakage, and Windowing

Pre-Lab. Introduction

Frequency Domain Representation of Signals

F I R Filter (Finite Impulse Response)

Keysight Technologies Pulsed Antenna Measurements Using PNA Network Analyzers

Digital Processing of Continuous-Time Signals

ASN Filter Designer Professional/Lite Getting Started Guide

On The Causes And Cures Of Audio Distortion Of Received AM Signals Due To Fading

Transcription:

The Filter Wizard issue 13: Buenos Notches! The Filter Wizard versus the vuvuzela Kendall Castor-Perry When the insistent drone of massed vuvuzela first imposed itself on the world during televised world Cup matches, I thought Huh! Well, they ll soon filter that out. But soon it became clear that removing this narrow-band noise was presenting challenges to broadcast engineers. Figure 1 shows an FFT of a 1.024-second chunk of vuvuzela-dominated crowd noise. Pronounced peaks in the spectrum are at frequencies consistent with what s reported elsewhere: fundamental at ~230Hz, with plenty of harmonics. The third harmonic at ~700Hz is the most prominent component. That s consistent with the buzzy quality of the sound. A single vuvuzela produces a fundamental and harmonics with a narrow occupied bandwidth. Hundreds of them, each played in a unique on-off pattern, will give a broadened spectrum equivalent to a single carrier modulated by a random signal with Gaussian shape. So the elimination problem is more than removing a single tone and its harmonics; we have to suppress several bands of noise. figure 1: FFT of a sample of vuvuzela The starting choice for notching multiple related frequencies out is often a lowpass comb filter. It s a two-tap FIR filter where you add the input signal to a delayed version of itself. For any input frequency at which the delayed term causes a multiple of 180 degrees phase shift, the input and delayed signals cancel out. A deficiency of this method

here is that the resultant notches only occur at odd multiples of the first notch frequency, shown in figure 2. 5dB 0.5*V(sch0) 0dB -5dB -10dB -15dB -20dB -25dB -30dB -35dB -40dB -45dB 0.2KHz 0.4KHz 0.6KHz 0.8KHz 1.0KHz 1.2KHz 1.4KHz 1.6KHz 1.8KHz figure 2: lowpass comb filter In our case, this method leaves the even order harmonic bands unattenuated, and they now stick out like a sore thumb (or should that be a sore throat?), see figure 3. figure 3: lowpass comb only attenuates fundamental and odd harmonics

If you take the difference between input and a delayed signal, you get a highpass comb filter. If we make the delay equal to the period of the fundamental, we get notches at every multiple of the fundamental. We also get a notch at zero frequency, so we ll lose the low-frequency component of the stadium roar. 5dB 0.5*V(ch0,dch0) 0dB -5dB -10dB -15dB -20dB -25dB -30dB -35dB -40dB -45dB 0.2KHz 0.4KHz 0.6KHz 0.8KHz 1.0KHz 1.2KHz 1.4KHz 1.6KHz 1.8KHz figure 4: highpass notch to remove all components figure 5: spectrum after a highpass comb filter

The resulting sound with the highpass comb is lighter because we lost the bass, but there s still a clear, annoying tonal quality to it. The problem is that near the frequencies that we re trying to remove, these cancellation notches are narrow. They are good at getting rid of single tones. But when the offending signal is broadened, they leave behind residuals that still sound like tones. Let s look at proper notch filters. Creating notch filters with single stopbands is part and parcel of the toolbox of the filter designer. Such a filter has two separated passbands, with a stopband sitting in the gap between those passbands. The order of the filter determines how sharp we can make the notch note that this is different from how deep it is. We could address the task of devuvuzalation by designing a notch filter for each of the offending frequency bands, estimating attenuation levels and passband widths from our FFT analysis. We d connect all these filters in series, being careful that the transition bands of the two filters didn t overlap, or we d not get a very satisfactory response between notches. Figure 6 shows a simple example, using the simplest possible notch filter, a 2 nd order biquad. I put eight of them in series, tuned to 230Hz and the first seven harmonics. Because the width of each bulge in the FFT plot is constant on a linear scale, I ve made the Q s of the individual notch transfer functions proportional to centre frequency. figure 6: 2 nd order notch filters in series, for various Qs

The plots show the response with the Q of the fundamental s notch stepped down from 20 to 0.625 in factors of 2. The high Q responses are even narrower than the comb filter responses, while the low Q notches lose us a lot of the (presumably valuable) spectrum between the harmonics. Sure enough, when the high Q value is used, the narrow notches are not enough to remove a significant amount of the energy in the broad bands around the harmonic, while the low Q values suppress the signal between the notches too much. Now, forgive me for my laziness, but I decided not to design eight proper notch filters, each with nice wide stopbands and sharp transitions to the passband, to fix this problem. Certainly, by devoting say an eighth order transfer function to each frequency, we could deliver an impressive filter. But the resulting function would be 64 th order per channel, and would be a handful to implement on any reasonable signal processor. And I really want this filter to be able to run (in stereo) on the processor I m currently working with, the Digital Filter Block in Cypress s new PSoC3/5 family. I reckon I can afford about twenty biquads per channel, so I ll restrict myself to that. Of course, instead of viewing this as a problem of creating multiple notches to remove the interference, we could consider this as a requirement for multiple bandpass filters to pick out the useful bits in between. This doesn t look any easier if we limit ourselves to standard filter design techniques. But there s a class of filters called n-path filters that could be pressed into service. While sampling of a sort is involved with these filters, they can be built in the analogue domain as well. Decades ago, I used them to create stable narrow-band analogue bandpass filters. But and I m sorry to have whetted your appetite again I m not going to design one of those here either. They merit a whole article on their own. Let s look at the problem on the psychoacoustic side. Do we actually need to eliminate the offending frequencies completely? Auditory masking theory suggests that to two tones (or tone-like bands of noise) can only be discriminated if they are different enough in either frequency separation or amplitude ratio. A corollary of this is that if we can flatten the spectrum of the signal (also called whitening ), we can t discern a tonal quality to the content of any frequency band. To do this, we run the signal through a filter whose magnitude response is the reciprocal of the spectrum of the signal itself. In practice, we need to approximate this, to make a realizable filter. Doing it with an FIR filter is feasible, but in my chosen processor I only have 128 taps available, and I can tell that this is way too few to do such a low frequency filter at audio sample rates. One very effective way of doing it is with an IIR-based audio equalizer, either graphic, paragraphic or full parametric. A paragraphic equalizer has bands at fixed frequencies but whose Q can be adjusted to suit the response. Now, it just so happens that for a project at Cypress, I designed an algorithm that forces a paragraphic equalizer s response to pass exactly through a list of frequency response points. Figure 7 shows a smoothed FFT plot of the vuvuzela noise. This was sampled at 115Hz intervals, and inverted to give the required frequency response. Normally an audio paragraphic equalizer would have bands centred on a logarithmic scale, but clearly we ll

be better off with linearly-spaced bands here. I used an equalizer with 20 frequency bands spaced at 115Hz intervals (I think 17 would have been enough). The compensation algorithm calculates both the gain and the Q value of the filter sections. Figure 8 shows the resultant response of the equalizer. -35-36 -37-38 -39-40 -41-42 -43-44 -45-46 -47-48 -49-50 -51-52 -53-54 -55 0 115 230 345 460 575 690 805 920 1035 1150 1265 1380 1495 1610 1725 1840 1955 figure 7: smoothed FFT plot really shows up the vuvuzela bands 10dB V(out20) 9dB 8dB 7dB 6dB 5dB 4dB 3dB 2dB 1dB 0dB -1dB -2dB -3dB -4dB 0.230KHz 0.460KHz 0.690KHz 0.920KHz 1.150KHz 1.380KHz 1.610KHz 1.840KHz figure 8: the response of the paragraphic set up to invert figure 7

The equalizer certainly makes the frequency spectrum of the signal more uniform, see figure 9. I scaled the equalizer gain to make the rms value of the output equal to the input. This means having a loss at some vuvuzela frequencies, but a gain at frequencies in between. Of course, the response is only correct for one particular spectrum. We could contemplate making it dynamically adjustable; the response inversion algorithm can run in real time on the PSoC3. figure 9: equalizer-whitened FFT plot What does it sound like? Well, not bad, on the test file used. There s a clear sense of stadium background noise, but with a much less persistent tonal quality. Sadly, I won t be able to get the implementation on the PSoC3 development kit done in time for the final, a few days away as I write. Still, happy notching! best - Kendall