Plot separate correlation functions of white noise data

Assignment Help MATLAB Programming
Reference no: EM131112200

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

Reference no: EM131112200

Questions Cloud

Calculate the magnitude of the deadweight loss resulting : Two hundred paper mills compete in the paper market. The total cost of production (in dollars) for each mill is given by the formula TC = 500Qmill+ (Qmill)2 where Qmill indicates the mills annual production in thousands of tons. The marginal cost of ..
Tranching pool of assets reduces default risk of the pool : Fannie Mae performed the useful function of increasing the liquidity of the secondary market of mortgage loans. Putting different mortgage loans in a pool for selling is always bad for the economy. The asset in an asset backed security is often a fix..
Take credit for good economic performance : Presidents like to take credit for good economic performance. If there are lags in policies, explain why presidents may not deserve all the credits (or blame) for economic policies.
Create a basic i-o (input/output) library of subroutines : For this lab, you will create a Basic I/O (input/output) Library of subroutines. There are 7 subroutines in this library, 4 of which you must write. The lowest level routines have been provided for you and are in the file BasicIO.asm. They are:
Plot separate correlation functions of white noise data : 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?
Voltage boost : Assume that the machine is excited with a stator voltage amplitude that is directly proportional to the excitation frequency so that V1 = 13 pu. Consider three excitation frequencies we =13 = 1.0, 0.5, and 0.1 pu. Determine the maximum torque Tmax, t..
Possible relationships between business and government : Luo (2001, 2004) suggests 4 possible relationships between business and government. Use this model to discuss the relationship between Singapore Airlines and the Singapore Government.
A major source of noise and vibration in vehicles : You are to write an article not exceeding 3000 words entitled “Powertrain – a major source of noise and vibration in vehicles”.   You will want to cover the basic sources of dynamic forces in engines and their ancillaries: mechanical, combustion, and..
Turning point for the effect of labour market experience : Calculate and interpret the turning point for the effect of labour market experience on the log of the wage. Test whether an individual's ethnicity has a significant effect on their wage.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Compute the power spectral density vector

Compute the power spectral density vector. Plot the spectrogram using the same parameters as in lecture.

  Write a program that generates three random numbers

Write a program that generates three random numbers, each between 0 and 9. The three numbers are displayed and the message "You got Lucky Fours" will be displayed if at least two of the digits are 4.

  Simulate using matlab a casino style game

Your assignment requires you to simulate, using Matlab, a casino style game of chance. In theory these games are completely governed by the rules of probability and should be able to be simulated by the use of random number generators

  Convert each numeric value in the vector days

Write a function dayName that has one input argument, day, containing the numerical value of a day in the month of November, 2014.

  Find the answer through binomial distribution

The probability to get 3 times of "5" in 8 throws of a fair die is ? Using Binomial Distribution, and Using Matlab to simulate it.

  Write a matlab function that takes a matrix

Write a MATLAB function that takes a matrix, a row number and a column number. Beginning with the row number passed to the function, scan down the column passed to the function and return the row number that contains the largest absolute value in ..

  Write a program to test three edge detection algorithms

Write a program to test three edge detection algorithms (available in Matlab ) and one feature extraction algorithm (Harris). Students should try different parameters (if appropriate) and find the code that gives the best result for each image

  What is the minimum snr for a sinusoid in white noise

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? Compute and plot separate correlation functions of white noise data and of ..

  Compute the absolute relative errors

Check whether system has no solution, infinite number of solutions or ill-conditions. Perform this checking from the coefficient and constant matrices.

  Prepare a project for signal and system

Prepare a project for signal and system course: do the Implementation of an AM, FM and PM Transmitter and Receiver using MATLAB. The project deliverables must include all your MATLAB codes.

  Matlab command that will create a ten-element column vector

MatLab command that will create a ten-element column vector named

  Find the potential energy stored in each spring

The potential energy stored in a spring is kx2/2, where k is the spring constant and x is the compression in the spring. The force required to compress the spring is kx. The following table gives the data for five springs:

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd