<< Chapter < Page Chapter >> Page >

Questions or comments concerning this laboratory should be directedto Prof. Charles A. Bouman, School of Electrical and Computer Engineering, Purdue University, West Lafayette IN 47907;(765) 494-0340; bouman@ecn.purdue.edu

Introduction

In the first and second weeks of this experiment, weintroduced methods of statistically characterizing random processes. The sample autocorrelation and cross correlation are examples of“time domain” characterizations of random signals. In many applications, it can also be useful to get the frequency domaincharacteristics of a random process. Examples include detection of sinusoidal signals in noise, speech recognition and coding, and rangeestimation in radar systems.

In this week, we will introduce methods to estimate the power spectrum of a random signal given a finite number of observations. We will examine the effectiveness of the periodogram for spectrum estimation, and introduce the spectrogram to characterize a nonstationary random processes.

Power spectrum estimation

In this section, you will estimate the power spectrum of a stationary discrete random process.The power spectrum is defined as

S x x ( ω ) = lim N E 1 N n = 0 N - 1 x ( n ) e - j ω n 2

There are 4 steps for calculating a power spectrum:

  1. Select a window of length N and generate a finite sequence x ( 0 ) , x ( 1 ) , , x ( N - 1 ) .
  2. Calculate the DTFT of the windowed sequence x ( n ) , ( n = 0 , 1 , , N - 1 ) , square the magnitude of the DTFT and divide it by the length of the sequence.
  3. Take the expectation with respect to x .
  4. Let the length of the window go to infinity.

In real applications, we can only approximate the power spectrum. Two methods are introduced in this section.They are the periodogram and the averaged periodogram .

Periodogram

Click here for help on the fft command and the random command .

The periodogram is a simple and common method for estimating a power spectrum.Given a finite duration discrete random sequence x ( n ) , ( n = 0 , 1 , , N - 1 ) , the periodogram is defined as

P x x ( ω ) = 1 N X ( ω ) 2 = 1 N n = 0 N - 1 x ( n ) e - j ω n 2

where X ( ω ) is the Discrete Time Fourier Transform (DTFT) of x ( n ) .

The periodogram P x x ( ω ) can be computed using the Discrete Fourier Transformation (DFT), which in turn can beefficiently computed by the Fast Fourier Transformation (FFT). If x ( n ) is of length N , you can compute an N -point DFT.

P x x ( ω k ) = 1 N n = 0 N - 1 x ( n ) e - j ω k n 2
ω k = 2 π k N , k = 0 , 1 , , N - 1

Using [link] and [link] , write a Matlab function called Pgram to calculate the periodogram. The syntax for this function should be

[P,w] = Pgram(x)

where x is a discrete random sequence of length N . The outputs of this command are P , the samples of the periodogram, and w , the corresponding frequencies of the samples. Both P and w should be vectors of length N .

Now, let x be a Gaussian (Normal) random variable with mean 0 and variance 1. Use Matlab function random or randn to generate 1024 i.i.d. samples of x , and denote them as x 0 , x 1 , ..., x 1023 . Then filter the samples of x with the filter whichobeys the following difference equation

y ( n ) = 0 . 9 y ( n - 1 ) + 0 . 3 x ( n ) + 0 . 24 x ( n - 1 ) .

Denote the output of the filter as y 0 , y 1 , , y 1023 .

The samples of x ( n ) and y ( n ) will be used in the following sections. Please save them.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?

Ask