216
Part A: Signal Processing Chapter 3: Digital Signal Processing Professor E. Ambikairajah UNSW, Australia

Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Embed Size (px)

Citation preview

Page 1: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Part A: Signal Processing

Chapter 3: Digital Signal Processing

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 2: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Chapter 3: Digital Signal Processing

3.1 Introduction to Digital Signal Processing3.2 Analogue to Digital Conversion Process3.3 Quantisation and Encoding3.4 Sampling of Analogue Signals3.5 Aliasing3.6 Digital to Analogue Conversion3.7 Introduction to digital filters

3.7.1 Non-Recursive Digital filters3.7.2 Recursive Digital filters

3.8 Digital filter Realisation3.8.1 Parallel Realisation 3.8.2 Cascade Realisation

3.9 Magnitude and Phase Responses3.10 Minimum/Maximum/Mixed Phase Systems3.11 All-pass Filters3.12 Second Order Resonant Filter3.13 Stability of a Second Order Filter3.14 Digital Oscillators3.15 Notch FiltersProblem Sheet A3

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 3: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Chapter 3: Digital Signal Processing (DSP)

3.0 Introductions

Digital Signal Processing is a rapidly developing technology for scientists and engineers. In the 1990s the digital signal processing revolution started, both in terms of the consumer boom in digital audio, digital telecommunications and the wide used of technology in industry.

Due to the availability of low cost digital signal processors, manufacturers are producing plug-in DSP boards for PCs, together with high-level tools to control these boards. Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 4: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

There are many areas where DSP technology is now being used and the current proliferation of such technology will open up further applications.

Audiologists and speech therapists are exposed to DSP systems for both testing a person’s level of hearing and subsequently DSP hearing aid filtering.

The professional music industry uses spectrum analysers, digital filtering, sampling conversion filters etc and is one of the biggest users and exploiters of DSP technology.Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 5: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

In summary, DSP is applied in the area of control and power systems, biomedical engineering, instrumentation (test and measurement), automotive engineering, telecommunications, mobile communication, speech analysis and synthesis, audio and video processing, seismic, radar and sonar processing and neural computing.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 6: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

There are many advantages to using DSP techniques for variety of applications, these include:

high reliability and reproducibilityflexibility and programmabilitythe absence of component drift problemcompressed storage facility

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 7: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

DSP hardware allows for programmable operations. Through software, one can easily modify the signal processing functions to be performed by the hardware. For all these reasons, there has been vast growth in DSP theory & applications over the past decade.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 8: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.1 Introductions to DSPAn analogue signal processing system is shown in Fig 3.1, in which both the input signal and output signal are in analogue form

Analogue signal processor (e.g. low-pass filter)Analogue

Input SignalAnalogueOutput Signal

s(t)x(t) = s(t) + n(t)

signal noise

Figure 3.1. A general description of analogue systems whose input and output are in analogue form.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 9: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

A digital signal processing system Figure 3.2 provides an alternative method for processing the analogue signal.

s(n)

xa(t)

dB 3 dBA/D

Converter

x(n)Digital Signal

Processor

analogue prefilteror antialiasing filter analogue to digital

converter

Lowpass filtered signal

x(t)

Sampling frequency

discrete-time signal

D/A converter

Digital to analogue converter

dBs(t)

reconstruction filter (analogue filter) same as the pre-filter

Figure 3.2. A general process of converting analogue signals into digital signals and back to analogue form.Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 10: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Note:

The A/D converter converts the analogue input signal into a digital form.

The D/A converter converts the processed signal back into analogue form.

The reconstruction filter smooths out the outputs of the D/A and removes unwanted high frequency components.

The analogue input filter is used to band-limit the analogue input signal prior to digitisation to reduce aliasing (see later)

The heart of the system in Figure 3.2 is the digital signal processor which may be based on a DSP chip such as Texas instruments TMS 320C60Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 11: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The digital signal processor may implement one of the several DSP algorithms, for example digital filtering

(low-pass filter) mapping the input x[n]into the output s[n].

Digital signal processor implies that the input signal must be in a digital form before it can be processed.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 12: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.2 Analogue to digital conversion Process

Before any DSP algorithm can be performed, the signal must be in a digital form. The A/D conversion process involves the following steps:

The signal (Band-limited) is first sampled, converting the analogue signal into a discrete-time signalThe amplitude of each sample is quantised into one of 2B levels (where B is the number of bits used to represent a sample in the A/D converter)The discrete amplitude levels are represented or encoded into distinct binary words each of length B bits.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 13: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

A practical representation of the A/D conversion process is shown in Figure 3.3.

A/D converter

2B

1

close & open the switch at fs Hz

Analogue Signal(bandlimited)

xa(t)

T

Logic circuitB bits

x[n]

digitaloutput

Sample & Hold Quantiser encoder

Figure 3.3. Analogue to digital conversion process.Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 14: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Sample and hold (S/H) takes a snapshot of the

analogue signal every T sec and then holds that

value constant for T secs until the next snapshot is obtained.

Tfs

1=

S/H output

t

xa(t)

tT

Input signal

Figure 3.4. An example of “sample and hold” process to convert analogue signals into digital signals.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 15: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example :

Sampled Signaln

0V

-6V

-12V

12V x[n]

6V

T = sampling period Analogue Signal

Samples

Figure 3.5. An example of sampling analogue signals to discrete-time signals. The sampling period is T.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 16: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

54321

digital

-1 1111-2 1110

-3 1101-4 1100-5 1011

01010100

00110010

0001

analogue

Example: 4-bit (B = 4) A/D converter (bipolar)

Input-output characteristic of 4-bit quantiser (linear) (two’s complement notation)Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 17: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.3 Quantisation and encoding [1]

Before conversion to digital, the analogue

sample is assigned one of 2B values (see Fig 3.6). This process, termed quantization, introduces an error, which cannot be removed.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 18: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

123456

sampling instants

Quantisation Level

123456

100

001

101

010

110

3 bits code output

Quantisation Level 3-bit A/D Converter(Unipolar)

encoder output

Figure 3.6. Quantisation of discrete-time signals.

LSB

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 19: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

A 12 bit A/D converter (bipolar) with an input voltage

range of ±10V will have a least significant bit (LSB) of

(resolution)mVmVV 9.412

2012 =−

mVVV 9.412

2012 =−

1000 0000 000012 bits

0111 1111 111112 bits

+10V

-10V

212 levels = 4096

Resolution (step-size)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 20: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Quantisation error = (one half of an

LSB) = 4.9 mV / 2 = 2.45 mV

Note:

2VΔ

level n+1

level n

level n-1

sampling instant

v∆V

∆V/2

∆V/2∆V

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 21: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

For an A/D converter with Binary digits the number

of quantisation level is 2B, and the interval between levels, that is the quantisation step size (ΔV) –resolution is given by

V-full scale range of the A/D converter with bipolar signal inputs. The maximum quantisation error, for the case where the values are rounded up or down .

BB

VVV212

≈−

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 22: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

For a sine wave input of amplitude A, the quantisation step size becomes

The quantisation error (e) for each sample, is normally assumed to be random and uniformly distributed in the interval with zero mean.

In this case, the quantisation noise power or variance is given by

BAV

22

≈Δ2AA

-A

2VΔ

±

e = actual amplitude - quantised amplitude Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 23: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

∫∫Δ

Δ−

Δ

Δ−

Δ==

2

2

22

2

