Smart Indoor Farms: Leveraging Technological Advancements to Power a Sustainable Agricultural Revolution

: Conventional farming necessitates a large number of resources and infrastructure such as land, irrigation, manpower to manage farms, etc. Modern initiatives are required to automate conventional farms. Smart indoor farms offer the potential to remedy the shortfalls of conventional farms by providing a controlled, intelligent, and smart environment. This paper presents a three-dimensional perspective consisting of soilless farming, energy harvesting, and smart technologies , which could be considered as the three important characteristics of smart indoor farms. A six-layer smart indoor farms architecture has also been proposed, which explains how data are collected using various sensors and devices and then transmitted onto the cloud infrastructure for further analysis and control through various layers. Artiﬁcial lighting, smart nutrition management, and artiﬁcial climate control, to name a few, are some of the important requirements for smart indoor farms while considering control and service management factors. The major bottleneck in installing such systems is both the economical and the technical constraints. However, with the evolution of technology (and when they become widely available in the near future), a more favourable farming scenario may emerge. Furthermore, smart indoor farms could be viewed as a potential answer for meeting the demands of a sustainable agricultural revolution as we move closer to Agriculture 4.0. Finally, in order to adapt smart indoor farms and their study scope, our work has presented various research areas to potential researchers.


Introduction
The UN Food and Agriculture Organization (FAO) estimates that by the end of the first half of this century, the global human population will reach 9.73 billion, and almost twothirds of the population would be living in urban areas. To meet the demand for food and bio-fuel, its production must increase by 50 percent compared to 2012. Further, greenhouse gas emissions generated by 'agriculture, forestry and other land use' have doubled in the past 50 years. Agricultural lands are vulnerable to climate change, and the growth of agricultural production would be reduced significantly. Natural disasters such as floods, droughts, storms, etc., have become more frequent in the past 30 years. Plant diseases are another constraint for good agricultural production. Most global farmlands are already in use for agricultural production. In the past 20 years, there has not been much expansion of farmland, which has stabilized at around 4.9 billion hectares worldwide [1]. Potentially, 881,000 km 2 of agricultural lands could be reverted to forest if every city starts growing 10 percent of its food at smart indoor farms, which also avoid greenhouse gas emissions [2]. In every geographical and environmental setting, the resources needed for agricultural production are not sufficiently available, Figure 1 shows the driving force, natural and artificial resources, constraints and the technology-driven solutions of agriculture in the conventional farming of natural resources such as soil, water, quality seeds, plant nutrition, climate, electricity, etc., and artificial resources such as cold storage facilities, market demand for crops, transport facilities, pesticides, crop data and guidance, human skills, machinery, etc. To address the growing demand for ensuring food and nutritional security amid rising populations and climate change, similar to the industrial revolution 4.0, we have entered the era of the fourth agricultural revolution (or agriculture 4.0) [3]. In the 19th century, agriculture was all about hard manual labor, resulting in low productivity. This period is often considered as 'Agriculture 1.0'. The mechanical machinery for harvesting, sowing, irrigation, etc., brought a second revolution of agriculture at the beginning of the 20th century. The second industrial revolution also took place in the 20th century. Incorporation of information technology, communication technology, embedded systems, etc., in agriculture started in Agriculture 3.0. Precision farming techniques were first introduced during the third agricultural revolution. Agriculture 4.0 has been triggered by emerging technologies such as the Internet of Things (IoT), artificial intelligence, data analytics, blockchain, big data, etc. [4]. These technologies address food safety-related issues, modernize the agricultural supply chain [5], improve data representation, storage, and analysis, and provide better management and control. The report called 'Agriculture 4.0-The Future of Farming Technology' [6], published by the World Government Summit in 2018, focuses on incorporating emerging technologies for optimal resource use and maximizing agricultural production.
Conventional farms in the initial phases of technological advancement employed mechanized systems. In later stages, innovations in electronics, communication technologies, intelligent computing, internet technologies, and cloud computing enabled several sensing and actuating devices to be deployed in conventional farms to be connected and remain seamlessly available. However, conventional farms require colossal infrastructure and have related limitations such as uncontrolled environments, shrinking farmlands, natural calamities, plant diseases, soil degradation, lack of resources, etc. These limitations lead to reduced crop production.
In this context, smart plant factories have become relevant. In these plant factories, crops are harvested in a controlled environment, resulting in higher production with minimum resources. It can also be established in urban areas and non-arable land. Researchers have proposed innovative techniques towards profitable, secure, sustainable and efficient farming. Smart Farms have the potential to address the shortcomings of conventional farms by providing a controlled, intelligent, and smart environment. In this article, we hypothesize that incorporation of soilless farming, local energy harvesting, and smart technologies (in Figure 2) will: 1.
Optimize the use of necessary resources; 2.
Provide a standalone infrastructure; 3.
Provide a solution independent of external climatic conditions; 4.
Provide better guidance to the farmer or farm manager by sharing relevant information and prediction; 5.
Fine-tune the monitoring, control, and management process towards higher production. With the help of these three dimensions, smart plant factories can embrace modern farming techniques, promoting Agriculture 4.0, and provide a sustainable environment for maintaining the ecological balance. In this article, we review these three dimensions of modern agriculture and present a perspective on how an architecture for smart agricultural farms could be developed by utilizing agricultural resources with technological infrastructure. The organization of the paper is as follows: in Section 2 we discuss current soil-free farming methods; in Section 3 we discuss local energy harvesting methods; in Section 4 we discuss technological infrastructure; in Section 5, we discuss control and management services associated with smart farms; in Section 6 we discuss key challenges and solutions. Finally, in Sections 7 and 8, we discuss future research scopes and the conclusions of this study.

