### AE2M99CZS seminars - Digital filtering in frequency domain Cyclic convolution - OLS, OLA.

• Linear convolution
• Create the first sequence representing the impulse response h[n] of moving-average (MA) filter of the order N=100, i.e. the length of resulting impulse response should be N1=101 samples.
• Create the second sequence of the length N2=4000 which represents the input signal x[n] containing the addition of sinusoid with zeros phase shift and parameters A = 1, f = 12 Hz, fs = 8000 Hz and white noise with normal distribution, mean value 0 and variance equal to 1.
• Realize the suppression of white noise on the basis of the linear convolution (fcn conv) using the above mentioned MA filter.
• Checked result: (1 point) Display
• subplot(311) - created impulse response h[n] of MA filter (stem),
• subplot(312) - generated input signal x[n] (plot),
• subplot(313) - filtered output signal y[n], i.e. the result of linear convolution of signals x[n] and h[n] (plot).

• IN THE FREE TIME or as HOMEWORK:
Repeat steps mentioned above using the filter with exponential averaging with the impulse response of the length N1=101 samples, described by the formula h[n] = 0.02 * 0.98^n. Discuss also a possibility of realization such a filtering by IIR filter.

• Cyclic convolution
• Compute cyclic convolution between sequences x[n] and h[n] using DFT of the order:
- NDFT = N1,
- NDFT = N2,
- NDFT = N1+N2-1
- NDFT > N1+N2-1.
• Compare obtained results for linear and cyclic convolution in one figure and explain differences.

• Realization of cyclic convolution for long signals (on-line processing)
• Realize the filtering on the basis of cyclic convolution using independent processing in particular short-time frames of the length NFFT = 512 samples. Realize the segmentation without overlapping and compare results obtained by linear and cyclic convolution.

• Realize the filtering based on cyclic convolution in short-time frames using the OLS technique (Overlap-And-Save). Choose FFT order NFFT = 512 samples and compare the results obtained by linear convolution and OLS-based cyclic one.
• Result:
• Display and compare output signals computed on the basis of linear and OLS-based cyclic convolution.

• Realize the filtering based on cyclic convolution in short-time frames using the OLA technique (Overlap-And-Add). Choose agian FFT order NFFT = 512 samples and compare the results obtained by linear convolution and OLA-based cyclic one.
• Result:
• Display and compare output signals computed on the basis of linear and OLA-based cyclic convolution.

• On the basis of OLA-based cyclic convolution realize the filtering which models a signal recorded in the room with higher reverberations. Below linked wav-signals can be loaded into MATLAB environment using the function audioread, for the purpose of further listening, save during the loading laso the information about samling frequency.
• Checked result: (1 point)
• For measured impulse response ir_iim03.wav (possibly shortened) and input signal guitar_dry.wav display a compare modelled reverberated signals computed on the basis of:
- linear convolution,
- short-time cyclic convolution using OLA technique,
- short-time cyclic convolution without overlapping.
• Compare also the computer time needed for the computation of linear and cyclic convolution (OLA-based).
• Compare input and output signals by informal listening.

• Repeat the processing also for the following signals:
- impulse responses: ir_iim01.wav, ir_iim02.wav, ir_betlem.wav,
- processed signal: voice_dry.wav