Digital Signal Processing 1
Lab course Winter Term
Assignment 1
1. FastFourierTransformation–FFT
- ▪ Create a discrete sine signal with a frequency of 1Hz. Keep the sampling frequency and vector length variable.
- ▪ Plot the signal vector in time domain. ▪ MATLABcommand:plot
- ▪ Transfer the signal vector to the frequency domain and plot the result vector. ▪ MATLABcommand:fft
- ▪ Hint: For better comparison of different plots use a single figure with various plots. ▪ MATLAB command: subplot
2. Single-sided linear spectrum – LS
- ▪ Adapt the frequency domain vector plot in order to comply with the frequency and magnitude criteria.
- ▪ Change the frequency of the initial sine signal from 1Hz to 1.05Hz.
▪ Which differences can be seen in the time and frequency domain plots? ▪ What effect emerges and how can it be minimized?
▪ Which purpose fulfill window functions in conjunction with the FFT? - ▪ Create a discrete third order harmonic sine signal with the fundamental frequency f and the first two overtones 2f and 3f.
- ▪ Plot the signal in time and frequency domain.
- ▪ Use different window functions for the harmonic signal and plot the various
results in the time and frequency domain.
- ▪ Discuss the differences.
3. PowerSpectralDensity-PSD
- ▪ Revise the fundamental mathematics for the power spectral density.
- ▪ How does the linear spectrum plot have to be modified to get the power spectral density
plot?
Applied Image & Signal Processing
Informationstechnik & System-Management 1/ 2 Salzburg University of Applied Sciences
Digital Signal Processing 1
Lab course Winter Term
Home Assignment: Spectral Density Estimation
- ▪ Prerequisites
- ▪ Make yourself familiar with MATLAB scripts and functions.
- ▪ Do an academic research on the spectral density estimation methods of Bartlett,
M.S. and Welch, P.D.
- ▪ Be sure to know the differences between those two approaches.
- ▪ Implement your own Welch method based MATLAB function.
- ▪ Name the corresponding MATLAB script mywelch.m
- ▪ Functionsignature[pxx]=mywelch(x)
▪ x – Input vector (time-domain, e.g. audio signal) [double]
▪ pxx – Output vector (spectral density estimation) [double]
- ▪ Use the following header:
% Date : <yyyy-mm-dd>
% Author: <Firstname Lastname>
% Course: AISE-M DSP1
% Algorithm based on following literature:
% <Name all references for your work. Use IEEE or APA citation style>
% <e.g.> Welch, P. D. (1967). The use of fast Fourier transform for the estimation of power spectra: A method based on time averaging over short, modified periodograms. IEEE Transactions on audio and electroacoustics, 15(2), 70-73.
- ▪ Compare your implementation with the following MATLAB function: ▪ pwelch [Signal Processing Toolbox]
- ▪ Write a test script testwelch.m, which generates or loads an appropriate time- domain signal. It should plot the power spectral density of the result vectors from mywelch and pwelch as a side-by-side comparison. Be sure to use correct axis labeling and plot titles.
▪ x-axis: Frequency scale (Hz)
▪ y-axis: Power spectral density (dB/Hz) - ▪ MATLAB files must have a header. Plots should be labeled and must have axis labeling.
- ▪ Required upload
▪ testwelch.m ▪ mywelch.m
Applied Image & Signal Processing Informationstechnik & System-Management Salzburg University of Applied Sciences
2/ 2