## 9 Algorithms, AI Models and Digital Twins
### Digital Twins in Agricultural UGVs  
Different definitions of Digital Twins (DTs) exist in the literature [154; 155; 156]. To date, five specific categories of DT have been identified: real entity, virtual entity, communication, data, and service layer. The most generic and widely adopted DT definition was reported by [154]: \"A Digital Twin is a dynamic and self-evolving digital/virtual model or simulation of a real-life subject/object representing the exact state of its physical twin at any given point of time via exchanging the real-time data as well as keeping the historical data\". DTs have been used in various environments, ranging from manufacturing to agriculture, with notable advantages in relation to speeding up prototyping and product improvements, reducing costs and waste in testing, preventing/predicting malfunctions, and continuous monitoring [157]. In agriculture, DTs have been used with positive results to model individual plants or entire fields of the same vegetable in order to predict the optimal harvesting period, to estimate potential yield [158], for the management of nutrients in the soil, or for irrigation scheduling and the prevention of pathogens [159; 160; 161; 162; 163; 164]. The use of UGVs for continuous crop monitoring fits well in this context, as they can greatly contribute to the collection of high-quality data, such as clouds of 3D points from plants, which are used to create dynamic and accurate 3D models of the crops over time. On the other hand, there are very few examples of the use of DTs for agricultural robots, as reported by [118; 155]. This is due to several intrinsic constraints: (1) the limited computational resources and power management conflict with the need for real-time and complex simulations of DTs; (2) high-speed and reliable internet connections are often unavailable in rural areas, making it impractical to exchange data with a remote/cloud platform; (3) scalability issues arise because each farm has unique characteristics (soil, water, weather, crop varieties) requiring specific modeling; and (4) the agricultural environment is highly dynamic and unstructured, making it difficult to accurately reflect real-world conditions in the virtual model and keep them constantly synchronized. Due to these issues, DTs are not widely used in agricultural UGVs because the virtual model and/or continuous information exchange is often absent. However, (i) the recent availability of novel edge devices with good computational power paired with low energy consumption and (ii) the shift from a purely cloud-based approach to a predominantly edge-based paradigm, can significantly mitigate these problems. In contrast, a virtual representation of the rover and its operating environment is created to simulate tasks in a deterministic and safe manner, for design and test purposes. Various robot simulation platforms, such as Gazebo, WeBots, and the latest Nvidia Isaac Sim, are available for prototyping and validating robot designs and algorithms (see Section 6.2) without the need for real-life execution. These simulation platforms accurately replicate both the functional and non-functional characteristics of the robot, allowing for observations of its behavior and reactions as if it were interacting in the real world. Robot simulations are already used in industry to design and test physical structures [165] and battery management, but it is also possible to train DL algorithms used by UGVs for navigation, detection, and recognition tasks. Once a satisfactory performance is achieved, the model can be transferred to the physical rover for real-world use. This approach reduces the development time, minimizes the need for field experiments and sensor calibration, and allows for repeatable tests without impacting the real field, thus avoiding potential damage or the disruption of operations [166]. An intermediate approach called Hardware-In-The-Loop (HILT) is supported by some simulation frameworks.