b) discrete-time iv) aperiodic (finite energy)

Similar documents
ECE 421 Introduction to Signal Processing Project 1 - Solutions

EE 464 Short-Time Fourier Transform Fall and Spectrogram. Many signals of importance have spectral content that

ECE 421 Introduction to Signal Processing

The University of Texas at Austin Dept. of Electrical and Computer Engineering Final Exam

Lecture 17 z-transforms 2

EE 470 Signals and Systems

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

ECE 429 / 529 Digital Signal Processing

Signals. Continuous valued or discrete valued Can the signal take any value or only discrete values?

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

16.30 Learning Objectives and Practice Problems - - Lectures 16 through 20


CDS 101/110: Lecture 9.1 Frequency DomainLoop Shaping

CDS 101/110: Lecture 8.2 PID Control

Signals and Systems Using MATLAB

Digital Filters IIR (& Their Corresponding Analog Filters) Week Date Lecture Title

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

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

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

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

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

1.5 The voltage V is given as V=RI, where R and I are resistance matrix and I current vector. Evaluate V given that

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

2.1 BASIC CONCEPTS Basic Operations on Signals Time Shifting. Figure 2.2 Time shifting of a signal. Time Reversal.

Microphonics. T. Powers

Team proposals are due tomorrow at 6PM Homework 4 is due next thur. Proposal presentations are next mon in 1311EECS.

Concordia University. Discrete-Time Signal Processing. Lab Manual (ELEC442) Dr. Wei-Ping Zhu

Problem Point Value Your score Topic 1 28 Discrete-Time Filter Analysis 2 24 Upconversion 3 30 Filter Design 4 18 Potpourri Total 100

y(n)= Aa n u(n)+bu(n) b m sin(2πmt)= b 1 sin(2πt)+b 2 sin(4πt)+b 3 sin(6πt)+ m=1 x(t)= x = 2 ( b b b b

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY DIGITAL SIGNAL PROCESSING UNIT 3

Introduction to Signals and Systems Lecture #9 - Frequency Response. Guillaume Drion Academic year

GATE 2014 QUESTION PAPERS EC: Electronics & Communications Engineering - 16th February 2014 (Morning)

1 PeZ: Introduction. 1.1 Controls for PeZ using pezdemo. Lab 15b: FIR Filter Design and PeZ: The z, n, and O! Domains

EEM478-DSPHARDWARE. WEEK12:FIR & IIR Filter Design

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

ECE503: Digital Filter Design Lecture 9

Homework Assignment Consider the circuit shown. Assume ideal op-amp behavior. Which statement below is true?

Digital Filtering: Realization

Discrete-Time Signal Processing (DTSP) v14

4. Design of Discrete-Time Filters

UNIT II IIR FILTER DESIGN

Design of FIR Filters

Continuous-Time Analog Filters

Advanced Digital Signal Processing Part 5: Digital Filters

SECTION 4: TRANSMISSION LINES. ESE 470 Energy Distribution Systems

Digital Processing of Continuous-Time Signals

Automatic Control Motion control Advanced control techniques

GATE 2014: General Instructions during Examination

Final Exam Practice Questions for Music 421, with Solutions

Digital Signal Processing

Adaptive Filters Application of Linear Prediction

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

Power Spectral Density and Hilbert Transform

Final Exam Solutions June 7, 2004

Digital Processing of

Experiment 4- Finite Impulse Response Filters

System analysis and signal processing

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

EE 422G - Signals and Systems Laboratory

The performance of AM and FM receivers. Editor: Xuanfeng Li Teacher: Prof. Xiliang Luo

FUNDAMENTALS OF SIGNALS AND SYSTEMS

Lab #2: Electrical Measurements II AC Circuits and Capacitors, Inductors, Oscillators and Filters

ELECTRONOTES APPLICATION NOTE NO Hanshaw Road Ithaca, NY August 3, 2017

Bibliography. Practical Signal Processing and Its Applications Downloaded from

GATE 2014: General Instructions during Examination

Digital Video and Audio Processing. Winter term 2002/ 2003 Computer-based exercises

(i) Understanding the basic concepts of signal modeling, correlation, maximum likelihood estimation, least squares and iterative numerical methods

F I R Filter (Finite Impulse Response)

Digital Signal Processing

ijdsp Workshop: Exercise 2012 DSP Exercise Objectives

Diode Circuits Recent GATE Problems

Digital Filters FIR and IIR Systems

Basic Signals and Systems

Homework Assignment 09

ECE 5650/4650 Exam II November 20, 2018 Name:

Copyright S. K. Mitra

Brief Introduction to Signals & Systems. Phani Chavali


PATCH ANTENNA DESIGN

ANGLE MODULATION. U1. PHASE AND FREQUENCY MODULATION For angle modulation, the modulated carrier is represented by

Lecture 3 Review of Signals and Systems: Part 2. EE4900/EE6720 Digital Communications

Digital Signal Processing

Problem Point Value Your score Topic 1 28 Discrete-Time Filter Analysis 2 24 Improving Signal Quality 3 24 Filter Bank Design 4 24 Potpourri Total 100

Understanding Digital Signal Processing

8: IIR Filter Transformations

Chapter 2. Fourier Series & Fourier Transform. Updated:2/11/15

Studying Noise Contributions in Nonlinear Vector Network Analyzer (NVNA) Measurements

Outline. Discrete time signals. Impulse sampling z-transform Frequency response Stability INF4420. Jørgen Andreas Michaelsen Spring / 37 2 / 37

EECS 452 Practice Midterm Exam Solutions Fall 2014

Multirate Digital Signal Processing

Module 9 AUDIO CODING. Version 2 ECE IIT, Kharagpur

B.Tech III Year II Semester (R13) Regular & Supplementary Examinations May/June 2017 DIGITAL SIGNAL PROCESSING (Common to ECE and EIE)

Lab S-9: Interference Removal from Electro-Cardiogram (ECG) Signals

EE3079 Experiment: Chaos in nonlinear systems

Summer Homework. Trace each number. Count to 10. Complete the picture. Tell a story about your picture..

Instruction Manual for Concept Simulators. Signals and Systems. M. J. Roberts

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

8.0 Overview 8.1 The frequency response for a stable system

Experiment 2 Effects of Filtering

If You Give A Mouse A Letter He ll Want The Whole Alphabet By

Transcription:

EE 464 Frequency Analysis of Signals and Systems Fall 2018 Read Text, Chapter. Study suggestion: Use Matlab to plot several of the signals and their DTFT in the examples to follow. Some types of signal and Fourier analysis a) continuous-time (analog) i) periodic (infinite energy) ii) aperiodic (finite energy) Fourier series Fourier transform xx(tt) = cc nn ee jj2ππππππ TT nn= XX(ff) = xx(tt)ee jj2ππππππ dddd TT 0 cc nn = 1 TT xx(tt)ee jj2ππππππ TT dddd xx(tt) = XX(ff)ee jj2ππππππ dddd b) discrete-time iii) periodic discrete-time Fourier series iv) aperiodic (finite energy) discrete-time Fourier transform 1

