LECTURE 13 Introduction to Filtering

Similar documents
Discrete-Time Fourier Transform (DTFT)

CMPT 318: Lecture 5 Complex Exponentials, Spectrum Representation

6.02 Practice Problems: Frequency Response of LTI Systems & Filters

Discrete-time Fourier transform (DTFT) representation of DT aperiodic signals Section The (DT) Fourier transform (or spectrum) of x[n] is

ECE-314 Fall 2012 Review Questions for Midterm Examination II

Fourier Series and Fourier Transforms

The Discrete-Time Fourier

Music 270a: Complex Exponentials and Spectrum Representation

Lecture 13: Discrete Time Fourier Transform (DTFT)

Chap 2. Discrete-Time Signals and Systems

Discrete Time Fourier Transform (DTFT)

NAME: ht () 1 2π. Hj0 ( ) dω Find the value of BW for the system having the following impulse response.

Stability Condition in Terms of the Pole Locations

Shift Property of z-transform. Lecture 16. More z-transform (Lathi 5.2, ) More Properties of z-transform. Convolution property of z-transform

Digital Signal Processing Lecture 3 - Discrete-Time Systems

GATE EE Topic wise Questions SIGNALS & SYSTEMS

Lecture 9: Space-Vector Models

z-transforms Definition of the z-transform Chapter

(Refer Slide Time: 01:28 03:51 min)

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

Fourier Analysis and Spectral Representation of Signals

MITOCW MITRES_6-007S11lec09_300k.mp4

Review of Fundamentals of Digital Signal Processing

Frequency-Domain C/S of LTI Systems

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

Very useful for designing and analyzing signal processing systems

EECE 301 Signals & Systems Prof. Mark Fowler

Lecture 2 OKAN UNIVERSITY FACULTY OF ENGINEERING AND ARCHITECTURE

Transform Analysis of Linear Time-Invariant Systems

8 The Discrete Fourier Transform (DFT)

1.3 Frequency Analysis A Review of Complex Numbers

Sinusoids. Amplitude and Magnitude. Phase and Period. CMPT 889: Lecture 2 Sinusoids, Complex Exponentials, Spectrum Representation

Fourier Analysis and Spectral Representation of Signals

Signals and Systems Profs. Byron Yu and Pulkit Grover Fall Midterm 2 Solutions

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

CMPT 889: Lecture 2 Sinusoids, Complex Exponentials, Spectrum Representation

VU Signal and Image Processing

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

summable Necessary and sufficient for BIBO stability of an LTI system. Also see poles.

ECE503: Digital Signal Processing Lecture 5

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

Detailed Solutions to Exercises

Lecture 27 Frequency Response 2

Generalizing the DTFT!

Lecture 14: Windowing

ENT 315 Medical Signal Processing CHAPTER 2 DISCRETE FOURIER TRANSFORM. Dr. Lim Chee Chin

2.161 Signal Processing: Continuous and Discrete Fall 2008

LAB 6: FIR Filter Design Summer 2011

The Fourier Transform (and more )

PS403 - Digital Signal processing

LECTURE 5 Noise and ISI

3 What You Should Know About Complex Numbers

Discrete-Time Fourier Transform

Discrete Time Signals and Systems Time-frequency Analysis. Gloria Menegaz

Discrete Fourier Transform

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

Review of Fundamentals of Digital Signal Processing

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science. Fall Solutions for Problem Set 2

ESE 531: Digital Signal Processing

EE538 Final Exam Fall :20 pm -5:20 pm PHYS 223 Dec. 17, Cover Sheet

Grades will be determined by the correctness of your answers (explanations are not required).

Multidimensional digital signal processing

Chapter 10: Sinusoids and Phasors

LECTURE 5 Noise and ISI

ELEN 4810 Midterm Exam

A system that is both linear and time-invariant is called linear time-invariant (LTI).

Homework 6 Solutions

ELC 4351: Digital Signal Processing

Chirp Transform for FFT

The Convolution Sum for Discrete-Time LTI Systems

Convolutional Coding LECTURE Overview

Grades will be determined by the correctness of your answers (explanations are not required).

6.003: Signals and Systems Lecture 18 April 13, 2010

Problem Value

Discrete-Time Signals and Systems. Frequency Domain Analysis of LTI Systems. The Frequency Response Function. The Frequency Response Function

Your solutions for time-domain waveforms should all be expressed as real-valued functions.

Linear Convolution Using FFT

Transform Representation of Signals

Digital Signal Processing

EA2.3 - Electronics 2 1

Review of Discrete-Time System

6.02 Fall 2012 Lecture #10

2.3 Oscillation. The harmonic oscillator equation is the differential equation. d 2 y dt 2 r y (r > 0). Its solutions have the form

5.2. November 30, 2012 Mrs. Poland. Verifying Trigonometric Identities

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

EC Signals and Systems

Lecture 16: Zeros and Poles

The Discrete Fourier Transform

Z-TRANSFORMS. Solution: Using the definition (5.1.2), we find: for case (b). y(n)= h(n) x(n) Y(z)= H(z)X(z) (convolution) (5.1.

The Discrete Fourier Transform. Signal Processing PSYCH 711/712 Lecture 3

EE 521: Instrumentation and Measurements

Notes 07 largely plagiarized by %khc

Analog vs. discrete signals

Bridge between continuous time and discrete time signals

EE482: Digital Signal Processing Applications

5.1 The Discrete Time Fourier Transform

INF3440/INF4440. Design of digital filters

Discrete Time Systems

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

Digital Signal Processing Module 1 Analysis of Discrete time Linear Time - Invariant Systems

Transcription:

MIT 6.02 DRAFT ecture Notes Fall 2010 (ast update: October 25, 2010) Comments, questions or bug reports? Please contact 6.02-staff@mit.edu ECTURE 13 Introduction to Filtering This lecture introduces the idea of filtering, which we will use at the receiver to pick out signals in the frequency band of interest. Filters are widely applicable and used to solve many different problems. There are many different specialized techniques in place for filter design, and one can easily devote an entire course (or more) to this topic! We will focus on the essential ideas and describe low-pass and high-pass filters. The key concept in our discussion is the notion of composition, which is a way to take simple filters and combine them in series and parallel to realize more complex filters. Understanding filters in the frequency domain will turn out to be a convenient and useful approach. 13.1 Complex Numbers and Frequency Response One of the key points of the previous lecture was that if the input to an TI system is an eternal complex exponential, x[n] = e jωn, < n <, and if the TI system has an -length unit sample response, then the output, y[n], is given by where y[n] = H(e jω )e jωn (13.1) H(e jω ) h[m]e jωm. (13.2) We referred to H(e jω ), for Ω over the range π Ω π, as the frequency response of the TI system. For a given value of Ω, H(e jω ) is a complex number, and below it will be convenient to use the polar form for a complex number. As a reminder, a complex number z can be written in Cartesian form, z = x + jy, where x = Re(z) and y = Im(z), or in polar form, z = z e jθ, where z = x 2 + y 2 is the magnitude of the complex number, θ is the angle, x = Re(z) = z cos θ, and y = Im(z) = z sin θ (see Figure 13-1 for a summary diagram of the polar form). 1

2 ECTURE 13. INTRODUCTION TO FITERING Figure 13-1: The polar form for a complex number z = x + jy. Some operations with complex numbers are made simpler using the polar form, and some become more complicated. For example, the complex conjugate of z is z = x jy in Cartesian form, or z = z e jθ in polar form. Perhaps more compelling is the fact that the polar form for the product of two complex numbers is z 1 z 2 = z 1 z 2 e j(θ 1+θ 2 ). The same identity is, in words, that magnitude of the product of two complex numbers is the product of the magnitudes, and the angle of the product is the sum of the angles. Please take special note of the fact that the polar representation of the sum of two complex numbers has no simple relation to the individual polar representations. For example, the magnitude of the sum of two complex numbers is not necessarily the sum of the magnitudes (though it can be). All one can say is z 1 + z 2 z 1 + z 2. If the unit sample response for an TI system is real, then H(e jω ) = H (e jω ),

SECTION 13.2. DESIGNING FITERS 3 and is referred to as the conjugate symmetry property. Another way of stating the conjugate symmetry property is: if h[n] is real for all n, then Re ( H(e jω ) ) = Re ( H(e jω ) ), and Im ( H(e jω ) ) = Im ( H(e jω ) ). Applying the conjugate symmetry property to the polar form H(e jω ) = H(e jω ) e jθ, implies that H(e jω ) = H (e jω ) = H(e jω ) e jθ. (13.3) The polar form and the conjugate symmetry property can be used to improve our insights in to the case of using a co-sinusoidal waveform as an input of an TI system. If x[n] = cos Ωn = 1 2 e jωn + 1 2 e jωn then we can use the TI system frequency response and superposition to derive the output y[n] = 1 2 H(e jω )e jωn + 1 2 H(e jω )e jωn. (13.4) Substituting the polar form, H(e jω ) = H(e jω ) e jθ, and exploiting conjugate symmetry, ( 1 y[n] = H(e jω ) 2 e j(ωn+θ) + 1 ) 2 e j(ωn+θ) = H(e jω ) cos (Ωn + θ). (13.5) That is, if a co-sinusoidal waveform is applied to the input of an TI system, the output is an amplitude-scaled and phase-shifted co-sinusoidal waveform of the same frequency. As is clear from Equation 13.5, if H(e jω ) is nearly zero for some frequencies, then sinusoidal and co-sinusoidal inputs at these frequencies will be blocked by the TI system. And if H(e jω ) is close to one for some frequencies, then sinusoidal and co-sinusoidal inputs at those frequencies will pass through the TI system and emerge with nearly the same amplitude. Most of the time we will be unconcerned about the fact that the phase of the input sines and cosines may be altered, but there will be circumstances when phase must be considered. 13.2 Designing Filters Filters are usually specified in terms of frequency response (e.g. pass everything lower than a given frequency, or pass everything higher than a given frequency). The problem is that in order to apply a filter to an input signal, we need to convolve the filter input with the filter s unit sample response to compute the output. That is, the filter s output, y[n], is computed from y[n] = h[m]x[n m], so we need a strategy for computing a filter s unit sample response given a frequency response specification. One general method for designing a filter is as follows. We mention it here to give you an idea of the technique. Suppose we want a filter whose frequency response at speci-

4 ECTURE 13. INTRODUCTION TO FITERING fied frequencies, Ω 1, Ω 2,..., Ω K are given, H(e jω 1), H(e jω 2),..., H(e jω K). We want to determine an -length unit sample response for an TI system so that the system s frequency response matches our specifications. That is, we want to determine the + 1 unknown values h[0], h[1],..., h[]. We can unravel Equation 13.2 in to a system of equations that we can solve for h[0], h[1],..., h[], as shown in Equation 13.6. Note that in the system in Equation 13.6, there are separate equations to enforce the specifications for H(e jω K) and for H(e jω K), and the need to enforce the frequency response at both the positive and negative frequencies may seem superfluous. A perhaps plausible explanation for why both are needed is that if one wishes to design a filter that blocks x[n] = cos Ωn, then one must design the filter so that both H(e jω ) and H(e jω ) are zero. As appealing as the cosine input explanation may be, the reasoning is not complete. If the unit sample response is real, conjugate symmetry implies that if H(e jω ) is zero, then H(e jω ) is zero also. So, why the need to enforce both? The answer is that either the frequency response specification must enforce conjugate symmetry, so that the solution to the system of equations is real, or Equation 13.6 must be appended with constraints to force the computed unit sample response to be real. In addition to the positive and negative frequency issue, there are additional subtleties associated with how the angle of the frequency response is specified in Equation 13.6, but these issues extend beyond the scope of 6.02. The key idea to remember is that filter design is a nearly algorithmic process, you specify the desired frequency response, run a program, and out pops a unit sample response that you can convolve with your input to filter it.. 1 e jω 1 e jω 12... e jω 1( 1) e jω 1 1 e jω 1 e jω 12... e jω 1( 1) e jω 1 1 e jω 2 e jω 22... e jω 2( 1) e jω 2 1 e jω 2 e jω 22... e jω 2( 1) e jω 2... 1 e jω K e jω K2... e jω K( 1) e jω K 1 e jω K e jω K2... e jω K( 1) e jω K h[0] h[1] h[2] h[3]. h[ 1] h[] = H ( e jω 1) ) H ( e jω 1) ) H ( e jω 2) ) H ( e jω 2) ). H ( e jω K) ) H ( e jω K) ) (13.6) 13.2.1 ow-pass Filters As mentioned above, we often specify filters in terms of the magnitude of the frequency response. For example, an extremely useful filter, one we can use directly and also use to construct other filters, is the low-pass filter (PF). As its name indicates, the PF takes an input signal, blocks all frequencies above a cut-off frequency Ω c, but all frequencies less Ω c are passed through without changing their amplitudes. A plot of the frequency-response magnitude for an ideal PF is shown in Figure 13-2. Generating an ideal PF is impractical, as such a filter would have an infinitely long unit sample response, but non-ideal PFs that approximate the ideal case are easy to generate. The unit sample and frequency response of an example approximate ideal PF are shown in Figure 13-3, For this non-ideal PF, input signals with frequencies less than Ωpass pass through, and input signals with frequencies larger than Ω stop are blocked. Input signals with frequencies between the pass and stop frequencies, in the transition region of the filter, are partially blocked. It is possible to trade-off narrowing the transition region against

