<< Chapter < Page Chapter >> Page >
a = [ a 1 a 2 a P ] T
S n , P = [ S n - 1 S n - 2 S n - P ] T

Then,

E [ e n 2 ] = E S n - k = 1 P a k S n - k 2 = E S n - a T S n , P 2 = E S n 2 - 2 S n a T S n , P + a T S n , P a T S n , P = E S n 2 - 2 a T E S n S n , P + a T E S n , P S n , P T a

The second and third terms of [link] may be written in terms of the autocorrelation sequence r S S ( k , l ) .

E [ S n S n , P ] = E [ S n S n - 1 ] E [ S n S n - 2 ] E [ S n S n - P ] = r S S ( n , n - 1 ) r S S ( n , n - 2 ) r S S ( n , n - P ) r S
E S n , P S n , P T = E S n - 1 S n - 1 S n - 1 S n - 2 S n - 1 S n - P S n - 2 S n - 1 S n - 2 S n - 2 S n - 2 S n - P S n - P S n - 1 S n - P S n - 2 S n - P S n - P = r S S ( n - 1 , n - 1 ) r S S ( n - 1 , n - 2 ) r S S ( n - 1 , n - P ) r S S ( n - 2 , n - 1 ) r S S ( n - 2 , n - 2 ) r S S ( n - 2 , n - P ) r S S ( n - P , n - 1 ) r S S ( n - P , n - 2 ) r S S ( n - P , n - P ) R S

Substituting into [link] , the mean-square error may be written as

E e n 2 = E S n 2 - 2 a T r S + a T R S a

Note that while a and r S are vectors, and R S is a matrix, the expression in [link] is still a scalar quantity.

To find the optimal a k coefficients, which we will call a ^ , we differentiate [link] with respect to the vector a (compute the gradient), and set it equal to the zero vector.

a E e n 2 = - 2 r S + 2 R S a ^ 0

Solving,

R S a ^ = r S

The vector equation in [link] is a system of P scalar linear equations, which may be solved by inverting the matrix R S .

Note from [link] and [link] that r S and R S are generally functions of n . However, if S n is wide-sense stationary, the autocorrelation function is only dependenton the difference between the two indices, r S S ( k , l ) = r S S ( | k - l | ) . Then R S and r S are no longer dependent on n , and may be written as follows.

r S = r S S ( 1 ) r S S ( 2 ) r S S ( P )
R S = r S S ( 0 ) r S S ( 1 ) r S S ( P - 1 ) r S S ( 1 ) r S S ( 0 ) r S S ( P - 2 ) r S S ( 2 ) r S S ( 1 ) r S S ( P - 3 ) r S S ( P - 1 ) r S S ( P - 2 ) r S S ( 0 )

Therefore, if S n is wide-sense stationary, the optimal a k coefficients do not depend on n . In this case, it is also important to note that R S is a Toeplitz (constant along diagonals) and symmetric matrix, which allows [link] to be solved efficiently using the Levinson-Durbin algorithm (see [link] ). This property is essential for many real-time applications of linearprediction.

Linear predictive coding of speech

An important question has yet to be addressed. The solution in [link] to the linear prediction problem depends entirely on the autocorrelation sequence.How do we estimate the autocorrelation of a speech signal? Recall that the applications to which we are applying LPCinvolve dividing the speech signal up into short segments and computing the filter coefficients for each segment.Therefore we need to consider the problem of estimating the autocorrelation for a short segment of the signal.In LPC, the following "biased" autocorrelation estimate is often used.

r ^ S S ( m ) = 1 N n = 0 N - m - 1 s ( n ) s ( n + m ) , 0 m P

Here we are assuming we have a length N segment which starts at n = 0 . Note that this is the single-parameter form of the autocorrelationsequence, so that the forms in [link] and [link] may be used for r S and R S .

Lpc exercise

Download the file test.mat for this exercise.

Write a function coef=mylpc(x,P) which will compute the order-P LPC coefficients for the column vector x , using the autocorrelation method (“lpc" is a built-in Matlab function, so use the name mylpc ). Consider the input vector x as a speech segment, in other words do not divide it up into pieces.The output vector coef should be a column vector containing the P coefficients { a ^ 1 , a ^ 2 , , a ^ P } . In your function you should do the following:

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?

Ask