Smart Agriculture for Sustainable Food Security Using Internet of Things (IoT)

. Internet of Things (IoT) is being used in various parts of human life (domestic and commercial) to provide ease in living, safety, increase productivity, monitoring, and resource optimization in various industries. Agriculture is one of them, where IoT and robots are being used before and after the cultivation process, from preparing land for cultivation to supplying them to the consumer market. These domains include crop monitoring, smart irrigation, pest monitoring, and smart pest control, harvesting, and safely supplying them in the consumer market by maintaining the quality and integrity of the ﬁ nal product. Pakistan is an agricultural country, where it stands in terms of advanced agriculture technology. In this review, we discussed the major IoT ecosystem components. What are the most practiced smart agriculture techniques and their bene ﬁ ts and some widely used applications of IoT in agriculture? Through this overview, we are trying to highlight the potential of IoT in agriculture for sustainable food security for Pakistan.


Introduction
Food security is becoming the biggest challenge to the world as by 2050 the world's population is predicted to reach 9.7 billion which is 20.6% of the current population [1]. Also, the rate of urbanization is accelerated, with 68% of the world population expected to be urbanized in 2050 [2], which was 54% until 2018 [3] which will reduce available arable land. On the other hand, not all the land on earth is arable because of some factors like soil quality, climate, topography, and high variability factors within the homogeneous land. Furthermore, the rate of arable land declining surpasses the rate of recovery because of pollution, soil erosion, and land degradation [4]. All these issues are inclined toward the adoption and advancement of agriculture. Pakistan is an agricultural country, and agriculture contributes 19.5% to the country's Gross Domestic Product (GDP) and provides 38.5% of employment of the national labor force [5]. Agriculture in Pakistan is declining because of water scarcity, old practices, and uneducated farmers. Unfortunately, Pakistan follows downward in agriculture, mostly focusing on chemical fertilizers and pesticides and genetically modified organism (GMO) seed, although GMO crops proved to be beneficial as cash crops for Pakistan; it is harmful to biodiversity, especially in Pakistan producing 95% of yield as Bt-cotton and hybrid maize [6]. Pakistan is taking several initiatives for food security [5]. But there is no plan found for adaptation for technology; we did not even find any concrete interagriculture-information technology research in the last decade. Even the most viable solution could be the adoption of IoT systems in the processes of agriculture. The reasons could be Pakistan being a developing country, upfront cost, lack of budget for research and development (R&D), and undefined agriculture policies. After the emergence of the IoT, it changed the dimensions of different sectors and industries like health care [7], car monitoring systems [8], smart agriculture [9], smart cities [10], and smart homes [11]. The IoT is a system that does not require any machine-to-machine and human-to-machine interaction to perform any task, possesses the ability to transfer data over a network, and consists of multiple interrelated computing devices and digital and mechanical machines with unique identifiers (UIDs), which is relatively cheap as compared to previous existing technologies but still required researchers and industry attention.
IoT-based systems provide some major capabilities such as data acquisition and communication infrastructure (used to connect smart objects to end-user applications through the Internet), cloud-based intelligent data analysis, decision-making, end-user interface, and operation automation. These capabilities are opening new dimensions in the field of agriculture. This paper is a brief overview of the application of the Internet of Things in smart agriculture for sustainable food security. The overview consists of some practical case studies, white papers, and articles about how IoT could provide sustainable food production with minimal resources and what are challenges to begin with and what could be the possible approach to implementing the IoT-based ecosystem.