Discrete-Time Fourier Transform (DTFT) XX(ff) = xx(nn)ee jj2ππππππtt nn= = XX ee jj2ππππtt Here, ff is frequency in Hertz, and the DTFT is periodic in ff with period 1 TT. Note: In lecture, homework, notes, tests, etc., the notation XX ee jj2ππππtt will usually be used (to clearly distinguish between the Fourier transform of an analog signal and the DTFT of a discrete-time signal). The inverse DTFT is given by 1 2TT xx(nn) = TT XX ee jj2ππππππ ee jj2ππππππππ dddd 1 2TT (Set T = 1 in the expression if using normalized frequency.) 2

Four expressions for DTFT all equivalent, but using different frequency variables. XX ee jjjj = xx(nn)ee jjjjjj, (1) nn= ωω is in units of normalized frequency, radians/sample, and XX ee jjjj is periodic 2ππ in ωω. XX ee jjjjjj = xx(nn)ee jjjjjjjj, (2) nn= ωω in units of frequency, radians/sec, and XX ee jjjjjj is periodic 2ππ TT in ωω. XX ee jj2ππππ = xx(nn)ee jj2ππππππ, (3) nn= ff is in units of normalized frequency, cycles/sample, and XX ee jj2ππππ is periodic 1 in ff. XX ee jj2ππππππ = xx(nn)ee jj2ππππππππ, nn= (4) ff is in units of frequency, cycles/sec (Hertz), and XX ee jj2ππππππ is periodic 1 in ff. TT 3

Example 1. Find the DTFT of xx(nn) = αα nn uu(nn), αα < 1. Plot XX ee jj2ππππtt for real-valued 0 < αα < 1. Modify to units of rad/s. Relate to the Fourier transform of an analog signal xx aa (tt) = ee ββββ uu(tt), sampled at the rate 1 samples/sec. Plot XX TT aa(ff) and relate to XX ee jj2ππππππ. 4

