**5. Benefits and application of AI and IoT in date palm cultivation**

Advances in technology have led to the integration of AI and IoT into the date palm farming sector, aiming to improve yield, reduce costs, and increase efficiency. One recent development in AI and IoT in date palm cultivation is using sensors to monitor soil moisture. These sensors are connected to a central system that uses AI algorithms to analyze the soil moisture data and determine the time and amount of irrigation water requirement. This approach has been shown to reduce water consumption by up to 30–60% and improve date palm yields. Another application of AI and IoT in date palm cultivation is using drones for crop monitoring. Drones equipped with cameras and other sensors collect data regarding plant health, growth rates, and other factors affecting palm growth and yield. This information can then be analyzed using ML algorithms to identify patterns and predict future crop performance. In addition to these applications, AI and IoT are also used to optimize fertilizer usage, predict weather patterns, and automate the harvesting time of different date palm varieties. For example, autonomous robots with AI algorithms can harvest dates more efficiently than human laborers, reducing costs and increasing productivity [20, 29, 63, 65].

In many parts of the world, date palm cultivation is a significant economic activity. Using AI and IoT technology in date palm farming can have several economic benefits. Enhanced crop management efficiency is one potential benefit. AI-powered

#### *Applications of AI and IoT for Advancing Date Palm Cultivation in Saudi Arabia DOI: http://dx.doi.org/10.5772/intechopen.113175*

sensors can monitor soil moisture, aerial temperature, humidity, and other environmental variables that impact the development and production of date palms. Date palm growers can optimize irrigation schedules, fertilizer applications, and disease and pest management strategies by analyzing AI and IoT data, leading to higher crop yields and lower input costs. Improved quality control is another potential benefit. AI algorithms can examine images of date palm trees to identify signs of water stress, diseases, or nutrient deficiencies. This can help farmers identify problems early and resolve them before they worsen. IoT devices can also track the shipment of date palm offshoots from the field to the market, ensuring that they are treated carefully and adhere to quality standards. Increased market access is a third potential advantage. Farmers can produce higher-quality dates that fetch higher prices in domestic and foreign markets by applying AI and IoT technology to enhance crop management and quality control.

Furthermore, IoT devices can deliver real-time information about market demand, allowing farmers to modify their production strategies accordingly. AI techniques made identifying different date palm varieties possible through leaf and fruit image scanning. In general, date palm farming could benefit from AI and IoT technology by increasing productivity, enhancing quality assurance, and giving farmers more market access. The economic benefits of these technologies are expected to significantly increase as they develop and become more accessible [19, 20, 30, 32, 38, 43, 142–144].

The following are some of the applications of AI and IoT that have been employed for advancing date palm cultivation technology:

#### **5.1 Date palm irrigation management**

Fresh water is an urgent priority in semiarid- and arid regions. With the steady increase in population, water is urgently needed to irrigate palm trees and increase the production of dates, food products rich in nutrients necessary for human health. The reclaimed and desalinated water can be used for irrigation, but these technologies' high energy and cost hinder this irrigation utilization [19, 145]. There is a need for intelligent irrigation and standalone photovoltaic systems, and new smart irrigation techniques to ensure sustainable energy and water for agriculture [20, 21, 146]. Mohammed et al. [29] implemented AI to predict optimum water and energy requirements for solar-powered sensor-based microirrigation systems. This study is a good example of how AI can improve agricultural practices. The study also found that the optimum water use efficiency was achieved when the maximum setpoints of irrigation control were adjusted at the field capacity and by adjusting the minimum setpoints at 40 of the available water for the subsurface irrigation system. The optimum yield was achieved by adjusting the minimum setpoints for subsurface irrigation, subsurface drip irrigation, and bubbler irrigation, respectively. Several ML algorithms were used in the study, including support vector regression (SVR), long short-term memory (LSTM) neural network, linear regression (LR), and extreme gradient boosting (XGBoost) were developed and validated for predicting the optimum irrigation water and solar energy requirements based on the limited meteorological data (average temperature, RH, wind speed, and solar irradiance) and date palm age for each microirrigation system used. The study evaluated the performance of the ML models using three performance metrics of root mean square error (RMSE), coefficient of determination (R2 ), and mean absolute error (MAE). The dataset was prepared at various levels for 4 years to train and test the prediction models, and the fifth year was used to validate the performance of the most suitable model. The evaluation

