chapter 2 - discrete time signals and systems 2 - discrete... · discrete time signals and systems...

81
2-1 2. Discrete Time Signals and Systems We will review in this chapter the basic theories of discrete time signals and systems. The relevant sections from our text are 2.0-2.5 and 2.7-2.10. The only material that may be new to you in this chapter is the section on random signals (Section 2.10 of Text) 2.1 Discrete Time Signals A discrete-time (DT) signal is signal that exists at specific time instants. The amplitude of a discrete-time signal can be continuous though. When the amplitude of a DT signal is also discrete, then the signal is a digital signal. A DT signal can be either real or complex. While a real signal carries only amplitude information about a physical phenomenon, a complex signal carries both amplitude and phase information. Throughout this course, we use square brackets [] to denote a DT signal and round brackets ( g to denote a continuous time signal. Example : If the n-th sample of the DT signal [] xn is the value of the analog signal () a x t at t nT = , then [] ( ) a xn x nT =

Upload: dinhthien

Post on 06-Feb-2018

316 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-1

2. Discrete Time Signals and Systems

• We will review in this chapter the basic theories of discrete time signalsand systems. The relevant sections from our text are 2.0-2.5 and 2.7-2.10.

• The only material that may be new to you in this chapter is the section onrandom signals (Section 2.10 of Text)

2.1 Discrete Time Signals

• A discrete-time (DT) signal is signal that exists at specific time instants.The amplitude of a discrete-time signal can be continuous though.

• When the amplitude of a DT signal is also discrete, then the signal is adigital signal.

• A DT signal can be either real or complex. While a real signal carries onlyamplitude information about a physical phenomenon, a complex signalcarries both amplitude and phase information.

• Throughout this course, we use square brackets [ ]• to denote a DT signaland round brackets ( )i to denote a continuous time signal.

Example : If the n-th sample of the DT signal [ ]x n is the value of the

analog signal ( )ax t at t nT= , then

[ ] ( )ax n x nT=

Page 2: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-2

• Some common DT signals are

1. Unit sample

1 0[ ]

0 otherwise

nnδ

==

2. Unit step

1 0[ ]

0 0

nu n

n

≥= <

3. Real exponential:

Page 3: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-3

[ ] nx n Aα=

where both and A α are real. If 0A > and 0 1α< < , then [ ]x ndecreases as n increases; see figure below.

4. Sinusoidal

( )[ ] cos ox n A nω φ= +

where A is the amplitude, oω is the frequency, and φ is the phase.

5. Periodic

[ ] [ ]x n N x n+ =

Page 4: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-4

for any time index n . Here N denotes the period.

• Exercise: Is the sinusoidal signal defined above periodic in general?

• Example : Express the unit step function in terms of the unit-impulse

Answers:

(a) [ ] [ 1] [ ]u n u n nδ− − =

(b) 0

[ ] [ ]k

u n n kδ∞

=

= −∑

• Example : Express

1 2,3,...,10[ ]

0 otherwise

nx n

==

in terms of the unit step function.

Answer:

[ ] [ 2] [ 11]x n u n u n= − − −

Page 5: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-5

• Example : Express the sinusoidal signal in terms of complex exponentialsignals

Answer:

( )( ) ( )

( ) ( )1 1 2 2

[ ] cos

2

o o

o

j n j n

n n

x n A n

e eA

A A

ω φ ω φ

ω φ

α α

+ − +

= +

+=

= +

where

*1 22

jAeA A

φ

= =

*1 2

oje ωα α= =

It is also possible to express the signal as

( ) 1 1[ ] 2 Ren

x n A α=

• Example : Express an arbitrary DT signal in terms of the unit impulse

Answer

[ ][ ] [ ]k

x n x k n kδ∞

=−∞

= −∑

Page 6: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-6

2.2 Discrete Time Systems

• Let [ ]T • represents the transformation a discrete time system performedon its input [ ]x n . The corresponding output signal of the system is

[ ][ ] [ ]y n T x n= .

• The system is linear if

[ ]1 2 1 2[ ] [ ] [ ] [ ]T ax n bx n ay n by n+ = +

where 1 2[ ] and [ ]y n y n are the responses of the system to inputs of

1 2[ ] and [ ]x n x n respectively.

The above equation illustrates the principle of superposition.

• Assume the system is linear and let [ ]hh n be the output of the system whenthe input is

[ ] [ ]kp n n kδ= −

(i.e. a unit-impulse at time n k= ). Then according to the linearity property,

[ ]y n[ ]T •[ ]x n

Page 7: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-7

when the input is

[ ]

[ ]

[ ] [ ]

[ ]

k

kk

x n x k n k

x k p n

δ∞

=−∞

=−∞

= −

=

∑,

the output will be

[ ][ ] [ ] kk

y n x k h n∞

=−∞

= ∑

• The system is time-invariant if

[ ] [ ]kh n h n k= − ,

i.e. the output is delayed if the input is delayed. In this case

[ ][ ] [ ]

[ ] [ ]k

y n x k h n k

x n h n

=−∞

= −

= ⊗

The signal [ ]h n is called the impulse response of the time-invariantsystem.

• While the focus of this course is on linear, time-invariant (LTI) system,there are many real-life applications where the system is non-linear andtime-variant. A good example is a digital FM demodulator operating in themobile radio environment.

Page 8: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-8

• Example : Provide a physical interpretation of a LTI system whose impulseresponse is

[ ] [ ]h n u n=

Answer: The output of the system is

[ ]

[ ]

1

[ ] [ ]

[ ]

[ ]

[ ] [ ]

[ 1] [ ]

k

k

n

k

n

k

y n x k h n k

x k u n k

x k

x k x n

y n x k

=−∞

=−∞

=−∞

=−∞

= −

= −

=

= +

= − +

Thus the system is an integrator.

• A system is casual if and only if the output at time n depends only on theinput up to time n . According to the equation

[ ][ ] [ ]k

y n h k x n k∞

=−∞

= −∑ ,

this means the impulse response [ ]h n is zero when 0n < .

Page 9: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-9

• Example : A moving averager computes the signal

2

11 2

1[ ] [ ]

1

M

k M

y n x n kM M =−

= −+ + ∑

from its input [ ]x n . Here 1M and 2M are positive integers. What is theimpulse response of the system? Is the system casual?

Answer:

The output can be rewritten as

1

2

1 2

1 2

1

1 2

1[ ] [ ]

1

1 [ ] [ ]

1

n M

m n M

n M n M

m m

y n x mM M

x m x mM M

+

= −

+ − −

=−∞ =−∞

=+ +

= − + +

∑ ∑

Compared to the output of the integrator, we can deduce that the impulseresponse of the system is

[ ] [ ]( )1 21 2

1[ ] 1

1h n u n M u n M

M M= + − − −

+ +

Since the impulse response is non-zero when 0n < , so the system is notcasual.

• A real physical system can not be non-casual, i.e. it can not generate anoutput before there is an input. So in practice what a non-casual system

Page 10: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-10

means is that there is a processing delay. For example, you can view themoving averager as a device that computes the local mean of the signal

[ ]x n at time n after it observes the sample 1[ ]x n M+ . So 1M is the delay.

• A system is stable if a bounded input results in a bounded output. Therequirement for having a stable system can be derived from theinput/output relationship of a LTI system, which states that

[ ][ ] [ ]k

y n x k h n k∞

=−∞

= −∑

This means

[ ]

[ ]

[ ] [ ]max max

[ ] [ ]

[ ]

k

k

k m

y n x k h n k

x k h n k

x h n k x h m

=−∞

=−∞

∞ ∞

=−∞ =−∞

= −

≤ −

≤ − =

∑ ∑

where • is the absolute value operator and maxx is the largest magnitude ofthe input signal.

So if the impulse response of the system is absolute-summable, i.e. when

[ ]k

S h k∞

=−∞

= < ∞∑

then the system is stable.

Page 11: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-11

• Example : Is the integrator a stable system?

Answer: Since [ ] 1h n = for 0n ≥ and zero otherwise, the impulse responseis not absolute-summable. Consequently the system is not stable.

• Example : Is the moving averager a stable system?

Answer: Yes, because the impulse response consists of only a finitenumber of non-zero samples.

• Finite Impulse Response (FIR) and Infinite Impulse Response (IIR):

FIR => An impulse response of finite duration, hence a finite number ofnon-zero samples. Always stable.

IIR => The impulse response is infinitely long. Can be unstable (forexample the integrator).

• Example : Comment on the stability of a LTI system with the exponentialimpulse response

0[ ]

0 otherwise

na nh n

≥=

Solution:

0 0

[ ]kk

k k k

h k a a∞ ∞ ∞

=−∞ = =

= =∑ ∑ ∑

Page 12: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-12

This is summable if 1a < . In this case,

1[ ]

1k

S h ka

=−∞

= =−∑

• Cascading of LTI systems – serial connection of two or more systems; seethe example below.

As far as the input/output relationship is concerned, it really does notmatter what the order of the concatenation is. For the example above, bothpossibilities yields the same combined impulse response of

1 2[ ] [ ] [ ]h n h n h n= ⊗

Page 13: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-13

• In many applications, we have to concatenate a system to an existing oneso that the combined system yields the desired response. A good example isthe equalizer used in a digital communication system.

Many communication channels introduces intersymbol interference (ISI)ef. This means the received signal [ ]r n depends not only on the data bit

[ ]b n , but also on some adjacent bits. For example,

1 1[ ] [0] [ ] [1] [ 1]r n h b n h b n= + −

where 1[ ]h n represents the impulse response of the channel. The objective

of equalizer design is to find a digital filter with an impulse response 2 [ ]h nso that the combined response of the channel and the equalizer,

1 2[ ] [ ] [ ]h n h n h n= ⊗ , is the unit-impulse function. This means afterequalization, we have [ ] [ ]y n b n= , i.e. the ISI is removed.

• Exercise: Consider an ISI channel with 1[ ] [ ]nh n a u n= , where 0 1a< < ,and [ ]u n is the unit step function. Determine the equalizer that completelyremoves the ISI.

• Systems governed by the Linear Constant Coefficient Difference Equation(LCCDE):

1 0

[ ] [ ] [ ]N M

k jk j

y n a y n k b x n j= =

= − + −∑ ∑

The above equation suggests that current output of the system depends onthe previous output as well as the current and previous input.

Page 14: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-14

• In analyzing the above system, we assume the input is applied at time0n = (i.e. [ ] 0x n = for negative n ) and the initial state of the system is

defined as

( )[0] [ 1], [ 2],..., [ ]y y y N= − − −Y

(a) Zero State Response (ZSR) – response of the system to an unitimpulse applied at time 0n = , under the condition that [0]Y is theall-zero vector.

(b) Zero Input Response (ZIR) – response of the system due to a non-zero initial state but no input.

• Example : [ ] [ 1] [ ]y n ay n x n= − +

Let the initial state be [0] [ 1]y b= − =Y , then

2

3 2

[0] [0]

[1] [0] [1]

[2] [0] [1] [2]

y ab x

y a b ax x

y a b a x ax x

= +

= + +

= + + +

or in general

1

0

[ ] [ ]n

n n k

k

y n a b a x k+ −

=

= + ∑

The ZIR is1

1[ ] [ ]nh n a bu n+=

and the ZSR is

Page 15: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-15

2[ ] [ ]nh n a u n=

It is clear that the ZIR corresponds to the bias term in [ ]y n . Since it isindependent of the input, the system can NOT be classified as a linearsystem. Note that the response of the system to

3 1 1 2 2[ ] [ ] [ ]x n w x n w x n= +

is

13

0

11 1 2 2

0

[ ] [ ]

[ ] [ ]

nn n k

k

nn n k

k

y n a b a x k

a b a w x k w x k

+ −

=

+ −

=

= +

= + +

∑ ,

which is different from

3 1 1 2 2[ ] [ ] [ ]y n w y n w y n= + ,

where

11 1

0

12 2

0

[ ] [ ],

[ ] [ ]

nn n k

k

nn n k

k

y n a b a x k

y n a b a x k

+ −

=

+ −

=

= +

= +

Page 16: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-16

2.3 Fourier Transform of Discrete Time Signals

• Consider the sinusoidal signal

( )[ ] cosx n A nω φ= +

It can be written in terms of two complex exponential functions as

( ) ( )

1 2[ ]2

j n j nj n j ne e

x n A A e A eω φ ω φ

ω ω+ − +

−+= = +

where

*1 22

jAA e Aφ= =

• The complex signal j ne ω

is an important signal in discrete time signalprocessing – it is an eigenfunction of a linear system and it leads us to theconcept of Fourier Transform of a discrete-time signal.

Again let us use [ ]T • to represent the operation a discrete time systemperforms on its input. A signal [ ]f n is an eigenfunction of the system if

[ ][ ] [ ]T f n a f n= ,

where the constant a is called an eigenvalue. This definition is consistent

with that in matrix theory where the eigenvector v and the eigenvalue b ofa matrix A is defined as

b=Av v .

Page 17: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-17

Here the matrix A is analogous to our linear system.

• As shown in Section 2.2, the transformation performed by a LTI on itsinput [ ]x n is described by the convolution formula:

[ ] [ ] [ ]k

y n h k x n k∞

=−∞

= −∑ ,

where [ ]h n is the impulse response of the system and [ ]y n is thetransformed signal or output of the system. If

[ ] j nx n e ω= ,

then the output signal becomes

( )

( )

[ ] [ ]

[ ]

[ ]

j n k

k

j n j k

k

j n j k

k

j n j

y n h k e

h k e e

e h k e

e H e

ω

ω ω

ω ω

ω ω

∞−

=−∞

∞−

=−∞

∞−

=−∞

=

=

=

=

∑ ,

where

( ) [ ]j j k

k

H e h k eω ω∞

=−∞= ∑ .

Page 18: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-18

It is clear from the above analysis that j ne ω

is indeed an eigenfunction of adiscrete-time LTI system with ( )jH e ω being the corresponding eigenvalue.

In the linear system literature, ( )jH e ω is called the frequency response of adiscrete-time LTI system.

• In general, the expression

( ) [ ]j j k

k

X e x k eω ω∞

=−∞= ∑

is called the Fourier Transform of the discrete-time signal [ ]x n .

• One important property of the Fourier Transform of a discrete time signalis that it is periodic in ω with a period of 2π . This is quite different fromthe Fourier Transform of a continuous time signal, which in general is notperiodic.

• Example: Express the output of a LTI system in terms of its frequency

response when the input is the sinusoid ( )[ ] cosx n A nω φ= + . Assume theimpulse response of the sytem is a real signal.

Solution:

- The sinusoidal input can be written as a weighted sum of two complexexponential functions as

1 2[ ] j n j nx n A e A eω ω−= +

Page 19: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-19

where *

1 2/ 2jA Ae Aφ= = are the weighting coefficients.

- Since the system is linear, the sinusoidal response is

1 1 2 2[ ] [ ] [ ]y n A y n A y n= +where

( )1[ ] j jy n H e eω ω=and

( )2[ ] j jy n H e eω ω− −= ,

are the outputs of the system when the inputs are 1[ ] j nx n e ω= and

2[ ] j nx n e ω−= respectively.

- Since the impulse response is real,

( ) ( )*

*[ ] [ ]j j k j k j

k k

H e h k e h k e H eω ω ω ω∞ ∞

− −

=−∞ =−∞

= = =

∑ ∑ .

This means we can write the output of the system as

( ) ( )

( ) ( )( )

( ) ( )

1 2

1 2

[ ] ]

