Implementation of Basic Digital Filter Structures R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2003.

Slides:



Advertisements
Similar presentations
Chapter 15 Infinite Impulse Response (IIR) Filter Implementation
Advertisements

Echo Generation and Simulated Reverberation R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2003.
Digital Signal Processing – Chapter 11 Introduction to the Design of Discrete Filters Prof. Yasser Mostafa Kadah
Real-time Digital Signal Processing with the TMS320C6x
AMI 4622 Digital Signal Processing
FFT-based filtering and the Short-Time Fourier Transform (STFT) R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2003.
Sampling, Reconstruction, and Elementary Digital Filters R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002.
ECEN4002 Spring 2002DSP Lab Intro R. C. Maher1 A Short Introduction to DSP Microprocessor Architecture R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002.
IIR Filters and Equalizers R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002.
Digital Filter Noise Why does the textbook tell us not to use direct form 2? LIGO-G v1 Matt Evans.
6.1 signal flow graph representation of linear constant- coefficient difference equations 6.2 basic structures for IIR system direct forms
Digital Signals and Systems
Lecture 9: Structure for Discrete-Time System XILIANG LUO 2014/11 1.
Unit III FIR Filter Design
Mark Allie comp.dsp Signal to Noise and Numeric Range issues for Direct Form I & II IIR Filters on Modern Analog Devices and TI Digital Signal Processors.
FINITE word length effect in fixed point processing The Digital Signal Processors have finite width of the data bus. The word-length after mathematical.
Chapter 6 Digital Filter Structures
Prof. Brian L. Evans Dept. of Electrical and Computer Engineering The University of Texas at Austin EE445S Real-Time Digital Signal Processing Lab Fall.
DSP Lecture Series DSP Memory Architecture Dr. E.W. Hu Nov. 28, 2000.
Husheng Li, UTK-EECS, Fall  Study how to implement the LTI discrete-time systems.  We first present the block diagram and signal flow graph. 
DISP 2003 Lecture 5 – Part 2 Digital Filters 2 Implementation of FIR Filters IIR Filters Properties, Design and Implementation Philippe Baudrenghien, AB-RF.
DISP 2003 Lecture 6 – Part 2 Digital Filters 4 Coefficient quantization Zero input limit cycle How about using float? Philippe Baudrenghien, AB-RF.
DSP Processors We have seen that the Multiply and Accumulate (MAC) operation is very prevalent in DSP computation computation of energy MA filters AR filters.
Ch.5 Fixed-Point vs. Floating Point. 5.1 Q-format Number Representation on Fixed-Point DSPs 2’s Complement Number –B = b N-1 …b 1 b 0 –Decimal Value D.
EE513 Audio Signals and Systems Complex Oscillator Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Z TRANSFORM AND DFT Z Transform
EEE 503 Digital Signal Processing Lecture #2 : EEE 503 Digital Signal Processing Lecture #2 : Discrete-Time Signals & Systems Dr. Panuthat Boonpramuk Department.
Which one? You have a vector, a[ ], of random integers, which can modern CPUs do faster and why? //find max of vector of random ints max=0; for (inda=0;
Copyright © 2003 Texas Instruments. All rights reserved. DSP C5000 Chapter 15 Infinite Impulse Response (IIR) Filter Implementation.
Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 7: Filter types and structures 1.Some filter types 2.Minimum and maximum phase 3.Filter.
Digital Signal Processing
Digital Filter Realization
Finite Precision Numerical Effects
Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Neural Networks Laboratory Slide 1 DISCRETE SIGNALS AND SYSTEMS.
DEPARTMENTT OF ECE TECHNICAL QUIZ-1 AY Sub Code/Name: EC6502/Principles of digital Signal Processing Topic: Unit 1 & Unit 3 Sem/year: V/III.
Copyright ©2010, ©1999, ©1989 by Pearson Education, Inc. All rights reserved. Discrete-Time Signal Processing, Third Edition Alan V. Oppenheim Ronald W.
Nov '03csDSP61 CS3291: Section 6 IIR discrete time filter design Introduction: Many design techniques for IIR discrete time filters have adopted ideas.
Structures for Discrete-Time Systems 主講人:虞台文. Content Introduction Block Diagram Representation Signal Flow Graph Basic Structure for IIR Systems Transposed.
GROUP MEMBERS ELISHBA KHALID 07-CP-07 TAHIRA SAMEEN 07-CP-31.
Signals and Systems Lecture Filter Structure and Quantization Effects.
Chapter 6 Discrete-Time System. 2/90  Operation of discrete time system 1. Discrete time system where and are multiplier D is delay element Fig. 6-1.
DISP 2003 Lecture 5 – Part 1 Digital Filters 1 Frequency Response Difference Equations FIR versus IIR FIR Filters Properties and Design Philippe Baudrenghien,
Analysis of Linear Time Invariant (LTI) Systems
Real time DSP Professors: Eng. Julian Bruno Eng. Mariano Llamedo Soria.
Real-time Digital Signal Processing Digital Filters.
1 BIEN425 – Lecture 9 By the end of the lecture, you should be able to: –Describe the properties of ideal filters –Describe the linear / logarithm design.
EE 445S Real-Time Digital Signal Processing Lab Fall 2013 Lab 3 IIR Filters Chao Jia Debarati Kundu Andrew Mark.
Application of digital filter in engineering
FINITE word length effect in fixed point processing
Structures for Discrete-Time Systems
Lattice Struture.
EEE4176 Applications of Digital Signal Processing
Discrete-time Systems
FINITE word length effect in fixed point processing
Digital Signal Processors
Quick Review of LTI Systems
لجنة الهندسة الكهربائية
Everything You Ever Wanted to Know About Filters*
The Z-Transform of a given discrete signal, x(n), is given by:
UNIT V Linear Time Invariant Discrete-Time Systems
Quantization in Implementing Systems
Z TRANSFORM AND DFT Z Transform
Chapter 6 Discrete-Time System
DEPARTMENT OF INFORMATION TECHNOLOGY DIGITAL SIGNAL PROCESSING UNIT 4
Tania Stathaki 811b LTI Discrete-Time Systems in Transform Domain Ideal Filters Zero Phase Transfer Functions Linear Phase Transfer.
Zhongguo Liu Biomedical Engineering
DEPARTMENT OF INFORMATION TECHNOLOGY DIGITAL SIGNAL PROCESSING UNIT 4
Chapter 9 Advanced Topics in DSP
Zhongguo Liu Biomedical Engineering
Fixed-point Analysis of Digital Filters
Presentation transcript:

Implementation of Basic Digital Filter Structures R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2003

ECEN4002 Spring 2003Filter Implementation R. C. Maher2 Digital Filters DSP ALUs designed to do fast MACs Use Harvard architecture: place filter state in X memory, filter coefficients in Y memory Try to avoid truncation until after all MACs

ECEN4002 Spring 2003Filter Implementation R. C. Maher3 FIR Filter Review Z -1 + h0h0 h1h1 h2h2 h3h3 x[n] x[n-1] y[n] x[n-2] x[n-3]

ECEN4002 Spring 2003Filter Implementation R. C. Maher4 FIR Setup Modulo N Buffer Memory Filter state (delay line) X Memory Modulo N Buffer Memory Coefficients (delay line) Y Memory Input OutputAccumulator

ECEN4002 Spring 2003Filter Implementation R. C. Maher5 FIR Code for Filter order ‘n’ Input and Output in accumulator ‘a’ r0: samples, r4: coefs, m0 & m4: n-1 movea,x(r0) clrax:(r0)+,x0y:(r4)+,y0 rep#n-1 macx0,y0,ax:(r0)+,x0y:(r4)+,y0 macrx0,y0,a(r0)-

ECEN4002 Spring 2003Filter Implementation R. C. Maher6 IIR Filters IIR (infinite impulse response) filters allow zeros and poles; FIR allow zeros only. IIR can be more selective for a given filter order IIR also called recursive filters: output depends on past inputs and past outputs IIR designs are not guaranteed to be stable IIR filters can be particularly sensitive to coefficient quantization