of the ML models indicated that the LSTM and XGBoost models were more accurate than the SVR and LR models in predicting the optimum irrigation water and energy requirements. The validation results showed that the LSTM model could predict the water and energy requirements for all irrigation systems with R<sup>2</sup> values ranging from 0.90 to 0.92 based on date palm age and limited meteorological variables. The authors stated that the benefits of implementing AI in sustainable farming include predicting optimum water and energy requirements for sensor-based microirrigation systems powered by solar PV, contributing to sustainable farming practices. They also highlighted the potential significance of AI in effectively overseeing irrigation water scheduling. AI could achieve this by handling gathered data and comprehending the evolving weather patterns, soil, and plant conditions throughout the cultivation phases. The LSTM model they created could serve as a potent instrument for supervising water allocation in date palm cultivation [29].

Consequently, AI's influence extends to water conservation in irrigation, fostering plant development, and augmenting crop yield. In addition, the study's results have significant implications for sustainable agriculture in arid regions. By using AI to predict the optimum irrigation requirements, farmers can save water and energy while still achieving optimal yields. This is essential for ensuring the long-term sustainability of agricultural production in arid regions [29].

A previous study highlighted the benefits of using the Internet of Things (IoT) in agriculture, especially irrigation management. Mohammed et al. [38] developed an automated system for scheduling irrigation using a cloud-based IoT platform, which positively impacted the yield of date palm and water use efficiency using FTTT (If This Then That) interface and Ubidots platform. **Figure 1** shows the main components of the cloud-based IoT platform used to monitor the meteorological variables in real time and control the irrigation water scheduling of the irrigation systems. The figure illustrates the flow of data from the sensors to the cloud platform and the control of the irrigation system through the Arduino UNO board and IFTTT interface. The meteorological variables were collected by the sensors and transmitted to the Arduino microcontroller in real time through the Wi-Fi module. The microcontroller

#### **Figure 1.**

*A simple diagram for the components of the cloud-based IoT system employed for real-time monitoring of the meteorological parameters of the study area and managing water scheduling for date palms.*

#### *Applications of AI and IoT for Advancing Date Palm Cultivation in Saudi Arabia DOI: http://dx.doi.org/10.5772/intechopen.113175*

then sent the data to the Ubidots platform, where the user could access the real-time data through the graphical user interface using the private channel. The electronic relays of contactors, electronic valves, and irrigation pumps were controlled using the IFTTT interface to schedule the irrigation water of the irrigation system.

Implementing IoT procedures and creating sophisticated sensors for smart agriculture exert a significant influence on both crop yield enhancement and the preservation of irrigation water. Furthermore, integrating cloud computing and IoT advancements has bolstered the interaction and remote oversight between users and their agricultural operations. This enhancement permits multilayered cloud IoT and computing frameworks to orchestrate, supervise, and administer crop cultivation within a comprehensive automated structure. This has the potential to tackle the challenges posed by limited water availability and insufficient labor in the agricultural sector. The operation was overseen through a cloud-based IoT platform, allowing users to remotely observe the farm and retrieve pertinent meteorological information. This data empowered users to make informed decisions, considering the irrigation microcontroller's existing parameters. The IFTTT interface seamlessly integrated with the irrigation hardware, introducing functionalities that managed irrigation valves and pumps or dispatched SMS notifications to users based on their predefined actions. The IoT system optimized water use in date palm cultivation and improved yield and water use efficiency. In addition, the Ubidots platform was used in this study to monitor the meteorological variables data. The platform allows users to connect, visualize, and analyze data from various sources, including sensors, devices, and applications. The Ubidots platform provides a graphical user interface (GUI) that allows users to create custom dashboards, charts, and widgets to visualize data in real time. The platform also provides tools for data analysis, including statistical analysis, machine learning, and predictive analytics. This study used the Ubidots platform to collect and store real-time meteorology measurements on the farm to analyze and visualize the irrigation parameters [38].