* *1 1

1

[ ]

2Re

cos ( )

j j n j j n

y n y n

j j n j j n

j j n

j

y n A H e e A H e e

A H e e A H e e

A H e e

A H e n

ω ω ω ω

ω ω ω ω

ω ω

ω ω φ ψ ω

− −

= +

= +

=

= + +

14243 1442443

Page 20: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-20

Note that ( )jH e ω and ( )ψ ω are respectively the magnitude and phase ofthe frequency response, i.e.

( ) ( ) ( )j j jH e H e eω ω ψ ω=

In conclusion, when the input is a sinusoid, the output is also a sinusoidat the same frequency but with the amplitude scaled by ( )jH e ω and with

the phase shifted by an amount ( )ψ ω .

• Example : Determine the frequency response of a delay element describedby the impulse response

[ ] [ ]h n n dδ= −

Solution

( ) [ ] [ ]j j n j n j d

n n

H e h n e n d e eω ω ω ωδ∞ ∞

− − −

=−∞ =−∞

= = − =∑ ∑

This means

( ) 1jH e ω = (constant magnitude response)and

( ) dψ ω ω= − (linear phase)

• Example : Determine the Fourier Transform of the one-sided exponentialsignal

Page 21: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-21

[ ] [ ]nx n a u n=

where 0 1a< < and [ ]u n is the unit-step function.

Solution:

( ) ( )0 0

1[ ]

1

nj j n n j n j

jn n n

X e x n e a e aeae

ω ω ω ωω

∞ ∞ ∞− − −

−=−∞ = =

= = = =−∑ ∑ ∑

Since

( )

( )( ) ( )

( ) ( ) ( ) ( )

2 2 2

2 22 2 2 2

2 2 2

2

1 1 cos( ) sin( )

1 cos( ) sin( ) 1 cos( ) sin ( )

1 cos( ) sin ( ) 1 cos( ) sin ( )

1 cos( ) sin ( ) cos ( ) sin ( )

1 cos( )

jae a ja

a aa a j

a a a a

a a j

a a

ω ω ω

ω ωω ω

ω ω ω ω

