Selection of a rational algorithm for data processing of the weight measuring system of a hoisting crane

The paper deals with the choice of the algorithm for processing the data of the load sensor of the crane weight measuring system being developed. The requirements for the weight measuring system are based on the operating conditions of the crane (the nature of the dynamic process, the limitation of the weighing time) and the planned use of information about the weight of goods (the required accuracy). A comparison of 5 signal processing algorithms is presented: direct averaging, search for extremes with two different modes of pre-smoothing, nonlinear regression, and averaging using a short-term memory buffer. A series of experiments was conducted to compare the methods. The data was obtained on the KMG-201 bridge crane. Based on the results of numerical evaluation of the results of experimental data processing, conclusions are drawn about the applicability of the considered algorithms for analyzing the dynamic process of the crane lifting mechanism. The algorithms for finding extremes, regardless of the pre-smoothing modes, did not show the required accuracy (the relative error was 5%). The averaging algorithm using a short-term memory buffer showed the highest accuracy (the relative error was 1%). The influence of the parameters of the data reception board on the result of the algorithms is estimated. The parameters varied in the range: bit depth 10-12 bits, sensor polling frequency 4.1-256 Hz. Most experiments showed an increase in accuracy with increasing bit depth. Also, according to the results of the experiments, it was found that an increase in the sensor polling frequency of more than 64 Hz in the conditions of this dynamic process does not affect the accuracy of determining the weight of the load. The study showed the need for further work in the direction of determining the optimal parameters of the averaging algorithm with a short-term memory buffer and determining the limit of increasing accuracy with increasing the bit depth of the data reception board.


Introduction
Modern technologies in construction and cargo handling are based on the digitalization of equipment operation parameters. With this approach, the reliability of the operation of technological complexes can be ensured only by obtaining objective information about the nature of its work. This information should be obtained by algorithmic processing of primary sensor data integrated into the design of modern machines and complexes. When handling cargo, information about the weight of cargo handled by the transport and technological complex is crucial. To solve this problem, it is relevant to develop a weight measuring system integrated into technological equipment [1].
The impossibility of using the existing load-carrying capacity limiters (LCPL) and crane operation parameters recorders for the purpose of weight measurement is justified by the influence of dynamic processes and different working conditions: LCPL must prevent the lifting of the load of a certain 2 weight (i.e., it must work during the lifting process), but the specified weight accuracy can be achieved only with the mechanisms that are slowed down and the minimum manifestation of parasitic factors, such as the swinging of the cargo, its vertical fluctuations, etc. [2][3][4][5][6][7]. The use of crane scales suspended on a hook, despite the high claimed accuracy of measurements [8], also has a number of disadvantages: a limited range of cranes (it is impossible to use on grab and special cranes) and the lack of communication with the design and control system, which is why the requirements for performing and monitoring a number of operations fall on the working staff.
The alternative solution is to increase the accuracy of the load measurement by the strain gauge transducer used by the LCPL, with further transmission of this data to the computing module of the weight measurement system independent of the LCPL. This option involves designing a new integrated device based on the existing LCPL, but with some improvements, for example, an improved load sensor that provides the necessary accuracy of the initial information. The main advantages of this way are the possibility of creating a structurally integrated solution in the crane that will meet the requirements of regulatory and technical documentation, but at the same time will allow using a significant part of the common elements between the crane operation parameters recorder, the LCPL and the weight measuring system, such as strain gauge transducers, crane communication system, etc.
At the same time, one of the tasks is to develop an algorithm for determining the weight of the cargo as static load value with the presence of significant damped oscillations in amplitude ( Fig. 1). In this paper, we tested five algorithms for calculating the static load for a series of experiments with a load of known mass: the method of direct averaging [9], search for extremes [10] with two different modes of pre-smoothing (ksmooth function [10] with cubic interpolation [11]), nonlinear regression (genfit function [12]) and averaging using a short-term memory buffer [13].

Figure 1.
Graphs of the load sensor readings for the crane loading cycle. 1 -cargo separation, 2 -cargo lifting, 3 -the load hangs on the ropes with the lifting mechanism turned off, 4 -cargo lowering. Q load -weight of load, k d -coefficient of dynamism.

