APPLIED SIGNAL PROCESSING

Similar documents
Discrete-time signals and systems

EE 521: Instrumentation and Measurements

Digital Signal Processing

UNIVERSITY OF OSLO. Faculty of mathematics and natural sciences. Forslag til fasit, versjon-01: Problem 1 Signals and systems.

Digital Signal Processing Lecture 8 - Filter Design - IIR

Lecture 7 Discrete Systems

EE482: Digital Signal Processing Applications

Digital Signal Processing Lecture 10 - Discrete Fourier Transform

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EC2314- DIGITAL SIGNAL PROCESSING UNIT I INTRODUCTION PART A

DIGITAL SIGNAL PROCESSING. Chapter 6 IIR Filter Design

Multimedia Signals and Systems - Audio and Video. Signal, Image, Video Processing Review-Introduction, MP3 and MPEG2

Lecture 19 IIR Filters

! Circular Convolution. " Linear convolution with circular convolution. ! Discrete Fourier Transform. " Linear convolution through circular

Digital Signal Processing Lecture 9 - Design of Digital Filters - FIR

Digital Filters Ying Sun

Chap 2. Discrete-Time Signals and Systems

Contents. Digital Signal Processing, Part II: Power Spectrum Estimation

Signals and Systems. Problem Set: The z-transform and DT Fourier Transform

Convolution. Define a mathematical operation on discrete-time signals called convolution, represented by *. Given two discrete-time signals x 1, x 2,

Introduction to Digital Signal Processing

/ (2π) X(e jω ) dω. 4. An 8 point sequence is given by x(n) = {2,2,2,2,1,1,1,1}. Compute 8 point DFT of x(n) by

ECSE 512 Digital Signal Processing I Fall 2010 FINAL EXAMINATION

Analog vs. discrete signals

Digital Control & Digital Filters. Lectures 21 & 22

INFINITE-IMPULSE RESPONSE DIGITAL FILTERS Classical analog filters and their conversion to digital filters 4. THE BUTTERWORTH ANALOG FILTER

Like bilateral Laplace transforms, ROC must be used to determine a unique inverse z-transform.

UNIVERSITI SAINS MALAYSIA. EEE 512/4 Advanced Digital Signal and Image Processing

Review of Discrete-Time System

ELEG 305: Digital Signal Processing

Stability Condition in Terms of the Pole Locations

Transform Analysis of Linear Time-Invariant Systems

Lecture 16: Filter Design: Impulse Invariance and Bilinear Transform

Discrete-Time Systems

EE 225D LECTURE ON DIGITAL FILTERS. University of California Berkeley

EE482: Digital Signal Processing Applications

Analog and Digital Filter Design

DSP Configurations. responded with: thus the system function for this filter would be

Discrete-Time David Johns and Ken Martin University of Toronto

ECE 410 DIGITAL SIGNAL PROCESSING D. Munson University of Illinois Chapter 12

DIGITAL SIGNAL PROCESSING UNIT III INFINITE IMPULSE RESPONSE DIGITAL FILTERS. 3.6 Design of Digital Filter using Digital to Digital

Digital Signal Processing Lecture 5

Digital Signal Processing Lecture 3 - Discrete-Time Systems

Digital Signal Processing IIR Filter Design via Bilinear Transform

University of Illinois at Urbana-Champaign ECE 310: Digital Signal Processing

Discrete-Time Fourier Transform (DTFT)

Filter structures ELEC-E5410

Introduction to DSP Time Domain Representation of Signals and Systems

Lecture 2 OKAN UNIVERSITY FACULTY OF ENGINEERING AND ARCHITECTURE

Question Bank. UNIT 1 Part-A

UNIT - III PART A. 2. Mention any two techniques for digitizing the transfer function of an analog filter?

Discrete-Time Signals and Systems

Optimal Design of Real and Complex Minimum Phase Digital FIR Filters

E : Lecture 1 Introduction

Discrete Time Systems

Lecture 7 - IIR Filters

DFT & Fast Fourier Transform PART-A. 7. Calculate the number of multiplications needed in the calculation of DFT and FFT with 64 point sequence.

Chapter 7: IIR Filter Design Techniques

INF3440/INF4440. Design of digital filters

Multirate signal processing

Lecture 9 Infinite Impulse Response Filters

Recursive, Infinite Impulse Response (IIR) Digital Filters:

# FIR. [ ] = b k. # [ ]x[ n " k] [ ] = h k. x[ n] = Ae j" e j# ˆ n Complex exponential input. [ ]Ae j" e j ˆ. ˆ )Ae j# e j ˆ. y n. y n.

