Discrete Time Systems

Similar documents
Digital Signal Processing Lecture 3 - Discrete-Time Systems

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

Discrete-Time Fourier Transform (DTFT)

Lecture 2 OKAN UNIVERSITY FACULTY OF ENGINEERING AND ARCHITECTURE

Lecture 7 Discrete Systems

Digital Signal Processing: Signal Transforms

Like bilateral Laplace transforms, ROC must be used to determine a unique inverse z-transform.

Review of Discrete-Time System

Lecture 19 IIR Filters

EEL3135: Homework #4

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

EECE 301 Signals & Systems Prof. Mark Fowler

Very useful for designing and analyzing signal processing systems

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

Chap 2. Discrete-Time Signals and Systems

EE 521: Instrumentation and Measurements

Discrete Time Fourier Transform

EC Signals and Systems

Discrete-time signals and systems

EE482: Digital Signal Processing Applications

Discrete-Time David Johns and Ken Martin University of Toronto

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.

Lecture 04: Discrete Frequency Domain Analysis (z-transform)

Transform Analysis of Linear Time-Invariant Systems

PS403 - Digital Signal processing

Z Transform (Part - II)

Discrete Time Systems

LECTURE NOTES DIGITAL SIGNAL PROCESSING III B.TECH II SEMESTER (JNTUK R 13)

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

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 )

Digital Signal Processing Lecture 10 - Discrete Fourier Transform

Review of Fundamentals of Digital Signal Processing

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

Digital Signal Processing

E : Lecture 1 Introduction

ELC 4351: Digital Signal Processing

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

Digital Signal Processing. Midterm 1 Solution

Z-Transform. x (n) Sampler

z-transforms Definition of the z-transform Chapter

7.17. Determine the z-transform and ROC for the following time signals: Sketch the ROC, poles, and zeros in the z-plane. X(z) = x[n]z n.

Chapter 7: The z-transform

Lecture 3 January 23

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

Review of Fundamentals of Digital Signal Processing

CMPT 889: Lecture 5 Filters

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

ECE503: Digital Signal Processing Lecture 5

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

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

VI. Z Transform and DT System Analysis

ESE 531: Digital Signal Processing

/ (2π) X(e jω ) dω. 4. An 8 point sequence is given by x(n) = {2,2,2,2,1,1,1,1}. Compute 8 point DFT of x(n) by

Digital Signal Processing Lecture 4

How to manipulate Frequencies in Discrete-time Domain? Two Main Approaches

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

2.161 Signal Processing: Continuous and Discrete Fall 2008

Responses of Digital Filters Chapter Intended Learning Outcomes:

Chapter Intended Learning Outcomes: (i) Understanding the relationship between transform and the Fourier transform for discrete-time signals

Discrete-Time Signals and Systems. The z-transform and Its Application. The Direct z-transform. Region of Convergence. Reference: Sections

Frequency-Domain C/S of LTI Systems

z-transform Chapter 6

Solutions: Homework Set # 5

Digital Filters Ying Sun

The Discrete-Time Fourier

Lecture 11 FIR Filters

Module 4 : Laplace and Z Transform Problem Set 4

ESE 531: Digital Signal Processing

Stability Condition in Terms of the Pole Locations

y[n] = = h[k]x[n k] h[k]z n k k= 0 h[k]z k ) = H(z)z n h[k]z h (7.1)

ECE503: Digital Signal Processing Lecture 4

Ch. 7: Z-transform Reading

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

ELEG 305: Digital Signal Processing

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

Lecture 7 - IIR Filters

CHAPTER 2 RANDOM PROCESSES IN DISCRETE TIME

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

Digital Control & Digital Filters. Lectures 1 & 2

(i) Represent discrete-time signals using transform. (ii) Understand the relationship between transform and discrete-time Fourier transform

Lecture 9 Infinite Impulse Response Filters

