Other Parts Discussed in Thread: TIDM-02003
Hello,
during our work on a water flowmeter using MSP430FR50431 we've been trying to improve the overall performance, during which we have discovered that modifying the USS_ALG_CORR_VAL_THRSH_CHK_FACT parameter can fix some of our performance problems, however we're stuck how exactly this parameter and correlation-based technique in general works.
I did some searching and found Design Guide TIDM-02003, in which the mathematics behind correlation calculation are described, but some further commentary would be very helpful. I will be referring to equations mentioned on page 7 and for this example let's use proposed situation, therefore 4MHz sampling frequency, 40us capture duration and k = (-1; 0; 1).
First of all, 6) is understandable, there are 160 samples in UPS and 160 samples in DNS buffer.
7) Do i understand it correctly that output of this equation are 3 resulting sums, if we follow the example that k = (-1; 0; 1)?
8) Is maximum of correlation understood as a maximum of these 3 results from equation 7, or is it a maximum of some intermediate calculation? Is result of this functions simply -1, 0 or 1?
9) Does interpolation in this case result in a value between -1 and 1 as a position of highest value (X-axis) or is it the highest value of the interpolation function itself (Y-axis)?
10) Following the assumption that k^ = (-1;1), m = 1 and d = (-1;1), the result should probably fall in the (-1;1) interval as well. What does this value represent exactly, is it a fraction? If so, of what? Using assumptions above I calculated a result k = 0 and d = -0,0018 from some of our sample data.
One additional question: Where is the USS_ALG_CORR_VAL_THRSH_CHK_FACT parameter applied? Is it related to equations mentioned above?
Thank you for your help.
Best regards
Antonin Stepan