Automated system of monitoring and positioning of functional units of mining technological machines for coal-mining enterprises

. This article is show to the development of an automated monitoring and positioning system for functional nodes of mining technological machines. It describes the structure, element base, algorithms for identifying the operating states of a walking excavator; various types of errors in the functioning of microelectromechanical gyroscopes and accelerometers, as well as methods for their correction based on the Madgwick fusion filter. The results of industrial tests of an automated monitoring and positioning system for functional units on one of the opencast coal mines of Kuzbass are presented. This work is addressed to specialists working in the fields of the development of embedded systems and control systems, radio electronics, mechatronics, and robotics.


Introduction
At present time, in connection with the presentation of ever higher demands on the processes of managing technological machines in the coal mining industry, the problem of identifying objects, systems, phenomena and processes play an extremely important role [1]. It is impossible to ensure the effective and qualitative management of the system if its model is not known with a sufficient degree of accuracy. Therefore, when designing control and control systems, numerous studies are conducted to determine the mathematical models of these systems [2,3].
The creation of control and management systems for complex technological facilities, such as coal mining enterprises, is connected with the tasks of selecting and setting up automated monitoring and positioning systems (AMPS) for the functional units of typical devices of mining technological machines (similar units in different stages of the production process) [4].
Currently, these parameters are monitored by mechanical plummets and do not meet modern requirements for accuracy and reliability. In addition, there are no devices on technological machines that allow not only performing continuous monitoring of the angular orientation of functional elements but also to register and analyze the information received in order to assess the quality of mining operations for the final time intervalhour, shift, week, month [5,6].
The main existing manufacturers of position monitoring systems in the space of functional elements of mining machines are: one-dimensional (1D), twodimensional (2D) and three-dimensional (3D) leveling systems for hydraulic excavators and drilling rigs firms: Topcon (Japan), Trimble (USA), Prolec (UK), Leica Geosystems (Switzerland), Moba (Germany), which are presented in Table 1.
These systems, using data from satellite navigation systems and signals from inertial sensors, determine the position of the bucket and the platform of the excavator.
The systems are relatively expensive (more than $ 30,000), are complicated to operate, have a multi-level interface, require careful debugging and long training for the operator-operator. In addition, information about the position of the platform excavator in foreign systems is secondary and not displayed on the monitor [7,8].
This function can be successfully implemented using modern microelectromechanical systems (MEMS)gyroscopes (MG) and accelerometers (MA).  The system of continuous monitoring of the position in the space of functional elements of technological machines can be easily built with the aid (help) of an MG, an MA and a Madgwick filter uniting their readings. The application of the Madgwick filter does not require a large amount of processing power from the controller of the system and allows achieving sufficiently high-quality indications.
By combining data of these two MEMS sensors it is possible to calculate the position of the functional element of the processing machine in space at any time during any of its intervals.
The gyroscope operates in the mode of the angular velocity sensor [9], which for a certain initial orientation can be integrated with the passage of time to obtain the current orientation of the platform of the walking excavator.
The use of precise gyroscopes, for example, a fiberoptic or laser gyroscope is inexpedient in view of the dimensions and very high cost.
MG have significantly lower accuracy and cost, but the availability of digital filters and methods for correcting the indication significantly improves the quality of their work, which promotes active use in various fields of science and technology.
Direct integration of the angular velocity readings obtained with MG leads to a rapid accumulation of errors in the calculation of orientation due to MG errors. The main disadvantages of MG are the error of the conversion factor (the instability of the scale factor) and the displacement (drift) of zero. The drift of zero is a parasitic phenomenon, in which the gyroscope readings are different from zero when the gyroscope is at rest.
Thus, MG alone cannot provide an absolute orientation measurement. Figure 2 shows the graph of accumulation of the orientation error. The line of pink color is approximate real orientation values, the blue line is the measured orientation values.
It can be seen from the graph that a gradual accumulation of the error occurs due to the lack of additional correction by the digital filter. Figure 3 shows the zero drift of the angular velocity of the MG ADIS16265 at rest. The graph shows the apparent angular velocity during idle MG. The average value of the apparent angular velocity is 0.0830 degrees per second, which can lead to an absolute displacement of 4.98 degrees within a minute. A periodic harmonic signal with a frequency of 14 kHz from the sensor element is observed.
Apparent movements are formed as a result of integrating the apparent angular velocity and accumulation of integration errors. Figure 4 shows the graph of moving the MG ADIS16265 at rest. Combining the readings of MEMS sensors makes it possible to level out their essential shortcomings [11,12]. For a gyro, this is zero drift and integration errors, and for the accelerometer -too much sensitivity to vibrations and other external force effects. It is possible to perform such an aggregation using the Madgwick filter [13].
The Madgwick filter is a modern complex filter with very high speed, a small requirement for computational resources, and accuracy not inferior to the Kallman filter. The Madgwick filter is designed for mathematical processing of incoming data samples obtained from primary converters, eliminates the problem of errors and accuracy, as well as the filter parameter settings that are characteristic of Kallman filters. Adjustment of the readings of MA and MG is to calculate a single orientation estimate by measuring the accelerometer, gyroscope and, if necessary, a magnetometer.
The Madgwick filter uses a quaternion to represent the orientation to describe the position in space in three dimensions and does not contain problems related to the description of the position by the Euler angles (folding frames/folding frames). The accuracy of the filter is compared with existing industrial filters, similar to the Kallman filter. The filter can be realized not only with inertial sensors MA and MG but also with an additional sensor -a magnetometer (digital compass). The realization of a filter with a magnetometer implies compensation of magnetic distortions and compensation of gyroscope bias. The main characteristics of the filter are two adjustable parameters β and ξ (one parameter for realization without a magnetometer) determined by observable system characteristics, analytical calculations, and gradient descent optimization, which improves accuracy at low sampling rates, magnetic distortion compensation and zero-zero gyro compensation time.
The gain of the filter β expresses all the errors associated with the operation of the MG and the digital filter, represented as a drift of the zero of the gyroscope, expressed as the magnitude of the quaternion derivative. The main sources of errors are sensor noise, filter smoothing operation, quantization process, calibration accuracy, sensor mounting and alignment, nonorthogonality of sensor axes and frequency characteristics. These errors are the displacement of the gyro.
The choice of the coefficient β depends on the drift of the zero of the gyroscope, the rate of accumulation of the calculation errors, and the conditions for using the walking excavator.
So, too much β value will result in the result of filter operation being greatly affected by the vibration of the machine body. Too small a value of β may not be sufficient to eliminate the drift of the gyroscope readings.
The initial coarse value of the Madgwick filter gain is determined at the stage of assembly and calibration of the AMPS. The MG readings are collected at rest for 8 hours, which corresponds to one working shift.
The obtained angular velocity data is processed by Allan's dispersion method with the construction of a graph on a logarithmic scale, along which time intervals and drift values of the angular velocity β ω are determined. The angular value β ω represents an estimate of the average error of zero measurements for each axis. After determining the value of the angular velocity, the value of the filter gain β is calculated from expression (1).
For each filter implementation, there is an optimal value of β, which should be high enough to compensate for the accumulation of errors and low enough so that unnecessary noise does not fall into the large steps of the gradient descent. For MG ADIS 16265, the optimum value in the steady state is 0.035.
The installation of global satellite navigation (GNSS) system will improve the accuracy of the orientation and record additional parameters of the technological process.
The main functional elements of AMPS functional units of mining technological machines are: -sensors (primary converters), including MG and MA; -navigation module; -microcontroller; --jam-protected link; (noise-resistant communication line); -main and backup memory module; -information display device.
The system is designed according to the modular principle, where its nodes can be added depending on the type and function of the mining machine.
The use of the modular architecture in the creation of AMPS will allow assembling the system from unified modules depending on the operating conditions, the range of tasks to be performed and the logistics. Unified modules will allow you to quickly change the functionality of the system, to debug and implement new functionality without a complete system rebuild.