Lecture 4: FT Pairs, Random Signals and z-transform

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

CMPT 318: Lecture 5 Complex Exponentials, Spectrum Representation

Detailed Solutions to Exercises

ECE-314 Fall 2012 Review Questions for Midterm Examination II

GEORGIA INSTITUTE OF TECHNOLOGY SCHOOL OF ELECTRICAL AND COMPUTER ENGINEERING

Complex symmetry Signals and Systems Fall 2015

Analog vs. discrete signals

(i) Understanding the characteristics and properties of DTFT

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

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

DSP-I DSP-I DSP-I DSP-I

Signals & Systems Handout #4

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

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EC2314- DIGITAL SIGNAL PROCESSING UNIT I INTRODUCTION PART A

Z-Transform. The Z-transform is the Discrete-Time counterpart of the Laplace Transform. Laplace : G(s) = g(t)e st dt. Z : G(z) =

ELEG 305: Digital Signal Processing

DIGITAL SIGNAL PROCESSING. Chapter 3 z-transform

Transcription:

Discrete Time Systems Valentina Hubeika, Jan Černocký DCGM FIT BUT Brno, {ihubeika,cernocky}@fit.vutbr.cz 1

LTI systems In this course, we work only with linear and time-invariant systems. We talked about them in the lexture Systems where we said that the system s output to an arbitrary input x[n] is computed as a convolution of the input signal and the system s impulse response h[n]: y[n] = h[n] x[n] = + k= x[k]h[n k]. For causal systems (that do not consider future samples) it reduces to: h[n] x[n] = n k= x[k]h[n k] = h[k]x[n k] k=0 This lecture deals with discrete systems, their behaviour in frequency and implementation. 2

Fundamental blocks of systems System is represented by a box with inputs x[n] and outputs y[n], where n is a pointer to the sample (discrete time). Fundamental blocks are: 3

Delay - holds a sample by one sampling period. When programming, it is a cell where the sample is placed at step n and returned at step n + 1. Denotation z 1 will be explained later. multiplication - multiplies a sample by a coefficient. addition -... A system from a previous lecture: 4

can be built up as: and we can simply verify that it corresponds to the above impulse response. We can compute its response to: 2 for n = 1 1 for n = 0 x[n] = 1 for n = 1 0 otherwise 5

Frequency Characteristic of a System The task of an LTI systems we are interested in is to modify a spectrum of an input signal. Similar as we did in previous lectures, to study its behaviour we submit a complex exponential to the system input: x[n] = e jω 1n, with normalized angular frequency ω 1 : y[n] = h[n] x[n] = h[k]x[n k] = k=0 h[k]e jω1(n k) = e jω 1n k=0 h[k]e jω1k, We see that the output signal is the input signal multiplied by a function of its angular frequency and the impulse response: H(e jω 1 ) = h[k]e jω 1k We can write: k=0 y[n] = x[n]h(e jω 1 ) again, only the width and the initial phase of the input complex exponential is changed. 6 k=0

We call H(e jω 1 ) a transfer and define it for an arbitrary (normalized!) frequency. We then get a (complex) frequency characteristic function: H(e jω ) = h[k]e jωk k=0 NOTE, that the frequency characteristic is a DTFT-projection of impulse response: h[n] DTFT H(e jω ) 7

The properties are: periodicity of spectrum (also impulse response is a discrete signal!) we should have correctly denoted H(e jω ) as H(e jω ): in normalized angular frequencies: 2π rad in regular angular frequencies: 2πF s rad/s in normalized frequencies: 1 in regular frequencies: F s Hz symmetry: H(e jω ) = H (e jω ) Example: frequency characteristic for impulse response 3 2 1. F s = 8000 Hz. 8

3 h 2 1 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 module 6 5 4 3 2 10 5 0 5 10 phase 0.5 0 0.5 10 5 0 5 10 9

