Programming Homework Help

CMPE 320 Montgomery College Autocorrelation on Random Processes Matlab Project Report

 

1INTRODUCTION


This project investigates the autocorrelation of a random signal. You will use the techniques of simulation you have developed in previous projects, plus apply the built-in MATLAB function xcorr. Because this analysis is fairly complicated, I’ve created a detailed skeleton of a MATLAB script to guide you.

1.1 Due Date

1.2 Background

A random process, , is defined as a collection of time functions governed by one or more random variables. Specific random time functions within the collection are called sample functions of the random process. For each instant in time, is itself a random variable which can take on different values at each value of and across all the sample functions . Because the collection of all of the values, across the collection of sample functions represent the values of a random variable, it is meaningful to speak of the pdf of the random variable at a specific instant in time. Mathematically, this pdf may change at every instant in time. As with random variables, it is meaningful to speak of the joint pdf, , and, in fact of this joint pdf for any collection of times, ,namely, . A random process for whom joint probability density remains the same no matter what the value of , and no matter what the specific choice of the times, is called strict sense stationary. Knowing this full joint pdf is difficult; we usually assume that we know only the second order joint pdf, that is, for any valid choice of With this knowledge, we can define a process as Wide Sense Stationary (WSS) if the following two conditions hold. (1.1) X(t) X(t 0 ) t 0 x(t 0 ) x1(t 0 ), x2 (t 0 { ),… } x1(t), x2 { (t),…} f X (t 0 ) (x(t 0 )) f X (t 0 ) X (t 1 ) x(t 0 ), x(t 1 ( )) t 0 ,t 1,t 2 ,…t { N } f X (t 0 ) X (t 1 )…X (t N ) x(t 0 ), x(t 1),…, x(tN ( )) N f X (t 1 ) X (t 2 ) x(t 1), x(t 2 ( )) t 1 and t 2. E X(t 0 ⎡ ) ⎣ ⎤ ⎦ = C (a constant) for all t 0 RXX (t 1,t 2 ) = RXX (t 1,t 1 +τ ) = RXX (t 1 +τ ,t 2 ) = E X(t 1)X(t 2 ⎡ ) ⎣ ⎤ ⎦ = RXX (τ ) 2 The function is called the autocorrelation function. The second condition of equation (1.1), states that the autocorrelation function of a WSS process is a function of only the time difference and not of the specific times . This project provides some experience with the autocorrelation function. It is important to note that the expected value shown in equation (1.1) is not a time average. Remembering that at every instant the random process is a random variable with an associated pdf the expected value in equation (1.1) is given by (1.2) It is not a time integral at all, but a true expected value evaluated at one instant in time. Equation (1.1) says that for a WSS process, this expected value is a constant. Similarly, given the joint pdf and the two time instants, , the second order expected value (1.3) This, too, is not a time integral, but a second order statistical expected value. Finally, a very important special case of random processes do have the property that a very long term time average of the random process gives the same numeric value as the statistical expected value. In this case the time average, which we write is equal to the expected value, . Such random processes are called ergodic. By the nature of the random number generators used in MATLAB, random sequences generated in MATLAB (and most other programs, too) possess this property, unless they are specifically modified by the user. All of the examples we have used in previous projects are ergodic. Given the assumption of ergodicity, MATLAB uses a time averaging method to estimate the statistical autocorrelation process. The MATLAB function that does this is xcorr. Because the sequences are not (and cannot be) infinitely long, however, use of xcorr is only an approximation, and produces an autocorrelation waveform, , that is, itself a random process. Let’s see how this works! 2 PROJECT TASKS Perform the following tasks, document your results and submit them in written form in accordance with the instructions in Section 3, below. You may use this document as a format. RXX (t 1,t 2 ) = E X(t 1)X(t 2 ⎡ ) ⎣ ⎤ ⎦ t 2 − t 1 t 1 and t 2 t 0 X(t 0 ) E[X(t 0 )] = x(t 0 ) f X (t 0 ) (x(t 0 ))dx(t 0 ) −∞ ∞ ∫ t 1 and t 2 RXX (t 1,t 2 ) = x(t 1)x(t 2 ) f X (t 1 ) X (t 2 ) (x(t 1), x(t 2 ))dx(t 1)dx(t 2 ) = RXX (t 2 − t 1)