Main software
The control microcontroller software, written in a middlelevel C / C ++ language, sets and manages the logic of the entire system. The program provides: data collection, leveling of noise and errors by the Madgwick filter, leveling of the influence of vibration, minimization of the accumulated error due to the daily rotation of the Earth, the functioning of the navigation module, identification of the operating cycles of the walking excavator, recording of the event history in the black-box recorder, and the operation of the information display device.
Identification of work cycles is carried out by specialized subroutines that function as a "finite state machine".

Algorithms for identification of operating states
A distinctive feature of the proposed AMPS is that it does not require the inclusion of a walking excavator into the control and power contour. AMPS perform the registration of time, angular velocity, normal and tangential acceleration, angles of inclination relative to the horizon, spatial coordinates.

Graphical representation of the technological process of excavation
The operation of the excavator during the process can be represented in the form of a connected graph, shown in Figure 6. Each vertex of a connected graph represents a certain state of the technological process.
The interrelation between states can be represented by repeated transitions between the vertices of the state graph describing the technological state of the walking excavator. The graph of states describes the technological process of excavation and contains an oriented graph by points 1 2 3 4 1.
The idle state is connected by edges to all states, as a forced stop of the machine can occur at any time, interrupting the course of any operation.
Auxiliary operations that describe position 6 can begin and end with operations: idling, scooping, or transporting to scoop, so the vertex 6 is connected by edges to the corresponding vertices 0, 1, 4 of the graph.
The stepping operation begins and ends after the main mechanisms stop, so the vertex 5 is connected by an edge only to the point 0.
The state of "readjustment" or "unavailable" can occur only after the platform is completely stopped and all power drives.
The state "undefined" can occur from any state.

