TI中文支持网
TI专业的中文技术问题搜集分享网站

MSP430FR6043: 测得的数值感觉不太准,请问怎么操作?

Part Number:MSP430FR6043

您好,我将一段管道放入静止的清水中,使用ADC Capture可以捕获到完整波形,在Waveforms中的绝对飞行时间是58.12us。换能器之间的距离是72mm。温度的话室温是20摄氏度,水是放在室内的,具体多少度不知道,因为也看不懂里面的数据,请问里面的数据怎么阅读?

由此可以得到计算过程:v = s / t = 0.072 / 0.00005812 = 1238 m/s,而超声波在水中的速度是1450 m/s,我感觉差距有点大,请问怎么处理?

measure CHANG:

补充一下,请详细讲解一下“MSP430FR6043EVM_USS_Water_Demo”例程中“algResFixed”结构体中iq44DeltaTOF、iq40TotalTOF_UPS、iq40TotalTOF_DNS、iq16VolumeFlowRate、iq16Temperature与USS GUI软件Waveforms选项卡中Delta ToF、Absolute TOF、Volume Flow Rate是怎么对应的。

a) 如果没猜错的话,iq44DeltaTOF对应着Delta ToF,iq40TotalTOF_UPS、iq40TotalTOF_DNS对应着Absolute TOF,iq16VolumeFlowRate对应着Volume Flow Rate,但是我不能理解

1. 为什么iq44DeltaTOF中的-129464对应着Delta ToF中比如32这个点?

2. 为什么iq40TotalTOF_UPS中的77026092对应着Absolute TOF的58.12,iq40TotalTOF_DNS中的77027416也对应着Absolute TOF的58.12?

3. 怎么理解iq16Temperature的47902呢,他代表着多少摄氏度,是怎么计算出来的?

b) 如果我理解错误的话,请告诉我在程序里我应该在哪里看到USS GUI中Delta ToF、Absolute TOF、Volume Flow Rate这些数值,以及如何读到温度的数值

非常感谢!

,

Cherry Zhou:

您好,您的问题我们需要升级到英文论坛看下,有答复尽快给您。

,

measure CHANG:

您好,请问怎么样啦?

,

Cherry Zhou:

请参阅以下答复:

 -129464 in iq44DeltaTOF: -129464/2^44 = -7.35ns. 77026092 in iq40TotalTOF_UPS :77026092/2^40 = 70.05us, 77027416 in iq40TotalTOF_DNS: 77027416/2^40 =  70.05us, 

47902 of iq16Temperature: 47902/2^16 = 0.73 degC.

You can call the USS_getResultsInFloat() function to get these values in float. 

,

measure CHANG:

请问计算出来的速度不太符合超声波在水中传播的速度不用管他吗?是不是校准的话也改变不了测出来的传播时间?

请问0.73摄氏度怎么理解呢?因为我的水是放在20摄氏度的室内的,不可能接近0摄氏度。而且这里的温度测量结果有时候会是0.0,这是怎么回事?我需要做些什么让他能测量出温度?

,

Cherry Zhou:

请看以下答复:

measure CHANG 说:请问计算出来的速度不太符合超声波在水中传播的速度不用管他吗?是不是校准的话也改变不了测出来的传播时间?

The absTOF might not be the time of flight of 1st lobe receive time. It could be the time of flight for the 2nd lobe, 3rd lobe and other lobes depends on the configuration. You can refer to the algorithm training video on the b23.tv/ZBMXaOo

measure CHANG 说:请问0.73摄氏度怎么理解呢?因为我的水是放在20摄氏度的室内的,不可能接近0摄氏度。而且这里的温度测量结果有时候会是0.0,这是怎么回事?我需要做些什么让他能测量出温度?

Have you change the value of USS_TEMPERATURE_LUT_TRANSDUCER_CONST in the USS_temperatureLUT.h. And enable the USS_ALG_ENABLE_ESTIMATE_TEMPERATURE in the USS_userConfig.h

,

measure CHANG:

1. 所以针对我测出来的速度不太符合1450m/s的情况,我应该调小门限值 ,但是我的门限值也挺小的了,应该能测到第一个波形了。如图本次测得的最大值是847,取11%是847 x 11% = 93.17,最接近第一个波(88)。此时的绝对飞行时间是57.21us,使用的是清水,速度就是换能器之间的距离除以绝对飞行时间,v = s / t = 0.062 / 0.00005721 = 1084 m/s,依然不符合1450m/s的理论值,环境温度是20摄氏度。

2. 您说得很对,我没有使能USS_ALG_ENABLE_ESTIMATE_TEMPERATURE ,使能之后读到的温度是215摄氏度,USS_TEMPERATURE_LUT_TRANSDUCER_CONST是使用的默认值0.04716,请问我需要根据什么修改它呢?

,

Cherry Zhou:

请看以下答复:

How do you measure the distance between the transducers. In the first forum, you use 72mm as the distance between transducer for calculation. However, in the latest one, you use 62mm for calculation. 

Also, check this parameter USS_ALG_ADC_ADDITIONAL_CAP_DLY in the USS_userConfig.h. If it is not 0, change it to 0.

The USS_TEMPERATURE_LUT_TRANSDUCER_CONST should be half of the distance between the transducers.

,

measure CHANG:

是的,我看错了,实际上换能器时间的距离是62mm。我将USS_ALG_ADC_ADDITIONAL_CAP_DLY 的值改成0了,将USS_TEMPERATURE_LUT_TRANSDUCER_CONST 改成了距离的一半,得到的温度是-72,请问这个是不是也不对,应该怎么让他读到正确的值呢?

,

Cherry Zhou:

What is the absTOF result now with -72 temperature reading?

,

measure CHANG:

Yes, I don't understand why the value of temperature is -72, but the room temperature is about 20℃, I have chaged USS_ALG_ADC_ADDITIONAL_CAP_DLY to 0 and USS_TEMPERATURE_LUT_TRANSDUCER_CONST to 0.31. Could you tell me what else I need to do to get the temperature properly?

,

Cherry Zhou:

请看以下答复:

I am not sure why they get the temperature value at -72. If the absTOF results are good they should get the correct velocity data. Then it will search the lookup table to find the temperature data. That's why I am asking what is the absTOF result at that point. 

They can also check why they get the wrong temperature by their self. The temperature calculation code is open to the customer. They can find it in ussSWLib->source->ussSwLibTmeperature.c

I would suggest you add a breakpoint at line 80. They can debug the inputs and outputs of the USS_calculateVelocity function. And will know where the error is coming from. 

,

measure CHANG:

The absTOF results are 57.10us when the temperature is -72 as shown in picture2. I don't know if the data of 57.10us is correct because envelope crossing threshold is 11% . In theory, the first lobe is taken. Since clean water is used, the propagation speed calculated based on 57.10 is 0.062 / 0.00005710 = 1085 m/s, not 1450m/s.

I added a breakpoint at line 80, and the result is shown in picture3, I don't know if this is correct, I don't know what criteria to check it.

picture 1

picture2

picture3

,

Cherry Zhou:

Please send your USS_user_config.h file here. 

measure CHANG 说:I added a breakpoint at line 80, and the result is shown in picture3, I don't know if this is correct, I don't know what criteria to check it.

Check the iq16Velocity value at the breakpoint. You should get 1085m/s based on the your configuration.

,

measure CHANG:

USS_userConfig.h

Cherry Zhou 说:You should get 1085m/s based on the your configuration.

I mean I can't understand why the calculated 1085m/s is so different from the theoretical value 1450m/s

,

Cherry Zhou:

We check your config file. It looks good to us. The absTOF result should be correct. So based on the formula V = distance/absTOF. We would double check the distance data between transducers. Is there anything can be shared by you with us about how you calculate the 62mm distance?

,

measure CHANG:

I read 62mm on the website: https://item.taobao.com/item.htm?spm=a1z10.3-c-s.w4002-22815803607.11.33fd3856ibr0f3&id=673508863286

and I measured the distance with a ruler to be 62mm.

,

Cherry Zhou:

The 62mm is the distance the reflectors. What is the distance between the transducer and reflector?

,

measure CHANG:

I'm sorry. I don't know. I looked for it and it's not in the specs. The document TIDM-02005DesignGuide states that the distance is small enough to be negligible.