Mohammed et al. [20] employed cloud-based IoT solutions to control a modern subsurface irrigation system in date palm farms in the arid region of Saudi Arabia, which improved irrigation management. They designed and constructed a fully automated controlled subsurface irrigation system (CSIS) and validated its performance to monitor the irrigation process remotely. An efficient control system for subsurface irrigation utilizing marvelous cloud computing and IoT capabilities was used to manage date palm water. The user can be automatically notified by either a short or email message. The optimum water per tree can be applied by controlling the subsurface irrigation system in a date palm field. The methodology used in this study involves designing and implementing a cloud-based CSIS for date palm trees. CSIS is an IoT-based system that employs cloud computing and various sensors to monitor and control the subsurface irrigation system for date palm trees. A sensor-based subsurface irrigation scheduling (S-BIS) was considered. Based on the data received from the sensors, the amount of water can be scheduled. The measured data from sensors is uploaded to the ThingSpeak cloud platform for analyzing and sending the decision to the subsurface irrigation system. **Figure 2** shows the designed system that used the direct measurement of volumetric water content to make irrigation decisions, meanwhile monitoring different factors such as ambient air temperature, relative humidity, solar intensity, wind speed, and water flow rate per minute. The results indicated that the automatically irrigating date palm trees controlled by S-BIS were more efficient than the time-based irrigation scheduling (T-BIS). The amount of irrigation water was reduced by 64.1% and 61.2% based on S-BIS and T-BIS, respectively, compared to traditional surface irrigation

#### **Figure 2.**

*A schematic diagram for the IoT-based control system for a smart subsurface irrigation for enhancing irrigation management of date palm.*

(TSI). The yearly sum of irrigation water employed for CSIS utilizing the S-BIS technique, CSIS using the T-BIS approach, and TSI stood at 21.04, 22.76, and 58.71 m3 /tree, respectively. When integrated with the S-BIS methodology, the devised CSIS approach yields favorable outcomes regarding irrigation water administration and a subsequent improvement in date palm fruit yield within arid regions [20].

The IoT-based control system efficiently schedules the irrigation water to administer to the date palm at different intervals, relying on data from various sensors. The system collects measurements from these sensors, transmits the data to the ThingSpeak cloud platform for analysis, processes the information in the cloud, reaches conclusions, and then implements these conclusions into the subsurface irrigation system. The benefits of using IoT technology in this study include more efficient water management, improved crop yield, and reduced water waste. Additionally, the system can be remotely monitored and controlled, reducing the need for manual labor and increasing the accuracy of date palm irrigation management [20].

#### **5.2 Tissue culture systems management**

The smart *ex vitro* acclimatization systems (SEVAS) for tissue culture plantlets aim to minimize the initial shock of newly regenerated *in vitro* plantlets. This benefit decreases their mortality and improves their growth characteristics. In addition, the potential advantages of using SEVAS for tissue culture plantlets in agriculture include reduced production costs, reduced manual labor, enhanced product quality, and improved environmental sustainability. Utilizing automation is a pragmatic approach, particularly considering the extensive and time-consuming nature of *in vitro* propagation. This is especially true when dealing with limited outputs during the acclimation phase due to the mortality of plantlets. The benefits of automating the acclimatization process also encompass lower contamination risks and reduced labor expenses. Contemporary precision agriculture methods, such as glasshouse technology, are predominantly characterized by automation. In contrast, the combination

#### *Applications of AI and IoT for Advancing Date Palm Cultivation in Saudi Arabia DOI: http://dx.doi.org/10.5772/intechopen.113175*

of information technology and IoT solutions has advanced significantly, ensuring effectiveness and efficiency [43, 147, 148].

Mohammed et al. [43] designed an IoT-based automated system for the SEVAS to acclimate tissue culture plantlets. The designed system uses IoT technology to monitor and control the environmental conditions of the glasshouse, including temperature, humidity, and light intensity. The system also includes a feedback mechanism that adjusts the environmental conditions based on the real-time data collected by the sensors. The advantages of employing IoT technology in this research encompass the immediate tracking of crops and microclimate, surveying and mapping fields, and providing data to farmers for implementing well-founded strategies in farm management. These strategies aim to enhance efficiency, conserve time and resources, and elevate crop yield. Furthermore, IoT technology is progressively gaining traction within agriculture, facilitating the adoption of environmentally friendly on-farm methods and fostering improved ecological sustainability.

