Neural Network Driven Automated Guided Vehicle Platform Development for Industry 4.0 Environment

: This work presents the development of a new "Two Wheel" Automated Guided Vehicle (AGV) platform for education, competition, and research that is based on sensor fusion and neural networks (NN) with machine learning for Industry 4.0 applications. The method that is described in the paper deals with intelligent path planning and navigation of an AGV that should move safely in an unknown environment. The unknown environment may have obstacles of arbitrary shape and size that can move. Also is described the approach to solving the navigation problem in AGV navigation using a neural networks-based technique based on various types of input sensors. The neural network determines the safe direction for the next point section of the path in the environment while avoiding the nearby obstacles. Simulation examples of the generated path with proposed techniques will be presented.


INTRODUCTION
Industry 4.0 represents a period of digitization and transforms production and control systems in almost every industry. The Fourth Industrial Revolution represents a connection of people through mobile devices and other computing technology. The basic properties of Industry 4.0: unrestricted access to information and knowledge; and all will be supported by high data storage and computing power. Emerging technical discoveries will be reinforced by knowledge from the field of robotics, IoT, artificial intelligence, 3D printing technology, autonomous vehicles, and much more.
Mobile robotics is a relatively young and not yet explored field of mechatronics. Its roots are intertwined and include engineering and scientific disciplines such as mechanical engineering, electrical engineering, computer science, cognitive science, and the social sciences. Each discipline contributes to its share and directs researchers to design advanced prototypes. Robots include fundamental implemented components such as DC motors, stepper motors, sensors, and various others. However, in electronics and industry, robots require extreme precision, which is why microprocessors and other components are made that allow the existence of laptops and mobile phones. Therefore, we desire to improve the mobility of different types of robots.
Autonomous guided vehicles form a significant area of mobile robotics, which is of considerable interest. In rough terrain, where the wheels of devices cannot be moved, or the movement is limited, robots come to the fore. The person coordinates the goal position of the robot, but the robot controls the movement. For example, Pulstech's walking robot provides automatic coordination of the legs of the robot, which means that the person chooses only the location or direction of travel [1,2]. HelpMate is a mobile robot used in hospitals for transportation tasks. It has a variety of sensors that allow it to move around corridors autonomously. We know several different patents and designs for autonomous robots. For example, HelpMate is oriented by light and following pre-determined wires that are laid on the ground and have sensors adapted for this purpose [3]. Various cleaning robots take advantage of this property to detect the geometry of the space and thus orient themselves in space. There are always questions and desires about how to locate and control robots. This currently represents one of the largest mobile robot markets in the world. Although mobile robots have a wide range of applications, we need to be aware of the facts that apply to almost every successful robot. The design should include a wealth of knowledge as it is an interdisciplinary science. To successfully solve the problem of robot motion, we need to know the mechanics, kinematics, dynamic properties of the robot, and control theory [4]. For the system to function to our liking, it must correctly use signal analysis. Localization and navigation require knowledge of computer algorithms, computer science, art intelligence, and probability theory [5].
AGV represents the way how to improve mobility, or how to streamline the material/goods transfer process (for example, implementing an AGV system is described in [6]). Manipulation is one of the fundamental factors that affect the total costs of the company, and thus the resulting profit. Therefore, it is necessary to think about safety, efficiency, accuracy, cost, time, and others when handling. AGV research began in the middle of the 20th century (Barnet), and since then, it has found application mainly in areas of industry where the transport of material on the repetitive trajectory is expected [7]. That is why, if the fourth industrial revolution is mentioned, AGVs are certainly among the elements that deserve attention in the field of further research and development (increasing demands on their size, energy savings, materials used, etc.).
One of the features of modern companies, and especially modern factories, is the integration of elements that increase automation and production efficiency. Such an element is the use of AGVs. Their task is mainly to locate objects and transport objects. In their development, design, and construction, it is necessary to keep in mind that the operating conditions are different lighting, ambient temperature, dust, size of the workspace, and others [8]. AGVs need to be adapted to this. In this article, the authors focused on creating an AGV vehicle where an artificial neural network was chosen to determine the rotation angles of robot joints. The ability of the AGV to traverse the final (desired) pathway depends on several factors -e. g. from the degree of learning ability of the neural network, input data, training phase, using sensors. All this can affect the resulting required vehicle path ( Fig. 1 -red curve). In the absence of a certain factor mentioned above (or their combination), this would mean a deviation from the desired path ( Fig. 1 -blue marked space). Such a deviation could cause the AGV to deviate from its safe zone, and at the same time disrupts the safe zone of personnel or equipment and disrupts the safe operation of the company. The authors of the article tried to implement IoT elements in the design of the AGV. The ESP32 is a 2.4 GHz Wi-Fi chip and Bluetooth designed with ultra-low power TSMC 40 nm technology. This chip is designed to deliver the best Radio Frequency (RF) performance and performance, demonstrating flexibility, versatility, and reliability in a variety of applications and profiles. ESP32 is designed for mobile, portable, and Internet-of-Things (IoT) applications. The important features are low-power surfaces including more power and dynamic performance reduction. For example, in the low-power IoT sensor application scenario, ESP32 will wake up periodically and only when a specific condition is found. The low chip duty cycle minimizes power consumption. The output of the power amplifier is also adjustable, contributing to the optimum level of communication range, data rate, and power consumption.