ω ω θ ω θ ω

ω

−− = − +

− = − + + − + − +

= − + +

= − + ( )2 2sin ( )exp ( )

jω θ ω

wheresin( )

( )1 cos( )

a

a

ωθ ω

ω=

− ,

this means the magnitude of the Fourier transform is

( )( )2 2 2

1

1 cos( ) sin ( )

jX ea a

ω

ω ω=

− +

and the phase is simply

( ) ( )ψ ω θ ω= − .

Page 22: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-22

• Existence of the Fourier Transform:

- If we set the parameter a in the above example to unity, then the signalbecomes a unit-step. The Fourier Transform in this case, however, doesnot exist in the finite magnitude sense.

- A sufficient condition for the existence of the Fourier transform (in thefinite-magnitude sense) is that the signal is absolute-summable, i.e.

[ ]k

S x k∞

=−∞

= < ∞∑

The proof is the same as that we used to proof the stability of a LTIsystem.

- We can deduce from the above that the Fourier Transform always existsfor signals with finite duration.

• Example : Determine the Fourier Transform of the signal

1/( 1) 0[ ]

0 otherwise

M n Mx n

+ ≤ ≤=

Solution

( )( )

( ) ( ) ( )

( )( )( )

1

0

1 / 2 1 /2 1 / 2

/2 /2 /2

12/2

2

1 1 1[ ]1 1 1

1

1

sin1

1 sin

j MMj j n j n

jn n

j M j M j M

j j j

Mj M

eX e x n e e

M M e

e e e

M e e e

eM

ωω ω ω

ω

ω ω ω

ω ω ω

ω

ω

ω

− +∞− −

−=−∞ =

− + + − +

− −

+−

−= = =+ + −

−=

+ −

=+

∑ ∑

Page 23: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-23

The magnitude of the transform is

( ) ( )( )( )

12

2

sin11 sin

MjX e

ω

ω +

=+

At a first glance, the phase of the Fourier Transform is ( ) / 2Mψ ω ω= − .However, the sin( ) / sin( )∗i function can take on either + or – ve value.When there is a sign change in this function, that corresponds to anadditional 180 degree phase shift.

Plots of the magnitude and phase of the transform for the case of 4M =are shown below.

Page 24: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-24

• The Inverse Fourier Transform is defined mathematically as

( )1[ ]

2j j nx n X e e d

πω ω

π

ωπ −

= ∫

Proof:

( )

( )

( )

1 1[ ]

2 2

1 [ ]

2

1 [ ]

2

j j n j k j n

k

j n k

k

j n k

k

X e e d x k e e d

x k e d

x k e d

π πω ω ω ω

π π

πω

π

πω

π

ω ωπ π

ωπ

ωπ

∞−

=−∞− −

∞−

=−∞−

∞−

=−∞ −

=

=

=

∑∫ ∫

∑∫

∑ ∫

Since

( ) ( )

( )

( ) ( )

( ) ( )

1 1

2 2

1

2

1

2

sin sin

sinc

c c

c c

c

c

c c

j mj m

j m

j m j m

c cc

c

c c

e d e d j mj m

ej m

e e

m j

m m

m m

m

ω ωωω

ω ω

ωω

ω

ω ω

ω ωπ π

π

π

ω ωωπ π ω

ω ωπ π

− −

=

=

−=

= =

=

∫ ∫

this means

Page 25: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-25

( )

( )

( )1 1[ ]

2 2

[ ] sinc

[ ] [ ]

[ ]

j j n j n k

k

k

k

X e e d x k e d

x k n k

x k n k

x n

π πω ω ω

π π

ω ωπ π

δ

∞−

=−∞− −

=−∞

=−∞

=

= −

= −

=

∑∫ ∫

• Physically, the inverse Fourier transform states that the time domain signalis the sum of infinitesimally small complex sinuoids of the form

( )j j nX e e dω ω ω

where ( )jX e ω denotes the relative amount of each complex sinusoidalcomponent. Consequently, it is a synthesizing formula.

• Example : Determine the impulse response of a LTI system whosefrequency response is given by

( ) 412

11

jj

H ee

ωω−=

Solution:

We first rewrite the frequency response as

Page 26: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-26

( )

( )

( )

412

412

0

412

0

11

jj

kj

k

k j k

k

H ee

e

e

ωω

ω

ω

∞−

=∞

=

=−

=

=

Comparing the above infinite series with the definition of a Fouriertransform, we come to the conclusion that

( ) / 412 0,4,8,12,...

[ ]0 otherwise

nn

h n ==

• Example : The frequency response of an ideal low pass (i.e. brickwall)filter is

( ) 1

0 otherwisej c

lpH e ω ω ω ≤=

What is the corresponding impulse response?

cω− cω

1

( )jlpH e ω

ω

Page 27: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-27

Solution:

( )

( )

1[ ]

2

1

2

sin

c

c

j j nlp lp

j n

c

h n X e e d

e d

n

n

πω ω

π

ωω

ω

ωπ

ωπ

ωπ

=

=

=

Observation: the impulse response of an ideal low pass filter is NOTabsolute summable.

Question: But then why does the frequency response exist?

Answer: The absolute-summability of a signal is a sufficient condition for( )jH e ω < ∞ , not a necessary condition.

• If we impose the constraint that the magnitude of a valid Fourier Transformmust be finite, is there any reason why we shouldn’t impose the constraintthat the derivative(s) of a Fourier Transform should also be finite? After all,any paremeter associated with a real world signal should be finite, right?

If we impose this additional constriant on the derivative, then the ideal lowpass filter is not a valid frequency response because of the discontinuitiesin the spectrum.

Page 28: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-28

• Exercise: Show that a sufficient requirement for

( )jdH e

ω< ∞

is

( )k

k h k∞

=−∞

< ∞∑

Verify the result using the ideal low pass example.

• It appears that if we were to be able to deal with a wide variety of signalsin our analysis, we should relax on the requirement that magnitude of avalid transform or its derivative(s) must be finite. This leads us to theimpulse function in the frequency domain ( )δ ω . Some importantproperties of this function are:

1. ( )0δ is undefinied by infinitely large,

2. ( ) 0δ ω = for 0ω ≠ , and

3. ( ) ( ) (0)f d fδ ω ω ω∞

−∞

=∫

With the introduction of this function, we can now have proper definitionsfor the Fourier transforms of signals such as a DC signal, a complexsinusoidal, and the unit-step signal. The fact that these signals exist atdiscrete frequencies is consistent with the above properties of the impulsefunction.

Page 29: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-29

• The Fourier Transform of the DC signal

[ ] 1x n =

is

( )

( )

[ ]

2 2

j j n

n

j n

n

n

X e x n e

e

n

ω ω

ω

π δ ω π

∞−

=−∞

∞−

=−∞

=−∞

=

=

= +

Proof:

The function ( )jX e ω can be treated as an “analog signal” in ω . Since this“analog signal” has a period of 2P π= , it can be represented by thecomplex Fourier series

( ) 2expj

kk

X e X j kP

ω πω

=−∞

= ∑ (1)

where

( )/ 2

/ 2

1 2exp

Pj

k

P

X X e j k dP P

ω πω ω

= − ∫ (2)

is the k-th complex Fourier coefficient. Substituting

( ) ( )2 2j

n

X e nω π δ ω π∞

=−∞

= +∑

Page 30: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-30

into (2) yields

( )

( )

/ 2

/ 2

1 2exp

1 2 2 2 exp

2 2

1

Pj

k

P

n

X X e j k dP P

n j k d

ω

π

π

πω ω

ππ δ ω π ω ω

π π

=−∞−

= −

= + − =

∑∫

Substituting 1kX = into (1) yields

( )

( )

2exp

2 exp

2

exp

jk

k

k

k

X e X j kP

j k

jk

ω πω

πω

π

ω

=−∞

=−∞

=−∞

= =

= −

• The Fourier Transform of the complex sinuoid

[ ] oj nx n e ω=is

( )( )0

oj nj j n

n

j n

n

X e e e

e

ωω ω

ω ω

∞−

=−∞

∞− −

=−∞

=

=

Page 31: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-31

This is simply the Fourier Transform of the DC signal shifted to thefrequency oω ω= . Consequently,

( ) ( )2 2jo

n

X e nω π δ ω ω π∞

=−∞

= − +∑

• It can be shown that the Fourier Transform of the unit-step function is

( ) ( )12

1j

jn

U e ne

ωω πδ ω π

−=−∞

= + +− ∑

2.4 Properties of Fourier Transforms

• Linearity:

If

( )( )

1 1

2 2

[ ] ,

[ ]

j

j

x n X e

x n X e

ω

ω

↔then

( ) ( )1 2 1 2[ ] [ ] j jax n bx n aX e bX eω ω+ ↔ +

Page 32: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-32

• Time Shifting and Frequency Shifting

[ ] [ ]

[ ] ( )

[ ]