**Figure 3** provides an overview of the IoT-based control and monitoring system for the SEVAS in the study. The figure shows the primary components of the system, comprising sensors, a microcontroller, an internet connection, the IoT platform hosted on the cloud, control apparatus, and web-based applications. These components are interconnected and harmonized to facilitate control and monitoring functionalities. The figure also depicts the trajectory of data from the sensors to the cloud-based IoT platform and the control devices responsible for overseeing the microclimate variables within the E-VAS system. The cloud-based IoT platform stores and analyzes the data and sends control signals to the control devices, which include relays for controlling the heating unit, cooling units, ultrasonic humidifier, and water pump and irrigation valves. The control devices adjust the SEVAS microclimate factors based on the sensors' data and the control signals from the cloud-based IoT platform [43].

#### **5.3 Cold storage management**

Cold storage is essential in food, vegetables, and fruit preservation. Refrigeration in remote areas away from the electricity grid needs an off-grid power system.

#### **Figure 3.**

*A simple diagram for the components of the IoT-based controlling and monitoring system of the SEVAS for tissue culture plantlets.*

Photovoltaic (PV) solar energy is an important power source for operating off-grid refrigeration. Due to a reduction in PV system cost, solar-powered refrigerators have become more economical [30, 71, 149, 150]. Refrigerators are considered one of the types of equipment that consumes a significant amount of electricity. Hence, reducing energy consumption and efficient systems are most important to reduce greenhouse gas emissions and the costs of PV systems [30, 151]. Eltawil et al. [152] developed and evaluated a machine learning-based intelligent control system (ICS) using artificial neural networks (ANN) for the performance optimization of solarpowered display refrigerators (SPDRs). The SPDR functioned initially at a consistent frequency of 60 Hz, and subsequently, it was operated at various frequencies ranging from 40 to 60 Hz. An integrated ANN-based ICS facilitated this frequency adjustment with a variable speed drive. An independent PV system provides the energy necessary for its operation. The performance of the newly developed SPDR was assessed and contrasted against its performance under a conventional control system (TCS). These evaluations were conducted at refrigeration temperatures of 1, 3, and 5°C, which align with ambient temperatures. The researchers employed an ANN-based regression model to enhance the SPDRs. The ANNHUB software's ANN technique created an optimal predictive model. This model was used to forecast the requisite power and ideal frequency for the SPDR, leveraging training data.

The Levenberg–Marquardt algorithm was employed in the training phase, allocating 75% of the data for training and 25% for testing. This algorithm optimized the weights in a composite estimation of outputs, thereby refining the prediction model. **Figure 4** shows the ANN architecture used in this study had a three-layered network consisting of one input layer, a hidden layer, and an output layer. The input layer has six nodes of six independent variables: target temperature (T1), ambient temperature (T2), cabinet temperature (T3), solar radiation intensity, and temperature differences of T2-T1 and T2-T1. The optimum hidden layer was one and contained eight nodes. The output layer had a single dependent variable, frequency, which was also standardized. The outputs were the optimum frequency to control the compressor speed and the required power. The approach used provided a more efficient and reliable means of control. The study suggests that using ML to optimize the performance of solarpowered refrigerators can lead to several potential benefits. For example, it can help

#### **Figure 4.** *The ANN architecture of the intelligent control system to optimize the performance of solar-powered refrigerators.*

#### *Applications of AI and IoT for Advancing Date Palm Cultivation in Saudi Arabia DOI: http://dx.doi.org/10.5772/intechopen.113175*

improve the reliability and efficiency of the control mechanism, save the required solar PV energy, and provide a basis for designing and optimizing PV-powered refrigeration systems. Furthermore, the research demonstrated that this approach can be extended to other refrigeration systems, offering a more effective and dependable regulation method [152].

IoT technology for managing cold storage facilities provides real-time system environment monitoring, allowing timely responses to any issues. This technology can give reliable data on the quality of food products during their storage duration, which can help with intelligent food quality management. Furthermore, the application of IoT technology in cold storage revolves around monitoring factors influencing the quality of stored products, with the goal of safeguarding them against potential contamination arising from external conditions. Among these crucial factors, cold storage rooms and warehouses focus on tracking parameters such as relative humidity (RH), temperature, alcohol gases, and light [71, 153].

