基于多元回归模型的高精度静态扭矩无线采集系统设计
来源:用户上传
作者:吴少杰 仲梁维
摘 要:为使扭矩测量更加便捷、准确,设计了一种新型扭矩测试系统。以STM32为控制中心,利用基于Qt的Python库完成人机交互界面,通过无线串口通信技术实现二者之间的通信。下位机程序中利用中位值平均滤波算法对采样的数据进行滤波,并收集滤波后的数据。通过观察发现,经过ADC转换过后的数字量与对应扭矩值并非一元线性关系,因扭矩值的大小为连续数值型变量,又考虑到周围环境的温湿度可能会影响传感器的精度,故采用多元线性回归模型进行分析。将扭矩值作为结局变量,数字量、环境温度、环境湿度作为解释变量,利用控制变量法进行分组实验,将训练集导入SPSS软件中得到所需模型,给出回归方程。其中数字量的影响系数为0.108,温度的影响系数为0.007,湿度的影响系数为0.001,均正向影响扭矩值,均方误差MSE计算模型损失L=0.00106,满足精度要求。
P键词:扭矩测试;多元回归;滤波;无线串口通信
中图分类号:TP206 文献标识码:A
Design of Wireless Acquisition System for High Precision
Static Torque based on Multiple Regression Model
WU Shaojie, ZHONG Liangwei
Abstract: This paper proposes to design a new torque testing system to make torque measurement more convenient and accurate. Taking STM32 as the control center, the human-computer interaction interface is completed by using the Qt-based Python library, and the communication between them is realized by wireless serial port communication technology. In the lower computer program, the average filtering algorithm of median value is used to filter the sampled data, and collect the filtered data. Through observation, it is found that the digital quantity converted by the ADC and the corresponding torque value are not linear in a single variable. As the magnitude of the torque value is a continuous numerical variable, and considering that the temperature and humidity of the surrounding environment may affect the accuracy of the sensor, a multivariate linear regression model is used for analysis. Taking the torque value as the outcome variable, and the numerical value, ambient temperature, and ambient humidity as the explanatory variables, the control variable method is used to conduct group experiments. The training set is imported into SPSS software to obtain the required model, and the regression equation is given. Among them, the influence coefficient of digital quantity is 0.108, that of temperature is 0.007, and that of humidity is 0.001. All of them positively affect the torque value, and the mean square error MSE is used for calculating model loss L=0.00106, which meets the accuracy requirements.
Keywords: torque test; multiple regression; filtering; wireless serial communication
1 引言(Introduction)
扭矩是机械领域一个非常重要的测量量,与很多应用有着紧密的联系,许多行业需要进行精确的扭矩测量[1]。现今,测量扭矩的方式与产品多种多样,常见的有数显扭力扳手、高精度扭矩测试仪等。小型的扭矩测量仪体积小、成本低、精度低,可测量的扭矩范围有限,且无法保存测量结果[2]。大型的扭矩测量仪虽然精度高,扭矩测量范围广,可以进行实时测试跟踪,但其成本较高,且不便于携带[3]。
本文结合了以上扭矩测量的优点,利用STM32单片机,结合基于Qt的Python库,利用无线串口通信技术,设计了高精度静态扭矩无线采集系统,可适用于多种工况。
nlc202206161145
转载注明来源:https://www.xzbu.com/1/view-15433768.htm