The Impulse Signal. A signal I(k), which is defined as zero everywhere except at a single point, where its value is equal to 1

Similar documents
Damped Oscillators (revisited)

Recursive, Infinite Impulse Response (IIR) Digital Filters:

Harmonic motion. time 1 - A. Wednesday, September 30, 2009

Lecture 19 IIR Filters

Digital Signal Processing Lab 4: Transfer Functions in the Z-domain

z as shift (delay) operator

Discrete Time Systems

David Weenink. First semester 2007

Formant Analysis using LPC

EECE 301 Signals & Systems Prof. Mark Fowler

Discrete-time signals and systems

The Z-Transform. For a phasor: X(k) = e jωk. We have previously derived: Y = H(z)X

(Refer Slide Time: )

APPLIED SIGNAL PROCESSING

Lecture 2 OKAN UNIVERSITY FACULTY OF ENGINEERING AND ARCHITECTURE

Optimal Polynomial Control for Discrete-Time Systems

DSP. Chapter-3 : Filter Design. Marc Moonen. Dept. E.E./ESAT-STADIUS, KU Leuven

z-transforms Definition of the z-transform Chapter

Analysis of Discrete-Time Systems

E : Lecture 1 Introduction

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

EE 4343/ Control System Design Project LECTURE 10

Chapter 3 Data Acquisition and Manipulation

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

Introduction to DSP Time Domain Representation of Signals and Systems

Ch. 7: Z-transform Reading

Temporal Backpropagation for FIR Neural Networks

EECE 301 Signals & Systems Prof. Mark Fowler

ELEG 305: Digital Signal Processing

V. IIR Digital Filters

ECE503: Digital Signal Processing Lecture 6

Responses of Digital Filters Chapter Intended Learning Outcomes:

Detailed Solutions to Exercises

Lecture 16 FREQUENCY RESPONSE OF SIMPLE CIRCUITS

(i) Understanding the characteristics and properties of DTFT

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

2. Typical Discrete-Time Systems All-Pass Systems (5.5) 2.2. Minimum-Phase Systems (5.6) 2.3. Generalized Linear-Phase Systems (5.

ECE503: Digital Signal Processing Lecture 5

Dynamical Representation

EE482: Digital Signal Processing Applications

w n = c k v n k (1.226) w n = c k v n k + d k w n k (1.227) Clearly non-recursive filters are a special case of recursive filters where M=0.

Analysis of Discrete-Time Systems

Introduction to Digital Signal Processing

The Sommerfeld Polynomial Method: Harmonic Oscillator Example

Discrete-Time Fourier Transform

# 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.

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

a( i), where N i N ) is accurately d( i), where N i N. The derivative at ( ) ( ) ( )

CMPT 889: Lecture 5 Filters

Digital Filters. Linearity and Time Invariance. Linear Time-Invariant (LTI) Filters: CMPT 889: Lecture 5 Filters

Signal Processing First Lab 11: PeZ - The z, n, and ˆω Domains

10/8/2015. Control Design. Pole-placement by state-space methods. Process to be controlled. State controller

Time Series Analysis: 4. Linear filters. P. F. Góra

Stability and Frequency Response of Linear Systems

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

DSP First. Laboratory Exercise #10. The z, n, and ˆω Domains

CBE507 LECTURE III Controller Design Using State-space Methods. Professor Dae Ryook Yang

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 )

Use: Analysis of systems, simple convolution, shorthand for e jw, stability. Motivation easier to write. Or X(z) = Z {x(n)}

Time Series Analysis: 4. Digital Linear Filters. P. F. Góra

EE 313 Linear Signals & Systems (Fall 2018) Solution Set for Homework #7 on Infinite Impulse Response (IIR) Filters CORRECTED

EE 311 February 22, 2019 Lecture 13

DFT Octave Codes (0B) Young Won Lim 4/15/17

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

Lecture 3 Matlab Simulink Minimum Phase, Maximum Phase and Linear Phase Systems

Problem Set 9 Solutions

Analog vs. discrete signals

EECE 301 Signals & Systems

Chapter Six. Infinite Impulse Response Filters

FFT Octave Codes (1B) Young Won Lim 7/6/17

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

Trajectory tracking control and feedforward

12.1 Arithmetic Progression Geometric Progression General things about sequences

DIGITAL SIGNAL PROCESSING LABORATORY

Analog LTI system Digital LTI system

EEL3135: Homework #4

Design IIR Butterworth Filters Using 12 Lines of Code

Cast of Characters. Some Symbols, Functions, and Variables Used in the Book

ECE4270 Fundamentals of DSP Lecture 20. Fixed-Point Arithmetic in FIR and IIR Filters (part I) Overview of Lecture. Overflow. FIR Digital Filter

1 Introduction & Objective. 2 Warm-up. Lab P-16: PeZ - The z, n, and O! Domains

Chapter 7: Filter Design 7.1 Practical Filter Terminology

Two-Dimensional Systems and Z-Transforms

