{'fraction_non_alphanumeric': 0.020484996124460194, 'fraction_numerical': 0.007197431070756284, 'mean_word_length': 4.849740932642487, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Software and Hardware Control Robotic Lawnmowers

The article presents a method for forming the trajectory of an automatic lawnmower, describes the architecture of mobile robot control and suggests a method for estimating the productivity of its work.


Introduction
Modern self-propelled technology today operates in the field using autopilot. Accurate field work allows to reduce time and processing costs up to 20%.
All known automatic piloting systems presuppose the installation of a position indicator, controller and receiver of global satellite positioning signals GLONAS or GPS [1].
These kindes of devices are relevant when working on large areas. The use of differential correction from geostationary satellites or from terrestrial base stations is usually paid, which nullifies the effectiveness of such systems in a small self-propelled technique. The problem of the effectiveness of the application of differential correction is also relevant for areas covered by shrubs or trees.
Therefore, intensive research is being carried out around the world to create robot navigation technologies using indoor technology, which are implemented using a scanning laser rangefinder, wireless networks, landmarks, maps of the terrain, etc. The main developers of positioning systems: USA -Carnegie Mellon University, Stanford University, Germany -Bonn (University of Bonn), Australia -Sydney (The University of Sidney), Russia: Center of education and research «Robotics» of Bauman Moscow State Technical University, Russian State Scientific Center for Robotics and Technical Cybernetics, Keldysh Institute of Applied Mathematics.
Based on the data received from positioning systems, the route planning subsystems and the robot motion control subsystem are created.
Various methods are being developed to solve the problem of determining the position of the mobile robot, allowing not only to obtain estimates of the current speeds and positions of the robot, but also the character of the relief. In each case, it is necessary to analyze analytically all the parameters and solve the problem of laying the route in a complex.
A number of papers [1], [2] are devoted to the problem of local positioning of autonomous robots.
In the robotics laboratory of Tomsk Polytechnic University, a functional lawn mower was designed and manufactured (Fig. 1). The main drive for grass mowing is made on a four-stroke gasoline engine. The movement is carried out from two independent electric motors. The machine is maneuvered by a multidirectional rotation of the driving wheels and two swivel wheels with a free vertical axis. The lawn mower is equipped with a control unit via telemetry. To track obstacles from all sides, ultrasonic proximity sensors are installed. The decision block in the form of a personal computer is placed outside the lawn mower device.

Forming the trajectory of an automatic lawn mower
To create the trajectory of the lawn mower throughout the site various maneuvering methods are known [3][4][5][6]. Considering the known ones, we propose own way of calculating the trajectory.
The algorithm of the lawnmower is as follows: first, a perimeter of grass to lawn mowing is determined by telemetry in manual mode. During the movement of the robot, the positioning system tracks the coordinates of the perimeter points with the required step and fixes them in the program as an array of data. After fixing the coordinates, it is necessary to bring the robot to the starting coordinate. For automatic control, first determine coordinates of the current position and set the machine motion for two, three seconds. After that, determine coordinates of the new position and calculate the angle to which the machine should turn to get to the start point of the program and the speed of the robot's movement.
In example, one take the coordinates of points and show a mathematical model in the Mathcad system: To calculate the angle of rotation of the machine, we use the formula for calculating the cosine of the angle between two vectors in the plane. (2) To find the numerical value of the angle, it is necessary to calculate the lengths of the vectors through the coordinates of the three points and the scalar product of the values of the vectors.
To calculate the direction of rotation, it is necessary to calculate the determinant of the matrix of the difference between the coordinates. Fig. 3 is a fragment of the Mathcad program for calculating the angle of rotation. It is assumed that the robot already has a direction along the Y axis.
Calculations for the coordinates (1) showes the following values of the angles:

Performance evaluation of the automatic lawn mower
On the graph (Fig. 9), the trajectory lines are at different distances from each other. It means that in some cases the lawnmower will pass several times in one place.
Estimation of productivity can be made after comparing the total area of the figure of the field and the area that would be processed when the lawn mower moves without overlapping, but taking into account the length of the traversed path. The area of the figure is found by Heron's formula in terms of the coordinates as the sum of the areas of the triangles with a common vertex at the center of gravity of the figure. The calculated value for the given shape is: PloshadFigur = 8.05х10 3 The total distance traveled by the lawnmower is determined as: (6) Multiplying the value of the total length by the width of the mower's grip, we obtain the area value taking into account the distance traveled: The coefficient of useful work is: The architecture of the automatic mower control system Analysis of positioning systems showed that for small robots, the most expedient application of a local system based on ultrasonic scanning of space [7]. In the shown example, we applied the Marvelmind Robotics system (Fig. 10). This system includes at least four ultrasonic beacons installed along the perimeter of the site and one central beacon installed on the moving vehicle. The system allows to determine the coordinates of the robot with an accuracy of 2 cm. with a coverage area of up to 1000m2.

Figure 10. Marvelmind Robotics ultrasound sensor kit
To test the mathematical model of the control program, an experimental prototype of a robot lawnmower was developed, performed on a reduced scale. The robot's running motors were controlled by the Arduino Mega controller based on the ATmega 2560. In order to ensure stable communication between the robot and the base computer at a distance of up to one kilometer, the robot connected to the control computer via radio modules NRF24L01 with a radio channel amplifier at 2.4 GHz [8]. To the computer on which the decision-making unit installed via the COM ports connected to the Marvelmind Robotics radio modem and the NRF24L01 radio module connected to the computer via the Arduino Mini controller. Lighthouses, by the command of the radio modem, exchange ultrasonic signals. The dispatch time and the time of reception of ultrasound marks are fixed, the distance between the beacons is calculated, as a result, the control computer generates data on the geometry of the section and the position of the robot on the site. Using the program written for the developed control complex, all the information and coordinates of the robot are recorded. Then a vector is defined that defines the trajectory of the further movement.
Requirements to the control computer: the presence of at least two USB ports for connecting the radio modem and NRF24L01; the ability to connect a graphic display with a resolution of not less than 800x600 pixels; The installed Windows system is not lower than XP or Linux.
In this project, the Raspberry Pi3 microcomputer is used as the control computer, since it minimally meets the requirements and has a low cost [9].
To correct the moving direction, the robot is also equipped with an electronic gyroscope, an accelerometer and an electronic compass. These devices allow to keep the rectilinear direction of the movement of the robot in the event of slippage of the driving wheels or discrepancies in the speeds of rotation of the wheels.
In order to prevent collision with possible obstacles on the treated area, the robot is equipped with ultrasonic sensors. The information from these sensors is also transmitted to the control computer and used to adjust the motion vector. A block diagram of the control system is shown in Fig. 13. A simplified algorithm for the operation of the control system is shown in Fig.14 Figure 13. Block diagram of the lawnmower control system

Summary
The article gives an example of a developed control system for a robotic lawn mower. An algorithm for creating a control program for organizing traffic is described, an example of a mathematical model is shown. A criterion has been established for determining the useful operation of the mechanism. The interaction between electronic units and control components of a robotic lawn mower is described in detail