Errors Classification Method for Electric Motor Torque Measurement

The use of high-precision measuring instruments for determining the torque of electric motors in such areas as medicine, motor transport, shipping, aviation requires the improvement of the metrological characteristics of measuring instruments. This, in turn, requires an accurate assessment of their error. Of particular importance is the measurement of power at high-speed installations, where in some cases conventional measurement systems are either unsuitable or have low accuracy. Thus, the use of high-speed turbomachines in aviation, transport, and rocketry creates an urgent need for the development of high-quality measuring instruments for conducting precise research. In turn, in the absence of means for accurately determining the error, attempts are made to predict them. This makes it possible to timely identify the influence of many factors on the accuracy of measuring instruments. The increase in the error arises, as a rule, through abrupt changes in the measurement conditions. Such errors are unpredictable, and their significance is difficult to predict. In the course of the study, the K-nearest neighbors method was used, to establish criteria for which a gross error may occur. The results obtained make it possible to establish threshold values at which the maximum deviation can be established under various conditions of the experiment. In a computational experiment using the K-nearest neighbors method, the following factors were investigated: vibration; temperature rise of measuring sensors; instabilities in the supply voltage of the electric motor, which affect the accuracy of the strain gauge and frequency converter. As a result, the maximum errors were obtained depending on the indicated influence factors. It has been experimentally confirmed that the K-nearest neighbors method can be used to classify deviations of the nominal value of the error of measuring instruments under various measurement conditions. A metrological stand has been developed for the experiment. It includes a strain gauge sensor for measuring torque and a photosensitive sensor for measuring the speed of the electric motor. Signal conversion from these sensors is implemented on the basis of the ESP8266 microcontroller.


Introduction
Ensuring stable and long-term operation in some mechanisms requires maintaining their load at a given level. This is especially true for instruments for measuring the torque of electric motors, when the ambient conditions change, when the error is set, it can differ from the real one.
Therefore, on the basis of experimental studies at various speeds of movement, temperature, humidity, vibration, measures are being developed to improve the accuracy of such measuring instruments, which is due to an error. On the one hand, the list of tasks solved by devices for measuring torque shows that the scope of their application is quite wide, and the requirements for them are very different. On the other hand, a change in such condi-tions characterizes the measurement error. Therefore, it becomes necessary to apply methods for assessing the error of measuring instruments by predicting its change in various conditions. For this, machine learning me thods can be used, together with software and hardware solutions, they can solve the problem of predicting the error of the measured devices with sharp changes in the measured conditions. This largely explains the variety of existing methods for predicting the error. So, the result of any precise measurement is of no value until the error with which it was carried out is indicated. Although the rules for the numerical estimation of the magnitude of errors have been developed in detail for a long time, however, they are often unknown even to experienced experimenters.

ISSN 2664-9969
Thus, there is a need to determine the probability of an error going beyond its standard values under various conditions.
Considering the processes of measuring the torque of electric motors, it is necessary to highlight such factors as: vibration, temperature, humidity, voltage, instability, excessive wear of friction parts and support bearings, as well as the human factor. All of the above can significantly affect not only the controllability of the error, but also the measurement results in general, can be dangerous in production, in vehicles, aircraft, and the like. Therefore, the solution to the problem of predicting the error of instruments for measuring the torque is very urgent.