Thursday, October 29, LPC Analysis

SIGNALS AND SYSTEMS LABORATORY 4: Polynomials, Laplace Transforms and Analog Filters in MATLAB

Digital Signal Processing: Signal Transforms

Digital Signal Processing

Lecture 3 - Design of Digital Filters

Pole Placement (Bass Gura)

Velocity estimates from sampled position data

Discrete-Time David Johns and Ken Martin University of Toronto

Digital Signal Processing

SAMPLE SOLUTION TO EXAM in MAS501 Control Systems 2 Autumn 2015

University of Waterloo Department of Electrical and Computer Engineering ECE 413 Digital Signal Processing. Spring Home Assignment 2 Solutions

Discrete-time models and control

Control Systems Lab - SC4070 Control techniques

Filter Description. Direct form FIR transposed. Direct form FIR. Lattice coupled-allpass. Lattice autoregressive (AR). Lattice ARMA.

Signals and Systems. Spring Room 324, Geology Palace, ,

Z-Transform. x (n) Sampler

Digital Filter Structures. Basic IIR Digital Filter Structures. of an LTI digital filter is given by the convolution sum or, by the linear constant

CE 513: STATISTICAL METHODS

Transcription:

The Impulse Signal A signal I(k), which is defined as zero everywhere except at a single point, where its value is equal to 1 I = [0 0 1 0 0 0]; stem(i)

Filter Impulse through Feedforward Filter 0 0.25.5.25 0 b= [.25.5.25]

The Impulse Response The response of a filter to an impulse signal is referred to as the impulse response of that filter. In the case of a feedforward filter, the impulse response will be the sequence of filter coefficients themselves! This gives us a new interpretation of the filter coefficient vector b it is, in fact, the time signal produced by the filter in response to an impulse.

Given the definition of a feedforward filter: Y(k) = b(1)*x(k) + b(2)*x(k-1) +... + b(m)*x(k-m+1) why should we expect this impulse response? Implications: The number of non-zero points in the response will be equal to the number of coefficients. The length of the impulse response will always be finite. Filters of this type (feedforward) are also known as Finite Impulse Response filters, or FIR filters. If we are handed a feedforward filter with an unknown transfer function (a black box), we can characterize it precisely by seeing how it behaves to the impulse response.

Feedforward (FIR) Filters... a review Three salient properties of a filter of this kind: there are no feedback pathways output is a finite sequence if the input is a finite sequence the transfer function H(z) can be represented as polynomial in negative powers of z. Advantages: simplicity: designing and building one is easy phase: it is possible to keep phase linear, which is desirable for some (mainly recording) applications

Feedback Filters (IIR) Feedback: the value of the output sample value at a given point, Y(k), is dependent on previous values of the output. Three important properties of a filter of this kind: output is an infinite sequence even if the input is a finite sequence there are feedback pathways from the output to input the transfer function H(z) can be represented as a ratio of two polynomials in negative powers of z

X(k) * Y(k) D b(1) * (FIR) D b(2) * b(3) X(k) Y(k) D * -a(1) * D (IIR) -a(2)

A Simple Feedback (IIR) Filter Y(k) = X(k) + 0.5*Y(k-1) Impulse Impulse Response

Feedback filter is a dynamical system I Equation (or set of equations) that quantitatively describes the change in something over time. I Two parts: 1. State of the system (quantity whose change is being described) I amount of money in the bank I number of individuals in a population I volume of water in a bathtub I activation level of a neuron I the concentration of Sodium in a solution I the speed of tra conthe101 I the temperature in a room 2. Rule for how the state changes, depending on the current state. Current state predicts the state at the next instant in time. I System is constant, even while state is changing.

Example Dynamical System I State: Amount of water in bathtub (x) I Rule for change: Change in x = 1 2 x Time H20 1 100 2 50 3 25 4 12.5 Water in bathtub 100 90 80 70 60 50 40 30 20 10 5 6.25 0 0 5 10 15 Time x n+1 = x n + dx dx = kx x n+1 = x n + kx n x n+1 =(1+k)x n if k=-.5 x n+1 =.5x n x n =.5x n 1 y n =.5y n 1

Example Dynamical System I State: Amount of water in bathtub (x) I Rule for change: Change in x = 1 2 x Time H20 1 100 2 50 3 25 4 12.5 Water in bathtub 100 90 80 70 60 50 40 30 20 10 5 6.25 0 0 5 10 15 Time x n+1 = x n + dx dx = kx x n+1 = x n + kx n if k=-.5 x n+1 =.5x n if k=-1.5 x n+1 =.5x n x n+1 =(1+k)x n x n =.5x n 1 y n =.5y n 1 y n =.5y n 1

Simple Feedback (IIR) Filters Y(k) = X(k) - 0.5*Y(k-1) * Note that because of the negative sign, the system oscillates as it moves toward its asymptote

