Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for...

87
1 Digital Speech Processing— Lecture 14 Linear Predictive Coding (LPC)-Lattice Methods, Applications

Transcript of Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for...

Page 1: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

1

Digital Speech Processing—Lecture 14

Linear Predictive Coding (LPC)-Lattice

Methods, Applications

Page 2: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

2

Prediction Error Signal

H(z)Gu(n) s(n)1

1

1

1

1

1

1 1

1

1. Speech Production Model

( ) ( ) ( )

( )( )( )

2. LPC Model:

( ) ( ) ( ) ( ) ( )

( )( )( )

3. LPC Error Model:( )

( ) ( )

α

α

α

=

=

=

=

= − +

= =−

= − = − −

= = −

= =−

%

p

kk

pk

kk

p

kk

pk

kk

k

s n a s n k Gu n

S z GH zU z a z

e n s n s n s n s n k

E zA z zS z

S zA z E z

1

1( ) ( ) ( )α

=

=

= + −

pk

kp

kk

z

s n e n s n k

A(z)s(n) e(n)

1/A(z)e(n) s(n)

Perfect reconstruction even if ak not equal to αk

Page 3: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

3

Lattice Formulations of LP both covariance and autocorrelation methods use

two step solutions 1. computation of a matrix of correlation values 2. efficient solution of a set of linear equations another class of LP

• methods, called lattice methods, has evolved in which the two steps are combined into a recursive algorithm for determining LP parameters

begin with Durbin algorithm--at the stage the set of • thi

1 2( ) coefficients { , , ,..., } are coefficients of the order

optimum LP

α =i thj j i i

Page 4: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

4

1

1( ) ( )

ˆ

define the system function of the order inverse filter (prediction error filter) as

( )

if the input to this filter is the input segment ˆ ( ) ( ) (

α −

=

= −

= +

th

ii i k

kk

n

i

A z z

s m s n m w m

1

1

( ) ( )ˆ

( ) ( )

( ) ( )

ˆ), with output ( ) ( )

( ) ( ) ( )

ˆ where we have dropped subscript - the absolute location of the signal the z-transform gives

( ) ( ) ( )

α

α

=

= +

= − −

= = −

i in

ii i

kk

i ik

e m e n m

e m s m s m k

n

E z A z S z1

( ) ( )−

=

⎛ ⎞⎜ ⎟⎜ ⎟⎝ ⎠∑

ii k

k

z S z

Lattice Formulations of LP

Page 5: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

5

Lattice Formulations of LP

1 1

1 1

( ) ( - ) ( - ) ( )-

( )

( ) ( ) (

using the steps of the Durbin recursion

( = , and )

we can obtain a recurrence formula for ( ) of the form

( ) ( )

α α α α

− − −

− =

= −

i i i ii ij j i j i

i

i i i ii

k k

A z

A z A z k z A 1

1 1 1

1 1 1

)

( ) ( ) ( )

( ) ( ) ( )

( ) giving for the error transform the expression

( ) ( ) ( ) ( ) ( )

( ) ( ) ( )

− − − −

− −

= −

= − −

i i i ii

i i ii

z

E z A z S z k z A z S z

e m e m k b m

Page 6: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

6

Lattice Formulations of LP

1

where we can interpret the first term as the z-transform

of the forward prediction error for an ( ) order predictor, and the second term can be similarly interpreted based on defining a ba

− sti

1 1 1 1

1 1 1

1

1

( ) ( ) ( ) ( )

( ) ( )

( ) ( ) ( )

ckward prediction error

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

( ) ( ) with inverse transform

( ) ( ) ( ) (α

− − − − − −

− − −

=

= = −

= −

= − − + − = −∑

i i i i i ii

i ii

ii i i

kk

B z z A z S z z A z S z k A z S z

z B z k E z

b m s m i s m k i b m 11 ( )

( )

) ( )

with the interpretation that we are attempting to predict ( ) from the samples of the input that follow ( ) => we are doing a

prediction and ( ) is called the

−−

• −−

ii

i

k e m

s m ii s m i

b m

backwardbackward prediction error sequence

Page 7: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

7

Lattice Formulations of LP

same set of samples is used to forward predict s(m)and backward predict s(m-i)

Page 8: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

8

Lattice Formulations of LP

1 1 1

1 1

( ) ( )

( ) ( ) ( )

( ) ( ) (

the prediction error transform and sequence ( ), ( ) can now be expressed in terms of forward and backward errors, namely

( ) ( ) ( )

( ) ( )

− − −

− −

= −

= −

i i

i i ii

i i ii

E z e m

E z E z k z B z

e m e m k b

1 1 1

1 1

1

1

)

( ) ( ) ( )

( ) ( ) ( )

( ) 1

similarly we can derive an expression for the backward error transform andsequence at sample of the form

( ) ( ) ( )

( ) ( ) ( ) 2

these

− − −

− −

− ∗

= −

= − − ∗

i i ii

i i ii

m

m

B z z B z k E z

b m b m k e m

1

two equations define the forward and backward prediction error for

an order predictor in terms of the corresponding prediction errors of an

( ) order predictor, with the reminder that a zero−

th

th

i

i

0 0 0 1 3( ) ( )

( )

th order predictor does no prediction, so

( ) ( ) ( )

( ) ( ) ( ) / ( )