Specific case: xx aa (tt) = ee 2tt uu(tt) FF XX aa (ff) = 1 2+jj2ππππ. Select the sampling rate as 1 TT = 8 Hz. Then ee 2TT = αα 0.78 The DTFT of xx(nn) = xx aa (nnnn) = ee 2nnnn uu(nnnn) = αα nn uu(nn) is XX ee jj2ππππππ = XX ee jj2ππππππ = 1 ααee 1 jj2ππππππ with 1 1 2αα cos(2ππππππ)+αα 2. Note that XX ee jj2ππππππ is periodic with period 1 = 8 Hz. The TT difference between the two curves is due to aliasing. Note also the scaling of XX aa (ff) by 1 in the figure. TT 5

Low Frequency and High Frequency Since the DTFT is periodic in frequency, normally low frequency is zero, and high frequency is one-half the period (that is, one-half the sampling frequency). Example. Assume a normalized frequency (cycles/sample, or equivalently, TT = 1). For xx(nn) = αα nn uu(nn), αα < 1, the DTFT was found to be XX ee jj2ππππ = 1 ααee 1 jj2ππππ for the normalized frequency variable ff in units of cycles/sample. Then high frequency is 1 2 cycles/sample. Alternatively, using the frequency variable ff in units of Hz, then XX ee jj2ππππππ 1 1 = 1 ααee jj2ππππππ, and high frequency is Hz. 2TT 6

Existence of the DTFT. Since the DTFT is a special case of the ZZ-transform, where zz is on the unit circle, the DTFT exists whenever the ZZtransform ROC contains the unit circle. All BIBO stable LTI systems have ROC containing the unit circle, implying the DTFT of the impulse response must exist. HH ee jj2ππππππ = DTFT{h(nn)} is the frequency response of a stable LTI system. 7

Example. A LTI system has impulse response h(nn) = 1 2, 1 2. Determine the transfer function, HH(zz), and the DTFT HH ee jj2ππππtt. Plot HH ee jj2ππππtt. Relate the dc gain and the high-frequency gain to the impulse response and to HH(zz). Repeat for a LTI system with impulse response gg(nn) = 1 2, 1 2. 8

Useful Facts and Properties Let xx(nn) have DTFT XX ee jj2ππππππ = Write in magnitude/phase form: XX ee jj2ππππππ = XX ee jj2ππππππ ee jjjj(ff) where θθ(ff) = tan 1 IIII XX eejj2ππππππ RRRR XX ee jj2ππππππ. nn= xx(nn)ee jj2ππππππππ. 1. The only causal signal with θθ(ff) = 0 for all ff (that is, zero phase) is xx(nn) = AAAA(nn). Hence, the only zerophase causal filter is the simple scaling filter. That is, h(nn) = AAAA(nn), with a system input-output description is yy(nn) = AAAA(nn). This is also a (trivial) all-pass filter. 9

2. A (non-causal) real-valued signal can have zero phase if xx(nn) = xx( nn) for all nn. Proof. Write out XX ee jj2ππππππ : XX ee jj2ππππππ = xx(nn)ee jj2ππππππππ nn= = xx(0) + xx(1)ee jj2ππππ1tt + xx( 1)ee jj2ππππ( 1)TT + xx(2)ee jj2ππππ2tt + xx( 2)ee jj2ππππ( 2)TT + XX ee jj2ππππππ XX ee jj2ππππππ Hence, the phase of XX ee jj2ππππππ is = xx(0) + xx(1) ee jj2ππππππ + ee jj2ππππππ + xx(2) ee jj2ππππ2tt + ee jj2ππππ2tt + = xx(0) + xx(1)[2 cos(2ππππππ)] + xx(2)[2 cos(4ππππππ)] + = real valued function of ff θθ(ff) = tan 1 Im XX eejj2ππππππ Re{XX(ee jj2ππππππ )} = tan 1 0 Re{XX(ee jj2ππππππ = 0, )} 10

provided Re XX ee jj2ππππππ > 0. So, a symmetric signal, xx(nn) = xx( nn) implies zero phase. Example. The signal h(nn) =,0, 1,2, 6, 2, 1,0, has zero phase. The DTFT is evaluated as HH ee jj2ππππππ = 6 + 4 cos(2ππππππ) 2 cos(4ππππππ) Setting TT = 1 so frequency is normalized to cycles/sample, the DTFT is plotted below. 11