( )

j n

n

j n d j d

n

j m j d

m

j d j

x n d x n d e

x n d e e

x m e e

e X e

ω

ω ω

ω ω

ω ω

∞−

=−∞

∞− − −

=−∞

∞− −

=−∞

− ↔ −

= −

=

=

[ ] [ ]

[ ] ( )

( )( )

0

0

o oj n j n j n

n

j n

n

j

e x n x n e e

x n e

X e

ω ω ω

ω ω

ω ω

∞−

=−∞

∞− −

=−∞

=

=

• Time reversal

[ ] [ ]

[ ]

[ ]

( )

( )( )

( )

j n

n

j n

n

j m

m

j

x n x n e

x n e

x m e

X e

ω

ω

ω

ω

∞−

=−∞

∞− − −

=−∞

∞− −

=−∞

− ↔ −

= −

=

=

Page 33: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-33

We showed earlier that if [ ]x n is real, then

( ) ( )*j jX e X eω ω− = .

So if [ ]x n is real, then

[ ] ( )* jx n X e ω− ↔

• Differentiation in Frequency

( ) [ ]

[ ]

[ ] ( )

[ ]

j j k

k

j k

k

j k

k

j k

k

d dX e x k e

d d

dx k e

d

x k jk e

j kx k e

ω ω

ω

ω

ω

ω ω

ω

∞−

=−∞

∞−

=−∞∞

=−∞∞

=−∞

=

=

= −

= −

The above implies

( )[ ] jdnx n j X e

ω↔

• Convolution: If 3 1 2[ ] [ ] [ ]x n x n x n= ⊗ , then

( ) ( ) ( )3 1 2j j jX e X e X eω ω ω=

Page 34: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-34

Proof: Since

3 1 2

1 2

[ ] [ ] [ ]

[ ] [ ]k

x n x n x n

x k x n k∞

=−∞

= ⊗

= −∑ ,

then

( )

( )

( )

3 3

1 2

1 2

1 2

1 2

[ ]

[ ] [ ]

[ ] [ ]

[ ] [ ]

[ ] [ ]

j j n

n

j n

n k

j n k j k

n k

j n k j k

k n

j m

X e x n e

x k x n k e

x k x n k e e

x k x n k e e

x k x m e

ω ω

ω

ω ω

ω ω

ω

∞−

=−∞

∞ ∞−

=−∞ =−∞

∞ ∞− − −

=−∞ =−∞

∞ ∞− − −

=−∞ =−∞

=

= −

= −

= −

=

∑ ∑

∑ ∑

∑ ∑

( )

( )( ) ( )

1 2

2 1

1 2

[ ]

[ ]

j k

k m

j j k

k

j j k

k

j j

e

x k X e e

X e x k e

X e X e

ω

ω ω

ω ω

ω ω

∞ ∞−

=−∞ =−∞

∞−

=−∞

∞−

=−∞

=

=

=

∑ ∑

The result is known as the Convolution Theorem.

Page 35: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-35

• Energy of a signal and the Parseval’s Theorem

The energy of a discrete-time signal is defined as

( ) 22 1[ ]

2j

n

E x n X e dπ

ω

π

ωπ

=−∞ −

= =∑ ∫

The result is known as the Parseval’s Theorem.

Proof:

Let

[ ]*[ ]h n x n= −

This means

( ) ( )*j jH e X eω ω= .

If

*

[ ] [ ] [ ]

[ ] [ ]

[ ] [ ]

k

k

y n x n h n

x k h n k

x k x k n

=−∞

=−∞

= ⊗

= −

= −

∑,

then

( ) ( ) ( ) ( ) 2j j j jY e X e H e X eω ω ω ω= =

Taking the inverse Fourier Transform of ( )jY e ω at 0n = yields

Page 36: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-36

( )

( )

2

2

1[0] [ ]

2

1

2

j

k

j

y x k Y e d

X e d

πω

π

πω

π

ωπ

ωπ

=−∞ −

= =

=

∑ ∫

• The Windowing Theorem

( ) ( )

( ) ( )

( ) ( ) ( )

( )

[ ] [ ] [ ]

1 1

2 2

1 1

2 2

1 1

2 2

1 1

2 2

j jn j jn

j jn j jn

jnj j

j

y n x n w n

X e e d W e e d

X e e d W e e d

X e W e e d d

X e W

π πθ θ φ φ

π π

π π θθ θ φ φ

π π θ

π π θθ φθ φ

θ π φ π θ

π πθ

θ π ω π

θ φπ π

θ φπ π

φ θπ π

π π

− −

− − −

−+

=− = − −

=− =−

=

=

=

=

=

∫ ∫

∫ ∫

∫ ∫

∫ ∫ ( )( )

( ) ( )( )

( )

1 1

2 2

1

2

j jn

jj jn

j jn

e e d d

X e W e d e d

Y e e d

ω θ ω

π πω θθ ω

ω π θ π

πω ω

ω π

θ ω

θ ωπ π

ωπ

=− =−

=−

=

=

∫ ∫

where

( ) ( ) ( )( )12

jj jY e X e W e dπ

ω θω θ

θ π

θπ

=−

= ∫

Page 37: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-37

It is important to realize that the above is a circular convolution in thefrequency domain.

• Example : Use the Windowing Theorem to determine the FourierTransform of the signal

( )sin [ ]

0 otherwise

cn

n M n My n

ωπ

− ≤ ≤=

Solution

This signal can be considered as the product of the ideal low pass signal

( )sin[ ] c

lp

nh n

n

ω

π=

and the rectangular window

1 [ ]

0 otherwise

M n Mw n

− ≤ ≤=

As shown earlier,

( ) 1

0 otherwisej c

lpH e ω ω ω ≤=

.

It can also be shown that (please verify)

( )( 1) ( 1)1 1

11 1

j M j Mj

j j

e eW e

e e

ω ωω

ω ω

− + + +

− +

− −= + −

− −

Page 38: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-38

Results for different values of M are shown below

Note that ( )jMH e ω is this figure is equivalent to ( )jY e ω

Observations:

- the oscillation (also known as the Gibbs phenomenon) is more rapid forlarger M,

- the amount of ripples does not decrease though

• Exercise: Plot ( )jW e ω and find out what causes the ripples in thesediagrams.

Page 39: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-39

2.5 Sampling of an Analog Signal

• Reference: Sections 4.0-4.3, 4.6 of Text

• Now that we know what the Fourier Transform of a discrete time signal[ ]x n is, we want to relate it to the Fourier transform of its continuous-time

counterpart ( )cx t , under the condition that

[ ] ( )cx n x nT= ,

where T is the sampling period and

1sf

T=

is the sampling rate.

• Let

( ) ( ) j tc cX j x t e dt

∞− Ω

−∞

Ω = ∫

be the continuous-time (CT) Fourier transform of ( )cx t , where Ω is theanalog frequency. This means

( )1( ) (inverse Fourier Transform)

2j t

c cx t X j e dπ

∞Ω

−∞

= Ω Ω∫ .

Since [ ] ( )cx n x nT= , this means

Page 40: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-40

( )

( )( )

( )

( )( ) ( ) ( )

( )( )

212

212

2/

2 2

/

/2

/

1[ ] ( )

2

1

2

1

2

1

2

T

T

T

j nTc c

k

j nTc

k k

Tj k nT

c T Tk T

Tj nT

c T

T

x n x nT X j e d

X j e d

X j k e d k

X j k e d

π

π

ππ

π π

π

ππ

π

π

π

π

π

∞Ω

−∞

+∞Ω

=−∞ −

∞Θ+

=−∞ −

Θ

= = Ω Ω

= Ω Ω

= Θ + Θ +

= Θ + Θ

∑ ∫

∑ ∫

( )( )

( )( )

( )( )

/2

/

/2

/

2

1

2

1

2

1 1

2

k

Tj nT

c TkT

Tj nT

c TkT

j nc T T

k

X j k e d

X j k e d

X j k e dT

ππ

π

ππ

π

πωω π

π

π

π

ωπ

=−∞

∞Θ

=−∞−

∞Ω

=−∞−

=−∞−

= Θ + Θ

= Ω + Ω

= +

∑ ∫

∑∫

∑∫

∑∫

In comparing the above with the inverse Fourier transform of a DT signal,we come to the conclusion that

• Exercise: Show that the ( )jX e ω shown above is periodic in ω with a

period of 2π .

( ) ( )( )21jc T T

k

X e X j kT

ω ω π∞

=−∞

= +∑

Page 41: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-41

• To construct ( )jX e ω from ( )cX jΩ , we can adopt the following procedure

1. Divide ( )cX jΩ into intervals of width 2 / Tπ according to the formula

k-th interval: 2 2

k kT T T T

π π π π− ≤ Ω < +

2. Define the spectral segment in the k-th interval mathematically as

( ) ( ) ( ) ( )1 12 2 2 / 2 /