IoT Ecosystem's Equipment and Technology
IoT ecosystem is a combination of several technologies and equipment that are embodied by integrated systems that work seamlessly in their operations (Figure 1), representing the IoT system architecture. Data acuisition is done from the sensors and the data is transferred to the cloud architecture where desicions are taken to perform operations in the field based to provide insight for the end-user application. All components of the system work independently without having any human-to-human or human-to-machine interaction. Here are some common components that make this whole process seamless and integrated.
2.1. IOT Sensor Components/Technology. Smart agriculture cannot be possible without the sensor's technology. Sensors are used to gather and measure different factors and variables of environments that could affect crop yield. The success of precision agriculture is based on accurate sensor data acquisition for crop-and soil-specific management [12]. Almost all the equipment and vehicles (i.e., tractor, harvester, unmanned aerial vehicle, and sensor device) are equipped with remote sensing facilities like Geographic Information System (GIS) and Global Positioning System (GPS) for precise and autonomous site-specific operations. A wide range of IoT sensors available for monitoring applications can be classified into two categories. The first one is intelligent multipurpose imagery sensors, which could be embedded on unmanned aerial vehicle (UAV), rails, and fixed position components and could involve remote sensing [13]. Combined with deep learning, these sensors can reach their full potential and are capable of soil and vegetation/ crop mapping, crop phenology, crop height, estimation of yields, fertilizers' effect and biomass, plants water stress detection and drought conditions, pest detection and management, weed detection, and greenhouse monitoring [14]. The second type of sensor is more commonly used and specific to their use case and can be deployed at various locations on the field. The most common sensors are airflow, soil moisture, electrochemical, capacitive humidity, position, mechanical, optical, and temperature sensors. Table 1 represents sensor working and their use cases. Furthermore, there are some worth mentioning factors that make IoT sensors suitable for smart agriculture: (1) computational efficiency, (2) cost, (3) coverage, (4) durability, (5) memory, (6) portability, (7) power efficiency, and (8) reliability.

Unmanned Aerial Vehicles (UAVs).
Apart from the IoT ecosystem, UAVs is itself an emerging and self-existing technology that is a combination of various other technology stacks such as robotics, on-board computing, artificial intelligence (AI) [21], information and communication technology (ICT), IoT, and battery. The reason behind the popularity of UAVs is that it is filling the gap of limitation of remote sensing imaging through satellite because of weather and cloud penetration and on-ground limitation of robots because of uneven plains, obstacles, and speed. UAVs provide imaging with high resolution using hyperspectral, multispectral, and Red Green Blue (RGB) cameras [22]. It entails more accurate details of the field at a much cheaper cost.
UAVs are workable in monitoring as well as in the action phase of the application. Common usage of UAVs in two major phases of precision agriculture is as follows. First one is monitoring, where applications are soil and crop mapping and sampling [23], yield forecasting [24], weed detection [25], pest and disease detection [26], and soil and crop stress assessment [27,28]. The second one is an action phase where applications are sowing seed [29], spraying herbicides [30], pesticides [31], and fertilizer [32].
UAVs have two main types shown in Figure 2: fixedwing UAVs and rotary-wing UAVs. Fixed-wing UAVs are more similar to airplanes and more or less follow similar phenomena for flying; fixed-wing UAVs are more favorable to work on large areas because of the capability of long range, high speed and altitude, and crash tolerance. Rotary-wing UAVs have further classification such as helicopter and multirotary type; commonly, multirotary UAVs are named after their number of rotaries, i.e., four-rotary UAVs as quadcopter [33,34], six-rotary UAVs as hexcopter [35], and eight-rotary UAVs as octocopter [36]. Fly in a hovering manner similar to a helicopter. Rotary-wing UAVs have more advantages than fixed-wing UAVs such as being easy to set up and operate, low altitude flight, precise location operation ability, no wind planning required, and being fully autonomous for daily agriculture operations.
With all the ease, UAVs have some limitations as well.

Communication Technologies.
Smart agriculture is impossible without the inclusion of ICT. Data has no purpose if it cannot be sent to some database or cloud for further computing and analysis; it is considered the backbone of smart agriculture. There are several classifications in communication technologies based on their communication range, data rate bandwidth, power consumption, licensed or unlicensed spectrum, frequency band, and subscription prices. Every communication technology works better than others in different application scenarios which depend on what aspect is most important in that particular application. For each application scenario, some work best or some work worst. For example, Zigbee communication technology is more suitable for greenhouse agriculture monitoring, and Narrowband Internet of Technology (NB-IoT) and long range (LoRa) are more suitable for field precision agriculture [40]. Choosing communication technology for smart agriculture depends on multiple factors. Some factors are more prominent than the other; e.g., unlicensed spectrum technologies could have better bandwidth but come with some pitfalls such as radio frequency interference, insecure communication, infrastructure setup cost, and low range connectivity. Radio frequency identification (RFID), Bluetooth, Wi-Fi, and Zigbee are examples of unlicensed spectrum technologies. On the other hand, licensed spectrum technologies are reliable, provide accessibility for large areas, are secure, and have less infrastructure cost but have a subscription for data transmission and low data rate bandwidth as compared to the unlicensed ones. A survey suggests that ZigBee, Wi-Fi, and cellular technologies are  3 Wireless Communications and Mobile Computing more popular among researchers for agriculture applications. About 45% of Zigbee, 25% of Wi-Fi, and 20% of cellular or multihopping technologies are utilized by the researcher for their agriculture-related experiments [41]. Furthermore, NB-IoT and Long-Term Evolution Machine (LTE-M) are relatively new Low-Power Wide-Area (LPWA) technologies and could capture more attention as the 3rd Generation Partnership Project (3GPP), the standard group specifying the 5th generation mobile network (5G) and other wireless networking standards, has affirmed that these technologies are going to be a part of 5G and will be the only LPWA-supported 5G technology [42]. Table 2 shows some widely used communication technologies in smart agriculture.