Note: The period is 1, and high frequency is ff = 1 2 cycles/sample. The phase is zero for all ff. 3. DTFT Shifting Property: If xx(nn) DDDDDDDD XX ee jj2ππππππ, then xx(nn nn 0 ) DDDDDDDD ee jj2ππππππnn 0XX ee jj2ππππππ. Proof: Use the shifting property of the Z-transform with zz = ee jj2ππππππ. Linear phase is of the form θθ(ff) = AAff, for some constant AA, so a linear phase DTFT has the form HH ee jj2ππππππ = HH ee jj2ππππππ ee jjjjff. 4. A causal FIR filter with impulse response h(0),, h(nn 1) has linear phase if h(nn) = h(nn 1 nn), nn = 0,1,, NN 1. Proof. The DTFT is NN 1 HH ee jj2ππππππ = h(nn)ee jj2ππππππππ nn=0 = h(0) + h(1)ee jj2ππππ1tt + h(2)ee jj2ππππ2tt + + h(nn 2)ee jj2ππππ(nn 2)TT + h(nn 1)ee jj2ππππ(nn 1)TT 12

HH ee jj2ππππππ = h(0) 1 + ee jj2ππππ(nn 1)TT + h(1) ee jj2ππππ1tt + ee jj2ππππ(nn 2)TT + Now, factor out the same factor from each complex exponential, namely ee jj2ππππ(nn 1)TT 2. Then HH ee jj2ππππππ HH ee jj2ππππππ = ee jj2ππππ(nn 1)TT 2 h(0) ee jj2ππππ(nn 1)TT 2 + ee jj2ππππ(nn 1)TT 2 + h(1) ee jj2ππππ(nn 3)TT 2 + ee jj2ππππ(nn 3)TT 2 + = ee jj2ππππ(nn 1)TT 2ππππ(NN 1)TT 2 h(0) cos 2 2ππππ(NN 3)TT + h(1) cos + 2 Hence, the phase of HH ee jj2ππππππ is 13 θθ(ff) = 2ππππ(NN 1)TT. 2

Example. A LTI system has impulse response h(nn) = 1 1, 2,6,2, 1. The length is NN = 5. By 8 inspection, h(nn) = h(nn 1 nn), nn = 0,1,2,3,4, so this is a linear-phase filter. What is the dc gain? What is the high-frequency gain? What type of filter is this? Example. A LTI system has impulse response h(nn) = 1 4 1, 2,1. Find the DTFT HH eejj2ππππππ. Use convolution to find the response to input xx(nn) = 0, 1, 2,3,4,3,2,1,0. Relate the filtering time delay to the DTFT. 14

5. Convolution property. yy(nn) = xx(nn) h(nn) DDDDDDDD XX ee jj2ππππππ HH ee jj2ππππππ (1) and yy(nn) = xx(nn)h(nn) DDDDDDDD XX ee jj2ππππππ HH ee jj2ππππππ (2) where convolution in the frequency domain is periodic convolution defined as 1 2TT XX ee jj2ππππππ HH ee jj2ππππππ = TT XX ee jj2ππ(ff λλ)tt HH ee jj2ππλλtt dddd 1 2TT Proof of (1) follows directly from the convolution property of the ZZ-transform, with zz = ee jj2ππππππ. Proof of (2). Begin with the right-hand side of (2) and take the inverse DTFT. 15

6. Parseval s Relation Proof. EE xx = 1 2TT xx(nn) 2 = TT XX ee jj2ππππππ 2 ddff nn= 1 2TT 16

7. Let xx(nn) DDDDDDDD XX ee jj2ππππππ. In general, xx(nn) and XX ee jj2ππππππ are complex-valued. Write the real and imaginary parts as the signal name with subscript RR or II. So xx(nn) = xx RR (nn) + jjxx II (nn) XX ee jj2ππππππ = XX RR ee jj2ππππππ + jjxx II ee jj2ππππππ a. If xx(nn) real-valued then XX RR ee jj2ππππππ is even in frequency ff and XX II ee jj2ππππππ is odd in frequency, so the magnitude, XX ee jj2ππππππ is even, and the phase, XX ee jj2ππππππ is odd in frequency. b. If xx(nn) real-valued and even then XX ee jj2ππππππ is real and even. c. If xx(nn) real-valued and odd then XX ee jj2ππππππ is imaginary and XX II ee jj2ππππππ is odd. d. If xx(nn) imaginary then XX RR ee jj2ππππππ is odd and XX II ee jj2ππππππ is even. 8. Time reversal. If xx(nn) DDDDDDDD XX ee jj2ππππππ then xx( nn) DDDDDDDD XX ee jj2ππππππ Proof. This property follows directly from the ZZ-transform property. 17

