Assignment 12: Power Spectral Densities Probability Theory and Stochastic Processes The method by which you arrive at an answer is as important as the answer itself. Therefore, a portion of your grade...

1 answer below »
Please use Spec.mat from this link to complete this Matlab assignmenthttp://www.fileconvoy.com/dfl.php?id=g265b84ecf8f864751000342277a5d96eae61bbc5e5


Assignment 12: Power Spectral Densities Probability Theory and Stochastic Processes The method by which you arrive at an answer is as important as the answer itself. Therefore, a portion of your grade for the homework is based on showing your work. It is not sufficient to simply provide the answer. Further, if you make an assumption, clearly state it. Problem 1 (10 points) Sample data is provided for this assignment in the file called spec.mat It contains a MATLAB matrix dimensioned 8 by 512. The sampling period and frequency are also given but do not consider these. Using the Direct Method as outline in the code in Part 5 of this module, find the PSD of each row of this matrix (a process realization), and then average all 8 together. Do this individually and collaborate on the right answers to the following questions: 1. Do you see any spectral tone(s) in the resulting spectrum (don’t worry about actual frequencies) 2. There is additive noise to a small signal in this case. Can you say anything about the nature of this noise? Use the MATLAB function fftshift.m on each estimated PSD. This interchanges the left and right sides of the PSDs. This is needed because FFTs return positive frequencies followed by negative ones. This is not suitable for plotting or labeling the frequency axis. If the sampling frequency is 40 kHz, then how would you label the frequency axis? • Provide a plot of your composite (averaged) and individual PSD • Describe what tones you can observe in the single and composite PSDs plotted • Provide your source code Problem 2 (10 points) Repeat Problem 1 but using the indirect method and the Wiener-Khinchine Theorem. Use the MATLAB function “xcorr.m” with the ‘unbiased’ option, e.g., x=spec(1,:); % Get first row of signal matrix rxx=xcorr(x,’unbiased’); Also window the resulting autocorrelation which will have length 1023 by taking the approximate center: rxx=rxx(512-256 : 512+256); Answer the question as to why a window should be used. Next, apply the W-K Theorem: Sxx=fftshift(fft(rxx)); Finally since rxx is not quite symmetric (off by one sample), one needs to find the complex modulus to fold imaginary power to real-valued: Sxx=abs(Sxx); Now look at these individually and then average all 8 signals PSDs together like problem 1. • Provide a plot of your composite (averaged) and individual PSD • Describe what tones you can observe in the single and composite PSDs plotted • Provide your source code Problem 3 (10 points) Use the power spectral density P(n∆f), generate stochastic processes s(mT) having this energy distribution where T is the sampling period and M the desired number of signal samples in time. This is easily done through the following equation ( ) 1 1 1 1( ) * (0) *2 ( ) cos 2* * * * * ; 0,1,..., 1 N n n s mT P P n f pi n f m T f m M M M φ − = = + ∆ ∆ + ∆ = −∑ where each φi is drawn from φi ~U[0,2π]. The square root is necessary to transform from “power” to “voltage.” The factor of one half takes into consideration that power spectra of real signals are symmetric in frequency and only positive frequencies are used in this formulation. Multiplication by the sampling period T scales the power to the correct level. Keep in mind that computers don’t know absolute time and frequency. Therefore, example P(n∆f) is the nth PSD value in a vector. Like the cosine about is the mth element of a vector of length M. Labeling frequency axes and time axes requires your consideration and DSP expertise. The amplitude of synthesized signals may differ from original ones provided, but their characteristics should look the same. • Provide plots of the signals that you synthesize. • Comment on their similarity or difference from the provided signals • Provide your source code Assignment 12: Power Spectral Densities Probability Theory and Stochastic Processes Problem 1 (10 points) Problem 2 (10 points) Problem 3 (10 points)
Answered 1 days AfterApr 18, 2021

Answer To: Assignment 12: Power Spectral Densities Probability Theory and Stochastic Processes The method by...

Kshitij answered on Apr 20 2021
126 Votes
grey22/part11.m
% PSD plot of first individual signal
load('spec-xid31icz-tulise01.mat')
Fs = 40e
3;
t = 0:1/Fs:2.96;
x=S(1,:); %
nfft = 2^nextpow2(length(x));
Pxx = abs(fftshift(x,nfft)).^2/length(x)/Fs;
Hpsd = dspdata.psd(Pxx(1:length(Pxx)/2),'Fs',Fs);
figure
plot(x)
xlabel('time')
ylabel('Amplitude')
title('first individual signal in Time domain ')
figure
plot(Hpsd)
%%
%% PSD plot of composite (averaged)
X=(S(1,:)+S(2,:)+S(3,:)+S(4,:)+S(5,:)+S(6,:)+S(7,:)+S(8,:))/8;
nfft1 = 2^nextpow2(length(X));
Pxx1 = abs(fftshift(X,nfft1)).^2/length(X)/Fs;
Hpsd1 = dspdata.psd(Pxx1(1:length(Pxx1)/2),'Fs',Fs);
figure
plot(X)
xlabel('time')
ylabel('Amplitude')
title('composite (averaged) a signal in Time domain ')
figure
plot(Hpsd1)
%%
grey22/part2.m
load('spec-xid31icz-tulise01.mat')
% PSD plot of first...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here