6 normalized omega 6 omega 5 5 4 4 3 3 2 2 10 5 0 5 10 1 0.5 0 0.5 1 x 10 5 6 normalized f 6 f 5 5 4 4 3 3 2 2 2 1 0 1 2 1 0 1 x 10 4 10

System s response to a harmonic signal x[n] = C 1 cos(ω 1 n + φ 1 ) = C 1 2 ejφ 1 e jω 1n + C 1 2 e jφ 1 e jω 1n Componennts are multiplied by the complex characteristic values H(e jω 1 ) and H(e jω 1 ) that are complex conjugate, thus: y[n] = H(e jω 1 ) C 1 2 ejφ 1 e jω 1n + H (e jω 1 ) C 1 2 e jφ 1 e jω 1n = = C 1 H(e jω 1 ) cos(ω 1 n + φ 1 + arg H(e jω 1 )) 11

Non-recursive and recursive systems In the previous example we saw a filter that processes the actual and delayed samples of an input signal. It s impulse response is finite - finite impulse response FIR - non-recursive filters. In recursive filters, we take into account also delayed samples of the output (feed-back), e.g.: 12

Such a filter has the following impulse response: 0 for n < 0 h[n] = 1 a ( a) 2 ( a) 3... for n = 0, 1, 2, 3,... or: h[n] = 0 pro n < 0 ( a) n pro n 0 The impulse response is infinite - infinite impulse response IIR. The example filter is pure recursive. 13

General recursive system y(n) x(n) z -1 z -1... z -1 b Q Σ... z -1 z -1 z -1 b Q-1 b Q-2 -a -a 1 2...... b 1 -a P-1 output can be written by a difference equation: b 0 -a P The y[n] = Q b k x[n k] k=0 P a k y[n k], (1) k=1 where x[n k] are actual and delayed samples of the input and y[n k] are delayed 14

samples of the output (note coeff. at sums). types of filters again: FIR non-recursive: only b 0...b Q are non-zero. The impulse response is given directly by the coefficients of the filter: 0 for n < 0 and for n > Q h[n] = for 0 n Q IIR pure recursive: only b 0, a 1...a P are non-zero values. IIR generally recursive: a i and b i are non-zero values. b n 15

z-transform similarly as Laplace transform in continuous domain, it helps us to describe discrete signals and systems using complex variable z. z-transform is defined as: X(z) = n= x[n]z n, where z is a complex variable. We denote: x[n] Z X(z) and the inverse transform: X(z) Z 1 x[n] (we will not use the inverse trqansform) 16

We are not interested in computing the z-transform but rather in the following 3 properties: 1. Linearity: x 1 [n] X 1 (z) x 2 [n] X 2 (z) ax 1 [n] + bx 2 [n] ax 1 (z) + bx 2 (z) 2. Delay of a signal: x[n] X(z) x[n k] x[n k]z n = x[n]z n k = z k n= n= The most relevant is a 1 sample delay: n= x[n]z n = z k X(z) x[n 1] z 1 X(z) This is why we represent it as 17 z -1

3. Relationship to DTFT: Fourier transform with discrete time computes a spectrum of a signal with discrete time: X(e jω ) = n= x[n]e jωn it resembles ZT, if from the whole complex plane z we use only e jω : X(e jω ) = X(z) z=e jω, where ω is a normalized angular frequency. It can be understood that DTFT is ZT on the uit circle. One period of the unit circle is 2π, which is an additional proof that DTFT is periodic... 18

Transfer function of a recursive system For a system we define a transfer function as: H(z) = Y (z) X(z) Transfer function of a system is obtained by z-transforming the difference equation. ZT is linear and for a delayed signal x[n k] we write X(z)z k : y[n] = Q b k x[n k] P a k y[n k] Y (z) = Q b k X(z)z k P a k Y (z)z k k=0 k=1 k=0 k=1 19

After a re-arrangement of components: Y (z) + P a k Y (z)z k = k=1 Q b k X(z)z k k=0 and we get the transfer function: H(z) = Y (z) X(z) = 1 + Q b k z k k=0 = P a k z k k=1 B(z) A(z), where A(z) and B(z) are two polynomials. The coefficient a 0 has to be equal to 1 eventhough it does not accure physically in the filter. It is a matimatical trick to denote that the filter has an output. 20

Frequency characteristics of a filter we substitute z by e jω and calculate the tranfrom for ω in the interval we are interested in mostly from 0 to π (half of the sampling frequency): H(e jω ) = H(z) z=e jω = 1 + Q b k e jωk k=0 P a k e jωk k=1 The equation looks difficult but we can easily evaluate it in Matlab using function freqz(b,a,n), where vectors a and b contain polynoms coefficients and N indicate the number of samples (from 0 to the half of the sampling frequency). 21

ω=π/2~fs/4 Im +j "z" exp(j ω) ω=π~fs/2 1 0 1 ω=2π=0 ~0~Fs Re j ω=3/2π~3/4fs 22

Nulls and poles of H(z) function and what with them... Transfer function can be also defined as a product: H(z) = B(z) A(z) = b 0 + b 1 z 1 +... + b Q z Q 1 + a 1 z 1 +... + a P z P = z Q (b 0 z Q + b 1 z Q 1 +... + b Q ) z P (z P + a 1 z P 1 +... + a P ) = = b 0 z Q z P Q (z n k ) k=1 P (z p k ) k=1 = b 0 z P Q Q (z n k ) k=1 P (z p k ), n k are called nulls. These are the points in the plane z for which holds B(z) = 0 and therefore H(z) = 0. p k are called poles. These are the points in the plane z for which A(z) = 0 and therefore H(z) =. k=1 23

If a k, b k R, then poles p k and nulls n k are either real or complex conjugate. If the orders of numerator and denominator are different, then z P Q is responsible for (P Q)-fold null in the origin, if P is greater than Q. (Q P)-fold pole in the origin, if P is less than Q. Stability System is stable, if all poles lie within unity circle: p k < 1 24

Frequency characteristic from nulls and poles Similarly as for continuous time sytems, we can estimate frequncy characteristic H(e jω ) from the nulls and poles of a system: H(e jω ) = b 0 z (Q P) Q (z n k ) k=1 P (z p k ), k=1 jω(p Q) z=e jω = b 0 e Q (e jω n k ) k=1 P (e jω p k ), For a given e jω each braces is a complex number that we can comprehend as a vector from the null or pole point to the point e jω. To obtain a value of a complex characteristic for a given frequency ω we : multiply modules of all the numbers from the numerator and sum up arguments. divide mudules of all the numbers from the denominator and subtract arguments. Term e jω(p Q) is other than 1 only in case when the order of the polynoms differs nulls or poles in the origin the magnitude of the complex characteristics remains unmodified, the change occurs in the argument only. 25 k=1

Examples Example 1. Non-recursive filter is defined by a difference equation: 1. What is its impulse response? y[n] = x[n] + 0.5x[n 1] 2. Find parameters of the transfer function (coef a, b).? 3. Compute frequency characteristic? 4. Is the filter stable? 5. Find freq. charfacteristic from nulls and poles. Solution 1. h[n] = 1, 0.5 for n = 0, 1, and zero elsewhere. 2. Y (z) = X(z) + 0.5X(z)z 1 Y (z) = X(z)[1 + 0.5z 1 ] H(z) = 1 + 0.5z 1 = 1+0.5z 1 1, thus b 0 = 1, b 1 = 0.5, a 0 = 1. 26

3. We could use substitution z = e jω, but we rather call a Matlab function: 1.5 H=freqz([1 0.5],[1],256); om=(0:255)/256 * pi; subplot(211); plot(om,abs(h)); grid subplot(212); plot(om,angle(h)); grid 1 0.5 0 0.5 1 1.5 2 2.5 3 3.5 0 0.2 0.4 0.6 0 0.5 1 1.5 2 2.5 3 3.5 27

