How to use Simulink to realize Cross-correlation?

Discussion in 'Programmer's Corner' started by littlehead, Apr 23, 2008.

  1. littlehead

    Thread Starter New Member

    Apr 22, 2008
    1
    0
    Hi,

    I am a starter with Simulink.
    And I'm now trying to use it to simulate the cross correlation of two sine waves that have the same frequency, but different phases and amplitudes.
    I did FFT to both signals and multiplied them with each other. The product was IFFTed to get the cross correlation of the two signals. But I didn't get the right figure as expected.
    The attached file is my model.
    Please help!!

    Thanks!

    Littlehead
     
  2. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    144
    Your problem is that you have used a cross-product block as opposed to a cross-correlation block.

    Replace the cross-product block with the correlation block CORR as part of the Signal Processing Blockset - Go to Matlab Help and search for "correlation" (without the quotes) for usage.

    Dave
     
Loading...