= = ≤ ≤ − ∗

= =p

e m b m s m m L

E z E z A z S z

Page 9: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

9

Lattice Formulations of LP1

(1) (1)

(2) (2)

[ ] [ ][ ], 0

[ ] [ ]0 1

Assume we know (from external computation): 1. we compute and from using Eqs. 1 and 2 2. we next compute and for using Eqs.

k

e m b ms m m L

e m b mm L

≤ ≤ ∗ ∗

≤ ≤ + ∗

( ) ( )

( )

[ ] [ ] 0 1[ ] [ ]

1 and 2 3. extend solution (lattice) to sections giving and for 4. solution is at the output of the lattice section

p p

p

th

pe m b m m L p

e n e np

≤ ≤ + −

=

Page 10: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

10

Lattice Formulations of LP

• lattice network with p sections—the output of which is the forward prediction error

• digital network implementation of the prediction error filter with transfer function A(z)

• no direct correlations

• no alphas

• k’s computed from forward and backward error signals

Page 11: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

11

Lattice Filter for A(z)

0 0 0 1( ) ( )[ ] [ ] [ ]= = ≤ ≤ −e n b n s n n L1 1 1 1 2 0 1( ) ( ) ( )[ ] [ ] [ ] , ,..., ,− −= − − = ≤ ≤ − +i i i

ie n e n k b n i p n L i1 1 1 1 2 0 1( ) ( ) ( )[ ] [ ] [ ] , ,..., ,− −= − + − = ≤ ≤ − +i i i

ib n k e n b n i p n L i

0 1( )[ ] [ ],= ≤ ≤ − +pe n e n n L p( ) ( ) ( )=E z A z S z

Page 12: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

12

All-Pole Lattice Filter for H(z)

0 1= ≤ ≤ − +( )[ ] [ ],pe n e n n L p1 1 1

1 1 0 1 1

( ) ( ) ( )[ ] [ ] [ ], ,..., ,

− −= + −

= − ≤ ≤ − + −

i i iie n e n k b n

i p p n L i1 1 1

1 1 0 1

( ) ( ) ( )[ ] [ ] [ ], ,..., ,

− −= − + −

= − ≤ ≤ − +

i i iib n k e n b ni p p n L i

0 0 0 1( ) ( )[ ] [ ] [ ],= = ≤ ≤ −s n e n b n n L1( ) ( )( )

=S z E zA z

1z − 1z −

( ) [ ]pb n

( ) [ ]pe n ( 1) [ ]pe n− (1) [ ]e n ( 0 ) [ ]e n [ ]s n

( 1) [ ]pb n− (1) [ ]b n ( 0 ) [ ]b n

pk

pk−

1pk −

1pk −−

1k

1k−

Page 13: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

13

All-Pole Lattice Filter for H(z)

This image cannot currently be displayed.

( ) ( 1)

( 1) ( )

(0) (0) ( )

[ 1] 0, , [0], 1,...,1, [0] [0]

[0] [0] [0]1,2,...,

1. since we can first solve for for using the relationship:

2. since we can then solve for for using the equ

− = ∀

= − =

=

=

i i

i i

i

b i ei p p e e

b e bi p ( ) ( 1)

( 1)

( 1) ( ) ( 1)

(0) (0) ( )

[0] [0]

[1][1] [1] [0], , 1,...,1

[1] [1] [1]1,2,...,

ation: 3. we can now begin to solve for as:

4. we set and we can then solve for for using

− −

= −

= + = −

==

i ii

i

i i ii

i

b k e

ee e k b i p p

b e bi p

( ) ( 1) ( 1)

(0) (0)

[1] [1] [0], 1,2,...,2,3,..., 1

[ ] [ ] [ ]

the equation:

5. we iterate for and end up with

− −= − + =

= −

= =

i i iib k e b i p

n Ns n e n b n

Page 14: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

14

Lattice Formulations of LP

the lattice structure comes directly out of the Durbin algorithm the parameters are obtained from the Durbin equations the predictor coefficients, , do not appear explicitly in the lattice stα

••

•i

k

k

11 1

01 2

1 11 2 1 2

0 0

14

1

( ) ( )

/

( ) ( )

ructure can relate the parameters to the forward and backward errors via

( ) ( )

[ ( )] [ ( )]

wh

− +− −

=

− + − +− −

= =

= ∗⎧ ⎫⎡ ⎤ ⎡ ⎤⎪ ⎪−⎢ ⎥ ⎢ ⎥⎨ ⎬⎢ ⎥ ⎢ ⎥⎪ ⎪⎣ ⎦ ⎣ ⎦⎩ ⎭

∑ ∑

i

L ii i

mi

L i L ii i

m m

k

e m b mk

e m b m

ere is a normalized cross correlation between the forward and backward prediction error, and is therefore called a partial correlation or PARCOR coefficient can compute predictor coefficients re•

ik

cursively from the PARCOR coefficients

Page 15: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

15

Direct Computation of k Parameters0 1

( ) ( )

assume [ ] non-zero for assume chosen to minimize total energy of the forward

(or backward) prediction errorswe can then minimize prediction error as :

(

≤ ≤ −

=

i

i iforward

s n n Lk

E e m

forward21 12 1 1

0 0

11 1 1

0

11 1

01 21

0

1

0 2 1 1

1

1

( ) ( )

( )( ) ( ) ( )

( ) ( )

( )

) ( ) ( )