Smart Agriculture Methods and Techniques
Humans have been trying to improve food production for centuries to meet food requirements. To achieve this task, they are adopting and applying different advanced agriculture techniques. After the emergence of IoT, advanced agriculture techniques like vertical farming, hydroponics, and phenotyping significantly improve their performance by utilizing IoT and becoming an essential part of them. It is costeffective and can help us in the efficient management of resources ranging from input resources, labor resources, and operational resources and also provide a high yield. Applications of technology are geospatial and temporal sam-pling and mapping, disease and pest monitoring, smart irrigation, and fertilization. Commonly used technologies and equipment are sensors, UAVs, IoT-based machinery and communication, etc.
3.1. Precision Agriculture. Precision agriculture existed long ago but it was not viable for small and medium farmers and even not viable for large farmers in developing countries like Pakistan, the challenges ahead like climate change, a gap in demand and supply of food, urbanization, and declining arable land are unavoidable. In this situation, the emergence of IoT is enabling a new dimension in precision agriculture, consisting of several already existing technologies such as WSN, RFID Gateways, cloud computing, communication protocols, middleware components and end-user inferface [49]. Communication protocol, middleware components, and end-user interface [49].
Precision agriculture is focused on the utilization of natural resources efficiently and protecting the natural environment. There are four steps to implement precision agriculture: characterizing the extent and scale of variability in soil and crop attributes, interpreting the significance and causes of variability, managing variability on a spatial and temporal basis, and monitoring the outcomes resulting from the variability management practices [50] that could only be done efficiently using the IoT. To wind up the discussion, Figure 3 illustrates the common hurdle in the adoption and implementation of technology in precision agriculture; on the other hand, Figure 4 indicates the key advantages of IoT in precision agriculture (PA). The precision agriculture adoption starting point could be yield monitoring by gathering data to develop spatial and temporal feature databases for management of land for interpretation and yield mapping.

Greenhouse
Farm. Greenhouse farming is more or less similar to precision farming with some subtle differences and purposes. The major difference is that greenhouse  Use of electrodes with hygroscopic dielectric material, to detect air moisture by electrical permittivity

Monitor humidity of soil and air in a controlled environment for irrigation and fertilization
Electrochemical [16] Use of electrodes to detect specific ions in the soil Properties like the macro and micro nutrients in the soil, salinity, and pH are measured Imagery and remote sensing [13] Use of multispectral cameras, hyperspectral cameras, IR cameras, and digital cameras to generate a digital image Monitor anomaly, weed, disease, pest, and crop mapping with the help of spatial, spectral, and temporal resolution Mechanical [17] Use to measure soil mechanical resistance to indicate the soil compaction To detect the force used by the roots in water absorption and useful for irrigation and soil inspection Optical [18] Use of light to measure soil properties Light reflectance phenomena used to determine clay content, color, minerals and their composition, organic matter, and moisture content of soil Position [19] Use of Global Positioning System (GPS) satellites to determine the latitude, longitude, and altitude The GPS provides precise positioning and backbone for GIS that is used for geospatial analysis Soil moisture [20] Use of electrodes to assess moisture levels by measuring the dielectric constant in the soil  farming is done in a closed or isolated environment or space where environmental parameters are controlled and managed by smart systems. Although greenhouse farming is not new, the information technology and IoT found applications that are aligned with greenhouse techniques like temperature, humidity control, and monitoring in the shed. The precise and continuous monitoring and controlling cannot be achieved without IoT and smart systems. Greenhouse space is comparatively smaller than open-field agriculture but yields more productivity than traditional methods. The Netherlands is one of the small countries and the second largest exporter of agricultural goods utilizing greenhouse farming and hydroponics variety of crops [51]. Through greenhouse farming, we can even utilize desert space for sustainable farming [52].