ECEN4002 Spring 2003Filter Implementation R. C. Maher7 IIR Issues: Stability and Sensitivity Finite precision of coefficients can lead to several issues: –In order to be unconditionally stable and causal, all system poles must be inside the unit circle (|z|<1). Coefficient roundoff may inadvertently move a pole outside unit circle –Finite coefficient precision “quantizes” pole locations: may change frequency response from ideal case even if still stable

ECEN4002 Spring 2003Filter Implementation R. C. Maher8 Overflow Issues Gain from input to storage nodes in the filter may exceed unity. This can cause filter state to be saturated (clipped), resulting in distortion Typically must scale down (attenuate) the input signal, then scale up (amplify) by an equal amount on the output

ECEN4002 Spring 2003Filter Implementation R. C. Maher9 Second-Order Sections High-order filter polynomials involve terms that are products and sums involving many poles and zeros. Small roundoff errors when implementing filter can lead to large response errors As with analog filters, it is typical to reduce sensitivity by using second-order sections

ECEN4002 Spring 2003Filter Implementation R. C. Maher10 Implementing 2 nd Order Sections 2 nd Order (bi-quad) expression Numerator implements 2 zeros, denominator implements 2 poles (real or complex conj.)

ECEN4002 Spring 2003Filter Implementation R. C. Maher11 Direct Form Bi-Quad Z -1 + b0b0 b1b1 b2b2 x[n] x[n-1] y[n] x[n-2] Z -1 -a 1 -a 2 y[n-1] y[n-2]

ECEN4002 Spring 2003Filter Implementation R. C. Maher12 IIR Code for Direct Form II, with equations: w(n)=x(n)-a i1 w(n-1)-a i2 w(n-2) y(n)=w(n)+b i1 w(n-1)+b i2 w(n-2) Since a i1 and b i1 may be > 1, need to divide all coefs by 2, then use special scaling mode for  2 on read from accumulator: ori#$08,MR  sets “scale up”: 1-bit left shift on acc read

ECEN4002 Spring 2003Filter Implementation R. C. Maher13 IIR for (cont.) N = number of second-order sections Filter state (w) in X memory: r0 Filter coefs (a,b) in Y memory: r4 –Coefs stored in order: a 12 /2, a 11 /2, b 12 /2, b 11 /2, a 22 /2, … b N2 /2 –State (data) stored in order: w 1 (n-2), w 1 (n-1), w 2 (n-2), w 2 (n-1), … w N (n-1) m0 = 2*N-1, m4 = 4*N-1 Initial gain in y1, input in y0, output in ‘a’

ECEN4002 Spring 2003Filter Implementation R. C. Maher14 IIR for (cont.) mpyy0,y1,ax:(r0)+,x0y:(r4)+,y0 do#N,end_cell mac-x0,y0,ax:(r0)-,x1y:(r4)+,y0 macr -x1,y0,ax1,x:(r0)+y:(r4)+,y0 macx0,y0,aa,x:(r0)+y:(r4)+,y0 macx1,y0,ax:(r0)+,x0y:(r4)+,y0 end_cell rnd a

ECEN4002 Spring 2003Filter Implementation R. C. Maher15 Other Filter Structures Direct Form I and Direct Form II Cascade and Parallel Realizations Transpose Forms Lattice Forms

ECEN4002 Spring 2003Filter Implementation R. C. Maher16 EVM Note: External Memory To use external memory on EVM, need to program the bus control register and the address attribute register 0 (see Family Manual) movep #$040821,x:M_AAR0;Compare 8 most significant bits ;Look for a match with address ;Y: xxxx xxxx xxxx xxxx ;No pack, no mux, Y enabled ;P and X disabled ;AAR0 pin active low movep #$012421,x:M_BCR ;One ext. wait state Access to external memory is slower than internal memory: wait state stalls processor

ECEN4002 Spring 2003Filter Implementation R. C. Maher17 Conclusion DSP chips (including the DSP563xx) are designed specifically for fast digital filter implementations Care must be taken to ensure that the practical details are addressed: –Coefficient quantization –Overflow and scaling –Computational complexity