<< Chapter < Page | Chapter >> Page > |
Then,
The second and third terms of [link] may be written in terms of the autocorrelation sequence .
Substituting into [link] , the mean-square error may be written as
Note that while and are vectors, and is a matrix, the expression in [link] is still a scalar quantity.
To find the optimal coefficients, which we will call , we differentiate [link] with respect to the vector (compute the gradient), and set it equal to the zero vector.
Solving,
The vector equation in [link] is a system of scalar linear equations, which may be solved by inverting the matrix .
Note from [link] and [link] that and are generally functions of . However, if is wide-sense stationary, the autocorrelation function is only dependenton the difference between the two indices, . Then and are no longer dependent on , and may be written as follows.
Therefore, if is wide-sense stationary, the optimal coefficients do not depend on . In this case, it is also important to note that 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.
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.
Here we are assuming we have a length segment which starts at . Note that this is the single-parameter form of the autocorrelationsequence, so that the forms in [link] and [link] may be used for and .
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
, using the autocorrelation method
(“lpc" is a built-in Matlab function, so use the name
mylpc ).
Consider the input vector
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
coefficients
.
In your function you should do the following:
Notification Switch
Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?