Chapter 9 Analysis and Design of Digital Filter



Chapter 9 Analysis and Design of Digital Filter

9-1 Introduction

What designs have we done in this course?

What do we mean by filters here?

What do we mean by filters design?

Given specifications (requirements) => H(z)

Let’s see how we can implement a digital filter (processor) if its H(z) is given?

9-2 Structures of Digital Processors

1. Direct-Form Realization

[pic]

The function is realized!

What’s the issue here?

Count how many memory elements we need!

Can we reduce this number?

If we can, what is the concern?

[pic]

[pic]

Denote [pic]

Implement H2(z) and then H1(z) ?

Why H2 is implemented?

(1)[pic](2)

[pic]

H2 is realized!

Can you tell why H1 is realized?

What can we see from this realization? Signals at [pic] and [pic]: always the same

( Direct Form II Realization

[pic]

Example [pic]

Solution: [pic]

[pic]

Important: H(z)=B(z)/A(z) (1) A: 1+…. (2) Coefficients in A: in the feedback channel

2. Cascade Realization

Factorize [pic]

[pic]

[pic]

General Form

[pic]

Apply Direct II for each!

3. Parallel Realization (Simple Poles)

[pic]

Example 9-1

[pic]

cascade and parallel realization!

Solution:

1) Cascade:

[pic]

[pic]

2) Parallel

[pic]

In order to make deg(num) [pic]

[pic]

[pic]

A discrete-time integrator: rectangular integrator

[pic]

[pic]

2. Trapezoidal Integration

[pic]

[pic]

or [pic]

[pic]

3. Frequency Characteristics

1. Rectangular Integrator

[pic]

Frequency Response [pic]

Or [pic] [pic]

Amplitude Response

[pic]

Phase Response

[pic]

2. Trapezoidal Integrator

[pic]

Frequency Response

[pic]

Amplitude: [pic]

Phase:

[pic]

3. Versus Ideal Integrator

Ideal (continuous-time ) Integrator

[pic]

when T=1 second (Different plots and relationships will result if T is different.)

[pic]

• Low Frequency Range [pic]

(Frequency of the input is much lower than the sampling frequency:

It should be!)

[pic]

[pic]

• High Frequency: Large error (should be)

Example 9-4 Differential equation (system)

[pic]

Determine a digital equivalent.

Solution

(1) Block Diagram of the original system

(2) An equivalent

(3) Transfer Function Derivation

[pic]

Design: 9-4 Find Equivalence of a given analog filter (IIR):

Including methods in Time Domain and Frequency Domain.

9-5 No analog prototype, from the desired frequency response: FIR

9-6 Computer-Aided Design

4. Infinite Impulse Response (IIR) Filter Design

(Given H(s) ( Hd(z) )

9-4A Synthesis in the Time-Domain: Invariant Design

1. Impulse – Invariant Design

1) Design Principle

[pic]

2) Illustration of Design Mechanism (Not General Case)

Assume:

1) Given analog filter (Transfer Function)

[pic] (a special case)

(2) Sampling Period T (sample ha(t) to generate ha(nT))

Derivation:

1) Impulse Response of analog filter

[pic]

2) ha(nT): sampled impulse response of analog filter

[pic]

3) z-transform of ha(nT)

Sampled impulse response of analog filter

[pic]

4) Impulse-Invariant Design Principle

[pic]

(

Digital filter is so designed that its impulse response h(nT)

equals the sampled impulse response of the analog filter ha(nT)

Hence, digital filter must be designed such that

[pic]

(5) [pic] (scaling)

=>[pic]

(3) Characteristics

(1) [pic] when T( 0

(

frequency response of digital filter

2) [pic]

3) Design: Optimized for T = 0

Not for T ( 0 (practical case) (due to the design principle)

(4) Realization: Parallel

[pic]

(5) Design Example [pic]

Solution: [pic]

[pic]

2. General Time – Invariant Synthesis

1) Design Principle

2) Derivation

Given: Ha(s) transfer function of analog filter