0 otherwisec

k

X j k T k TX j

π π Ω − ≤ Ω < +Ω =

3. Shift the different spectral segments to the center of the spectrum andadd them together according to

( ) ( )( )2k T

k

Y j X j kπ∞

=−∞

Ω = Ω +∑

4. The Fourier transform of the DT signal is obtain by mapping the analogfrequency Ω in ( )Y jΩ to Tω = Ω , i.e.

( ) 1, jX e Y j

T Tω ω

π ω π = − ≤ <

Although mathematically this equation is only confined to the intervalπ ω π− ≤ < , we can obtain the value of ( )jX e ω outside this interval by

making use of the fact that ( )jX e ω is periodic in ω with a period of2π .

Page 42: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-42

• Example : Sampling of a triangular analog spectrum with a one-sidedbandwidth of 480W = rad/s. The sampling frequency, in rad/s, is

2640s T

πΩ = =

Fig: (a) ( )cX jΩ , (b) 1 ( )X j− Ω , (c) 0( )X jΩ , and (d) 1 ( )X jΩ

Page 43: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-43

Fig: (a) the various shifted spectra ( )kX jΩ , (b) the summed spectrum ( )Y jΩ ,and (c) the Fourier transform ( )jX e ω . Note that the x-variable in diagram (c)is the digital frequency divided by π .

• It is observed that the summed spectrum ( )Y jΩ is no longer triangular.Consequently the Fourier transform ( )jX e ω in the interval [ , ]π π− is also nottriangular. This is known as the aliasing effect and is caused by using toosmall a sampling frequency.

• The aliasing effect can be eliminated if the sampling frequency satisfies theNyquist criterion :

Page 44: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-44

22s W

T

πΩ = ≥

where W is the (one-sided) bandwidth of the analog signal ( )cx t in rad/s.

Proof:

Consider the term ( )12 2 /k Tπ− for any 0k > . If the Nyquist sampling

criterion is satisfied, this means

1 2 1 12

2 2 2sk k k W WT

π − = − Ω ≥ − ≥

This means the spectral segments ( )kX jΩ , k=1,2,…, are all zero.Similarly, it can be shown that all the spectral segments with negative k arezero. Consequently,

( ) 1jcX e X j

T Tω ω =

,

i.e. the shape of ( )cX jΩ is preserved after sampling. In this case, theFourier transform of the sampled signal is simply a (frequency and

amplitude) scaled version of ( )cX jΩ .

For the previous example involving the triangular ( )cX jΩ , a samplingfrequency of 640 rad/s was used. This is less than the Nyquist frequency of2 960W = rad/s. Consequently there is aliasing in the sampled signal.When the sampling frequency is at or above the Nyquist frequency, say

960, 2 960, 3 960sΩ = × × rad/s, then the aliasing disappears and ( )jX e ω

becomes

Page 45: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-45

Fig: Effect of varying the sampling frequency on ( )jX e ω : (a) the sampling frequencyis at the Nyquist rate of 960 rad/s, (b) the sampling frequency is twice theNyquist rate or 1920 rad/s, and (c) the sampling frequency is three times theNyquist rate or 2880 rad/s.

It is evident from the diagram that the spectral width of ( )jX e ω in theinterval [ , ]π π− is proportional to the bandwidth to sampling-rate ratio

2

s

Wρ =

Ω

The larger sΩ is, the narrower the spectrum of the digital signal.

Page 46: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-46

2.5.1 Down Sampling by an Integer Factor

• Suppose ( )cx t was sampled at a rate of 1/ T Hz to obtain

[ ] ( )cx n x nT=

A down sampler will convert [ ]x n to another DT-signal [ ]dx n according to

[ ][ ]dx n x nM=

• Example : M=2

[ ]dx n[ ]x n

down sampler

M ↓

0

n

[4]x

[2]x

[0]x

0 1 2 3 54

n

[2]dx

[1]dx

[0]dx

1 2

Page 47: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-47

The samples [1], [3], [5],...x x x are not used in forming the signal [ ]dx n ,i.e. they are decimated. Consequently a down sampler is also known as adecimator.

• What is the relationship between ( )cX jΩ , ( )jX e ω , and ( )jdX e ω ?

From our earlier discussion we know

( ) ( )( )21jc T T

k

X e X j kT

ω ω π∞

=−∞= +∑

Since the down-sampled signal [ ]dx n can be viewed as a sampled versionof ( )cx t with a sampling period of

'T MT= ,

so ( )jdX e ω must be

( ) ( )( )

( )( )

( )( )

( )( )

2' '

2

12

0

12 2

0

1'

1

1 1 [ ]

1 1

jd c T T

r

c MT MTr

M

c MT MTi k

M

c MT T MTi k

X e X j rT

X j rMT

X j kM iM T

X j k iM T

ω ω π

ω π

ω π

ω π π

=−∞∞

=−∞− ∞

=− =−∞

− ∞

= =−∞

= +

= +

= + +

= + +

∑ ∑

∑ ∑

Page 48: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-48

( )( )

( )

12 21

0

1[ 2 ]/

0

1 1

1

Mi

c M T Ti k

Mj i M

i

X j kM T

X eM

ω π π

ω π

− ∞+

= =−∞

−+

=

= +

=

∑ ∑

This equation says that the FT of the down-sampled signal is thesuperposition of M frequency shifted and scaled copies of ( )jX e ω .

• It should be emphasized that the above expression should only be used todetermine ( )j

dX e ω in the range π ω π− ≤ < . For ω outside this range,

the value of ( )jdX e ω can be determined by making use of the fact that it is

periodic with a period of 2π .

On the other hand if you blindly apply the formula above, you will end upwith a ( )j

dX e ω with a period of 2 .Mπ

• Example : for 2M = , we have

( ) ( ) ( ) / 2 ( 2 ) / 212

j j jdX e X e X eω ω ω π−= +

There will be no aliasing effect in [ ]dx n if the sampling frequency of [ ]x nis at least twice the Nyquist frequency, i.e.

( )22 2s W

T

πΩ = ≥ .

Page 49: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-49

If this is the case, then the effective sampling frequency of [ ]dx n is

( )' 22

ss W

ΩΩ = ≥

which satisfies the Nyquist criterion for zero-aliasing. Alternatively youcan prove this using the diagram below.

Fig: (a) ( )jX e ω when the sampling frequency is twice the Nyquist frequency, (b)

( )/ 212

jX e ω , (c) ( )( 2 ) / 212

jX e ω π− , and (d) ( )jdX e ω .

• In general, the sampling frequency of [ ]x n must be at least M times theNyquist rate in order to avoid aliasing in [ ]dx n .

Page 50: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-50

2.5.2 Up Sampling by an Integer Factor

• When there is no aliasing in the sampled signal, then theoretically it ispossible to compute ( )cx t exactly at any value of t from [ ]x n . Thisprocess is known as interpolation.

Argument:

( ) ( )[ ] ( )jc cx n X e X j x tω=> => Ω =>

Derivation:

( )

( )

( )

( )

/

/

/

/

/

/

1( )

2

1

2

1

2

1

2

1 [ ]

2

1 [ ]

2

j tc c

Tj t

c

T

j t Tc

j j t T

j n j t T

n

j t T n

x t X j e d

X j e d

X j e dT T

X e e d

x n e e d

x n e d

π

π

πω

π

πω ω

π

πω ω

π

πω

π

π

π

ω ωπ

ωπ

ωπ

ωπ

∞Ω

−∞

Ω

∞−

=−∞−

= Ω Ω

= Ω Ω

=

=

=

=

∑∫

[ ]sinc

n

n

tx n n

T

=−∞

=−∞

= −

Page 51: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-51

• In practice, it is not possible to calculate ( )cx t exactly from its samplesbecause the sinc function is, straightly speaking, infinitely long.

Interpolators that are commonly used in practice are:

- Lagrange,- Cubic spline

• Note that sinc( / )t T is the inverse Fourier transform of the following ideallow pass spectrum:

Thus ideal interpolation is equivalent to feeding the discrete time signal[ ]x n as a sequence of (continuous-time) impulses to an ideal low pass

filter, i.e.

( ) [ ] ( ) sinccn

tx t x n t nT

=−∞

= − ⊗ ∑

Again, since the ideal low pass filter can never be implemented exactlybecause of the abrupt transitions, we can never interpolate the analog signalexactly from its samples.

/Tπ− /Tπ

T

( )lpH jΩ

Ω

Page 52: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-52

