### AE2M31CZS exercise - LPC-based spectral analysis

• Basic computation of LPC-based spectrum and the comparison with DFT spectrum
• The first steps of LPC-spectrum computation should be realized using the signal vm0-600.bin of length N = 600 samples. Signal should be weighted by Hamming window.
• Using the function lpc compute autoregressive coefficients of analyzed signal. Use the order of AR model p=16.
• Observe frequency response of AR model of analyzed signal with numerator of transfer function equal to 1 ( use fcn freqz ) and compare achieved result with DFT spectrum of signal.
• 1st checked result (1 point):
• Display the waveform (weighted by Hamming window) of the signal vm0-600.bin same as its amplitude DFT spectrum in logarithmic scaling.
• Display frequency response of AR model with transfer function H(z) = 1 / A(z).

• Compare LPC spectrum (i.e. based on frequency response of signal AR model) and its power DFT-based spectrum (PSD). Draw both estimations into one figure by different colours !!
• Observe mainly the contribution of power of prediction error Ep to both estimations, same as the number of samples of particular estimations (spectra).
• Observe also the changes of smoothed LPC spectrum for varying order of AR model, i.e. p=16, 10, 6, 30, 80. Explain !!
• 2n checked result (1 point):
• LPC spectrum of the order 16 and DFT-based power spectrum in one figure.
• LPC spectrum of the order 6 and DFT-based power spectrum in one figure.
• LPC spectrum of the order 30 and DFT-based power spectrum in one figure.

• DFT and LPC spectrum of harmonic signals.
• Generate the following signals:
• s1 - sinusoid with fs = 8000 Hz, f1= 878 Hz, A1=0,8, duration 0.5s ;
• s2 - sinusoid fs = 8000 Hz, f1= 2321 Hz, A1=0,7, duration 0.5s ;
• n1 - Gaussian white noise of the same length as s1 and s2, zero mean value, power of generated noise should be P_n = 0.25 ;
• Observe DFT and LPC spectra of signals containing one or two harmonic components. Work with the following combiantions:
1. s1
2. s1+n1
3. s1+s2
4. s1+s2+n1
• Observe especially the influence on order of LPC model, wotk with the following orders p=2, 4, 6, 8, 10.
• 3rd checked result (1 point):
• DFT and LPC spectrum of signals s1 resp. s1+n1 for AR-model orders 2, 4 a 8.
• DFT and LPC spectrum of signals s1+s2 resp. s1+s2+n1 for AR-model orders 2, 4 a 8.

OPTIONAL HOMEWORK

• AR modelling of speech signal. - use prepared demo m-file cv11_AR_to_complete.m
• Work with the signal vm0-600.bin of length N = 600 samples. Signál should not be weigthed !
• Use function lpc and compute parameters of AR model, i.e. autoregressive coefficients a and power of prediction error Ep. In the first step, use the order p=10.
• Observe analyzed signal and error signal obtained by the filtering of analyzed signal by FIR filter with transfer function A(z).
• Observe modelled signal in the followign situations:
• H(z) = 1 / A(z), excitation by obtained error signal,
• H(z) = 1 / A(z), excitation by unite pulses with period To=120 samples,
• H(z) = sqrt(Ep) / A(z), excitation by unite pulses with period To=120 samples and the power equal to 1,
• H(z) = sqrt(Ep) / A(z), excitation by unite pulses with varying period and the power equal to 1, use To=80, 150 samples.
• Observe the contribution of model order. Use p=10, 6, 16, 30.