## 5.1.9 Linear prediction analysis

26.4453GPPCodec for Enhanced Voice Services (EVS)Detailed algorithmic descriptionRelease 15TS

Short-term prediction or linear prediction (LP) analysis using the autocorrelation approach determines the coefficients of the synthesis filter of the CELP model. The autocorrelation of windowed speech is converted to the LP coefficients using the Levinson-Durbin algorithm. Then, the LP coefficients are transformed to the line spectral pairs (LSP) and consequently to line spectral frequencies (LSF) for quantization and interpolation purposes. The interpolated quantized and unquantized coefficients are converted back to the LP domain to construct the synthesis and weighting filters for each subframe.

#### 5.1.9.1 LP analysis window

In case of encoding of an active signal frame, two sets of LP coefficients are estimated in each frame using a 25 ms asymmetric analysis window (320 samples at 12.8 kHz sampling rate), one for the frame-end and one for mid-frame LP analysis. A look ahead of 8.75ms (112 samples at 12.8 kHz sampling rate) is used for the frame-end autocorrelation calculation. The frame structure is shown below.

Figure 8: Relative positions and length of the LP analysis windows

The frame is divided into four sub-frames, each having a length of 5 ms, i.e., 64 samples. The windows for frame-end analysis and for mid-frame analysis are centred at the 2^{nd} and 4^{th} sub-frame of the current frame, respectively. An asymmetrical window with the length of 320 samples is used for windowing. The windowed signal for mid-frame is calculated as

(40)

and the windowed signal for frame-end is calculated as

(41)

#### 5.1.9.2 Autocorrelation computation

The autocorrelations of the windowed signal are computed by

(42)

where is set to 320. When , is set to 100 as well.

#### 5.1.9.3 Adaptive lag windowing

In addition, bandwidth expansion is applied by lag windowing the autocorrelations using the following window

(43)

where is the sampling frequency (12800 or 16000) and the bandwidth frequency is set adaptively based on the OL pitch lag in the 12.8 kHz domain and the normalized correlation (i.e., pitch gain). These parameters are obtained in the OL pitch estimation module from the look-ahead part of the current or the previous frame, depending on whether the adaptive lag windowing is applied before or after the OL pitch estimation. In some special cases, and are used instead of and , respectively. These situations will be described later in this specification. Note that the shorter pitch lag and/or the larger pitch gain, the stronger (heavy smoothing with larger) window is used to avoid excessive resonance in the frequency domain. The longer pitch lag and/or the smaller normalized correlation, the weaker window (light smoothing with smaller) is used to get more faithful representation of the spectral envelope.

Table 5: Selection of band width frequency in Hz

< 80 | 80<= < 160 | 160<= | |

0.6 < | 60 | 40 | 20 |

0.3 <<=0.6 | 40 | 40 | 20 |

<= 0.3 | 40 | 20 | 20 |

The modified autocorrelation function, is calculated as

(44)

Further, is multiplied by the white noise correction factor 1.0001 which is equivalent to adding a noise floor of -40 dB.

#### 5.1.9.4 Levinson-Durbin algorithm

The modified autocorrelation function,, is used to obtain the LP filter coefficients by solving the set of equations:

(45)

The set of equations in (46) is solved using the Levinson-Durbin algorithm. This algorithm uses the following recursion:

(47)

The final solution is given as. The residual error energies (LP error energies) are also used in the subsequent processing.

#### 5.1.9.5 Conversion of LP coefficients to LSP parameters

The LP filter coefficients are converted to the LSP representation [16] for quantization and interpolation purposes. For a 16^{th}-order LP filter, the LSPs are defined as the roots of the sum and difference polynomials

(48)

The polynomials and are symmetric and asymmetric, respectively. It can be proved that all roots of these polynomials lie on the unit circle and are interlaced. The polynomials and have each 8 conjugate roots, denoted and called the Line Spectral Pairs (LSPs). The corresponding angular frequencies are the Line Spectral Frequencies (LSFs). The LSFs satisfy the ordering property . The coefficients of these polynomials are found by the following recursive relations:

(49)

where *M* = 16 is the predictor order.

The LSPs are found by evaluating the polynomials and at 100 points equally spaced between 0 and and checking for sign changes. A sign change indicates the existence of a root and the sign change interval is then divided four times to track the root precisely. Considering the conjugate symmetry of the polynomials and and removing the linear term, it can be shown that the polynomials and can be written (considering) as

(50)

Considering the frequency mapping we can define

(51)

an *m*th-order Chebyshev polynomial in *x* [18]. The polynomials and can then be rewritten using this Chebyshev polynomial expansion as

(52)

Neglecting the factor of 2, which does not affect the root searching mechanism, the series to be evaluated can be generalized to

(53)

The Chebyshev polynomials satisfy the order recursion

(54)

with initial conditions . This recursion can be used to calculate and . Then, can be expressed in terms of and

(55)

The details about Chebyshev polynomial evaluation method can be found in [18].

In the following part of this document, the LSPs found by the described method will be denoted as , *i*=1,..,16 with .

#### 5.1.9.6 LSP interpolation

The LP parameters for each subframe are obtained by means of interpolation between the end-frame parameters of the current frame, the mid-frame parameters of the current frame and the end-frame parameters of the previous frame. However, the LP parameters are not particularly suitable for interpolation due to stability issues. For this reason, the interpolation is done on the respective LSP parameters and then converted back to the LP domain.

Let denote the end-frame LSP vector of the current frame, the mid-frame LSP vector of the current frame, both calculated by the method described in the previous section. Furthermore, let be the end-frame LSP vector of the previous frame. The interpolated LSP vectors for all subframes are then given by

(56)

The same formula is used for interpolation of quantized LSPs described later in this document.

#### 5.1.9.7 Conversion of LSP parameters to LP coefficients

Once the interpolated LSP vectors are calculated, they are converted back into LP filter coefficients for each subframe. Each LSP parameter gives rise to a second order polynomial factor of the form . These can be multiplied together to form the polynomials, i.e.

(57)

By using the Chebyshev polynomial expansion defined in (53) we can apply the following recursion to find the coefficients of the polynomials:

(58)

The coefficients are computed similarly, by replacing by , and with initial conditions and . Once the coefficients and are found, they are multiplied by and , respectively, to form the polynomials and . That is

(59)

Finally, the LP coefficients are found by

(60)

with . This is directly derived from the equation , and considering the fact that and are symmetric and asymmetric polynomials, respectively. The details of this procedure can be found in [18].

#### 5.1.9.8 LP analysis at 16kHz

If ACELP core is selected for WB, SWB or FB signals at bitrates higher than 13.2 kbps, its internal sampling rate is set to 16 kHz rather than 12.8 kHz. In this case, the LP analysis is done at the end of the pre-processing chain on input signal resampled to 16 kHz and pre-emphasized (see subclauses 5.1.3.3 and 5.1.4). In this case, the length of the LP analysis window is 400 samples at 16 kHz, which corresponds again to 25 ms. The windowed signal for mid-frame is calculated as

(61)

and the windowed signal for frame-end is calculated as

(62)

The autocorrelation computation, adaptive lag windowing and the conversion of LP coefficients to LSP parameters are performed similarly as in subclauses 5.1.9.2 thru 5.1.9.5. However, the LSP interpolation is done on 5 sub-frames instead of 4 sub-frames. The interpolated LSP vectors are given by

The conversion of LSP parameters to LP coefficients is then performed similarly as in subclause 5.1.9.7. At the end of the LP analysis there are *M*=16 LSP parameters and coefficients but the corresponding LSFs span the range of 0-8000 Hz rather than 0-6400 Hz.

The LP analysis at 25.6 kHz and 32 kHz is described later in this document.