The object of research and its technological audit
The object of research is the processes of measuring the torque. The subject of research is the means for assessing errors and their classification when measuring the torque of electric motors, as well as ways of predicting the error when changing the specified operating conditions of the electric motor and methods of classifying factors that lead to the output of an error according to its limiting value.
The torque in the measurement of the characteristics of electric motors is an important characteristic that determines the scope of their application and efficiency. The measurement of torque, as a physical quantity, is carried out directly on the rotating shafts of the moving elements of electric motors using various methods and instruments. Often, such measurements are carried out on indirect indicators that give an approximate accuracy, since this process is quite complex and requires physical intervention in the shaft structure using systems that determine the shaft deformation.
Each measuring device has its own accuracy class, which determines the error. In many cases, error plays a decisive role when using an electric motor. For example, in dentistry, stone processing, metalworking, etc., where rotational speed and torque must be determined.
One of the common methods for measuring the deformation of a shaft is the use of strain gauge bridges, where the shaft is glued with resistance strain gauges at an angle of 45° to the axis of rotation, which are connected by a bridge circuit (Fig. 1).  Fig. 1 shows: +Ex, -Ex -input voltage; +S, -S -output signal and R 1 -R 4 -strain gauge resistors that change their resistance depending on deformation. The use of this circuit increases the sensitivity, improves the linearity of the obtained characteristics and reduces the effect of temperature on the value of the output signal. The advantage of such a bridge is that it only measures the change and not the total resistance. The complexity of using measuring devices based on such components is data transmission from sensitive elements from the rotating shaft to the consumer. Previously, induction, lighting, contact and other devices were used for this. Today, wireless data transmission is mainly used. As a rule, the means are installed directly on the rotating shaft together with the battery.
Given the modern possibilities for torque measurement, it should be noted that there are unresolved issues. In particular, evaluating the accuracy of such devices, under the influence of various factors, for example, such as vibration, temperature exceeded and voltage instability of electric motors.
The main errors in measuring physical quantities are considered to be the following: -systematic errors caused by factors acting in the same way when the same measurements are repeated many times; -random errors that differ in individual measurements and have an unknown value. The rules for their determination are studied in measurement theory, statistics, identification theory; -gross errors significantly exceed the expected error under normal measurement conditions. They can appear as a result of an erroneous recording of the instrument readings, an incorrectly determined reading, a sharp change in the operating conditions of the instrument, the action of destabilizing errors. Among the above, the most interesting are gross errors that go beyond the standard values, since they are the causes of many industrial accidents.
An unsolved problem in the diagnosis of gross errors is the study of the characteristics of destabilizing influences, since stochasticity is inherent in the factors that negatively affect the measuring sensor. It is this action that is of interest to modern metrologists. Therefore, today there is a need for predicting gross errors, determining the criteria for their occurrence, obtaining classifications of errors depending on destabilizing factors.
To solve such problems, artificial neural networks and other machine learning tools are used that require practical testing and research.

The aim and objectives of research
The aim of research is to obtain a classification of errors in measuring the torque of an electric motor. This will make it possible to predict deviations of the error from its nominal value, depending on the measuring conditions, for example, with vibration, power instability, at an elevated ambient temperature.
To achieve the result, the following tasks have been set: 1. Select and substantiate the methods of data classification, it allows to carry out a comprehensive analysis of the process of managing the data of the technological audit of devices for measuring the torque of electric motors.
2. Conduct a practical analysis of data by constructing a stand for measuring the torque of electric motors and testing it in various measuring conditions.
3. Propose methods for predicting the error depending on the measurement conditions.

Research of existing solutions to the problem
Among the main directions of solving the problems of accuracy when measuring the torque identified in the resources of the world scientific periodicals, can be distinguished [1,2], but mainly direct measurements of the torque using strain gauges are considered. However, they do not consider the possibility of deviating the error from its standard value, taking into account the influence of destabilizing factors.
The work [3] describes a method for measuring torque with high accuracy, achieved by using special couplings on the shaft of the electric motor, but this method allows to measure the torque at low speed.
Despite a significant number of scientific papers describing the characteristics of errors in measuring physical quantities, there are not many that are devoted to predicting the error. The error itself is calculated by statistical methods, which also form an error forecast. During changes in the measured conditions, gross errors often occur that do not meet the requirements for measuring technology, which negate the process of controlling electric motors. For example, when vibrating or changing the ambient temperature, and the like. Research aimed at solving this problem is mainly devoted to forecasting blunders. As, for example, research [4], where the Monte Carlo method was used to predict the error. Also, methods of direct search, gradient descent, random search, and other algorithms for finding the global extremum are used [5].
These studies, although they describe the conditions for predicting the error, but they do not solve the problem of classifying deviations under the influence of various destabilizing factors on measuring instruments. In this case, it is possible to develop a classification of the measured media, and the degree of deviation of the error from its nominal value.
There are works where, only the instrumental error of the signal measurement is taken into account. However, special computing programs are used there, which are inaccessible to a wide range of researchers [6,7].
So, it is possible to see that it is necessary to use simple and affordable tools that will allow to form a classification of deviations in measurement errors. To solve such problems, machine learning methods are often used, which are used in many areas [8], including during the measurement of physical quantities [9]. Among the above methods, the K-nearest neighbors method deserves attention, which is used to classify data and to construct regression dependences [10]. Its practical implementation is reflected in instrument engineering as well [11].

