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.

MSP430FR6047: MSP430FR6047 - need clarification regarding the Lobe algorithm

Part Number: MSP430FR6047

Hello! 

We are developing an IoT system, which also uses flowmeters as its sensors. 

I need to understand the algorithms involved to be able to debug problems as they arise. 

For this reason, I have connected the FR6047 eval board to my computer and I ran water through a tube with 2 ultrasonic transducers.

I am currently facing a behavior that I cannot explain and which potentially points to my lack of understanding of the algorithms involved.

I was under the impression, that 

 Volume flow rate = Meter constant * dTOF / ( absTOF1 * absTOF2 )

And that the dTOF is calculated by different means than absTOF1/2, perhaps to improve noise immunity (even though mathematically speaking, you could just calculate the absolute times of flight

and then subtract them from one another).

This agrees with the information presented here:

So I lowered the "envelope crossing threshold" so that it gets burried in the noise. This causes the abstof values to jump, sometimes resulting in the "DToF - Shift value was greater than maxSampleShift" error.

This is to be expected. What I did NOT expect is that this also changes the result of the DtoF calculation. But the parameter itself should only affect the absolute times of flight?

Why am I observing this behavior? Is the DtoF not calculated using correlation? This doesn't make sense either, since I am sometimes getting correlation errors when I mess with the settings.


Also, what's the difference between USS_Alg_dToF_Calculation_Option_water and USS_Alg_dToF_Calculation_Option_estimate?

Thank you in advance for the clarification!

Best regards, 

David Šibrava

  • Hi David,

    The dToF correlation uses the difference in upstream and downstream absToF in order to determine which correlation lobe it should lock onto. This reduces the amount of required processing and power consumption. If the absToF values are off by more than a cycle, the dToF value can lock onto the wrong correlation lobe. This is called a "cycle slip" and is described in the Repeatability Testing section of the USS water academy:

    https://dev.ti.com/tirex/explore/content/msp_academy_msp430_1_00_06_29/modules/msp430/msp430_uss_water_training/msp430_uss_water_training.html#-repeatability-testing

    BR,
    Leo

  • Aha!  That does make a lot of sense! Can you please also explain what USS_Alg_dToF_Calculation_Option_estimate does? What is the difference between this and the "water" option? I think the water option is the one described in the document I have linked to. I assumed the "estimate" method simply takes the difference between the two ABS values, but this doesn't really seem to be the case, either. I couldn't find an explanation anywhere. Does it also use correlation? Thank you very much!! David

  • Also, do you know what the different options for the algorithm mean? I understand what USS_ALG_NUM_CYCLES_SEARCH_CORR does, as well as what  USS_ALG_HIGH_FLOW_OPTION 

    What does the  USS_ALG_THRESHOLDX1X3 do?
    I assume that  USS_ALG_CYCLESLIPTHRESHOLD is some sort of maximum correlation error threshold, which determines when we believe that the cycles have slipped, right?

  • Hi David,

    The water option is a previous version of the algorithm which has been deprecated - it also uses correlation.  Only the estimate option should be used. The estimate algorithm uses the difference in upstream and downstream absToF to determine which correlation peak to lock onto.

    USS_ALG_CYCLESLIPTHRESHOLD is used to enable the algorithm to determine when a cycle slip is likely to have occurred and to correct for this condition. 

    BR,
    Leo

**Attention** This is a public forum