Materials and methods
As an experimental unit, a double-girder bridge crane KMG-201 (l/c 2t, span 16m) was used. In the experiments, a set load with a total weight of 2000 kg (10 loads of 200 kg each) was used. Experimental device OGSH-2 [6], equipped with a tensor axis connecting the bracket and hook from the crane scales VEK-5000. Signal characteristics of the basic analog-to-digital converter (ADC): sampling rate of 4.1 Hz, bit depth of 10 bits. To determine the influence of the board parameters, two modified versions of the block were made, in which the ADC operation mode was changed: 1) increased to 256 Hz by the polling frequency, 2) increased to 64 Hz and the bit depth to 12 bits. A series of experiments was conducted with three versions of the block. The type of data obtained in the three series is shown in Figure 2.  Figure 2. Graphs of changes in the load sensor readings under different ADC operating modes (digital adc codedigital code of the analog-to-digital converter).
The data obtained as a result of the experiment contains 10 repetitions of the load lifting cycle with a stop for each of the three modes. The load value is calculated on the section of free vibrations of the load, the beginning of which was determined by the top of the first peak after stopping the drive of the lifting mechanism.

Direct averaging algorithm
Each significant point of the signal is taken by an independent measurement of the weight of the load. The average value of the load at time t is determined by the formula [9]: (1) wherei-th load measurement.
The error of finding the average ∆(t) as a function of the averaging time and the non-excluded systematic error of estimating a random variable ( =1 -the error after converting an analog signal to a digital one) is found by the formula [9]: (2) where the mean square deviation is defined by [9]: (3)

Algorithms for finding extremes
It is based on the determination of local extremes of damped oscillations, and then the average load values equidistant in time from neighboring extremes. To improve the quality of finding local extremes, two methods of data preprocessing were proposed: Gaussian smoothing and data interpolation.

Algorithm for finding extremes with preliminary Gaussian smoothing
Preliminary data preparation using Gaussian smoothing consists in the sequential application of the smoothing kernel to the entire averaging area [12]: where G(t)smoothed value at a point in time t; σstandard deviation determined by the formula: where Nthe smoothing window depends on the dynamic process (in this case, N=6 is assumed).

Algorithm for finding extremes using preliminary interpolation
In this case, the preprocessing involved spline interpolation of the values. The interpolation step is 10 times smaller than the data sampling step, which has a positive effect on the accuracy of determining the extremes. The interpolation polynomial [10] has the form: where , , -coefficients of an interpolation polynomial determined from the condition of its continuity and the continuity of the first derivative by the run-through method.
After each of the described methods of preliminary data preparation, the search for local extremes and their time is performed and the position of intermediate points is determined. The values in them are considered load measurements with subsequent processing by (1), (2), (3). The processing sequence is shown graphically in Figure 3.

Nonlinear interpolation algorithm
It consists in drawing up a nonlinear regression model [12] of damped harmonic oscillations, the parameters of which are the coordinate of the asymptote , which coincides with the desired weight of the load, ω -circular frequency, φ -phase, A -amplitude, -the initial coordinate along the time axis. The model parameters are assigned initial values that are specific to a particular crane, and they are optimized to minimize the sum of squared residuals (Fig. 4): where Fregression model:

Buffer averaging algorithm
It is a modification of the direct averaging algorithm. It consists in averaging not the entire section of the measurement of the average during weighing, but only its part of a fixed length, counted from the last load value. The buffer length for this method is typical for a particular crane and is assumed to be equal to the period of natural oscillations of the load of 158ms.

Results and discussion
For each algorithm for processing data obtained on ADC blocks with three sets of bit depth and polling frequency parameters, graphs of changes in the calculated load and its finding error are plotted. Based on the calculation results for a series of experiments, the average convergence value, the median, the limit spread, and the second and third quartiles were determined (Fig. 3). ○ -experimental values, Х -mean, --median, ┴ -limit spread, □ -the second and third quartiles.
The buffer averaging method showed the smallest error in each set of board parameters. For direct averaging, nonlinear interpolation, and buffer averaging methods, the accuracy increases with increasing sensor polling frequency and bit depth. At the same time, no explicit dependence of the convergence accuracy on the board parameters was found for the extremum search algorithm with both methods of data preprocessing. A table of statistical characteristics (absolute, relative error, and absolute spread) is compiled for the data processing results obtained using a board with a bit depth of 12 bits and a sampling rate of 64 Hz (Table 1).

Summary
As a result of the performed work, an estimate of the convergence accuracy of five averaging algorithms for the dynamic process that occurs in the crane lifting mechanism is obtained. The algorithm for finding the extremum (with preliminary smoothing and interpolation) did not show the necessary accuracy, therefore, it is the least suitable under these operating conditions. The practical value for this problem is confirmed for algorithms of direct averaging, nonlinear interpolation, and buffer averaging. However, the nonlinear interpolation algorithm is the most expensive in terms of computing power, which will significantly increase the requirements for the data processing unit and the cost of the weight measuring system as a whole. Also, the solution of the regression model is unstable. The buffer averaging algorithm is more accurate of the remaining two models, while the computational costs are at the same level. Therefore, we consider it rational to use it in the weight measuring system. Next, they need to investigate the dependence of accuracy on the buffer width and