Lecture 4 Outline • RAT covers Oppenheim/Schafer/Buck Sections 2.5-2.6 • Linear constant-coefficient difference equations – Impulse response of an LTI system defined by a LCCDE • DSP in real life example: filtering ocean temperature • Eigenfunctions and frequency response of DT LTI systems – Frequency response of moving average filter Lecture 4 RAT: O/S/B Sections 2.5-2.6 1. Name 2. T/F For DT signals, the high frequencies are those that are close to an even multiple of π, e.g., 0, 2π, 4π . . . 3. T/F The frequency response of DT LTI systems is periodic with period 2π. 4. T/F The linearity of a system described by a difference equation does not depend on the auxiliary conditions specified for the system. 5. T/F Complex exponential sequences are not eigenfunctions of DT LTI systems. In-class problem 1: LCCDE A causal DT LTI system is described by the following difference equation y[n] = 6 X 1 m=0 7 x[n − m] Determine and sketch the impulse reponse of this system. DSP in real life: filtering ocean temperature data Why measure temperature? ⇒ Sound speed depends on temperature NPAL experiment temperature records Example: 11 197m 10.5 • Ocean temperature off California coast Temperature (degrees C) 10 • Samples every 20 minutes for 1 year 9.5 9 8.5 8 7.5 7 6.5 6 200 250 300 350 400 450 500 550 Yearday ⇒ Need to filter temperature data to remove rapid fluctuations DSP in real life example: moving average filters Zoom in on temperature sensor #1 (197m) 9.5 Temperature (degrees C) • Black line shows output of a 7-point causal moving average filter 9 8.5 Original Filtered w/7pt causal moving average 8 210 211 212 213 214 215 Yearday Note: filtered signal appears somewhat time-shifted compared to original. Can we implement a non-causal filter? ⇒ DSP in real life example: non-causal moving-average filter Implement non-causal filtering by running this signal through a causal moving average filter and then time shifting the output! Zoom in on temperature sensor #1 (197m) 9.5 Temperature (degrees C) • Blue line shows output of a 7-pt non-causal moving average 9 8.5 Original Filtered w/7pt non−causal moving average 8 210 211 212 213 214 215 Yearday What happens when we change the length of the moving average filter? DSP in real life example: changing length of moving average filter Zoom in on temperature sensor #1 (197m) 9.5 Temperature (degrees C) • Blue line for a 7-point non-causal moving average filter 9 8.5 Original Filtered w/7pt non−causal moving average Mystery filter 8 210 211 212 213 214 215 Yearday What was green line processed with? 3-point moving avg? 7-point moving avg? 73-point moving avg? In-class 2: Frequency-response of 7-pt causal moving average Magnitude 1 jω |H(e )| 0.8 0.6 0.4 0.2 0−π −0.8π −0.6π −0.4π −0.2π π 0 0.2π ω Phase 0.4π 0.6π 0.8π π What is output of the system for the following inputs? π 1. x1[n] = ej 5 n ∠ H(ejω) 0.5π 2. x2[n] = e−j 0 −0.5π −π −π −0.8π −0.6π −0.4π −0.2π 0 ω 0.2π 0.4π 0.6π 0.8π π 4π n 7