22 1)(

V

V

V

Ve dee

VdeePeσ

constant = VΔ1

Hence,

12

22 Ve

Δ=σ for uniform quantisation

(Note : Uniform quantisation - all steps are of equal size)Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 24: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

For the sine wave input, the average

signal power is , ie. rms value

The signal-to-quantisation noise power ratio (SQNR) in decibels is

2

2⎟⎠⎞

⎜⎝⎛ A

2

2A

( )

⎟⎟⎠

⎞⎜⎜⎝

⎛ ×=

⎟⎟⎟⎟

⎜⎜⎜⎜

=

⎟⎟⎟⎟

⎜⎜⎜⎜

Δ=

223log10

122/2

2log10

12

2log10

2

2

2

2

2

B

BA

A

V

A

SQNR

SQNR = 6.02B + 1.76 dB

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 25: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The SQNR increases with the number of bits, B. In many DSP applications, an A/D converter resolution between 12 and 16 bits is adequate.

Thus, the signal-to-quantisation noise ratio increases approximately 6dB for each bit.

43.8 dB1287

37.7 dB646

31.6 dB325

25.3 dB164

18.7 dB83

SQNRLevelsNumber of Bits

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 26: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Summary: Analogue to Digital Converter

12-bitA/D

unipolar

12-bit

Example: Sampling frequency

x(t) x[n]

Conversion time (say) = 35 μs

0 to 5 volts

Step size or Resolution = volts12

512 −

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 27: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

In practice, the A/D is proceeded by a sample and hold (S/H) which freezes the signal during conversion.

Two parameters related to S/H:

Then the maximum frequency that can be converted becomes

maximum sampling frequency for the above A/D converter.

aperture time ≈ 25 ns (for example)acquisition time ≈ 2 μs (for example)

kHzfs 2710)025.0235(

16max=

++= −

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 28: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.4 Sampling of Analogue Signal

Suppose that an analogue signal x(t) is sampled

every T seconds, then at the output of the sampler

we obtain a discrete-time signal x(n) = x(t)|t = nT.

A/D

Sampling

freq.( )

x[n]

X(θ)

x(t)

x(ω)

Tfs

1=

s

a

ff

T

πθ

ωθ

2=

=

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 29: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

∫∞

∞−= ωω

πω deXtx tj)(

21)(

[ ] ∫∞

∞−= ωω

πω deXnx nTj)(

21

t=nT

Inverse Fourier Transform

(3.1)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 30: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Now ejnωT is a periodic function of period 2π. Equation (3.1) becomes

[ ] ∫∞

∞−= ωω

πω deXnx nTj)(

21

(3.1)

[ ]

TdeT

kXT

TdeT

kXT

TTdeXnx

nTj

nTT

kj

k

k

k

nTj

k

ωπωπ

ωπωπ

ωωπ

ωπ

π

π

π

πω

ππ

ππ

ω

⎥⎦⎤

⎢⎣⎡ +=

+=

=

∫∑

∫∑

+∞

−∞=

+

−∞=

)2(121

)2(121

1)(21

)2(

2

2

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 31: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Digital spectrum Analogue spectrum

Let ωT = θ

We have

By comparing (3.2) and (3.3), We obtain

[ ] (3.2) )2(121 θπωπ

θπ

πde

TkX

Tnx nj

k⎥⎦

⎤⎢⎣

⎡+= ∑∫

−∞=−

X(θ)

[ ] (3.3) )(21 θθπ

θπ

πdeXnx nj∫−=

Inverse Fourier Transform for discrete signal

(3.4) )2(1)( πθππωθ <<−+= ∑∞

−∞=k TkX

TX

Repeats itself

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 32: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

It is seen that X(θ) is periodic with

period 2π. The digital spectrum is a repetition of the analogue spectrum.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 33: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.5 Aliasing

Figure 3.7 illustrates the relationship between the digital spectrum X(θ) and the analogue spectrum X(ω) for the case X(ω) = 0, or .

Tπω >

2sff >

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 34: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Figure 3.7. Above : Frequency response of an analogue signal. Below : Frequency response of the sampled analogue signal.

X(ω)A

-π/T π/T ω

X(θ)A/T

-3π -2π -π 0 π 2π 3π ω

fs

Analogue Spectrum

Digital Spectrum

2sf

Tπω >Case 1: X(ω) = 0, (sampling theorem holds)

2sf

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 35: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Note: corresponds to θ = π (or )

The digital spectrum is the same as the original analogue spectrum and repeats at

multiples of the sampling frequency fs.

Tπω =

2sff =

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 36: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Case 2: X(ω) ≠ 0, , but X(ω) = 0,Tπω >

T23πω >

X(ω)A

Figure 3.8. Above: Frequency response of an analogue signal whose highest frequency component is larger than the sampling frequency. Below: Frequency response of the sampled analogue signal. The overlapped region represents aliasing.

-3π -2π -π π 2π 3π θ

aliasing

X(θ)A/T

23π

−2

Tπ3

−Tπ

−Tπ

Tπ3 ω

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 37: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

If the sampling frequency, fs is not sufficiently high, the spectrum centred on fs will fold over or alias into the base band frequencies (Fig 3.8). Equation (3.4) tells us that aliasing can only be avoided if the analogue signal is band limited such that X(ω) = 0, ⇒ .

This results in the familiar sampling theorem. The minimum sampling frequency for which equation (3.4) holds is called the Nyquistfrequency.

Tπω >

22 sff

Tf ≥⇒≥

ππ

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 38: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Note: It should be noted that even if X(ω) is not strictly band limited, that it has some negligible energy outside , a small enough T can be chosen so that the overlap of the components of the summation in equation (3.4) is below a prescribed level. This is important when a sampling frequency is to be selected for a particular signal.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 39: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Digital-to-Analogue Conversion (D/A) – Signal recovery

The D/A conversion process is employed to convert the digital signal into an analogue form after it has been digitally processed. The reason for such conversion may be for example, to generate an audio signal to drive a loudspeaker or to sound an alarm.

The D/A process is shown in Figure 3.9. A register is used to buffer the D/A’s input to ensure that its output remains the same until the D/A is fed the next digital input.Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 40: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Note: The inputs to the D/A are series of impulses, while the output of the DAC has a staircase shape as

each impulse is held for a time T sec.

)(ˆ ty

)(ˆ ty

n t

T-Sampling period T – Sampling period

DigitalSignal

ProcessorD/A

Low pass filter

y[n]

8 or 12 bits

y(t)

y[n]reconstruction filteror smoothing filter

Figure 3.9. Conversion process from digital signals to analogue signals.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 41: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The D/A shown in Figure 3.9 is referred to as a zero-order hold.

By comparing its output and its input

y[n], it is evident that for each digital code fed into the D/A, its output is held for a time

T. The result is the characteristic staircase shape a the D/A output.

The D/A output approximates the analogue signal by a series of rectangular pulses whose height is equal to the corresponding value of the signal pulse.

)(ˆ ty

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 42: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

⎩⎨⎧ ≤≤

=otherwise

Ttth

001

)(

h(t)1

T t

Just consider one pulse.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 43: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The corresponding frequency response is

2

2sin

22

2

]1[1

)()(

222

2

222

00

T

T

eTTjeeeT

jeeee

jw

jedte

dtethH

TjTjTj

Tj

TjTjwTjjwT

TtjTtj

tj

ω

ω

ω

ω

ω

ω

ωωω

ω

ωω

ωω

ω

−−

−−−

−−

∞−

=⎥⎥⎥

⎢⎢⎢

⎡−

=

⎥⎥⎥

⎢⎢⎢

−−

=−−

=

⎥⎦

⎤⎢⎣

⎡−

==

=

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 44: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The magnitude of H(ω) is plotted in Figure 3.10.

|H(ω)|

0 ω

Figure 3.10. Magnitude response of a rectangular pulse.

76π−

74π−

72π−

72π

74π

76π

2T

xxsin

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 45: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

In the frequency domain, the staircase action of the DAC introduces a type of distortion known as the or aperture distortion, where . x

xsin

2Tx ω

=

Y(θ)input to the D/A

-4 π -3 π -2 π - π 0 π 2 π 3 π 4 π θ

D/A output

ω

xxsin

)(ˆ ωy

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 46: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The amplitude of the output signal spectrum is

multiplied by the function, which acts like a

lowpass filter, with the high frequencies heavily

attenuated.

The effect is due to the holding action of the

DAC and, in signal recovery, introduces an amplitude

distortion.

xxsin

xxsin

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 47: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

For a zero-order hold, the function falls to

about 4dB at half the sampling frequency

giving an average error of about 36.4%.

Aperture error can be eliminated by equalization. In

practice this can be achieved by first applying the

signal, before converting it to analogue, through a

digital filter whose amplitude-frequency response

has a shape.

xxsin

⎟⎠⎞

⎜⎝⎛

2sf

xx

sin

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 48: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Reconstruction Filter [4]

The output of the D/A converter contains unwanted high frequency at multiples of the sampling frequency as well as the desired frequency components.

The role of the output filter is to smooth out the steps in the D/A output thereby removing the unwanted high frequency components. In general, the requirements of the anti-imaging filter are similar to those of the anti-aliasing filter.Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 49: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Ideal D/A Converter

Ideal D/A

T

y[n] y(t)

Ideal Lowpass filter

y(t)^ T

−Tπ

)(ωH

Impulse not square pulses as in the case of an non-ideal D/A

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 50: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Consider Just an impulse

1h(t)h(t)T)(tδ

)(ωH

ω

TtTt

thπ

πsin)( =

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 51: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

If we apply the signal to the input of the filter, we obtain

y[n] can be written in this form.

)(ˆ ty

∑∞

−∞=

−=

=

nnTtny

TtTttythty

)()(*)/(

)/sin()(ˆ*)()(

δππ

[ ]∑∞

−∞= ⎭⎬⎫

⎩⎨⎧

−=n Tt

TtnTtnyty)/(

)/sin(*)()(ππδ

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 52: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Using the property

we can obtain

)()(*)( 00 ttxtttx −=−δ

[ ] (3.5) )(

)(sin)( ∑

−∞= −

⎥⎦⎤

⎢⎣⎡ −

=n

TnTtT

nTt

nyty π

π

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 53: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The original signal can be obtained by adding

together an infinite number of pulses. The nth

pulse here is shifted through a distance nT with

respect to the origin and multiplied (weighted) by a

factor y[n].

This recovery process is called interpolation. Figure

3.11 shows the implementation of equation (3.5).

xxsin

xxsin

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 54: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

t2TT0-T

y(1)

y(2)y(0)

y(-1)

y(-2)

y(x) = x(t)original signal

Figure 3.11. Each discrete-time sample is multiplied by a shifted sinc function. Summing these sinc functions will produce the original analogue signal. Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 55: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The signal x(t) is reconstructed from the

samples of by summation of

weighted and shifted pulse.

[ ] [ ]nynx ≡

xxsin

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 56: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Consider the analogue signal [1]

x(t) = 3 cos50πt + 10 sin 300πt – cos 100πt

What is the Nyquist rate for this signal?

The frequencies present in the signal above are

f1 = 25Hz; f2 = 150 Hz; f3 = 50 Hz

Hence, fmax = 150 Hz

fsampling > 2 fmax = 300 Hz

The Nyquist rate is fN = 2 fmax = 300 Hz.

Example:

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 57: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Note: Consider x(t) = 10 sin 300πtfs ≥ 2 × f = 300 Hz

[ ] ( )

( )n

nf

nTnx

s

π

π

π

sin10

300sin10

300sin10

=

⎟⎟⎠

⎞⎜⎜⎝

⎛=

= x[n]

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 58: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

We are sampling the analogue sinusoid at its zero-crossing points and hence we miss the signal completely. The situation will not occur if the sinusoid is offset by some phase (here).

In such case we have

( ) ( )φπ += ttx 300sin10 and sf

T 1= , where fs = 300Hz.

[ ] ( )( ) ( ) ( ) ( )[ ]( ) ( )φπ

φπφπφπ

sincos10sincoscossin10

sin10

nnn

nnx

=+=

+=for n = 0,1,2,..Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 59: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Since cos(πn) = (-1)n , [ ] ( ) ( )φsin101 nnx −=

If θ ≠ 0 or θ ≠ π, the samples of the sinusoid taken at the Nyquist rate are not all zero.

Note: x(t) = A cos(2πf0t) is a continuous-time sinusoidal signal

22

(3.6) 2cos)(

0

0

ss

s

fff

nffAnx

≤≤−

⎟⎟⎠

⎞⎜⎜⎝

⎛= π

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 60: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

On the other hand, if the sinusoids,

[where fk = f0 + kfs , k = ±1, ±2, ±3, ….] (3.7)

are sampled at a rate fs, it is clear that the frequency fk is outside the fundamental frequency range

; consequently the sampled signal is

( ) ( )tfAtx kπ2cos=

22 0ss fff

≤≤−

[ ]

⎟⎟⎠

⎞⎜⎜⎝

⎛+=

⎟⎟⎠

⎞⎜⎜⎝

⎛ +=

⎟⎟⎠

⎞⎜⎜⎝

⎛=

knnffA

nf

kffA

nffAnx

s

s

s

s

k

ππ

π

π

22cos

)(2cos

2cos

0

0 [ ] (3.8) 2cos 0 nffAnx

s⎟⎟⎠

⎞⎜⎜⎝

⎛=⇒ π

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 61: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Which is identical to the discrete-time signal in equation (3.6). If we are given a

sequence x[n] there is an ambiguity as to

which continuous-time signal x(t) these values represent. We can say the

frequencies fk = f0+kfs are indistinguishable

from the frequency f0 after sampling and

hence they are aliases of f0.

[ ] nffAnx

s⎟⎟⎠

⎞⎜⎜⎝

⎛= 02cos π

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 62: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Note:fs – sampling frequency

corresponds to θ = π

is the highest frequency that can be

represented uniquely with a sampling rate fs

is called half the sampling frequency or folding frequency.

2sf

sffT πωθ 2==

2sf

2sf

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 63: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example :

Consider the analogue signal

(a) What is the Nyquist rate for this signal?

The frequencies existing in the analogue signal are:

f1 = 1 kHz; f2 = 3 kHz; f3 = 6 kHz

Thus fmax = 6 kHz and according to the sampling theorem,

fs > 2 fmax = 12 kHzThe Nyguist rate is = 12 kHz.

( ) ( ) ( ) ( )ttttx πππ 12000cos106000sin52000cos3 ++=

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 64: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(b) Assume now that we sample this signal x(t) using a

sampling rate fs = 5 KHz (samples/sec). What is the discrete-time signal obtained after sampling?

fs = 5000Hz ⇒ 25002=sf

x(t) = 3 cos (2π × 1000t) + 5 sin(2π × 3000t) + 10 cos (2π×6000t)

[ ]

⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛+⎟

⎠⎞

⎜⎝⎛−+⎟⎟

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛=

⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛ ++⎟⎟

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛ −+⎟⎟

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛=

⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛+⎟

⎠⎞

⎜⎝⎛+⎟⎟

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛=

⎟⎠⎞

⎜⎝⎛+⎟

⎠⎞

⎜⎝⎛+⎟

⎠⎞

⎜⎝⎛=

nnn

nnn

nnn

nnnnx

512cos10

522sin5

512cos3

5112cos10

5212sin5

512cos3

562cos10

532sin5

512cos3

50006000cos10

500030002sin5

500010002cos3

πππ

πππ

πππ

ππ

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 65: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The same result can be obtained using equation (3.7).

We have fk = f0 + kfs ;

f0 = fk – kfs can be obtained by

subtracting from fk an integer multiple

of fs such that .

[ ] ⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛−⎟⎟

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛= nnnx

522sin5

512cos13 ππ

Second Method:

kHzf

kHzf ss 5.2

25 =⇒=

22 0ss f

ff

≤≤−Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 66: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The frequency f1 = 1000 Hz is (= 2500 Hz)

and thus it is not affected by aliasing.

However, the other two frequencies f2 & f3 are above the folding frequency and they will be changed by the aliasing effect.

f2' = f2 – 1 fs = 3000 – 5000 = -2 kHzf3' = f3 – 1 fs = 6000 – 5000 = 1 kHz

2sf

<

[ ] ⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛+⎟⎟

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛−+⎟⎟

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛= nnnnx

500010002cos10

500020002sin5

500010002cos3 πππ

This is agreement with the result obtained before.Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 67: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(c) What is the analogue signal y(t) we can reconstruct from the samples if we use ideal interpolation.

Since only frequency components at 1 kHz and 2 kHz are present in the sampled signal, the analogue signal we can recover is,

y(t)=13cos(2000πt)-5sin(4000πt)

which is obviously different from the original signal x(t).The distortion of the original analogue signal was caused by the aliasing effect, due to the low sampling rate used.Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 68: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example:An analogue signal x(t) =sin(480πt)+3sin(720πt)is sampled 600 times per second. [1](a) Determine the Nyguist sampling rate for x(t)

(b) Determine the folding frequency (or half the sampling frequency)

(c) What are the frequencies, in radians, in the resulting discrete time signal x[n]?

(d) If x[n] is passed through an ideal D/A converter what is the reconstructed signal y(t)Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 69: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(a) x(t) = sin(2π 240t) + 3sin(2π 360t)

f1 = 240 Hz f2 = 360 Hz

∴ fmax = 360 Hz ∴FNyquist = 2 × fmax = 720 Hz

(b) fs = 600 Hz ∴ffold or = 300 Hz2

sf

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 70: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(c)

[ ]

⎟⎠⎞

⎜⎝⎛−=

⎟⎠⎞

⎜⎝⎛−⎟

⎠⎞

⎜⎝⎛=

⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛ −+⎟

⎠⎞

⎜⎝⎛=

⎟⎠⎞

⎜⎝⎛+⎟

⎠⎞

⎜⎝⎛=

⎟⎠⎞

⎜⎝⎛+⎟

⎠⎞

⎜⎝⎛==

=

n

nn

nn

nn

nntxnxnTt

54sin2

54sin3

54sin

542sin3

54sin

56sin3

54sin

6003602sin3

6002402sin)(

π

ππ

πππ

ππ

ππ

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 71: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

We have fk = f0 + kfs and therefore f0 = fk – k fs

f1 = 240 Hz and is (= 300 Hz)

f2 = 360 Hz and is (= 300 Hz)

Aliased frequency f0 = fk – k fs =360 – 1 × 600= -240 Hz

Second Method

22 0ss f

ff

≤≤−

2sf

<

2sf

<

-not affected by aliasing

-affected by aliasing

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 72: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

[ ]

⎟⎠⎞

⎜⎝⎛−=

⎟⎠⎞

⎜⎝⎛ −

+⎟⎠⎞

⎜⎝⎛=

n

nnnx

54sin2

6002402sin3

6002402sin

π

ππ

( )tty

nfnnTtnny

s

π

π

480sin2)(

600

6002402sin2)(

−=

===⎟⎠⎞

⎜⎝⎛−=

(d)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 73: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Note :

(a) bit rate = fs × no of bits

= 8000 samples/sec × 12

=96,000 samples/sec

x[n]

12

x(t) 12-bits A/D(fs = 8,000

kHz)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 74: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(b) In the case of PCM, speech signals are filtered to remove effectively all frequency components above 3.4 kHz and the sampling rate is 8000 samples per sec

Bit rate (bits per second)= sampling frequency × bits/sample= 8000 samples/second × 8-bits/sample= 64,000 bits/sec

0-3.4 kHz

8-bit persample

fs = 8000 Hz(8000 samples/sec)

speech signal x(t) 8-bits(compressed PCM)A/D

converter

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 75: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

bit rate=16×44100 bits/sec=0.7056 Mbits/sec

CD16 bit

fs= 44.1 kHz

CDReader

16 bitD/A

lowpassfilter

AMP

16 bit fs = 44.1kHz

(c)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 76: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.7 Introduction to Digital Filters

There are two types of digital filters:

Recursive (there is at least one feedback path in the filter)Non-recursive (no feedback paths)

A linear time invariant discrete (LTD) system described by the following equation is commonly called a digital filter:

[ ] [ ] [ ] (3.9) 10∑∑==

−−−=L

kk

M

kk knybknxany

Feed forward Feedback

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 77: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

where x[n] is the input signal, y[n] is the

output signal. a0, a1, a2, ...., aM; b1, b2,

b3, ..., bL are constants (filter coefficients). These coefficients determine the characteristics of the system.

when bk = 0 the filter is said to be non-recursive type

when bk ≠ 0 recursive type.

[ ] [ ] [ ] (3.9) 10∑∑==

−−−=L

kk

M

kk knybknxany

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 78: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.7.1 Non Recursive Digital Filters (FIR)

If bk = 0, then the calculation of y[n] does not require the use of previously calculated samples of the output (see equation (3.9)).

This is recognised as a convolution sum.

[ ] [ ] [ ] [ ] [ ]knxanxanxaknxany M

M

kk −++−+=−= ∑

=

L1100

[ ] [ ] [ ]∑=

−=M

kknxkhny

0Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 79: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Therefore the impulse response is identical to the coefficients, that is,

Any filter that has an impulse response of finite duration is called Finite Impulse Response (FIR) filter.

[ ]⎩⎨⎧ ≤≤

=otherwise

Mnanh n

00

[ ] [ ] [ ] [ ] [ ]knxanxanxaknxany M

M

kk −++−+=−= ∑

=

L1100

h(0) h(1) h(M)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 80: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example :

[ ] [ ] [ ] [ ]2

21

10

210

)()()(

21

−− ++==

−+−+=

zazaazXzYzH

nxanxanxany

This is a (non-recursive) second order FIR filter

Property: A property of the FIR filter is that it will always be stable.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 81: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(a) Stability requires that there should be no poles outside the unit circle. This condition is automatically satisfied since there are no poles at all outside the origin. (In fact, all poles are located at the origin.)

(b) Another property of non-recursive filter is that we make filters with exactly linear phase characteristics [4]

Note: The ability to have an exactly linear phase response is one of the most important properties of a LTD system (filter). When a signal passes through a filter, it is modified in amplitude and/or phase. The nature and extent of the modification of the signal is dependent on the amplitude and phase characteristics of the filter.Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 82: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The phase delay or group delay of the filter provides a useful measure of how the filter modified the phase characteristic of the signal. If we consider a signal that consists of several frequency components (eg. speech waveform) the phase delay of the filter is the amount of time delay each frequency component of the signal suffers in going through the filter.

(3.10) )()(_θθφ

−=pTdelayphase

[the negative of the phase angle divided by frequency]

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 83: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The group delay on the other hand is the average time delay the composite signal suffers at each frequency as it passes from the input to the output of the filter.

(3.11) )()(_θθφdTdelaygroup g −=

[the negative of the derivative of the phase with respect to frequency]Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 84: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

A constant group delay means that signal components at different frequencies receive the same delay in the filter.

A linear phase filter gives same time delay to all frequency components of the input signal. A filter with a nonlinear phase characteristic will cause a phase distortion in the signal that passes through it.

φ(θ)

φ(θ) = -θ

- π π θ

Figure 3.12. Phase response of a linear phase filter

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 85: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

This is because the frequency components in the signal will each be delayed by an amount not proportional to frequency, thereby altering their harmonic relationship. Such a distortion is undesirable in many applications, for example music, video etc.

A filter is said to have a linear phase response if its phase response satisfies one of the following relationships:

( )( ) (3.12) θθφ

θθφab

a−=

−=

where ‘a’ and ‘b’ are constants.Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 86: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example

Two filter structures are shown below. Show that both filters have linear phase.

z-1 z-1

+1 +1 +1

+

x[n]z-1 z-1

+1 -1

+

x[n]

y[n]y[n]

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 87: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

z-1 z-1

+1 -1

+

x[n]

y[n]

[ ] [ ] [ ] [ ]( )( )

( )( )θ

θ

θ

θθθ

θθ

cos211

11

21

2

21

+=

++=

++=

++=

−+−+=

−−

−−

−−

j

jjj

jj

eeee

eeHzzzH

nxnxnxny

z-1 z-1

+1 +1 +1

+

x[n]

y[n]

[ ] [ ] [ ]( )( )

( )( )θθ

θ

θ

θ

θθθ

θ

π

π

sin2

sin2

22

11

2

2

2

2

2

−−

=

=

⎟⎟⎠

⎞⎜⎜⎝

⎛ −=

−=

−=

−−=

j

jj

jjj

j

e

ee

jeeje

eHzzH

nxnxny

phase: φ(θ) = π/2 - θ ,linear phase

phase: φ(θ) = -θ ,linear phaseProf

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 88: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.7.2 Recursive Digital filter (IIR)Every recursive digital filter must contain at least one closed loop. Each closed loop contains at least one delay element.

For Recursive digital filters bk ≠ 0. Let a0 = a0 ,ak = 0 for k > 0, b1 = b1 & bk = 0 for k > 1

[ ] [ ] [ ]∑∑==

−−−=L

kk

M

kk knybknxany

10

[ ] [ ] [ ]

( ) 11

0

10

1

1

−+=

−−=

zbazH

nybnxany

IIR filter

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 89: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

A recursive filter is an infinite impulse response filter (IIR).

Examples :2

21

10)( −− ++= zazaazH

22

111

1)( −− ++=

zbzbzH

22

11

22

11

11)( −−

−−

++++

=zbzbzazazH

Zeros only

Poles and Zeros

(2nd order FIR filter)

2nd order IIR filter (all pole filter)

IIR filter

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 90: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example :

The difference equation is: y[n] = x[n] + ay[n-1].

The DC gain of H(z) can be obtained by substituting θ = 0.

If dc gain is undesirable, introduce a constant gain

factor of (1-a), so that H(z) becomes

Note: Poles and zeros can be real or imaginary

101

1)( 1 <<−

= − aaz

zH

aaeH j −

=−

= −= 11

11|)( )0(0θθ

111)( −−−

=az

azH

dc gain = 1]1[][)1(][ −+−= naynxanyProf

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 91: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example:

Consider a lowpass filter

(i) Determine ‘b’ so that |H(0)| = 1

(ii) Determine the 3dB bandwidth (here) for the normalised filter in part (i)

10 1 <<+= a bx[n],] ay[n-y[n]

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 92: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(i) Y(z) = aY(z) z-1 + b X(z) ⇒ 11)( −−=

azbzH

θjaebzH −−

=1

)(

11

)0( =−

=a

bH

θθθθ

θθθ θ

cos211

)sin()cos1(1)(

sin)cos1(1

11)(

222 aaa

aaaH

jaaa

aeaH j

−+

−=

+−

−=

+−−

=−−

= −

we have |H(0)| =1

⇒ b = 1 - a

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 93: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Second Method:

⎭⎬⎫

⎩⎨⎧

+−−

=−−

⋅−−

=⋅= − 2

2*2

cos21)1(

11

11)()(|)(|

aaa

aea

aeaHHH jj θ

θθθ θθ

222 |)0(|21|)(|1|)0(| H

cHH =

=∴=

θθθ

(half-power point)θ

21

1

|H(θ)|0 dB

3 dB

θc

2cos211|)(|

aaaH

+−

−=

θθ∴

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 94: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

θ

21

1

|H(θ)|2

θc

⎥⎦

⎤⎢⎣

⎡ −+−=

−+−

=

aaa

aaa

c

c

214cos

cos21)1(

21

21

2

2

θ

θ

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 95: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example: Consider a filter described by

2

2

)(azcczazH

++

= where a & c are constants.

Show that the magnitude response |H(θ)| is unity for all θ.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 96: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

1][][

)()(|)(|

2222

2222

2

2

2

2*2

=++++++

=

++

⋅++

=⋅=

θθ

θθ

θ

θ

θ

θ

θθθ

jj

jj

j

j

j

j

eeaccaeeacac

ceaaec

ceaaecHHH

|H(θ)|

-π π θ

This is an all-pass filter.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 97: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.8 Digital filter Realisation [11][ ] [ ] [ ]

1

1

1)()()(

)()()(

1

1

0

1

0

10

10

444 3444 2143421

43421

structure

poles

L

k

kk

zeros

M

k

kkL

k

kk

M

k

kk

L

k

kk

M

k

kk

L

kk

M

kk

zbza

zb

za

zXzYzH

zzYbzzXazY

knybkxany

∑∑

∑∑

∑∑

=

−=

=

=

=

=

==

+⋅=

+==∴

−=

−−−=

444 3444 21

43421

43421

2

0

11

1

structure

zeros

M

k

kk

poles

L

k

kk

zazb

∑∑ =

=

−⋅

+=

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 98: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

-b1

-b2

-bL

X(z)+

z-1

z-1

z-1

a1

a2

aM

a0 Y(z)

z-1

z-1

z-1

Figure 3.13. Structure 1 or Direct Form 1

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 99: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

a1

a2

aM

-b1

-b2

-bL

a0X(z) Y(z)

+ +

z-1

z-1

z-1

z-1

z-1

z-1

Figure 3.14. Structure 2 or Direct Form IIProfes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 100: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

In the case when L = M, we have Canonic form realisation.

A discrete-time filter is said to be canonic if it contains the minimum numbers of delay elements necessary to realise the associated frequency response.

a0

a1

a2

aM

-b1

-b2

-bL

X(z)+

z-1

z-1

z-1

Y(z)+

Figure 3.15. Canonic form

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 101: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.8.1 Parallel Realisation [11]

44444444 344444444 21

L

L

structureparallel

k

k

ii

LL

MM

zHzHzHzHzH

zbzbzbzazazaazH

_

3211

22

11

22

110

)(...)()()()(

1)(

++++==

++++++++

=

∑=

−−−

−−−

(use partial fraction to obtain Hi(z))

Y(z)

H1(z)

H2(z)

Hk(z)

X(z)+

Figure 3.16. Parallel structure

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 102: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.8.2 Cascade Realisation [11]

44444 344444 21

L

L

structurecascade

k

k

ii

LL

MM

zHzHzHzHzHzH

zbzbzbzazazaazH

_

3211

22

11

22

110

)(ˆ)...(ˆ)(ˆ)(ˆ)(ˆ)(

1)(

⋅⋅==

++++++++

=

∏=

−−−

−−−

(Product of lower order transfer function ie. 1st or 2nd order sections)The cascade structure is the most popular form

Y(z)X(z)

Fig 3.17. Cascade structure

)(ˆ1 zH )(ˆ

2 zH )(ˆ zH k

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 103: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example:

A parallel realisation of a third order system

H(z) is given by

21

1

1

211

321

3252

)325)(2(19364023)(

−−

−−−

−−−

++−

++

+=

++++++

=

zzDzC

zBA

zzzzzzzH

H0(z) H1(z) H2(z)Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 104: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

21

1

1

21

1

1

21

1

1

6.04.01

)151

1523(

5.01)5.2(

319

)6.04.01(5)23(

31

5.011

25

319)(

325)23(

31

25

319)(

−−

−−

−−

++

+−+

+−

+=

++−

−+

−=

++−

−+

−=

zz

z

z

zzz

zzH

zzz

zzH

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 105: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

-0.5

-0.4

-0.6

x[n]

+

z-1

z-1

+

-2.5

z-1

y[n]+ +

319

1523

151

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 106: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example: A cascade realisation of a third-order system is given by

⎟⎟⎠

⎞⎜⎜⎝

⎛++++

⎟⎟⎠

⎞⎜⎜⎝

⎛++

=

++++

++

=

++++

++

=

++++

++

=

++++++

=

−−

−−

−−

−−

−−

−−

−−

−−

−−−

−−−

21

21

1

1

21

21

1

1

21

21

1

1

21

21

1

1

321

321

6.04.018.34.36.4

5.01)5.05.0(

6.04.018.34.36.4

5.01)5.05.0(

)6.04.01(5191723

)5.01(2)1(

325191723

)2()1(

3891019364023)(

zzzz

zz

zzzz

zz

zzzz

zz

zzzz

zz

zzzzzzzH

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 107: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

x[n] y[n]

0.5-0.5

0.5

z-1

+ +

3.4-0.4

4.6

z-1

+

3.8-0.6 z-1

+

Cascade

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 108: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example:

Implement the following system in the cascade, direct form II and parallel structures. All coefficients are real.

)1)(1(1)( ).( 11 −− −+

=bzaz

zHa

cascade structure

x[n] y[n]

-az-1

+

bz-1

+

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 109: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

21)(11)( −− −−+

=abzzba

zH

y[n]x[n]+

-(a-b)z-1

+ab z-1

Direct form II

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 110: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

1111 1111)( −−−− −

++++=

−+

+=

bzba

b

azba

a

bzB

azAzH

Parallel structure

-a

b

x[n]

z-1

z-1

y[n]baa+

bab+

+

+

+

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 111: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

31)1(1)( )( −−

=az

zHb

a

x[n] y[n]

az-1

+

az-1

+

z-1

+

cascade structureS

No parallel structure exists because partial fraction expansion cannot be performed.Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 112: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

33221 3311)( −−− −+−

=zazaaz

zH

Direct Form II

a3

x[n] y[n]

3az-1

+

-3a2z-1

z-1

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 113: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

cascadezbbzzaaz

zbazba

parallelbzza

zHc

←+−+−

+++−=

←−

+−

=

−−−−

−−

−−

)21)(21()()(21

)1(1

)1(1)( ).(

221221

1221

2121

)1)(1(1

)1)(1(1)( 1111 −−−− −−

+−−

=bzbzzaza

zH

y[n]x[n]a

z-1+

az-1

+

parallel structure

+

bz-1

+

bz-1

+

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 114: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

-2(a+b)

a2+b2

y[n]+

2bz-1

-b2 z-1

+

2a z-1

-a2

x[n]

z-1

+

221221

2221

211

)21()()(21)( −−−−

−−

+−⋅

+−+++−

=zbbzzaaz

zbazbazH

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 115: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.9 Magnitude and Phase Response [11]

We can show that the magnitude response is an even function of frequency

The phase response is an odd function of frequency

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 116: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example:Calculate the magnitude and phase response of the

3-sample averager given by

[ ]⎪⎪⎩

⎪⎪⎨

⎧ ≤≤−=

otherwise

nnh

0

1131

∑ ∑∞

−∞=

−=

−− ++===n n

nn zzzznhznhzH 1011

1 31

31

31)()()(

[ ]11 131)( zzzH ++= −Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 117: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

[ ] [ ]3111

31)()( ⋅++=++== −−

=θθθθ

θθ jjjjez

eeeezHH j

[ ]θθ cos2131)( +=H

Precautions must be taken when determining the phase response of a filter having a real-valuedtransfer function, because negative real values produce an additional phase of π radians.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 118: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

For example, let us consider the following linear-phaseform of the transfer function

H(θ) = e-jkθB(θ)

real-valued function of θ that can take positive and negative values.

Let phase angle is φ :

( ) ( ) ( ) ( ) ( )( ) ( ) ( ) ( ) ( )θθθθθ

θθθθθkjBkBH

kjBkBHsincossincos

−−=−+−=

)tan()cos()()sin()(tan θ

θθθθφ k

kBkB

−=−=

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 119: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The phase function φ(θ) includes linear phase term and also accommodates for the sign changes in B(θ). Since -1 can be expressed as , phase jumps of ±π will occur at frequencies where B(θ) changes sign.

If B(θ) > 0, then φ(θ) = -kθ.

If B(θ) < 0, then φ(θ) = -kθ ± π..

tanφ = tan(-kθ) ∴φ = -kθ or φ(θ) = -kθ

phase angle

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 120: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Let us get back to our example

πωωπ

ω

θπθφ

θθφ

θθθθ

ππ

ππ

<<−≤≤−

<<−

⎪⎩

⎪⎨⎧

<±=

>=

+=⇒+=

32

32

32

32

and0)(0)(

0)(0)(

]cos21[31|)(|]cos21[

31)(

H

H

HH

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 121: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The appropriate sign of π must be chosen to

make φ(θ) an odd function of frequency.

φ(θ)

-2π -π -2π/3 2π/3 π 2π θ

|H(θ)|

-2π -π -2π/3 2π/3 π 2π θ

π

Odd function

Even function

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 122: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example:Find the magnitude and phase response of the following:

0)(,21)2(,1)1(,

21)0( ==== nhhhh

θθφ

θθ

θ

θ

θ

θθθ

θθ

−=

+=

⎥⎦⎤

⎢⎣⎡ ++=

++=

++=++=

−−

−−

−−−−

)(

]cos1[)(211

21

21

21)(

21

21

211

21)(

)(

2

21210

43421B

j

jjj

jj

eH

eee

eeH

zzzzzzH

The amplitude function is never negative (therefore there is no phase jumps of ±π)Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 123: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

-π π θ

Even function2

|H(θ)|

-π-π π

Odd function

πφ(θ)

θ

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 124: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example :

10)(

01)(case

otherwisennn

⎭⎬⎫

===

δδ

φ(θ)|H(θ)|

1

-π π θ -π π θ

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 125: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

|H(θ)|1

-π πθ

φ(θ)

-π πθ

π

k

δ(n-k)

n

h[n] = δ[n-k]H(z) = 1z-k

H(θ) = 1e-jθk

B(θ) = 1 φ(θ) = -kθ

Note: When phase exceeds ±πrange a jump of ±2π is needed to bring the phase back into ±πrange.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 126: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Phase Jumps: From the previous examples, we note that there are two occasions for which the phase function experiences discontinuities or jumps.

(1) A jump of ±2π occurs to maintain the phase

function within the principal value range of [-π and π]

(2) A jump of ± π occurs when B(θ) undergoes a change of sign

The sign of the phase jump is chosen such that the resulting phase function is odd and, after the jump, lies in

the range [-π and π].Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 127: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example: Magnitude and phase response of causal 3-sample average.

[ ]

[ ]

πθπ

πθπθπθ

πθπθθθφ

θθθθθφ

θθ

θ

θ

θ

θθθ

θθ

<<

−<<−<±−=

<<−>−=

+==−=

+=∴

++=

++=⇒++=

⎩⎨⎧ ≤≤

=

−−

−−−−

32

320)(

32

320)()(

]cos21[31|)(||)(|;)(

]cos21[31)(

131

31

31

31)(

31

31

31)(

otherwise020for

)(

221

31

B

B

BH

eH

eee

eeHzzzH

nnh

B

j

jjj

jj

4434421

φ(θ)

-π π θ

π

1|H(θ)|

-π -π/2 π/2 π θ

π

2π/3

-2π/3

Phase is undefined at points |H(θ)| = 0.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 128: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example:

Determine and sketch the magnitude and phase response of the following filters:

[ ] [ ] [ ]( )

[ ] [ ] [ ][ ] [ ]4 )(

8 )(

121 )(

−=−−=

−−=

nxnyiiinxnxnyii

nxnxnyi

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 129: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

2sin

2sin

222

1

21]1[

21)(

]1[21)()]()([

21)(

22

222

222

222

11

θ

θ

θ

θπ

ππθ

θθθ

θθθθ

⎟⎠⎞

⎜⎝⎛ −

−−

−−−

−−

=

⎥⎦

⎤⎢⎣

⎡==

⋅⎥⎥⎥

⎢⎢⎢

⎡−

=

⎥⎦

⎤⎢⎣

⎡−=−=

−=⇒−=

j

jjj

jjj

jjjj

e

ejee

jjeee

eeeeH

zzHzXzzXzY

|H(θ)|

-π πθ

π/2

-π/2

φ(θ)

-π π θ

(i)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 130: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

θπθφ

θ

θθ

θ

θπ

πθ

θθθθ

42

)(

4sin2

4sin222

1)(

1)()()()()(

)(

42

2444

48

88

−=

=

⋅=×⎥⎦

⎤⎢⎣

⎡ −=−=

−=⇒−=

⎟⎠⎞

⎜⎝⎛ −

−−

−−

−−

43421B

j

jjjj

jj

e

eejjeeeeH

zzXzYzXzzXzY

φ(θ)

|H(θ)|

π/4 π/2 3π/2 π θ

-π/2

π/2

π/4 π/2 3π/2 π θ

(ii)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 131: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

[ ] [ ]( ) ( ) ( )( )( ) 1

4

4

44

=

=

=⇒=

−=

−−

θθ θ

HeH

zzHzXzzYnxny

j

|H(θ)|1

-π π θ

π

φ(θ) = -4θ

π/4 π θ

(iii)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 132: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example:Determine and sketch the magnitude and phase response of 1st order recursive filter (IIR filter)

[ ] [ ] [ ]1−+= naynxny

phaseaa

aa

aaa

aaa

aaja

aaa

aeae

aeH

aeH

azzH

zXzY

j

j

j

j

⎥⎦⎤

⎢⎣⎡−−

=

−−

=

+−−

+−−

=

+−−

+−−

=−−

⋅−

=

−=

−==

−−

θθθφ

θθ

θθθθ

φ

θθ

θθθ

θ

θ

θ

θ

θ

cos1sintan)(

cos1sin

cos21cos1

cos21sin

tan

cos21sin

cos21cos1

11

11)(

11)(

11)(

)()(

1

2

2

22

1

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 133: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

θθ jj aeae −⋅

−= − 1

11

1

2cos211|)(|

aaH

+−=

θθ

Even Symmetry|H(θ)|

-π πθ

a= 0.5

φ(θ)Odd Symmetry

-π π θ

Non-linear phase

Magnitude: |H(θ)|2 = H(θ)⋅H*(θ) [H*(θ) is the complex conjugate]

Assuming 0 < a < 1

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 134: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Examples :

The gain k0 can be selected as 1 – a, so that the

filter has unity gain at θ = 0.

In this case, (for unity gain at θ = 0).

Filter Pass-Low 1

11

)( ).( 110

1 −− −−

⇒−

=az

aazkzHa

1

1

02 11)( ).( −

−+

=azzkzHb

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 135: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The addition of a zero at z = -1 further attenuates the response of the filter at high frequencies

|H2(θ)|

|H(θ)|

-π π θ

Low-Pass Filter|H1(θ)|

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 136: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(c) We can obtain simple high-pass filters by reflecting (folding) the pole-zero locations of the low-pass filters about the imaginary axis in the z-plane.

1

1

3 11

21)( −

+−

⋅−

=azzazH

π θ-π

1

|H3(θ)|High pass filter

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 137: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

( )[ ] [ ] [ ]1

1 14

−+=+= −

nxnxnyzzH

( )[ ] [ ] [ ]1

1 15

−−=−= −

nxnxnyzzH

(d)

(e)

High-Pass Filter

Low-Pass Filter

π θ-π

2|H5(θ)|2

|H5(θ)|2 = 2(1-cosθ)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 138: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

|H6(θ)|2 = 4(1-cosθ)2

π θ-π

4|H6(θ)|2

(f) ( ) ( )21

6 1 −−= zzH

( ) ( )317 1 −−= zzH

(g) |H7(θ)|2 = 8(1-cosθ)3

π θ-π

8|H7(θ)|2

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 139: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.10 Minimum-phase, Maximum-phase and Mixed phase systems [11]

Let us consider two FIR filters:

12

11

21)(

211)(

+=

+=

zzH

zzH

21−=

ρ

|z|=1

ρ = -0.5

|z|=1Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 140: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

H2(z) is the reverse of the system H1(z). This is due to the reciprocal relationship between the zeros of

H1(z) & H2(z).

The magnitude characteristics for the two filters are

identical because the roots of H1(z) & H2(z) are reciprocal.

θθθ

θθ θθ

cos45|)(||)(|

21)(&

211)(

21

21

+==

+=+= −−

HH

eHeH jj

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 141: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Phase:

θθθφ

θ

θθφ

cos2sintan)(

cos21

sintan)(

11

12

+=

+=

π

φ2 (θ)

-π π θ

πφ1(θ)

-π π θ

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 142: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Note: If we reflect a zero z = ρ that is inside

the unit circle into a zero outside the unit

circle the magnitude characteristic of the system is

unaltered, but the phase response changes.

We observe that the phase characters φ1(θ) begins at zero phase at frequency θ = 0 and terminates at zero phase at the frequency ω = π. Hence the net phase change.

Minimum phase filter

ρz 1=

( ) ( ) 0011 =−φπφProfes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 143: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

On the other hand, the phase characteristic for the filter with the zero outside the unit circle undergoes a net phase change

As a consequence of these different phase characteristics, we call the first filter a minimum-phase system and the second system is called a maximum-phase system.

If a filter with M zeros has some of its zeros inside the unit circle and the remaining outside the unit circle, it is called a mixed-phase system.

( ) ( ) radians 012 πφπφ −=−

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 144: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

A minimum-phase property of FIR filter carries over to IIR filter.

Let us consider

is called minimum phase if all its poles and zeros are inside the unit circle.

)()()(

zAzBzH =

|z|=1

Re(z)Minimum phase

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 145: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

If all the zeros lie outside the unit circle, the system is called maximum phase.

|z|=1

Re(z)Maximum phase

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 146: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

If zeros lie both inside and outside the unit circle, the system is called mixed-phase.

|z|=1

Re(z) Mixed phase

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 147: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Note: For a given magnitude response, the minimum-phase system is the causal system that has the smallest magnitude phase at every frequency

(θ). That is, in the set of causal and stable filters having the same magnitude response, the minimum-phase response exhibits the smallest deviation from zero phase.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 148: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example:

Consider a fourth-order all-zero filter containing a double complex conjugate set of zeros located at

.The minimum-phase, mixed phase and maximum phase system pole-zero patterns having identical magnitude response are shown below.

47.0πj

ez±

=

|z|=1

ρ

4

mixed-phase

ρ=0.72

24

|z|=1

Minimum-phase

|z|=1

4

maximum-phase

2

21/ρProfes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 149: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The magnitude response and the phase response of the three systems are shown below: The minimum-phase system seems to have the phase with the smallest deviation from zero at each frequency.

|H(θ)|

θπ

φ(θ)

θ

minimum phase

mixed-phase (In the case linear phase)

maximum phase

-2π

-3π

-4πProfes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 150: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example:A third order FIR filter has a transfer function

G(z) given by

From G(z), determine the transfer function of an FIR filter whose magnitude response is identical

to that of G(z) and has a minimum phase response.

)25)(21216()( 1−+−−−−= zzzzG

)251)(

341)(

231(12)( 111 −−− ++−= zzzzG

>1

)52)(43)(32()( 111 −−− ++−= zzzzG

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 151: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

23

32

34

−25

)521)(

431)(

321()(filter phase Minimum The 111 −−− ++−= zzzkzP

lm(z)

Re(z)

|z|=1

-

- 43

−52

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 152: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

%Exercise 1. Minimum and maximum phase filter%We examine the properties of minimum and maximum phase filter%We start with a maximum phase filter from the example in page 64.zeros_maxphase = [3/2 -4/3 -5/2]' % zeros position%Note the transpose operation since the inputs are zeros and poles.%If the inputs are row vectors, they will be treated as polynomial coefficents.poles_maxphase = [0 0 0]‘%poles are located at origin%After specifying the poles and zeros position, we now plot their position.figure(1)%create a new figure (No.1)zplane(zeros_maxphase, poles_maxphase)%We also find the numerator and denominator coefficients of the transfer function

-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5

-1.5

-1

-0.5

0

0.5

1

1.5

Real Part

Imag

inar

y P

art

3

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 153: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

% in order to plot the magnitude and phase responses.

numerator_maxphase = poly(zeros_maxphase)

denominator_maxphase = 1;

% since all poles are at origin

figure(2)

% create a new figure (No.2)

freqz(numerator_maxphase,denominator_maxphase)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

5

10

15

20

Normalized Angular Frequency (×π rads/sample)

Mag

nitu

de (d

B)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-800

-600

-400

-200

0

Normalized Angular Frequency (×π rads/sample)

Pha

se (d

egre

es)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 154: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

% We now consider the minimum phase filter, which is derived from the maximum% phase filter above.% Recall that the minimum phase filter has all zeros inside the unit circle,% that is, their values are less or equal to 1.zeros_minphase = 1 ./ zeros_maxphase% take the reciprocalpoles_minphase = poles_maxphase% no change to the poles % After specifying the poles and zeros position, we now plot their position.figure(3)% create a new figure (No.3)zplane(zeros_minphase, poles_minphase)%% We also find the numerator and denominator coefficients of the transfer function

-1 -0.5 0 0.5 1

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Real Part

Imag

inar

y P

art

3

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 155: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

% in order to plot the magnitude and phase responses.numerator_minphase = poly(zeros_minphase)denominator_minphase= 1;% since all poles are at originfigure(4) % create a new figure (No.4)freqz(numerator_minphase, denominator_minphase)%

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-15

-10

-5

0

5

Normalized Angular Frequency (×π rads/sample)

Mag

nitu

de (d

B)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-60

-40

-20

0

20

Normalized Angular Frequency (×π rads/sample)

Pha

se (d

egre

es)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 156: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.11 All-Pass Filters [11]

An all-pass filter is one whose magnitude response is constant for all frequencies, but whose phase response is not identically zero.

[The simplest example of an all-pass filter is a pure

delay system with system function H(z) = z-k]

A more interesting all-pass filter is one that is described by

where a0 = 1 and all coefficients are real.

LL

LLLL

zazazazazaa

zH−−

−+−−−

+++

++++=

L

L1

1

01

11

1

1)(

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 157: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

If we define the polynomial A(z) as

1|)()(|)(|)()()(

1)(

121

00

=⋅=⇒=∴

==

=−

−−

=

−∑

θθ jezL

L

k

kk

zHzHHzA

zAzzH

azazA

i.e. all pass filter,

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 158: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Furthermore, if z0 is a pole of H(z), then is a

zero of H(z) {ie. the poles and zeros are reciprocals of one another}. The figure shown below illustrates typical pole-zero patterns for a single-pole, single-zero filter and a two-pole, two-zero filter.

0

1z

a1

|z|=1

0

All-pass filter

a

|z|=1

r

0

All pass filter

θ0

(1/r, θ0)

(1/r, -θ0)(r, -θ0)

1

1

1

11)( −

−=

az

zazH |a| < 1 for stabilityProf

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 159: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

We can easily show that the magnitude response is constant.

Phase response:

22

2

1*2

cos21

1cos21

1

11

1

11

|)()()()(|)(

aaθaa

θa

ae

ea

ae

ea

zHzHθHθHθH

θj

θj

θj

θj

ez θj

=+−

+−=

−⋅

−=

⋅=⋅=

=−

⎥⎦

⎤⎢⎣

⎡+−−−

=∴

+−−−+−

=−−

⋅−

−=

−−

−−

θθθφ

θθθθ θ

θ

θ

θ

cos)(2sin)(tan)(

cos21sin)(cos)(2

11

1

11)(

1

11

2

11

aaaa

aaaajaa

aeae

ae

eaH j

j

j

j

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 160: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

φ(θ)

π

a = 0.5π

θa = -0.5 a= -0.8

When 0 < a < 1, the zero lies on the positive real axis. The phase over 0 ≤ θ ≤ π is positive, at θ = 0 it is equal to π and decreases until ω = π, where it is zero.

When -1< a < 0, the zero lies on the negative real axis. The phase over 0 ≤ θ ≤ π is negative, starting at 0 for θ = 0 and decreases to -π at ω = π.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 161: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.12 A second Order Resonant Filter

002

001

sincos

sincos0

0

θθ

θθθ

θ

jrrrep

jrrrepj

j

−==

+==−

(A) 1

1)(21

2

2

22

11 bzbz

zzbzb

zH++

=++

= −−

z-1

z-1

+y[n]x[n]

-b1

-b2

θ0r p1

p2

All pole system has poles only (without counting the zeros at the origin)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 162: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(B) cos2)(

)(

))(())(()(

20

2

2

22

2

2

21

2

21

12

2

00

00

rzrzz

rzeerzzzH

rezrezz

pzpzz

bzbzzzH

jj

jj

+−=

++−=

−−=

−−=

++=

−−

θθθ

θθ

2201 , cos2 rbrb =−= θ

2

10 2 b

bCos −=θ

sff0

02πθ =

θ0 = resonant frequency

Comparing (A) and (B), we obtain

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 163: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.13 Stability of a second-order filter

Consider a two-pole resonant filter given by

b1 & b2 are coefficients

This system has two zeros at the origin and poles at

22

1121

2

2

11)( −− ++

=++

=zbzbbzbz

zzH

24

2, 211

21

bbbpp

−±−=Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 164: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The filter is stable if the poles lies inside the unit circle i.e. |p1| < 1 & |p2| < 1

For stability b2 < 1. If b2 = 1 then the system is an oscillator (Marginally stable)

Assume that the poles are complex

i.e. b12 – 4b2 < 0 ⇒ b1

2 < 4b2 and

If b12 – 4b2 ≥ 0 then we get real roots.

0 , 2 221 >±< bbb

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 165: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The stability conditions define a region in the

coefficient plane (b1, b2) which is in the form of a triangle (see below)

The system is only stable if and only if the point

(b1, b2) lie inside the stability triangle.

b1

b2

-2 -1 0 1 2

1

-1

Real Poles

Complex Conjugate Poles

112 −= bb112 −−= bb

4

21

2bbparabola =

12 =b

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 166: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Stability Triangle

If the two poles are real then they must have a value between -1 and 1 for the system to be stable.

01 and 01)2(4 and 4)2(

24 and 42

242

12

41

2121

212

212

21

21

12212

211

12211

2211

>++<−−+<−−>+−

+<−−−<+−∴

+<−±<+−

<−±−

<−

bbbbbbbbbb

bbbbbb

bbbb

bbb

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 167: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

The region below the parabola (b12 > 4b2)

corresponds to real and distinct poles.

The points on the parabola (b12 = 4b2) result in real

and equal (double) poles.

The points above the parabola correspond to complex-conjugate poles.

b1

b2

-2 -1 0 1 2

1

-1

Real Poles

Complex Conjugate Poles

112 −= bb112 −−= bb

4

21

2bbparabola =

12 =b

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 168: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.14 Digital Oscillators

A digital oscillator can be made using a second order discrete-time system, by using appropriate coefficients. A difference equation for an oscillating system is given by

From the table of z-transforms we know that the

z-transform of p[n] above is

[ ] ( )θnAnp cos=

21

1

cos21cos1)( −−

+−−

=zzθ

zθzP

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 169: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Let21

1

cos21cos1

)()()(

−−

+−

−==

zzθzθ

zXzYzP

Taking inverse z-transform on both sides, we obtain

[ ] [ ] [ ] [ ] [ ]1cos21cos2 −−=−+−− nxnxnynyny θθ

No Input term for an oscillator x[n] = 0, x[n-1] = 0

So the equation of the digital oscillator becomes

[ ] [ ] [ ]21cos2 −−−= nynyny θProfes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 170: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

% Exercise 2. Digital oscillator% We now implement a digital oscillator which uses some initial conditions.theta = pi/8 % angular frequency of the oscillatoramplitude = 2 % amplitude of the oscillatornumber_of_samples = 100% The oscillation depends on the initial conditions.% That is, we can make a sine or cosine wave by specifying the right initial conditions.% These are initial conditions for creating a sine wave.% Remove the `%' symbol to use themy1 = -amplitude * sin(theta), y2 = -amplitude * sin(2*theta)% These are initial conditions for creating a cosine wave.% Remove the `%' symbol to use themy1 = amplitude * cos(theta), y2 = amplitude * cos(2*theta)y = zeros(1,number_of_samples); % initializing oscillation samplesweight = 2 * cos(theta)% Notice the oscillation samples are evaluated without calling the commands `cos' or `sin'.% It only requires multiplication and addition(subtraction).for n = 1:number_of_samples

y(n) = weight * y1 - y2;y2 = y1;

% updating previous samplesy1 = y(n);

end Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 171: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

figure(4)stem(y)hold onplot(amplitude*cos(theta*(0:number_of_samples-1)),'r-.')hold off%% Notice that if the first set of initial conditions are selected, the oscillation starts% at zero level. If the second set is selected, it starts at the amplitude level.% Other initial conditions can be selected which will make the oscillation to start at % certain phase.%% Experiment with different values of `theta', `amplitude'

0 10 20 30 40 50 60 70 80 90 100-2.5

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 172: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

So the equation of the digital oscillator becomes

[ ] [ ] [ ]21cos2 −−−= nynyny θ

and its structure is shown below.

b2 = -1

b1 = 2cosθ

y[n-2]y[n-1]+ z-1 z-1

y[n] = A cos(nθ)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 173: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

To obtain y[n] =Acos(nθ), use the following initial conditions:

y[0] = A cos(0.θ) = Ay[-1] = A cos(-1.θ) = A cosθ

The frequency can be tuned by changing the coefficient

b1 (b2 is a constant). The resonant frequencyθ of the oscillator is,

22cos 1

2

1 bbb

−=−

=θ (For an oscillator b2 = 1)

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 174: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example:A digital sinusoidal oscillator is shown below.

(a) Assuming θ0 is the resonant frequency of the digital oscillator, find the values of b1 and b2 for sustaining the oscillation.

x[n]

-b1

+z-1

z-1

y[n] = A sin(n+1)θ

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 175: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

20

2

22

22

11

cos2

)(

))((1)(

00

00

rzrzK

rzeerzK

rezrezK

zbzbKzH

jj

jj

+−=

++−=

−−=

++=

−−−

θ

θθ

θθ

∴b1 = -2 r cosθ0 ; b2 = r2

For oscillation b2 = 1 ⇒ r = 1 ∴ b1 = -2 cosθ0Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 176: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(b). Write the difference equation for the above figure. Assuming

x[n] = (Asinθ0)δ[n], and y(-1) = y(-2) = 0.

Show, by analysing the difference equation, that the application of an impulse at n = 0 serves the purpose of beginning the sinusoidal oscillation, and prove that the oscillation is self-sustaining thereafter.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 177: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

[ ] [ ] [ ] [ ][ ] [ ] [ ] [ ]nAnynyny

nxnynybnyδθθ 00

1

sin21cos221

+−−−=+−−−−=

y[0] = A sinθ0

y[1] = 2cosθ0 , Asinθ0 = A sin2θ0

0 0 1

0 0

n = 0y[0] = 2cosθ0 y[-1] – y[-2] + A sinθ0 δ[0]

y[1] = 2cosθ0 y[0] –y[-1] + A sinθ0 δ[1]

n = 1

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 178: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

y[2] = 2 cosθ0 y[1] – y[0] + A sinθ0δ[2]= 2 cosθ0 Asin2θ0 – A sinθ0= 2A cosθ0 [2 sinθ0cosθ0] - sinθ0= A sinθ0 [4 cos2θ0 –1 ] = A[3sinθ0 – 4 sin3θ0]

n = 2

where sin3θ0 = 3sinθ0 – 4 sin3θ0

y[2] = A sin3θ0 and so forth.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 179: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

By setting the input to zero and under certain initial conditions, sinusoidal oscillation can be obtained using the structure shown above. Find these initial conditions.

(x[n] = 0 for an oscillator)

n = 0 y[0] = 2cosθ0 y[-1] – y[-2]for oscillation, y[-1] = 0 ⇒ no cosine terms

y[0] = -y[-2] ⇒ y[-2] = -Asinθ0 (sine term is equired)

y[0] = 0-(-A sinθ0) = A sinθ0Initial conditions:

[ ] [ ] [ ] [ ]nxnynyny +−−−= 21cos2 θ

y[-1] =0; y[-2] = -Asinθ0Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 180: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Sine and cosine oscillators [1]Sinusoidal oscillators can be used to deliver the carrier in modulators. In modulation schemes, both sines and cosines oscillators and needed. A structure that delivers sines and cosines simultaneously is shown below:

y[n]= cos(nθ)

x[n]= sin(nθ)

-sinθ

sinθ

cosθ

cosθ

z-1

+

z-1

+

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 181: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Proof:Trigonmetric equation for cos(n+1)θ is:cos(n+1)θ = cos(nθ)cosθ - sin(nθ) sinθLet y[n] = cos(nθ) and x[n] = sin(nθ)

∴ y[n+1] = cosθ y[n] – sinθ x[n]Replace n by n-1

y[n] = cosθ y[n-1] – sinθ x[n-1] (A)

Similarlysin(n+1)θ = sinθ cos(nθ) + sin(nθ) cosθ

∴ x[n+1] = sinθ y[n] + x[n] cosθReplace n → n-1

x[n] = sinθ y[n-1] + x[n-1] cosθ (B)

Using equations A & B above, the structure shown above can be obtained.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 182: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Exercise:An oscillator is given by the following coupled difference equations expressed in matrix form.

Draw the structure for the realisation of this oscillator, where θ0 is the oscillation frequency. If the initial conditions yc[-1] = Acosθ0 and ys[-1] = -Asinθ0, obtain the outputs yc[n] & ys[n] using the above difference equations.

[ ][ ]

[ ][ ]⎥⎦

⎤⎢⎣

⎡−−

⎥⎦

⎤⎢⎣

⎡ −=⎥

⎤⎢⎣

⎡11

cossinsincos

00

00

nyny

nyny

s

c

s

c

θθθθ

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 183: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

[ ] [ ] [ ][ ] [ ] [ ]1cos1sin

1sin1cos

00

00

−+−=−−−=

nynynynynyny

scs

scc

θθθθ

yc[n]

ys[n]

-sinθ0

sinθ0

cosθ0

cosθ0

z-1

z-1

+

+

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 184: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

n=0 ys[0] = sinθ0 (A cosθ0) + cosθ0 (-Asinθ0) = 0

n=0 yc[0] = cosθ0 (Acosθ0) - sinθ0(-Asinθ0) = A

n=1 yc[1] = cosθ0.A - sinθ0 .0 = Acosθ0

n=1 ys[1] = A sinθ0 + 0 = A sinθ0

n=2 yc[2] = cosθ0 yc[1] - sinθ0 ys[1]= cosθ0 A cosθ0 - sinθ0 A sinθ0 = A cos2θ0

n = n yc[n] = A cos (nθ0)

similarly ys[n] = A sin(nθ0)Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 185: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Exercise:For the structure shown below, write down the appropriate difference equations and hence state the function of this structure.

θsin21

z-1

y1[n]

2cosθ

z-1

-1

-1y2[n]

+

+

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 186: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

3.15 Notch filters [4]When a zero is placed at a given point on the z-plane, the frequency response will be zero at the corresponding point. A pole on the other hand produces a peak at the corresponding frequency point.

Poles that are close to the unit circle give rise large peaks, where as zeros close to or on the unit circle produces troughs or minima. Thus, by strategically placing poles and zeros on the z-plane, we can obtain sample low pass or other frequency selective filters (notch filters).Prof

esso

r E. A

mbikair

ajah

UNSW, A

ustra

lia

Page 187: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Example:

Obtain, by the pole-zero placement method, the transfer function of a sample digital notch filter (see figure below) that meets the following specifications: [4]

Notch Frequency: 50Hz3db width of the Notch: ±5HzSampling frequency: 500 Hz

π⎟⎟⎠

⎞⎜⎜⎝

⎛ Δ−=

sffr 1

|H(f)|

50 250 f (Hz)0

The radius , r of the poles is determined by :

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 188: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

To reject the component at 50Hz , place a pair of complex zeros at points on the unit circle corresponds to 50Hz. i.e. at angles of

To achieve a sharp notch filter and improved amplitude response on either side of the notch frequency , a pair of complex conjugate zeros are placed at a radius r < 1.

937.05001011 =⎟

⎠⎞

⎜⎝⎛−=⎟⎟

⎞⎜⎜⎝

⎛ Δ−= ππ

ff

rs

360

360

0.937

|z| =1

π2.03650050360 00 ±=±=×

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 189: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

( )( )( )( )

21

21

2

2

2.02.02

2.02.02

2.02.0

2.02.0

878.05161.116180.11

)2.0cos(937.02878.0)2.0cos(21

)(937.0878.0)(1

937.0937.0)(

−−

−−

+−+−

=

×−+−+

=

+−++−+

=

−−−−

=

zzzz

zz

zeezeez

ezezezezzH

jj

jj

jj

jj

ππ

ππ

ππ

ππ

ππ

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 190: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Problem Sheet A3 [5,1]

Q1. The frequency response of an ideal differentiator is given by

This response is periodic with period 2π. The

quantity τ is the delay of the system in samples.

πθπθθ θτ ≤≤−= − jejH )(

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 191: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

PhaseH

H

magnitudeH

←−−=<

+−=>

⎩⎨⎧

≤≤−−≤≤

=

2)(arg0

2)(arg0

00

|)(|

πθτθθ

πθτθθ

θπθπθθ

θ

(a). Sketch the magnitude and phase responses of the

system for -π ≤ θ ≤ π.

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 192: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(b) Find the impulse response h[n] of the system

as a sum of a sine and cosine function.

[ ]ττπ

τπτπ

−−

+−

−−=

nn

nnnh )(cos

)()(sin)( 2

)1(2 θθθθ

θ jkk

edejk

jk −=∫

Ans:

Note:

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 193: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Q2. For the system in Figure 18, sketch the

output y[n] when the input x[n] is δ[n] and

H(θ) is an ideal lowpass filter as follows:

⎪⎩

⎪⎨

≤<

≤≤=

πθπ

πθθ

||2

02

||01)(H

H(θ)x[n] ω[n] (-1)n

y[n]

Figure 18

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 194: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

⎟⎟⎟⎟

⎜⎜⎜⎜

=n

n

n 2sin1)(

π

πω

[ ]2

2sin

1)1(21)(

π

π

n

n

ny n +−=

y[n]

1

0 1 2 3 4 n

Ans:

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 195: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Q3 (a) Show that both digital filters given below have the same magnitude response :

y[n] = output; x[n] = input; ci = coefficients

[ ] [ ]∑−=

−=m

mii inxcnyi )(

[ ] [ ]∑−=

−−=m

mii imnxcnyii )(

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 196: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(a) Compute the 3dB bandwidth of the following filters

Which filter has a smaller 3dB bandwidth?

10,11

21)(;

11)( 1

1

211 <<−+−

=−−

= −

− aazzazH

azazH

Ans:

.2

12cos

214cos :

12

2

1

21

21

filter

aa

aaaAns

ndcc

c

c

⇒<

⎥⎦⎤

⎢⎣⎡+

=

⎥⎦

⎤⎢⎣

⎡ −−=

∴−

θθ

θ

θ

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 197: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(c) Find the magnitude response for the system

function H(z) and comment on your result

Ans: |H(θ)| = 1 allpass filter

Draw the canonic realization of the system H(z).

2

2

331)(zzzH

++

=

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 198: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Q4.(a) Determine the magnitude and phase response of the multi-path channel y[n] = x[n] + x[n-M]. At what frequencies H(θ) = 0?

(b) Determine and sketch the magnitude and phase response of the system shown below.

z-1 z-1 z-1x[n] y[n]

81

+ + +

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 199: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(c) Assuming that the digital filter G(z) is to be realized using the cascade structure, draw a suitable block diagram and develop the difference equation(s).

)3

1)(3

1(6

)1()(3

jzjzz

zzG+−

+=

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 200: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(d) Determine the frequency response H(θ) of the ladder filter shown below:

z-1z-1-1

b

a

Y(z)X(z)

θjθj

θj

abebeabeθHAns

2

2

1)(:

−−

−+=

+

+

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 201: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(e) Determine the frequency response H(θ) of the lattice filter

T

a

-a

T

b

-b

x[n] y[n]+ +

+ +

θjθj aeeabθHAns

2)1(11)(:

−− +++=

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 202: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(f) Show that the filter structure shown below has a linear phase characteristic equation

given by: φ(θ) = -2θ.

z-1 z-1

1

z-1

1

z-1

1 1

y[n]

x[n]

1

+

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 203: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(g) Determine the transfer function of the system shown below. Check the stability of

the system when r = 0.9 and .40πθ =

+ + z-1 +z-1

r cosθ0

- r sinθ0

y[n]

r cosθ0

x[n]

2210

10

cos21sin)( : −−

+−=

zrzrzrzHAns

θθ

filterstableb

b_

1312.164.0

1

2

⎭⎬⎫

−==

,

r sinθ0

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 204: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Q5. (a) Consider the following causal IIR transfer function:

Is H(z) a stable function? If it is not stable, find

a stable transfer function G(z) such that

|G(θ)| = |H(θ)|. Is there any transfer function

having the same magnitude response as H(z)?

)5.0)(3(942)( 2

23

++−+−

=zzz

zzzH

{ }filterAllpassz

zzAAHzG

zAzHzzz

zzzGUnstableAns

331)(|,)(||)(||)(|

)()()5.0)(31(

942)( , : 2

23

−−

==

=++−+−

=

θθProfes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 205: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(c) Analyse the digital structure given below and determine its transfer function.

(i) Is this a canonic structure?(ii) What should be the value of the multiplier coefficient K so that H(z) has a unity gain at θ = 0?(iii) What should be the value of the multiplier coefficient K so that H(z) has a unity gain at θ = π?(iv) Is there a difference between these two values of K? If not, why not?

)()()(

zXzYzH =

Kz-1 +

z-1

z-1

-1

β

z-1

α

Y(z)X(z)

-1

+ +

+Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 206: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

z-1 +

z-1

z-1

-1

β

z-1

α

Y(z)X(z)

-1

+ +

+

21

21

1)( −−

−−

+−+−

=zzzzKzH

βααβ

11

1=

+−+−

=βα

αβK

Ans:

(i) 4 delays ⇒ noncanonic(ii)&(iii)

(iv) no (all pass filter)Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 207: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Q6: (a) A first-order digital filter is described

by

where, 0 < a, b < 1 assume

(i) Determine k, so that the maximum value of |H(θ)| is equal to 1.

(ii) Compute the 3-dB bandwidth of the filter H(z).

1

1

11)( −

−+

=azbzkzH

21

== ba

⎟⎠⎞

⎜⎝⎛=

=+−

=

4435cos

31

11 :

1c

bakAns

θProfes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 208: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(iii) Draw a canonic realization of the system function H(z).

(b) A two-pole low-pass filter has the system function

Determine the values of k0 and b1 such that the frequency response H(θ) satisfy the conditions

Ans: k=0.46, b1 = 0.32

211

0

)1()(

−−=

zbk

zH

21)(;1)0( 2

4

===πθ

θHH

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 209: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(c) A third order FIR filter has a transfer function G(z) given by

from G(z), determine the transfer function of an FIR filter whose magnitude response is

identical to that of G(z) and has a maximum phase response.

)251)(

34)(

231(30)( 111 −−− ++−= zzzzG

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 210: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Q7. For the system shown in the next slide,

(a) Express y1[n] in terms of y1[n-1],y2[n-1], and x[n]; do the same for y2[n].(b) Assume A = cos(θ0); B = sin(θ0);y1(-1) = cos(-θ0); y2(-1) = sin(-θ0).

If x[n] = 0, show that :

y1[n] = cos(nθ0) and y2[n] = sin(nθ0)(c) Calculate (for arbitrary A and B) the

system function and)()(

)( 11 zX

zYzH = )(

)()( 2

2 zXzY

zH =

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 211: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(d) Take and draw the poles-zeros plot

for H1(z) and H2(z).

(e) Take and x[n]=δ[n].

Calculate the impulse response h1[n] for -2 ≤ n ≤ 10.

221

== BA

221

== BA

y2[n]

z-1+

z-1 +

x[n]

y1[n]

A

A

B

-B

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 212: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Q8. (a) Obtain a parallel realization for the

following H(z)

Implement the parallel realization of H(z)which you have obtained.

(b) Obtain a parallel realization for the following transfer function.

2

2

)5.0(34)(

++−

=zz

zzzH

)41()

21(

1)(2 −−

+=

zz

zzH

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 213: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(c) A digital filter is represented by

Does this transfer function represent an FIR or an IIR filter?

Write a difference equation for H(z)using the direct form.

Implement a parallel realization of H(z).

)1)(211(

1

211

21

)(111 −−− −−

+−

=zzz

zH

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 214: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Q9. (a) The transfer function of a discrete-time system has poles at z = 0.5, z = 0.1 ±j0.2and zeros at z = -1 and z = 1.

(i) Sketch the pole-zero diagram for the system

(ii) Derive the system transfer function H(z) from the pole-zero diagram.

(iii) Develop the difference equation.

(iv) Draw the block diagram of the discrete system.

321

31

15.07.07.01)( : −−−

−−

−−+−

=zzz

zzzHAns

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 215: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

(b) A notch filter is given by

Determine the frequency response at dc,

and . fs – sampling frequency.

Sketch the frequency response in the interval

2

2

8.011)( −

++

=z

zzH

4sf

2sf

20 sf

f ≤≤ |H(θ)|

π θ

81.12

81.12

Ans:

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia

Page 216: Chapter 3: Digital Signal Processing Professor E. UNSW, - EE&T Video Lecture Notes:eemedia.ee.unsw.edu.au/contents/elec3104/LectureNot… ·  · 2010-03-30Chapter 3: Digital Signal

Q10. A digital filter is shown below.

(i) Determine the system function H(z) for the above structure.

(ii) With a0 = a2 = 1; a1 = 2; b1 = 1.5 and b2 = -0.75,determine the pole-zero pattern of H(z) and indicate if the system is stable or not.

z-1+ z-1+ +y[n]

a0a1a2

b1b2

x[n]

212

212

0)(bzbzazaza

zH−−++

=

Profes

sor E

. Ambik

airaja

h

UNSW, A

ustra

lia