9. Energy Density Spectrum and Autocorrelation Let xx(nn) be an energy signal with xx(nn) DDDDDDDD XX ee jj2ππππππ. The magnitude squared of the DTFT is referred to as the energy density spectrum, SS xxxx ee jj2ππππππ = XX ee jj2ππππππ 2. From Parseval s relation, the signal energy is 1 2TT EE xx = TT SS xxxx ee jj2ππππππ ddff. 1 2TT Property: The energy density spectrum is related to the autocorrelation as rr xxxx (kk) DDDDDDDD SS xxxx ee jj2ππππππ, where the autocorrelation function is rr xxxx (kk) = xx(nn + kk)xx (nn) Proof. Directly compute the DTFT of rr xxxx (kk). nn=. 18

Relate LTI System Transfer Function Poles and Zeros to Filter Frequency Response Suppose we have a causal LTI system described by NN yy(nn) = aa kk yy(nn kk) kk=1 MM + bb kk xx(nn kk). kk=0 with transfer function HH(zz) = BB(zz) MM = kk=0 bb kkzz kk AA(zz) 1 NN aa kk zz kk kk=1 system has poles and zeros, and the numerator and denominator can be factored into the form HH(zz) = BB(zz) AA(zz) = KK ii=1 (1 rr iizz 1 ) NN (1 pp ii zz 1 ) MM ii=1. The where we assume MM zeros at locations zz = rr ii and NN poles at locations zz = pp ii and no pole-zero cancellations. Simple manipulation yields HH(zz) = KKzzNN MM MM ii=1(zz rr ii ) NN. (zz pp ii ) ii=1 The magnitude frequency response is obtained by setting zz = ee jj2ππππππ and evaluating the magnitude of HH ee jj2ππππππ as HH ee jj2ππffff = KK eejj2ππffff(nn MM) ii=1 ee jj2ππffff rr ii NN (ee jj2ππffff pp ii ) ii=1 MM 19

In the zz-plane, this is HH ee jj2ππffff = KK NN ii=1 MM ii=1 dddddddd ffrrrrrr eejj2ππffff tttt zzeeeeee rr ii dddddddd ffrrrrrr ee jj2ππffff tttt pppppppp pp ii Now, what about phase? The frequency response can be written as (assuming KK is positive) MM HH ee jj2ππffff = KK eejj2ππππππ rr ii ee jjφφ ii ii=1 NN ee jj2ππππππ pp ii ii=1 ee jjθθ ii where φφ ii = ee jj2ππππππ rr ii is the angle to the zero and θθ ii = ee jj2ππππππ pp ii is the angle to the pole. Combining terms MM HH ee jj2ππffff = KK eejj2ππππππ rr ii ee jj φφ ii ii=1 NN ee jj2ππππππ pp ii ii=1 MM NN ii=1 ii=1 θθ ii So, the phase of HH ee jj2ππffff equals the sum of the phases from the zeros, minus the sum of the phases from the poles.. 20

Example. Let HH(zz) = 1 1 0.9zz 1 = zz zz 0.9. Sketch the pole-zero locations in the z-plane, and then the magnitude and phase frequency response. 21

22

Example 2. Let HH(zz) = 2 1 zz 1 0.9. Sketch the magnitude (1+0.81zz 2 ) frequency response of the filter. First, sketch the pole and zero locations in the zz-plane. 23

Comments about frequency response Begin at ff = 0 and traverse the unit circle as ee jj2ππππππ. As ee jj2ππππππ approaches a zero, one term in the numerator of the frequency response decreases rapidly, so HH ee jj2ππffff decreases. As ee jj2ππππππ moves away from a zero, then HH ee jj2ππffff increases. As ee jj2ππππππ approaches a pole, one term in the denominator of the frequency response decreases rapidly, so HH ee jj2ππffff increases. A zero exactly on the unit circle causes the gain to go to zero. For poles or zeros near the unit circle, the phase suddenly changes as ee jj2ππππππ sweeps past. Poles or zeros at the origin do not affect the magnitude frequency response. 24

10. Time shifting and frequency shifting. If xx(nn) DDDDDDDD XX ee jj2ππππππ, then a. xx(nn nn 0 ) DDDDDDDD ee jj2ππππππnn 0XX ee jj2ππππππ b. ee jj2ππff 0nnnn xx(nn) DDDDDDDD XX ee jj(2ππππ 2ππff 0 )TT Proof. Direct computation of the DTFT and inverse DTFT. Example. We already know that XX ee jj2ππππππ is periodic in ff with period 1. So, if ff TT 0 = kk for any integer kk, then TT XX ee jj(2ππππ 2ππff 0 )TT = XX ee jj2ππππππ. Example. If yy(nn) = ( 1) nn xx(nn), find YY ee jj2ππππππ in terms of XX ee jj2ππππππ. Application: Suppose we have a good lowpass FIR filter with transfer function HH(zz) = NN 1 nn=0 h(nn)zz nn, where h(nn) is the length-n impulse response. How can we easily design a length-n FIR high-pass filter? Use frequency shifting. 25