SECTION 13.3. FITER COMPOSITION 5 Figure 13-2: An ideal low-pass filter (PF). lengthening the non-ideal PF s unit sample response. One way to construct an PF is to pick a set of Ω values all greater than Ω stop and set H(e jω ) to zero in Equation 13.6, then pick a mirror set of Ω values, all more negative than Ω stop, and set H(e jω ) to zero in Equation 13.6, and then pick values of Ω between Ωpass and Ωpass and set H(e jω ) to have magnitude one (though the angle must be chosen more carefully) in Equation 13.6. Finally, solve the resulting system of equations for the + 1 values of the filter s unit sample response. Although it is possible to resort to setting up a system of equations to compute the unit sample response whenever a filter is needed, a more instructive and powerful approach is that of composition, in which more complex filters are generated by combining simpler filters. The rest of this lecture is devoted to composition. 13.3 Filter Composition Suppose we have two filters with frequency responses H 1 and H 2, respectively, and we pass a signal X through them in series, one after the other. What does the output, Y, look like, in terms of H 1 and H 2 (and X)? Figure 13-4 shows the series composition of filters. Clearly, the intermediate signal is

6 ECTURE 13. INTRODUCTION TO FITERING Ω stop Ω pass Ω pass Ω stop Figure 13-3: A non-ideal low-pass filter (PF). W = H 1 X, and the output signal is Y = H 2 W, where is the convolution operator. Therefore, for series composition, we have Y = H 1 H 2 X, which means that the H for a series composition of filters is H = H 1 H 2. Or, in terms of sums, and assuming both H 1 and H 2 have -length unit sample responses, h[n] = h[n] = n h 1 [m]h 2 [n m], n, (13.7) h 1 [m]h 2 [n m], n >, and y[n] = 2 h[m]x[n m]. The frequency response of a serially composed filter system is given by H(e jω ) = H 1 (e jω )H 2 (e jω ), (13.8) and therefore, using the product property of complex numbers, the magnitude of the fre-