TECHNICAL BACKGROUND OF DEVELOPED AGV PLATFORM
The general structure of mobile robots consists of the following parts. The robot senses changes in the environment and its events with its sensors. The on-board computer unit, the "brain" of the robot processes the acquired information and controls the propulsion system and, through it, the actual actuators. There are two main approaches to designing mobile robots [9]. On the one hand, we can create a wheeled mobile robot, which can be used efficiently on pre-built roads, and on the other hand a two-legged or multi-legged mobile robot standing on and moving on some legs, which is more suitable for the terrain.
We can use different types of sensors on a robot. We can measure the distance with an ultrasound sensor, with a laser rangefinder (1D, 2D, 3D), or with an infrared sensor [2,10]. The visual input of the environment can be obtained with cameras [11]. In direct physical interaction, it senses the robot's environment with collision, pressure, or even tactile sensors [12].
With a thermometer, we can detect not only the condition of the outside environment but also the state of some of its internal parts. Additional internal sensors can measure voltage and power, and transducers measure the rotation of the wheels before and after transmission on the axles [13]. For measuring the position and movement of the robot, an accelerometer, a gyroscope, or a magnetometer, can be used, called an inertial measurement unit (IMU). GPS and compass are also widely used to help with positioning. These tools allow us to create a 3D view and model of the world, while the robot is measuring its position in the 3D world with sufficient accuracy [14,15].
Based on the developed concept of hierarchical intelligent control for AGV, an integrated hardwaresoftware experimental system was implemented. An artificial NN with backward propagation of the error (BP NN) was chosen to determine rotation angles in robot wheels, as it can map the input layer (object position and orientation) to the output one (robot wheel rotation angles). A learning algorithm based on a generalized delta rule was used to teach BP artificial NNs [16].
In Fig. 2, you can see the developed architecture of the AGV platform, where the basic part is the yellow highlighted ESP32 IoT platform with the specified specifics. Other parts are connected to it: the orange part is the power supply (energy source), the blue part is the drives, and the green part consists of sensors and a camera. Tab. 1 contains the basic specifications of the individual components used in the developed AGV by authors. The AGV`s Samsung 18650 3.8 V 3000 mAh Liion has an autonomy of ca. 180 minutes of operation. Full Charge in 90 minutes with TP4056 charger. The robot has a payload capacity of ca. 800 g weight, which is suitable for carrying loads like a small robotic arm, the camera with a pan-tilt mechanism, and other small equipment and electronics.  Fig. 3 shows a photograph of a realistical AGV constructed by the authors using the components listed in Tab. 1, fasteners, and construction. Most parts of the construction were made using 3D printing technology (the approximate cost of this AGV's construction is ca. 100EUR). The use of this technology makes it possible to design elements of the desired shape, low weight, and reduced costs, which is certainly suitable as an alternative in the construction of prototypes or atypical shapes. The

SENSOR FUSIONS
Sensor fusion is the process of merging data from multiple sensors such as to reduce the amount of uncertainty that may be involved in a robot navigation motion or task performing [17]. Sensor fusion technologies allow us to improve the experience, utilization, and combination of sonar sensors, infra, and tactile sensors. Each of these types of sensors provides unique functionality [18].
Sensor fusion is a combination of data, which is especially important when combining data of different types (as in the case of autonomous guides). The AGV is a combination of information from a camera whose task is human vision and sensors that carry information about the distance of the AGV from objects (obstacles) [19].
When all these technologies are combined, sensor fusion takes the input from multiple sensors simultaneously, processes the input, and produces an output. Sensor fusion using algorithms and filtering techniques eliminates the shortcomings of each sensor [20]. The most important aspect of sensor fusion is the ability to analyse the context of the situation [21]. If the AGV does not know the context of the situation, it cannot provide relevant information for real-time spatial orientation. The ideal case is when the context is reached in real-time without the need for human action. Sensor fusion includes methods and algorithms, including the Central limit theorem, Kalman filter, Bayesian networks, and others. Detailed description of multisensor fusion and consensus filtering is in [22]. Fig. 4 shows how the sensor fusion method worksdata from several sensors are clustered and processed by sensor fusion processes, then they are cumulated into one process, the data processing results in an output from the system (some action, e. g. movement of AGV). Fig. 5 shows what Sensor fusion looks like from the camera image and sonar.

NEURAL NETWORK AS TOOL FOR TRAJECTORY TRACKING OF AGV´S
The multilayer perceptron neural network (MLP NN) represents one of the best known and one of the most used types of architecture of artificial neural networks. The basic units of a network-neurons (also called perceptrons) are located on one or more hidden layers. The role of NN is the transformation of input to output, while the key role is played by the activation function (the most typical activation functions of MLP NN are given in Tab. 2). The main task of the neural network is the approximation of a nonlinear function [23,24].
For a NN it is necessary to work out the right weights and edge, limits that make certain operations as desired. For years this was a hard question especially for a manylevel NN, where it was not known the relation between the error to the weights of the different levels. Today exist very good algorithms for NN weight selection and tuning. For example, the backpropagation training algorithm is one of the greatly respected algorithms because of its simplicity and power [25,26].  Fig. 6 shows the general scheme of a multilayer perceptron neural network, where on the input layer are inputs signal u 1 − u p (stimulus). The network in the figure has one hidden layer with M neurons (perceptrons). Each perceptron has a threshold (w M0 ). On the output layer is one neuron with output signal y (response). Its bias is marked as w 0 .

Figure 6
The general scheme of multilayer perceptron neural network [23] The output of the output layer of the multilayer perceptron NN can be defined as follows [23]: where: • u j : inputs of the neural network, • y: output of the neural network, • ϕ i : activation function, • w i : synaptic weight of the output layer, • w ij : synaptic weight of the hidden layer, • M: the number of perceptrons of hidden layer, • p: the number of inputs. The Backpropagation algorithm is a method whose task is to calculate the gradients of the MLP network according to weights. It is a method of calculating derivatives according to the chain rule with application to neural networks. The output derivatives of the MLP network of the i-th weight of the output layer can be determined based on Eq. (2), where the meaning of the individual symbols in the following equations is the same as in Eq. (1). This derivative of the output by weight is equal to the basic function ϕ i . 0 ; 1; 0, ..., The derivatives of the output of the MLP network according to the weights of the hidden layer can be determined based on Eq. (3), which applies to the weight of the connection between the j-th input and the i-th neuron in the hidden layer. The function g(x) represents an activation function, e.g. tanh(x), where after substituting this form of the function into Eq. (3), the relationship takes the form of Eq. (4). It follows that the activation function ϕ i depends on two parameters, namely the inputs and weights of neurons on the hidden layer [23].
The error signal e i (k) of the neuron i, that is an output node, is defined by Eq. (5) [27]: where d i (k) is the response desired for neuron i at iteration k; y i (k) is the output of the neuron i at iteration k. The total output error can be calculated [27]: where C includes neurons of the output layer of the NN. Therefore, if we express the calculation of the weight of neurons on the output layer w M in the iteration k + 1, then we obtain the relation: where w M (k) is the weight of neurons on the output layer at iteration k and E(k) is output error. Parameter η is the learning rate. Similarly, we express the weight of hidden layer neurons on the iteration k + 1 using the weights of neurons from the hidden layer in the iteration k and the error E(k).
Thus, in general, the delta rule is used to determine the correction Δw ij (k) in Eq. (9), whereas the designation of the individual parameters is identical to the previous equations [27].
The frequently used BP algorithm can be modified by adding momentum, resulting in an algorithm called BP with momentum (BPM) and it can be defined by Eq. (10) [28].
where α is momentum factor (0 < α ≤ 1). Usually is used value of the factor α = 0.9 (or 0.95). Momentum introduces a memory effect so that the NN does not only react to the local gradient, but also the recent trends in the surface of the error. The network can get stuck in the local minima without momentum but adding momentum can help the network ride through the local minima. The above-said algorithm was used in implementing the mobile robot trajectory tracking controller to train the appropriate NN [28].

RESULTS OF DEVELOPMENT AND IMPLEMENTATION OF NEURAL NETWORK FOR AGV´S TRAJECTORY TRACKING
To create a NN to approximate a general multi-input multi-output function, an algorithm should be used to initialize the NN, use the backpropagation algorithm to train the network, and use the NN's approximation error to view its results.
In this work is used the following terminology to describe various parameters of the NNs implemented: • N p : number of input data patterns, • N c : number of cycles to train the NN, • W ij : weights -hidden layer to input layer, • W i : weights -output layer to hidden layer, • N i : number of inputs to the NN, • N o : number of outputs of the NN, • N h : number of neurons in the hidden layer, • η: learning rate, • α: momentum rate.
The general algorithm used to construct the NN using backpropagation is depicted in Fig. 7. The first step of the algorithm is to configure the neural network, which is to specify the number of inputs, the number of outputs, and the number of neurons in the hidden layer, and the level of learning rate and momentum rate.
The next step of the configuration of the network is to identify the activation function to use for the functions of the hidden layer and the output layer. The next step is to build the portion of learning and training composed of the following parts: • An iteration for the number of cycles we want to repeat the same set of input data to train the network and reach the desirable error rate. The number of iterations of this loop is N c and the loop index is j.
• An iteration for the number of patterns of data we have in each cycle. This loop will read all of the data in one cycle. The number of repetitions of this loop is N p and the loop index is i.
As can be seen from Fig. 7, the loop reading the information patterns in each cycle is inside another loop repeating the entire data for some cycles. Until doing the backpropagation for each data set, the first thing we need to do is do the forward propagation and find the error between the network output and the desired value.
We can calculate the error for each input data pattern after doing the forward propagation and determine the sum of the error squared by using the following equation: In this equation are used the following parameters: Np is the number of patterns of input data in one cycle and E p is the pattern approximation error. We have one SSE with one output data cycle by the start of the data pattern chain. The next step is to find the mean square sum error (MSSE) based on the next equation: Calculations for the entire loops and patterns are achieved by finishing the data cycle process and we can test the network performance by looking at the MSSE curve and comparing the NN inputs with the real function.
As an early test step, the Scilab code built to impel the above algorithm was used. An example of how to approximate a two-input one output function using this algorithm is defined as follows: The inputs of the network are the information from four tactile sensors, three infra sensors, sonar sensors (placed on the left, the front, and the right side of the AGV), and the camera image. Sensors are activated according to the proximity of an obstacle in that guidance. The NN will output commands like left, right, forward, backward, which will allow correcting the position and thus, avoiding the obstacle. NNs are excellent tools applicable in AGV systems for evading obstacles, which can work with imprecise information. The approximated output of the NN and the real output is depicted in Fig. 8 and represents the torque to the left wheel versus NN approximated model output. From the figure can be seen very well the performance of the approximation algorithm. The implementation of the algorithm will be used in designing the controllers which need the approximation property of a NN.

Figure 8 The neural network output
The result of the simulation presenting that it is easy for a mobile robot to perform the required motion from the starting position to the target is depicted in Fig. 9. Fig. 9 also shows the movement of the mobile robot in the workspace in a manner that follows the reference trajectory. The accuracy during trajectory navigation was 0.05 m at a speed of 0.2 m/s. Ideal monitoring of the reference trajectory is visible, which means that there will be no large deviations of the current position of the mobile robot from the reference position.
From Fig. 9 is seen the uniform motion of the mobile robot towards the target, as confirmed next in Fig. 10 where there are no sudden jumps of control magnitudes. One of the most important questions in mobile robotics is whether it is possible to implement simultaneous localization and mapping (SLAM) simultaneously if the location of the robot is unknown and its surroundings are unknown. Then the robot step-by-step enlarges and builds a coherent map of its surroundings while determining its own.

CONCLUSION
The article described the design and implementation of a new trajectory tracking controller for the differential drive of AVG on a developed robot platform. The physical AGV platform can be improved by the addition of one heading sensor for precise measurement of the heading angle of the robot. This feature will eliminate the drifting error of the robot due to encoder readings and highly improves the tracking performance. Thus, the experimental results obtained confirm the justification hypotheses about the robot's mechatronic system ability to learn, using multisensory information obtained from an external sensorcamera and artificial NN systems.
In the paper was given the neural network's architecture and implementation for the approximation of a general multi-input multi-output function. The authors discussed and analysed the choice of training algorithm and neural network parameters. This control algorithm can handle disturbances and unstructured unmodeled dynamics that are part of any environment that AGV wants to navigate. To compensate for the nonlinear terms in the system is needed no knowledge of the system dynamics especially when a newly developed AGV platform with unknown parameters and inner layers is used for the tracking performance.