Example. For the causal, linear phase lowpass FIR filter with impulse response h(nn) = 1 1, 2,6,2, 1, the DTFT 8 is evaluated as HH ee jj2ππππππ = ee jj2ππππ2tt [6 + 4 cos(2ππππππ) 2 cos(4ππππππ)] 8 and is plotted below for TT = 1. The delay is NN 1 2 = 2 samples. 26

Now, to obtain a high-pass filter via frequency translation, we wish to shift by half a period (that is, by 1 Hz) in frequency. Let GG ee jj2ππππππ = HH ee jj 2ππ(ff 1 2TT ) TT = HH ( 1)ee jj2ππππππ, so (replacing ee jj2ππππππ = zz) it follows that GG(zz) = HH( zz), and NN 1 GG(zz) = HH( zz) = h(nn)( zz) nn = nn=0 NN 1 2TT h(nn)( 1) nn zz nn. nn=0 Hence, gg(nn) = ( 1) nn h(nn) is the mapping to convert the lowpass filter to a highpass filter. For h(nn) = 1 1, 2,6,2, 1, this implies that 8 gg(nn) = 1 1, 2,6, 2, 1. 8 Note the dc gain, and the high-frequency gain, of each filter. 27

28

Comparing the two frequency responses, the highpass filter derived by frequency translation, GG ee jj2ππππππ = HH ee jj 2ππ(ff 1 2TT ) TT In summary, to convert an FIR lowpass filter with impulse response h(nn) to an FIR highpass filter with impulse response gg(nn), using frequency shifting, simply let gg(nn) = ( 1) nn h(nn). 29

Example. A few causal lowpass and highpass FIR filters are shown below. The highpass filter impulse response, gg(nn), is formed from the lowpass filter impulse response, h(nn), using gg(nn) = ( 1) nn h(nn). Lowpass filter impulse and frequency responses (N=2,3,4,5). Highpass filter impulse and frequency response (N=2,3,4,5). 30

Problem: Suppose we have an IIR lowpass filter given by the difference equation NN yy(nn) = aa kk yy(nn kk) + bb kk xx(nn kk). kk=1 MM kk=0 How can we use frequency translation to modify the lowpass filter into a highpass filter? 31

Design Problem. Design a non-causal lowpass filter with sampling rate 1 TT Hz and cutoff frequency ff cc Hz. Solution. The ideal lowpass filter frequency response is 1, 0 ff ff cc HH ee jj2ππππππ = 0, ff cc < ff 1 2TT Use the definition of inverse DTFT to compute h(nn). h iiiiiiiiii (nn) 1 2TT = TT HH ee jj2ππππππ ee jj2ππππππππ dddd 1 2TT ff cc = TT ee jj2ππππππππ ddff = 2ff cc TTsinc(2ff cc TTTT) ff cc A truncated non-causal impulse response is defined as the 2NN + 1 samples of h(nn) over the range nn = NN,,0, NN, h NN (nn) = h iiiiiiiiii(nn), NN nn NN 0, otherwise 32

The figures below show h NN (nn) and HH NN ee jj2ππππππ for TT = 1, ff cc = 0.2, and NN = 4, 20, and 50, corresponding to impulse response lengths of 9, 41, and 101. 33

Note: The filters above are non-causal. They satisfy the symmetry condition h NN (nn) = h NN ( nn), so they have zero phase and HH NN ee jj2ππππππ is real-valued. Causal filters with the same frequency response magnitude can be constructed simply by using the DTFT delay property and forming the causal impulse response as h(nn) = h NN (nn NN), nn = 0,,2NN, yielding the length MM = 2NN + 1 FIR filter with frequency response HH ee jj2ππππππ = ee jj2ππππππππ HH NN ee jj2ππππππ. From the construction, the causal filter impulse response satisfies the condition h(nn) = h(mm 1 nn), nn = 0,, MM 1 so the FIR filter has linear phase given by 34

θθ(ff) = 2ππππππ(MM 1) 2 = 2ππππππππ. 35

This example then provides a design strategy for designing causal, linear phase, FIR filters. 1. Design a zero phase non-causal (generally infinite length) filter impulse response using the inverse DTFT. 2. Truncate the infinite-length impulse response to the sample range nn = NN,,0, NN. Provided h(nn) = h( nn), the truncated filter is still zero phase. 3. Delay the impulse response values by N, yielding a length MM = 2NN 1 causal FIR filter. Note: This general method is known as the window method of linear phase FIR filter design. In general, the truncation window need not be rectangular, but does need to preserve the required symmetry condition, h(nn) = h(mm 1 nn), for nn = 0,, MM 1, with causal impulse response length MM. 36