( ) ( ) ( )

( ) ( )

( )

− + − +− −

= =

− +− − −

=

− +− −

=− +

=

⎡ ⎤ ⎡ ⎤= − −⎣ ⎦ ⎣ ⎦

∂ ⎡ ⎤= = − − − −⎣ ⎦∂

⎡ ⎤⋅ −⎣ ⎦=

⎡ ⎤−⎣ ⎦

∑ ∑

L i L ii i

im m

i L ii i iforward

imi

L ii i

forward mi L i

i

m

e m k b m

E e m k b m b mk

e m b mk

b m

Page 16: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

16

Direct Computation of k Parameters

21 12 1 1

0 0

11 1

0

1

0 2 1

( ) ( ) ( ) ( )

( )( ) ( )

we can also choose to minimize the prediction error

( ) ( ) ( )

( ) ( )

− + − +− −

= =

− +− −

=

⎡ ⎤ ⎡ ⎤= = − + −⎣ ⎦ ⎣ ⎦

∂ ⎡ ⎤= = − − + −⎣ ⎦∂

∑ ∑L i L i

i i i ibackward i

m m

i L ii ibackward

imi

E b m k e m b m

E k e m b mk

backward

1

11 1

01 21

0

1

( )

( ) ( )

( )

( )

( ) ( )

( )

− +− −

=− +

=

⎡ ⎤−⎣ ⎦=

⎡ ⎤⎣ ⎦

i

L ii i

backward mi L i

i

m

e m

e m b mk

e m

Page 17: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

17

Direct Computation of k Parameters

2 21 11 1

0 0

11 1

0

1

1

1

( ) ( )

( ) ( )

(

if we window and sum over all time, then

( ) ( )

therefore

( ) ( )

− + − +− −

= =

− +− −

=

⎡ ⎤ ⎡ ⎤= −⎣ ⎦ ⎣ ⎦

= = =

−=

∑ ∑

L i L ii i

m m

PARCOR forward backward forward backwardi i i i i

L ii i

m

i

e m b m

k k k k k

e m b m

e1 21 12 21

0 0

1/

) ( )( ) ( )− + − +

= =

⎧ ⎫⎡ ⎤ ⎡ ⎤−⎨ ⎬⎣ ⎦ ⎣ ⎦⎩ ⎭∑ ∑

L i L ii

m mm b m

Page 18: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

18

Direct Computation of k Parameters

{ }1 2 2

0

211 1 1 1

0

1

( ) ( ) ( )

( ) ( ) ( ) (

minimize of forward and backward prediction errors over fixed interval (covariance method)

( ) ( )

( ) ( ) ( )

=

−− − − −

=

⎡ ⎤ ⎡ ⎤= +⎣ ⎦ ⎣ ⎦

⎡ ⎤= − − + − +⎣ ⎦

Li i i

Burgm

Li i i i

i im

E e m b m

e m k b m k e m b

sum

2

11 1 1

0

11 1 1

0

11 1

0

2 21 1

0

1

0 2 1 1

2 1

2 1

1

)

( )( ) ( ) ( )

( ) ( ) ( )

( ) ( )

( ) ( )

( )

( ) ( ) ( )

( ) ( ) ( )

( ) ( )

( ) ( )

=−∞

−− − −

=

−− − −

=

−− −

=

− −

=

⎡ ⎤−⎣ ⎦

∂⎡ ⎤= = − − − −⎣ ⎦∂

⎡ ⎤− − + −⎣ ⎦

⎡ ⎤⋅ −⎣ ⎦=

⎡ ⎤ ⎡ ⎤+ −⎣ ⎦ ⎣ ⎦

m

i LBurg i i i

imi

Li i i

im

Li i

Burg mi L

i i

m

m

Ee m k b m b m

k

k e m b m e m

e m b mk

e m b m1 1

0

1 1

− −

=

• − ≤ ≤

∑ ∑L

m

Burgik always

Page 19: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

19

Comparison of Autocorrelation and Burg Spectra

• significantly less smearing of formant

peaks using Burg method

Page 20: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

20

Summary of Lattice Procedure

0 0

1

( ) ( )

steps involved in determining the predictor coefficients and the parameters for the lattice method are as follows

1. initial condition, ( ) ( ) ( ) from Eq. *3

2. compute

= =

k

e m s m b m

k 11

1 1

2

( )

( ) ( )

( )

( )

from Eq. *4

3. determine forward and backward prediciton errors ( ), ( ) from Eqs. *1 and *2 4. set

5. determine from Eq. *4

6. determine for

α

α

α

=

=

= ii i

ij

e m b mi

k

j 1 2 1

1

( ) ( )

, ,..., from Durbin iteration

7. determine ( ) and ( ) from Eqs. *1 and *2 8. set 9. if is less than or equal to , go to step 5 10. procedure is terminated

= −

= +

i i

i

e m b mi i

i p

predictor coefficients obtained directly from speech samples => without calculation of autocorrelation function method is guaranteed to yield stable filters ( <1) without using window• ik

Page 21: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

21

Summary of Lattice Procedure

Page 22: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

22

1−z 1−z 1−z1k−1k−