Design of IIR filters

butter butter Purpose Syntax Description Digital Domain Analog Domain

DEPARTMENT OF EI DIGITAL SIGNAL PROCESSING ASSIGNMENT 1

Frequency-Domain C/S of LTI Systems

LECTURE NOTES DIGITAL SIGNAL PROCESSING III B.TECH II SEMESTER (JNTUK R 13)

Lecture 3 - Design of Digital Filters

( ) John A. Quinn Lecture. ESE 531: Digital Signal Processing. Lecture Outline. Frequency Response of LTI System. Example: Zero on Real Axis

Discrete Time Fourier Transform (DTFT)

Digital Signal Processing Lecture 4

Lecture 11 FIR Filters

Z - Transform. It offers the techniques for digital filter design and frequency analysis of digital signals.

UNIVERSITY OF OSLO. Please make sure that your copy of the problem set is complete before you attempt to answer anything.

Ch. 7: Z-transform Reading

PS403 - Digital Signal processing

! Introduction. ! Discrete Time Signals & Systems. ! Z-Transform. ! Inverse Z-Transform. ! Sampling of Continuous Time Signals

ECE 308 Discrete-Time Signals and Systems

ESE 531: Digital Signal Processing

x[n] = x a (nt ) x a (t)e jωt dt while the discrete time signal x[n] has the discrete-time Fourier transform x[n]e jωn

z-transforms Definition of the z-transform Chapter

DSP-CIS. Chapter-4: FIR & IIR Filter Design. Marc Moonen

ELEG 305: Digital Signal Processing

EEL3135: Homework #4

Review of Fundamentals of Digital Signal Processing

Transform analysis of LTI systems Oppenheim and Schafer, Second edition pp For LTI systems we can write

Discrete Time Systems

Filter Analysis and Design

Optimum Ordering and Pole-Zero Pairing of the Cascade Form IIR. Digital Filter

Examination with solution suggestions SSY130 Applied Signal Processing

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science Discrete-Time Signal Processing Fall 2005

Digital Signal Processing. Midterm 1 Solution

IT DIGITAL SIGNAL PROCESSING (2013 regulation) UNIT-1 SIGNALS AND SYSTEMS PART-A

Filters and Tuned Amplifiers

EEO 401 Digital Signal Processing Prof. Mark Fowler

Let H(z) = P(z)/Q(z) be the system function of a rational form. Let us represent both P(z) and Q(z) as polynomials of z (not z -1 )

-Digital Signal Processing- FIR Filter Design. Lecture May-16

How to manipulate Frequencies in Discrete-time Domain? Two Main Approaches

Definition. A signal is a sequence of numbers. sequence is also referred to as being in l 1 (Z), or just in l 1. A sequence {x(n)} satisfying

FINITE PRECISION EFFECTS 1. FLOATING POINT VERSUS FIXED POINT 3. TYPES OF FINITE PRECISION EFFECTS 4. FACTORS INFLUENCING FINITE PRECISION EFFECTS

Transcription:

APPLIED SIGNAL PROCESSING

DIGITAL FILTERS Digital filters are discrete-time linear systems { x[n] } G { y[n] } Impulse response: y[n] = h[0]x[n] + h[1]x[n 1] + 2

DIGITAL FILTER TYPES FIR (Finite Impulse Response) filters - have finite memory; output depends only on a finite number of inputs - modeled by (weighted) moving average models y[n] = h[0]x[n]+h[1]x[n 1]+ +h[n 1]x[n+1 N] IIR (Infinite Impulse Response) filters - have infinite memory; output depends on an infinite number of (past) inputs - modeled by difference equations y[n] + a 1 y[n 1] + + a N y[n N] = = b 0 x[n] + b 1 x[n 1] + + b M x[n M] 3

SIMPLE EXAMPLE OF IIR FILTER First-order filter y[n] ay[n 1] = bx[n] y[n] = ay[n 1] + bx[n] = a 2 y[n 2] + abx[n 1] + bx[n] = a 3 y[n 3] + a 2 bx[n 2] + abx[n 1] + bx[n]. = bx[n] + abx[n 1] + a 2 bx[n 2] + + a k bx[n k] + 4

PROS AND CONS FIR filters: + In general less sensitive to round-off errors, always stable + Straightforward to achieve linear phase property - High filter order (many taps) may be required to achieve filter specs - FIR filters exist only in the digital world: only IIR analogue filters can be constructed 5