Related Design Problem: Design a length-m linear-phase, causal FIR lowpass filter that is optimum in the MSE sense. That is, if the designed filter has frequency response HH ee jj2ππππππ, and the ideal (causal, linear-phase) lowpass filter has the frequency response, jj2ππππππ(mm 1) HH iiiiiiiiii ee jj2ππππππ = 1ee 2, 0 ff ff cc 0, ff cc < ff 1 2TT Then design HH ee jj2ππππππ to minimize the integral squared error (mean-square error) 1 2TT HH iiiiiiiiii ee jj2ππππππ HH ee jj2ππππππ 2 dddd. 1 2TT Solution. Recall Parseval s relation: 1 2TT xx(nn) 2 = TT XX ee jj2ππππππ 2 dddd. nn= 1 2TT 37

Digital Frequency Suppose an analog signal, xx aa (tt), is bandlimited to BB Hz, meaning that XX aa (ff) = 0 for ff BB Hz. The Nyquist sampling rate is 1 TT = 2BB samples/sec. Let xx aa (tt) = cos(2ππff 0 tt) so that the samples are xx(nn) = cos(2ππff 0 nnnn). a) If ff 0 = 0, then xx(nn) =,1, 1, 1,1, (a dc signal) b) If ff 0 = ¼TT, then xx(nn) = cos (2ππ 1 nnnn) = cos 4TT (ππ nn) 2 = (,1,0, 1,0, 1,0, 1,0,1, Hence, there is a sign change every other sample. c) If ff 0 = ½TT, then xx(nn) = cos (2ππ 1 nnnn) = cos ( ππππ) 2TT = (,1, 1, 1, 1,1, There is a sign change every sample. Note the locations of ff = 0, 1, 1 on the unit circle in the 4TT 2TT z-plane. 38

Convolution and Steady-State Response Suppose we are given a causal, stable, LTI system with impulse response h(nn). What is the steady-state response to a sinusoidal input, e.g., to input xx(nn) = AA sin(2ππff 0 nn)? Derivation. Assume a normalized sampling rate, so 1 TT = 1. Let the system input be xx(nn) = AAeejj2ππff 0nn for all nn. The system output is given by convolution, Evaluating, yy(nn) = h(nn) xx(nn). yy(nn) = h(kk)xx(nn kk) = h(kk)aaee jj2ππff 0 (nn kk) kk= kk= = AAee jj2ππff 0nn h(kk)ee jj2ππff 0kk kk= = HH ee jj2ππff 0 AAee jj2ππff 0nn Hence, the output is just a scaled version of the input, where the scale factor is the transfer function evaluated at the input frequency. This result also holds for the steady-state 39

response if the input begins at some finite time index, and the output is observed after a sufficiently large delay. Example. Let h(nn) = 1 1, 2,1. Determine the steady state 4 response to the following signals (assume TT = 1). i) xx(nn) = 12 uu(nn) ii) xx(nn) = 60 sin ππ nn uu(nn) 2 iii) xx(nn) = 8 cos(ππππ) uu(nn) Solution. HH ee jj2ππππ = 1 4 1 + 2ee jj2ππππ + ee jj4ππππ = 1 2 ee jj2ππππ (1 + cos(2ππππ)). xx(nn) = 12 uu(nn) yy ssssssssssssssssssssss (nn) = HH ee jj0 12 = 12. xx(nn) = 60 sin ππ 2 nn uu(nn) yy ssssssssssyyssssssssss(nn) = HH ee jj0.5ππ 60 sin ππ 2 nn + θθ, where θθ = phase HH ee jj0.5ππ. Evaluating, HH ee jj0.5ππ = 1 2 ee jj0.5ππ 1 + cos ππ jj =, so 2 2 40

= HH ee jj0.5ππ = 1 ππ and θθ =. Hence, the steady-state 2 2 response to the input in ii) is yy ssssssssssssssssssssss (nn) = 1 2 60 sin ππ 2 ππ nn + = 30 sin 2 ππ (nn 1). 2 Note the delay of one sample, matching the linear phase term in the expression for HH ee jj2ππππ. 41

