### AE2M99CZS Exercise - Discrete Fourier Transform (DFT) Basic properties of periodogram and application examples

Tasks to do:

• DFT - periodogram, spectral leackage
• Generate sinosoid with parameters f=1000 Hz, fs=8000 Hz, to=0.1 s (duration).
• Choose the short-time frame with the length of N=512 samples and compute its periodogram using DFT (fcn fft). Describe correctly scale on frequency axis in Hertz and observe various way of results displaing (i.e. use fcn plot with varoius parameters or fcn stem).
• Observe also the periodogram for frame length of N=512, 510, 508 samples and N=512, 515, 520 samples. Explain observed results for varying frame length.
• Repeat poit above for sinosoid with parameters f=1231 Hz, fs=8000 Hz, to=0.1 s (duration) for frame length of N=512, 510, 508 samples. Explain a difference in comparison to the previous case of the sinusoid with f=1000 Hz.
• Repeat the same analyses when Hamming window is used for short-time frame weighting (fcn hamming).

• Observe short-time DFT spectrum of speech signal.
• 1st checked result: Read the part of voiced speech sound vm4.bin, which is sampled by fs = 16 kHz and saved in raw binary form without a header. To load it into MATLAB environment use attached function loadbin.m, this function is not part of any standard MATLAB toolbox! You should place it into your working directory! Realize the following analyses for given signal:
• draw short-time power spectrum in dB for the first available frame with the length of N=512 samples,
• compare the spectrum for weighted (Hamming window) and unweighted (rectangular window) short-time frame,
• determine the frequency of the first main peak in spectral envelope,
• compare power spectra computed for the frame lengths of N=64, 128, 256, 512, 1024, 2000 samples.

• In the case of free time, repeat illustratively also for signals: vf0.bin, vm0.bin, vf1.bin, vm1.bin, vf2.bin, vm2.bin, vf3.bin, vm3.bin, vf4.bin, vm4.bin, vf5.bin, vm5.bin, vf6.bin, vm6.bin, vf7.bin, vm7.bin, vf8.bin, vm8.bin, vf9.bin, vm9.bin.

• Zero padding in computation of DFT
• Generate the sinusoid with f = 1231 Hz, fs = 8000 Hz nad the frame length of N=512 samples. Observe periodogram computed by DFT with the order of NDFT = 512, 1024, 2048, 4096, 8192 and explain obtained results.

• Accuracy improvement for the analysis of harmonic components in a record.
• 2nd checked result: Load signals sig1.mat and sig2.mat containing the short records of a mixture of harmonic components with background gaussian white noise. The signals are sampled by fs = 200 Hz and they are saved in MATLAB binary format. Use the fcn load to load the data into MATLAB. Determine for both signals:
• number of harmonic components and their frequencies,
• do it on the basis of DFT spectrum computed from available length of N=40 samples or from the record extended by zeros to the length of N=512 samples.

• Periodicity in Short-Time DFT Spectrum
• bserve periodograms of following signals which contain one, two, three, or four periods of voiced speech sound vm0-1-per.bin, vm0-2-per.bin, vm0-3-per.bin, vm0-4-per.bin. The signals have binary format, to load them into MATLAB use the function loadbin.m. and find shor-time DFT of these signal. Length of the DFT should be always the same as length of analyzed signal.
• Observe the changes in the spectrum of the signal vm0-4-per.bin (with 4 periods) when it is analyzed by DFT of the order
a) 479, 481
b) 470, 490
c) 256, 512
d) 1024
e) 2048
• 3rd checked result: Observe the priodicity in the real signal (part of voiced phone) vm0-real-per.bin and try to estimate fundamental period (and fundamental frequency) of given quasiperiodic signal (voiced speech sound). Compute the periodogram for
a) NFFT = 512
b) NFFT = 4096
• 4th checked result: Observe the spectrum on aperiodic signal (part of unvoiced phone) real-non-per.bin and compare for srovnejte s předchozíprevious variant of periodic signal. Compute the priodogram again for
a) NFFT = 512
b) NFFT = 4096

IN THE CASE OF FREE TIME

• Determine the voice pitch also for other records referenced in the first item of this exercise.

• Determine the pitch of musical instrument tones from last week exercises and compare it with the results achieved using autocorrelation analysis - cembalo_d_dur_2.wav, fletna_d_dur_6.wav, housle_d_dur_5.wav, kytara_d_dur_1.wav, piano_d_dur_4.wav, varhany1_d_dur_3.wav, varhany2_d_dur_8.wav.