2k−2k−

pk−pk−

][ns ][)1( ne

][)1( nb

][)2( ne

][)2( nb

][)( ne p

][)( nb p

][)0( ne

][)0( nb

][ne

Summary of Lattice Procedure

0 0 3( ) ( ) ( ) ( ) ( )= = ∗e m b m s m

11 1

01 2

1 11 2 1 2

0 0

14

1

( ) ( )

/

( ) ( )

( ) ( )

[ ( )] [ ( )]

− +− −

=

− + − +− −

= =

= ∗⎧ ⎫⎡ ⎤ ⎡ ⎤⎪ ⎪−⎢ ⎥ ⎢ ⎥⎨ ⎬⎢ ⎥ ⎢ ⎥⎪ ⎪⎣ ⎦ ⎣ ⎦⎩ ⎭

∑ ∑

L ii i

mi

L i L ii i

m m

e m b mk

e m b m

1 1

1 1

1

1

( ) ( ) ( )

( ) ( ) ( )

( ) ( ) ( ) 1

( ) ( ) ( ) 2

− −

− −

= − − ∗

= − − ∗

i i ii

i i ii

e m e m k b m

b m b m k e m

Page 23: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

23

Prediction Error Signal

H(z)Gu(n) s(n)1

1

1

1

1

1

1 1

1

1. Speech Production Model

( ) ( ) ( )

( )( )( )

2. LPC Model:

( ) ( ) ( ) ( ) ( )

( )( )( )

3. LPC Error Model:( )

( ) ( )

α

α

α

=

=

=

=

= − +

= =−

= − = − −

= = −

= =−

%

p

kk

pk

kk

p

kk

pk

kk

k

s n a s n k Gu n

S z GH zU z a z

e n s n s n s n s n k

E zA z zS z

S zA z E z

1

1( ) ( ) ( )α

=

=

= + −

pk

kp

kk

z

s n e n s n k

A(z)s(n) e(n)

1/A(z)e(n) s(n)

Perfect reconstruction even if ak not equal to αk

Page 24: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

LPC Comparisons

24

Page 25: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

LPC Comparisons

25

Page 26: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

26

Comparisons Between LP Methods

• the various LP solution techniques can be compared in a number of ways, including the following:– computational issues– numerical issues– stability of solution– number of poles (order of predictor)– window/section length for analysis

Page 27: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

27

LP Solution Computations

• assume L1≈ L2>>p; choose values of L1=300, L2=300, L3=300, p=10

• computation for

• covariance method ≈ L1p+p3 ≈ 4000 *,+

• autocorrelation method ≈ L2p+p2 ≈ 3100 *,+

• lattice method ≈ 5L3p ≈ 15000 *,+

Page 28: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

28

LP Solution Comparisons• stability

– guaranteed for autocorrelation method– cannot be guaranteed for covariance method; as

window size gets larger, this almost always makes the system stable

– guaranteed for lattice method• choice of LP analysis parameters

– need 2 poles for each vocal tract resonance below Fs/2

– need 3-4 poles to represent source shape and radiation load

– use values of p ≈ 13-14

Page 29: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

29

The Prediction Error Signal

Page 30: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

30

LP Speech AnalysisTop panel: speech signal

Second panel: error signal

Third panel: log magnitude spectra of signal and LP model

Fourth panel: log magnitude spectrum of error signal

file:s5, ss:11000, frame size (L):320, lpc order (p):14, cov method

Page 31: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

31

LP Speech AnalysisTop panel: speech signal

Second panel: error signal

Third panel: log magnitude spectra of signal and LP model

Fourth panel: log magnitude spectrum of error signal

file:s5, ss:11000, frame size (L):320, lpc order (p):14, ac method

Page 32: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

32

LP Speech AnalysisTop panel: speech signal

Second panel: error signal

Third panel: log magnitude spectra of signal and LP model

Fourth panel: log magnitude spectrum of error signal

file:s3, ss:14000, frame size (L):160, lpc order (p):16, cov method

Page 33: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

33

LP Speech AnalysisTop panel: speech signal

Second panel: error signal

Third panel: log magnitude spectra of signal and LP model

Fourth panel: log magnitude spectrum of error signal

file:s3, ss:14000, frame size (L):160, lpc order (p):16, ac method

Page 34: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

34

Variation of Prediction Error with LP Order

• prediction error flattens at around p=13-14

• normalized prediction error for unvoiced speech larger than for voiced speech => model isn’t quite as accurate

Page 35: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

35

LP Solution Comparisons

• choice of LP analysis parameters– use small values of L for reduced computation– use l order of several pitch periods for reliable

prediction-especially when using tapered window– use l from 100-400 samples at 10 kHz for

autocorrelation– for lattice and covariance methods, L as small as 2 p

has been used (within pitch periods); however if pitch pulse occurs within window, bad prediction results => use much larger values of L

Page 36: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

36

Prediction Error Signal Behavior

1

- the prediction error signal is computed as

( ) ( ) ( ) ( )

- ( ) should be large at the beginning of each pitch period (voiced speech) => good signal for pitch detection- can

α=

= − − =∑p

kk

e n s n s n k Gu n

e n

perform autocorrelation on ( ) and detect largest peak- error spectrum is approximately flat-so effects of formants on pitch detection are minimized

e n

Page 37: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

37

Normalized Mean-Squared Error

12

01

2

0

12

01

2

0

ˆ

ˆ

ˆ

ˆ

ˆ

ˆ

- for autocorrelation method

( )

( )

- for covariance method

( )

( )

+ −

=−

=

=−

=

=

=

L p

nm

n L

nm

L

nm

n L

nm

e mV

s m

e mV

s m

0

0 0

0

2

1

0 0

00 0

1

0

ˆ ˆ

ˆˆ

ˆ

ˆˆ

ˆ

ˆ

- the prediction error sequence (defining ) is

( ) ( )

- giving many forms for the normalized error

( , )

( , )

( , )( , )

( )

α

α

φα α

φ

φα

φ

=

= =

=

= −

= − −

=

= −

= −

∑∑

p

kn nk

p pn

i jnni j

pn

inni

ini

e m s m k

i jV

iV

V k1=∏

p

Page 38: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

38

Experimental Evaluations of LPC Parameters

Page 39: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

39

Normalized Mean-Squared Error

• Vn versus p for synthetic vowel, pitch period of 83 samples, L=60, pitch synchronous analysis

• covariance method-error goes to zero at p=11, the order of the synthesis filter

• autocorrelation method, Vn≈0.1 for p≥7 since error dominated by prediction at beginning of interval

Page 40: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

40

Normalized Mean-Squared Error

• normalized error versus p for pitch asynchronous analysis, L=120, normalized error falls to 0.1 near p=11 for both covariance and autocorrelation methods

Page 41: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

41

Normalized Mean-Squared Error

• normalized error versus L, p=12

• for L < pitch period (83 samples), covariance method gives smaller normalized error than autocorrelation method

• for values of L at or near multiples of pitch period, normalized error jumps due to large prediction error in vicinity of pitch pulse

• when L > 2 * pitch period, normalized error same for both autocorrelation and covariance methods

Page 42: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

42

Normalized Mean-Squared Error

• results for natural speech

Page 43: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

43

Normalized Mean-Squared Error• variability of normalized error with positioning of frame

• sample-by-sample LP analysis of 40 msec of vowel /i/

• signal energy in part a; normalized error in part b for p=14 pole analysis using 20 msec frame size for covariance method; normalized error in part c for autocorrelation method using HW; normalized error in part d for autocorrelation method using RW

• average pitch period of 84 samples => 2.5 pitch periods in 20 msec window

• substantial variations in normalized error for covariance method-especially peaked when pitch pulses enter window => longer windows give larger normalized errors

• substantial high frequency variations in normalized error for autocorrelation method with some pitch modulations

Page 44: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

Properties of the LPC Polynomial

44

Page 45: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

45

Minimum-Phase Property of A(z)( ) has all its zeros inside the unit circleA z

2 1: Assume that ( ) is a zero (root) of P ( )roof >o oz z A z11( ) ( ) ( )− ′= − oA z z z A z

2 2 2

12

12

2 2 21 0

ˆ ˆ ˆ

ˆ

The minimum mean-squared error is

[ ] | ( ) | | ( ) |

( ) ( )

πω ω

π

π

ωπ

π ω ω ω ωπ

=−∞ −

= =

− ′= − >∫−

∑ ∫ j jn n n

m

o n

E e m A e S e d

j j jz e A e S e d

2 221 1 1( / )ω ω− ∗ −=− −j j

o o oz e z z e

1Thus, ( ) could not be the optimum filter becausewe could replace by ( / ) and decrease the error.∗

o o

A zz z

Page 46: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

46

PARCORs and Stability1 1( ) prove that for some • ≥ ⇒ ≥i

i jk z j

1 1 1 1

1

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

=

= − = −∏i

i i i i ii j

j

A z A z k z A z z z

1

1

( ) ( )

( )

It is easily shown that is the coefficient

of in ( ), i.e., . Therefore,

If , then either all the roots must be theunit circle or at least one of

α−

=

=

=

∏on

ii i i

i ip

ii j

j

i

k

z A z k

k z

kthem must be

the unit circle.outside

Page 47: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

47

PARCORs and Stability1

1 2

( )

if , then either all the roots must be the unit circle or at least one of them must be the unit circle. Since this is true for all ( ),

, ,..., , a necessary condition for th

• ≥

=

on

outsidei

i

k

A zi p

2 1 2 0

1

1 1 2

1 1 0

1

( )

( ) ( ) ( )

e roots of( ) to be inside the unit circle is:

, , ,...,

for the -order optimum linear predictor,

( ) ( )

so and t

=

< =

= − = − >

<

p

i

th

ii i

i jj

i

A zk i p

i

E k E k E

k ( )herefore ( ) has all its roots inside the unit circle.

pA z

Page 48: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

48

Root Locations for Optimum LP Model

1

1

1 1

( )( ) 1

(1 ) ( )

pi

ii

p

p p

i ii i

G GH zA z z

G Gz

z z z z

α −

=

= =

= =−

= =− −

∏ ∏

%

Page 49: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

49

Pole-Zero Plot for ModelWhich polescorrespond toformantfrequencies?

Page 50: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

50

Pole Locations

Page 51: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

51

Pole Locations (FS=10,000 Hz)

( /180) ( / 2)SF Fθ= ⋅

Page 52: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

52

Estimating Formant Frequencies

• compute A(z) and factor it.• find roots that are close to the unit circle.• compute equivalent analog frequencies

from the angles of the roots.• plot formant frequencies as a function of

time.

Page 53: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

53

Spectrogram with LPC Roots

Page 54: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

54

Spectrogram with LPC Roots

Page 55: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

55

Comparison to ABS Methods2

2

2

error measure for ABS methods is log ratio of power spectra, i.e.,

| ( ) | log

| ( ) |

thus for ABS minimization of is equivalent to minimizing mean squ

π ω

ωπ

ω−

⎧ ⎫⎡ ⎤⎪ ⎪′ = ⎢ ⎥⎨ ⎬⎢ ⎥⎪ ⎪⎣ ⎦⎩ ⎭

′•

∫j

nj

S eE d

H e

E ared error between two log spectra comparing and we see the following:

both error measures related to ratio of signal to model spectra both tend to perform uniformly over who

o

o

LPC ABSE E

le frequency range both are suitable to selective error minimization over specified frequency ranges error criterion for LP modeling places higher weight on frequency regions

where | (

o

o

nS 2 2) | | ( ) | , whereas the ABS error criterion places equal weight on both regions

for unsmoothed signal spectra (as obtained by STFT methods), LP error criterion yields better spectral m

ω ω<

j je H e

atches than ABS error criterion for smoothed signal spectra (as obtained at output of filter banks), both error criteria

will perform well⇒

Page 56: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

56

Relation of LP Analysis to Lossless Tube Models

Page 57: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

57

Discrete-Time Model - I

• Make all sections the same length with delay

/ whereτ = Δ = Δlx c N x

Page 58: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

58

Discrete-Time Model - II

2

-section lossless tube model corresponds to discrete-time system when:

where is the velocity of sound, is the number oftube sections, is the sampling frequency, and isthe total

S

S

N

cNF

c NF

=l

l

1

1

{ , 1 1}length of the vocal tract.

The reflection coefficients are relatedto the areas of the lossless tubes by:

Can find transfer function of digital system subject tocon

k

k kk

k k

r k N

A ArA A

+

+

≤ ≤ −

−=

+

1,//

straints of the form G

N LN L

N L

rc A Zr rc A Z

ρρ

=−

= =+

Page 59: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

59

Discrete-Time Model - III

Page 60: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

60

Discrete-Time Model - IV2

1

0 5 1 1 /. ( ) ( )( )( )( ) ( )

=

+ += =

∏N

NG k

L k

G

r r zU zV zU z D z

01

1 1

11 2

( ) ( ) ( ) ( ) , , ,( ) ( )

− −− −

== + ==

Kkk k k k

N

D zD z D z r z D z k ND z D z

1

1

1 1 reflection coefficient+

+

⎛ ⎞−− ≤ = ≤⎜ ⎟+⎝ ⎠

k kk

k k

A ArA A

1 / if (i.e., ) and /

then ( ) satisties the recursion

ρρ

−= = ∞ = =

+N L

G G N LN L

c A Zr R r rc A Z

D z

Given the system function:

Page 61: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

61

All-Pole Lattice Filter for H(z)

1−z 1−z 1−z

1k1k−

1−pk1−− pk

pk

pk−

][ne ][ns

1( ) ( )( )

=S z E zA z

0

1 1 1

11 2

( )

( ) ( ) ( )

( )

( ) ( ) ( ) ( ) , , ,

( ) ( )

− − − −

== − ==

Ki i i ii

p

A zA z A z k z A z i pA z A z

If and , then ( ) ( ).= − = =i ir k N p D z A z

Page 62: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

62

Tube Areas from PARCORS• Relation to areas:

• Solve for Ai+1 in terms of Ai

• Log area ratios (good for quantization)

1 1

1 1

11 11

( / )( / )

+ +

+ +

⎛ ⎞ ⎛ ⎞− −− ≤ − = = = ≤⎜ ⎟ ⎜ ⎟+ +⎝ ⎠ ⎝ ⎠

i i i ii i

i i i i

A A A Ak rA A A A

11 01+

⎛ ⎞−= >⎜ ⎟+⎝ ⎠

ii i

i

kA Ak

1 1 01

+ ⎛ ⎞−= >⎜ ⎟+⎝ ⎠

i i

i i

A kA k

1 11

log log+⎛ ⎞ ⎛ ⎞−= =⎜ ⎟ ⎜ ⎟+⎝ ⎠ ⎝ ⎠

i ii

i i

A kgA k

Minimizes spectralsensitivity under uniform quantization

Page 63: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

63

Estimating Tube Areas from Speech (Wakita)

H. Wakita, IEEE Trans. Audio and Electroacoustics,October, 1973.

11 2

21

3

. Sample speech [ [ ] ( )] at samplingrate / / ( ).. Remove effects of glottal source and radiation by

pre-emphasis [ ] [ ] [ ].. Compute the PARCOR coefficients on a short-

time ba

a

s

s n s nTF T pc

x n s n s n

=

= =

= − −

l

1

1 24 1

sis: , , ,..., .. Assuming (arbitrary), compute

ik i pA=

=

11 1 2 11

, , ,...,+

⎛ ⎞−= = −⎜ ⎟+⎝ ⎠

ii i

i

kA A i pk

Page 64: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

64

Estimation of Tube Areas

Analysis of syllable /IY/ /B/ /AA/• /IY/ sound in part (a)• /B/ sound in parts (b) and (c)• /AA/ sound in part (d)

Using Wakita method to estimate tube areas from the speech waveform as shown in lower plot.

Page 65: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

65

Estimations of Tube Areas

Use of Wakita method to estimate tube areas for the five vowels, /IY/, /EH/, /AA/, /AO/, /UW/

Page 66: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

66

Alternative Representations of the LP Parameters

Page 67: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

67

LP Parameter Sets

Page 68: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

68

PARCORs to Prediction Coefficients

1 1

1 2

1 1 2 1

1 2

( )

( ) ( ) ( )

( )

for , , ,

if , then for , , ,

endend

, , ,

α

α α α

α α

− −−

=

=

> = −

= −

= =

K

K

K

ii i

i i ij j i i j

pj j

i pk

i j ik

j p

1 2assume that , , , , are given. Then we can skip the computation of in the Levinson recursion.• = Ki

i

k i pk

Page 69: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

69

Prediction Coefficients to PARCORs

12

11 1

1 2

1 21 2 1

1

( )

( )

( ) ( )( )

( )

for , , ,

for , , ,for , , ,

end

end

α α

α

α αα

α

−−

−− −

= =

=

= −= −

+=

=

K

K

K

pj j

pp p

i ij i i ji

ji

ii i

j p

k

i p pj i

kk

k

1 2assume that , , , , are given. Then we

can work backwards through the Levinson Recursion.

α• = Kj j p

Page 70: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

70

LP Parameter Transformations

( )1

1 1

1 1

roots of the predictor polynomial

( )

where each root can be expressed as a z-plane or s-plane root, i.e., ;

α

σ

− −

= =

= − = −

= + = + Ω

=

∑ ∏pp

kk k

k k

k kr ki k k k

k

A z z z z

z z j z s j

z

( )1 2 21 12

giving

tan ; log

important for formant estimation

σ− ⎡ ⎤Ω = = +⎢ ⎥

⎣ ⎦•

ks T

kik k kr ki

kr

e

zz z

T z T

Page 71: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

71

LP Parameter Transformations

1

1

1

1

1

1

cepstrum of IR of overall LP system from predictor coefficients

ˆ ˆ ( ) ( )

predictor coefficients from cepstrum of IR

ˆ ˆ ( ) ( )

α α

α α

−=

−=

⎛ ⎞= + ≤⎜ ⎟⎝ ⎠

⎛ ⎞= − ≤⎜ ⎟⎝ ⎠

n

n n kk

n

n n kk

kh n h k nn

kh n h k nn

0

1

1

where

( ) ( )α

∞−

= −

=

= =

−∑

∑n

pn k

kk

GH z h n z

z

Page 72: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

72

LP Parameter Transformations

1

0

1

2

1

0

1

0

IR of all pole system

( ) ( ) ( )

autocorrelation of IR

( ) ( ) ( ) ( )

( ) (| |)

( ) ( )

α δ

α

α

=

=

=

=

= − + ≤

= − = −

= − ≤

= +

% %

% %

% %

p

kk

np

kk

p

kk

h n h n k G n n

R i h n h n i R i

R i R i k i

R R k G

Page 73: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

73

LP Parameter Transformations

1

1

1

0

autocorrelation of the predictor polynomial

( )

with IR of the inverse filter

( ) ( ) ( )

with autocorrelation

( ) ( ) ( )

α

δ α δ

=

=

= −

= − −

= + ≤ ≤

pk

kk

p

kk

ak

A z z

a n n n k

R i a k a k i i p0

=∑p i

Page 74: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

74

LP Parameter Transformations

1 11

1

1 11

log area ratio coefficients from PARCOR coefficients

log log

with inverse relation

+

⎡ ⎤ ⎡ ⎤−= = ≤ ≤⎢ ⎥ ⎢ ⎥+⎣ ⎦ ⎣ ⎦

−= ≤ ≤

+

i

i

i ii

i i

g

i g

A kg i p

A k

ek i pe

Page 75: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

75

Quantization of LP Parameters

2

2

1

consider the magnitude-squared of the model frequency response

( ) ( , )| ( ) |

where is a parameter that affects . spectral sensitivity can be defined as

jjH e P g

A eg P

Sg

ωω ω

= =

∂∂ 0

1 12

( , )lim log( , )

which measures sensitivity to errors in the parameters

i

ig

i i i i

i

P g dg P g g

g

π

π

ω ωπ ω→Δ

⎡ ⎤= ⎢ ⎥Δ + Δ⎣ ⎦

Page 76: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

76

Quantization of LP Parameters

• spectral sensitivity for kiparameters; low sensitivity around 0; high sensitivity

around 1

• spectral sensitivity for log area ratio

parameters, gi – low sensitivity for virtually entire range is seen

Page 77: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

77

Line Spectral Pair Parameters1 2

1 2

1 1 1 1 12 1

1

1

( ) ( )

( ) ...

all-zero prediction filter with all zeros, , inside the unit circle

( ) ( ) ...

reciprocal polynomial with inverse zeros, / c

α α α

α α α

− − −

− + − − − + − − +

= + + + +

=

= = + + + +

=

%

pp

k

p p p pp

k

A z z z z

z

A z z A z z z z z

z

1 1

1

1( )

onsider the following:

( ) ( ) allpass system ( ) , all ( )

form the symmetric polynomial ( ) as:

( ) ( ) ( ) ( ) ( ) ( ) has zeros for ( ) ; ( ( )

ω ω

− + −

= = ⇒ =

= + = + ⇒ = − = −

%

% %

j

p

A zL z L eA z

P z

P z A z A z A z z A z P z L z A z

{ }

{ }1 1

1 2 2 0 1 1

1

2 0 1

( )

( ))

arg ( ) ( / ) , , ,...,

form the anti-symmetric polynomial ( ) as:

( ) ( ) ( ) ( ) ( ) ( ) has zeros for ( ) ; ( ( ) ( ))

arg ( ) , , ,...,

ω

ω

π

π

− + −

⇒ = + ⋅ = −

= − = − ⇒ = + =

⇒ = ⋅ = −

% %

k

k

j

p

j

A z

L e k k p

Q z

Q z A z A z A z z A z Q z L z A z A z

L e k k p 1

Page 78: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

78

Line Spectral Pair Parameters

{ } zeros of ( ) and ( ) fall on unit circle and are interleaved with

each other set of called Line Spectral Frequencies (LSF) LSFs are in ascending order stability of ( ) guaranteed by quan

ω⇒ k

P z Q z

H z

2 22

2

4

tizing LSF parameters( ) ( ) ( )

( ) ( )( )

ω ωω

ω ωω

+=

+=

j jj

j jj

P e Q eA e

P e Q eA e

Page 79: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

79

Line Spectrum Pair (LSP) Parameters

1 1 properties of LSP parameters

1. ( ) corresponds to a lossless tube, open at the lips and open ( )

at the glottis 2. ( ) corresponds to a lossless tube, open at the lips and clos

+

•=pP z k

Q z 1 1

11

ed ( )

at the glottis 3. all the roots of ( ) and ( ) are on the unit circle 4. if is an even integer, then ( ) has a root at and ( ) has a root at 5. a

+ = −

= += −

pk

P z Q zp P z z Q zz

1 1 2necessary and sufficient condition for , , ,..., is that the roots of ( ) and ( )alternate on the unit circle 6. the LSP frequencies get close together when roots of ( ) are close

< =ik i pP z Q z

A z to the unit circle 7. the roots of ( ) are approximately equal to the formant frequenciesP z

Page 80: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

80

LSP Example

( ) rootso ( ) rootsx ( ) roots

P zQ zA z

12p =

Page 81: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

81

Line Spectrum Pair (LSP) Parameters

Page 82: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

82

LPC Synthesis

1

the basic synthesis equation is

( ) ( ) ( )

need to update parameters every 10 msec or so pitch synchronous mode works best

α=

= − +

••

∑% %p

kk

s n s n k Gu n

Page 83: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

83

LPC Analysis-Synthesis

1. Extract αk parameters properly

2. Quantize αk parameters properly so that there is little quantization error

• Small number of bits go into coding the αk coefficients

3. Represent e(n) via:

• Pitch pulses and noise—LPC Coding

• Multiple pulses per 10 msec interval—MPLPC Coding

• Codebook vectors—CELP

• Almost all of the coding bits go into coding of e(n)

Page 84: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

84

LPC Vocoder

• bit rates of 72 FSwhere FS=100, 67, and 33 for bit rates of 7200 bps, 4800 bps and 2400 bps

3600 bps

2400 bps

VEV LPC

header

Page 85: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

85

LPC Basics

A(z) H(z)sn(m) en(m) sn(m)

[ ]

1

1

1

2

1 1

1 1 111

ˆ ˆ ˆ

ˆ ˆ ˆ

( ) ( ) ( ) ; prediction error filter( )

( ) ( ) ( ); prediction error

( ) ; all pole model( ) ( )

( ) ( )

α

α

α

=

=

=

=−∞

= − = − =

= − −

= = =−−

= = −

pk

kk

p

kn n nk

pk

kk

n n nm

E zA z z P zS z

e m s m s m k

H zA z P zz

E e m s m2

1ˆ ( )α

=−∞ =

⎛ ⎞−⎜ ⎟

⎝ ⎠∑ ∑

p

k nm k

s m k

Page 86: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

86

LPC Basics-Speech Model

P(z)

+e(n)=Gu(n) s(n)

1

1

11

1

( ) ( )( ) ( )

( )ω

ω

α

α

=

=

= = =−−

=−

pk

kk

jp

j kk

k

G G S zH zP z U zz

GH ee

Page 87: Linear Predictive Coding (LPC)-Lattice Methods, Applications · 2011. 12. 23. · 5. we iterate for and end up with =− + = ... 14 Lattice Formulations of LP the lattice structure

87

Summary• the LP model has many interesting and useful properties

that follow from the structure of the Levinson-Durbin algorithms

• the different equivalent representations have different properties under quantization– polynomial coefficients (bad)– polynomial roots (okay)– PARCOR coefficients (okay)– lossless tube areas (good)– LSP root angles (good)

• almost all LPC representations can be used with a range of compression schemes and are all good candidates for the technique of Vector Quantization