IIR filters: + More flexible than FIR: given filter specs can be achieved with a simpler IIR filter, with fewer parameters than corresponding FIR filter - Feedback from past filter outputs may give sensitivity to round-off errors, or even stability problems - Linear phase properties can be achieved only approximately 6

FREQUENCY RESPONSE OF FILTERS { x[n] } G { y[n] } For input the output is x[n] = cos(ωn) y[n] = A(ω) cos(ωn + ϕ(ω)) A(ω): filter gain or magnitude ϕ(ω): filter phase 7

Reason: the output can always be written as y[n] = h[0] cos(ωn) + h[1] cos(ωn ω) + + h[k] cos(ωn ωk) + = A(ω) cos(ωn + ϕ(ω)) The functions A(ω), ϕ(ω) form the frequency response of a filter Matlab routine: freqz(b,a,w) where B= [b 0 a 2... b M ], B= [1 a 1 a 2... a N ], W: vector with frequencies (if specified) 8

Low-pass filter specs: 1.2 1 0.8 0.6 0.4 0.2 0 0 0.1 0.2 0.3 0.4 0.5 - maximum deviation in passband, 1 δ p A(f) 1 + δ p - damping in stopband, A(f) δ s - width of transition band (normalized) 9

Filter specs often defined in db units: - maximum deviation in passband: A p = 20 log(1 + δ p ) (db) Note: A p 8.7δ p for small δ p - damping in stopband: A s = 20 log δ s (db) 10

LINEAR PHASE FILTERS Observation: distortion. Phase shift in passband may cause signal Linear phase property: All frequencies in passband delayed by the same time { x[n] } G { y[n] } For input x[n] = cos(ωn) we have the output y[n] = A(ω) cos(ωn + ϕ(ω)) To avoid phase distortion we require that y[n] = A(ω) cos(ω(n τ)) 11

in passband. This is achieved if the filter gives phase phase shift ϕ(ω) = ω τ PHASE SHOULD BE A LINEAR FUNCTION OF FREQUENCY IN PASSBAND! Linear phase property can be achieved with symmetric FIR filters Linear property can be achieved only approximately with IIR filters 12

LINEAR PHASE FIR FILTERS Linear phase property is achieved by symmetric FIR filters: y[n] = h[0]x[n] + h[1]x[n 1] + +h[1]x[n + 2 N] + h[0]x[n + 1 N], n = 0, 1, 2,..., M where h[k] = h[n 1 k], k = 0, 1,..., N 1 For input x[n] = cos(ωn) the output is y[n] = A(ω) cos(ωn ω(n 1)/2) = A(ω) cos(ω(n (N 1)/2)) Each frequency component delayed by (N 1)/2 time steps. 13

REASON: Pairwise combination of terms k and N 1 k gives ( ) h[k] x[n k] + x[n + 1 N + k] = ( ) = h[k] cos(ω(n k)) + cos(ω(n + 1 N + k)) ( = h[k] where we have used cos(ω(n N 1 ) + ω( N 1 2 2 + cos(ω(n N 1 ) ω( N 1 2 2 = h[k]2 cos(ω( N 1 2 ) k)) k)) k)) cos(ω(n N 1 )) 2 cos(α ± β) = cos α cos β sin α sin β 14

IIR FILTER PROTOTYPES Good filter performance requires a sufficiently long memory in order to allow distinct response to different frequency components. In FIR filters this implies a large number of taps. IIR filters have infinite memory due to recursiveness simpler filter for given magnitude performance specifications Standard IIR filters: - Butterworth - Chebyshev - Elliptic 15

Butterworth filters Digital low-pass Butterworth filter with cut-off frequency ω c = 2πf c has frequency response magnitude B N (e jω ) = [ 1 1 + [tan(ω/2)/ tan(ω c /2)] 2N ] 1/2 - monotonically varying gain in both passband and stopband Matlab routines: [B,A]=butter(N,Wn, ftype ) designs filter [N,Wn]=buttord(Wp,Ws,Rp,Rs) computes required minimum order 16

Chebyshev filters Chebyshev filter type I has equiripple gain in passband and monotonically varying gain in stopband. Chebyshev filter type II has monotonically varying gain in passband and equiripple gain in stopband. 17

Elliptic filters Equiripple frequency response in both passband and stopband Achieve a given set of magnitude specifications with the lowest frequency order However, elliptic filters have less linear phase response the the passband than Butterworth or Chebyshev filters 18

COMPUTATION OF FILTER OUTPUT Difference equation y[n] + a 1 y[n 1] + + a N y[n N] = = b 0 x[n] + b 1 x[n 1] + + b M x[n M] can be computed using Matlab routine y = filter(b,a,x) where x: input sequence, B = [ b 0 b 1 b M ] and A = [ 1 a 1 a 2 a N ] 19