Urban Farming.
Urban farming is another revolutionary idea and a relatively new concept, with the fusion of different methods such as rooftop farming, indoor farming, vertical farming, hydroponics, aquaponics, and aeroponics; as already mentioned in the article, more population is shifting toward urban areas, and urban areas are the large consumer of food products. On the other hand, climate change and water scarcity affect agriculture harshly and are serious challenges for sustainable food security. Also, some other challenges are long distance between food producers and food consumers so there is a transportation and chain supply expense that impacts food quality, causing extra pollution by transport vehicles. Urban farming is a solution where people can grow food in their proximity to have fresh and cheap food. Urban farming is completely dependent on the precise control environment and system to grow day and night and a whole year without any season and weather impact. We can grow food in a closed box without any sunlight the whole year [53]. By realizing the potential of urban farming, Paris is taking a shift with its largest rooftop farm with an expectation to have 30 different types of plants, furthermore aiming to have more than 100 hectares of rooftops farms [54]. Similarly, the 100 ft below the ground abandoned space is well utilized for vertical farming in London [55].

Applications of IoT in Agriculture
In the smart era of agriculture, almost all the agriculture processes are data-driven that are acquired by continuous monitoring of on-site IoT devices. Applications of smart agriculture that can only be done by utilizing IoT are geospatial and temporal mapping and sampling [56], smart drip and sprinkler irrigation, pest and pathogen monitoring and controlling, yield assessment, precision fertilization, and environment maintenance. All these applications are briefly discussed below: 4.1. Geospatial and Temporal Mapping and Sampling. The simple and crucial application of precision agriculture can be used for crop field assessment and mapping. Applications that depend on the geospatial and temporal sampling are weed management systems, water stress assessments, and vegetation indexes. Also, it can be used for spatial variability assessment using GIS [57].
Geospatial can be done using remote sensing, aerial surveys using planes, and remote imagery using UAV. Initially, it was expensive and not as efficient as today. Because of satellite remote sensing and cloud distortion, UAV is costeffective and way more efficient and could be adopted as the first step for precision farming, even by farmers in developing countries like Pakistan.

Smart Irrigation.
As the world has been facing the challenge of water scarcity, Pakistan is becoming water scarce from a water-stressed country [58]. By using IoT and smart systems, weather adaptive smart irrigation systems can be implemented and reduce the usage of precious resource water [59]. Smart irrigation is designed to irrigate only if necessary, depending on the crop and soil stress level.

Wireless Communications and Mobile Computing
UAV is a great tool to deal with the variability factor of water stress; sprinkler irrigation can be done using UAV for precise irrigation on the spot [60].

Pest and Weed Management
System. Pest, weeds, and pathogens can affect the crop harshly and may reduce productivity by up to 30% only by weeds [61]. On the other hand, pesticides and herbicides also reduce the profit and degrade the product quality as well which is a big concern for the consumer. IoT and smart systems can assess the disease, pest, and weed in the crop in the early stages and can inform the farmer, also capable of eradicating the pest and pathogens by precise targeting with pesticides and herbicides; smart vehicles [62] can also be used for this purpose.

Yield Assessment.
Yield assessment is the most essential part of smart agriculture. For any type of assessment, data acquisition is the first step. Precise and continuous monitoring for the biotic and abiotic factors is only possible by IoT, WSNs, and UAV imagery. All these devices generate enormous amounts of unstructured data. The acquired data can be utilized for the early prediction of disease [63], crop prediction [64], and harvest planning [65]. Through these applications, farmers can reduce their labor cost and operation cost, can do the error-free assessment for diseases and pests, estimate the revenue and profit, and schedule and plan a more suitable harvesting period that results in less input cost and more profitability in the long run.

