Lecture 3, Multirate Signal Processing

Similar documents
Digital Signal Processing 2/ Advanced Digital Signal Processing Lecture 11, Complex Signals and Filters, Hilbert Transform Gerald Schuller, TU Ilmenau

Multirate Signal Processing Lecture 7, Sampling Gerald Schuller, TU Ilmenau

Filter Banks I. Prof. Dr. Gerald Schuller. Fraunhofer IDMT & Ilmenau University of Technology Ilmenau, Germany. Fraunhofer IDMT

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

Multirate Digital Signal Processing

Solution Set for Mini-Project #2 on Octave Band Filtering for Audio Signals

Transforms and Frequency Filtering

Design of FIR Filters

LABORATORY - FREQUENCY ANALYSIS OF DISCRETE-TIME SIGNALS

Lecture 3 Complex Exponential Signals

Basic Signals and Systems

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

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

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

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

SMS045 - DSP Systems in Practice. Lab 1 - Filter Design and Evaluation in MATLAB Due date: Thursday Nov 13, 2003

Signal Processing Summary

Project I: Phase Tracking and Baud Timing Correction Systems

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

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

Window Method. designates the window function. Commonly used window functions in FIR filters. are: 1. Rectangular Window:

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

Discrete Fourier Transform, DFT Input: N time samples

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

FFT analysis in practice

Signal Processing for Speech Applications - Part 2-1. Signal Processing For Speech Applications - Part 2

DFT: Discrete Fourier Transform & Linear Signal Processing

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

Lecture 4 Frequency Response of FIR Systems (II)

EE 422G - Signals and Systems Laboratory

Sampling and Reconstruction of Analog Signals

Frequency Division Multiplexing Spring 2011 Lecture #14. Sinusoids and LTI Systems. Periodic Sequences. x[n] = x[n + N]

EEM478-WEEK8 Finite Impulse Response (FIR) Filters

6.02 Practice Problems: Modulation & Demodulation

Lecture Schedule: Week Date Lecture Title

ELECTRONOTES APPLICATION NOTE NO Hanshaw Road Ithaca, NY Nov 7, 2014 MORE CONCERNING NON-FLAT RANDOM FFT

Signal Processing. Naureen Ghani. December 9, 2017

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

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

Discrete Fourier Transform (DFT)

Problem Set 1 (Solutions are due Mon )

6.02 Fall 2012 Lecture #13

Digital Filters FIR and IIR Systems

CS3291: Digital Signal Processing

MITOCW MITRES_6-007S11lec18_300k.mp4

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

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

FX Basics. Filtering STOMPBOX DESIGN WORKSHOP. Esteban Maestre. CCRMA - Stanford University August 2013

6.02 Fall 2012 Lecture #12

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

Brief Introduction to Signals & Systems. Phani Chavali

ECE 429 / 529 Digital Signal Processing

Lecture 7 Frequency Modulation

DISCRETE FOURIER TRANSFORM AND FILTER DESIGN

Frequency Domain Representation of Signals

Discrete Fourier Transform

Signal processing preliminaries

Signals and Systems Lecture 6: Fourier Applications

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

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

5650 chapter4. November 6, 2015

PYKC 27 Feb 2017 EA2.3 Electronics 2 Lecture PYKC 27 Feb 2017 EA2.3 Electronics 2 Lecture 11-2

George Mason University ECE 201: Introduction to Signal Analysis Spring 2017

It is the speed and discrete nature of the FFT that allows us to analyze a signal's spectrum with MATLAB.

Laboratory Assignment 4. Fourier Sound Synthesis

Fourier and Wavelets

ELEC Dr Reji Mathew Electrical Engineering UNSW

EE 311 February 13 and 15, 2019 Lecture 10

SAMPLING THEORY. Representing continuous signals with discrete numbers

GEORGIA INSTITUTE OF TECHNOLOGY. SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 2026 Summer 2018 Lab #8: Filter Design of FIR Filters

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

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

Electrical & Computer Engineering Technology

Linear Time-Invariant Systems

CHAPTER 6 INTRODUCTION TO SYSTEM IDENTIFICATION

Department of Electronic Engineering NED University of Engineering & Technology. LABORATORY WORKBOOK For the Course SIGNALS & SYSTEMS (TC-202)

Lab 4 An FPGA Based Digital System Design ReadMeFirst

Phase demodulation using the Hilbert transform in the frequency domain

Narrow-Band Low-Pass Digital Differentiator Design. Ivan Selesnick Polytechnic University Brooklyn, New York

Signals and Systems Lecture 6: Fourier Applications

DCSP-3: Minimal Length Coding. Jianfeng Feng

Lecture 17 z-transforms 2

EEO 401 Digital Signal Processing Prof. Mark Fowler

ECE 2713 Homework 7 DUE: 05/1/2018, 11:59 PM

Jawaharlal Nehru Engineering College

+ a(t) exp( 2πif t)dt (1.1) In order to go back to the independent variable t, we define the inverse transform as: + A(f) exp(2πif t)df (1.

Digital Processing of Continuous-Time Signals

Final Exam Practice Questions for Music 421, with Solutions

Complex Digital Filters Using Isolated Poles and Zeroes

SECTION 7: FREQUENCY DOMAIN ANALYSIS. MAE 3401 Modeling and Simulation

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering. EIE2106 Signal and System Analysis Lab 2 Fourier series

Digital Processing of

Project 2. Project 2: audio equalizer. Fig. 1: Kinter MA-170 stereo amplifier with bass and treble controls.

Spectrum Analysis - Elektronikpraktikum

DSP First Lab 08: Frequency Response: Bandpass and Nulling Filters

Lab 4 Digital Scope and Spectrum Analyzer

Phase demodulation using the Hilbert transform in the frequency domain

PROBLEM SET 5. Reminder: Quiz 1will be on March 6, during the regular class hour. Details to follow. z = e jω h[n] H(e jω ) H(z) DTFT.

Digital Signal Processing ETI

Digital Signal Processing ETI

Transcription:

Lecture 3, Multirate Signal Processing Frequency Response If we have coefficients of an Finite Impulse Response (FIR) filter h, or in general the impulse response, its frequency response becomes (using the Discrete Time Fourier Transform): H ω = n= h n e j nω So here we already have 2 different ways to describe a system or a signal, by its impulse response in the time or space domain (depending on if it is audio or images), and by its frequency response. They are related by this Discrete Time Fourier Transform. Example: If we have an amplifier which is described by its frequency response (including the phase), then we can obtain the time domain version, its impulse response by taking the inverse Fourier Transform of its frequency response. This can be seen as the output of our amplifier if the input is a single impulse (because an impulse has a flat spectrum, and hence the name impulse response ). The output of the amplifier is then the convolution of the input signal (in timedomain) with the impulse response.

In practice usually an impulse is not used (not enough energy or it could destroy the system) but often white noise is input into our amplifier, and then the output is Fourier transformed to obtain its frequency response. White noise has the advantage that it has more energy without destroying the system, and it has an approximately constant spectrum (like the impulse). Another often used method is a sweeping sinusoid, with increasing frequency and constant amplitude. This often gives more precise results but takes longer to measure. The resulting measured frequency response is then inverse Fourier transformed to obtain its impulse response. If we have the z-transform, we obtain the frequency response of our system or signal if we replace z=e j. In this case the z-transform becomes the DTFT (the transform formulas become identical). This is like reading out the z-transform along the unit circle in the complex domain of the z-transform:

The periodicity of our frequency domain can also be seen easily here.

Here we can see that in general we obtain a 2 periodicity in the frequency domain. For real valued signals, the upper half of the circle has a frequency response which is symmetric to the lower half (conjugate complex), and hence strictly speaking we get some sort of pi periodicity for real valued signals (hence Nyquist's Theorem which states that we only can reconstruct frequencies below half the sampling frequency for real valued signals). Hence for real valued signals only one half of the unit circle is unique. For complex signals, both halves of the unit circle can contain different frequency responses, and hence there we indeed have 2 periodicity, and we could reconstruct frequencies up to 2. We can imagine complex signals or frequencies as consisting of 2 signals, one for the real part and one for the imaginary part. For instance in stereo audio signals, the left channel could be seen as a real part and the right channel as an imaginary part of a complex audio signal. The same for negative frequencies: e j ω n They consist of a cosine real part and a -sine imaginary part. This unit circle, if it describes an input signal X(z) (for instance a certain frequency), is the input to the z-

Transform H(z), by replacing the z by e j, to obtain the frequency response H e j. You can imagine for instance the magnitude of the resulting frequency response as an additional dimension on top of this circle. If you plot the frequency response for real valued signals, for instance in Python, what is usually done is to plot the upper half of this unit circle. For real valued signals the lower half is symmetric to it. Example: Low Pass filter as Moving Average If our input is the signal x(n) and the output of our low pass filter is y(n), then it can be computed as y n = 1 2 x n 1 2 x n 1 What is the corresponding impulse response of this filter? It is the response of this system to a unit impulse (x(0)=1, x(n)=0 elsewhere): h(0)= y (0)= 1 2, h(1)= y (1)= 1 2. This can also be written as a vector: h=[ 1 2, 1 2 ] Hence the output is the convolution with this vector, y=x h.

Observe: The convolution or filtering operation can also be written as a multiplication of the signal vector and a so-called Sylvester Matrix: [ ]=[ ] [.. y(0) x( 1) ] 0.5 0.5 0. y (1) 0 0.5 0.5 x(0) y(2) 0 0 0.5 0.5 x(1).. We also use the following matrix formulation for y(0) y (1) convolution,[ ]=[ x( 1) x(0) x (0) x(1) ] [ 0.5] y(2) x(1) x(2) What is the frequency response of this moving average low pass filter? The z-transform of this filter is H (z)= h(n) z n =0.5 z 0 +0.5 z 1 n=0 Replacing z by e j ω gives us the frequency response of this low pass filter, H ω = n= h n e j n =0.5 0.5 e j

This is the complex frequency response. Often we are interested in the magnitude (or absolute value) of this frequency response, because we would like to see how much a signal at a certain frequency is attenuated. An example might be an equalizer filter, which has the goal to obtain an overall frequency response which has a flat magnitude, for instance to equalize an audio amplifier. If the amplifier has e.g. an attenuation of 0.5 at a certain frequency, we need the equalizer filter to have an amplification of magnitude 2 at that frequency. In this way we obtain a constant magnitude of amplification at all frequencies. But observe that the phase of our complex frequency response can still be different for all frequencies. So our magnitude frequency response is, H ω = 0.5 0.5 e j ω We can compute the frequency response using Python, using the z-transform: ipython --pylab #Impulse response: h=[0.5,0.5] import sympy z=sympy.symbols('z') #z-transform: Hz=sympy.Poly(np.flipud(h), z**(-1))

#The desired omegas, #100 sample points of angle between 0 and pi: omega=linspace(0,pi, 100) #initialize freq. Resp. with complex #zeros: H=zeros(len(omega))*1j #replace z by exp(-1j*omega) (we replace z^-1 in the argument): for k in range(len(omega)): H[k]=Hz(exp(-1j*omega[k])) #magnitude response: plot(omega,abs(h)) xlabel('normalized Frequency') ylabel('magnitude') title('magnitude Frequency Response')

#The db scale for the magnitude shows #more detail in the stop band: plot(omega,20*log10(abs(h))) axis([0,3.14,-40,0]) xlabel('normalized Frequency') ylabel('attenuation in db') title('magnitude Frequency Response')

#phase response: plot(omega,angle(h)) xlabel('normalized Frequency') ylabel('phase') title('phase Frequency Response')

#Or, using the freqz function: import scipy.signal as signal omega, H =signal.freqz(h) where H is an array of the complex values of the frequency response, and omega is an array containing the normalized frequencies at which the frequency response was evaluated.

We see that at frequency 0 the magnitude response has the magnitude 1, hence no attenuation (important for a low pass). At frequency ω=π it has magnitude 0, which is also suitable for a low pass. In between it behaves like a cosine does, it slowly reduces, so not really like a perfect low pass, which should have frequency response which looks more like brick shaped (1 at the entire passband, 0 at the entire stop band, ideally). So it is far from being a perfect low pass filter. We also have the phase of the frequency response. We see that it is linear function, which is particularly important for image processing. The phase is the angle of H ω. The vertical axis on a db scale let us see the small values of the stop band better, which works for both power and voltage/current. Observe: The db numbers are using the input of the filter as a reference. Hence the db number results from 20*log10 of output voltage over input voltage. Remark: You need to be familiar with db computations. You need to be able to answer e.g. following questions: What is the definition of db for voltage and for power? What is the ( voltage ) ratio of 0.1 in db? What is the (voltage) ratio of -20 db? What is the (voltage) ratio of 6 db?

You have 2 systems in a row, the first with -6 db attenuation, the next with -10 db attenuation. What is the total atennuation? If you have trouble with one of the questions, look it up at Wikipedia or in literature. Now also observe the phase plot. We see the phase response is ω/2, which is linear in ω with a slope of ½, which is why we have a linear phase in this case. Hence we also call our filter a linear phase filter. High Pass Example We can do the same analysis for the high pass filter with the impulse response h=[ 0.5, 0.5] In the same way as for the low pass, we obtain its magnitude of the frequency response in Python as ipython --pylab import scipy.signal as signal h=[0.5, -0.5] omega, H=signal.freqz(h) plot(omega,20*log10(abs(h))) axis([0,3.14,-40,0]) xlabel('normalized Frequency')

ylabel('attenuation in db') title('magnitude Frequency Response') By looking at frequency ω=0 we obtain a magnitude of 0, and at ω=π we obtain a magnitude of 1, as we would expect from a high pass. But again, between those points it behaves like a sinusoid, far from a perfect high pass.

This looks like the (frequency) flipped version of our low pass filter.