Software Development
Calculations of the cycle duration and corresponding energy costs can be performed only with a special identification procedure, which makes it possible to distinguish the beginning and the end of the corresponding technological state of the excavation process.
To assess the effectiveness of the operation of the dragline, it is necessary to perform the determination of the main cycles, broken down according to a precise deterministic state: "calculation of the new duty cycle", "continuation of the cycle", "idle cycle", "completion of the duty cycle," "not available." The judgment about such a state should be deductible on the basis of statements about the values available for registration, the current variables: angular velocity, normal and tangential acceleration, the fact of absence or presence of an onboard power supply, spatial coordinates.

Development of identification algorithms
Algorithm for identification of ACMP work cycles is developed on the basis of analysis of the typical technological process of the excavator operation at the transshipment of rock mass. It consists of three main parts: the main cycle, the control subroutine, and the calculation subroutines. Figure 7 shows a block diagram of the main loop, which describes the current state of the system and prescribes the program's further behavior, depending on the state of the excavator platform. The subroutine is identified to calculate the cycles broken down by a clear deterministic state: "calculation of a new duty cycle", "idling cycle", "and completion of the duty cycle". The main cycle describes the current state of the system and determines the further state of the state machine, depending on the current variables. The main cycle initiates the start and stops of the idling timer; it makes a transition to the state of the work cycle identification. Figure 8 shows a block diagram of the subroutine for calculating a new work cycle with a subroutine for monitoring the drift of the angular velocity of the MG. The subroutine is designed to track the correct operation of the Madgwick filter.
The subroutine initiates the calculation of a new work cycle with a preliminary check of the angular velocity drift [14,15]. If the drift of the angular velocity has reached a certain threshold, the reset flag of the MG is set to reset the accumulated errors. The logic of the control subroutine is described by the expression 2.
Expression 2 describes the ratio of the angular velocity X to the total acceleration Y with the projection of the acceleration due to gravity falling. If at the moment of rest of the platform of the walking excavator the angular velocity is greater than the linear acceleration, then there is a large drift of the zero angular velocity. The subroutine can be run as part of another subroutine or run autonomously.

Tests of AMPS
Industrial tests of AMPS were carried out under the conditions of the Kedrovsky section. The AMPS unit was installed in the cab of the ESh-11/70 excavator driver, who works at the transshipment of the rock mass.
After the installation of the AMPS unit, a selfdiagnostic system and internal self-calibration of the orientation in space was launched. The calibration consisted in obtaining initial data from the sensors -the accelerometer SCA3100-D04-1 and the gyroscope -ADIS16265.
The calibration data were accelerations projections that were recalculated into the angles of the initial orientation of the AMPS block and the angular velocity readings for adjusting the gain of the Madgwic filter beta.
After receiving the calibration data, the communication with the server was established for the operation of the module.
After connecting to the server, the control program and the hardware part continued working in the normal mode. The data arriving at the server in automatic mode was processed and placed on the developer's site. The complex worked continuously for ten days. Throughout the time of testing showed high accuracy and stability of operation. Thus, the monitoring system accurately recorded the working cycles of the ESH excavator -11/70 the time for changing the workers' crews of the drivers. The array of received data corresponds to the events recorded in the journal of working hours. Figure 9 shows the hourly chart of the workers. In this diagram, the number of short cycles is shown in a dark green color, and the number of long cycles of the excavator's operation is light green.
The results of the tests of the automated monitoring and positioning system of the functional elements of mining machines in laboratory and real production conditions at one of the coal enterprises of Kuzbass confirm the possibility of its application for remote continuous monitoring of the angular orientation of the excavator platform and automated recording of the operating cycles of walking excavators for a fixed period of time through the use of microelectromechanical sensors MA and MG with combination Madgwick filter. The use of the Madgwick filter does not require large computational powers, fine tuning, and increased data polling frequencies, which are inherent in various implementations of the Kallman filter.

Conclusion
Thus, the work presents an automated system for monitoring and positioning functional units of mining technological machines for coal-mining enterprises. The system had based on the method of leveling the errors of MEMS sensors by mean of combining the Madgwick filter.
The analysis reports show that system makes it possible to significantly simplify software for identifying the operating cycles of walking excavator, allows achieving sufficiently good indications to the total operating time of technological machines in various operating conditions and angular orientation parameters during operation.
In the future, it is planned to finalize and introduce software with elements of self-learning and dynamic automatic correction of the AMPS operation.