This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WaveVision Blackman-Harris Window Vector

Other Parts Discussed in Thread: ADC12D1600

Hi,

I am working on a MATLAB script for processing captures from an ADC12D1600.  We currently use WaveVision to process the data so ideally my script would return results that are identical to the results in WaveVision.  I found some MATLAB source for WaveVision in the already answered question here:

https://e2e.ti.com/support/data_converters/high_speed_data_converters/f/68/t/526257

This has been extremely helpful as my script is returning identical results for a rectangular window.  I would like to be able to use the Blackman-Harris window for my data but the source code seems to only show the window vectors for rectangular and 4/6/11-term (in windowedDFT.m file).  Could you provide with window vector you used for the Blackman-Harris window?  I have the signal processing toolkit for MATLAB so I can create the window using the blackmanharris(N) function but this gives slightly different results than what WaveVision gives.  I am guess that it is just due to some rounding in accuracy of the window vector.

  • Hi Evan,
    I looked at the WaveVision 5 source and found the following coefficients for the Blackman-Harris Window.

    Ipp64f a0 = 3.58748631706238e-01; // 4-term minimum
    Ipp64f a1 = 2.44144797204338e-01; // Blackman-Harris window
    Ipp64f a2 = 7.0640675428054e-02; // Coeffs derived from matlab
    Ipp64f a3 = 5.840209459129e-03; // function 'blackmanharris'
    W[0].re = ( a0 )/a0;
    W[1].re = (-a1 )/a0;
    W[2].re = ( a2 )/a0;
    W[3].re = (-a3 )/a0;
    W[L-3].re = (-a3 )/a0;
    W[L-2].re = ( a2 )/a0;
    W[L-1].re = (-a1 )/a0;

    THese coefficients match with the 'periodic' blackman-harris window in Matlab. The default of the function in Matlab uses symmetric so you must specifically call out to use periodic:

    blackmanharris(L,'periodic');

    Regards, Josh
  • Hi Josh,

    Thanks for the quick response.  I ended up getting the same results using what you provided so the variation from the WaveVision results I am seeing must be due to something else.  Most of the measurement are dead on but  the THD is off by ~0.1 dB and the values for harmonic 2 and 6 are off by ~0.5 and ~1dB respectively.  Perhaps there was some change in the algorithm that WaveVision is using from the MATLAB code that was posted.  I don't need to capture the harmonic levels for what I am doing and I am not concerned about a THD that is off by 0.1dB so I am good moving forward with what I have.  I will run my script on more of the data and keep comparing it to WaveVision to see if any of them vary by a larger amount.

    The issue I was having with using the blackmanharris(N) function in MATLAB is that it provides the window in the time-domain and the WaveVision code creates it in the frequency domain.  When I take the fft of the MATLAB created window to get the frequency-domain window I get non-zero results across the majority of the window, which means creating a mask with a threshold of 0.0 ends up with almost every sample being part of the mask and the factional interpolation fails.  I ended up adjusting the threshold to slightly above zero to filter out the very small non-zero values.

    Thanks again,

    Evan