Precision Fertilization.
Another most important application of IoT for agriculture is that it can save money and the environment at the same time. Imbalance fertilization can cause multi-impact damage; i.e., sometimes plants require fewer nutrients; thus, excessive fertilizer may drain away or cause salinity in the soil which may rotten the plant, decrease productivity, cost you extra, and also cause climate change by evaporation. On the other side, if the plant required more nutrients, but was provided less, that also caused a decline in productivity and growth. Furthermore, fertilizer proportions of different elements such as nitrogen (N), potassium (K), and phosphorus (P) and water also matter because proportion depends on plant type, soil type, and weather; otherwise, crops cannot be productive. One more aspect is the variability which can only be handled through precision monitoring and mapping of land and crop. Smart IoT-based agriculture systems provide an optimal estimation of nutrient requirement [66] and reduce the labor cost and input costs.

Challenges and Solutions of Using IoT Devices in Smart Agriculture
The most significant limitation of using IoT devices is battery life and especially when using UAVs in agriculture is the flight time along with the battery. A thorough study has been performed, and this one is an open area for various solutions [67]. Many researchers have worked to reduce these hurdles and proposed and tested their solutions.
To enhance the UAVs' fly time, ultralightweight WPT systems were proposed [68]. The system is flexible enough to handle air-gap geometrical changes. The system is capable of charging UAVs in midair and extending the flight time to around 7 minutes. Their system can charge drones wirelessly with 10 W. In another work [69], a wireless charging system for UAVs was developed using capacitive power transfer (CPT) technology. This system can charge UASs on wide charging areas. Their system's emitting side is comprised of a circuit, transformar and inductors.The receiving side is comprised of all the small devices using semiconductor elements for a DC-DC converter and charge controlling IC. Their prototype system works on around 12 W and provides more than 50% efficiency.
While considering the magnetic resonant coupling technique due to its efficiency and capability of high power transfer, [70] has proposed and developed a wireless charging system for UAVs used in agriculture fields. In their experiments, they achieved maximum transfer power and efficiency by using FSC coil with 150 coil turns in the transmitter circuit and the MTC comprising 60 coil turns in the receiver UAVs.
Another major hurdle of using UAVs in smart agriculture is path loss while communicating wirelessly due to the surrounding environment, and an accurate path loss model is essential for smart agriculture applications to make sure wireless data communication without unnecessary packet loss among each component of the system. [71] has proposed and tested two improved models. Their simulation results show that the hybrid exponential and polynomial and particle swarm optimization models noticeably improved the coefficient of determination (R 2 ) of the regression line, with the mean absolute error (MAE) found to be 1.6 and 2.7 dBm for both algorithms. The Wireless Underground Sensor Network (WUSN) faces the same path loss issues, and [72] has proposed and developed a system based on an accurate prediction of the Complex Dielectric Constant (CDC) to handle the path loss for precision agriculture known as WUSN-PLM. Their results show that the WUSN-PLM outperforms the existing path loss models in different communication types and provides 87.13% precision and 85% balanced accuracy on real cheap sensors.

Conclusion
In this review, the importance of IoT and its successful applications in agriculture is presented along with challenges and solutions. IoT's ecosystem and use of UAVs and their various types and benefits, different communication protocols, and their pros and cons for agriculture applications are also covered. We have also discussed how IoT can be applied in different smart agriculture techniques such as precision agriculture, greenhouse farming, and urban farming with some case studies of food product leaders. Furthermore, we have discussed some widely used applications of IoT in agriculture. Consider geospatial and temporal mapping and sampling of crops as the first step for smart agriculture for any developing country like Pakistan where the upfront cost is a big issue for farmers. After the overview, 7 Wireless Communications and Mobile Computing we conclude that Pakistan as agriculture taking several initiatives to cope with climate change, water scarcity, food insecurity.The usage of advanced information technology, artificial intelligence which is somewhat missing in local developed projects. Thus, Pakistan and other developing countries should bear the upfront cost and R&D in the interagriculture and information technology field; it will help them in the long run for sustainable food security irrespective of climate conditions.

Data Availability
No such data is required.

Conflicts of Interest
The authors declare no conflict of interest.