Soilless Farming
Farming land, soil, and water are the fundamental resources required for conventional agriculture. The first step towards the optimal use of these resources is the incorporation of soilless farming techniques [7]. With these methods, plants can grow in an indoor environment reserving the land for some other use. It has also been reported that these methods save irrigation water up to 90% [8]. A case study of soilless urban agriculture in New York City has shown that these farms contribute towards environmental sustainability, employment generation, and produce healthy foods for the consumer [9]. Several indoor farms have come into existence in the form of vertical buildings, large rooms, small containers, and large greenhouse farms. However, much work has been reported in the vertical farming area. Kalantari et al. (2017) [10] have reviewed the indoor vertical farming projects of Europe, Asia, and America from 2009 to 2016. The research concludes that an automated plant factory with optimized light-emitting diode (LED) lighting, renewable energy sources, smart water management system, crop planning and management system, artificial climate control system, soil and fertilizer management system, and smart data collection and management system can make a great difference in the agriculture industry. The indoor agricultural system incorporated with vertical buildings is called a vertical greenery system, which also helps to minimize average energy consumptions in buildings and contribute to the sustainable development of populated cities by generating fresh air and lowering the ambient temperature [11]. Suparwoko and Taufani (2017) [12] have analyzed the green building model for Sleman, Indonesia and have found that this new way of urban farming not only contributes to agricultural production but also reduces the crisis of agricultural land.
Recent research in bio-technology has introduced many advanced techniques for soilless farming such as hydroponics, aquaponics, and aeroponics. These organic farming techniques are equally applicable for large agricultural lands as well as smart indoor farms.
Hydroponics systems ( Figure 3) mainly consist of a reservoir of plant nutrient solution and growing beds for plants. It is a method of cultivation of plants in nutrient-enriched solutions both in indoor and outdoor conditions. The solution supplies nutrients, dissolved oxygen, moisture, etc., to the roots of the plants. The solution is recycled to the reservoir after consumption by the plants. The smart controller controls the pH and electrical conductivity (EC) of the solution. Plant leaves consume carbon dioxide (CO 2 ) from the air. In indoor conditions, energy-efficient LED lamps supply essential light for growth. This soilless farming technique yields more and consumes water approximately twenty times less than other gardening practices. Hydroponic culture takes less space to grow plants and does not use pesticides [13]. Control of nutrition concentration is the core part of the resource management system [14]. Hydroponics systems work better if they maintain the pH level of the nutrient solution between 5.8 and 6.5, room temperature in the range of 20 • C to 30 • C, sufficient light for 14 to 16 h a day and electrical conductivity (EC) of the solution in the range from 1.5 to 2.5 dS/m. A smart, automated system for supplying nutrients to the plants, maintaining the pH and EC level of the nutrient solution, and maintaining the desired room temperature and lighting intensity will add new hydroponic agriculture dimensions [15]. Phutthisathian et al. (2011) [16] listed important crops and required pH and EC levels for optimal growth. They have also proposed ontology-based smart control of the nutrients in the solution. Sensors for water level measurement, EC, temperature, and pH measurement are commercially available in the market. The operating frequencies of the EC sensor module vary with different input levels. Hence, calibration of EC and water level can be done based on it. A self-compensation mechanism is necessary for these sensor modules to address the circuit's variation of electrical characteristics [17]. After sensing EC and pH values, it can be adjusted to the required level by microcontroller-based circuits using linear regression methods [18]. While preparing the hydroponic system's nutrient solution, manual mixing of fertilizer and other nutrients to the water may result in an improper nutrient solution. A smart and automated nutrition feeding system with nutrient film technique (NFT) solves this problem by adding nutrients and water to the solution whenever required [19]. Fuangthong and Pramokchon (2018) [20] have proposed a fuzzy controlled nutrient solution system that can drain alkaline and acid to control the pH of the solution and store nutrients to control the EC of the solution. Aquaponics is a hybrid closed system that combines recirculating aquaculture and hydroponics systems ( Figure 4) to collect nutrients from an aquaculture tank instead of an external source [21]. In this system, water and the waste of fish are pumped from the fish tank to the plant growing container. Fish waste is rich in ammonia. Naturally grown bacteria in the closed-loop system convert ammonia to nitrites and then into nitrates. Nitrates work as nutrients for the plants. After absorption of nutrients by the plant roots, clean and filtered water flows back to the fish tank. Aquaponics systems consume ninety percent less water than conventional methods due to their ability to reuse water resources. If planted in the soil, a head of lettuce matures in 50 days, while it takes 35 days to mature in an aquaponics environment. It has been reported that 23,000 kg of fish help produces 450,000 kg of lettuce and herbs if implemented on a large scale [22]. In another example of small-scale aquaponics systems, 1 kg of basil leaves are grown for 60 days in a system with 1 square meter area for the cultivation of plant and 0.45 cubic meters of water for aquaculture [23]. A survey in Europe shows aquaponics has the potential to be commercially successful [24]. As it is a combination of fish and plant culture, a resource management and control system are required to monitor and control fish feeding, minerals ratio in water, the intensity of light, fish metabolism rate, fish health, etc. [25]. The smart system, which integrates several modules such as a data collector, error rectifier, processor, user communication module, cloud server, and web and mobile application module, shares information with the user after a certain time interval [26]. The hardware components such as the microcontroller board, temperature sensor, water level sensor, dc motor driven smart fish feeding machine loaded with dry food, water heater, pump to drain out or store liquid, and pH sensor kit are an integral part of a smart aquaponics system [27]. Aquaculture is an important part of the aquaponics system. Hence, health monitoring and biomass estimation of fishes and the management of bio-nutrition supply significantly impact overall production. A structured light vision system (SLS) consisting of a camera and line lasers would effectively estimate biomass and collect other required 3D information [28]. Aquaponics system can change the current scenario of local food production in cities and urban areas by supplying pesticide-free, fresh, and healthy foods. The production would increase with all the stakeholders' meaningful and smart engagement [29]. Plants are suspended in the air through an artificial holder in aeroponics systems ( Figure 5). A sprinkler system is used to provide nutrients to the roots of the plants. As a result, roots are exposed to nutrients, oxygen and humidity. Plant leaves consume carbon dioxide (CO 2 ) from the air. Sunlight or artificial light of LED lamps supply the light energy to the plants for photosynthesis. The smart controller keeps the pH and EC of nutrient solution stable. Farming in non-arable and space-limited areas can be successfully carried out using the aeroponics method [30]. These systems require less space and 95% less water compared to conventional systems. Plants record faster growth in an aeroponics system. Aeroponics systems are low-cost and provide a faster growth rate if the supply of water and nutrient is controlled, keeping the plants' requirements into consideration [31]. Electrical conductivity and pH value of the nutrient solution, humidity level, and dissolved oxygen concentration of the air, light intensity and temperature of the ambience, misting frequency of the nutrient, atomization time and interval, etc. are the parameters to be controlled in a smart aeroponic system [32]. Researchers of the Vegetables Research Institute (Balitsa), Ministry of Agriculture, Indonesia, have grown potatoes in a cost-efficient aeroponics system, wherein temperature and humidity are monitored and water and nutrients supplies are controlled to maximize the production [33]. A web-based monitoring system with a data sensing module, management system, communication modules, and actuators tracks the climate data, plant health, and required nutrients to control them with a smart decision-making system. Renewable energy-driven artificially controlled smart aeroponics systems increase production while keeping costs and energy consumption minimum [34].
It is understood from the above discussion that soilless farming techniques with smart control will give better production in indoor environments while consuming lesser resources, indicating that smart indoor farming techniques are the need of the hour.

Energy Harvesting
Energy is one of the fundamental resources required by the agriculture sector. Conventional sources of energy (i.e., fossil fuels) pollute the environment and exhaust in the near future. Renewable sources of energy are the right alternative as they minimize negative environmental impacts and non-recyclable secondary wastes, hence contributing towards a sustainable future. The contribution of renewable energy resources to total consumption is significantly increasing ( Figure 6) and will become 47.7% by 2040 [35]. Figure 7 shows the percentage distribution of fossil fuel use in conventional agriculture [36]. For smart organic farming some component of the above figures changes as most agricultural machinery are typically used in outdoor farming, and the optimized use of fertilizer minimizes the energy requirement. Bio-mass, photovoltaic, solar thermal, wind, micro-hydro, etc., are some popular sources of renewable energies and can be used in small-scale and medium and large-scale agricultural farms but are more suitable for indoor farms. Solar energy is an important energy source, as 1.8 × 1014 Kwatt of emitted energy from the Sun is intercepted by our planet. This energy can be converted by using solar thermal electric power systems that convert heat into electricity or by using solar photovoltaic systems that use photovoltaic cells to convert light energy into electricity. The off-grid solar plant is independent of grid supply and is preferred in remote areas. An off-grid plant consists of solar panels (to produce electricity from sunlight), a battery bank (to store electric power), an inverter (to convert direct current (DC) into alternative current (AC)), charge controller (to regulate the charging of batteries and protect it from damages), mounting structure (to hold the solar panels), and junction box-wire-switches (for establishing the electrical connection up to agricultural appliances). In off-grid hybrid solar plants, a diesel generator also produces electricity and contributes to the overall generation (especially when solar radiation is low). The working principle of the off-grid hybrid solar plant is demonstrated in Figure 8. Researchers have proposed solar plants with an automatic tracking system to generate more power for agricultural farms [37].  Wind energy is another sustainable energy source and is being increasingly used as a source of power in agricultural farms [38]. Windmills are installed at selected geographical locations where wind speed is reasonably high. In a wind power plant, the rotation of the turbine due to the wind is converted into electricity [39]. Turbine rotor blades rotate when wind strikes, and the gearbox transforms it to high-speed rotation. The generator coupled with the gearbox converts mechanical energy into electrical energy. The AC output of the generator is converted to DC by the rectifier. It is then converted to stabilized AC for local use or for feeding into the grid with the help of a transformer. The working principle of a wind power plant is elaborated in Figure 9. Electricity can also be generated from organic residues, which is called bio-mass. Some popular bio-mass sources are animal residues, forestry residues, agricultural residues, urban organic residues, industrial organic residues, etc. Bio-waste from farming also helps to generate electricity [40]. Stored bio-mass is burnt in a combustor after preprocessing. The boiler uses the generated gas to generate steam. The steam turbine produces electrical energy from mechanical energy. The generated electrical energy can be used to run the agricultural appliances. Figure 10 elaborates the process of electricity generation from biomass. Researchers are working towards the micronization of the system for electricity generation from biomass [41]. The micro hydropower plant is another source of renewable energy that can be used in agriculture and contribute significantly to reducing greenhouse gas emissions. Researchers have done extensive reviews on the micro-hydro power plant system [42]. Figure 11 shows the electricity generation process in a micro hydropower plant system. Such a system can generate up to 100 Kwatt of electricity. Water from larger sources or rainwater is directed towards the surge tank through the water canal. Penstocks are used to direct and control the flow of water from the surge tank to the powerhouse. With the help of the pump, turbine and generator, mechanical energy is converted into electrical energy in the powerhouse. The generated electricity is stored or used to power agricultural appliances. A standalone farming system can be developed in remote locations using suitable renewable energy resources or a combination of more than one source (hybrid) depending on the geographical and environmental conditions.

