摘 要: 为使扭矩测量更加便捷、准确,设计了一种新型扭矩测试系统。以STM32为控制中心,利用基于Qt的Python库完成人机交互界面,通过无线串口通信技术实现二者之间的通信。下位机程序中利用中位值平均滤波算法对采样的数据进行滤波,并收集滤波后的数据。通过观察发现,经过ADC转换过后的数字量与对应扭矩值并非一元线性关系,因扭矩值的大小为连续数值型变量,又考虑到周围环境的温湿度可能会影响传感器的精度,故采用多元线性回归模型进行分析。将扭矩值作为结局变量,数字量、环境温度、环境湿度作为解释变量,利用控制变量法进行分组实验,将训练集导入SPSS软件中得到所需模型,给出回归方程。其中数字量的影响系数为0.108,温度的影响系数为0.007,湿度的影响系数为0.001,均正向影响扭矩值,均方误差MSE计算模型损失L=0.00106,满足精度要求。 |
关键词: 扭矩测试;多元回归;滤波;无线串口通信 |
中图分类号: TP206
文献标识码: A
|
|
Design of Wireless Acquisition System for High Precision Static Torque based on Multiple Regression Model |
WU Shaojie, ZHONG Liangwei
|
(College of Mechanical Engineering, University of Shanghai for Science and Technology, Shanghai 200093, China)
18735561181@163.com; zlv@usst.edu.cn
|
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 Qtbased 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 |