Random processes

Assignment Help MATLAB Programming
Reference no: EM13923022

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: EM13923022

Questions Cloud

Calculate economic order quantity : Cheeseburger and Taco Company purchases 9,497 boxes of cheese each year. It costs $18 to place and ship each order and $8.83 per year for each box held as inventory. The company is using Economic Order Quantity model in placing the orders. Calculate ..
Bank account to cover college expenses over next four years : Beginning three months from now, you want to be able to withdraw $3,700 each quarter from your bank account to cover college expenses over the next four years. Required: If the account pays .77 percent interest per quarter, how much do you need to ha..
What is the future value of the cash flows five years : Consider the following cash flow: Year Cash Flow 2) $22,300 3)$40,300 5) $58,300. Assume an interest rate of 9.1 percent per year. what is the future value of the cash flows five years from now?
What is the effective annual cost of trade credit under term : Pet Store Inc. sells on terms of 2/10, net 50. What is the effective annual cost of trade credit under these terms? Use a 365-day year. Please show formula and explain step by step. I've tried other formulas on here and continue to get the wrong answ..
Random processes : Theme: Random Processes, 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?
Have apollo and rocky breached their directors duties : Have Apollo and Rocky breached their directors' duties? Do Apollo and Rocky have an arguable defence? Have the directors of Citrus Ltd breached their directors' duties (in particular duty to act for good faith in the best interests of the company and..
Condensed balance sheet and income statement data : Condensed balance sheet and income statement data for Jernigan Corporation are presented here. JERNIGAN CORPORATION Balance Sheets December 31 2014 2013 2012 Cash $ 31,390 $ 21,390 $ 19,390 Accounts receivable (net) 51,390 46,390 49,390 Other current..
Coupon bond paying semi annual interest is reported : A coupon bond paying semi annual interest is reported as having an ask price of 126% of its $1,000 par value. If the last interest payment was made one month ago and the coupon rate is 6%, what is the invoice price of the bond?
Three years until maturity and yield to maturity : Find the duration of a 6% coupon bond making annual coupon payments if it has three years until maturity and a yield to maturity of 6.7%. What is the duration if the yield to maturity is 10.7%?

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Write a program to implement this process

A computer cannot store an entire function in its memory. Typically it stores the values of the function at a finite number of points. Pick values of a, b, v, N, and Δt, and write a program to implement this process. Be sure to leave a, b, v, N, an..

  Write a matlab that given a sequence of samples

Write a MATLAB or Octave program that, given a sequence, f[k], of samples in the time domain, calculates a filtered output y[k], given by the formula y[k]=-a_2[k-1]-a_1y[k-2]-a_0y[k-3]+b_3f[k]+b_2f[k-1]+b_1f[k-2]+b_0f[k-3].

  Plot the lines using the inputted vector of x values and x

Write a function named solveSystem that has three inputs: two vectors consisting of coefficients [a b c] of two line equations of the form ax + by = c and a vector of x values.

  Write a function that takes a list of integers

Using ML write a function that takes a list of integers as argument and returns a pair consisting of the sum of the even position and the sum of the odd positions of the list.

  Write a function called matrix summary

Write a function called matrixsummary that takes in one argument, a matrix or a vector, and returns four output values - the sum, mean, max and min of all the values in the matrix or vector.

  Build a simple revolvate robot

Define the robot as Robot.  Use the appropriate functions (i.e. methods) in the Robotics Toolbox - Generate a second pose and re-plot it.

  The function should compute and return

Define a function that takes as input parameters a function handle f, start and end values a and b, and a number of steps n. The function should compute and return the x and y values of the maximum of the function over the range a to b.

  Design an optimal equiripple glp fir filter

Design a filter that meets all specifications, and show your results in support. Comment on the path your design process took, in particular on observations made and actions taken on the basis thereof.

  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:

  The gauss-newton method

Write up your results using our standard format. Show and discuss the results of Steps 1-3 in some detail, including the observed convergence rates of steepest descent versus the Gauss-Newton method

  Finds the value of a using a numerical method

Finds the value of a using a numerical method

  Classify bus types and write out power-flow equation

Classify the bus types and write out the power-flow equations at each bus and write MATLAB code to compute the DC power-flow solution.

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