Technological Infrastructure: Smart Technologies
Globally, agricultural systems have become market-driven, information-based, and highly competitive in nature. The majority of the innovations in agriculture involve incorporating precision agriculture and smart farming techniques as a part of the central control and management system. It will provide optimized outputs based on the collected information through sensor networks. Far and Rezaei-Moghaddam (2018) [43] have analyzed the environmental, social, technical, and economic impacts of precision agriculture in Iran and concluded that adaptation of precision agriculture would enhance agricultural sustainability. Data-driven agriculture was introduced to improve the accuracy based on the data generated by precision agriculture, which in turn is leading further towards the development of Agriculture 4.0 in which the emphasis is on using robotic equipment and autonomous decision support systems that exist in the form of AI technologies [44]. The development for precision agriculture, as well as conceptualization of agriculture 4.0, have become possible due to new technological infrastructure such as the Internet of Things (IoT), wireless sensor networks (WSN), big data coupled with cloud computing, block-chain, machine learning, deep learning, computer vision, etc.
IoT is one of the most relevant technologies which has received more attention in recent times. Gubbi et al. (2013) [45] has defined IoT as "Interconnection of sensing and actuating devices providing the ability to share information across platforms through a unified framework, developing a common operating picture for enabling innovative applications. This is achieved by seamless, ubiquitous sensing, data analytics and information representation with Cloud computing as the unifying framework". IoT has a multitude of applications ranging from transportation, healthcare, smart environment, personal and home monitoring, and enterprise to the area of smart agriculture. The IoT ecosystem in smart agriculture has mainly four components: IoT devices, communication technologies, the Internet, and data storage and processing [46].
To obtain information about different spatial and temporal variables in the agricultural field, WSN, remote sensing (RS) technology, and unmanned aerial vehicles based on WSN or RS are generally used [47], among which WSN-based data collection is relevant and can be adopted in smart indoor farms. The architecture of WSN is elaborated in Figure 12 [48]. Different application-specific sensor nodes (for data acquisition) and actuators (for performing control action) are deployed at the agricultural farm. The deployed nodes communicate using the radio-frequency (RF) spectrum. Gateway helps to establish a connection between sensor/actuator nodes and remote servers. Gateway uses radio frequencies or global system for mobile communication (GSM) or GPRS for communication. Using this architecture, the user or farmer or farm manager can remotely monitor and control any action (such as watering) on the farm. Collected data with high volume, velocity, and variety are termed big data, and wireless sensor networks are one of its main sources [49]. Big data can help in farm management through a sequence of correlated activities (i.e., data capture, data storage, data transfer, data transformation, data analytics, data marketing), which form a data chain. The data warehouse stores huge and relevant data of the farm and analyses the data. Cloudbased data warehouses for which farms do not require purchasing any physical hardware have become very popular nowadays. They produce fast results due to their easy access and are relatively cheap. Large smart farms frequently use cloud computing [50] technology for storage, software use, analytics, etc. Figure 13 elaborates the general architecture of cloud computing. User or farm managers use the front end of the architecture, which includes web applications, hardware infrastructure, etc. The back end of the architecture contains several components, such as infrastructure (which includes servers, storage, software), storage (to store, manage the client data), runtime cloud (to provide runtime environment), cloud services (to manage different types of cloud services), and application (to provide a platform for different client access).
Blockchain is another emerging technology, which brings transparency to the agriculture and food supply chain. Researchers have analyzed the scope and impact of blockchain technology in agriculture by reviewing current initiatives [51]. In blockchain technology, the digital ledger of the transaction is duplicated and maintained by a distributed network of multiple nodes, which makes it immutable and secure. It helps to improve food security, food safety, and food integrity by providing reliable and efficient exchange in the food supply chain. The ecosystem of waste management and recycling of agricultural residues has embraced blockchain-based digital rewarding system. Credit evaluation, human resource management, food quality management, etc., have been improved with the incorporation of blockchain in agriculture [52]. It is essential to monitor plant phenotypic traits at different stages of a lifetime to optimize resource intake and create the required artificial environmental conditions. Plant phenotyping is the science of modelling and comprehensive assessment of different plant traits such as plant morphology, growth, physiology, stress, yield, ecology, etc. [53]. There are two types of plant phenotyping methodologies, destructive and non-destructive. The details of the plant phenotyping process and categories are elaborated in Figure 14. Visible spectral imaging-based plant phenotyping is increasingly being used for its cost-efficient set-up and suitability in a wide range of applications [54,55]. Machine learning techniques and traditional computer vision methodologies are used to build a comprehensive model based on phenotyping traits. Machine learning is a scientific area that is considered a subset of artificial intelligence (AI). It learns from the pattern of the data available and builds a forecasting model to predict future outcomes. In machine learning, the first raw data are collected from different data sources. After that, raw data are preprocessed by filling up the missing values in the dataset and converting the categorical values into numerical values. In the next step, the data are divided into training, testing and validation sets. Based on the extracted features of past data, a forecasting model is built. After validation, the model is deployed for predicting future outputs.
When applied to agriculture, machine learning is helpful in better learning from the sensed data, providing real-time decision-making to manage farming systems efficiently and intelligently, which improves production [56]. Deep learning and computer vision together can offer non-destructive methods of analyzing plant life cycles and have the potential to achieve state-of-the-art results on challenging problems. As it is evident that these technological infrastructures have been used in one form or the other for better crop yield, similarly, they could be exploited to develop smart indoor farming systems by deriving certain important characteristics of these technological infrastructures. In this context, a smart indoor farm architecture comprising six layers has been shown in Figure 15. This sixlayered architecture provides a new perspective on which smart indoor farms architecture could be conceptualized and discusses the technological infrastructure that forms the basis for a particular layer. In addition, soilless farming, energy harvesting and technological infrastructure represent a three-dimensional resource management perspective in the sense that their management is an important part while developing a smart indoor farm system.

AgriSense Layer
AgriSense layer contains physical devices such as sensors, actuators, micro-controllers, tags, etc. Sensors are devices that detect changes in the farming environment and generate a corresponding electrical signal. Soil moisture, air temp, humidity, air pressure (Akkaş and [57], water pressure, soil pH, leaf area index [58], camera sensors are the different kinds of sensors that are used [59]. Tags such as RFID are used to attach an identity to the sensors. Sensors, tags, and micro-controllers form a WSN based monitoring system [60]. Motors, relays, etc., are used for the moving and controlling mechanism required in actuation. The monitoring process is carried out with the help of wireless sensor networks deployed on the farm. Primary data (i.e., sensor data) are collected at certain intervals. Camera sensors are used to capture plant growth and related parameters. The collected data gives an insight into the current stage of the plant life cycle. Table 1 elaborates the types of sensors that are used for data collection. To determine the location of the farmland.
Used mainly in outdoor farming 2 Optical Sensor The spectrum of reflected light from the soil is analyzed to determine the properties and content of soil.
To determine clay matter, organic matter present in the soil and soil moisture content.
Mostly used in outdoor farming using satellite and airplane platform. It can also be used from Unmanned Aerial Vehicle (UAV). In indoor farms these sensors can be incorporated in UAVs for soil analysis. It is used to determine the fertilizer required and also to maintain soil pH and electrical conductivity.
Used both in outdoor and indoor farming.

Mechanical Sensor
Measures mechanical resistance of soil using load cells when anything penetrates it Used in intervention analysis and in irrigation analysis.
Used both in outdoor and indoor farming.

Airflow Sensor
Measures Soil Air Permeability indicates the required pressure for conduction of a certain amount of air at a particular ground depth.
It is used to determine certain soil properties such as soil type, structure, compaction, signature, etc.
Used both in outdoor and indoor farming. It is used to get an idea of soil texture.
Used both in outdoor and indoor farming.

Connectivity Layer
This layer helps to route the collected data from the tangible layer to the core-handling layer. Researchers have proposed several protocols which provide high performance with low power consumption. Data collected from sensors are transmitted using smartphones, wireless network devices (such as Zigbee, Bluetooth, etc.). Besides routers and bridges, gateways are the network equipment used in the connectivity layer. Depending on the performance metrics and the requirement of the application, a suitable protocol is chosen. Table 2 [61] elaborates on the useful communication protocols for farming applications. Various web services architectures such as simple object access protocol (SOAP) and representation state transfer (REST) are used after collecting the data via WSN for communication between more than one application through the World Wide Web [62]. Additional necessary data collected at a certain time interval may be communicated to the data server using one of the following communication protocol standards: IEEE 802.15.4 [63], IEEE 802.11, IEEE 802.15.1, GSM, etc.

Intermediate Layer
The intermediate layer establishes the communication among things of the AgriSense layer. Different data protocols [64] are used for this purpose. Message queuing telemetry transport (MQTT) is one such data protocol that is a bi-directional messaging protocol. It works using subscriber, publisher, and broker as key elements. Constrained application protocol (CoAP) is also a data protocol that facilitates devices with web-service functionalities. Extensible messaging and presence protocol (XMPP)-IoT is used for real-time communication between different devices and servers.
This layer interacts with various communication protocols at the connectivity layer and provides a number of services to have bidirectional data exchange, storing and processing short-term data, accumulating data from various sources, and their translation as per protocols used. However, since the data has to travel from the AgriSense layer to the cloud, this layer acts as a bridge. It has to take care of the conversion of incoming data to the corresponding format, which enhances interoperability among various levels and facilitates a smooth flow of information.

Core Data Handling Layer
This layer provides management and decision-making service [65]. It stores the huge data transferred by the connectivity layer and analyzes it. The layer employs several technologies such as big data, machine learning [66], cloud computing, database management, etc., to manage the data collected in the smart farms. Smart indoor farms inherit some of the key issues such as intelligent processing of quality data collected in an indoor environment, identification of data sources, business models, and platform independence in addition to providing security so that the benefits could be leveraged to small and medium-scale farmers.
Smart indoor farms use smart systems customized for indoor agriculture featuring a data importation frontend, a software module for decision making, as well as a management module and a cloud-based actuation module [67,68]. The cloud services platform integrated with the Internet of Things (IoT) provides web services for the ICT components connected over the internet [69]. A Google Web Toolkit-based greenhouse monitoring and management system with a web browser, an android application, a web server and a database can realize the decision-making system based on the information gathered [70]. There are many instances where researchers have incorporated IoT into indoor farming. One such example is a smart and remotely controlled water supply system that has been designed for vertical farming. It is used to supply water to the plants based on their soil moisture condition [71].
Due to their commonalities in some aspects, IoT and big data can help the current indoor farming systems cope with the global competitive market by offering a smart model that utilizes every bit of information generated [72]. A hierarchy of data, information, knowledge, and wisdom at the top defines the agricultural decision-making process [73]. As the huge amount of data of the agricultural sector is collected from various sources, it is unstructured in nature. To better understand, modelling the collected data in a meaningful manner is important [74]. After modelling, the next step would be to extract the core value by eliminating the unwanted data dimensions. Among various algorithms proposed by researchers worldwide, the Higher-Order Singular Value Decomposition (HOSVD) is one such algorithm used for this purpose [75]. Hadoop Distributed File System (HDFS)is a distributed file system widely used by the farms for high fault tolerance efficiency and its ability to be deployed on low-cost hardware [76].
In today's data-centric smart agriculture, machine learning is a useful tool for analyzing yield prediction, crop health condition monitoring, water control management, soil management, etc. [77]. To predict agricultural yield, data related to climatic parameters [78], soil quality [79], and production of previous years [80,81] need to be collected. Outside climatic conditions are not directly relevant in the case of smart indoor farms. Hence for indoor farms, production can be predicted using soil information, indoor microclimatic conditions, and plant images at different stages of its life cycle. Crop health monitoring is another field where machine learning algorithms are applied. The researchers have used support Vector Machine (SVM), Bayesian Network, Neural Network, Regression [82] and other algorithms for crop pest prediction in advance. To identify the nutrient deficiency in plants [83], images are captured from the farm field using cameras and analyzed using a machine learning algorithm [84]. Plant phenotyping is another dimension of smart farming where machine learning is used frequently [85]. Plant phenology is the study of the sequence of biological events occurring in the plant body. Deep-pheno is a concept where deep learning is used to analyze plant phenology [86]. In stress phenotyping images and sensor data are used for analysis [87]. Understanding soil is an important factor in determining the quality of agricultural output. Machine learning techniques are widely used in crop suggestions based on soil [88], fertility grading of soil [89], soil moisture prediction [90], etc. Machine learning could also be employed in some of the connected areas related to smart indoor farms, such as the determination of production quality [91], designing of soil sensors [92], weed detection [93], etc.
Therefore, the core data handling layer has all of the capability of long-term analysis of data collected over time, but at the same time, decision-making and controlling actions could be made faster to optimize the resource. One advantage of these systems could be understood that in such systems, no emergency intervention and/or control is needed like it may be needed in applications such as mHealth or Smart Health. Rather, the information sharing and analysis in connectivity and intermediate layers may help arrive at a long-term solution for smart indoor farms.

Farmer Experience Layer
This layer takes the services to the end-users, who are farmers in this case. Information, prediction, and analysis reports are shared with the farmers. Farmers may use various means for accessing the information provided by the core data autonomously handling layer. A number of mobile apps have been designed for multiple applications such as irrigation, soil assessment, management of various resources (fertilizers, weed, pest, etc.), and spraying applications. However, customized applications based on the farmer's need related to various plants, soil and weather conditions, energy requirements, resources to be utilized, and mechanisms to control will be more helpful. Prior information of any disease using various techniques, nutrients to be added, and resources to be procured and deployed could all be done with the help of specific customized applications. Besides, the feedback that the farmer may provide the learning environments will also be an added advantage.

Agri-Bussiness Layer
This layer creates profit models and interconnects all of the stakeholders to the farmer [94]. It manages the whole system by deciding each layer's services and how they fit the profit model. Researchers use data analysis and modelling tools such as Ag-Biz Logic and TOA-MD to better understand the agricultural system, which quantifies the economic, social, environmental, and other outcomes associated with the farm. The Agricultural Model Intercomparison and Improvement Project (AgMIP) is a large-scale international project which models climate, crop and economic data to project the impacts of climate in the agricultural sector [95]. Several challenges for handling sustainable integration of Big Data sources to build attractive business models have been discussed by [76]. Agricultural Value Chain (AVC) [96] is another important concept which is driven by the Agri-Business layer. A set of actors forms AVC, and actions on their part add value to agricultural products. It is an interesting concept which analyzes the relationship among farms, suppliers, traders, retailers, and consumers. Big data plays a major role in maintaining the flow of knowledge and information in AVC [97]. A hierarchy of data, information, knowledge, and wisdom at the top defines the agricultural decision-making process [73].

Control and Management Services
Smart indoor farms use several techniques that create an artificial environment for crop production in a limited and controlled area. Some of the methods discussed by [98], highlights that proper control and management services will improve the efficacy of smart indoor farms in the near future.

Artificial Lighting
Sunlight is the source of energy for the process of photosynthesis. Researchers have conducted several experiments to find an alternative energy source for indoor farming environments, especially for vertical farming infrastructure. Figure 16 elaborates the artificial control and management procedure of lighting in smart farms. Fluorescent lamps, high-intensity discharge (HID) lamps, and light-emitting diodes (LED) are the main sources of artificial lighting that can be used in controlled farming environments. LEDs are affordable, generate low heat and provide maximum photosynthetically active radiation (PAR) efficiency. In contrast, fluorescent lamps have unstable intensity levels and HID lamps have high operating temperatures, preventing them from being placed near plants [99,100]. Olle and Viršile (2013) [101] studied the effects of artificial LED light on metabolism, growth, and photosynthesis in green vegetables and some selected plants. The experiment showed that red and blue lights are essential for the photosynthesis of plants. Far-red light contributes more to plant growth and photo-morphogenetic processes. Green and yellow have mostly physiological effects on plants. Efficient light spectra for artificial farming have more red and blue areas [102]. To observe the impact of LED irradiance on tomato plantlets, an experiment was conducted in four types of LED lighting environments (i.e., 100% red LED, red and blue in the ratio of 5:1, 10:1 and 19:1). It showed that the lighting condition having a red to the blue ratio of 10:1 recorded the highest photosynthetic rate. In contrast, lighting conditions with 100% red LED resulted in the highest growth in plant height [103]. Another experiment on Brassica Chinensis under pulse and continuous light treatment showed that continuous light treatment performed better [104]. In most of the experiments mentioned above, leaves count, plant height, fresh weight, dry weight, moisture content, and chlorophyll content are the typical parameters recorded and compared to measure the plants' overall growth.
If environmental factors such as temperature, carbon dioxide level, humidity, water cycle, and photosynthetic photon flux density value (PPFD) are controlled, pepper plants show a morphological improvement [105]. Casaba et al. report optimal pulse width modulation (PWM) duty cycle, light intensity, and frequency of luminance for some selected species of plants [106]. Osaka Prefecture University, Japan, adopted an artificial hybrid LED light source (i.e., combinations of red, blue, white, far infrared rays) and noticed a reduction of electricity consumption by 70% compared to fluorescent lights [107]. A specifically designed LED lighting system with two channels (i.e., red and blue) can control the radiant flux of the channels generating a supportive environment for hop crop, which is generally susceptible to radiation [108]. Commercial LED lighting modules which are extensively used in indoor farming, implements a control mechanism for maximum LED current, power factor [109], light intensity, pulse lighting treatment [110], etc. to optimize the consumption of electrical energy and increase the photosynthesis rate. It has also been proved that red and blue LED triggers the enrichment of chlorophyll a and b and carotenoids, increasing photosynthesis [111].
The above reviews reflect that artificial lighting helps the plants achieve better photosynthesis rate and overall plant growth under continuous lighting, which is possible only in the indoor environment. Only the effective part of the light spectrum should be used, among which a combination of red plus blue lighting and pulse lighting gives a better photosynthesis rate. However, further research is needed to arrive at unique solutions that save electrical energy and optimize light energy consumption under phased lighting conditions.

Smart Nutrition Management
Nitrogen, phosphorus, and potassium are the key ingredients and primary nutrients required for plants' growth. Secondary nutrients (i.e., sulfur, calcium and magnesium) and other micronutrients (i.e., chlorine, iron, manganese, zinc, copper, boron, etc.) are required in smaller amounts [112]. The soil fertility can be evaluated by measuring the following parameters: pH, electrical conductivity, organic carbon, primary and secondary nutrients [113], soil texture, density, water-retention capacity, etc.
Balanced and optimal use of fertilizer is a part of plant nutrition management as excessive use of it may lower yields, cause damage to the farmland and the environment. Imam et al. have optimized the dose of fertilizer by using Integrated Artificial Neural Network (ANN) and Bi-directional Improved Particle Swarm Optimization based on target plant dry weight (ton/ha) and yield (ton/ha) [114]. Optimization of Fertilizer Recommendations in Africa (OFRA), a research project, has developed a fertilizer optimization tool (FOT) for 65 Agro-Ecological Zones (AEZs) and 14 crops of Sub-Saharan Africa to inform farmers about the optimized use of fertilizers [115]. The incorporation of smart nutrition management in smart indoor farms would increase farm production. Figure 17 explains the process of optimization and control of nutrition dose in smart farms.

Artificial Climate Control
The productivity of present agricultural systems gets affected by uncontrollable biophysical situations such as floods, drought, soil erosion, heavy precipitation, etc. [116]. Climate change and variable local weather conditions are also considered to be great constraints to farming. In recent times, farmers adopt climate-smart agriculture (CSA) technologies [117,118] to deal with extreme biophysical situations. CSA technologies for smart indoor farms become different as they do not face extreme weather conditions due to being isolated from the external climate. CSA can be used to manage indoor climatic conditions by controlling the microclimatic factors. Figure 18 elaborates artificial control and management techniques of the micro-climatic condition of smart farms. Popa and Ciocarlie (2011) [119] have introduced a distributed smart indoor climate control system where data collecting nodes, servers, clients and actuators are connected over the internet to monitor and control the indoor temperature. To develop a useful heating, ventilation and air conditioning (HVAC) system for the indoor environment, microclimatic factors are controlled using several methods such as adaptive control of outdoor climate, proportional integral derivative (PID) based control, fuzzy logic-based control, artificial neural network (ANN) based management system, neuro-fuzzy based control, optimization algorithm-based control, etc. [120,121]). Temperature and humidity are among the primary parameters that are required to be monitored and maintained in a predetermined range to get the best indoor environmental condition [122]. A self-tuned PID controller whose system output parameters are calculated using a fuzzy inference system has been successfully used to maintain temperature and humidity in a predetermined range [123]. A PID controller is a feedback controller which can be used to adjust the input parameters (i.e., temperature and humidity) by minimizing the error [124]. A fuzzy immune PID controller gives a better dynamic performance than a PID controller [125]. Ahamed et al. (2018) [126] have proposed a quasi-steady state thermal model to simulate the greenhouse heating requirement, considering most of the sources and sinks of thermal energy. The contribution of solar radiation is not relevant in indoor farming. In contrast, heat transfer by conduction and convection, air exchange, heat exchange through floor and perimeter, and evapotranspiration are important parameters. The ventilation rate and other microclimatic parameters of greenhouses are nonlinear and non-affine. Fuzzy logic systems are introduced to model the system's unknown dynamics and track the output parameters [127]. The same model may be adopted for indoor farming also. The dynamic climate model of greenhouses, which involves microclimatic parameters, crop growth parameters, external climate parameters, control input parameters, and structural and materialistic parameters to determine the climatic condition is also adaptable for indoor environments [128,129]. In association with a nonlinear feedback controller, the Kalman filter removes sensor noise that corrupts the measured variables and processes noise that corrupts the system dynamics. This method decreases error and smooths a climate control system [130]. Optimization of climatic conditions with the constraint of minimum energy consumption is the primary objective of the indoor climate management system. A nonlinear Model Predictive Control (MPC) algorithm based on Particle Swarm Optimization (PSO) can optimize the objective function with minimum consumption of energy [131]. Optimization of climatic conditions involves several conflicting objectives. multi-objective evolutionary algorithms (MOEAs), which are used to solve multi-objective optimization problems, search the control signals in the solution space for optimal control of climatic conditions [132].
The demand for energy resources is increasing with time around the world. In the case of artificial climate control, energy consumption can be reduced if proper ventilation and thermal insulation of the buildings are maintained. Researchers have conducted a thermal simulation of a building to understand the effect of different internal designs and building materials such as bricks, concrete, thermal insulation, lime plaster, cement plaster, wood, screed, etc., microclimate [133]. Phase change materials (PCM) are mostly considered for lightweight buildings due to their higher heat inertia. It does not let the indoor climate be affected by a sudden change in the outdoor environment [134]. Green Wall Planting is another cost-efficient method that works both as a cooling insulator and air purifier. Green wall vegetation, mini pot plants or pocket plants are three categories of green wall planting used in buildings to save the indoor climate from external heat effects [135]. Plant wall makes the indoor microclimatic condition better by reducing particulate matter and stabilizing carbon dioxide levels [136]. For desert areas, natural ventilation during the night reduces the energy consumption of cooling. Researchers have developed the numerical model of thermo-aerodynamics of the natural night ventilation, which can also be adapted for indoor farming [137].
Indoor microclimatic condition control poses challenges such as design and installation of sensing and actuating elements, air conditioning, ventilation, thermal insulation, optimal algorithms for automation. However, smart indoor farms can be controlled and efficiently managed by collecting relevant farm data from remote locations due to their connectivity over cloud platforms.

Crop Planning
Farmers cultivate varieties of crops which include food crops such as rice, wheat, maize, pulses, vegetables, fruits, etc.; plantation crops such as cotton, coffee, tea, cocoa, oilseeds, etc.; horticulture crops which are produced in the garden culture such as fruits, vegetables, spices, beverages, nuts, etc.; forage crops such as barley, grass, alfalfa, etc.; and manure crops such as beans, red clover, lupin, winter tare, etc. These crops are produced in different seasons depending upon the availability of irrigation water, land availability, weather condition and usage of fertilizer, soil condition, economic feasibility, and profitability. Hence, an optimized cropping pattern considering all of the influential factors would help in increasing productivity [138]. Figure 19 reflects the deciding factors in crop planning of smart farms. Only selected crops of different varieties can be cultivated in an indoor environment. Though geographical location, weather conditions, availability of land do not have any impact on deciding the crop pattern of indoor farming, soil type and its composition, nutrients present in the soil, availability of water resources, use of fertilizers and pesticides, harvesting methods, and economic profitability are the deciding factors. Machine learning techniques are instrumental in finding a cropping pattern considering all of the necessary constraints [139]. Artificial Neural Network (ANN), Information Fuzzy Network (IFN), Decision Tree, Regression Analysis, Clustering methods, Principal Component Analysis (PCA), Bayesian Belief Network, Time Series Analysis, Markov Chain Model, etc. are among the most used machine learning algorithms. ANN is a supervised learning technique that predicts future instances based on a training model generated from training data by replicating the Human Brain's biological processes. IFN, which is also a supervised learning algorithm, constructs a Fuzzy Network to process data. Decision Trees use tree-like structures, which is a model of decisions. Regression Analysis includes a set of statistical processes to find out the relationship among different variables. Clustering is an unsupervised machine learning algorithm that partitions the dataset into groups without using any predefined model. PCA uses principal components which indicate uncorrelated variables to arrange the data according to its similarity. Bayesian Network reflects the conditional dependencies of a set of variables and represents them using a graphical and probabilistic model. Markov Chain Model is a probabilistic mathematical model which finds output based on previous experience [140].
Prediction of cropping patterns can be considered as an optimization problem that is subjected to different constraints. Piecewise Genetic Algorithm (PWGA), a modification of the Genetic Algorithm, is used where nonlinearity is present and the number of variables is high. Ghasemi et al., 2016 [141] have used PWGA to find an optimized solution for cropping patterns and water allocation problems. Demand for water resources is increasing exponentially due to the increasing population. Optimization of crop patterns based on the availability of water resources is needed to avoid a water crisis. A set of constraints such as availability of water resources would be positive but should be within a limit and should not exceed the required amount, area constraints, productivity constraints, etc. These need to be addressed for this optimization problem. Particle Swarm Optimization (PSO), Simulated Annealing (SA), and other meta-heuristic algorithms can be used to solve Multi Crop Planning (MCP) problems while addressing the water resource constraint in an indoor environment [142]. Multi-Objective Fuzzy Stochastic Model-based on GA can be applied to determine the most suitable cropping pattern balancing the water resource [143]. A comparison of four popular evolutionary algorithms (EA) (i.e., Genetic Algorithm (GA), Particle Swarm Optimization (PSO), Differential Evolution (DE), and Evolutionary Programming (EP)) to find a suitable crop pattern under the availability of limited, normal and adequate water resource shows that PSO, DE, and EP outperform GA [144].
In a case study of Rajoli Banda Diversion Scheme area, Mahaboobnagar, Andhra Pradesh, India, optimized crop pattern for different seasons was formulated and solved using Lingo software tool by considering linear programming [145]. In this case study, experiments were performed on several crops (i.e., jawar, cotton, groundnut, chilies, pulses, paddy, maize) to find out the pattern with maximum profit. In another case study, linear programming was used to maximize the annual profit by managing the land and water resource constraints for optimizing cropping patterns in three regions of Egypt. The data for 28 selected crops were collected for consecutive five years (i.e., from 2008 to 2012) for different seasons for analysis purposes [146]. The Markandeya command area's cropping pattern, Karnataka, India, was also optimized with linear programming under variable water supply and has recorded maximum benefit [147]. Smart indoor farms can adopt optimal utilization of irrigation water, which is limited in nature. Optimization models based on linear programming can be useful in this context [148].
Crop yield prediction requires a comparison of different proposed cropping patterns. fuzzy logic, multilinear regression, artificial neural network, and adaptive neuro-fuzzy inference system (ANFIS) are the most commonly used techniques to predict crop yield. Root mean square error (RMSE), mean square error (MSE) and correlation coefficient methods check the predicted result's accuracy. To predict the crop yield considering all internal and external factors influential, the neuro-fuzzy inference system (ANFIS) records better accuracy than other methods.
Numerous machine learning and optimization algorithms have been employed to optimize cropping patterns in the context of smart conventional framing. Smart indoor farms requirements vary based on the nature of resources utilized and the kind of control desired for crop planning. Crop planning for the indoor environment by considering market demand, supply, transport and other factors is a less explored research area. In this context, exploration of the agricultural value chain (AVC) of indoor farming may help to visualize the interaction between farmers and consumers. A possible solution could be found by employing metaheuristic optimization techniques [149], which require further analysis. An effective cropping pattern increases production while ensuring the farm's sustainability, which could be achieved by designing an efficient decision-making module.

Detection of Plant Diseases
Agricultural productivity is reduced due to damages caused by plant diseases. Plant diseases are caused due to the presence of three critical factors. The first one is the host plant which is susceptible to a particular disease or many diseases. Secondly, plant pathogens (i.e., fungi, bacteria) are present in the host plant. The third and most important factor is the environmental conditions that favour the spore production and thriving of plant pathogens. Smart indoor farms create artificial climatic conditions to maximize their production. Sometimes such artificially created climatic conditions become favourable for the spore production and spread of plant pathogens.
A smart computer vision-based periodic monitoring of the plants would result in the early detection of plant diseases. Hence countermeasures to contain diseases can be taken at the earliest. Figure 20 shows the adopted methodology for plant health monitoring and disease detection in smart farms. Healthy plants will maximize productivity, reducing the use of pesticides. Cameras integrated with robotic devices or mounted on specifically designed platforms can be used for periodic monitoring of plants, and infected plants can be found by investigating the images. Both RGB and NIR (near infrared spectroscopy) based cameras can be used for this purpose. RGB camera shows better performance compared to NIR-based detection [150]. An integrated technology consisting of machine vision and the Internet of Things can be deployed at smart indoor farms to get an early alert about the crop infection and take immediate remedies [151]. Unmanned aerial vehicles (UAV), also known as drones, have been already introduced for smart agricultural activities. They are also used for plant disease diagnosis. In an indoor agricultural environment, the introduction of UAVs for plant disease detection and other activities would be an interesting idea to implement [152].
This section discusses a number of researches work for various plant diseases and their detection algorithms. One of the examples would be how computer vision technology can be wisely used to classify the damage in sugarcane billets and correlate it with sugarcane germination [153]. Powdery mildew (PM) is a fungal disease for which white powdery spots can be seen on tree leaves and stems. The symptom of the tomato spotted wilt virus (TSWV), which infects many horticulture crops, can be seen on the leaves and fruits. Algorithms such as Principal Component Analysis (PCA), Neural Network, Support Vector Machine (SVM), etc., have been used to detect the nature of the infection. PCA shows good accuracy in the detection of plants infected by PM and TSWV. Septoria, a fungal disease, causes spots on the leaves of field crops, forages, and vegetables. Yellow rust affects wheat, and the symptoms such as yellow streaks and uredial pustules can be noticed on the leaves. Experimental results have shown that the Support Vector Machine (SVM) based classification algorithm gives better efficiency for detection of Septoria and Yellow Rust compared to Artificial Neural Network (ANN) [154]. Baquero et al. (2015) [155] have applied the Nearest Neighbor Algorithm to identify six common diseases of tomato plants, i.e., early blight, chlorosis, sooty moulds, powdery mildew, necrosis, and white-fly. Early blight infects tomato almost in every season and affects its stems, fruits and leaves, resulting in defoliation and sunscald. Colour descriptors such as color structure descriptor (CSD), color layout descriptor (CLD) and scalable color descriptor (SCD) are used to get the regions of interest (ROIs) which indicate the infected parts of plants. The nearest neighbor (1-NN) classifier is used after finding the ROIs to differentiate between healthy plants and infected plants [156]. Segmentation of the images is important to determine the useful segment required to classify plant diseases [157]. After segmentation of the images, extraction of relevant features determines how good the classification accuracy would be. To discard the redundant features and the overall complexity, optimization algorithms such as the genetic algorithm (GA) are used [158]. Expert farmers can identify the infected plants and type of infection with a good level of accuracy. Fuzzy logic-based classification algorithms can accurately replicate the capabilities of a farmer's brain to classify the infected crops. It has been tested successfully to differentiate between healthy and iron deficient or infected strawberry leaves [159]. Hyperspectral imaging techniques have also been accepted by researchers for the diagnosis of plant diseases. Learning capabilities of neural network (NN) have made it one of the successful classifiers of hyperspectral images used for plant disease detection [160,161] have proposed a convolutional neural network-based method to classify an image dataset of 3750 images into six classes i.e., healthy plant, early blight, late blight, yellow leaf curl virus, spider mite damage, bacterial spot.
In another research, infected pomegranates were detected with a web-based tool's help [162]. In this case, features based on color, morphology and color coherence vector are extracted from the collected images. K-means algorithm was used to cluster the training dataset before feeding it to the support vector machine (SVM) for classification. Pomegranate plants could be infected with several fungal and bacterial diseases such as bacterial blight, fruit spot, fruit rot, leaf spot, etc. As the images are collected at different environmental conditions, noise may be induced while capturing the images. Different noise filtering techniques before extraction of features would increase the classification accuracy. As the input images of leaves, fruits and stems include edge information and directional statistics, rotating kernel transform (RKT) features, its improved versions, or other directional features accurately represent the image information [163]. The concept of m-agriculture is relevant in the context of plant disease detection as it provides a lowcost and low-energy solution for capturing images by using mobile phones [164]. The disadvantage of mobile captured images is that they cannot capture the minute details present in an image.
Plant pathogens can survive in specific favourable environmental conditions, which in turn cause plant diseases. Hence, it is crucial to find out the relation between environmental conditions and plant diseases. The beta regression model is one of the mathematical models that can be used to correlate environmental parameters such as temperature, humidity, leaf wetness, and plant infection [165]. Identifying a successful model will help predict various plant diseases by analyzing the environmental conditions and alert the farmers to considering necessary remedies. Majorly computer vision techniques with a combination of machine learning algorithms have been mentioned in the literature, complementing the utility of the decision-making module and technological infrastructure.

Smart Indoor Farming: Key Challenges and Solutions
Smart Agricultural Farms with resource management systems face several technological and financial challenges. The following sections deal with the key challenges and their solutions proposed by researchers.

Communication, Networking and Architectural Issues
Due to the presence of multiple objects at indoor plant factories, wireless signals get affected and localization of sensor nodes may become critical. The Particle Swarm Optimization Assisted Extended Kalman Filter (PSO-AKF) is one proposed algorithm that can solve the critical localization problem [166]. Fully automated large-scale indoor farms face networking challenges due to heterogeneous devices and communication protocols and mobility and scalability issues. Information-centric networking, where content-based addressing is used instead of IP-based addressing, is a proposed solution to address these issues [167]. Software-defined networking, which helps in the quick configuration of existing devices present in the network, is used for mobility management [168]. Software-Defined Virtual Private Network (SD-VPN) is a secure and easily scalable IoT network [169]. In SD-VPN, each application remains logically isolated from other parts of the network.

Standardization and Interoperability Issues
The decision support and management system incorporate several hardware and software modules as front-end applications. These modules are from a wide variety of vendors due to their multidimensional uses. Hence, integrating these modules into a single architecture becomes a major issue due to the lack of smooth interoperability and data exchange. A software ecosystem customized for farming can solve this problem as it can interconnect the information and communication technologies (ICT) components coherently [170].

Privacy and Safety Issues
With the incorporation of multidimensional features in smart environments to communicate between the nodes, sharing valuable data and smart actuation, security and safety issues have become a major concern. Some of the significant security issues for smart indoor environments are described in this section.
Leakage of monitored information, trespassing using malicious codes and distributed denial of service (DDoS) are major security concerns of smart IoT networks [171]. In DDoS, intruders send bulk messages and instructions to the smart nodes, and consequently, the resources drain out, creating a crisis in the network.
To deal with the security challenges of the smart environment, researchers have proposed a systematic approach where all the stakeholders, i.e., users who define the security rules, the process involved, smart objects, smart technological ecosystem, interact with each other using a secure dynamic model represented by the tension that ties them with each other in a secure manner [172].

Green Energy Issues
Unavailability of fossil fuel and an increasing oil crisis are matters of concern as these are widely used as energy sources. Large-scale smart indoor farms require a continuous supply of energy for their deployed IoT devices. Renewable and green energy are considered to be alternative sources of energy. Solar Greenhouses have already been implemented, which can be adopted in indoor farming [173]. Solar cooling, heating, and lighting systems are commonly used in greenhouse environments.
Green IoT is a concept that reduces the energy consumption of IoT devices, ensuring their sustainability for a more extended period [174]. Energy-efficient data centers, data transmission mechanisms, and different energy-saving policies are part of green IoT strategies [175]. Harvesting green energy and periodic wireless charging of smart moving devices are key energy solutions for the energy-constrained smart environments [176].
From the above discussion, it is clear that solar-powered energy supply and the incorporation of green IoT devices and mechanisms together can solve the energy challenges of smart indoor farming.

Data Management and Data Mining Issues
Data mining techniques are applied to sensor data generated by smart devices to get hidden information. For large plant factories, it becomes very complex to extract knowledge or information from huge volumes of heterogeneous data. Most of the time, collected data from sensors are noisy and incomplete. To deal with data error, missing and noisy data, researchers use data filtering and cleaning techniques. Big data framework using parallel programming concepts can be a data mining solution to deal with large plants [177].

Feasibility Challenges
Indoor farming increases the chance of supplying produced food directly to the consumer by reducing the overall expenditure. It has so far been implemented in most of the countries in the form of vertical farms. The wide adaptation of smart indoor farms depends on investment, project profit, sustainability, and feasibility. To find the possibility, some small, medium and large-scale projects have been reviewed in this section.
Demands of vertical firms' agricultural products are growing at a rate of 30%, and greenhouses are growing at 8.8% due to increasing demand for local fresh food. Greenhouse technology requires less initial investment and maintenance costs than indoor farming, generating more profit [178]. Students of Weber State University, USA, have developed an aquaponics system called VEGILAB at a total cost of $8187.31. In VEGILAB, vegetables are grown under LED lighting using minimum space. The water tank can hold about 197 liters of water and six fish to support the crop growing [179]. Banerjee and Adenaeuer (2014) [180] have performed a detailed feasibility analysis of a 37-floor high vertical firm having dedicated floors for aquaculture, waste management, crop production and environmental regulation. With an initial investment of €200 million, 3.5 Gwh of energy supply and 80 million liters of water supply are required per year to maintain the farm. This work has investigated that though vertical framing is expensive and big initial investments are required to implement it on a large scale, it can become an economically profitable venture in the future.
Al-Kodmany, 2018 [181] has explored some of the successfully implemented indoor plant factories. Nuvege in Kyto, Japan, is one of them. It is an example of vertical farming with 30,000 sq. ft. of hydroponic facility and 57,000 sq. ft. of agricultural space. Singapore, which is an island nation, has only 250 acres of agricultural space and produces only 7% of the food required by its people. 'Sky Greens', which is its first commercial vertical farm supplies food to the urban people. 'Green Spirits Farms' located in New Buffalo, Michigan, is a successful commercial vertical farm with 40,000 sq. ft space, and it started with an investment of 27 million US dollars. In Chicago, 'The Plant' is a four-story (93,500 sq. ft) vertical farm producing electricity and heat from food waste (27 tons daily). 'Green Girls', a commercial food production vertical firm in Tennessee, USA, supplies fresh foods to local restaurants. As a result, the expenditure reduces to $40 per pound.
It is reflected from the reviews that several countries have adopted agriculture in smart indoor farms. The researchers have a tremendous scope to provide a cost-effective optimized indoor farming solution considering its products' growing demand.