Mohammed et al. [30] designed a smart IoT-based control system to manage cold storage facilities remotely. This study is a good example of how IoT can improve food safety and quality control. The study found that the IoT-based control system could precisely control the modified cold storage room, provide reliable data about the interior microclimate atmosphere, and send the necessary alerts in an emergency. This indicates that the IoT-based control system can improve the safety and quality of food products stored in cold storage rooms. The study also found that the IoTbased control system had no significant effect on the quality of date fruits stored in the modified cold storage room compared with the traditional cold storage room. This indicates that the IoT-based control system can maintain the quality of food products stored in cold storage rooms without affecting their taste or nutritional value. The study's results have significant implications for the food industry. By using IoT to monitor and control cold storage rooms, the food industry can reduce the risk of food spoilage and improve the quality of their products [30, 71]. **Figure 5** shows the main components of the designed IoT-BC. The figure illustrates the various elements of the system, including the IoT microcontroller, sensors, and cloud platform. The IoT microcontroller collects data from the sensors, which monitor various parameters such as temperature, humidity, and light. The collected data is then transmitted to the cloud platform, where it is analyzed in real time. The cloud platform is also responsible for sending notifications to the user in case of any issues that may arise [30].

#### **5.4 Postharvest management**

Climate change positively impacts date palm fruit growth and development by delaying fruit ripening, reducing color development and quality, inadequate pollination, fruit sunburn, poor fruit quality and fruit set, and lowering fruit yield [154, 155]. Date palm fruits can be ripened artificially using controlled temperature and relative humidity, such as the fruit drying process. Mohammed and Alqahtani [144] designed an automated sensor-based artificial ripening system (S-BARS) integrated with ultrasound pretreatment for unripe Khalas Biser fruits of date palm. They developed a straightforward technique for data acquisition and system control. Data on temperature and relative humidity were monitored using six DHT22 sensors. An Arduino Mega board collects the data sent by these sensors. **Figure 4** shows real-time data acquisition for temperature and relative humidity inside the treatment chamber of the designed S-BARS integrated with Arduino and Excel.

**Figure 5.** *A schematic diagram of IoT-based control system for cold storage room.*

The control system in the study is an automated sensor-based artificial ripening system (S-BARS) that combines ultrasound pretreatment with automated sensors to enhance the ripening process of date fruits. The S-BARS are controlled by an opensource microcontroller board (Arduino Mega) and three relays (RL1, RL2, and RL3) that control the heating unit, ultrasonic humidifier, and main power of the S-BARS. The system also includes six DHT22 sensors that collect data on temperature and relative humidity (RH) and send the data to the Arduino Mega board's open-source microprocessor (ATmega328P). The acquired data is displayed in real time on a liquid crystal display (LCD) and stored in Microsoft Excel using the PLX-DAQ Excel Macro. The control system allows for precise monitoring and control of the ripening process, which can improve the quality and yield of date fruits [144].

Mohammed et al. developed ANNs-based models for predicting date fruit quality attributes based on their electrical properties during cold storage. This study is a good example of how machine learning can be used to improve food safety and quality control. The study found that ANNs were more accurate than multilinear regression (MLR) models in predicting the physicochemical properties of date fruits during cold storage. Therefore, ANNs can be used to develop nondestructive methods for predicting the quality of date fruits. Ensuring a consistent provision of premium fruits to meet market requirements is paramount. The research also identified that the most effective prediction model utilizing ANNs comprised an input layer with 14 neurons, a single hidden layer with 15 neurons, and an output layer with four neurons. The study's findings have significant implications for the food industry. By using ANNs to predict the quality of date fruits, the food industry can reduce the amount of food waste, improve the quality of their products, and meet the demands

*Applications of AI and IoT for Advancing Date Palm Cultivation in Saudi Arabia DOI: http://dx.doi.org/10.5772/intechopen.113175*

#### **Figure 6.**

*A simple block diagram of the employed ANNs prediction model for prediction of fruit quality based on their electrical properties during cold storage.*