The filter is a low pass filter: 4. nulls and poles: H(z) = 1+0.5z 1 1 = z(1+0.5z 1 ) z = z+0.5 z Numerator is zero for z = 0.5, thus, filter has 1 null point n 1 = 0.5. Denominator becomes zero for z = 0, thus one pole: p 1 = 0 1 0.8 0.6 0.4 Imaginary Part 0.2 0 0.2 0.4 0.6 0.8 the filter is stable. 5. frequency characteristics from nulls and poles: H(z) = z ( 0.5) z 0 H(e jω ) = ejω ( 0.5) e jω 0 28 1 1 0.5 0 0.5 1 Real Part

Example 2. Recursive filter is defined by a difference equation: y[n] = x[n] 0.5y[n 1] 1. infinite impulse response: 1 0.5 0 0.5 0 5 10 15 20 25 30 2. Y (z) = X(z) 0.5Y (z)z 1 Y (z)[1 + 0.5z 1 ] = X(z) 1 H(z) = 1+0.5z, 1 thus b 0 = 1, a 0 = 1, a 1 = 0.5. 3. H=freqz([1],[1 0.5],256); om=(0:255)/256 * pi; subplot(211); plot(om,abs(h)); grid subplot(212); plot(om,angle(h)); grid 29

2 1.5 1 0.5 0 0.5 1 1.5 2 2.5 3 3.5 0.6 0.4 0.2 0 0 0.5 1 1.5 2 2.5 3 3.5 High pass filter z z(1+0.5z 1 ) = z z+0.5 1 4. null and poles: H(z) = 1+0.5z = Numerator is 1 zero for z = 0, one zero: n 1 = 0. Denominator is zero for z = 0.5, one pole: p 1 = 0.5 30

1 0.8 0.6 0.4 Imaginary Part 0.2 0 0.2 0.4 0.6 0.8 filter is stable. 1 1 0.5 0 0.5 1 Real Part 5. frequency characteristic: H(z) = z 0 z ( 0.5) H(e jω ) = ejω 0 e jω ( 0.5) 31

Excercise 3. Real filter: In matlab we have found the parameters of a low-pass filter: sampling freq 16000 Hz. end of pass band 3000 Hz. begin of stop band 3500 Hz. max. attenuation in pass band 3 db min. attenuation in stop band 40 db. How did we do it? Fs = 16000; Wp = 3000/8000; Ws = 3500/8000; Rp = 3; Rs = 40; [N, Wn] = ellipord(wp, Ws, Rp, Rs) [B,A] = ellip(n,rp,rs,wn) 32

We obtained a filter with order 5. The coefficients in the numerator are: b 0 = 0.0378, b 1 = 0.0235, b 2 = 0.0592, b 3 = 0.0592, b 4 = 0.0235, b 5 = 0.0378 The denominator coefficients are: a 0 = 1, a 1 = 2.5271, a 2 = 3.8031, a 3 = 3.3632, a 4 = 1.8395, a 5 = 0.5112. Frequency characteristics, poles and nulls: figure(1); freqz (B,A,256,16000); figure(2); zplane(roots(b), roots(a)); 33

Magnitude Response (db) 20 0 20 40 60 80 0 1000 2000 3000 4000 5000 6000 7000 8000 Frequency (Hertz) 0 Phase (degrees) 100 200 300 400 500 0 1000 2000 3000 4000 5000 6000 7000 8000 Frequency (Hertz) 34

1 0.5 Imaginary part 0 0.5 1 1 0.5 0 0.5 1 Real part 35

The filter is just stable but due to possible numerical error it can become unstable. If a pole is close to the unit circle, it determines the maximum of the filter If a null is close to the unit circle, it determines the minimum of the filter 36