### AE2M99CZS exercise - Spectral Characteristics of Random and Non-stationary Signals

• Create modeled signals for the purposes of further spectral analysis:
• s1 - 2 sinusoids of different frequencies, fs=200 Hz, tmax=20 s; f1=14 Hz, A1=0.5 , f2=27.5 Hz, A2=0.4
• b1 - white noise with Gaussian distribution (fs=200 Hz, tmax=20 s)
• b2 - white noise with uniform distribution (fs=200 Hz, tmax=20 s)
• 1st checked result:
x1 - mixture of sinusoid s1 and white noise b1 with target SNR= -3 dB.
• Create required mixture and display the first two short-time frames with the length of 512 samples.

• Smoothed estimation of Power Spectral Density (PSD) using Welch method (fcn pwelch) for the signal x1. Observe exactly:
• power spectrum in dBs for 2 different short-time frames of the length 512 samples (copute directly using fcn fft and use rectangular weighting window),
• smoothed estimation of PSD computed form the whole signal (fcn pwelch), use again rectangular weighting window,
• non-smoothed estimation of PSD computed from the one frame only using function pwelch, use again rectangular weighting window,
• repeat the previous steps with the usage of Hamming weighting window.
• 2nd checked result:
• draw into one figure the obve mentioned 3 spectral estimations for modelled signal x1,
• draw into one figure the obve mentioned 3 spectral estimations for real EEG signal e1, see e1.mat (fs = 200 Hz, binary MATLAB mat-file, to load the signal into MATLAB environment use fcn load)

• Spectrogram of stationary and non-stationary signals
• draw spectrogram of modelled signal x1 (fce spectrogram) and observe the influence on particular optional input parameters for the spectrogram computation,
• observe mainly varying time-frequency resolution for various short-time frame lengths (use 512, 256, 128, 64 or 512, 1024, 2048, 4096 samples respectively),
• set the correct display of frequency at vertical y-axis,
• set the number of ponts for FFT for shorter frames and observe differences when zeros are padded or not for the DFT computation ,
• observe the influence on used weighting window: rectwin (rectangular), bartlett (triangular), hann (Hann), blackman (Blackmanovo - sharper one)
• repeat with the optimum setup for signals s1, b1, b2 and e1.

• Analyze spectral characteristics of non-stationary speech signal r1 saved in the file sm2.bin, which contains the utterance "1 0 6 4 7" (male speaker) sampled by fs = 16 kHz. (Binary speech signals can be loaded by function loadbin.m)
• 3rd checked result:
• Display the spectrograms for the following three sort-time-analysis frame lengths : 32 ms, 4 ms, 256 ms (use the default 50% frame overlapping and Hamming weighting window) and observe varying time-frequency resolution in spectrogram
• Compare the spectrogram of signal r1 and long-time smoothed estimation of PSD (using fcn pwelch), both for optimum frame length of 32 ms. Explain why smoothed PSD estimation is not suitable charactersitics ofr such a signal.

• In the case of free time, observe aso spectrogram for signals sf2.bin - (Czech utterance "1 0 6 4 7" - female), sm1.bin - (Czech utterance "Mobilní hlasová shránka" - male - rain in the background), sf1.bin - (Czech utterance "Mobilní hlasová shránka" - female)

• Confidence intervals for PSD estimation
• Display smoothed PSD estimation for the signal x1, compute:
a) for previously created signal with SNR=-3 dB,
b) for modified mixture with SNR=-10 dB,
c) for modified mixture with SNR=40 dB,
• 4th checked result:
• Display smoothed PSD estimation and confidence intervals for the significance level of 98% for above mentioned 3 variants of signal x1, i.e. a mixtures of sinusionds and white noise with SNR=-3, -10 and 20 dB.
• Explain the reliability of PSD estimations for mentioned particular signals.

IN FREE TIME or as a HOMEWORK

• Observe 3-dimensional spectrograms for above analyzed signals, see help of surf or spectrogram.