of consumers. The study is a valuable contribution to food safety and quality control. The study's results have significant implications for the food industry, and food manufacturers and policymakers should consider them [78]. **Figure 6** shows a block diagram of the applied ANNs prediction model. The ANNs predict date quality parameters of the pH, total soluble solids (TSS), water activity (aw), and moisture content (MC) of date fruits during cold storage, which is based on 14 electrical parameters of the capacitance value at the series equivalent circuit model (Cs, nF), the dissipation factor (D), the equivalent series resistance (Rs, kΩ), the equivalent parallel resistance (Rp, kΩ), the capacitance value at the parallel equivalent circuit model (Cp, nF), the inductance value in the series equivalent circuit model(Ls, H), the inductance value in the parallel equivalent circuit model (Lp, H), the resistance (R, kΩ), the direct current resistance (DCR, kΩ), the reactance (X, kΩ), the absolute value of the impedance (Z, kΩ), the phase angle (θ°, degree), the phase radian (θ, rad), and the quality factor (Q ).

Srinivasagan et al. [156] used a TinyML-based multispectral sensor for the shelf life estimation of fresh date fruits packed under modified atmospheres. This sensor uses ML algorithms to estimate the shelf life of fresh dates based on various fruit properties such as moisture content, total soluble solids, tannin content, and sugar content. **Figure 7** shows a block diagram of the applied ANNs prediction model. The ANNs predict shelf life and fruit quality based on 18 spectroscopy reflectance, packaging types, and storage temperatures. The ANN used in the study has three layers: an input layer with 20 nodes, two hidden layers, and an output layer with one node. The input layer collects the AS7265x Triad optical sensor data *via* the I2C port of the Arduino Nano33 BLE Sense microcontroller. The hidden layers perform data transformation and feature extraction. The output layer is a single neuron that produces a continuous output value. The ANN layers are designed to predict the shelf life of fresh date fruits based on various fruit properties such as color, texture, and temperature. The authors conducted experiments to validate the sensor's accuracy and found that it could accurately estimate the shelf life of fresh dates. This technology can potentially improve the efficiency of the date fruit industry by reducing waste and increasing

#### **Figure 7.**

*A simple block diagram of the applied ANNs model for estimating shelf life and quality of date fruit using multispectral sensor during storage under modified atmospheres.*

profits. The study also found that modified atmosphere packaging (MAP) can extend the shelf life of date fruits. The researchers observed variations in fresh fruit shelf life estimations across the three main stages of fruit maturity from the Khalal to the Tamr stage. The study suggests that using TinyML for shelf life estimation can improve the efficiency of the date fruit industry by reducing waste and increasing profits. Overall, the study provides a promising approach for estimating the shelf life of fresh date fruits using TinyML and low-cost sensors [156, 157].

#### **5.5 Pest management**

One of the most critical problems of date palm mite control is an objective decision-making method for monitoring and predicting date palm mite infestation on date fruits. Mohammed et al. developed, evaluated, and validated prediction models for date palm mite infestation on fruits based on meteorological parameters, i.e., relative humidity, temperature, solar radiation, and wind speed and the physicochemical parameters of date fruits, i.e., firmness, weight, moisture content, total sugar, total soluble solids, and tannin content, using two ML models, i.e., linear regression and decision forest regression. The study is a good example of how ML can improve agricultural practices. The study found that the decision forest regression model was more accurate than the linear regression model in predicting the date palm mite based on the input parameters. This indicates that the decision forest regression model can be used to consider several factors that can affect the infestation of date fruits by the date palm mite. The study's results have important implications for date palm cultivation. The study also found that the developed model could predict the date palm mite count on date palm fruits based on the combination of meteorological and physicochemical properties variables. Farmers can take preventive measures to protect their crops by using ML to predict the date palm mite infestation. This can help to reduce the impact of the date palm mite on the date palm industry and ensure the availability of high-quality dates [66]. **Figure 8** illustrates an experiment to predict date pam infestation on date palm fruits based

*Applications of AI and IoT for Advancing Date Palm Cultivation in Saudi Arabia DOI: http://dx.doi.org/10.5772/intechopen.113175*

#### **Figure 8.**

*A screenshot for the architecture of the developed models using Microsoft Azure Machine Learning.*

on the study area's meteorological parameters data, the date fruits' physicochemical parameters data during the development stages, and the combined data of meteorological variables and physicochemical properties.
