Research Article Mechatronic Modelling of Industrial AGVs: A Complex System Architecture J. Enrique Sierra-Garcı́a 1 and Matilde Santos 2 1Department of Electromechanical Engineering, University of Burgos, Burgos 09006, Spain 2Institute of Knowledge Technology, Complutense University of Madrid, Madrid 28040, Spain Correspondence should be addressed to J. Enrique Sierra-Garcı́a; jesierra@ubu.es Received 3 November 2020; Revised 26 November 2020; Accepted 8 December 2020; Published 30 December 2020 Academic Editor: Aydin Azizi Copyright © 2020 J. Enrique Sierra-Garćıa and Matilde Santos. .is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Automatic guided vehicles (AGVs) are unmanned transport vehicles widely used in the industry to substitute manned industrial trucks and conveyors..ey are now considered to play a key role in the development of the Industry 4.0 due to their temporal and spatial flexibility. However, in order to deal with the AGV as a potential mobile robot with high capacities and certain level of intelligence, it is necessary to develop control-oriented models of these complex and nonlinear systems. In this paper, the modelling of this vehicle as a whole is addressed. It can be considered composed of several interrelated subsystems: control, safety, driving, guiding and localization, power storage, and charging systems..e kinematics equations of a tricycle vehicle are obtained, and a controller is proposed. An extended hybrid automata formalism is used to define the behaviour of the safety and the control systems, as well as their interaction. In addition, the electrical equivalent circuit of the batteries, charger, and the motors is studied. .e architecture of the holistic model is presented. Simulation results of the AGV in a workspace scenario validate the model and prove the efficiency of this approach. 1. Introduction Automatic guided vehicles (AGVs) are unmanned transport vehicles widely used in the industry to substitute manned industrial trucks and conveyors [1]. .ey have been proved an efficient element in factory workspaces, helping to reduce logistic errors and operative costs. Many researchers in manufacturing systems recognize the following Industry 4.0 (I4.0) design principles: inter- operability, virtualization, decentralization, real-time capa- bility, service orientation, and modularity. All these principles are connected in some way with the operative of the AGVs. For example, AGVs can easily readjust their program ensuring real-time reaction to unexpected changes in the logistic flows of the production plan. .ey can also operate in a decentralized way, without any central server commanding orders. On the other hand, several I4.0 key enabling technologies have been identified in the literature tomake these principles possible: autonomous robots, additive manufacturing, simulation, system integration, cloud computing, Internet of things, cybersecurity, augmented reality, and big data. AGVs are included into the category of autonomous robots as one of these technologies. In addition, this AGV can be easily interconnected and integrated with other machines and devices in the plant by its input/output subsystem. More- over, these AGVs generate a large amount of data which are transported by IOT protocols such as MQTT, stored and processed by cloud computing systems, and can be exploited by big data technologies to obtain KPIs and optimize the production. For all these reasons, they are now considered to play a key role in the development of the Industry 4.0. Even more, the new concept of collaborative mobile robots seeks the convergence of AGVs and collaborative robots [2]. However, this synergy demands to deal with the AGV as a potential mobile robot with high capacities and certain level of intelligence. .us, the necessity of control-oriented Hindawi Complexity Volume 2020, Article ID 6687816, 21 pages https://doi.org/10.1155/2020/6687816 mailto:jesierra@ubu.es https://orcid.org/0000-0001-6088-9954 https://orcid.org/0000-0003-1993-8368 https://creativecommons.org/licenses/by/4.0/ https://creativecommons.org/licenses/by/4.0/ https://creativecommons.org/licenses/by/4.0/ https://creativecommons.org/licenses/by/4.0/ https://doi.org/10.1155/2020/6687816 http://crossmark.crossref.org/dialog/?doi=10.1155%2F2020%2F6687816&domain=pdf&date_stamp=2020-12-30 models of these complex and strong nonlinear systems is clear. Even more, to take these robots to a further step, understanding their behavior and establishing safety re- quirements are a must. .is will allow them to advance from assembly tasks to a genuine human-robot collaboration. An AGV is a multivariable complex mechatronic system composed of several subsystems and with a strongly coupled dynamics. Each of the main elements of an AGV influences its dynamics. .e power storage affects the control per- formance and the motion of the AGV. In turn, the control influences the power consumption and thus the power storage. An AGV usually works in a space shared with other robots, so these other vehicles or even people are perceived as obstacles by the safety subsystem that modifies the working conditions accordingly. Even more, AGVs are normally used to automate lo- gistics and production flows. .ese processes involve managing a fleet of robots traveling on the same scenario. Indeed, it is considered a multilayer problem [3], where several issues have to be addressed: the design of the layouts, the warehouse and the production plant, the storage strategies, the traffic scheduling, algorithms to share the charging stations, path planning, navigation, routes assig- nation, and so on. To take all of these simultaneous processes into account, a global model is necessary. .is model will also allow to improve the efficiency of these vehicles and the production optimization. In this paper, we address the modelling and simulation of an AGV as a whole. First, an architecture that relates all the subsystems that are part of the AGV is proposed. .en, each of them has been described and mathematically modelled: the control, safety, driving, guiding and locali- zation, power storage, and charging systems. Besides, the kinematics and dynamics equations of the vehicle are de- veloped. .ey have been implemented for a real industrial complex AGV, a hybrid tricycle-differential one. .is ho- listic approach gives realistic results in the simulations of the vehicle, which allows us to validate the models. .e main contributions of this work can be summarized as follows: (i) .e development of a general and high level of the abstraction model of an AGV. It has been divided into subsystems whose models can be used to im- plement different types of AGVs. (ii) .e identification of all the interactions between the subsystems and its integration. (iii) .e development of the mathematical model of the dynamics of a hybrid differential-tricycle AGV (this hybrid differential-tricycle AGV has not been pre- viously studied in the literature). (iv) .e mathematical description of the safety sub- system and the control subsystem based on the hybrid automata formalism. .is approach is completely original. (v) .e implementation of this general model into a specific model of a real industrial AGV, the Unibot AGV of the company ASTI Mobile Robotics [4]. (vi) .e integration of the kinematics, dynamics, and electrical equations in the simulation of this type of AGV. .e rest of the paper is organized as follows. Section 2 presents a brief state of the art on the AGV modelling. In Section 3, the architecture of the AGV is developed. .e description and equations of the different subsystems which compose it are presented in Section 4. Simulation results on a working scenario are discussed in Section 5..e document ends with the conclusions and future works. 2. Related Works .e first paper published on the design and operation of AGV systems was the work by Maxwell and Muckstadt, in 1982 [5], where a methodological framework for specifying the operational characteristics of an automatic guided ve- hicle system was presented. Since then, the research on this topic has not stopped growing. Nevertheless, the works found in the literature mainly tackle the system focusing on individual aspects of the AGV: kinematics, control, charg- ing, and so on, that are not independent. Indeed, the ma- jority focus on its kinematics and control, or the localization algorithms, or the power storage, or the charging system, but they lack a holistic approach of the guided vehicle as a whole system. .ere have been several attempts to model the AGV, for example, Veiga et al. compared vehicle models of a tugger- trolleys system with three linked towed. One model is a complete multibody model of the system. .e second is a simplified version composed of vertical and handlingmodels for motion in a plane, assuming no planar forces on the trolleys' front wheels and linking the vehicles with multibody joints and body, representing the coupling arms, developed in Modelica language. Results show good agreement be- tween the models but the second one was much faster and provided more stable results [6]. A kinematical and dynamical analysis of a mobile robot belonging to the configuration classical tricycle is shown in [7]. For the kinematical analysis, authors consider a robot capable of locomotion on a surface by the action of wheels mounted on the robot. .e dynamics of the nonholonomic mobile robot is obtained based on the Euler–Lagrange methodology. .e paper is focused on the analysis of global asymptotic stability of a new position controller for this wheeled mobile robot. In [8], authors state that the complexity of AGV dy- namics and the difficulty of obtaining the actual vehicle dynamic parameters have led them to use two nonmodel- based control approaches. .e robot is equipped with a front-centered steerable wheel and fixed parallel rear wheels. .ey present a comparison of control techniques for robust docking maneuvers of an AGV, specifically, fuzzy control and vector pursuit that do not require a mathematical model of the vehicle dynamics. Recently, Montazerijouybari et al. proposed a mathe- matical model based on the kinematics of 2-DOFAGVs with differential driving wheels and caster wheels in order to 2 Complexity 8503, 2020, 1, D ow nloaded from https://onlinelibrary.w iley.com /doi/10.1155/2020/6687816 by U niversidad D e M alaga, W iley O nline L ibrary on [07/12/2024]. See the T erm s and C onditions (https://onlinelibrary.w iley.com /term s-and-conditions) on W iley O nline L ibrary for rules of use; O A articles are governed by the applicable C reative C om m ons L icense predict the behaviour of the robot when the vehicle is carrying heavy loads not well distributed on it. A trajectory tracking control of an AGV based on sliding mode control with an improved reaching law is proposed in [9]. .e AGV in this paper has two driving wheels and two universal wheels. .ey consider a fully functional AGV composed of the motion mechanism, the sensing system, and the control system. Authors do not consider the rest of the systems of the vehicle. .e work designs a double closed- loop control method to control the vehicle to track the given trajectory. With the same control-oriented aim, in [10], the analysis of the kinematics and dynamics of a four-wheel omnidirectional automated guided vehicle is presented. .ere are other AGV-related topics that are dealt with in this paper, such as localization and navigation. In many cases, the routes implemented by these vehicles are subject to constant changes and are adapted to the currently assigned task. .us, the sensors that allow the AGV to follow the path are an important element of the guided vehicle. Although usually the vehicle sensors are not modelled, the most common ones have been studied. Just a couple of examples are as follows. An intelligent path recognition system for vision-guided AGVs, able to tackle noise in the images captured by using a CCD camera, is presented in [11]. .e paper addresses some of the most challenging problems for a vision-based AGV running in a complex workspace and improves the accuracy and reliability of vision recognition of guide paths for AGVs by means of artificial intelligence methods. Authors in [12] proposed an interesting method to measure the wheel radius. .is radius is not constant, and in the case of automated guided vehicles using odometry, this is a key information to calculate the position of the vehicle. Stetter et al. designed virtual sensors that estimate forces and torques acting on an AGV [13]. However, this AGVs consists of four sprung arms that each dispose of one drive motor. For this system, they obtain a simple description of the AGV dynamics and then develop a set of virtual sensors that enables estimation of the forces and torques. Indeed, authors say that they try to avoid the use of complex tire models. .e study is meant for several diagnostic purposes such as fault detection or fault prevention. Another AGV component, the charging system, has been also the object of study by some authors. For instance, a battery management simulation is developed for evaluating battery-related costs under various AGV operation modes and for designing battery management strategies [14]. Hou et al. developed a novel energy modelling method which allows to calculate and predict the AGV energy consumption [15]. However, in this work,we do not consider energy ef- ficiency either the design of the battery, but the simulation of the electrical performance of the AGV’s battery. .e charging method is out of the scope of this paper. Finally, there are several works about the control of a fleet of AGVs. A detailed state of art on the design and control of several AGVs is presented in [16]. In this paper, author discusses the literature concerning the usage of AGVs in manufacturing and other new areas of these vehicle application, namely, distribution, transshipment, and transportation systems. As a conclusion, the author states that the most important differences between the usage of AGVs in manufacturing areas and in other environments can be noticed in the number of AGVs used. Besides, the author claims the necessity of analytical and simulation models which simultaneously address multiple design and control problems. Different vehicle platooning control strategies are presented in [17, 18]. As shown above, most of the studies found in the lit- erature are mainly focused on individual aspects of the AGV design problem: kinematics, control, guiding, energy, and so on. However, these components are not independent; in- deed, these subsystems are highly coupled. .erefore, a holistic and complete vision of these automatic vehicles is missing, where the interactions among their various ele- ments are evident in the models used so that the simulation is realistic. 3. Description of the Industrial AGV Architecture .ere are different ways to split up an AGV into its different parts. We have considered the following interconnected subsystems that describe the whole behaviour of the vehicle: driving system, guiding and localization system, safety system, motors, power storage and charging, and control system. .ese elements interact with the working envi- ronment. Figure 1 shows the AGV architecture with all the mentioned systems and their relationships. .e control system can be considered the brain of the AGV. Depending on the localization, on the external inputs and the current state, it adjusts the charging system, gen- erates target signals for the driving system, commands the outputs, and adjusts the safety system. .e driving system collects the dynamic and kinematic of the AGV motion; it changes the position and orientation of the AGV and modifies the working environment. It also gives information about the current to the control system in order to close the control loop. .e driving system is the component that demands more energy from the power system. .e safety system detects obstacles in the safety zone and warns the control system; it can even trigger an emergency stop. .e charging system is responsible for recovering the energy of the power storage system. .is subsystem is usually placed out of the vehicle when there is not enough space in the AGV. .e power storage is in charge of pro- viding energy to the electronic components and the motors. .e guiding and localization system (GLS) manages AGV position and attitude measures, which are used by the control system. Depending on the technologies used to implement the GLS, this information will have greater precision. .ere are technologies, such as simultaneous localization and mapping (SLAM), which provide infor- mation about the absolute coordinates (x, y, angle) of the AGV with high accuracy. Others only provide the deviation respect to a predefined trajectory, either marked on the floor or buried, such as magnetic antennas, optical sensors, and so on, and must be complemented with a localization system such as RFID tag sensors (low accuracy) or UWB devices (medium accuracy) to know the absolute position. Complexity 3 8503, 2020, 1, D ow nloaded from https://onlinelibrary.w iley.com /doi/10.1155/2020/6687816 by U niversidad D e M alaga, W iley O nline L ibrary on [07/12/2024]. See the T erm s and C onditions (https://onlinelibrary.w iley.com /term s-and-conditions) on W iley O nline L ibrary for rules of use; O A articles are governed by the applicable C reative C om m ons L icense On the other hand, the input/output system allows to introduce information to the AGV from other external sources: machines, operators, and so on, and extract in- formation. Finally, the workspace represents the external environment and everything that can produce any changes to the AGV behaviour. In this paper, we are going to model a hybrid differential- tricycle AGV. .is vehicle has been selected because now- adays is one of the most used AGVs in the industry. An example of this type of AGVs is the Unibot AGV of the company ASTI Mobile Robotics [4], represented in Figure 2. .e Unibot is mainly used to convey loads by pulling carts. .is vehicle is robust, simple, flexible, and reliable and well-established in the market vehicles. .ough with re- duced dimensions, it has great load capacity. It is fully connected in real time. .is industrial tow AGV can be used in whatever in- dustry where medium loads need to be towed. However, it achieves its full potential in enterprises where recurrent flows of pieces and/or products exist. .ey can be applied in any SMEs and large companies (for further information on enterprise categories see [19]) although it is commonly found in the automotive industry as it is one of the most automatized sectors. Moreover, it is easy to include them in already functioning enterprises as these automatic guided vehicles do not require to modify the infrastructure in order to implement the layout. Indeed, the layout can be usually easily removed and moved to adapt it to changes in the production plant. However, also in companies that are going to start the production, it is possible to design the plant taking into account the layouts of the AGVs to optimize the intralogistics. In addition, it has many other functionalities such as magnetic guidance/navigation system (surface/buried), online charging system, safety laser for internal environ- ment, safety PLC, and emergency stop button, among others. .is is a complex system because it has two wheels as a differential robot and a tricycle configuration in the front part. Most of the models found in the literature work as differential robots. 4. Modelling of the AGV’s Subsystems 4.1. Driving System. .ere are many types of AGVs re- garding the kinematics, but four different models can be typically identified: tricycle, differential, quad, and omni- directional. Figure 3 shows some standard configurations of the wheels for these AGVs. Depending on the number and type of the wheels, the kinematic constraints and the control variables of the vehicle will vary. .e drive wheels provide traction but cannot change its direction..e steer wheels can change the direction but cannot provide traction. .e steer and drive wheels provide both things, and they are also called motor-wheels. All of these wheels are subjected to nonholonomic constraints to prevent wheel lateral slipping..is can disrupt the control of the vehicle and must be avoided. By contrast, the omnidirectional wheels only provide traction, but they are not affected by the nonholonomic constraints. In fact, the omni-wheels are equipped with rollers to enable the lateral slipping. .e Unibot AGV [4] is a mixture of tricycle and dif- ferential. .e traction head is a differential robot; mean- while, the body is linked with the traction unit by an axle, and it performs as a tricycle. .e wheels of the body do not provide traction but support the weight of the vehicle and allow the body to follow the traction head. As said before, the driving system includes the dynamics and the kinematics of the AGV motion. .erefore, in this section, both the kinematic and dynamic models of the hybrid tricycle-differential AGV are developed. To do it, the kinematic equations of the individual traction tricycle and differential units are combined in a novel way as the hybrid tricycle-differential AGV has not been previously studied in the literature. In addition, the dynamic model of the vehicle has been developed by the authors using the Newton–Euler fundamental equations of the translational and rotational dynamics. Figure 4 represents the mechanical components of this AGV and the coordinate system (traction head, green square and AGV body, blue rectangle). .e center of the wheels of the traction head in the inertial coordinate system is rep- resented by (xh, yh), and the position of the center of the wheels of the body is (xb, yb), both in m. In this inertial frame, the attitude of the body isΦb (rad) and the attitude of the head is Φh (rad); the angle between the body and the head is c (rad). Lb is the distance between (xb, yb) and (xh, yh) in m, and Lh is the distance between the wheels of the traction unit in m. .e equations of the traction head are given by the kinematic model of a differential robot [20]. .at is, _xh � Vl + Vr 2 cos Φh( 􏼁, _yh � Vl + Vr 2 sin Φh( 􏼁, _Φh � Vr − Vl Lh . (1) On the other hand, the motion of the body follows the equations of a tricycle: Guiding + localization system Driving system Safety system Control system Workspace Power storage Charging system AGV Input/ output system Figure 1: Subsystems AGV architecture. 4 Complexity 8503, 2020, 1, D ow nloaded from https://onlinelibrary.w iley.com /doi/10.1155/2020/6687816 by U niversidad D e M alaga, W iley O nline L ibrary on [07/12/2024]. See the T erm s and C onditions (https://onlinelibrary.w iley.com /term s-and-conditions) on W iley O nline L ibrary for rules of use; O A articles are governed by the applicable C reative C om m ons L icense _xb � vhcos(c)cos Φb( 􏼁, _yb � vhcos(c)sin Φb( 􏼁 _Φb � vh Lb sin(c), (2) where vh is the longitudinal velocity of the steering drive (m/ s), i.e., the traction head speed. .ese equations (1) and (2) are linked by the following expressions: vh � ������ _x 2 h + _y 2 h 􏽱 � Vl + Vr 2 , c � Φh −Φb, cmin ≤ c≤ cmax, (3) where cmin and cmax are the mechanical limits of the angle of the traction head (rad). .ese mechanical limits are set to avoid damage in the wires between the body and the traction head. Besides, in order to prevent sliding in the wheels, the following constraints must be met, equation (4) for the rear wheels and equation (5) for the front wheels: _xbsin Φb( 􏼁 − _xbcos Φb( 􏼁 � 0, (4) _xbsin Φb + c( 􏼁 − _xbcos Φb + c( 􏼁 − _ΦbLbcos Φb( 􏼁 � 0, (5) with Lb is the distance between the center of the traction head and the rear axle. By the translational and rotational Newton–Euler dy- namic equations, the following expressions that represent the forces and momentums are obtained: mT · Rh 2 mT · Rh 2 Ih · Rh Lh − Ih · Rh Lh ⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣ ⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦ €θr €θl ⎡⎢⎢⎢⎢⎢⎣ ⎤⎥⎥⎥⎥⎥⎦ � Mer + Mel( 􏼁 2Rh − frT Mer − Mel( 􏼁Lh 2Rh − MrR ⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣ ⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦ , frT � 0.5 · δair · SAGV · Caero · v 2 h􏼐 􏼑 · sign vh( 􏼁 + g · mT · Croll · sign vh( 􏼁, MrR � Fvh · _Φh + Fsh · sign _Φh􏼐 􏼑, Mer � Mr − Fvw · _θr − Fsw · sign _θr􏼐 􏼑, Mel � Ml − Fvw · _θl − Fsw · sign _θl􏼐 􏼑, (6) where mT (kg) is the total mass of the system, that is, the mass of the AGV, mAGV (kg), plus the mass of the load, mL (kg); the radius of the wheels in the traction unit is Rh (m); Ih is the rotational inertia of the traction unit (kg m2); €θr and €θl are the angular accelerations of the right and left wheel of the traction unit (rad/s2), respectively;Mer and Mel are the effective torques in the right and left wheel of the traction unit (Nm); frT is the translational friction force (N); MrR is the friction torque (Nm); δair is the density of the air (Kg/ m3); SAGV is the front surface of the air (m2); Caero is the aerodynamic coefficient; Croll is the rolling coefficient; g is the acceleration of the gravity; Fvh and Fsh are the viscous and static friction coefficients in the traction unit (Nm and Nms/rad); Fvw and Fsw are the viscous and static friction coefficients in the wheels (Nm and Nms/rad); Mer and Mel are the torques produced by the motors (Nm); and sign is the sign function. .e effect of the inertia of the wheels has been neglected. It has been supposed that the AGV is working in an indoor environment, and the wind speed is zero. Moreover, in the simulations, the slippage has been considered. .e slippage happens when the traction force exceeds the surface friction force. .e traction forces in the front wheels are given by Mer/Rh and Mel/Rh. .erefore, to avoid the slippage, the following constraints must be fulfilled: Mer Rh < g · mTμ 4 , Mel Rh < g · mTμ 4 , (7) Figure 2: Unibot AGV. Drive Steer Steer and drive Omniwheel (a) (b) (c) (d) Figure 3: Wheel configurations in AGVs: (a) differential; (b) tricycle; (c) quad; (d) omnidirectional. Body Traction head Axle X Y (xb, yb) (xh, yh)Lh Lb Фb Фh γ Figure 4: Unibot AGV driving system and the coordinate system. Complexity 5 8503, 2020, 1, D ow nloaded from https://onlinelibrary.w iley.com /doi/10.1155/2020/6687816 by U niversidad D e M alaga, W iley O nline L ibrary on [07/12/2024]. See the T erm s and C onditions (https://onlinelibrary.w iley.com /term s-and-conditions) on W iley O nline L ibrary for rules of use; O A articles are governed by the applicable C reative C om m ons L icense where μ is the friction coefficient..e number 4 that appears in the denominator means that the weight of the AGV is equally distributed into the four wheels. 4.2. Safety System. In this section, we develop the mathe- matical model of a general safety subsystem applying a new approach to do this, the hybrid automata formalism. .e safety system is in charge of preventing collisions with humans and objects. .e safety norms establish that the AGV must stop in the near presence of obstacles. .is normally leads to introduce a processor in the safety system to take the control and trigger an emergency stop command when the control system is not operative. Figure 5 shows the interactions between the driving, the safety, and the control systems. .e safety system monitors the velocities of the wheels (vl, vr) by encoders. If the current longitudinal velocity is higher than the predefined current safety velocity, vsafe, during a configurable period of time, then the safety system fires an emergency stop procedure. .is is represented in Figure 5 as the stop signal. Normally, this is carried out by acting directly on the brake of the vehicle or on themotors..e control system is also informed about this anomaly situation by the stop signal. On the other hand, the control system notifies the safety system about what type of safety zones must be activated at each moment. .ese safety zones are polygonal areas where there cannot be obstacles. Each zone has a code∈N and a maximum velocity, vsafe ∈R (m/s), which is calculated considering the deceleration rate of the AGV to ensure that it is able to stop before a collision. .e control system knows the location of the AGV and, for instance, if the AGV is towing a trolley, the safety zonesmust be big enough to cover it. Moreover, if the AGV is going to turn left, the safety zones must be defined on this side of the AGV. If the safety system detects an obstacle inside the safety perimeter, it automatically sends the code of the zone to the control system, with the signal code, and updates the safety velocity. .e AGV safety system is equipped with different types of sensors: mechanical, ultrasounds, infrared, or LIDAR, to detect the obstacles. In the Unibot AGV, the safety system has a PLC and a LIDAR sensor installed in the front of the vehicle. .e safety zones can be mathematically defined as a set Zi⊆R 4 of pairs of points relative to the center of the LIDAR (xLID, yLID). In addition, each safety zone can be classified as warning zone or error zone. .erefore, by the union of all zones, it is possible to conform the set Zones⊆Zi × N × R. .e LIDAR returns a set of distancemeasures,PDIST, that are defined in polar coordinates as follows: PDIST ⊂ (r, θ) ∈ R< rmax( 􏼁 × θC|, ∀ r1, θ1( 􏼁, r2, θ2( 􏼁θ1 � θ2⇒r1 � r2, θC ⊂ θ ∈R|θ � (i − 1) · res + θmin, i ∈N≤Np. (8) .e size of this set is Np � res · (θmax − θmin), where res is the angular resolution, and θmin and θmax are minimum and maximum angles detected by the LIDAR. .is set may be transformed to Cartesian coordinates by the following function: fxy: PDIST⟶R 2 , PXY � fxy(r, θ) � (rcos(θ), ρsin(θ)). (9) (1) .e subset of allowed zones, ZonesEN⊆Zones, is obtained according to the type of zone, typezone, selected by the control system..e safety PLC checks if any of the points in PXY belongs to the set of allowed zones by the function: fzone: PXY⟶ ZonesEN (9). fzone(x, y) � ∅, 0, vsmax( 􏼁, ∀(z, c, v) ∈ ZonesEN |(x, y) ∉ Polygon(z), (z, c, v) ∈ ZonesEN|(x, y) ∈ Polygon(z), ∃(z, c, v) ∈ ZonesEN|(x, y) ∈ Polygon(z), ⎧⎨ ⎩ (10) where the function Polygon(z): Zi⟶ (R,R)M gives the list of points within the perimeter of the safety zone. If there is not any obstacle in an allowed safety zone, the zone given by (10) is (∅, 0, vsmax), being vsmax (m/s) the AGVmaximum velocity..is vsmax is usually defined in the datasheet of the vehicle, and it normally goes from 0.8m/s to 2m/s. If more than one zone is obtained by (10), the safety velocity, vsafe, is set as the minimum safe velocity. .is can be expressed as follows: vsafe � MIN v|(z, c, v) � fzone(x, y), ∀(x, y) ∈ PXY( 􏼁. (11) .e model of the safety controller can be described by the hybrid automata formalism. A hybrid automata is a formal model that combines discrete control graphs, usually called finite state automata, with continuously evolving variables. An extension to the hybrid automata H defined in [21] is a tuple H � (Q, X, U, Y, Init, D,Dom, E, G, R), where (i) Q is a set of discrete variables, and Q is countable. Also it is also known as the set of discrete states of the automata. (ii) X is a set of continuous variables, that is, the set of continuous state variables of the automata. (iii) U is a set of input variables. 6 Complexity 8503, 2020, 1, D ow nloaded from https://onlinelibrary.w iley.com /doi/10.1155/2020/6687816 by U niversidad D e M alaga, W iley O nline L ibrary on [07/12/2024]. See the T erm s and C onditions (https://onlinelibrary.w iley.com /term s-and-conditions) on W iley O nline L ibrary for rules of use; O A articles are governed by the applicable C reative C om m ons L icense (iv) Y is a set of output variables. (v) Init⊆Q × X × U is a set of initial states. (vi) D: Q × X × U⟶ TX is a vector field of the differential equations. (vii) Dom: Q⟶ P(X) assigns a domain to each q ∈ Q. (viii) E ⊂ Q × Q is a collection of discrete transitions. (ix) G: E⟶ P(X × U, X × U) assigns a guard condition to each e � (q, q′) ∈ E. (x) R: E × X × Y⟶ P(X × Y) assigns a reset rela- tion to each e � (q, q′) ∈ E and x ∈ X. Let Q � q1, q2, q3, q4􏼈 􏼉 be the set of discrete variables; X � t{ } is the set of continuous variables; U � vl, vr, typezone, PDIST􏼈 􏼉 is the set of input variables; Y � stop ∈ 0, 1{ }, vsafe, code􏼈 􏼉 is the set of output vari- ables, and Init � q1, t � 0, stop � 0􏼈 􏼉 ∈ Q × X × U is the initial. When the variable stop � 1, the emergency stop is triggered. As expected, the safety controller receives as inputs the velocity of the wheels, the type of allowed zones, and the points measured by the LIDAR; its output is the stop signal, the current safe velocity, and the code of the active safety zone. .e differential equations are given by D q1, x( 􏼁 � D q3, x( 􏼁 � 0,D q2, x( 􏼁 � D q4, x( 􏼁 � 1. (12) .e domains are Dom(q1) � Dom(q3) � 0, Dom(q2) � t ∈R< t2􏼈 􏼉, and Dom(q4) � t ∈R< t4􏼈 􏼉. In addition, the discrete transitions are given by E � q1, q2( 􏼁, q2, q1( 􏼁, q2, q3( 􏼁, q3, q4( 􏼁, q4, q3( 􏼁, q4, q1( 􏼁􏼈 􏼉. (13) .e guard conditions are the following: G q1, q2( 􏼁 � t, vl, vr, typezone, PDIST( 􏼁􏼈 ∈ X × U | vl + vr( 􏼁 2 > vsafe typezone, PDIST( 􏼁􏼉, G q2, q1( 􏼁 � t, vl, vr, typezone, PDIST( 􏼁􏼈 ∈ X × U | vl + vr( 􏼁 2 ≤ vsafe typezone, PDIST( 􏼁􏼉, G q2, q3( 􏼁 � t, vl, vr, typezone, PDIST( 􏼁􏼈 ∈ X × U |t≥ t2􏼉, G q3, q4( 􏼁 � t, vl, vr, typezone, PDIST( 􏼁􏼈 ∈ X × U| vl + vr( 􏼁 2 ≤ vsafe typezone, PDIST( 􏼁􏼉, G q4, q3( 􏼁 � t, vl, vr, typezone, PDIST( 􏼁􏼈 ∈ X × U| vl + vr( 􏼁 2 > vsafe typezone, PDIST( 􏼁􏼉, G q4, q1( 􏼁 � t, vl, vr, typezone, PDIST( 􏼁􏼈 ∈ X × U| t≥ t4􏼉, (14) where vsafe is calculated as a function of typezone and PDIST by equations (9)–(11) and t2 and t4 are parameters of the safety controller which can be adjusted by the user. .e reset relations can be expressed as follows: R q1, q2, x, stop( 􏼁 � 0, stop � 0􏼈 􏼉, R q2, q1, x, stop( 􏼁 � t, stop � 0􏼈 􏼉, (15) R q2, q3, x, stop( 􏼁 � t, stop � 1􏼈 􏼉, R q3, q4, x, stop( 􏼁 � 0, stop � 1􏼈 􏼉, (16) R q4, q3, x, stop( 􏼁 � t, stop � 1􏼈 􏼉, R q4, q1, x, stop( 􏼁 � t, stop � 0􏼈 􏼉. (17) .e outputs: vsafe and code, are calculated in the same way for all discrete states, by equations (10) and (11); thus, they have not been included in (15)–(17). To summarize, if an obstacle is detected in a warning zone, the maximum allowed speed is reduced. If the obstacle is in an error zone, the maximum speed is au- tomatically set to zero. In both cases, the control system receives a warning, and it must follow the commands of Safety system Control system Drive system Stop Stop Typezone Code vsafe(vl, vr) Figure 5: Interactions between driving system, safety system, and the control system. Complexity 7 8503, 2020, 1, D ow nloaded from https://onlinelibrary.w iley.com /doi/10.1155/2020/6687816 by U niversidad D e M alaga, W iley O nline L ibrary on [07/12/2024]. See the T erm s and C onditions (https://onlinelibrary.w iley.com /term s-and-conditions) on W iley O nline L ibrary for rules of use; O A articles are governed by the applicable C reative C om m ons L icense the safety system. If the safety systemdetects that theAGV velocity is higher than the allowed speed for a period of time, the safety chain is broken and the vehicle is stopped. 4.3. Guiding and Localization System .e guiding and localization functionalities of the AGV can be implemented by only one device, such as a navigation system based on laser reflectors or the SLAM navigation systems. Both technologies are commonly complemented with the use of an accurate odometry of the vehicle [22]. To combine this in- formation that come from different sensors, a Kal- man filter or another similar mathematical tool can be used. However, there are situations, such as slippage produced by an inadequate load distribution or a slippery surface, where the estimation of the speed using only the encoders of the wheels is not possible. In these cases, an inertial measurement unit (IMU) embedded in the vehicle can help to estimate the AGV velocity. However, this solution increases the cost of the AGV, and thus many mobile robots are not equipped with the IMU neither implement a Kalman filter. .is is the case of the AGV studied here. As it will be explained below, in this AGV, guiding and localization are decoupled. Guiding (understood as deviation from the expected trajec- tory without localization) is provided by the mag- netic sensor, and the localization is provided by a RFID reader. .e guiding system allows us to know the deviation between the AGV and the path defined in the working environment. .ere are different types of guiding sensors: optical ones (to follow a painted line), magnetic ones (to follow a magnetic tape), inductive ones (to follow a buried wire), and so on. In the AGV used in the study, the guiding is based on a magnetic sensor. .e localization system detects points of reference placed in the working environment, with a known specific location on the plane. .ese reference points may be sensed by an optical device (QR codes), a magnetic device (magnetic spots), an electromagnetic device (RFID tags), and so on. .is way the AGV can know its own location through references..e accuracy of the localization system is half the distance between two points. In the standard Unibot robot, the locali- zation is RFID-based. .e traction unit of the AGV equipped with the guiding sensor and the magnetic tape on the floor is shown in Figure 6..e guiding sensor gives the error signal errgui, that is, the deviation respect to the planned trajectory. If the sensing point is at the right of the magnetic tape, the error is considered positive; otherwise, it is negative. 4.4. Control System. .emain contribution of this section is the formal description of a general control subsystem of the AGV, as well as the identification of the interactions with the other subsystems. Figure 7 shows the interaction between the subsystems driving and safety, the guiding and location systems, as well as the internal structure of the control system (orange dashed rectangle). .e control system has three internal blocks: the control unit, the velocity control, and a block called MIN that calculates the minimum of its inputs. .e control unit has as inputs the localization variable from the GLS and the stop signal from the safety system. Its outputs are the reference of the cruise velocity, vref , and the type of safety zone, typezone, associated to the section of the route where the AGV is currently located. .e inputs of the MIN block are vref and vsafe (from the safety system). It selects theminimum of them and calculates the effective velocity that the AGV should have, vfoll. Finally, the velocity control module is in charge of generating the control signals for themotors (ul, ur) in order to track the reference longitudinal velocity vfoll and to minimize the error signal, errgui. To do it, it receives the velocity of the wheels (vl, vr) from the driving system and the error signal errgui from the GLS. Even more, it is notified if the stop signal is triggered, and it also receives the ref- erences for the wheel speeds (man, uml, umr) directly from the user if the manual controller is on. It interacts with the workspace through a set of input/output signals (IOsignals). .e velocity control is carried out by the function fvcon, which receives as inputs vfoll (m/s) from the MIN block, errgui (m) from the GLS, (vl, vr) (m/s) from the driving system, (uml, umr) (m/s) from an external control device, and the digital signals (stop,man) ∈ 0, 1{ }2. .e stop signal, as it was explained, comes from the safety system..eman signal is generated in an external control device. It is 1 when the manual external controller device is on and 0 otherwise. .e output of the fvcon function is the pair of control signals for the motors (ul, ur) ∈ u ∈R| − t1n≤ quh≤ 1􏼈 􏼉 2. .us, this function fvcon(vfoll, errgui, vl, vr, uml, umr, stop,man): R6× 0, 1{ }2 ⟶ u ∈R| − t1n≤ quh≤ 1􏼈 􏼉 2 can be defined as follows: 8 Complexity 8503, 2020, 1, D ow nloaded from https://onlinelibrary.w iley.com /doi/10.1155/2020/6687816 by U niversidad D e M alaga, W iley O nline L ibrary on [07/12/2024]. See the T erm s and C onditions (https://onlinelibrary.w iley.com /term s-and-conditions) on W iley O nline L ibrary for rules of use; O A articles are governed by the applicable C reative C om m ons L icense _Φhref � PID errgui􏼐 􏼑 � KΦP · errgui + KΦD · _errgui + KΦI 􏽚 errgui, (18) vlref � vfoll − _Φhref · Lh􏼐 􏼑 2 , vrref � vfoll + _Φhref · Lh􏼐 􏼑 2 , (19) ul, ur( 􏼁 � fvcon(. . .) � (0, 0), if stop � 1, uml, umr( 􏼁, if stop � 0∧man � 1, PI vlref , vl( 􏼁,PI vrref , vr( 􏼁( 􏼁, if stop � 0∧man � 0. ⎧⎪⎪⎨ ⎪⎪⎩ (20) As it may be observed in (19), when stop signal is active, the motor targets are set to 0. However, when the manual mode is active, the external velocity control signals (uml, umr) are changed to (ul, ur). On the other hand, if the automatic mode is on (last statement in (20)), the control output is generated by a couple of PID controllers, in particular a PI controller per wheel. .e targets for the left and right wheels are vlref and vrref , respectively. .ese targets are calculated by equation (19) using as inputs the longi- tudinal velocity reference, vfoll, and the angular velocity reference, _Φhref . .e angular reference is computed by a PID to compensate the guiding error, errgui. As explained before, the control unit is in charge of assigning the type of safety zone, typezone, and a cruise velocity reference, vref . A lookup table is generated by the user with localization as input and this information. Likewise with the safety controller, the control unit can be modelled as a hybrid automata. It has three macrostates: automatic, manual, and safety stop. .erefore, the set of discrete states is QCS � auto,manual, safestop􏼈 􏼉; the set of continuous variables is XCS, that is, defined by the user according to the actions to be carried out by the AGV.UCS � Localization,man, inpprog􏽮 􏽯 is the set of input variables and YCS � typezone, vref , outprog􏽮 􏽯, where the inputs inpprog and outputs outprog are configured by the user in the lookup table. .e initial state is Init CS � auto, typezone � 0, vref � 0􏼈 􏼉 ∈ QCS ×XCS × UCS. .e set of discrete transitions is given by ECS � (auto,manual), (auto, safestop), (manual, auto), (manual, safestop), (safestop, auto),(safestop,manual)􏼈 􏼉. (21) Current sensing point 0 – + Guiding sensor Magnetic tape errgui Figure 6: Guiding sensor of the AGV. Vel. control Driving system Control unit Guiding + loc Safety system Min Control system Localization vref vfoll 10signals Typezone vsafe errgui Stop (ul, ur) (vl, vr) (man, uml, umr) Figure 7: .e control system and the interaction with other subsystems. Complexity 9 8503, 2020, 1, D ow nloaded from https://onlinelibrary.w iley.com /doi/10.1155/2020/6687816 by U niversidad D e M alaga, W iley O nline L ibrary on [07/12/2024]. See the T erm s and C onditions (https://onlinelibrary.w iley.com /term s-and-conditions) on W iley O nline L ibrary for rules of use; O A articles are governed by the applicable C reative C om m ons L icense .e set of guard conditions are given by GCS(auto,manual) � G(safestop,manual) � man � 1∧ stop � 0􏼈 􏼉, GCS(manual, auto) � G(safestop, auto) � man � 0∧ stop � 0􏼈 􏼉, GCS(auto, safestop) � G(manual, safestop) � stop � 1􏼈 􏼉. (22) .e hybrid automata is defined for each macrostate: Hauto, Hman, and Hstop by a tuple H � (Q, X, U, Y, Init, D,Dom, E, G, R), as defined before. In this work, we are going to focus on Hauto because it has more interactions with the rest of subsystems. When in the au- tomatic macrostate, the set of discrete states is QCSauto � wconi,marchi􏼈 􏼉 i ∈N