,

Cherry Zhou:

In order to facilitate the derivation of the formula, we neglect that distance in the document. However, it is not negligible in an actually design.

,

measure CHANG:

I see, if it's 10mm, the calculated velocity is about 1450m/s. But how do I get the right temperature? Is it related to the USS_computeTemperature function? I see there is a function USS_calculateVelocity to measure the velocity in it. Is the temperature related to the velocity? I don't understand why velocity was used as the 4th parameter to look it up in the table.

,

measure CHANG:

您好,请问怎么样呀,怎么获得正确的温度呢?

,

Cherry Zhou:

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1228494/msp430fr6043-the-values-are-not-accurate/4660211#4660211

英文论坛的链接给您贴在这里,您可以看下工程师的答复。

,

measure CHANG:

From pic1, C can be calculated from formula 3: C = L/2 x (1/T12 + 1/T21) = 0.62 / 2 x (1 / (5.71 x 10^-5) + 1 / (5.71 x 10^-5)) = 10858 m/s. In picture 2, there is no corresponding value of 10858, so it shows that the measured value is -72. If this is the reason, how do I get it to measure normal temperature?

picture 1

picture 2

,

Cherry Zhou:

Please use the following formula for calculation. 

At zero flow, v = 0. So, C = (2L0+L1)/T1 or C = (2L0+L1)/T2. To do an average method, C = 0.5*((2L0+L1)/T1+(2L0+L1)/T2).

The L0 is not negligible in an actually design.

,

measure CHANG:

when L0 = 10mm, C = 0.5*((2L0+L1)/T1+(2L0+L1)/T2) = 0.5 x ( (2×0.01+0.062)/(5.71 x 10^-5) + (2×0.01+0.062)/(5.71 x 10^-5) ) = 1436 m/s

Figure 1 shows that 1436m/s corresponds to a temperature of about 8 ℃,  but why is the temperature in the structure displayed as -72?

Figure 1

Figure 2

,

Cherry Zhou:

Could you check if you call the USS_computeTemperature function after calling USS_runAlgorithmsFixedPoint?

,

measure CHANG:

yes, USS_computeTemperature was called  after calling USS_runAlgorithmsFixedPoint

,

measure CHANG:

请问怎么样啦

,

Cherry Zhou:

工程师暂时没有答复,如果周三前仍未给到答复我们来催促下,您也可以自行查看英文论坛的链接来查看最新进展。

,

measure CHANG:

您好,可以帮忙问一下吗

,

Cherry Zhou:

您好,请看以下答复:

So, where do you add the breakpoint to observe the temperature data? Could you add the breakpoint right after you call the USS_computeTemperature function.

,

measure CHANG:

是的,我把断点放在了USS_computeTemperature后面。

,

Cherry Zhou:

Could you send the USS_temperatureLUT.h here?

,

measure CHANG:

USS_temperatureLUT.h

,

Cherry Zhou:

您好,

工程师有答复了,您可以看下。

,

measure CHANG:

您好,我感觉温度和距离没有关系,因为之前是0.04716的时候,温度那里依然不太正确

,

measure CHANG:

我把断点放在了USS_computeTemperature后面,USS_TEMPERATURE_LUT_TRANSDUCER_CONST改成了0.41,此时温度显示的是-4,但是现在这里开着26摄氏度的空调。

,

Cherry Zhou:

您好,

您试下follow以下FAQ来注册E2E的账号,这样方便您和工程师直接交流:

https://e2e.ti.com/support/site-support-group/site-support/f/site-support-forum/950611/faq-how-do-i-change-the-email-address-in-my-profile?tisearch=e2e-sitesearch&keymatch=faq%3Atrue

,

measure CHANG:

您好,我换了官方邮箱并过了五分钟之后仍然是这样。

,

measure CHANG:

请帮忙回复一下。

,

measure CHANG:

您好,请帮忙回复下

,

Cherry Zhou:

请看工程师的答复。

,

measure CHANG:

好的,谢谢您

赞(0)
未经允许不得转载:TI中文支持网 » MSP430FR6043: 测得的数值感觉不太准,请问怎么操作?
分享到: 更多 (0)