Methods of research
Obtaining a classification of gross errors depending on changes in the measured environment can be implemented using the K-nearest neighbors method, which allows revealing hidden regularities between the parameters of the studied quantities from a certain data sample. To obtain such data, a stand was developed for determining metrological characteristics, which combines a sensor for measuring the frequency of rotation and a strain gauge installed at the axis, has a shoulder of 10 cm. The shoulder that is connected to the shaft by a special connection, when the shaft rotates, presses on the strain gauges, forming a moment of force, which is directed along the circle of rotation of the object (Fig. 2).
Measurements of the rotation frequency are carried out by determining the frequency characteristics of the shaft rotation, fixing the full revolution by fixing the logical state of the photo-transistor, which is hit by a beam of infrared light (Fig. 3).
The strain gauge sensor has thin-film resistors that change their resistance upon deformation; they are combined into a bridge that is connected directly to the ADC, which records changes in the resistor value (Fig. 1). The sensor is made of aluminum and has the shape of a bar (Fig. 2, item 4).  The speed sensor is implemented on the principle of a frequency meter, which is implemented on the basis of a photo-transistor, which records the rotation of the motor shaft based on a logic signal supplied to the microcontroller ESP 8266. This microcontroller measures the time between pulses. Thus, the moment of force F acting on the material point of the strain gauge with the radius vector r in the form of a shoulder (Fig. 2, item 3) is defined as: that is, the vector product of the radius vector r by the force F. Thus, F is a vector perpendicular to both the radius vector of the point and the force that acts on this point. In absolute value, the moment of force is equal to the product of the force per shoulder, or M Fr a 0 = sin , where a is the angle between the direction of the force and the radius vector of the point.
So, the moment of forces acting on a system of material points is equal to the sum of the moments of forces acting on individual points of the system: In the developed stand (Fig. 4), the shoulder has a distance of 10 cm, and the data of the strain gauge sensor ISSN 2664-9969 is converted by the microcontroller into numerous units, represented by grams. In this case: where m -the mass that the shoulder has in grams (Fig. 2,  item 3) and is the moment of acceleration -9.80665 (m/s 2 ), the force that changes in 1 second the speed of a body weighing 1 kg by 1 m/s in the direction the action of this force. To obtain data from sensors of the speed of rotation of the shaft of the electric motor and its torque, software has been developed. The algorithm of such software is based on reading data from sensors every 2 s and by an ESP 8266 microcontroller and transmitting them to a computing device using a serial interface. After that, the transient characteristic of the speed of rotation of the motor shaft is built; torque; standard error; standard error deviation according to butcher measurement conditions.
To determine the criteria of the measured medium, at which a deviation of the standard error beyond its nominal value can occur, the K-nearest neighbors method was applied, in order to establish the classification of measuring conditions under which the error increases significantly.
The principle of operation of the k-nearest neighbors method refers to metric classification methods. So, to establish a separate category of measurement conditions, where the error d can exceed the nominal value, the software classifier compares it with all similar measurement results for a number of criteria of the training sample L.
Thus, the distance P d d z , ( ) is calculated for each d L z ∈ . After that, k errors are selected from the training sample that is closest to d.
So, according to the k-nearest neighbors method, the error d can be considered to belong to the class that is most common among the neighbors of the given error, that is, for each class, the ranking function is calculated (Fig. 5): Thus, this method can be applied to classify the types of error when measuring the torque of electric motors.
Its disadvantages can be considered that there is a significant dependence of the classification results on the selected training data set. The advantages include a simple software implementation, the resistance of the algorithm to abnormal out liers of the initial data, the ability to update the training sample without retraining the data classifier.

Research results
In the process of analyzing the characteristics of the torque and rotation speed of the electric motor (12 V, 100 W), a number series was obtained that describes the torque and rotation speed (Fig. 6). According to the characteristics of the strain gauge sensor (Fig. 2, item 4), the measurement error is 0.01 %, therefore, to predict it under various conditions, the K-nearest neighbors method was used, which makes it possible to establish the classification of deviations of the error from its nominal value depending on measurement conditions. The data obtained from the developed stand for measuring metrological characteristics (Fig. 3) were obtained through the WIFI module, which is placed on the ESP 8266 board in a special WEB application. For data processing and application of the KNN method, the following software libraries were used: math, pylab, numpy, matplotlib.
The result of visualization of the obtained data is presented in (Fig. 8), which shows the difference between the categories of data of torque and speed of rotation of the electric motor shaft under various measuring conditions: vibration, temperature rise and in conditions of voltage instability. Having a sample, which is shown in Fig. 7, it is divided into training and test. For this, the following program code was applied: To determine the distance between objects, Euclidean distance was applied.
It is possible to visualize the classification signs for individual categories of data characterizing the torque and rotation speed of the electric motor by the frequency of the program code: Such features were established using the k-nearest neighbors method (Fig. 9), where it is seen that the classification, which is implemented on the basis of such a method, when measuring the torque of electric motors, can be applied in the process of predicting the accuracy of measuring instruments and classifying the characteristics of measuring instruments depending on destabilizing factors of influence. Fig. 9 shows the characteristics of deviations from the nominal values of the error in conditions of vibration, temperature rise and voltage instability.

SWOT analysis of research results
Strengths. The study showed that the instability of the measuring device can have its own criteria, which will make it possible to create a certain classification of errors depending on destabilizing factors.
The developed stand for measuring the metrological characteristics of the torque of electric motors can receive further scientific development, in particular, in the context of studying other destabilizing factors of influence on the accuracy of measuring instruments. Practical approbation, which made it possible to identify, among such factors as temperature change of the measured medium, voltage instability and vibration are the most critical. Thus, the greatest negative impact on the accuracy of the device was caused precisely by the vibration that was simulated on the vibration table.
Weaknesses. The application of the K-nearest neighbors method can be carried out only on a small sample of data, since its computer implementation requires significant computing power. In addition, the accuracy of this method when classifying data also needs to be improved. As shown in Fig. 9, some of the classified data characterizing temperature change and voltage instability were identified with errors. This is due to the fact that when developing the metrological stand, bearings of poor quality were used. Therefore, the classification sample needs to be clarified using better quality mechanical components.
Opportunities. The implementation of methods for predicting deviations under the influence of various factors on the state of measuring instruments can reduce the number of non-predictive accidents at work caused by inaccurate instrument readings. In particular, such systems are highly needed in well drilling systems. Where, bearing wear causes vibration that can affect the accuracy of torque measuring instruments. The signal from such devices, in some cases, is the control one when regulating the power of electric motors, the excess of which can cause an accident.
Threats. The development and training of models that can be used to recognize negative factors affecting the accuracy of measuring devices is quite long and requires significant computing power.

Conclusions
1. Among the many methods for classifying errors under different measurement conditions, machine learning methods that allow to identify the factors influencing the measurement means may be the most optimal. During the approbation of the K-nearest neighbors method, using the example of a sample of data obtained by measuring the torque and rotational speed of an electric motor, classification signs of the influence of such factors as: vibration, temperature rise and instability of the electric motor supply voltage were determined.
2. The practical implementation of the experiment was carried out on the developed stand for measuring the metrological characteristics of electric motors, which allows obtaining data on the torque and speed of the electric motor in dynamics. During practical testing, destabilizing factors of influence on measuring instruments were simulated and the following characteristics were obtained. During vibration, the error, in contrast to the standard 1-2 %, was 1.5-3.9 %. The error with increasing temperature and instability of the supply voltage of the electric motor was within 1-3 %. These factors affected the measurement accuracy to a lesser extent.
3. To the obtained samples, the K-nearest neighbors method was applied, the use of which made it possible to create a classification of errors under various measurement conditions. The experiment showed that the use of the Knearest neighbors method to determine the criteria for the influence of destabilizing factors on measuring instruments is not suitable in all cases. So, in Fig. 9 it can be seen how the data sample characterizing the error in measuring the torque and rotation speed of the electric motor under conditions of voltage instability and an increase in the temperature of the measured medium is classified with errors. However, the criteria for the occurrence of vibration using this method are determined quite effectively. This is due to the frequency characteristics of vibration, which are significantly different from other factors.