Upload
talkanat1
View
221
Download
0
Embed Size (px)
Citation preview
8/10/2019 Preproject Report Ee430 1740455
http://slidepdf.com/reader/full/preproject-report-ee430-1740455 1/9
DEPARTMENT OF ELECTRICAL AND ELECTRONICS
ENGINEERING
EE430 DIGITAL SIGNAL PROCESSING COURSE
FALL 2014
PRE-PROJECT REPORT
PREPARED BY:
TUNÇ ALKANAT
1740455
8/10/2019 Preproject Report Ee430 1740455
http://slidepdf.com/reader/full/preproject-report-ee430-1740455 2/9
General Overview
The pre-project was to write a MATLAB function that demonstrates the spectrogram of a signal.
Such an application can be used to determine the frequency components included in a signalthroughout the time.
The spectrogram works as follows: The input signal is used along with a window function.
Window function is of finite length and its duration is generally preferred to be much smaller than the
duration of the input signal. The spectrogram is obtained by taking FFT of the input signal multiplied by
the window function for various delays on the window sequence. Same amount of delay on the window
function is used for each time step of the spectrogram and the procedure is applied as long as the input
sequence is available. Using spectrogram, it is possible to obtain real-time frequency domain
information about the signal; it is possible to generate spectrogram of a signal with a delay equal to the
window signal duration. The spectrogram is useful for visualizing the frequency components of a signal.
Function InputsFunction written to satisfy the requirements of the pre-project includes 5 inputs:
1) Input signal: Input signal whose frequency components will be analyzed.
2) Window size: Duration of the signal to be used as the window sequence.
3) Window type: The window sequence may be of shape different than a pulse. Such window
functions are useful to emphasize some samples of the input signal for each step while
constructing the spectrogram. The proposed function includes a selection of seven different
window functions.
4) Window shift: In samples. Amount of the delay on window function for each time step.
5) Fs: Sampling frequency. Sampling frequency of the input signal. Is used to plot the output in
seconds.
Function Output
No explicit output of the spectrogram is presented to the user, yet, the spectrogram is plotted
upon usage of the function. The output is a 3D surface, where x-axis is the time in seconds, y-axis is the
frequency in hertz and the ‘amount’ of each frequency is represented by the z -axis. By fixing the point of
view at 0 to 90 degrees, the function outputs the spectrogram as a topological map. Also note that it is
possible to obtain the raw data of spectrogram too.
8/10/2019 Preproject Report Ee430 1740455
http://slidepdf.com/reader/full/preproject-report-ee430-1740455 3/9
Effects of Inputs
Window size
The window size determines the number of FFTs to be taken if all other parameters are fixed. For
the extreme case, if the window size is equal to the input signal duration, only one FFT will be computed
and thus the resolution of the spectrogram output will be 1 in x-axis, the time. Thus the window size
effects the resolution of the spectrogram in x-axis. The span of the window function also affects the
frequency resolution of the spectrogram. Also with increasing window size, the spectrogram will be
constructed considering the frequencies included in a wider sub-signal of the input thus resulting
decreased localization. In other words, by decreasing the window size, it is possible to obtain a
spectrogram that shows the frequency components of a smaller region of the input signal, a more
localized region. Below figures demonstrate the effect.
The input sequence: Generated using,
T = 0:0.001:2;
X = chirp(T,100,1,200,'q');
8/10/2019 Preproject Report Ee430 1740455
http://slidepdf.com/reader/full/preproject-report-ee430-1740455 4/9
8/10/2019 Preproject Report Ee430 1740455
http://slidepdf.com/reader/full/preproject-report-ee430-1740455 5/9
8/10/2019 Preproject Report Ee430 1740455
http://slidepdf.com/reader/full/preproject-report-ee430-1740455 6/9
Window Type
The proposed function offers 7 different window types: Hamming, Hanning, Tukey, Triangular,
Gaussian, Blackman and Kaiser windows. The window type determines how the spectrogram will be
constructed since the values of the delayed window function will be multiplied by the value of the
input signal thus changing the values for input samples. The offered window types are intended to
be inputted as strings and the available window types are also included in the help section for the
proposed function.
Window shift
Window shift is the amount of delay on the window sequence for each time step. For example
for the first step, the window sequence starts at sample 0 and for the second it starts at sample
windowShift, for the third 2*windowShift and so on. Window shift affects the time resolution of the
spectrogram. Intuitively, it is easy to decide that the resolution and thus the number of FFTs to be
taken will be increased for decreased window shift since with a smaller window shift, it is expected
for the window function to take more time to ‘travel’ through the input signal. Below, there are
some results of the function for different window shift values.
8/10/2019 Preproject Report Ee430 1740455
http://slidepdf.com/reader/full/preproject-report-ee430-1740455 7/9
8/10/2019 Preproject Report Ee430 1740455
http://slidepdf.com/reader/full/preproject-report-ee430-1740455 8/9
8/10/2019 Preproject Report Ee430 1740455
http://slidepdf.com/reader/full/preproject-report-ee430-1740455 9/9