1
Due Wednesday 10 April at 4:30p
ECE 438Assignment No. 9Spring 2019
1.This is a continuation of Problems 4 and 5 on Homework No. 6. From your solution to these problems, you know the parameters for a 2-level quantizer that minimize the mean-squared quantization error
,(1-1)
for a random signal with first order probability density function given by Eq. (4-1) (See statement for Problem 4 on Homework No. 6.) But you still don’t know what is the actual mean-squared error yielded by that quantizer. This can be a messier computation than that of determining the optimal quantizer itself. There are at least three ways to do it: (1) Directly evaluate Eq. (1-1) above possibly by using a symbolic equation solver. (2) Numerically perform the integral in Eq. (1-1), by approximating the integral as a summation. (3) Generate a sequence of sample values that obey the density function given by Eq. (4-1) for a suitably large value of , quantize each one according to Eq. (4-2) (from statement for Problem 4 on Homework 6), and compute the mean squared quantization error. This latter procedure is known as Monte Carlo simulation; and it is the approach that you will use to solve this problem.
Matlab provides functions to generate random samples from several different distribution functions, but not the random variable given by Eq. (4-1). To get samples of this random variable, assume that is a random variable uniformly distributed on the interval . It is possible determine a function such that the random variable has density function given by Eq. (4-1). You can then use the Matlab function that generates samples of a random variable uniformly distributed on to generate .
a.Following the approach discussed in the supplementary document “Generating Random Variables with Arbitrary Distributions,” which may be downloaded from the ECE 438 course website in the folder titled “Supplementary Materials”, determine a function such that the random variable has density function given by Eq. (4-1). Sketch , , and .
b.Using the approach discussed above, generate 50 samples of the random variable with density function given by Eq. (4-1). Use the Matlab hist function to plot the density of your data. On the same axes, plot the target density function given by Eq. (3-1). Also, generate plots for 500, 5,000, and 50,000 data points, and comment on the effect of increasing the number of data points.
c.Quantize each of the 50,000 samples of using the uniform quantizer given by Eq. (4-2) with, and compute an estimate of the root-mean-squared error for this quantizer.
d.Quantize each of the 50,000 samples of using the quantizer given by Eq. (4-2) with the optimal values for , , and that you determined in Homework 6, Problem 5, and compute an estimate of the root-mean-squared error for this quantizer. Compare your answer with the root-mean-squared error for the uniform quantizer that you determined in part (c).
2.Suppose we wish to approximate the waveform over the interval by the function.
a.Find the values for the coefficients that minimize
.
b.Use Matlab to plot and on the same axes.
c.Compute the mean-squared error for .
3.Professor Allebach’s office hours have been known to fluctuate in a random manner. On the past three days, they started at 14:00, 15:30 and 16:30 hours (24 hour clock). To determine when to show up today, you decide to use the following model:
,
where denotes the day, is the estimated time in hours when office hours start on day D, and , are constants.
a.Determine the values for the constants and that minimize the mean-squared error between the data and this model:
.
Here denotes the data, i.e. , , and .
- Based on this model, when should you show up for office hours today ()?
4.Show that if the predictor coefficients for LPC satisfy
then the prediction error simplifies to
Here the subscript denotes the center of the frame of data on which the estimation of the prediction coefficients is based.