Transfer Functions for Simple (IIR) Filters Take the simple feedback filter: (3) Y = X -.5z-1Y Now rearrange terms: (4) X = Y+.5z-1Y X = (1 +.5z-1)Y The transfer function H(z) is the ratio of the the output to the input: (5) H(z) = Y = 1. X 1+ 0.5z -1

Amplitude Response for Simple (IIR) Filters Y(k) = X(k) - 0.5*Y(k-1) H(z) = Y = 1 X 1+ 0.5z -1 Impulse Response Transfer Function

Amplitude Response for Simple (IIR) Filters Y(k) = X(k) + 0.5*Y(k-1) H(z) = Y = 1. X 1-0.5z -1 Impulse Response Transfer Function

Transfer Functions for Simple (IIR) Filters Filter Equation Y = X -.5z -1 Y Transfer Function: H(z) = Y = 1. X 1+ 0.5z -1 Thus, just like moving average filters, the transfer function of this IIR filter involves a polynomial of terms in negative powers of z. In this case, however, the polynomial is the denominator of a ratio. The numerator equals 1 in this case, because there are no terms that delay and weight the input sequence (i.e. feedforward terms). If there were such terms there would be another polynomial in z in the numerator, derived exactly as we have before for moving average filters.

General Expression for Feedback (IIR) Filters Recall that the general expression that we derived for a moving average filter was as in (7): (7) Y(k) = b(1)*x(k) + b(2)*x(k-1) +... + b(m)*x(k-m+1) For a general recursive filter, including terms that can depend on both past input and past output, the expression is in (8): (8) Y(k) = b(1)*x(k) + b(2)*x(k-1) +... + b(m)*x(k-m+1) -a(1)*y(k-1) - a(2)*y(k-2) -... - a(l)*y(k-l) By convention, the terms that depend on previous output are subtracted, rather than added (if you want the contribution of the term to be positive you can, of course, chose a negative value for a).

Filtering in Matlab The filter function in MATLAB can be used to filter an input signal through a feedforward filter, a feedback filter, or both. Y = filter(b,a,x) % Y filtered signal % b vector of feedforward coefficients, numerator of transfer function % a - vector of feedback coefficients, denominator of transfer function % X input signal To filter with feedforward only, set a=1 filter([0.5 0.5], 1, X) To filter with feedback only, set b=1 filter(1, [1 0.5], X) * Note that the first element of the vector of a coefficients must be one. This is the coefficient of the undelayed output on the output. If you think about it, it has to be 1. So a(1) in equation (8) will be the second element of the a vector, a(2) the third element, etc.

General Expression for H(z) of a Feedback (IIR) Filter Using simple algebra like we employed in (3)-(5) above we can derive the following expression for the transfer function of a recursive filter: (9) H(z) = Y = b(1) + b(2)z -1 +... + b(m)z -(M-1). X 1+ a(1)z -1 +... + a(l)z -L Note that the extra 1 that is in the a vector shows up in the denominator here.

Poles H(z) = Y = b(1) + b(2)z -1 +... + b(m)z -(M-1). X 1+ a(1)z -1 +... + a(l)z -L The denominator polynomial will have roots, just as the numerator does. The roots of the denominator are values of z at which H(z) gets very large (possibly infinite). These roots are the poles of the filter.

function [mag phase] = transfer(b,a) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Calculate the Transfer Function %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % first find the number of coefficients (filter order) m = length(b); n = length(a); % fill a vector of test frequencies to plot nfreqs = 100; w = linspace(0, pi, nfreqs); % Compute a vector of z from w; % This will result in a vector of z's z = exp(j*w); % Create a vector Hnum that will eventually contain % the transfer function. % This first one will be for the numerator Hnum = zeros(1,nfreqs); % Compute Hnum by summing the terms of the polynomial in z for i=1:m Hnum = Hnum + b(i).* z.^ (-(i-1)); end

% Create a vector Hnum that will eventually contain % the transfer function. % This first one will be for the numerator Hden = zeros(1,nfreqs); % Compute Hnum by summing the terms of the polynomial in z for i=1:n Hden = Hden + a(i).* z.^ (-(i-1)); end H = Hnum./Hden; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Plot the results %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Magnitude (M) and Phase (P) outputs mag = abs(h); phase = angle(h); %Plot the Magnitude response subplot(3,1,1); plot(w/pi,mag); grid on; xlabel('frequency (pi radians)'); ylabel('magnitude');

%Plot the Phase response subplot(3,1,2); plot(w/pi,phase*180/pi); grid on; xlabel('frequency (pi radians)'); ylabel('phase (degrees)'); %Plot the zeros subplot(3,1,3); z = roots(b); scatter(real(z),imag(z),'ro'); hold on; t = 0:pi/32:2*pi; plot(cos(t),sin(t),'b'); axis('square'); axis([-1 1-1 1]); grid on; %Plot the poles p = roots(a); scatter(real(p),imag(p),'r+'); hold on; t = 0:pi/32:2*pi; plot(cos(t),sin(t),'b'); hold off return