0 - 1 © 2010 Texas Instruments Inc Practical Audio Experiments using the TMS320C5505 USB Stick “FIR Filters” Texas Instruments University Programme Teaching.

Slides:



Advertisements
Similar presentations
Digital filters: Design of FIR filters
Advertisements

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Digital sound processing Convolution Digital Filters FFT.
Chapter 14 Finite Impulse Response (FIR) Filters.
0 - 1 © 2010 Texas Instruments Inc Practical Audio Experiments using the TMS320C5505 USB Stick “Sine Waves” Texas Instruments University Programme Teaching.
Filtering Filtering is one of the most widely used complex signal processing operations The system implementing this operation is called a filter A filter.
So far We have introduced the Z transform
Unit 9 IIR Filter Design 1. Introduction The ideal filter Constant gain of at least unity in the pass band Constant gain of zero in the stop band The.
Ideal Filters One of the reasons why we design a filter is to remove disturbances Filter SIGNAL NOISE We discriminate between signal and noise in terms.
LINEAR-PHASE FIR FILTERS DESIGN
0 - 1 © 2007 Texas Instruments Inc, Content developed in partnership with Tel-Aviv University From MATLAB ® and Simulink ® to Real Time with TI DSPs Wavelet.
Chapter 8 FIR Filter Design
DSP Implementation of a 1961 Fender Champ Amplifier James Siegle Advisor: Dr. Thomas L. Stewart March 11, 2003.
EECS 20 Chapter 9 Part 21 Convolution, Impulse Response, Filters Last time we Revisited the impulse function and impulse response Defined the impulse (Dirac.
0 - 1 © 2007 Texas Instruments Inc, Content developed in partnership with Tel-Aviv University From MATLAB ® and Simulink ® to Real Time with TI DSPs Echo.
Professor: Dr Kepuska Presented by Kyle Farnum. Audio Manipulation through utilizing three types of filters: Low-pass filters Band- pass filters High-
AGC DSP AGC DSP Professor A G Constantinides 1 Digital Filter Specifications Only the magnitude approximation problem Four basic types of ideal filters.
EEE422 Signals and Systems Laboratory Filters (FIR) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Systems: Definition Filter
0 - 1 © 2007 Texas Instruments Inc, Content developed in partnership with Tel-Aviv University From MATLAB ® and Simulink ® to Real Time with TI DSPs Measuring.
Finite Impuse Response Filters. Filters A filter is a system that processes a signal in some desired fashion. –A continuous-time signal or continuous.
Lecture 9 FIR and IIR Filter design using Matlab
Digital Signals and Systems
Unit III FIR Filter Design
1 Lecture 2: February 27, 2007 Topics: 2. Linear Phase FIR Digital Filter. Introduction 3. Linear-Phase FIR Digital Filter Design: Window (Windowing)
DSP. What is DSP? DSP: Digital Signal Processing---Using a digital process (e.g., a program running on a microprocessor) to modify a digital representation.
“TMS320C5505 USB Stick Teaching Materials”
6.2 - The power Spectrum of a Digital PAM Signal A digtal PAM signal at the input to a communication channl scale factor (where 2d is the “Euclidean.
MATLAB for Signal Processing The MathWorks Inc. Natick, MA USA Filter Design.
1 BIEN425 – Lecture 10 By the end of the lecture, you should be able to: –Describe the reason and remedy of DFT leakage –Design and implement FIR filters.
Acoustic Noise Cancellation
Copyright © 2003 Texas Instruments. All rights reserved. DSP C5000 Chapter 20 Polyphase FIR Filter Implementation for Communication Systems.
Chapter 7 Finite Impulse Response(FIR) Filter Design
1 Introduction to Digital Filters Filter: A filter is essentially a system or network that selectively changes the wave shape, amplitude/frequency and/or.
FIR Filter Design & Implementation
Copyright 2004 Ken Greenebaum Introduction to Interactive Sound Synthesis Lecture 20:Spectral Filtering Ken Greenebaum.
Digital filters Honza Černocký, ÚPGM. Aliases Numerical filters Discrete systems Discrete-time systems etc. 2.
1 Digital Signal Processing Digital Signal Processing  IIR digital filter structures  Filter design.
Digital Signal Processing
Summary of Widowed Fourier Series Method for Calculating FIR Filter Coefficients Step 1: Specify ‘ideal’ or desired frequency response of filter Step 2:
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: FIR Filters Design of Ideal Lowpass Filters Filter Design Example.
CHAPTER 2: Basic Summary Statistics
DISP 2003 Lecture 5 – Part 1 Digital Filters 1 Frequency Response Difference Equations FIR versus IIR FIR Filters Properties and Design Philippe Baudrenghien,
What is filter ? A filter is a circuit that passes certain frequencies and rejects all others. The passband is the range of frequencies allowed through.
Lecture 09b Finite Impulse Response (FIR) Filters
EEE4176 Application of Digital Signal Processing
Finite Impuse Response Filters. Filters A filter is a system that processes a signal in some desired fashion. –A continuous-time signal or continuous.
Real-time Digital Signal Processing Digital Filters.
XP Practical PC, 3e Chapter 14 1 Recording and Editing Sound.
DSP First, 2/e Lecture 11 FIR Filtering Intro. May 2016 © , JH McClellan & RW Schafer 2 License Info for DSPFirst Slides  This work released.
Professor A G Constantinides 1 Digital Filter Specifications We discuss in this course only the magnitude approximation problem There are four basic types.
Echo and Reverberation
Signal Processing First
Digital Signal Processing
FIR Filter Design Using Neural Network
Lecture 11 FIR Filtering Intro
EEE422 Signals and Systems Laboratory
Lecture 12 Linearity & Time-Invariance Convolution
This chapter provides a series of applications.
ECET 350 Competitive Success/snaptutorial.com
ECET 350 Education for Service-- snaptutorial.com.
ECET 350 Education for Service/tutorialrank.com
ECET 350 Teaching Effectively-- snaptutorial.com.
LINEAR-PHASE FIR FILTERS DESIGN
Lect5 A framework for digital filter design
Ideal Filters One of the reasons why we design a filter is to remove disturbances Filter SIGNAL NOISE We discriminate between signal and noise in terms.
Lecture 16a FIR Filter Design via Windowing
Lab 3 Part III Instructions
Chapter 7 Finite Impulse Response(FIR) Filter Design
CHAPTER 2: Basic Summary Statistics
Chapter 7 Finite Impulse Response(FIR) Filter Design
Presentation transcript:

0 - 1 © 2010 Texas Instruments Inc Practical Audio Experiments using the TMS320C5505 USB Stick “FIR Filters” Texas Instruments University Programme Teaching Materials

Chapter 6 - Slide 2 © 2010 Texas Instruments Inc Finite Impulse Response Filters

Chapter 6 - Slide 3 © 2010 Texas Instruments Inc Introduction Finite Impulse Response (FIR) filters are used for: –Low pass filters –High pass filters –Band pass filters –Band stop filters. They are widely used in Digital Signal Processing (DSP).

Chapter 6 - Slide 4 © 2010 Texas Instruments Inc Objectives To briefly look at a statistical data series on a graph To apply principle this to audio To introduce filter design software tools To run a range of FIR filters on the TMS320C5505 USB stick.

Chapter 6 - Slide 5 © 2010 Texas Instruments Inc Moving Averages

Chapter 6 - Slide 6 © 2010 Texas Instruments Inc Statistical Data Series Before we move on to audio, let us first look at a typical data series on a graph.

Chapter 6 - Slide 7 © 2010 Texas Instruments Inc A Typical Data Series Question: How do we identify the trend?

Chapter 6 - Slide 8 © 2010 Texas Instruments Inc Show Data Trend Answer: Calculate the moving average. Trend Line

Chapter 6 - Slide 9 © 2010 Texas Instruments Inc Mathematics of Moving Average The graph used the moving average of 4 samples. To calculate the moving average: –Add together 4 consecutive inputs –Divide the sum by 4:

Chapter 6 - Slide 10 © 2010 Texas Instruments Inc Moving Average for Audio A moving average can also be applied to audio.

Chapter 6 - Slide 11 © 2010 Texas Instruments Inc Frequency Response of Moving Average The moving average is a low pass digital filter

Chapter 6 - Slide 12 © 2010 Texas Instruments Inc Changing Some Constants This moving average can also be written as: As an experiment, change the sign of two constants: now negative

Chapter 6 - Slide 13 © 2010 Texas Instruments Inc Different Values of Constants The output has changed. Note the delay.

Chapter 6 - Slide 14 © 2010 Texas Instruments Inc New Frequency Response We now have a band pass filter.

Chapter 6 - Slide 15 © 2010 Texas Instruments Inc Summary of Moving Average A moving average is a digital filter There is a delay between the input and the output Change constants to change the frequency response.

Chapter 6 - Slide 16 © 2010 Texas Instruments Inc Finite Impulse Response Filters

Chapter 6 - Slide 17 © 2010 Texas Instruments Inc The FIR Filter The general formula for a FIR filter is: The moving average is a FIR filter with:

Chapter 6 - Slide 18 © 2010 Texas Instruments Inc Block Diagram of FIR Filter

Chapter 6 - Slide 19 © 2010 Texas Instruments Inc FIR Coefficients The terms h(0) to h(N) are called the coefficients. They can be calculated from the Fourier series Typically for a C program they would be stored in a.h file.

Chapter 6 - Slide 20 © 2010 Texas Instruments Inc Impulse Applied to FIR An impulse is commonly used to test filters.

Chapter 6 - Slide 21 © 2010 Texas Instruments Inc Why is the Filter Finite? The output is derived purely from the input. The output is completely gone after N samples, where N is the FIR filter size. Here N = 50. Impulse In FIR Filter Out

Chapter 6 - Slide 22 © 2010 Texas Instruments Inc Implementing FIR Filters

Chapter 6 - Slide 23 © 2010 Texas Instruments Inc Ideal vs. Practical FIR Filter Ideal FIR filter => infinite coefficients. Practical filter design is a compromise. FIR Filter 10 coefficients Practical FIR Filter 10 coefficients Ideal Filter

Chapter 6 - Slide 24 © 2010 Texas Instruments Inc Using Window Functions A window function modifies coefficients to approximate an infinite series.

Chapter 6 - Slide 25 © 2010 Texas Instruments Inc Window Types Some commonly used window functions are: –Rectangular (simple truncation of infinite series) –Hamming –Hanning (or von Hann) –Blackman –Kaiser.

Chapter 6 - Slide 26 © 2010 Texas Instruments Inc Rectangular vs. Hamming Window FIR Filter 5000Hz 50 coefficients Rectangular Window FIR Filter 5000Hz 50 coefficients Hamming Window -50dB Better

Chapter 6 - Slide 27 © 2010 Texas Instruments Inc Filter Design using Matlab

Chapter 6 - Slide 28 © 2010 Texas Instruments Inc Filter Design Toolbox

Chapter 6 - Slide 29 © 2010 Texas Instruments Inc Generation of Coefficients Matlab can export filter coefficients as a.h file.

Chapter 6 - Slide 30 © 2010 Texas Instruments Inc Web Based Filter Design Software

Chapter 6 - Slide 31 © 2010 Texas Instruments Inc Free Online Software A free online filter design package is available at:

Chapter 6 - Slide 32 © 2010 Texas Instruments Inc Free Software Output Supports low pass, band pass and high pass filters.

Chapter 6 - Slide 33 © 2010 Texas Instruments Inc Filter Output Coefficients Filter coefficients are in floating-point format.

Chapter 6 - Slide 34 © 2010 Texas Instruments Inc Converting to Fixed-Point Coefficients lie in the range to To convert them to fixed-point, multiply each by then round to nearest integer.

Chapter 6 - Slide 35 © 2010 Texas Instruments Inc C Code Implementation of FIR A simple FIR implementation in C:

Chapter 6 - Slide 36 © 2010 Texas Instruments Inc Introduction to Laboratory

Chapter 6 - Slide 37 © 2010 Texas Instruments Inc Setup for TMS320C5505 USB to PC Headphones CD Player USB Stick

Chapter 6 - Slide 38 © 2010 Texas Instruments Inc Installing the Application Use the code given in Application 6 FIR Filters. Follow the steps previously given in Chapter 1 to set up the new project.

Chapter 6 - Slide 39 © 2010 Texas Instruments Inc Create New CCS Project

Chapter 6 - Slide 40 © 2010 Texas Instruments Inc Files Used in Project

Chapter 6 - Slide 41 © 2010 Texas Instruments Inc Filter Coefficients Filter coefficients are contained in the four #include files starting at “hamming.h”:

Chapter 6 - Slide 42 © 2010 Texas Instruments Inc About the Program Contains a series of FIR filters. Divides music into bass and treble at different crossover frequencies: –Low pass filter puts bass on left-hand headphone. –High pass filter puts treble on right-hand headphone.

Chapter 6 - Slide 43 © 2010 Texas Instruments Inc Experiments

Chapter 6 - Slide 44 © 2010 Texas Instruments Inc Sampling Rates Run the same filters but at a lower sampling rate, for example Hz. How does this affect the frequencies of the filters?

Chapter 6 - Slide 45 © 2010 Texas Instruments Inc Using New Filter Coefficients You can design your own filter coefficients using Matlab FDATool or the Web-based tool discussed earlier. New coefficients can be added to a new.h file. You will need to #include this.h file in your project.

Chapter 6 - Slide 46 © 2010 Texas Instruments Inc Bass Middle and Treble Design a series of filters so you can work out at what frequency the transition occurs between: –bass and mid range –mid range and treble. Clue: the frequencies are lower than you might first think.

Chapter 6 - Slide 47 © 2010 Texas Instruments Inc Questions The filters are called Finite Impulse Response filters. Why is the word “finite” used? What is a “window” function as applied to a digital filter? How can a window function be used to improve the performance of the filter? How are filter coefficients calculated?

Chapter 6 - Slide 48 © 2010 Texas Instruments Inc References Digital Signal Processing, A Practical Approach by Emmanuel C. Ifeachor and Barrie W. Jervis. ISBN Digital Signal Processing with C and the TMS320C30 by Rulph Chassaing. ISBN