• Let[ ] ( ')i cx n x nT=

be the DT signal obtained by sampling ( )cx t at a rate of

( )' 1 1

Hz' /s

Lf

T T L T= = =

Since this signal can be obtained from the signal

[ ] ( )cx n x nT=

according

'[ ] [ ]sinc

[ ]sinc

[ ]sinc ,

ik

k

k

nTx n x k k

T

nTx k k

LT

nx k k

L

=−∞

=−∞

=−∞

= − = − = −

it is called an up-sampled signal.

[ ]ix n[ ]x n

up sampler

L ↑

Page 53: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-53

• What is the Fourier Transform of this up-sampled signal?

- Since the sampling rate 1/sf T= used in generating [ ]x n satisfies theNyquist criterion ,

( ) 1jcX e X j

T Tω ω =

- Since 1/sf T= satisfies the Nyquist criterion, the new sampling rate' /sf L T= used in generating [ ]ix n will also satisfy the Nyquist

criterion. This means

( )

( )

1' '

/

0 /

ji c c

j L

L LX e X j X j

T T T T

LX e L

L

ω

ω

ω ω

ω π

π ω π

= = ≤=

< ≤

In otherword, ( )jiX e ω is simply a compressed version of ( )jX e ω .

• The existence of the two distinct frequency bands in ( )jiX e ω suggests

(again) a low pass filtering effect in interpolation. This can be traced backto the sinc function

sincn

kL

in [ ]ix n .

Page 54: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-54

Page 55: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-55

• Exercise: What is the Fourier Transform of the signal

[ ] [ ]sincik

nx n x k k

L

=−∞

= − ∑

in general? Do not assume that [ ]x k is obtained from sampling an analogsignal.

2.5.3 Changing the Sampling Rate by a Non-Integer Factor

• Suppose we want to change the sampling rate of the system by a factor off . How?

• Approximate f as a rational number

Lf

M≈

and then up-sample the signal by a factor of L , followed by down-sampling (the up-sampled signal) by a factor of M .

[ ]y n[ ]x n

up sampler

L ↑

down sampler

M ↓

Page 56: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-56

2.6 Discrete Time Random Processes

• A random variable is a parameter whose value can not be predicted exactly.

• Associated with a random variable is its probability density function (pdf).

Example 1: Uniform variable x :

1/( ) ( )

0 otherwisex

b a a v bp v

− ≤ ≤=

Fig: pdf of a uniform random variable.

Page 57: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-57

Example 2: Gaussian random variable x :

( ) ( )2

22

1exp

2x

xxx

v mp v

σπσ

−= −

where

[ ]xm E= xand

( )22x xE mσ = − x

are respectively the mean and variance of x , with [ ]E • beingthe average operator.

Fig: pdf of Gaussian random variables.

Page 58: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-58

• Exercise: Determine the mean and variance of a uniform random variable.

• Note that

[ ]Pr ( )b

x

a

a b p v dv≤ ≤ = ∫x

with

( ) 1xp v dv∞

−∞

=∫ .

• A discrete time signal [ ]x n is a random process when every [ ]x n is arandom variable.

Notations:

1. [ ]n x n=x

2. The pdf of nx is ( )nxp v

3. The mean of nx is nxm

4. The variance of nx is 2nxσ

• If the random process [ ]x n is (wide-sense) stationary, then

1. the pdf ( )nxp v is independent of the time index n , and

2. the autocorrelation function, defined as

Page 59: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-59

[ ] *, [ ] [ ]xx n m E x n x mφ = ,

depends only on the time difference n m− , i.e.

[ ][ ]

*, [ ] [ ]

xx

xx

n m E x n x m

n m

φ

φ

= = −

Basically what we are saying is that the first and second other statistics of a(wide-sense) stationary random process do not depend on absolute time. Inthis course, we will focus only on these random processes.

• Exercise: Show that

[ ] [ ]*xx xxn nφ φ− =

Subsequently show that for a real random process

( ) ( )j je eω ω−Φ = Φ

• The autocorrelation function at a time difference of 0n = is

[ ] 2*0 [ ] [ ] [ ]xx E x n x n E x nφ = =

and is called the average power of the random process [ ]x n . If the random

process has zero mean, i.e. 0nxm = , then

Page 60: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-60

[ ] 22

2

0 [ ] [ ]

,

nxx x

x

E x n E x n mφ

σ

= = − =

where 2xσ is the variance of [ ]x n .

We will only focus on zero-mean processes in this course.

• The autocorrelation function provides information as to how fast a randomprocess varies with time. A “fast’ process will have a relatively narrowautocorrelation function. The exact frequency contents of a random processcan be obtained from its power spectral density (psd) function, defined as

( ) [ ]j j nxx xx

n

e n eω ωφ∞

=−∞

Φ = ∑

Since this equation is simply the Fourier transform of [ ]xx nφ , consequently

1[ ] ( )

2j j n

xx xxn e e dπ

ω ω

π

φ ωπ −

= Φ∫

Note that

1[0] ( )

2

area under psd function

= average power

jxx xx e d

πω

π

φ ωπ −

= Φ

=

Page 61: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-61

• White noise:

A random process is white if there is no correlation between the values ofthe process at different time instants. Mathematically this means

2[ ] [ ]xx xn nφ σ δ=and

( ) 2

2

[ ] [ ]

j j n j nxx xx x

n n

x

e n e n eω ω ωφ σ δ

σ

∞ ∞− −

=−∞ =−∞

Φ = =

=

∑ ∑

• Exercise: Convince yourself that a white noise must have zero mean.

• A commonly encountered random process is the white Gaussian noise.Remember, “white” refers to the spectral shape, and “Gaussian” refers tothe pdf.

• Let the (stationary) random process [ ]x n be the input to a LTI system withan impulse response [ ]h n . Then the output of the system is

[ ] [ ] [ ]k

y n x k h n k∞

=−∞

= −∑ .

We want to examine the statistical properties of the output process.

• The mean value of [ ]y n is

Page 62: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-62

[ ]

[ ]

( ) 0

[ ] [ ] [ ]

[ ] [ ]

[ ]

[ ]

nyk

k

xk

xk

jx

m E y n E x k h n k

E x k h n k

m h n k

m h n k

m H e ωω

=−∞

=−∞

=−∞∞

=−∞

=

= = −

= −

= −

= −

=

,ym=where

( ) [ ]j j m

m

H e h m eω ω∞

=−∞

= ∑

is the frequency response of the system.

Basically, what the result is saying is that if the mean of the input isstationary, then the mean of the output is also stationary.

• How about the autocorrelation function?

By definition

[ ] *

*

, [ ] [ ]

[ ] [ ] [ ] [ ]

yy

k r

n m E y n y m

E h k x n k h r x m r

φ

∞ ∞

=−∞ =−∞

= = − −

∑ ∑

Page 63: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-63

* *

* *

* *

*

[ ] [ ] [ ] [ ]

[ ] [ ] [ ] [ ]

[ ] [ ] [ ] [ ]

[ ] [

k r

k r

k r

E h k x n k h r x m r

E h k h r x n k x m r

h k h r E x n k x m r

h k h

∞ ∞

=−∞ =−∞

∞ ∞

=−∞ =−∞

∞ ∞

=−∞ =−∞

= − −

= − −

= − −

=

∑ ∑

∑ ∑

∑ ∑

[ ]]

[ ]

xxk r

yy

r n m k r

n m

φ

φ

∞ ∞

=−∞ =−∞

− − +

= −

∑ ∑

Thus the autocorrelation function of the output process is also independentof absolute time.

• Since both the first and second order statistics of the output process areindependent of absolute time, the process is (wide-sense) stationary.

• Let d n m= − , then the autocorrelation function of the output process canbe written as

[ ] [ ]*[ ] [ ]yy xxk r

d h k h r d k rφ φ∞ ∞

=−∞ =−∞= − +∑ ∑

Taking Fourier transform of both sides yields

Page 64: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-64

( ) [ ]

[ ]

[ ]

[ ]

*

* ( )

*

[ ] [ ]

[ ] [ ]

[ ] [ ]

j j dyy yy

d

j dxx

d k r

j d k r j r j kxx

k r d

j mxx

m

e d e

h k h r d k r e

h k h r d k r e e e

h k h r m e

ω ω

ω

ω ω ω

ω

φ

φ

φ

φ

∞−

=−∞

∞ ∞ ∞−

=−∞ =−∞ =−∞

∞ ∞ ∞− − + −

=−∞ =−∞ =−∞

∞−

=−∞

Φ =

= − +

= − + =

∑ ∑ ∑

∑ ∑ ∑

( )

( ) ( )( ) ( ) ( )( ) ( )

*

*

*

2

[ ] [ ]

[ ]

j r j k

k r

j j r j kxx

k r

j j j kxx

d

j j jxx

j jxx

e e

h k e h r e e

e H e h k e

e H e H e

e H e

ω ω

ω ω ω

ω ω ω

ω ω ω

ω ω

∞ ∞−

=−∞ =−∞

∞ ∞−

=−∞ =−∞

∞−

=−∞

= Φ

= Φ

= Φ

= Φ

∑ ∑

∑ ∑

• According to an earlier result, if the input process [ ]x n has zero mean,

then the output process [ ]y n will also have zero mean. This means thevariance of the output process equals the output power:

( )

( ) ( )

22

2

1[ ] [0]

2

1

2

jy yy yy

j jxx

E y n e d

H e e d

πω

π

πω ω

π

σ φ ωπ

ωπ

= = = Φ

= Φ

Page 65: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-65

If ( )jH e ω is a very narrow band filter centered at cω ω= ± , then

( ) ( ) ( ) 22 c c cj j jy xx xxH e e eω ω ωσ −≈ ∆ Φ + Φ ,

where 0∆ → is the bandwidth of the filter.

For simiplicity assume a real [ ]x n 1. Then [ ] [ ]xx xxn nφ φ− = (see an earlier

exercise) and ( ) ( )j je eω ω−Φ = Φ . Consequently,

( ) ( )22 2 0c cj jy xxH e eω ωσ ≈ ∆ Φ ≥

or simply

( ) 0cjxx e ωΦ ≥ .

This property of ( )cjxx e ωΦ is consistent with the fact that it represents a

power density.

• Example : The input/output relationship of a LTI system is given by

[ ] [ 1] [ ]y n ay n x n= − +

where a is a positive constant less than 1. Determine the psd and the pdf of[ ]y n if [ ]x n is a white Gaussian process with zero mean and unit

variance.

1 The proof is a bit lengthy for complex [ ]x n but the end result is the same.

Page 66: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-66

Solution 1

- Since the input has zero mean, the output must also have zero mean.

- Since the input is Gaussian, the output must also be Gaussian.

- Taking the expectation of the square of both sides of [ ]y n yields

[ ]

2 2 2

2 2 2

2 2 2

2 2 2

[ ] ( [ 1] [ ])

[ 1] [ ] 2 [ 1] [ ]

[ 1] [ ] 2 [ 1] [ ]

2 [ 1

y

y x

E y n E ay n x n

E a y n x n ay n x n

a E y n E x n aE y n x n

a aE y n

σ

σ σ

= = − + = − + + −

= − + + − = + + −[ ] [ ]

2 2 2

] [ ]

y x

E x n

a σ σ= +or

22

2 2

11 1

xy a a

σσ = =

− −

- The pdf of [ ]y n is simply

( )2

22

1exp

2y

yy

vp v

σπσ

= −

- The output [ ]y n can be expressed recursively as

( )[ ] [ 1] [ ]

[ 2] [ 1] [ ]

y n ay n x n

a ay n x n x n

= − += − + − +

Page 67: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-67

2

3 2

1

0

[ 2] [ 1] [ ]

[ 3] [ 2] [ 1] [ ]

[ ] [ ]m

m k

k

a y n ax n x n

a y n a x n ax n x n

a y n m a x n k−

=

= − + − +

= − + − + − +

= − + −∑

Multiplying both sides by [ ]y n m− , 0m > , and taking expectationyields

[ ]

[ ]

1

0

1

0

12

0

[ ] [ ] [ ] [ ] [ ]

[ ] [ ] [ ] [ ]

[ ] [ ] [ ]

mm k

k

mm k

k

mm k

k

E y n y n m E a y n m a x n k y n m

E a y n m y n m a x n k y n m

a E y n m a E x n k y n m

=

=

=

− = − + − −

= − − + − −

= − + − −

∑2

[ ]

my

yy

a

m

σ

φ

=

=

Since the process [ ]y n is real, [ ] [ ]yy yym mφ φ− = . So in general

2 [ ] myy ym aφ σ=

- The psd is

( )2

[ ]

j j myy yy

m

m j my

m

e m e

a e

ω ω

ω

φ

σ

∞−

=−∞

∞−

=−∞

Φ =

=

Page 68: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-68

( ) ( ) ( )( )( )

02 2 2

0

2 2 2

0 0

2 22

2 2 2

1 1

1 1 1 1

1 1

m mj m j my y y

m m

n j n m j my y y

n m

y yyj j

j j j jy y y

j

a e a e

a e a e

ae ae

ae ae ae ae

ae a

ω ω

ω ω

ω ω

ω ω ω ω

ω

σ σ σ

σ σ σ

σ σσ

σ σ σ

∞− −

=−∞ =

∞ ∞−

= =

− −

= + −

= + −

= + −− −

− + − − − −=

− −

∑ ∑

∑ ∑

( )( )

( )

( )

2 2

2

2

1

1 2 cos

1

1 2 cos

j

y

e

a

a a

a a

ω

σ

ω

ω

−=

+ −

=+ −

Solution 2

- The LTI has an impulse response of

[ ] [ ]nh n a u n=

where [ ]u n is the unit-step function.

- The corresponding frequency response is

( )0

1[ ]

1j j n n j n

jn n

H e h n e a eae

ω ω ωω

∞ ∞− −

−=−∞ =

= = =−∑ ∑

This means

Page 69: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-69

( )

( ) ( )

2

2

2 2

2

1

1

1

1 cos( ) sin( )

1

1 2 cos( )

j

jH e

ae

a a

a a

ω

ω

ω ω

ω

−=

=− +

=+ −

- Since [ ]x n is white and has a variance of unity, its psd is simply

( ) 2 1jxx xe ω σΦ = =

- The psd of [ ]y n is

( ) ( ) ( ) 2

2

11 2 cos( )

j j jyy xxe e H e

a aω ω ω

ωΦ = Φ =

+ −

2.7 Linear Predictiive Coding and the Autocorrelation Function

• Consider the last example in Section 2.6 where we have a random process[ ]y n governed by the equation

[ ] [ 1] [ ]y n ay n x n= − +

Page 70: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-70

Here a is a positive constant less than 1 and [ ]x n is a white process withzero mean and unit variance. As shown in Section 2.6, the variance of

[ ]y n is related to the variance of [ ]x n according to the equation

22

2 2

11 1

xy a a

σσ = =

− −

• Suppose [ ]y n is a sampled-speech signal and we want to send this speechsignal digitally through a communication channel. A simple way is toquantize each sample into yB bits and feed the resultant bit stream to adigital modulator to generate the transmitted signal

This encoding method, which is referred to as Pulse Code Modulation(PCM) in the literature, is not very efficient because [ ]y n has a relativelylarge dynamic range, at least compared to [ ]x n .

• Suppose the parameter parameter a (which will vary from speaker tospeaker) is known to both the encoder and the decoder. Then a moreefficient encoding scheme can be obtained by first subtracting

[ ] [ 1]py n ay n= −from [ ]y n to obtain

[ ]y n bit

QuantizeryB − Digital

Modulator

Page 71: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-71

[ ] [ ] [ ] [ ] [ 1]px n y n y n y n ay n= − = − −

and then quantize [ ]x n using a xB -bit quantizer. The resultant bits,together with the parameter a (also in quantized form), are then sent to thereceiver. Upon receiving these information, the decoder can approximate

[ ]y n according to

ˆ ˆ[ ] [ 1] [ ]y n ay n x n= − +% % ,

where [ ]x n% and a% are respectively the quantized versions of [ ]x n and a .

This encoding scheme, known as linear predictive coding (LPC), is moreefficient than PCM because [ ]x n has a smaller dynamic range than [ ]y n .

In the speech coding literature, [ ] [ 1]py n ay n= − is referred to as the

predicted value of [ ]y n and [ ] [ ] [ ]px n y n y n= − is called the residual orexcitation.

[ 1]ay n −

+ [ ]x n[ ]x n

( ) Speech Model

11

jjH e

aeω

ω−=−

( )Prediction Filter

j jF e aeω ω−=

[ ]y n

Eqv. response = 1 jae ω−−

Page 72: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-72

• As shown earlier, the autocorrelation function of [ ]y n is 2 [ ] myy xm aφ σ= .

This means

[1] [0]yy yyaφ φ=or

[1]=

[0]yy

yy

φ

So as long as [0] and [1]yy yyφ φ are known, then the parameter a will beknown to both the encoder and decoder. In practice, [0] and [1]yy yyφ φ can beestimated according to

1

1ˆ [ ] [ ] [ ].N d

yyk

d y n y n dN

φ−

=

= +∑

This suggests that in order to implement the LPC encoder, the signal [ ]y n

must first be analyzed to obtain its autocorrelation function. Once theautocorrelation function is estimated, then the information will be used toobtain the prediction filter at the encoder and the synthesizing filter at thedecoder.

ˆ ˆ[ 1]ay n −

ˆ[ ]y n[ ]x n%[ ]x n

[ ]Q •

Quantizer1az−

Synthesizing filter

Page 73: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-73

• As the parameter 1a → , the variance of [ ]y n is going to much greater thanthat of [ ]x n . Consequently LPC will be much more efficient than PCM.

As 0a → , the variance of [ ]y n approaches that of [ ]x n and LPC provideslittle improvement to the encoding efficiency.

Since 0a → implies little correlation between samples in [ ]y n while1a → corresponds to high correlation, we can conclude that LPC achieves

a higher encoding efficiency because it removes the redundancy in [ ]y n

through linear prediction.

• The expression [ ] [ 1] [ ]y n ay n x n= − + represents a first-order model. Ingeneral, speech signals can be modeled accurately using a N-th order model(typical value of N is 10):

1

[ ] [ ] [ ]N

kk

y n a y n k x n=

= − +∑

where [ ]x n is a white noise. The model also represents a system describedby a Linear Constant Coefficient Difference Equation with [ ]x n being theexcitation and [ ]y n being the output.

• For the N-th order model, the prediction filter in the encoder computes

1

[ ] [ ]N

p kk

y n a y n k=

= −∑

and subtract it from [ ]y n to obtain the residual (excitation)

Page 74: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-74

1

[ ] [ ] [ ] [ ] [ ]N

p kk

x n y n y n y n a y n k=

= − = − −∑

The residual, as well as the filter coefficients,

1

2

N

a

a

a

=

A M

are then quantized and transmitted to the receiver. Upon receiving theseinformation, the decoder synthesizes the original speech signal according to

1

ˆ ˆ[ ] [ ] [ ]N

kk

y n a y n k x n=

= − +∑ % %,

where [ ]x n% and ka% are respectively the quantized versions of [ ]x n and

ka .

• How to determine linear predictor A? If we multiply both sides of [ ]y n by[ 1]y n − and taking average, we obtain

[ ]

[ ] [ ]1

1

1

[ ] [ 1] [ ] [ 1] [ ] [ 1]

[ ] [ 1] [ ] [ 1]

[ 1]

N

kk

N

kk

N

k yyk

E y n y n E a y n k y n x n y n

a E y n k y n E x n y n

a kφ

=

=

=

− = − − + −

= − − + −

= −

Page 75: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-75

or simply

1

[1] [ 1]N

yy k yyk

a kφ φ=

= −∑

Similarly if we multiply both sides of [ ]y n by [ 1]y n − and takingaverage, we obtain

[ ]

[ ] [ ]1

1

1

[ ] [ 2] [ ] [ 2] [ ] [ 2]

[ ] [ 2] [ ] [ 2]

[ 2]

N

kk

N

kk

N

k yyk

E y n y n E a y n k y n x n y n

a E y n k y n E x n y n

a kφ

=

=

=

− = − − + −

= − − + −

= −

or

1

[2] [ 2]N

yy k yyk

a kφ φ=

= −∑

• It is evident that in general

1

1

[ ] [ ];

; 1,2,...,

N

yy k yyk

N

k yyk

m a k m

a k m m N

φ φ

φ

=

=

= −

= − =

Page 76: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-76

These equations can be written in matrix form as2

1

2

3

1

[0] [1] [2] [ 2] [ 1] [1]

[1] [0] [1] [ 3] [ 2] [2]

[2] [1] [0] [ 4] [ 3] [3

[ 2] [ 3] [ 4] [0] [1]

[ 1] [ 2] [ 3] [1] [0]N

N

aN N

aN N

aN N

aN N N

aN N N

φ φ φ φ φ φφ φ φ φ φ φφ φ φ φ φ φ

φ φ φ φ φφ φ φ φ φ

− − − − − −

= − − −

− − −

LLL

MM M M M M MLL

]

[ 1]

[ ]

N

N

φφ

M

or

N N N=U A V ,

where

[0] [1] [2] [ 2] [ 1]

[1] [0] [1] [ 3] [ 2]

[2] [1] [0] [ 4] [ 3]

[ 2] [ 3] [ 4] [0] [1]

[ 1] [ 2] [ 3] [1] [0]

N

N N

N N

N N

N N N

N N N

φ φ φ φ φφ φ φ φ φφ φ φ φ φ

φ φ φ φ φφ φ φ φ φ

− − − − − −

= − − −

− − −

U

LLL

M M M M M MLL

,11

,22

,33

, 11

,

N

N

NN

N NN

N NN

aa

aa

aa

aa

aa

=

−−

=

A MM and

[1]

[2]

[3]

[ 1]

[ ]

N

N

N

φφφ

φφ

= −

V M

2 For convenience, we drop the subscript yy in [ ]yy mφ .

Page 77: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-77

So the coefficients for the prediction filter can be obtained by solving

1N N N

−=A U V ,

provided that the autocorrelation function [ ]mφ is known.

• A brute-force computation of NA results in a complexity in the order of( )3O N . However, since the matrix is Toeplitz, i.e. all elements along any

diagonal are identical, a more efficient algorithm called the Levison andDurbin (LD) algorithm can be used.

The LD algorithm only has a complexity of only ( )2O N .

• The LD algorithm is a order-recursive algorithm, i.e. the m -th orderpredictor mA can be obtained from the ( 1)m − -th predictor 1m−A .

Specifically, we rewrite mA as

,1

,2 11

,

0

m

m mmm

m

m m

a

a

k

a

−−

= = +

dAA M (1)

where the vector 1m−d and the scaler mk are quantities to be determined.

• The covariance matrix mU itself can be written in terms of 1m−U and 1m−V

as:

Page 78: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-78

( )1 1

1 [0]

rm m

tm rm φ

− −

=

U VU

V (2)

where

1

[ 1]

[ 2]

[ 3]

[2]

[1]

rm

m

m

m

φφφ

φφ

− − −

=

V M (3)

is the correlation vector 1m−V arranged in reverse order, and [ ]t• stands forthe transpose of a matrix.

• Substituting (1)-(3) into the equation m m m=U A V implies

( )1 1 11 1

10 [ ][0]

rm m mm m

trmm

k mφφ

− − −− −

+ =

U V dA V

V (4)

• One of the equation we can obtain from (4) is

1 1 1 1 1 1

1 1 1 1

rm m m m m m m

rm m m m m

k

k

− − − − − −

− − − −

= + +

= + +

V U A U d V

V U d V

or

Page 79: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-79

11 1 1

rm m m mk −

− − −= −d U V (5)

Since 1 1 1m m m− − −=V U A ,

1 1

1 1

1 1

1 1

rm m

m m

rm m

rm m

− −

− −

− −

− −

=

=

=

=

V PV

PU A

PU PA

W A

, (6)

where0 0 1

0 1 0

1 0 0

=

P

LL

M M M ML

is the permutation matrix representing vector reversal, and

1 1m m− −=W PU P

Because of the property of 1m−U ,

1 1m m− −=W U (7)

Combining (5)-(7) implies

11 1 1

11 1 1

11 1 1

1

,

rm m m m

rm m m m

rm m m m

rm m

k

k

k

k

−− − −

−− − −

−− − −

= −

= −

= −

= −

d U V

U W A

U U A

A

(8)

Page 80: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-80

i.e. the vector 1m−d is the vector containing the coefficients of the ( 1)m − -thpredictor arranged in reverse order and scaled by the term mk .

• The second equation we can derive from (4) is

( ) ( )( ) ( )

1 1 1 1

1 1 1 1

[ ] [0]

[0]

t tr rm m m m m

t tr r rm m m m m m

m k

k k

φ φ

φ

− − − −

− − − −

= + +

= − +

V A V d

V A V A

or

( )( )

( )1 1 1 1

11 1

[ ] [ ]

[0]

t tr rm m m m

m tr rmm m

m mk

φ φ

εφ

− − − −

−− −

− −= =

V A V A

V A (9)

where

( )( )

1 1 1

1 1

[0]

[0]

tr rm m m

t

m m

ε φ

φ

− − −

− −

= −

= −

V A

V A (10)

• In summary,

1. At the end of the (m-1)-th iteration, the available information to the LPCencoder are 1mε − and the (m-1)-th order predictor 1m−A .

2. In the m-th iteration, the encoder computes mk according to (9) and setthe highest order term in the m-th order predictor to (see Eqn. (1))

,m m ma k=

Page 81: Chapter 2 - Discrete Time Signals and Systems 2 - Discrete... · Discrete Time Signals and Systems ... • The complex signal ejnw is an important signal in discrete time signal processing

2-81

3. The other predictor coefficients are computed according to (1) and (8) as

, 1, 1,

1, 1, ; 1,2,..., 1m k m k m k

m k m m m k

a a d

a k a k m− −

− − −

= +

= − = − , (11)

where 1,m kd − is the k-th component of the vector 1m−d in (8)

4. Update the term mε and increase m by 1.

• Exercise: Show that the term mε can also be calculated recursively.

• Equations (9)-(11) each has a computational complexity of 1m −multiplication. Summing over all m from 1 to N yields a complexity of

( ) 2

1

3 1 3 ( 1) / 2N

m

m N N N=

− = − ∝∑

• Note that LPC-based speech codec can produce communication qualityspeech at a rate as low as 2.4 kbps (though 4.8-9.6 kbps are more typical).This is much lower than the 64 kbps required in PCM based codecs.

The speech codec used in your cell-phone is a LPC-based codec.