{'fraction_non_alphanumeric': 0.02094986807387863, 'fraction_numerical': 0.008073878627968338, 'mean_word_length': 4.955688246385921, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
MODEL AND ALGORITHMS FOR DETERMINING THE LOCATION AND POSITION OF AGRICULTURAL MACHINERY DURING THE MOVEMENT

The subject of research is the navigation subsystem of autonomous control system to determine the location and position of agricultural machinery during the movement. The purpose of the work is to develop and research model and algorithms to determine the location and position of mobile agricultural machinery using a physical model. The following tasks are solved in the article: development of agricultural machinery physical model to collect information from sensors during movement, further development and research of applicability of algorithms for location and position determination. The following methods are used: methods of mathematical statistics, methods of information systems theory and data processing, methods of random signals filtration. The following results were obtained: during research, the agricultural machinery physical model to collect information from sensors during movement was created. The model includes a GPS receiver, an accelerometer, gyroscope and infrared encoders, to count the rotation of the wheels, as well as its own four wheelbase of agricultural machinery. The modernized GPS coordinate filtration algorithm using a geochex algorithm is proposed, which according to several successively obtained GPS coordinates calculates the hash received coordinates; if the coordinates have the same hash, it can be argued that the vehicle is in the segment of the area that corresponds to this hash. To determine the physical model position during the movement data from the accelerometer and the gyroscope was processed using Savitzky-Golay and Madgwick filters. With the use of wheels’ rotation data, the odometric algorithms for movement and location determining of the agricultural machinery physical model in motion were implemented. Conclusions: to improve the accuracy of estimating the location and position agricultural machinery, algorithms complexation of indicators from different navigation systems should be used to reduce the total error. Research results can be applied in the development of new and modifications of existing navigation subsystems of agricultural machinery autonomous control systems.


Introduction
The task of developing and implementing autonomous control systems for aircraft, boats, trucks or cars, forklifts and agricultural transport is quite relevant in today's world. The relevance of such developments is due to human imperfection. Humans, unlike autonomous robots, need breaks for sleep and food, which leads to work stoppages, and fatigue and carelessness can lead to accidents and, as a result, to damage or loss of goods, or even death.
The development and implementation of autonomous control systems is a rather expensive and slow process, but such systems pay off in the long run by reducing net labor, increasing uptime, saving fuel and reducing accidents and product losses. An example of the usefulness of autonomous control systems is the achievements of the American startup Tu Sumple. The truck under the control of the autopilot passed the route Nogales (Arizona) -Oklahoma City, with a total length of 1530 kilometers in 14 hours, while a similar route with a driver takes 24 hours [1].
The task of establishing one's own position and location is one of the main tasks facing autonomous control systems, because only knowing your location can correct traffic in case of deviation from the specified route, bypass obstacles and avoid collisions, and so on.
Autonomous control systems for different equipment can be very different from each other. This is due to various factors, among which it is possible to distinguish between the control systems of vehicles depending on the type of work for which the automation of equipment, as well as the characteristics of the environment in which the equipment operates. The environment in which the equipment operates means whether the equipment operates on land, in water or in the air, weather conditions, as well as characteristic climatic features that may affect the clarity of sensor readings, and features of the environment that affect the choice of sensors, and navigation methods. For example, satellite navigation, which is widely used in mobile technology, works well in open space, but this type of navigation cannot be used to navigate equipment that should work indoors, because the satellite signal is not able to penetrate thick walls. Instead, it is possible to use echolocation indoors, which determines the distance to the walls and obstacles.
Agricultural machinery operates in open spaces where it is difficult to adjust traffic to visual landmarks, such as road signs and markings, or on the basis of echolocation. In some cases, the movement of machinery can be adjusted with the help of visual landmarksplant sprouts to guide the tractor wheels between the rows. But such types of work as plowing, harrowing or sowing do not have similar guidelines. Also, agricultural machinery works in conditions of dust and dirt, which can affect the sharpness of the image.

Analysis of existing sources and setting the task of research
Existing autonomous control systems for agricultural machinery, to a greater extent, use satellite navigation to determine their location. To improve the location, additional installations are used, the location of which is known with high accuracy, and which are installed next to the field for agricultural machinery and act as an additional signal source. [2,3].
There are developments on the integration of differential satellite navigation and fuzzy control of agricultural machinery [4,5] In the known works the approach to creation of ISSN 2522-9818 (print) Сучасний стан наукових досліджень та технологій в промисловості. 2021. № 2 (16) ISSN 2524-2296 (online) inertial-satellite navigation system of control of vehicles with use of an artificial neural network for optimization of the used structure of a vector of measurements of navigation subsystems is offered [6,7]. It is also proposed to use promising developments in the theory of artificial intelligence for the control system of vehicles [8,9].
Such solutions are either quite expensive, or not accurate enough, or have only theoretical estimates of their operation, so it makes sense to look for other sources to improve the assessment of the location of agricultural machinery.
Aim of the article. This article is devoted to the development and research of methods and algorithms for determining the location and position of an agricultural vehicle model. To achieve this goal, the following objectives are set: to choose methods and algorithms for determining the location and position of agricultural vehicles, select modules and sensors to create a vehicle model, create a physical model of an agricultural vehicle to collect data from modules and sensors while driving, develop and implement methods and algorithms for assessing the location and position of the model during movement, investigate the work of developed methods and algorithms.

Main part
The navigation system is a set of devices, algorithms and software that allow you to orient an object in space. The navigation complex can include both complex navigation systems (for example, a satellite navigation system) and individual instruments that allow you to determine the geographical coordinates of an object or its location by other objects.
Navigation systems carry out navigation using various instruments. Devices such as accelerometers, gyroscopes, magnetometers, echolocators, radars, lidars and other devices have acquired great use.
Today, various systems of autonomous control use such types of navigation as inertial, satellite and odometric.
Inertial navigation is a navigation method that is based on the properties of inertial bodies and is autonomous, that is, it does not require external landmarks or signals. The disadvantage of this type of navigation is that the error obtained from accelerometers and gyroscopes accumulates over time, so the position should be periodically adjusted from another type of navigation system [9,10].
Satellite navigation is based on the calculation of the distance from the object being tracked to satellite antennas. The accuracy of satellite navigation can be affected by weather conditions, signal reflection from houses or trees, and the quality of receivers. The advantage of satellite navigation is that error does not accumulate over time [10,11].
Odometry is a method for estimating the movement of wheeled vehicles, which is based on determining the path traveled along its left and right wheels. This method is error sensitive due to the integration of velocity measurements over time to obtain location estimates. In most cases, efficient use of the odometer requires fast and accurate data collection, as well as calibration of instruments [12,13].
Based on the study, it was decided to conduct research on methods and algorithms for estimating the location and position of transport using satellite, inertial and odometric navigation [14].
To test the efficiency of the algorithms, it was decided to build a simplified model of a vehicle for collecting data from sensors while driving [15]. The created physical model of the agricultural vehicle includes: the NEO-6M module, for reception and processing of the GPS signal; MPU-9250 module, which includes a 3-axis accelerometer, gyroscope and magnetometer; infrared encoders, to obtain information about the rotation of the wheels of the model. The block diagram of the model is shown in fig. 1. Data collected during movement was processed on the HP Pavilion 15-n078sr computer, which has an Intel Core i5-4200U processor at 2.3 GHz.
GPS coordinates received from the module are not reliable. The real coordinates of the object being tracked are within a radius of the resulting coordinates. To quickly filter the obtained coordinates, a filter algorithm was developed that is based on the geochex hashing algorithm. Geochex is a hashing algorithm that converts the value of longitude and latitude to a hash type of a given length [16]. In conversion, each hash corresponds to the center coordinates of a hexagonal area. Thus, the coordinates included in the same area will have the same hash. As the length of the hash increases, the area of hexagonal segments decreases.
The filter algorithm works as follows: several GPS coordinates are obtained; calculating the hash of the obtained coordinates; if the coordinates have a common hash, then we can say that we are in the segment of the area of which corresponds to this hash. Successful filtering of GPS coordinates is possible when the radius of the inner circle of the hexagonal segment is greater than the radius of the GPS error, since in this case the entire drift of the coordinates will be suppressed.
This algorithm requires fewer operations than if we calculated the center of the intersection of the radius of error of the obtained coordinates.
Clarifying GPS coordinates is useful because knowing what area we are in at the moment can adjust location calculations from different sources.
To test the operation of the algorithm, a test drive was conducted in the park. The approximate route can be seen in fig. 3.   Fig. 3. Approximate route of movement on park In 166.5 seconds of bout, 170 coordinates were collected, which is about once a second. A hash length of 13 was chosen for filtering. At this length, the radius of the inner circle of the hexagon will be approximately 0.53 meters. The radius of error of the obtained GPS coordinates in the period when the model was not moving was approximately 0.3 meters from the center point. After filtering, there were 68 points left, which belonged to 29 unique hashes. The difference between the coordinates before and after filtering is shown in fig. 4.   Fig. 4. The difference between the coordinates before and after filtering Accelerometer and gyroscope data can be used to determine the position of the model. It was decided to use the Madgwick filter for this task.
The Madgwick filter is a filter developed by Sebastian Madgwick to determine the position in space from the readings of gyroscope, accelerometer and, in some implementations, magnetometer sensors. This filter calculates the position in the form of a quaternion [17]. The general idea of the Madgwick filter is to determine the position of the object by combining estimates of the position of gyroscopic measurements and the direction obtained by measuring the accelerometer. The obtained quaternion was reduced to the values of roll, pitch and yaw in the form from π to -π radians.
When analyzing the data obtained from the accelerometer and gyroscope, it was found that during the movement of the model, the data become very constricted, which leads to a large error in the calculation of the quaternion. It was decided to use the Savitsky-Goley filter to filter the data.
The Savitsky-Goley filter is a digital filter that can be applied to a set of digital data points in order to smooth the data, i.e. to increase the accuracy of the data without distorting the signal trend [18]. This is achieved in a process known as convolution, by fitting successive subsets of adjacent data points with a low-degree polynomial by the method of linear least squares. When the data points are equidistant, you can find 26 least ISSN 2522-9818 (print) Сучасний стан наукових досліджень та технологій в промисловості. 2021. № 2 (16) ISSN 2524-2296 (online) squares analytical solutions in the form of a single set of "convolution coefficients" that can be applied to all subsets of data to estimate the smoothed signal (or smoothed signal derivatives) at the center point of each subset. The Savitsky-Goley filter has two variable parameters: the length of the window and the order of the polynomial. To filter the obtained data, it was decided that the length of the window will be 21, and the order of the polynomial -3. These numbers are due to the fact that at such values the estimate of model rotations was similar to that which was actually with clearly visible stopping moments. An example of data before and after filtering is shown in fig. 5.

Fig. 5. Example of data from gyroscope gz before and after filtering
To assess the situation using Savitsky-Goley and Madgwick filters, a test run was performed indoors. Initially, the model moved forward and to the right. When the model turned about 90 degrees from the initial state, it stopped and began to move back and forth. Turning approximately 135 degrees from the initial state, the model stopped again and began to move forward and to the right. When the model turned almost 180 degrees from the initial state, it stopped and, passing back and to the left, returned to 180 degrees. The view of the calculated change of position during movement is shown in fig. 6.
To improve position calculations, you can use additional accelerometers and gyroscopes, which will reduce sensor error.
Information about the position of the model while driving is very useful for improving location calculations from navigation systems. For example, when moving uphill, the movement in the X and Y coordinates will be less than in a straight line. Knowing the position of the vehicle when entering the mountain, you can adjust the calculation. Dwheel diameter.
The length of the traversed path in the center of the model (Lc) will be half the sum of the traversed path on the left and right sides.
Rate deviation is calculated by formula: ( 1) , 2 rl tt where Q (t)the robot position at a time t; r Ldistance travelled by the right side of the model; l Ldistance travelled by the left side of the model; Wthe distance between the centers of the wheels of the left and right sides.
For the image of coordinates on the map it is possible to calculate Cartesian coordinates: Data for testing the algorithm were obtained during data collection from the accelerometer and magnetometer.  (16) In fig. 7 shows the calculated displacement of the model. The triangles show the position of the model at a given point in time. You can see that sometimes a long time passes between calculations. This behavior is due to the fact that at these times the computer resources were given to third-party processes, while information from infrared encoders was not lost, which allowed to correctly calculate the movement. At the end of the movement, the error was about three centimeters and ten degrees.  fig. 8.
The obtained calculations of the position of the model during movement have a similar tendency, however, the calculation of the Madgwick filter is less clear due to the error that was obtained from the sensors. In the worst case, the difference between the indicators was about 20 degrees. Although the odometric calculation algorithm has clearer indicators, but this method does not take into account the slippage of the wheels, the movement of slopes and uneven roads. These shortcomings can be compensated by adjusting the results based on several different methods of position assessment and displacement. Table 1 shows the calculations of errors from different navigation systems during the movement of the model.

Conclusions
The article developed and investigated methods and algorithms for estimating the location and position of the vehicle while driving.
To test the efficiency of the methods, a physical model of an agricultural vehicle was created to obtain data from modules and sensors while driving.
An algorithm based on the geochex hashing algorithm has been developed to filter GPS coordinates obtained while moving. The filtering algorithm works as follows: several GPS-coordinates are obtained; the hash of the received coordinates of coordinates is calculated; if the coordinates have a common hash, then we can say that we are in a segment of the area to which this hash corresponds. This algorithm requires fewer operations than the standard, which calculates the center of the intersection of the radius of error of the obtained coordinates.
To determine the position of the model while driving, a Madgwick filter was used, which calculates the position on the indicators of the accelerometer and gyroscope. To improve the data obtained from accelerometers and magnetometers, a Savitsky-Goley filter was used, which is able to filter digital signals without changing their trend.
To estimate the movement of the model during movement, an odometric algorithm was used, which calculates the movement of wheeled vehicles in terms of wheel rotation.
To improve the assessment of the location and position of vehicles should use an algorithm for combining indicators from different navigation systems to reduce the total error.
The results of the study can be used in the development of new and modification of existing navigation systems of agricultural machinery.