Phase-space optics 2: Instantaneous correlation and pseudo-symbolic computation in MATLAB

September 21, 2009

As I noted in the previous post about FiO, I wish to share some of the simulations and basics about phase-space signal analysis. While doing simulations, I sometimes find it tricky to interpret analog equations and convert them to a sequence of programmed operations on discrete data. Also, one needs to be careful about not losing information when going from analog to discrete domain. This all-important step is known as A to D (analog to *discrete*) conversion and is responsible for Nyquist and Shannon being so famous.

I rely on two tools for my modeling needs: MATLAB (TM) most of the time and Mathematica (TM) sometimes. Mathematica is excellent for allowing quick visualization of the model due to its ability to work directly with symbols, whereas MATLAB is good for fast and maintainable implementation. It may be possible to write maintainable code in Mathematica but that requires going through steep learning curve, especially for folks who had learned classic ‘C’ as their first language. Is there a way of marrying symbolic ease of Mathematica with programming ease of MATLAB? I seem to have found one using anonymous functions. The code used in this post has been posted here on MATLAB file-exchange, which will be available within a day after moderation.

Let us consider the problem of calculating instantaneous correlation (which is a primary quantity required to compute and understand the Wigner distribution and Ambiguity function). For a signal {s(x)} it is defined as,

\displaystyle  R_i(x,c) = s(x+c/2) s^*(x-c/2) \ \ \ \ \ (1)

We know that the auto-correlation of a function is defined as {R(c)=\int s(x)s^*(x+c) dx.} Thus, we see that instantaneous correlation is in some sense the quantity which when integrated along {x} gives us the auto-correlation function.

As we shall see in upcoming posts, Wigner distribution is the Fourier transform of the instantaneous correlation (Icorr) along the delay ({c}) dimension, whereas the Ambiguity function is Icorr’s Fourier transform along the normal ({x}) dimension. Therefore, there are two ways of interpreting what the instantaneous correlation is:

  1. {s(x)} is the signal which is shifted by {+c/2} and {-c/2.} The conjugate of the delayed version ({-c/2}) when multiplied with the advanced version ({+c/2}) gives us Icorr.
  2. {s(c)} is the signal which is first dilated to give us {s(c/2).} This dilated signal’s conjugate is flipped to give {s^*(-c/2).} The signal {s(c/2)} is advanced to give {s(x+c/2)} and the {s^*(-c/2)} signal is delayed to give us {s^*(x-c/2).}

As is often the case – hindsight is 20/20. I could write above paragraph so clearly because I have already gone through simulating the problem with two tools. But things should be presented logically and not chronologically, so I explained the model first. Next are the simulations. Read the rest of this entry »