Xa(s) Lapalce transform of input signal of analog Filter

T sampling period

Find H(z) z-transfer function of digital filter

1) Response of analog filter xa(t)

[pic]

(2) ya(nT) sampled signal of analog filter output

[pic]

(3) z-transform of ya(nT)

[pic]

(4) Time – invariant Design Principle

[pic]

(

Digital filter is so designed

that its output equals the sampled

output of the analog filter

Incorporate the scaling :

[pic]

(

z-transfer function of digital filter

(5) Design Equation

[pic]

special case X(z)=1, Xa(s) = 1 (impulse)

=>[pic]

(6) Design procedure

A: Find [pic] (output of analog filter)

B: Find [pic]

C: Find [pic]

D: [pic]

Example 9-5 [pic]

Find digital filter H(z) by impulse - invariance.

Solution of design:

1) Find [pic]

[pic]

[pic]

2) Find [pic]

[pic]

3) Find [pic]

[pic]

4) Find z-transfer function of the digital filter

[pic]

use G = T

[pic]

5) Implementation

Characteristics

(1) Frequency Response equations: analog and digital

Analog : [pic]

Digital : [pic]

(2) dc response comparison ([pic])

Analog: [pic]

Digital: [pic]

Varying with T (should be)

[pic] [pic], [pic]

[pic]

[pic] for example [pic]

[pic], [pic]

[pic] good enough

(3) [pic] versus [pic] : [pic]

Using normalized frequency [pic]

[pic]

[pic]

(4) [pic] versus [pic]

[pic]

(5) Gain adjustment when [pic]

[pic] => frequency response inequality

adjust G => [pic] at a special [pic]

for example [pic]

If G = T = 0.3142 => [pic]

If selecting G = T/1.0745 => [pic]

3. Step – invariance synthesis

[pic] [pic]

[pic]

Example 9-6 [pic]. Find its step-invariant equivalent.

Solution of Design

[pic]

[pic]

[pic]

Comparison with impulse-invariant equivalent.

[pic]

9-4B Design in the Frequency Domain --- The Bilinear z-transform

1. Motivation (problem in Time Domain Design)

[pic] [pic]

Introduced by sampling, undesired!

x(t) bandlimited ([pic]

[pic]

[pic]

for [pic]

[pic]

for [pic]

Consider digital equivalent of an analogy filter Ha(f): [pic])

Ha(f): bandlimited => can find a Hd(z)

Ha(f): not bandlimited => can not find a Hd(z) Such that [pic]

2. Proposal: from [pic] axis to [pic] axis

[pic] ([pic]: given sampling frequency)

(s plane to s1 plane)

[pic]

Observations: (1) Good accuracy in low frequencies

(2) Poor accuracy in high frequencies

(3) 100% Accuracy at [pic]

a given specific number such that 0.01[pic]

Is it okay to have poor accuracy in high frequencies? Yes! Input is bandlimited!

What do we mean by good, poor and 100% accuracy?

Assume (1)[pic] (originally given analogy filter)

(2) The transform is [pic]

Then,[pic] is a function of [pic]. Denote [pic].

Good accuracy:

[pic]

Poor Accuracy

[pic]

100% Accuracy (Equal)

[pic]

Is [pic] bandlimited? That is, can we find a [pic] such that [pic]=0?

Yes, [pic]. ( We have no problem to find a digital equivalent

[pic] without aliasing!

Let’s use [pic]as a number (for example 0.2) representing any low frequency,

Then, because [pic] is a good approximation of [pic],

[pic][pic] should be a good approximation.

A digital filter can thus be designed for an analogy filter [pic] which is not bandlimted!

Two Step Design Procedure:

Given: analogy filter [pic]

(1) Find an bandlimited analogy approximation ([pic]) for [pic]

(2) Design a digital equivalent [pic] for the bandlimited filter [pic].

Because of the relationship between ([pic]) for [pic],

[pic] is also digital equivalent of [pic].

The overlapping (aliasing) problem is avoided!

The designed digital filter can approximate [pic] (for [pic] and [pic] take the

same value) at low frequency.

3. [pic] axis to [pic] axis (s plane to s1 plane) transformation

Requirement : [pic] ([pic] is given sampling frequency.)

Proposed transformation :

[pic]

Effect of C:

We want the transformation map

[pic] (for example, [pic]) to [pic] [pic]

=> [pic]

i.e. when the sampling period T is given, C is the only parameter

which determines what [pic] will be mapped into [pic] axis with the

same value.

Example: [pic]

[pic] not bandlimited

If we want to map [pic] to [pic]

1. [pic]

[pic]

Hence, for any given T or [pic]

[pic]

is bandlimited as a function of [pic] by [pic]

[pic] when [pic] at low frequencies.

Further [pic]

Exactly holds!

How to select [pic] or sampling frequency [pic] at which [pic]?

(1) [pic] should be small?

why? [pic] [pic],

(The accuracy should be good at low frequencies)

(2) When [pic] is given or determined by application, [pic] should be large

enough such that [pic] to ensure the accuracy in the frequency

range including [pic]

When [pic]

[pic] since [pic] for small x.

4. Design of Digital Filter using bilinear z-transform

A procedure: (1) [pic]

[pic] [pic]

(not bandlimited, (bandlimited,

original analog) analog)

or [pic]

(2) [pic]

[pic] [pic]

(Transfer replace [pic] by z

function of

digital filter)

* Question: Can we directly obtain Hd(z) from Ha(s) ? Yes! (But how?)

Bilinear z-transform

Preparation : (1) [pic]

(2) [pic]

Hence, [pic]

Replace [pic] by s , [pic] by s1 ([pic])

[pic]

Replace [pic] for digital filter

[pic] direct transformation from s to z (bypass s1)

Example [pic]

Digital Filter

[pic]

C: only undetermined parameter in the digital filter.

To determine C: (1) [pic]

(2) [pic] (related to the frequency range of interest)

Example 9-7 [pic]

[pic] : break frequency

Take [pic]

Consider [pic]

[pic]

( C determined => Hd(z) determined

( [pic]

( [pic], [pic], [pic]

To compare the frequency response with the original analog filter Ha :

[pic]

( replace s by [pic])

( [pic], [pic]

[pic]

Too low fs => poor accuracy in fc.

9-4C Bilinear z-Transform Bandpass Filter

1. Construction Mechanism

1) From an analog low-pass filter Ha(s)

to analog bandpass filter [pic]

i.e., replace s by [pic] to form a bandpass filter

For example [pic] low-pass

[pic] band-pass

Why? Original low-pass

[pic]

[pic]

Low => High Gain

High => Low Gain

After Replacement

[pic]

high [pic] => high => low gain

low [pic] => high => low gain

2) From analog to digital

Replace s in [pic] by [pic]

( [pic]

for example

[pic]

2. Bilinear z-transform equation

Analog Low-pass Bandpass (analog)

s [pic]

[pic]

[pic]

[pic]

with [pic]

3. How to select ( [pic]) for bandpass filter

(design)

Important parameters of bandpass

1) center frequency [pic]

2) [pic] upper critical frequency

3) [pic] low critical frequency

Selection of [pic] for bandpass: [pic]

Design of ( [pic])

We want [pic], Also want [pic]

one parameter C => impossible

solution [pic]

bandwidth [pic]

Hence, A and B can be determined to perform the transform.

4. Convenient design equation

[pic]

why no C?

[pic]

[pic]

[pic]

Example :[pic]

5. In the normalized frequency

Reference frequency: sampling frequency [pic]

[pic] [pic]

=> [pic], [pic]

=>[pic]

s => [pic]

Example 9-9 Lowpass [pic]

Transfer function of bandpass digital filter

[pic]

A and B? Determined by design requirements.

[pic] sampling frequency fs = 5000Hz

2. [pic]

3. [pic]

4. [pic]

[pic], [pic], [pic]

9-5 Design of Finite-Duration Impulse Response (FIR) Digital Filter

Direct Design of Digital Filters with no analog prototype.

Can we also do this for IIR? Yes!

Using computer program in next section.

9-5A A few questions

1. How are the specifications given?

By given [pic] and [pic]

2. What is the form of FIR digital filter?

Difference Equation [pic]

(What is T ? sampling period)

Transfer function [pic]

3. How to select T ?

4. After T is fixed, can we define the normalized frequency r and

[pic] and [pic] ? Yes!

Can we then find the desired frequency response

[pic] ? Yes!

5. Why must H( r ) be a periodic function for digital filter?

H( r ) = H ( n + r ) ? Why? What is its period?

6. Can H( r ) be expressed in Fourier Series ? Yes!

How?

See general formula :

[pic]

[pic]

In our case for H(r):

[pic] [pic]

What does this mean? Every desired frequency response H(r) of digital

filter can be expressed into Fourier Series ! Further, the coefficients of

the Fourier series can be calculated using H(r)!

9-6B Design principle

[pic]

Denote [pic]

Consider a filter with transfer function [pic]

What’s its frequency response ?

[pic]

given specification of digital filter’s frequency response!

9-6 C Design Procedure

1) Given H(r)

