BE2M31DSP seminar
Cepstral analysis - cepstrum computation, homomorfic deconvolution
Guidelines to seminar:
- Generation of signal with reflection
- Generate N = 100 samples of signal containing attenuated cosine
wave s(t) = cos(2*pi*f*t) * e^(-t/Tau) with the following parameters:
- fs = 8000 Hz,
- f = 500 Hz,
- Tau = 0.001.
- Create impulse response h[n] of FIR filter with transfer
function H(z) = 1 + m*z^-M with the following parameters:
- m = 0.7,
- M = 15,
- N = 100.
- ATTENTION! Create both the signal as well as the impulse response as COLUMN VECTORS!
- Using the function filter and given impulse
response h[n] generate the signal with the relfection.
- Result: Draw
and observe waveforms and magnitude spectra of attenuated cosine, impulse repsonse
(i.e. magnitude frequency repsonse of FIR filter used for reflection
modelling), and the signal with relflection.
- Real cepstrum and cancellation of relflection (convolutory noise).
- Compute real cepstrum of the signal accoridng to definition.
- Using the liftering separate aperiodic and periodic (reflection)
component, select suitable the boundary between lowquefrency and
highquefrency lifter. Try to shift this boundary and observe result
of separation.
ATTENTION! Do not forget to keep symmetry of real cepstrum! The mask of used lifter should be also created as column vector to keep the same orientation as it was used for created signals and consequently also for computed cepstra!
- Convert liftered cepstrum back to the frequency domain and compare
with original magnitude cepstra.
- ATTENTION! If you observe complex values for magnitude spectrum after recostruction from liftered cepstrum, check the values of imaginary part. If the imaginary part is significantly smaller than real part (i.e. smaller by tens of orders), imaginary part can be omitted. However, if the imaginary part is smaller just by several orders, moreover, if it is comparable to real part, it is a consequence of bad liftering (i.e. the symmetry of real cepstrum was not kept) and it is necessary to check used lifter mask!
- Result:
Draw and observe:
- computed cepstra of attenuated cosine without reflection and with reflection,
- draw the cepstrum after an application of lowquefrency (short-time)
lifter, i.e. after removing (zeroing) of high cepstral coeffcients,
- draw magnitude spectrum of liftered signal (i.e. after a
cancellation of reflection) and compare it with magnitude spectrum
of orginal signal without reflection.
- Repeat with an application of high-quefrency lifter and observe magnitude spectrum of periodic component.
- To aprove correctness of your computation, use also the
function rceps.
- Real cepstrum of speech signal and some applications.
- Repeat the separation of periodic and apperiodic component for
speech signal. Observe cepstrum and spectrum of aperiodic
component (i.e. smoothed spectrum, frequency repsonse
approximation of generation filter)
and periodic component (i.e. excitation - periodic pulse
excitation or noise excitation respectively).
NOTE. All following signals are binary, 16 bit PCM-raw files
without any header, sampling frequency is 16 kHz, to load the data
into MATLAB use the function loadbin.m.
- voiced speech frame (quasiperiodic signal):
vm0.bin,
vm5.bin,
vf5.bin
- unvoiced speech frame (aperiodic signal):
um5.bin,
uf5.bin
- Result:
observe for last part of signal
vm0.bin with the length wlen=500
(i.e. 500 samples from the end of the signal):
- waveform and logarithmic magnitude spectrum (use Hamming window
for the weighting of analyzed frame to minimize effect of spectral leackage),
- compute real cepstrum and separate aperiodic and periodic
component in cepstral domain - the boundary between low-quefrency and high-quefrency lifter
should be nc=16 (try also 10 or 30),
- after the inverse conversion into frequncy domain draw and observe
logarithmic magnitude spectrum of aperiodic component after an
applicaton of low-quefrency lifter into the same figure with
logarithmic short-time magnitude spectrum computed by DFT from the signal,
- observe also logarithmic spectrum of periodic component
(i.e. after an application of high-quefrency lifter).
OPTIONAL PART
- Complex cepstrum.
- Try to solve the example with attenuated cosine wave with a
reflection up to the back conversion into the time domain using the information about the phase of the signal.
- Solve this task using complex cepstrum, and aprove the achieved
result also by using the function cceps and compared this
solution with previous one using the real cepstrum and phase of
distorted signal.