Inverse Filters, Minimum Phase, and All-Pass Filters Definition: A LTI system is called minimum phase if all zeros are inside the unit circle. (Hence, a stable minimum phase LTI system is invertible as a causal filter that is also stable.) An interesting filter: HH(zz) = 1 1 αα zz 1 1 ααzz 1. The pole is at zz = αα and we assume that αα < 1 so the filter is stable as a causal filter. The zero is at zz = 1 αα, and since αα < 1, the zero is outside the unit circle. Hence, this filter is non-minimum phase. Assume that αα is real-valued and examine the frequency response. HH ee jj2ππππππ = 1 1 αα ee jj2ππππππ 1 ααee ee jj2ππππππ αα jj2ππππππ = ααee jj2ππππππ 1 1 ααee jj2ππππππ Noting that the two terms in parentheses are related as ααee jj2ππππππ 1 = 1 ααee jj2ππππππ, then HH ee jj2ππππππ = 1, since αα is real-valued. αα. 42

Hence, HH(zz) = 1 1 αα zz 1 1 ααzz 1 is an all-pass filter, with magnitude frequency response HH ee jj2ππππππ = 1, i.e., constant for all ff. αα Now, what kind of pole-zero configurations are possible in an all-pass filter? For a difference equation LTI system with real-valued coefficients, all complex-valued poles of zeros must appear in complex-conjugate pairs. So, if zz = αα is a pole, so must be zz = αα. For an all-pass filter, if zz = αα is a pole, then zz = 1 αα must be a zero. So, if αα is complex-valued, then zz = αα and zz = αα are poles, implying that zz = 1 and zz = 1 αα αα must be zeros. Hence, in general, poles and zeros must appear in quads in all-pass filters. If a difference equation all-pass filter is causal and BIBO stable, is the inverse filter BIBO stable as a causal filter? 43

Notch Filters A notch filter can be designed to eliminate a specific frequency component, say at frequency ff 0 Hz, by placing a zero of the transfer function at zz = ee jj2ππff 0TT. Assuming this zero location is complex-valued, then a zero need also be placed at zz = ee jj2ππff 0TT so that the filter coefficients are realvalued. Placing poles near the zeros, but inside the unit circle, results in a transfer function of the form HH(zz) = 1 eejj2ππff 0TT zz 1 1 ee jj2ππff 0TT zz 1 (1 αααα jj2ππff 0TT zz 1 )(1 αααα jj2ππff 0TT zz 1 ), where 0 αα < 1 controls how close the pole is to the zero. Simplifying, this becomes HH(zz) = 1 2 cos(2ππff 0TT) zz 1 + zz 2 1 2α cos(2ππff 0 TT) zz 1 + αα 2 zz 2. Example. Design a notch filter to remove 180 Hz, assuming a sampling rate of 1,000 Hz. Solution. Use ff 0 = 180 and TT = 10 3 in the equation above, yielding a transfer function HH(zz) = 1 2 cos(0.36ππ) zz 1 + zz 2 1 2α cos(0.36ππ) zz 1 + αα 2 zz 2. 44

The figure below shows the frequency response magnitude for αα = 0, αα = 0.9, and αα = 0.99. Note how the width of the notch depends on α, and that without poles near the zeros the frequency response is not flat for frequencies significantly distant from ff 0 = 180 Hz. 45

Comb Filters These filters can be used to eliminate a periodically spaced set of frequencies, or simply to have a periodic shaped frequency response. We can generate a comb filter from a prototype filter, say HH(zz). A comb filter is formed as HH LL (zz) = HH(zz LL ), for any integer LL > 1. The comb filter frequency response is then HH LL ee jj2ππππππ = HH ee jj2ππππππππ. Since HH ee jj2ππππππ is periodic in frequency with period 1 TT, then as ff varies over the range 0, 1 TT Hz, HH eejj2ππππππππ is varying over LL periods. Hence, HH LL ee jj2ππππππ looks like L periods of HH ee jj2ππππππ, but compressed into the frequency range 0, 1 TT Hz. Example 1. Select LL = 3 and the prototype filter that has impulse response h 0 (nn) = 0.5, 0.5. Then HH(zz) = 1 2 (1 + zz 1 ). The comb filter has transfer function HH LL (zz) = 1 2 (1 + zz LL ), so that with LL = 3, HH 3 (zz) = 1 2 (1 + zz 3 ), implying an impulse 46

response h 0 (nn) = 0.5, 0, 0, 0.5. The frequency responses are shown in the figure below. Example 2. A simple IIR filter has transfer function 1 HH(zz) = 1 0.9zz 1. If LL = 4, the comb filter has transfer function HH LL (zz) = 1 1 0.9zz LL. The frequency responses are shown below. 47

Question: Suppose we have a difference equation LTI digital filter. How can we implement the comb filter? Answer: Just replace every delay, zz 1, with zz LL in the realization. 48