Discussion and Future Research Scope
In this article, we have presented a perspective of control and management of modern agriculture and the adopted smart technologies which can be used for the resource optimization process for smart indoor farms. This article has reviewed a wide variety of research works such as vertical farming, greenhouse farming, precision farming, climate control, optimization of fertilizer usage, crop planning, soilless agriculture methods, agriculture in LED light, the feasibility analysis of indoor farming, etc. It consists of a farming bed coupled with several sensing elements to collect relevant data (i.e., data of soil moisture condition, lighting condition, water level, temperature, humidity, etc.), short-range and long-range communication channels for relaying the data to processing elements for local processing and to cloud for long-term analysis respectively, a smart decision-making module, and control mechanisms for lighting, temperature, humidity, pH and water levels, etc. In addition, an app-based mobile device is employed for quick visualization and actuation. Data analytics and management are considered to be the core of the system. Data are collected, prepared, analyzed and finally fed to the predictive model to decide the next course of action. The architecture has access to primary data generated from sensors and secondary datasets available for climate, soil, and other relevant fields. Generally, collected data are unorganized in nature, and these data are pre-processed before extraction of features. Extracted features are used for the building and optimization of a forecasting model. The validated forecasting model makes dynamic and smart decisions by analyzing real-time data collected from monitoring climate conditions, soil, plant nutrition, plant growth, and health-related parameters and triggers the actuation procedure. Artificial intelligence algorithms play an important role in analyzing data and building forecasting models. In addition, cloud-based control gives the architecture a distinctive feature for controlling sensing and actuating devices from remote locations. Artificial smart lighting is also an essential part of the system. It follows a combination of LED lights to create a formula of specific spectrum and intensity of lights to increase plants' productivity. A smart supply of micro and macronutrients ensures the plants thrive more than conventional agricultural farms.
The smart control of microclimatic features and controlled smart growing methods disrupt the usual life cycle of many harmful pests, ensuring a better yield. It is an off-grid solar power system and a standalone system in terms of energy requirement. The smart farm is scalable vertically or horizontally without changing the core architecture. The end-user application shares selective and important indicators to the users. The graphical user interface provided by the webserver helps the user visualize the conditions of the plant factory. The user also gets informed in case of any technical failure. The input provided by the user is also one of the important parameters while analyzing the data.
One comparative analysis of produced yield between conventional agricultural farms and smart plant factories is shown in Figure 21. It reflects field yield increase due to the use of technology and both technology and stacking in vertical farming. The referred plant factory is 37 floors high vertical farm established in a 0.25 Ha area with aquaculture, waste management, cleaning, food processing, management-control, etc., facilities [180]. This kind of plant factory can produce crops and fish at an approximate cost of € 3.5 to € 4.0 per kilogram. From the analysis, it is clear that though it has high production of crops (especially when compared to conventional farms), there is significant scope of research for expenditure reduction. Table 3 depicts numerous real-world examples of successful smart indoor farms implementations that employ a three-dimensional approach that encompasses soilless farming, energy harvesting, and smart technologies.   Several research opportunities in this field will add new dimensions to it in order to make it more efficient and sustainable. Smart indoor farms require much attention regarding how they can be made more cost-effective so that poor farmers can afford this technique with minimum investment. An improved and secure architecture with a better hardware-software ecosystem and better interoperability technique would increase the smart management system's efficiency. Researchers also need to explore how self-learning capabilities can be incorporated into the architecture with the help of machine learning and other data analysis algorithms. With the self-learning capabilities, it can learn from plant life cycle data and initiate smart actuation accordingly. The creation of an artificial climate in the indoor environment is another challenge in this field. Optimized use of water, nutrition, energy, and other resources to avoid resource crisis is an important dimension of research exploration. The challenges of the energy crisis need to be addressed using energy harvesting techniques. Finally, the research questions that need to be answered are how a standalone indoor plant factory can provide a sustainable solution and how it can be implemented simultaneously with conventional farming. Table 4 has listed some of the future research scopes that could be pursued in the context of smart indoor farms.  [188]. Improvement of accuracy in the present Computer Vision plant phenotyping methods using Deep Learning [189][190][191][192], Fuzzy [193] logic, etc. Biomass and quantity mapping [194], dead or diseased tree detection [195] using Unmanned Aerial Vehicle (UAV) or drone-based imaging. Estimation of Nitrogen dynamics, yield [196] and chlorophyll content from plant leaf images [197]. Stress detection and canopy temperature measurement using thermal imaging [198]. The scope of hyperspectral imaging [199,200] and multispectral 3D imaging [201] for the measurement of different plant physiological parameters need to be analyzed.

2
Resource management Optimal control of lighting [202]; control management and optimization of the use of water [203] and energy resources [204]. Energy-efficient [205] multi-sensor IoT network for agricultural resource management and optimal consumption of the resources [206]. Performance analysis and adaptation methods of Custom Hiring Services to increase the use of machineries in agriculture rather than using more human or animal power [207].
Optimization of nutrition intake [208] of plants by monitoring their abiotic stress [209] over time.
Scope of renewable energy [210] and Green IoT enabled smart networks in the framework of indoor agricultural farms is a promising area of research that can be explored more. Smart grid and energy management [211] systems are among the future areas of research, which are used to optimize the energy requirement of farms. Additionally, for Smart Multi Floor Vertical Greenhouse (SMVG) farms, the integrated smart microgrid network [212] is potentially a new area to explore.

Data and Information
Optimization of storage, processing and mining of huge agricultural data [213] and deal with the challenges i.e., security, quality, availability of data [214]. 4 Smart System, equipment and networking Data-centered farming using efficient sensors and better and secure communication [59,205] methods. Nanotechnology-based sensors [215] and energy-neutral biosensors [216] are among the next-generation sensors to be deployed in the agricultural farm. An autonomous crop-harvesting platform for better throughput and efficient farm management methodologies [217]. Precise sensors [218] and UAV-based [219] data acquisition, robotic automation [220,221], embedded software [222] and cloud-based [223] remote monitoring and control towards high throughput smart farming. Future challenges of IoT in agriculture [224] 5 Case studies, analysis of smart farming Design and strengthening greenhouse [225] and smart farming infrastructure to make it efficient and adoptable. The region-wise study of farmers' response towards the adoptability of smart farming technologies [226,227]. Study of various types of urban agriculture [228] and business growth opportunities in urban indoor Vertical Farming [229].

Concluding Remarks
This study presents a three-dimensional view of the technology-driven agricultural revolution (i.e., soilless farming, energy harvesting, and smart technologies). A six-layer architecture for smart indoor farms has also been discussed from a resource utilization point of view. Among the key components of technological infrastructure, IoT helps in the collection of several parameters that could be analyzed and shared to a remote repository for a detailed analysis. Big data analytics would help analyze plant life cycle-related data that could initiate mechanisms for the optimal performance of smart indoor farms. To achieve this, many machine learning algorithms have been proposed for various kinds of analysis (i.e., for artificial lighting, artificial climate control, organic farming, smart nutrition management, crop pattern optimization, and plant disease detection). A properly developed algorithm constitutes the most important part of smart indoor farms architecture in the form of a smart decision-making module. Among the key challenges of smart indoor farms, the cost is a major concern (i.e., that small and medium-scale farmers could not afford the cost associated with smart indoor farms). This increase in cost is attributed to the high cost of IoT and cloud infrastructure, energy requirements, water scarcity, and proper management besides the know-how and skill requirements, to name a few. Additionally, one has to secure through open platform-based standards, identification, and deployment of communication standards besides intelligent processing algorithms that consider all aspects of smart indoor farming activities. This article has reviewed the existing literature to validate all of the hypotheses introduced in the introduction section. Artificial intelligencebased soilless farming technique optimizes the use of resources such as soil, water, nutrition, etc. Local energy harvesting methodologies make the architecture independent of electric grid supply. Artificial climate control provides a plant growing environment independent of external climatic conditions. Data analytics are used to guide the farmers. Finally, the technology-enabled monitoring, control, and management mechanism results in higher production. An analysis of multiple research works and a look at contemporary smart indoor farms backed up the preceding findings.
Globally, such farms exist in a variety of forms, as discussed in the study, but there is not much literature specifically on the subject, as just a few research projects have been reported in the literature. However, in order to provide a concise and relevant summary for future researchers, we have endeavored to bring together all three main aspects of this analysis, namely soilless farming, energy harvesting, and smart technologies. Further research is required to make such farms more affordable with a profitable output. However, with properly planned research, there will be a time that it will be supported by startups initially and adopted by farmers later at a larger scale if the cost concerns are addressed amicably. In the near future, smart and fully automated indoor farms could be a potential food supplier in urban areas. There is a great scope of research in this area to design and develop a model which will be economically profitable for the small and marginal farmers. The researchers can propose a more efficient architecture with better data analysis algorithms and a better decision-making system. Finally, architecture-independent of the local factors will be more acceptable and will provide a sustainable solution.