SECTION 13.3. FITER COMPOSITION 7 X H 1 W H 2 Series composi1on: Y = H 1 * H 2 * X Y quency response is X H 1 Figure 13-4: Series composition of filters. H(e jω ) = H 1 (e jω ) H 2 (e jω ). (13.9) So, the magnitude of the resulting frequency response is equal to the product of the frequency response magnitudes for the two filters that are serially composed. It is easy to see that these results extend to any number of filters composed in series. H 2 + Parallel composi1on: Y = (H 1 + H 2 )* X 13.3.1 High-pass Filters and Parallel Composition Suppose we want a filter that will take an input signal and block all frequencies below a cut-off frequency Ω c, but all frequencies greater than Ω c are passed through without changing their amplitudes. The magnitude of the frequency response for such an ideal high-pass filter (HPF) is shown in Figure 13-5. Series composition is useful for a number of purposes, but can we construct a highpass filter by serially composing PFs? Obviously not, but we can apply a different kind of composition, parallel composition, as shown in Figure 13-6. For the case of parallel composition, the output signal Y = H 1 X + H 2 X = (H 1 + H 2 ) X. Or, in terms of sums and assuming both H 1 and H 2 have -length unit sample responses, h[n] = h 1 [n] + h 2 [n] Y and y[n] = h[m]x[n m]. It is tempting to try to design a high-pass filter by creating an all-pass filter, one for which H 1 (e jω ) = 1 for all Ω, and then adding the negative of a low-pass filter to the allpass filter. To make an all-pass filter, consider using an TI system whose unit sample response is the unit sample, as in h 1 [n] = δ[n]. Then H 1 (e jω ) h 1 [m]e jωm = 1. Note that if the unit sample response is the delayed unit sample, h 1 [n] = δ[n ], the resulting system is still all-pass. The frequency response is not identically one, but is given

