完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
亲爱的各位,我在这里附上ADCl值的输出,以及PT100校准仪提供的各种输入。我在寻找能提供0.1度精度的方程式,有人建议我用更好的精度方程或0.1度的分辨率来使用斜率和截距方程。请给我一些建议-0~400度,CONV=0.2270147559591373×AdCl值- 1817.7071509648126;-200度到0度度,CONV=0.0306748466257668*AdCl值245.61349693251535;-200度到400度,CONV=0.0724462690171456*ADCl值-307.72760202849554;
以上来自于百度翻译 以下为原文 Dear all. Here I am attaching output of ADC_value along with various Input Given from calibrator for PT100. I am looking for Equation that can provide 0.1 degree accuracy .Can someone suggest me equation for Better accuracy or 0.1 degree resolution i thought of using slope and intercept equation . Kindly give me some suggestion 0 - 400 degree Degree_conv= 0.22701475595913734 * Adc_value - 1817.7071509648126; -200 degree to 0 degree Degree_conv= 0.03067484662576687 * Adc_value - 245.61349693251535; -200 degree to 400 degree Degree_conv= 0.07244626901714561 * Adc_value - 307.72760202849554; Attachment(s) Pt100 Reading.xls (24.50 KB) - downloaded 27 times |
|
相关推荐
8个回答
|
|
|
如何获得电子表格中的数据值?我在图1中绘制了“十”表,因为RTD的温度系数是“几乎是线性的”,只有在65点附近有一个阶跃函数的方法才是,如果你改变了这一点上的电流,那么,就没有办法从图1中近似出图0的曲线,比如说0。到400度,用一条直线,正如你所提议的,将会起作用。你的公式为0到400是无稽之谈,就像是从200到400,或者,读出的数字在10000以上。因此,70度的ADC值是10173,而不是173?通过这样的“修正”,这种关系在整个范围内看起来“几乎是线性的”。我在图2中展示了这一点。无论如何,线性部分的斜率大约是0.034度/ADC计数,因此分辨率优于0.1度/计数,但是用斜率截距近似直线近似的“直线”部分(或者,等效地,使用两点)。Mula的误差在几百度的范围内。使用线性最小二乘近似可能会稍微减少误差,但误差仍然是一个数量级(或更多)比分辨率更差。或者,你可以考虑将温度范围分成更小的部分。使用3度的多项式可以得到电阻与温度的公式。例如,参见HTTPS://www. PICOTECH.COM/Labaly/Appult- No.Pt100-Primin电阻-温度计,也许您可以尝试将这些转换为允许温度与ADC读数的近似值,或者您可以尝试(分段)对数据点的最小二乘多项式近似。最后一个注意事项:请记住,在一系列ADC读数达到10000,如表中,您将需要一个14位ADC。如果参考电压为3.3伏特,则一个ADC计数将是几百微伏。一个第十的程度将是大约三个ADC计数,它代表大约600微伏。噪音加上模拟元件偏移和其他错误必须积极控制。祝你好运!问候,戴夫
以上来自于百度翻译 以下为原文 How did you obtain the data values in your spreadsheet? i plotted your "Tens" table in Figure 1. Since the temperature coefficient of an RTD is "almost linear" the only way you could have a step function in the neighborhood of 65 degrees is if you changed the current at that point. Now, there is no way that approximating the curve of Figure 1 from, say 0 to 400 degrees, with a straight line, as you propose, is going to work. Your formula for 0 to 400 is nonsense, as is the one from -200 to 400 Or, maybe, the readout is missing digits above 10000? So that the ADC value for 70 degrees is 10173 instead of 173? With "corrections" like this, the relationship looks "almost linear" throughout the entire range. I show this in Figure 2. Anyhow... The slope of the linear portions is something like 0.034 degrees/ADC Count, so the resolution is better than 0.1 degrees/count, but approximating the "nearly straight line" portions with straight lines using slope-intercept (or, equivalently, using the two-point formula) results in errors of several degrees over a range of a couple hundred degrees. Using a linear least squares approximation might reduce the errors a little, but the errors will still be an order of magnitude (or more) worse than the resolution. Or, you might consider breaking the temperature ranges into smaller pieces. Formulas for resistance vs temperature are available, using polynomials of degree 3. See, for example, https://www.picotech.com/library/application-note/pt100-platinum-resistance-thermometers Maybe you can try converting these to allow approximation of temperature vs ADC readings Or you could try (piecewise) least squares polynomial approximation of your data points. Or some such thing. Final note: Keep in mind that with a range of ADC readings up to 10000 as in your tables, you will need a 14-bit ADC. If the reference voltage is 3.3 Volts, one ADC count will be a couple hundred microvolts. A tenth of a degree will be something like three ADC counts, which represents about 600 microvolts. Noise plus analog component offsets and other errors will have to be aggressively controlled. Good Luck! Regards, Dave Attached Image(s) |
|
|
|
|
|
我已经附上转换代码作为参考。对于较低温度的输入,我得到1度的准确度,因为输入超过200度,偏移量为5到17度。有人建议即刻进行校准,以便得到更好的结果。我发现曲线是线性的,正如我预期的下面的公式一样。计算结果,但为什么要抵消?如何在不加校正因子的情况下即兴演奏?无符号int PRODEGRs=0;//签名长PoDEGRs=0;ValueNotoStRead(){{(ADCSTARD>=8006×AdCald≪=9989)PRODEGRs=0.0323×ADCDISPLAY-25.42;ELSIF(ADCSTART & 1080;ADC显示和lt;2587)PRODEGRs=0.0332×ADCdisplay+64.053;ELSIF(ADCSTATE & 2587;&AdcDeals≪4068)PRODEGRES= 00338*ADCdSt+ 62.567;ElsPro DEGRs=0.0345×ADCdisplay + 59.235;/IF(ADCSTATE & 1487;&&AdcDeals<8006){PrordGrs= 0.0307×ADCDISPLAY-247.42;}*/}
以上来自于百度翻译 以下为原文 I have attached conversion code for reference.For lower temp input i get 1 degree accuacy as input goes beyond 200 degree get offset for -5 degree to -17 degree. Can someone suggest improvise the calibration so to get better accuacy in result. I found curve is linear and as per below formula i expected it to calculate result but why this offset?? how can improvise without adding correction factor?? unsigned int ProDegrs=0; //signed long ProDegrs=0; void CountsToDegree() { if(ADCdisplay>=8006 || ADCdisplay<=9989 ) ProDegrs=0.0323*ADCdisplay-258.42; else if(ADCdisplay>1080 ||ADCdisplay<2587) ProDegrs=0.0332*ADCdisplay+64.053; else if(ADCdisplay>2587&& ADCdisplay<4068) ProDegrs=0.0338*ADCdisplay+62.567; else ProDegrs=0.0345*ADCdisplay+59.235; /* if(ADCdisplay>1487 && ADCdisplay< 8006) { ProDegrs=0.0307*ADCdisplay-247.42; }*/ } Attachment(s) Degree_1.xls (130.00 KB) - downloaded 28 times |
|
|
|
|
|
如何获得电子表格中的数据值?我使用MCP325 16位ADC以获得更好的分辨率,我正在读取值,并转换为ADCl值。我已经校准了J&AMK类型,我曾经得到1度精度。类似的方式我正在尝试PT100。在这里,我把增益提高了2,保持16位分辨率,使ADC值得到最稳定的输出。为什么在65度之后改变值,我也预期线性增加。
以上来自于百度翻译 以下为原文 How did you obtain the data values in your spreadsheet? I am using MCP3425 16 bit ADC for better resolution , I am reading value and converted to ADC_value. I have calibrated for J & k type where i used to get 1 degree accuracy. Similar way i am trying for PT100. Here i have change the gain by 2 keeping 16 bit resolution so ADC value i get most stable output. I am also suspecting same. Why after it change the value after 65 degree i am also expected to increase linearly. |
|
|
|
|
|
我猜你把二进制ADC读数转换成十进制的功能只考虑了四个最不重要的十进制数字。在附件中,我展示了我如何“扩充”你的十个表,以达到ADC读数和温度之间的线性关系。问候,戴夫
以上来自于百度翻译 以下为原文 I'm guessing that your function that converted the binary ADC reading to decimal only considered the four least significant decimal digits. In the attachment I show how I "augmented" your tens table to arrive at a linear relationship between ADC reading and Temperature. Regards, Dave Attachment(s) corrections.txt (4.04 KB) - downloaded 26 times |
|
|
|
|
|
除了对ADC值进行修正(9999)(缺少十位数字)之外,还有几个数据点我质疑。文本附件显示了我的更正,以及对你原始帖子中的“One”表的一些评论。斜率/截距值在0和64之间的温度和计算温度误差在每一个整数值的温度。然后,我使用斜率/截距值从线性最小二乘拟合相同点,并计算误差在每一个整数值的温度。用你的斜率/截距,绝对误差从0.174变化到0.380。很好。然而,从线性最小二乘线的斜率/截距,误差在-0.108到0.075之间变化,对于最坏情况绝对误差改善为3.5,但是,这是一个很大的问题。温度误差对浮点翻转中的“小”误差非常敏感。介绍和计算。所有的例子都是用双精度(64位)浮点运算完成的。最后,我不必这么说,但是:要注意你的数据点值!不管怎样,也许你可以试试其他感兴趣的范围。底线……如果你不能从线性最小二乘中得到足够的精度,尝试更高阶的多项式。或者,将ADC值分解成较大数量的较小块。或者一些这样的事情。[编辑]问候,戴夫
以上来自于百度翻译 以下为原文 In addition to making corrections for ADC values > 9999 (missing ten-thousands digit), There were a couple of data points that I question. The text attachment shows my corrections, along with a couple of comments for the "Ones" table in your original post. [Edit] Just for kicks: First... I used your slope/intercept values for temperatures between 0 and 64 and calculated temperature errors at each integer value of temperature. Then... I used slope/intercept values from the linear least squares fit for the same points and calculated the errors at each integer value of temperature. Here's the deal... With your slope/intercept, the absolute errors varied from 0.174 to 0.380. Pretty good. However... With the slope/intercept from the linear least squares line, the errors varied from -0.108 to 0.075, for a worst-case absolute error improvement of a factor of 3.5. But, and, this is a biggie... The temperature errors are very sensitive to "small" errors in floating point representations and calculations. All of my examples were done using double precision (64-bit) floating point arithmetic. Finally, I shouldn't have to say it, but: Pay careful attention to your data point values! Anyhow... Maybe you can try it for the other ranges of interest. Bottom line... If you can't get enough accuracy from linear least squares, try higher order polynomials. Or, break the ADC values into a larger number of smaller blocks. Or some such thing. [/Edit] Regards, Dave Attached Image(s) Attachment(s) daves_ones.txt (4.33 KB) - downloaded 28 times |
|
|
|
|
|
是的,正确。调试器调试器后,得到了这些值,得到了较好的精度。在值大于9989的情况下,我的读数增加了1倍。请注意,如果有任何改进的建议,我会根据我读过的ADCI值,得到高阶方程的方程。我用了一些第三阶和第二阶线性回归方程,但我没有得到预期的结果。更好的准确性。是否有任何建议来提高准确性?
PT100读取3.xLS(41 KB)-下载26次 以上来自于百度翻译 以下为原文 Yes correct. After putting debugger i got these value and got better accuracy in result. i have taken reading in increment of 1 As soon as it cross the value >9989 i get 3 degree error as attached( I think equation change as per code ). Kindly suggest if any suggestion to improvement Is there any equations for higher order equation based on ADC_value i have read. I used some 3rd & 2nd order linear regression equation but i am not getting result as expected. With slope and intercept equation with more no ADC_reading i could achieve better accuracy. Is any suggestion to improvised the accuracy if( ADCdisplay<=9989) ProDegrs=0.0323*ADCdisplay-258.42; else ProDegrs=0.0344*ADCdisplay-282.66; Attached Image(s) Attachment(s) Pt100 Reading3.txt (7.01 KB) - downloaded 29 times Pt100 Reading3.xls (41.00 KB) - downloaded 26 times |
|
|
|
|
|
校准负温度读数i有如下变化代码。如果我给输入- 100显示读数- 437,则为负值。否则,校准值给出精细输出。我怎样才能读到-100个负面的信息,如果我有变化,比如说,可能没有正确的校准方法。有什么方法可以发挥显示价值。我已经将声明从未签名更改为签名,它给出相同的输出。
以上来自于百度翻译 以下为原文 Calibrating Negative temperature reading I have change code as per below . For negative tempature if i am giving input -100 display reading shows -437. otherwise the calibration values are giving fine output. How can i make it to read -100 Negative temp if(ADCdisplay>4664 &&ADCdisplay<7999) { // LEDBuffer[3] = DISPTABLE[14]; Minus=1; ProDegrs=0.0313*ADCdisplay-251.09; } unsigned int ProDegrs=0; void Degree_cov() { if( ADCdisplay>=8000 && ADCdisplay<=9989) { ProDegrs=0.0323*ADCdisplay-258.32; Minus=0; } else if(ADCdisplay>=18654) { ProDegrs= 0.0361*ADCdisplay- 313.51; Minus=0; } else if(ADCdisplay>9989 &&ADCdisplay<11080) { ProDegrs= 0.0329*ADCdisplay- 264.42; Minus=0; } else if(ADCdisplay>4664 &&ADCdisplay<7999) { // LEDBuffer[3] = DISPTABLE[14]; Minus=1; ProDegrs=0.0313*ADCdisplay-251.09; } else { ProDegrs=0.0344*ADCdisplay-282.66;Minus=0; } } If i have change like below if(ADCdisplay>4664 &&ADCdisplay<7999) { // LEDBuffer[3] = DISPTABLE[14]; Minus=1; ProDegrs=(0.0313*ADCdisplay-251.09)+202; } Which may not correct way to calibrate. Is there any way to make display negetive value. i have changed declartion from unsigned to signed , its give same output. Attachment(s) Neg_reading.xls (41.00 KB) - downloaded 25 times |
|
|
|
|
|
我不认为我能从这里起到很大的帮助。特别是,我不能帮助你从你的测试者获得的数据点的值,否定的或其他的。我指出了一些似乎很明显的问题,你的点的一个子集,我玩。如果你的测量结果“明显”落在测量图上,那么你必须看看你的物理设置或者测量本身。[编辑]请参阅附加文件的负温度数据点,我认为你不正确地转录。随着我所做的变化,负的温度落在一条“几乎是直线”上。[/Ed]我在前一篇文章中链接的PICoToC页面指出,为了模拟电阻与温度,它们使用负温度的3度多项式,和PO的2度多项式。积极的。如果你知道测试器是如何工作的,你可以从它们的系数导出ADC读数与温度的系数。或者你可以从测量中获得你的系数,正如你和我所做的那样。底线:如果有一个很好的物理现象的数学模型,那么使用最小最小二乘误差近似可能是一个很好的方法来导出系统的参数(并平滑出较小的MEA)。测量误差取决于测量结果的灵敏度。一般来说,实际物理系统(不仅仅是铂丝的电阻对温度)几乎不能确切地表示为任何程度的多项式,而是在有限的范围内,多项式。小程度(大概3或更少)有时可以给出令人满意的结果。关于戴夫
以上来自于百度翻译 以下为原文 I don't think I can help very much from here on out. In particular, I can't help you with data point values that you obtained from your tester, negative or otherwise. I pointed out a couple of problems that seemed "obvious" with a subset of your points that I was playing with. If you have measurements that "obviously" fall well off of the graph of the measurements, then you must look at your physical setup or at the measurements themselves. [Edit] See attached file for the negative-temperature data points that I think you transcribed incorrectly. With the changes I made, the negative temperatures fall on an "almost straight" line.[/Edit] The picotech page that I linked in a previous post indicates that, for modeling resistance versus temperature, they use a polynomial of degree 3 for negative temperatures, and a polynomial of degree 2 for positive. If you know how your tester works, you could, maybe, derive coefficients for ADC readings versus temperature from their coefficients. Or you could obtain your coefficients from the measurements, as you (and I) have done. Bottom line: If there is a good mathematical model for the physical phenomenon, then using a minimum least square errors approximation may be a good way to derive parameters of the system (and smooth out minor measurement errors), depending on the sensitivity of results with respect to measurements. In general, an actual physical system (not just resistance versus temperature of a platinum wire) is almost certainly not represented exactly as a polynomial of any degree, but, over a limited range, a polynomial of small degree (probably 3 or less) can, sometimes, give satisfactory results. Regards, Dave Attachment(s) Daves_Negatives.txt (1.24 KB) - downloaded 28 times |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1122浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1095浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 00:23 , Processed in 1.770872 second(s), Total 86, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
3508