(2) Find H(r)’s Fourier series [pic]

where [pic]

(3) Designed filter’s transfer function

[pic]

What’s hd(nT) ? Impulse response!

Example 9-10: [pic]

Solution :

1) Given [pic]: done

2) Find [pic]’s Fourier series

[pic]

where [pic]

n = 0

[pic][pic]

[pic]

[pic]

( [pic]

(3) Digital Filter

[pic]

D Practical Issues : Infinite number of terms and non-causal

1) [pic]

Truncation => [pic]

Rectangular window function

[pic]

Truncation ( window

Effect of Truncation (windowing):

Time Domain: Multiplication ( h and w )

Frequency Domain: Convolution

[pic]

(After Truncation: The desired frequency Hr

1. [pic] frequency response of truncated filter )

The effect will be seen in examples!

(2) Causal Filters:

[pic]

k = n+M [pic]

Define [pic]( [pic]

Relationship: [pic]

Frequency Response [pic]

Design Examples

Hamming window: [pic]

Example 9-11 Design a digital differentiator

Step1 : Assign [pic]

[pic] should be the frequency response of the analog differentiator

H(s) = s

=> Desired [pic]

Step2 : Calculate hd(nT)

[pic]

[pic]

[pic]

i.e., [pic]

Step 3: Construct nc filter with hamming window (M=7)

[pic]

[pic]

Example 9-12: Desired low-pass FIR digital filter characteristic

[pic]

[pic]

[pic]

2. [pic]

[pic]

NC filter with 17 weight’s window: [pic], [pic]

[pic]

Example 9-13 (90o phase shifter)

[pic]

[pic]

n = 0 => [pic]

3. [pic]

[pic]

=> [pic]

Filter: [pic]

[pic]

[pic]

[pic]

Fig. 9-32 Amplitude response of digital 90 degree phase shifter

6. Computer-Aided Design of Digital Filters

9-6A Command yulewalk for IIR

Example 9-14

9-6B Command remez for FIR

Example 9-15

Chapter 9 Homework

2, 4, 6, 11, 13, 14, 25, 26, 27, 29, 30, 31, 44, 48, 53, 61, 62, 64, 66, 68, 69

-----------------------

Constant [pic]

Partial-Fraction Expansion for s

y(nT) : System output

x(nT) : System input , to be integrated

Constant

Constants

z-transfer function [pic] of the digital filter. Of course,

the z-transfer function of its impulse response.

T

Variable in [pic] domain

Variable in [pic] domain

Constant

Bilinear z – transformation

In the low pass filter

digital bandpass filter

Direct Transformation

s (in low-pass)

s (in low-pass)

[pic]

In low-pass

In low-pass

r is not time

[pic]

[pic]: sampling frequency? No! [pic] : period of [pic]

2M+1 terms

[pic]

0

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download