2
$\begingroup$

I am trying to estimate the Spectral Correlation Function by the FFT Accumulation Method (FAM) in Matlab. The way I understand the FAM method is as this link (see page 6 & 7 for FAM tutorial).

Here is the image again summarizing the process: enter image description here

I'll summarize how I am understanding this method below:

  1. Acquire a data chunk, of size = N data points.
  2. Have the user enter in the desired frequency resolution (d_f), and desired alpha resolution (d_alpha).
  3. From d_f and d_alpha, calculate the following parameters. N' = fs/d_f; fs is sampling frequency of input signal. N' turns out to be the STFT FFT size. L = N'/4, where L is the STFT skip (see diagram in link). P = fs/(L*d_a), which is the smoothing FFT size .. and finally N = P*L, N is the total number of data points we are going to process. N should be nextpow2 > the input size and zero padded if necessary.

I have the code to chunk up the data into segments of N' data points, perform windowing for each of those chunks, compute the FFT of each of those chunks, and perform the downshift to baseband. I store the complex baseband into a matrix called XD. The dimensions of XD are: N' rows X P cols, where each col represents the STFT for a chunk. Then, I perform the following operations:

XD = conj(XD'); % now dim(XD) = P x N'. we do this b/c FFT operates on columns in a matrix in matlab.

The steps I am confused about in the FAM method are the multiplication of X with its complex conjugate, performing the time smoothing w/ the P point FFT, and then outputting the SCF.

To perform the multiplication w/ the complex conjugate, I do the following:

% Np = N' (in code).
XM = zeros(P, Np^2);
for k=1:Np
    for l=1:Np
        XM(:,(k-1)*Np+l) = (XD(:,k).*conj(XD(:,1)));        
    end
end

Essentially this operation is creating a matrix XM with dimensions of P x (N')^2. After this, I do an FFT on XM

XM2 = fft(XM);

Now what do I do? I have to essentially select certain values from XM2 as my SCF estimate, but am confused on how to go about doing this? Each row in XM contains the spectral correlation between different frequency bins. So for example, column 1 of XM contains the spectral correlation of bin1 with bin1, col 2 contains spectral correlation of bin1 with bin2, col N' contains the spectral correlation between bin1 and bin-N', col N'+1 contains the spectral correlation between bin2 and bin1, etc etc... That is the reason that XM has dimensions of P x (N')^2.

I'm confused as to which of these points I need to select in order to create my SCF estimate. I essentially need to figure out which elements of XM correspond to a certain alpha and freq value, but I don't know how to do that.

Thanks in advance, and happy new years!

$\endgroup$
  • $\begingroup$ Try this. He went through the pain of showing each step at the output graphically. $\endgroup$ – h_corey Feb 3 '17 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.