FILTER IMPLEMENTATION IMPLEMENTATION OF FIR FILTERS The operation y[n] = h[0]x[n]+h[1]x[n 1]+ +h[n 1]x[n+1 N], n = 0, 1, 2,..., M is a convolution between the impulse response sequence {h[k]} = {h[0], h[1],..., h[n 1]} and the input sequence {x[n]} = {x[0], x[1],..., x[m 1]} Often denoted as {y[n]} = {h[k]} {x[n]} 20

Computational burden: calculation of output sequence requires NM flops Example: Filter length N = 1000, sequence length M = 10000 requires 10 million flops Efficient software for DSPs exist In Matlab: y = conv(h,x) or y = filter(h,1,x) (cf. above) 21

FFT CONVOLUTION ( high-speed convolution ) IMPORTANT PROPERTY: Convolution corresponds to polynomial multiplication: If we define the polynomials Y (z) = y[0] + y[1]z 1 + + y[m 1]z M+1 X(z) = x[0] + x[1]z 1 + + x[m 1]z M+1 H(z) = h[0] + h[1]z 1 + + h[n 1]z N+1 22

then we see that ( ) H(z)X(z) = h[0]x[0] + h[0]x[1] + h[1]x[0] z 1 + ( ) + h[0]x[n] + h[1]x[n 1] + + h[n 1]x(n + 1 N] z n + = y[0] + y[1]z 1 + + y[m 1]z M+1 = Y (z) the convolution {y[n]} = {h[k]} {x[n]} can be represented as Y (z) = H(z)X(z) X(z): z-transform of sequence {x[n]} Y (z): z-transform of sequence {y[n]} H(z): transfer function of the system having impulse response h[0], h[1],... 23

Relation between convolution and polynomial multiplication leads to an efficient implementation of convolution FFT CONVOLUTION ( high-speed convolution ) The Fourier transform of {x[n]} is precisely a polynomial in z = e j2π/n. Recall the Fourier transform of {x[n]}: X[k] = x[0] + x[1]e j2πk/m + + x[m 1]e j2π(m 1)k/M = x[0] + x[1]e j2πk/m + + x[m 1] Comparison with X(z) shows that: X[k] = X(z k ), z k = e j2πk/m (e j2πk/m) M 1 Hence X[k] evaluates X(z) at M points z k, k = 0, 1,..., M 1 24

Hence we can compute the convolution as follows: 1. Compute FFT X[k] of sequence {x[n]}. Then X[k] = X(z), z = e j2πk/m. 2. Compute FFT H[k] of sequence {h[n]}. Use zero padding to obtain sequences of the same length. Then H[k] = H(z), z = e j2πk/n. 3. Compute Y [k] as the element-wise product Y [k] = H[k]X[k]. Then Y [k] = Y (z), z = e j2πk/m. 4. Compute inverse Fourier transform {y[n]} of {Y [k]}. Then {y[n]} is the convolution {y[n]} = {h[k]} {x[n]} 25

IMPLEMENTATION OF IIR FILTERS Recursive structure: y[n] = a 1 y[n 1] + + a N y[n N] = = b 0 x[n] + b 1 x[n 1] + + b M x[n M] Makes IIR filters sensitive to round-off errors if implemented naively! IIR FILTERS SHOULD ALWAYS BE IMPLEMENTED AS A CASCADE STRUCTURE CONSISTING OF A SERIES COUPLING OF SECOND ORDER SYSTEMS (SOS): Y (z) = H(z)X(z) = H L (z) H L 1 (z) H 1 (z)x(z) 26

or Y 1 (z) = H 1 (z)x(z) Y 2 (z) = H 2 (z)y 1 (z). Y (z) = H L (z)y L 1 (z) where H k (z) are second-order systems: H 1 (z) : y 1 [n] + a 11 y 1 [n 1] + a 12 y 1 [n 2] = b 10 x[n] + b 11 x[n 1] H 2 (z) : y 2 [n] + a 21 y 2 [n 1] + a 22 y 2 [n 2] = b 20 y 1 [n] + b 21 y 1 [n 1]. H k (z) : y k [n] + a k1 y k [n 1] + a k2 y k [n 2] = b k0 y k 1 [n] + b k1 y k 1 [n 1]. H L (z) : y L [n] + a L1 y L [n 1] + a L2 y L [n 2] = b L0 y L 1 [n] + b L1 y L 1 [n 1] 27