8 ECTURE 13. INTRODUCTION TO FITERING Figure 13-5: An ideal high-pass filter (HPF). by H 1 (e jω ) and still has unit magnitude for all Ω, h 1 [m]e jωm = e jω, H 1 (e jω ) = e jω = 1. The problem with using the unit sample or the delayed unit sample as an all-pass filter, and then subtracting the low-pass filter, is that the magnitude of the frequency response for the parallel combination is given by H(e jω ) = H 1 (e jω ) + H 2 (e jω ) (13.10) which is NOT equal to H 1 (e jω ) H 2 (e jω ). As can be seen by inspecting the plot of the low-pass filter s unit sample response in Figure 13-3, the larger values in the unit sample response are clustered near sample 31, suggesting that there is a 31 sample delay associated with applying the PF. Therefore, it seems reasonable to try to generate a high-pass filter using the parallel combination of the negative of the PF and an all-pass filter whose unit sample response is a 31-sample de-

X H 1 W H 2 SECTION 13.3. FITER COMPOSITION 9 Series composi1on: Y = H 1 * H 2 * X Y X H 1 H 2 + Parallel composi1on: Y = (H 1 + H 2 )* X Y Figure 13-6: Parallel composition of filters. layed unit sample. The so-generated HPF s unit sample response and frequency response are plotted in Figure 13-7, and as is clear from the plot, the strategy was successful, if poorly justified. The above heuristic approach to designing the parallel composition HPF is, well, unsatisfying. Did we just get lucky or are there generalizable principles? The answer is that if a filter, H 2, has a unit sample response that is symmetric about one sample, then parallel composition with an appropriately delayed unit sample can produce filters with easily analyzed frequency responses. To see this, we can rewrite the frequency response definition, Equation 13.2, with a shift of the index m to the symmetry point, in this case, 2. The resulting formula for the frequency response is H 2 (e jω ) = 2 h 2 [ 2 + m]e jω( 2 +m) = 2 h 2 [ 2 + m]e jωm e jω 2. (13.11) m= 2 m= 2 Since h 2 [ 2 + m] = h 2[ 2 m] as 2 was the symmetry point, the sum H r (e jω ) 2 m= 2 h 2 [ 2 + m]e jωm must be real, and we can rewrite the frequency response as H 2 (e jω ) = H r (e jω )e jω 2. If the unit sample response for H 1 is δ[n 2 ], then ( ) H(e jω ) = H 1 (e jω ) H 2 (e jω ) = 1 H r (e jω ) e jω 2 = 1 Hr (e jω ). (13.12) In the case of our low-pass filter, H r (e jω ) is a real number and is equal to one at low fre-

10 ECTURE 13. INTRODUCTION TO FITERING Figure 13-7: A high-pass filter (HPF) generated using parallel composition. quencies and zero at high frequencies. Therefore H(e jω ) will be zero at low frequencies and one at high frequencies, a high-pass filter as desired.