Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask MATLAB Expert

Theme: Random Processes

Note: Look for pr4files.zip and .m files for this project. Functions (write using Matlab)

1. x = singen: generates samples of a real sinusoid and places the result in a vector/array. The user provides amplitude, sampling frequency, sinusoid frequency, phase, and number of samples.

2. x = wgnoise: creates a real vector of white gaussian noise. The user provides the noise variance and number of samples. You can use the Box-Muller function or Matlab's randn() to do this.

3. r = ubcorr(x): computes a vector of unbiased one-sided autocorrelation function (ACF) estimates for the data in x. This is the formula that has a scaling factor of N-k in the denominator, where k is the current offset in samples and N is the total length. You may implement this function using either time-domain techniques or frequency-domain (fast convolution). Note: you may use function xcorr() available from Matlab for this task.

4. r = corr(x): computes a vector of biased one-sided ACF estimates for the data in x. Just like ubcorr(x), except the scaling factor is just N instead of N-k. Note: you may use function xcorr() available from Matlab for this task.

5. psd = perigram(x): computes and plots the periodogram of x. The periodogram is just the magnitude-squared representation of the FFT of x. (In Matlab, you may want to do an fftshift() of the FFT output so you get the expected symmetry about f=0 Hz. You should also divide the FFT output by the length of the FFT since Matlab normally divides during the inverse FFT. This will keep your magnitudes scaled correctly.)

6. psd = blacktuk(x): computes and plots the Blackman-Tukey spectral estimate of x, which is found using the FFT of the biased ACF of x. This is the method based on the Wiener-Khintchine (W-K) Theorem. The same FFT comments as given in #5 also apply here.

7. y = quantize(x,n): Performs n-bit uniform quantization of input vector x. You may use my function quantize.m for this.


You may also use my function plotpsd.m to plot your psd's in dB and normalized frequency axis. Matlab also has a psd() function, but it is set up for windowing which will alter your results.

Problems to solve through the use of simulations:
1. What is the minimum SNR for a sinusoid in white noise to be detectable using frequency domain techniques (Periodogram and Blackman-Tukey)? Do the results depend on frequency?
a. Note 1: SNR = (signal power)/(noise power). The signal power in a sinusoid of amplitude A is A2/2, while the power in AWGN noise is just it's variance. Usually we look at SNR levels in dB format: SNRdB = 10*log10((a^2/2)/var)
b. Note 2: We can find the minimum SNR by setting either the sinusoid amplitude or the noise variance constant and changing the other term until we can no longer distinguish the peak of the sinusoid in the noise. Plot the spectral estimates to perform this analysis. This can and will be a subjective process.

2. Compute and plot separate correlation functions of white noise data and of sinusoidal data. Do this using both the biased and unbiased autocorrelation functions. Are the results what you expected?

3. Study the effects of quantization on an audio signal.
a. Read in the swtheme.wav file using the wavread command in Matlab: [Y,FS,NBITS]=WAVREAD(‘swtheme')If you are not using Matlab, you may read in the ASCII data from file swtheme.dat. Note that this data is quantized to 8 bits.
b. Make an estimate of whether the process represented by this data is Wide Sense Stationary. Justify your estimate.
c. Find the PSD of this data using either the Periodogram or Blackman-Tukey estimator. Is the PSD what you expected based on the ACF you found in part b?
d. Now quantize the data to n=3 bits (8 levels). Based on the bin size reported by the quantize() fn, determine the autocorrelation fn and psd of the quantization process.
e. Plot the psd of the quantized audio data. Based on the psd's of the input audio data and the quantization process, does this plot make sense.
f. [Optional]: Write out the quantized data as a new wave file using wavwrite(), and play the file through Windoze. How does the quality compare to the original 8-bit quantized value? Repeat for other quantization levels if desired.

Please turn in:
1) Source code for your files
2) Results and analysis

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M91869794
  • Price:- $50

Priced at Now at $50, Verified Solution

Have any Question?


Related Questions in MATLAB

Assignment -we have daily gridded rainfall data of 40 years

Assignment - We have daily gridded rainfall data of 40 years and structure of the dataset is like below; Lat = [6.5:0.25:38.5]; Lon = [66.5:0.25:100]; Rainfall (135x129x365x40) (Lon, Lat, days, years). Now, we looking fo ...

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Lab assignment - matlab matrix relationallogical operators

Lab Assignment - MATLAB Matrix, Relational/Logical Operators and Plotting This laboratory exercise/assignment will involve you 1) practicing multiplication operators in MATLAB; 2) practicing relational and logical operat ...

Question - verify the attached paper with matlab and get

Question - Verify the attached paper with matlab and get all the results in the paper and explain step by step the matlab code. Paper - Improving Massive MIMO Belief Propagation Detector with Deep Neural Network. Attachm ...

Prepare a 3 - 10 pages long reportprepare a presentation

Prepare a 3 - 10 pages long report Prepare a presentation with 5 - 9 slides. The slides will include introduction (need and similar work), theoretical background (tested neural networks), Data, Results (Comparison of the ...

Question a safe prime is a prime number that can be written

Question : A safe prime is a prime number that can be written in the form 2p + 1 where p is also a prime number. Write a MATLAB script file that finds and displays all safe primes between 1 and 1000.

Assignmentafter the success of your robo-advice venture you

Assignment After the success of your robo-advice venture you decide to explore alternative sources of profitability for your company. You realize that Australian investors are often forced to chose between expensive acti ...

Assignment details -need to write a code for connecting

Assignment Details - Need to write a code for connecting segments (Lines) a special case of TSP. The problem is to connect lines in 2d/ 3d space with path obstructions. Can you help me write the code for this? Hope you m ...

Assignment matlab programmingusing appropriate matlab

Assignment: MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Suppose that you have used some concept learning algorithm

Suppose that you have used some concept learning algorithm to learn a hypothesis h1 from some training data. You are interested in knowing the accuracy that the hypothesis can be expected to achieve on the underlying pop ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As