Open Access
ARTICLE
Adaptive Deep Learning Model to Enhance Smart Greenhouse Agriculture
1
Department of Computer Science, College of Computer and Information Sciences, Jouf University, P.O. Box 72314,
Skaka, Saudi Arabia
2
Department of Computer Science, Faculty of Computers and Information, Menoufia University, P.O. Box 6121890, Menoufia,
Egypt
3
Department of Software Engineering, College of Computer and Information Sciences, Jouf University, P.O. Box 72314, Skaka,
Saudi Arabia
4
RIADI Laboratory, La Manouba University, P.O. Box, 2010, Manouba, Tunisia
5
Department of Information Systems, College of Computer and Information Sciences, Princess Nourah bint Abdulrahman
University, P.O. Box 84428, Riyadh, 11671, Saudi Arabia
6
Department of Information Systems and Technology, Faculty of Graduate Studies and Research, Cairo University, P.O. Box
3753450, Giza, Egypt
* Corresponding Author: Leila Jamel. Email:
Computers, Materials & Continua 2023, 77(2), 2545-2564. https://doi.org/10.32604/cmc.2023.042179
Received 21 May 2023; Accepted 04 September 2023; Issue published 29 November 2023
Abstract
The trend towards smart greenhouses stems from various factors, including a lack of agricultural land area owing to population concentration and housing construction on agricultural land, as well as water shortages. This study proposes building a full farming adaptation model that depends on current sensor readings and available datasets from different agricultural research centers. The proposed model uses a one-dimensional convolutional neural network (CNN) deep learning model to control the growth of strategic crops, including cucumber, pepper, tomato, and bean. The proposed model uses the Internet of Things (IoT) to collect data on agricultural operations and then uses this data to control and monitor these operations in real time. This helps to ensure that crops are getting the right amount of fertilizer, water, light, and temperature, which can lead to improved yields and a reduced risk of crop failure. Our dataset is based on data collected from expert farmers, the photovoltaic construction process, agricultural engineers, and research centers. The experimental results showed that the precision, recall, F1-measures, and accuracy of the one-dimensional CNN for the tested dataset were approximately 97.3%, 98.2%, 97.25%, and 97.56%, respectively. The new smart greenhouse automation system was also evaluated on four crops with a high turnover rate. The system has been found to be highly effective in terms of crop productivity, temperature management and water conservation.Keywords
Abbreviations
The following abbreviations are used in this manuscript | |
ANNs | Artificial Neural Networks |
CEA | Controlled Environment Agriculture |
CIP | Crop Increase Percentage |
CNN | Convolutional Neural Networks |
CPQ | Crop Production Quantity |
DL | Deep Learning |
GSM | Global System for Mobile Communication |
IoT | Internet of Things |
KNN | K-Nearest Neighbors |
NGH | Normal Greenhouse |
NPQ | Normal Production Quantity |
PSGH | Proposed Smart Greenhouse |
PSO | Particle Swarm Optimization |
ResNet | Residual Network |
RFID | Radio Frequency Identification |
RNN-LSTM | Recurrent Neural Network-Long Short-Term Memory |
SGH | Smart Green House |
TMF | Traditional Manual Farming |
UNO | “one” in Talian |
WSN | Wireless Sensor Network |
Food availability is one of the most important concerns for humans. The world’s population is expected to reach 9.7 billion by 2050, which is a major concern for food security. This is because of factors such as climate change, population growth, and land degradation [1]. There are several challenges facing the availability of food for humans, including the large and growing population, limited agricultural land, water shortages, and climate change [2]. These challenges threaten the national security of any country. Agriculture is essential to ensure national security. Greenhouses can help to address these challenges. The first greenhouse-farming technology was developed in the 19th century in the Netherlands and France [3]. Since then, greenhouse farming has become a popular and rapidly growing industry [4]. A greenhouse is a structure composed of walls and ceilings. The walls and ceilings were made of iron rods coated with clear plastic or glass [5]. This creates a good environment for growing plants by providing an appropriate climate. The design of greenhouses is compact and closed, which helps protect plants from external pollution [6].
Challenges that can be addressed by greenhouses include population growth, climate change, and water scarcity. Smart greenhouses can help increase crop yield, reduce water usage, and improve crop quality. They can also help to reduce the risk of crop failure due to extreme weather events. The progress in this field has been significant in recent years. Several advances in sensors, data analytics, and artificial intelligence have made it possible to develop more sophisticated and effective smart greenhouses. These advances have led to the development of smart greenhouses that can automatically control and monitor all operations within a greenhouse, such as fertilization and irrigation. This can help improve crop yield, reduce water usage, and improve crop quality. Research on smart greenhouses is still in its early stages, but it has the potential to revolutionize agriculture. Smart greenhouses can help ensure food security for a growing population and reduce the environmental impact of agriculture.
A Smart Greenhouse (SG) is an advanced version of the traditional greenhouse that automatically controls and monitors all operations, such as fertilization and irrigation, within the greenhouse by utilizing modern tools and equipment supported by the Internet of Things (IoT) [7]. Greenhouse farming has a long history that dates back to the 16th century, when the first greenhouses were built in the Netherlands. Initially, greenhouses were used to cultivate exotic plants; however, farmers soon realized their potential to increase crop yields and extend the growing season. Greenhouses were constructed in other European countries, such as France and England, in the 17th century. These structures were made of glass and wood and were heated using coal or wood. Over time, new technologies have been developed to enhance the efficiency of greenhouses, such as the heat-resistant glass invented by John Evelyn in the 18th century. By the end of the 19th century, greenhouses were widespread in the United States, and new technologies, such as artificial lighting and climate control, enabled year-round crop growth and the development of large-scale greenhouse operations in the 20th century. Currently, greenhouse farming is essential [8]. IoT technology offers high potential for smart application development and innovative farming solutions to transform the agricultural domain [9]. Greenhouse farming can help farmers and agriculturists acquire knowledge about the season, soil quality, water quality, the most suitable time for harvesting, and the required amount of nutrients for healthy plant growth. Smart greenhouses use sensors and data analytics to collect real-time data on environmental conditions such as temperature, humidity, and light intensity. These data are then analyzed to optimize crop production, resulting in higher yields and better-quality crops [4]. For example, smart greenhouses can adjust the amount and timing of water and fertilizer delivery based on the specific needs of each crop, reduce water usage, and minimize fertilizer runoff. In addition to reducing water usage, smart greenhouses can improve crop quality. By monitoring environmental conditions and adjusting them as needed, smart greenhouses can create ideal growing conditions for each crop, resulting in healthier plants and higher quality produce. This can help address issues related to food safety and nutrition, as well as consumer demand for high-quality locally grown produce. Smart greenhouses can also develop cost-effective and reliable farming solutions to boost productivity with minimum labor costs [10]. One of the biggest challenges in smart greenhouses is the automatic determination of repetitive operations such as irrigation time, amount of water, and amount of heat. This study proposes an automatic model based on a convolutional neural network deep learning model for smart greenhouses. The focus of the training process is to train the model to deal with the required amount of agricultural fertilizers, water, light, and temperature, based on current readings from various sensors. The model was created and trained, and all sensors were installed to provide data to the model. Other pieces of equipment, such as actuators, water tanks, fertilizer pumps, and air conditioners, will also be installed. Experiments for different crops will be conducted, and the results for each crop will be compared those with of traditional greenhouse farming to measure the quality of the smart greenhouse model using the IoT.
The remainder of this paper is organized as follows. Section 2 provides a brief background on smart greenhouses, IoT, and a convolutional neural network deep deep-learning model. Related work on greenhouses is presented in Section 3. Section 4 proposes an adaptive convolutional neural network deep learning model for a smart greenhouse agriculture solution using IoT. This section outlines the details of the proposed method and its implementation. The applied experiments and results are discussed in Section 5, followed by a summary of key findings and directions for future research.
Deep learning is a type of artificial intelligence technology that has the potential to revolutionize the operation of greenhouses. One of the most significant benefits of using deep learning in greenhouses is the ability to optimize irrigation schedules. By analyzing various data points, such as temperature, humidity, and soil moisture levels, deep learning models can predict when and how much water plants need, thus reducing water consumption and improving plant health [11]. The rest of this section briefly discusses the basic concepts of smart greenhouses, the IoT, and convolutional neural networks. Each topic is presented in a separate subsection.
Greenhouses have contributed to an increase in agricultural production by allowing year-round cultivation of various fruits and vegetables, as opposed to only certain days [12]. Greenhouses can be used on rooftops and confined spaces, making them popular choices. Over time, improvements and developments in greenhouse technologies have become both necessary and logical. One of the most important improvements is the arrival of semi-smart greenhouses, where irrigation can be controlled using a tap but still requires human intervention. In smart greenhouses, everything works automatically, including irrigation operations, temperature and light control, and fertilizer proportion calculations [2]. Fig. 1 illustrates that a smart greenhouse relies on smart devices that communicate with each other using IoT services [13]. They can also be controlled and monitored remotely using smartphones. Various sensors are used to detect environmental variations that can harm plants and issue alerts to take appropriate action. The proper utilization of smart greenhouses will undoubtedly represent a breakthrough in the agricultural process, with benefits such as increased farmer comfort and production [14].
IoT is a key technology used in smart farming, allowing devices to establish an Internet connection, and be operated and managed remotely. Through the use of sensors, remote control systems, autonomous equipment, and information and communication technologies, IoT is utilized to manage farms and control crops [15]. It aims to gather accurate data and use it to steer agriculture toward higher production at reduced costs and higher quality. IoT-based agriculture improves decision-making, monitors agricultural pests, and determines the precise amount of pesticides required to avoid overuse. The IoT concept encompasses everything that has a processing unit and an Internet connection, including public signs, household goods, human parts, and animals [16]. For IoT to function, sensors must first gather data from their surroundings. When sensors are connected to the network, these data are transferred to a device that offers a variety of services to people or businesses [1]. Smartphones, satellites, Wi-Fi, and Bluetooth are just a few techniques that can be used to link devices. The data was processed as soon as they entered the designated processing unit of the network. Depending on the quantity and nature of the data obtained, processing may be straightforward or complicated. The plot of certain necessary statistics is as follows: For the user to change or adjust the device settings, the results are then delivered to them in the form of a customized alert. In some cases, the alert automatically limits the device settings without the need for user action [17].
A Wireless Sensor Network (WSN), as shown in Fig. 2, is a group of small sensor nodes that detect and transmit information about physical or chemical phenomena wirelessly to a data processing center without human presence. WSNs can perform monitoring or control functions, such as monitoring temperature, pressure, sound, pollution, and noise, and can cooperate. Sensor nodes consist of a processing unit with a limited capacity and small memory. Hundreds of sensor points are distributed in desired locations, either in fixed, random, or mobile positions, and data is transferred through multi-hop transitions from one point to an adjacent point until it reaches the base stations [18].
These base stations usually have higher computing power than the sensor points and the necessary power to process the data, as well as communication channels between them with high capacity. Sometimes, there are collection points, which are specific sensor points located in a suitable place to collect data before they are delivered to the base station. In some networks, the sensor points are divided into groups for each cluster head that collects data from its neighboring points, so that the number of messages exchanged between the sensor points is reduced to reduce energy consumption [19].
The wireless sensor network consists of three basic components: Sensor Nodes, Router Nodes, and devices that receive data from the Information Center (servers). Modern applications in the field of wireless sensors require, on the one hand, devices with a long life, and on the other hand, these devices usually contain a limited source of energy. Several factors affect the energy consumption of distributed sensors, such as the duration of transmission, ambient conditions (e.g., temperature), and accuracy of the required readings [20].
2.4 Convolutional Neural Networks
Convolutional neural networks are modern deep-learning techniques that can take photos as inputs and automatically build complex feature representations [21,22]. With sufficient data, CNNs can produce more accurate results than the traditional techniques [23,24]. Consequently, CNNs have been employed in a variety of agricultural applications, including the identification of weeds and crops [22,25,26], diagnosis of plant diseases [27], and the detection and tally of plant organs [23]. There are limited studies on how CNNs have been used to estimate growth-related features of greenhouse lettuce, despite CNNs being widely utilized in classification tasks but rarely in regression applications. In [25], a CNN was adopted to build an estimation model for growth monitoring of greenhouse lettuce based on digital images, and the results were compared with conventional methods that have been widely used to estimate growth-related traits. This study was inspired by Ma et al. [21], who accurately estimated the above-ground biomass of winter wheat at early growth stages using a deep CNN, which is a CNN with a deep network structure. A one-dimensional convolution network (1D-CNN) consists of one-dimensional convolution layers, pooling layers, flattened layers, and fully connected layers, as depicted in Fig. 3, and is used to handle one-dimensional data. The convolution layer is a fundamental method for applying a filter to an input. A feature map, which shows the specific properties connected to the data points, was repeatedly produced using the filtering procedure. In a linear procedure known as convolution, a set of weights is used to multiply the inputs. The single-dimensional array weights, referred to as kernels, are multiplied by the inputs in this instance. Each run of this process yielded a different value, and after it was completed, a feature map consisting of several values was produced. Each value is provided to the chosen activation function after the feature map is calculated. Another block of CNN, pooling layers, frequently occurs after convolution layers.
The sub-sampling technique is utilized internally to lessen the model’s dependency on precisely locating the feature maps, but the feature maps should be independent of the positioning of the information to prevent the model from overfitting. Pooling layers work on feature maps to produce the mapped pooled features. The complexity and number of parameters affect the computation of architecture. The choice of mapped pooled features varies according to stride, the size of the applied pooling filter, and the type of pooling (maximal pooling or average pooling). Whereas average pooling determines the average value for each patch, max pooling sets the value as the maximum value of the feature for each patch. The dense layers that are fully connected to the preceding layer come next, followed by an activation function to map the output to the results.
We identified several studies in the literature that proposed the use of IoT and CNN in greenhouses. These studies are briefly described below:
The primary goal of [28] is to propose an automation system design for greenhouses that can be controlled on both the web and smartphones. The system consists of three components: an embedded system, web server, and optional smartphone owned by the user. This project uses an Arduino and an SQL database and asserts that data mining and the collected data can be utilized to make predictions about future possibilities. The authors in [29,30] suggested the design and deployment of an electronic system based on the Internet of Things, cloud computing, and a Global System for Mobile Communication (GSM) for sensing the greenhouse’s environmental characteristics. The goal of this study is to create a system that can automatically measure and track changes in light, temperature, humidity, and moisture levels to maximize the use of greenhouse resources.
The authors in [5] proposed a greenhouse monitoring solution that is effective. By utilizing a 3G connection, Web services, a database, and a web interface for user interaction, the solution implements a Wireless Sensor Network monitoring system and subsequently expands the monitoring concept to an Internet of Things solution. The proposed solution, namely GreenMon, is composed of three main components: a Wireless Sensor Network that collects data and sends it to the Network Coordinator (Base Station); the Network Gateway, which is physically connected to the Network Coordinator, which receives all the collected data and sends it to the remote web server; and an online web server that is responsible for storing all the received data into a database for further use. The authors of [12] developed an Intelligent IoT-based Automated Irrigation system. Their system is based on the machine learning algorithm K-Nearest Neighbors (KNN) to anticipate when to water the soil. The temperature and moisture sensors deployed in the field communicate with the Arduinomicrocontroller. The sensed moisture and temperature values were then transmitted using serial communication to an edge device called Raspberry Pi3. Raspberry Pi3 holds the KNN machine-learning algorithm, which takes the soil moisture and temperature into consideration. The research in [31] presented an overview of the current dominance of IoT for on-farm measurement, the requirements for IoT implementation success in low- and middle-income countries, the challenges associated with IoT implementation in small farms, and recommendations for practitioners. The authors focus on the capabilities of intelligent technology that can be used in sustainable agriculture. They used the “Wangree Health Factory Company” case study. This case study focuses on a farm that produces fresh organic fruits and vegetables using artificial lighting technology. The authors developed an analytical framework to examine how the placement of plants impacts the sustainability of agriculture.
The objective of the research in [32] is to present an overview of the implementation of deep learning in crop yield prediction. The authors examine the various deep-learning models that have been utilized for this purpose, as well as the factors that influence crop yield. Additionally, they analyze the potential benefits and obstacles associated with deploying deep learning for crop yield prediction. The research in [33] surveyed the application of deep learning in smart agriculture. The authors explored the challenges and opportunities associated with utilizing deep learning in this field. Furthermore, they delve into the various deep learning models that have been employed in smart agriculture and the diverse use cases of deep learning in this domain.
A precision agriculture-oriented deep learning framework has been proposed in [34]. This framework can leverage sensor data to forecast crop yield, detect pest and disease infestations, and determine irrigation requirements. The authors validate the framework’s efficacy by testing it on a dataset of sensor data obtained from a field trial. Their results demonstrate that the framework can accurately predict crop yield and the presence of pest and disease infestations. In [35], the authors introduced an adaptive deep-learning model designed for autonomous systems in smart homes. This model can learn and adapt to variations in the environment, making it a viable candidate for implementation in smart agriculture. The authors proceeded to assess the model's performance using a dataset of sensor data sourced from a smart home. Their findings demonstrate that the model can effectively forecast the state of the home environment with high accuracy.
In the research paper referenced as [36], a thorough analysis of the implementation of deep learning in the field of smart agriculture is presented. The authors delve into the various use cases of deep learning in smart agriculture, such as predicting crop yields, detecting pests and diseases, and managing irrigation. Additionally, they examine the potential benefits and obstacles associated with utilizing deep learning in smart agriculture. The authors in [37] focused on sustainable agriculture using Artificial Neural Networks (ANNs) and Adaptive Particle Swarm Optimization (PSO). Therefore, if a new related dataset is developed, it is merged with the one that already exists. The dataset summary is subsequently skipped by the suggested PSO. It preserves the records that have the greatest impact on the categorization process and deletes the records that are less important and speculative. By changing the traditional ANN, the condensed dataset is introduced into the training procedure without having to restart the system. To manage the ongoing update of the datasets, the suggested ANN has an adaptive input layer and an adaptive output layer. The authors in [38] showed that due to deep learning (DL) models’ recent capacity to distinguish distinctive object features and provide more precision, their applications have garnered a lot of attention. Which DL model is superior cannot be determined. Nonetheless, due to its ability to forecast time series, we discovered that RNN-LSTM (recurrent neural network-long short-term memory) was extensively employed for predicting micro-climate conditions in controlled environment agriculture (CEA). We observed that the reported research covered relatively little of the critical CEA topic of microclimate prediction. Based on the examined articles, we can observe that CNN models, like the popular DL model, have high applicability and universality. The most extensively used deep learning models and networks are CNN and Residual Network (ResNet), although other models and networks are also used in this field.
4 The Proposed CNN for Smart Greenhouse Agriculture Using IoT
The use of greenhouses is not without issue. These issues are fundamentally brought about by disregard and carelessness. The buildup of work, existence of several jobs, and failure to record all measurements inside and outside the greenhouse are the causes of this carelessness. These duties were carried out under the program at the wrong time. False and inconsistent readings of greenhouse environments can result in significant damage, crop death, and poor irrigation techniques. Manual readings for air conditioning, such as humidity variations, the amount of clay in the soil, and temperature changes, may not always be accurate. The creation of a smart greenhouse, an automated method that enables greater control over all aspects of greenhouse agriculture, is a solution to these problems.
The architecture of the proposed model is illustrated in Fig. 4. It consists of the dataset collected by IOT devices, data preprocessing stage, and embedded one-dimensional CNN on a Uno (one) Arduino device, which will be explained in the following subsections.
Activation functions are mathematical functions used to introduce nonlinearity into the output of a neuron, enabling a neural network to learn more complex patterns in data. Different activation functions have advantages and disadvantages, including sigmoid, softmax, tanh, and ReLU functions. In this study, the softmax activation function was used for the output layers of the model, resulting in a probability distribution that can be used to predict the amount of water, air conditioning, light, and fertilizers. The sigmoid function is commonly used for classification problems. This function ensures that the output of the model represents a probability distribution over the possible actions that can be taken to optimize crop production, including the amount of water, air conditioning, light, and fertilizers. Specifically, the softmax function maps the output of the model to a probability distribution equal to 1, which can be interpreted as the probability of taking each action. We believe that this approach is appropriate for our study and helps to ensure that the model’s output is both accurate and interpretable.
4.1 IoT Architecture and Devices
The proposed IoT model architecture is an innovative framework designed to connect and manage IoT devices in a smart agriculture system. The architecture comprises five layers that work together to provide a scalable and flexible solution for integrating and managing the IoT devices and services. The five-layer model shown in Fig. 5 is expected to enhance smart greenhouse agriculture. At the lowest layer, the device layer, which is called the perception layer, physical devices such as sensors, actuators, and gateways are connected using various communication protocols, such as Wi-Fi, Bluetooth, and Zigbee. It collects all the sensors with interactive actuators to perform various activities. Standardization is required mainly in this layer to communicate with non-homogeneous devices. It also consumes a channel for encoding and transferring data to the upper layer, which is called Object Abstraction.
This layer is responsible for collecting data from the environment, such as temperature, humidity, and soil moisture, and transmitting them to the upper layers of the architecture. The second layer depends on diversified technologies such as Bluetooth and Radio Frequency Identification (RFID) to handle data between the perception and service management layers. The Object Abstraction Layer is responsible for abstracting physical devices that can be easily managed and manipulated by higher layers. This layer provides a standardized method of representing physical devices as virtual objects, which simplifies the management and integration of IoT devices. The Service Management Layer is responsible for managing the services provided by the IoT devices. This layer exposes the services provided by the devices as APIs that can be used by the higher layers of the architecture. Service Management is also called the pairing layer and helps deal with heterogeneous objects; thus, it acts as a middleware by using the name and address of the request. In the Application Layer, the adaptive deep learning model for enhancing smart agriculture is implemented using data collected from IoT devices. This layer uses the APIs provided by the service management layer to interact with IoT devices and services. The Application Layer is where other applications can be implemented that provide additional functionality, such as data visualization or decision support. The application of the IoT in this study contributes to better overall control and monitoring of agricultural operations, self-improvement in decision-making, increased production and income, and system integration. In the highest layer, the Business Layer is responsible for providing business services to users of the smart agriculture system. This layer provides interfaces for users to interact with the system and access data and services provided by the lower layers of the architecture. Applications, such as farmer dashboards, can provide valuable information about crop growth, soil conditions, and other relevant data. By implementing the Proposed Model Architecture of IoT, smart agriculture systems can benefit from a standardized and efficient way of managing IoT devices and services while also enabling the implementation of advanced analytics and machine learning algorithms to enhance crop growth and yield. The following IoT devices are currently available and used in building the Proposed CNN for Smart Greenhouse Agriculture:
1. Arduino UNO microcontroller: an electronic, physical, and programmed board for the Arduino circuit. Its quality is very high, with flexible delivery. It has many features such as an operating voltage between 2.7 and 5.5 volts, each channel being isolated optically, standard interfaces, etc.
2. Soil moisture sensors (hygrometers)
3. Temperature sensors (LM35)
4. Humidity sensors (DHT22)
5. Wind sensor (OMC-118)
6. Light sensors (light-dependent resistors, LDR)
7. Wi-Fi module (ESP8266)
8. Water and fertilizer pumps
Raw datasets were collected from four greenhouses in two cycles, each of which contained five sensors per crop, over seven months, obtained from greenhouses for cucumber, pepper, bean, and tomato crops. As shown in Table 1, the collected data per sensor is approximately 480 messages per month; therefore, the total number of messages in the dataset for all crops is 9492. Table 1 describes the dataset collected by the IoT devices per month.
In this study, the initial unit count of the output layer was set to four units. These four units represent water, air conditioning, light, and fertilizers for agriculture. The seven units are the initial fixed numbers of units in the input layer. The seven components of this unit represent the type of plant, the day’s agricultural significance on the first day, soil moisture, interior and outdoor temperatures, humidity sensors, light, and wind speed.
Raw data may be less accurate than the final prediction because of data noise, missing numbers, or duplicate values. Missing values and redundant entries were deleted during the preprocessing stage, and null values in the raw dataset were changed to common values. Additionally, after deleting missing and duplicate information, the size of the raw dataset decreased to 9297 messages. The raw dataset is normalized by the min-max feature scaling function, as shown in Eq. (1). Feature scaling is used to convert all values into the range [0,1]. The processing dataset was divided into training and testing sets, with 70% of the training sets and 30% of the testing sets, as shown in Table 2.
4.4 One-Dimensional CNN Architecture
Given the lack of data management and processing resources a decade ago, CNN was a deep-learning model that researchers could use to create solutions that were previously only conceivable. In this study, we used a one-dimensional CNN (1D-CNN) to calculate the quantity of water, degree of air conditioning, strength of light, and fertilizers. One-dimensional data can only be operated using a 1D-CNN. As shown in Fig. 4, the proposed architecture comprises three convolutional layers: a dropout layer, pooling layers, and three dense layers. ReLU serves as the activation function in the first CNN layer, which comprises 64 filters with a kernel size of 2. This layer takes the sample as an input and converts it into a (79, 64)-shaped vector. Subsequently, a second convolution layer with 32 filters and a kernel size of 2, and the final convolution layer with 16 filters and a kernel size of 2. To prevent the model from overfitting, we implemented a dropout with a 0.2 rate after three consecutive convolution layers, which disabled 20% of the neurons during training. A max-pooling with a pool size of 2 follows the dropout layer. The max-pooling layer reduces the number of parameters that must be learned, thereby reducing the computational cost of the model. The 3-dimensional vector is then reduced to a single dimension using a flattening layer to produce the final output. The prediction of the target variable was then performed using three dense layers and a sigmoid activation function. An overview of the proposed model is shown in Table 3.
The convolution layer of the 1D CNN model was trained to identify the kernels that best extracted features from the input data for a given task. Kernels are the only parameters that are automatically learned during training. The other hyperparameters, such as the size of the kernels, number of kernels, padding, and stride, must be set before the training begins. These hyperparameters can affect the performance of the model; therefore, it is important to carefully choose them. Table 4 summarizes a list of parameters and hyperparameters in a 1D-CNN, where a parameter is a variable that is automatically optimized during the training process and a hyperparameter is a variable that needs to be set beforehand.
5 Implementation and Experimental Results
Although smart greenhouses offer a promising solution to address food security challenges, it is important to consider the initial cost of setting up such a system. The initial cost of a smart greenhouse is higher than that of a traditional greenhouse owing to the cost of the sensors, controllers, and software required to operate the smart greenhouse. However, it is important to note that the long-term benefits of smart greenhouses outweigh the initial investment.
Some of the benefits of using a smart greenhouse include:
• Increased crop yield: Smart greenhouses can help increase crop yield by optimizing the environment for plant growth.
• Reduced water usage: Smart greenhouses can help reduce water usage by using sensors and data analytics to optimize irrigation. Smart greenhouses can help mitigate the impact of water scarcity and reduce the cost of water.
• Improved crop quality: Smart greenhouses can improve crop quality by providing a controlled environment for plant growth.
• Reduced labor costs: Smart greenhouses can help reduce labor costs by automating many of the tasks required to operate a greenhouse.
The initial cost of a smart greenhouse varies depending on its size and complexity. However, the long-term benefits of using a smart greenhouse make this a worthwhile investment. A farmer was able to increase his crop yield by 20%, reduce his water usage by 15%, and produce higher-quality crops after installing a smart greenhouse.
5.2 The Interface between Controller and Sensors
As shown in Fig. 6, the microcontroller was connected to the sensors using Wi-Fi and the computer was connected to the CPU using I2C. The microcontroller collects data from the sensors and sends them to the computer via Wi-Fi. The computer then used a deep learning model to process the data and make predictions. The CPU was responsible for communicating with the microcontroller and controlling the system. The system can be used to monitor and control a variety of agricultural conditions such as temperature, humidity, light levels, and soil moisture. This system can also be used to predict crop yields and identify potential problems.
The system was designed to be easy to install and maintain. The use of Wi-Fi and off-the-shelf sensors makes the system scalable and adaptable to various agricultural settings. The use of a deep learning model makes the system more intelligent and capable of making accurate predictions. Overall, a smart agriculture system is a powerful tool that can be used to improve crop yields, reduce costs, and increase sustainability.
Six pieces of agricultural land were used, each with an area of 2 m × 4 m. The proposed method is established and applied to the first two pieces. A normal greenhouse was used for the next two pieces. The last two pieces are used in traditional manual farming. The experimental results depend on the following metrics:
• Quantity of crop production.
• Crop expansion percentage.
• Amount of water consumed.
• Rate of change in temperature on a random day.
The findings of the subsequent experiments were obtained after two runs (in two cycles). Four crops, including cucumber, pepper, beans, and tomatoes, can be grown on the two pieces of agricultural land required for the proposed smart greenhouse in two cycles. Fig. 7 displays the crop production quantities in kilograms for the above four crops for the proposed smart greenhouse (PSGH), normal greenhouse (NGH), and traditional manual farming (TMF).
The increased percentage of crops can be defined using Eq. (2).
where CIP represents the crop increase percentage, CPQ represents crop production quantity and NPQ represents normal production quantities that are registered by research centers of the agriculture ministry. From this equation, it is clear that CIP and CPQ have a direct relationship.
The crop increase percentages of PSGH, NGH, and TMF for cucumber, pepper, beans, and tomato crops are presented in Figs. 8 and 9 shows the amount of water consumed by m3 of PSGH, NGH, and TMF for cucumber, pepper, beans, and tomato crops.
Table 5 displays the PSGH, NGH, and TMF temperature change rates for the cucumber, pepper, bean, and tomato crops. A random day in the middle of the cycle was chosen to calculate the rate of change in temperature. Seeds should not be sown in cold weather, because cucumbers are particularly sensitive to soil and irrigation water temperatures. The ideal growth temperature was between 25°C and 30°C (degrees Celsius). It specifically requires a temperature range of 18°C–20°C at night and 24°C–28°C during the day. To perform its essential functions during vegetative growth, the pepper crop requires a high temperature between 21°C and 30°C at the start of its existence. From one stage of growth to the next, crops growing in the research area have different needs. The fruits and flowers of the current decade fall when the temperature increases from 34°C to 37°C. The ideal temperature for ripening pepper fruits is 21°C. Because tomato plants do not like frost, it is advisable to grow them outdoors in late spring and early summer, when the temperature is above 10°C, for optimum yield. Temps between 21°C and 23.9°C during the day and between 18.4°C and 20°C at night are ideal for tomato production. Some tomato varieties can survive at high temperatures, which increases flower production. They can also be grown in any type of soil, particularly in fertile soil. Bean cultivation is suitable under warm but cool weather conditions. Bean cultivation thrives in a temperate setting, with a temperature range of 18°C–30°C, to promote seed germination. Bean plants bloom better at cooler temperatures. On the other hand, low temperatures are unsuitable for bean growth, flowering, fruit, and maturity.
The exposure of bean plants to frost also entirely halts growth and causes the foliage and blossoms to freeze. Pollination, grain formation, and bean ripening are all affected by high temperatures. The effectiveness of the proposed CNN for smart greenhouse agriculture depends on the incorporation of this knowledge, which is formulated as a useful field in the experience dataset. The studies and data unequivocally show that the number of crops produced and the percentage of crops that increase under the proposed smart greenhouse are greater than those of a conventional greenhouse and traditional manual farming. The suggested “smart greenhouse” technique conserves the same quantity of water as the other two techniques. The suggested smart greenhouse’s rate of temperature change over a random day is lower than that of conventional greenhouses and traditional manual farming. The use of a CNN trained using prior experience is the primary factor in the efficiency of the proposed smart greenhouse. Full details regarding the temperature, volume of water, amount of light, and fertilizers are contained in the training set, which reflects the experience. Therefore, depending on the requirements of the current plant, the temperature, quantity of water, amount of light, and fertilizers vary. The nature and structure of the proposed smart greenhouse also contribute to its superior performance.
All previously owned machinery was intelligent and free of human carelessness or laziness. In particular, for the tomato crop, the performance of the suggested smart greenhouse was visible. The tomato crop yield and percentage increase were higher than those of conventional greenhouse and traditional manual farming. The proposed smart greenhouse can achieve a more suitable scenario by using the trained CNN and accounting for changes in the surrounding environment. Table 6 demonstrates that across 75 epochs, we achieved training accuracy, precision, recall, and F1 scores of 98.2%, 98.1%, 98.3%, and 98.19%, respectively.
The suggested 1D-CNN-based methodology produced testing accuracy, precision, recall, and F1 scores of 97.56%, 97.3%, 98.2%, and 97.25%, respectively. Table 7 provides a comparison of our methodology with the random forest and decision tree models in [39].
The results show that the adaptive deep learning model exhibits the best performance in terms of accuracy, precision, recall, and F1 score compared to the random forest and decision tree models. This could be attributed to the adaptive architecture of the model, which enables it to learn the optimal features for each dataset, while the other models may not be as precise as the adaptive deep learning model, which may have unique strengths that make them more suitable for other tasks. In conclusion, the comparison results demonstrate that the adaptive deep-learning model holds great promise for smart agriculture. Not only is it more accurate than the other models, but it is also more interpretable.
This study proposes the construction of a smart greenhouse using the IoT and a convolutional neural network (CNN). The proposed CNN is adaptive, implying that it can be retrained using new datasets. All agricultural operations in smart greenhouses are managed and tracked by the IoT. A smart greenhouse automatically manages the required quantities of fertilizers, water, light for photosynthesis, and temperature to regulate the growth rate of crops, adapt to climate change, and improve crop yields. The proposed strategy was tested on four different strategic crops with short capital cycles, which could be as quick as two cycles per year. The crops used were cucumbers, peppers, tomatoes, and beans. The results of the experiments, which included measurements of crop output, crop increase percentage, temperature change rate, and water savings, showed that the proposed automatic process for the smart greenhouse is effective. The testing accuracy score of the CNN was 97.56%. In the future, the main focus will be on revising and summarizing the dataset as it will be very large. The 1D-CNN can also be enhanced and compared with other methods. In addition, an efficient method to protect plants from insects is required. It is also important to predict and select the desired crop type, taking into account upcoming changes. Finally, smart greenhouses will be enhanced with modern controls, such as phenotyping facilities and the measurement of nutrient levels, irradiation levels, and shading.
Acknowledgement: The authors extend their appreciation to the Deputyship for Research & Innovation, Ministry of Education in Saudi Arabia for funding this research work through the Project Number RI-44-0450.
Funding Statement: The authors extend their appreciation to the Deputyship for Research & Innovation, Ministry of Education in Saudi Arabia for funding this research work through the Project Number RI-44-0450.
Author Contributions: Conceptualization, M.A.M., M.A.T., and N.Y.; Methodology, L.J.; Software, M.A.M., and M.A.T.; Validation, G.D., N.Y., and L.J.; Resources, M.A.M., and M.A.T.; Data curation, L.J., and G.D.; Formal analysis, M.A.M., and N.Y.; Investigation, M.A.M.; Project administration, L.J.; Supervision, N.Y.; Visualization, M.A.M., and M.A.T.; Writing—original draft, L.J., and N.Y.; Writing—review & editing, M.A.M., and N.Y. All authors have read and agreed to the published version of the manuscript.
Availability of Data and Materials: Not applicable due to privacy concerns.
Conflicts of Interest: The authors have no conflicts of interest to report regarding the present study.
References
1. A. AbdZeed, A. H. Ali, A. R. Maher and S. Al-Baghdadi, “A cost-effective IoT-based control system for smart greenhouses powered by solar energy,” International Journal of Energy Environment, vol. 10, no. 3, pp. 103–110, 2019. [Google Scholar]
2. C. Kishor, H. U. SunilKumar, H. S. Praveena, S. P. Kavya, G. B. Apeksha et al., “Water usage approximation of automated irrigation system using IOT and ANN’s,” in 2018 2nd Int. Conf. on I-SMAC (IoT in Social, Mobile, Analytics and Cloud), Palladam, India, pp. 76–80, 2018. [Google Scholar]
3. Historical Background of Greenhouses. Emerald Agriculture Technologies, 2007. [Online]. Available: http://www.emerald-agri.com (accessed on 01/05/2021) [Google Scholar]
4. S. Vatari, A. Bakshi and T. Thakur, “Greenhouse by using IoT and cloud computing,” in 2016 IEEE Int. Conf. on Recent Trends in Electronics, Information Communication Technology (RTEICT), Bangalore, India, pp. 246–250, 2016. [Google Scholar]
5. T. Gomes, J. Brito, H. Abreu, H. Gomes and J. Cabral, “GreenMon: An efficient wireless sensor network monitoring solution for greenhouses,” in Proc. of the IEEE Int. Conf. on Industrial Technology, Seville, Spain, pp. 2192–2197, 2015. [Google Scholar]
6. V. Keerthi and G. Kodandaramaiah, “Cloud IoT based greenhouse monitoring system,” International Journal of Engineering Research and Applications, vol. 5, no. 10, pp. 35–41, 2015. [Google Scholar]
7. T. Popovic, N. Latinovic, A. Pesic, Z. Zecevic, B. Krstajic et al., “Architecting an IoT enabled platform for precision agriculture and ecological monitoring: A case study,” Computers and Electronics Agriculture Journal, vol. 140, pp. 255–265, 2017. [Google Scholar]
8. M. H. Jensen, “The history of greenhouse production in the United States,” HortTechnology, vol. 27, no. 2, pp. 133–142, 2017. [Google Scholar]
9. Z. Oralhan, B. Oralhan and Y. Yigit, “Smart city application: Internet of things technologies based smart waste collection using data mining approach and ant colony optimization,” The International Arab Journal of Information Technology, vol. 14, no. 4, pp. 423–427, 2017. [Google Scholar]
10. R. Dagar, S. Som and S. Khatri, “Smart farming–IoT in agriculture,” in 2018 Int. Conf. on Inventive Research in Computing Applications (ICIRCA), Coimbatore, India, pp. 1052–1056, 2018. [Google Scholar]
11. X. Y. Ma, J. Tong, F. Jiang, M. Xu, L. M. Sun et al., “Application of deep learning to production forecasting in intelligent agricultural product supply chain,” Computers, Materials & Continua, vol. 74, no. 3, pp. 6145–6159, 2023. [Google Scholar]
12. Y. Shekhar, E. Dagur, S. Mishra, R. Tom, V. kandan et al., “Intelligent IoT based automated irrigation system,” International Journal of Applied Engineering Research, vol. 12, no. 18, pp. 7306–7320, 2017. [Google Scholar]
13. S. Revathi, L. Vineetha, K. LakshmiRamya and N. Sivakumaran, “Intelligent monitoring and control of greenhouse environment,” International Journal of Engineering Technology Science and Research, vol. 4, no. 6, pp. 2394–3386, 2017. [Google Scholar]
14. Ö. Köksal and B. Tekinerdogan, “Architecture design approach for IoT based farm management information systems,” International Journal on Advances in Precision Agriculture, vol. 20, no. 5, pp. 926–958, 2019. [Google Scholar]
15. M. Stočes, J. Vaněk, J. Masner and J. Pavlík, “Internet of Things in agriculture-selected aspects,” AGRIS on-line Papers in Economics and Informatics, vol. 3, pp. 83–88, 2016. [Google Scholar]
16. D. Shirsath, P. Kamble, R. Mane, A. Kolap and R. More, “IoT based smart greenhouse automation using arduino,” International Journal of Innovative Research in Computer Science Technology, vol. 5, pp. 234–238, 2017. [Google Scholar]
17. J. Ferrandez, J. García-Chamizo, M. Nieto-Hidalgo and J. Mora-Martínez, “Precision agriculture design method using a distributed computing architecture on Internet of Things context,” Sensors, vol. 18, no. 6, pp. 1–12, 2018. [Google Scholar]
18. N. Khan, S. Ghani and S. Haider, “Real-time analysis of a sensor’s data for automated decision making in an iot-based smart home,” Sensors, vol. 18, no. 6, pp. 1–20, 2019. [Google Scholar]
19. Wireless sensor network and applications. [Online]. Available: https://www.elprocus.com/architecture-of-wireless-sensor-network-and-applications/ (accessed on 24/03/2021) [Google Scholar]
20. N. Gaikwad, V. Tiwari, A. Keskar and N. Shivaprakash, “Heterogeneous sensor data analysis using efficient adaptive artificial neural network on FPGA based edge gateway,” KSII Transactions on Internet Information Systems, vol. 13, no. 10, pp. 4865–4885, 2019. [Google Scholar]
21. J. Ma, Y. Li, Y. Chen, K. Du, F. Zheng et al., “Estimating above ground biomass of winter wheat at early growth stages using digital images and deep convolutional neural network,” European Journal of Agronomy, vol. 103, pp. 117–129, 2019. [Google Scholar]
22. S. Ferreira, D. Freitas, G. Gonçalves, H. Pistori and M. Theophilo, “Weed detection in soybean crops using convnets,” Computers and Electronics in Agriculture, vol. 143, pp. 314–324, 2017. [Google Scholar]
23. S. Ghosal, D. Blystone, A. Singh, B. Ganapathysubramanian, A. Singh et al., “An explainable deep machine vision framework for plant stress phenotyping,” Proceedings of the National Academy of Sciences of the United States of America, vol. 115, pp. 4613–4618, 2018. [Google Scholar] [PubMed]
24. R. Namias, L. Uzal, G. Grinblat, M. Larese, P. Granitto et al., “Seed-per-pod estimation for plant breeding using deep learning,” Computers and Electronics in Agriculture, vol. 150, pp. 196–204, 2018. [Google Scholar]
25. M. Dyrmann, H. Karstoft and H. Midtiby, “Plant species classification using deep convolutional neural network,” Biosystems Engineering, vol. 151, pp. 72–80, 2016. [Google Scholar]
26. G. Grinblat, L. Uzal, M. Larese and P. Granitto, “Deep learning for plant identification using vein morphological patterns,” Computers and Electronics in Agriculture, vol. 127, pp. 418–424, 2016. [Google Scholar]
27. L. Nachtigall, R. Araujo and G. Nachtigall, “Classification of apple tree disorders using convolutional neural networks,” in IEEE 28th Int. Conf. on Tools with Artificial Intelligence (ICTAI), San Jose, CA, USA, pp. 472–476, 2016. [Google Scholar]
28. A. Turk, E. Gunal and U. Gurel, “An automation system design for greenhouses by using diy platforms,” in The Int. Conf. on Science, Ecology and Technology, Vienna, Austria, pp. 257–266, 2015. [Google Scholar]
29. D. Rustia and T. Lin, “An IoT-based wireless imaging and sensor node system for remote greenhouse pest monitoring,” Chemical Engineering Transactions, vol. 58, pp. 601–606, 2017. [Google Scholar]
30. G. Aiello, I. Giovino, M. Vallone, P. Catania and A. Argento, “A decision support system based on multi-sensor data fusion for sustainable greenhouse management,” Journal of Cleaner Production, vol. 10, no. 11, pp. 1–9, 2017. [Google Scholar]
31. S. Santiteerakul, A. Sopadang, K. Y. Tippayawong and K. Tamvimol, “The role of smart technology in sustainable agriculture: A case study of wangree plant factory,” Sustainability, vol. 12, no. 11, pp. 1–13, 2020. [Google Scholar]
32. H. Wang, Y. Zhang and L. Zhang, “Deep learning for crop yield prediction: A review,” Agricultural and Resource Economics Review, vol. 47, no. 3, pp. 297–316, 2018. [Google Scholar]
33. J. Wang, J. Wang, Y. Zhang, L. Zhang and X. Niu, “A survey on deep learning for smart agriculture,” Sensors, vol. 19, no. 17, pp. 1015–1033, 2019. [Google Scholar]
34. Y. Zhang, X. Niu, L. Zhang and Y. Chen, “A deep learning framework for precision agriculture,” IEEE Access, vol. 7, pp. 48577–48587, 2019. [Google Scholar]
35. H. Peng, Y. Wang and C. Zhang, “An adaptive deep learning model for smart home autonomous system,” in Int. Conf. on Intelligent Transportation, Big Data & Smart City (ICITBS), Vientiane, Laos, pp. 707–710, 2020. [Google Scholar]
36. M. Albahar, “A survey on deep learning and its impact on agriculture: Challenges and opportunities,” Agriculture, vol. 13, no. 3, pp. 1–22, 2023. [Google Scholar]
37. M. A. Tawfeek, S. Alanazi and A. Abd El-Aziz, “Smart greenhouse based on ANN and IoT,” Processes, vol. 10, no. 11, pp. 1–17, 2022. [Google Scholar]
38. M. O. Ojo and A. Zahid, “Deep learning in controlled environment agriculture: A review of recent advancements, challenges and prospects,” Sensors, vol. 22, no. 20, pp. 1–43, 2022. [Google Scholar]
39. B. Talekar, “A detailed review on decision tree and random forest,” Bioscience Biotechnology Research Communications, vol. 13, pp. 245–248, 2020. [Google Scholar]
Cite This Article
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.