International Journal of Interactive Mobile Technologies (iJIM) – eISSN: 1865-7923 – Vol 17 No 12 (2023) Paper—Poultry-Edge-AI-IoT System for Real-Time Monitoring and Predicting by Using Artificial Intelligence Poultry-Edge-AI-IoT System for Real-Time Monitoring and Predicting by Using Artificial Intelligence https://doi.org/10.3991/ijim.v17i12.38095 Hakim Jebari1(), Meriem Hayani Mechkouri1, Siham Rekiek2, Kamal Reklaoui1 1 Faculty of Science and Technique, University Abdelmalek Essaâdi, Tangier, Morocco 2 The International Higher Institute of Tourism, Tangier, Morocco hjebari1@yahoo.fr Abstract—Poultry farms have played a significant role throughout human history, in feeding the growing population. A good environment is a perfect con- dition for the growth of poultry, preventing disease, and effective production. The temperature higher and the humidity favor the growth of bacteria and hence the production of ammonia (NH3) by the decomposition of organic matter. Ammonia (NH3), car-bon monoxide (CO), and carbon dioxide (CO2), Methane (CH4), hy- drogen sulfide (H2S) are poisonous gases that can cause poultry diseases and mortality. The combination of Artificial Intelligence (AI), Internet of Things (IoT), and Edge Computing offer efficient and intelligent stand-alone systems of monitoring in real-time, predicting, and advanced automation. The paper aims to monitor in real-time and predict poultry barns' environmental conditions using a Deep Learning algorithm, known as the E-GRU (Encoder Gated Recurrent Unit). An intelligent system called Poultry-Edge-AI-IoT has been developed to gather, hash, store, pretreat, filter, knowledge extract, and transmit information from a heterogeneous wireless sensor network. The Poultry-Edge-AI-IoT system is based on IoT, AI, and Edge Computing for the detection of potential stress, the harmful gas concentration, and the prediction of poultry barns' environmental conditions. The system is modular and upgradeable. The experiment results demonstrated that the Poultry-Edge-AI-IoT system is able to collect correctly the poultry barn environment information, to monitor the potentially harmful gas lev- els (CH4, H2S, NH3, CO, CO2), and predict the harmful gas levels in the near future. Keywords—Internet of Things, artificial intelligence, deep learning, edge com- puting, cloud computing, poultry, smart poultry 1 Introduction The market demand for poultry products is constantly changing as a result of global population growth, improved consumption levels, and accelerated urbanization. Poultry products (meat and eggs) are a major source of animal protein for human beings [1]. Poultry meat, in particular chicken, is the most desired white meat and consumption iJIM ‒ Vol. 17, No. 12, 2023 149 https://doi.org/10.3991/ijim.v17i12.38095 Paper—Poultry-Edge-AI-IoT System for Real-time Monitoring and Predicting by Using Artificial Intelligence will continue to rise over the next decade [2]. Annual meat poultry production is ex- pected to rise to more than 37 billion by 2050, As the agricultural workforce declines quickly. Artificial intelligence belongs to the field of informatics that distinguish its environ- ment and prosper to maximize the success rate. This is the process by which a human being is able to manufacture a smart machine. Numerous new logics and methodologies have been developed and discovered in Artificial intelligence to simplify the problem- solving process. The Artificial intelligence techniques such as Machine learning, Deep learning, CNN, and ANN improve machine work and assist in the development of more advanced technology. Artificial intelligence has reached many fields including medical science, education, finance, agriculture, animal farming, industry, and safety. Today, there are numerous IA applications available, including data and experience analytics, voice and facial recognition, weather prediction, and medical diagnostics. The Internet of Things (IoT) is a system of interdependent computer devices, objects, numerical and mechanical machinery, animals, and individuals that are provided with unique identifiers and capable of transferring information across a network without the need for human-computing or human-to-human interaction [3]. The IoT's core goals are automation, communication, and cost-saving within the system. The Internet of Things (IoT) and related technologies have had a significant impact on animal farms as a major subfield in animal husbandry. Artificial intelligence (AI) and the Internet of Things (IoT) have gradually appeared in all areas of our day-to-day lives. These days, the two fields are combined into the so- called artificial intelligence of the thing (AIoT) [4]. It offers certain capabilities in im- age and video processing, object segmentation and tracking, more advanced automa- tion, etc. Edge computing [5] refers to the treatment activity that happens close to the physical emplacement of the information source to minimize latency and economize bandwidth. Cloud computing [6] refers to the provision of computer services on the Internet (Serv- ers, storage, databases, networking, software, analytics, and intelligence) in order to deliver more rapid innovation, agile resources, and scale economies. Computer re- sources and services are frequently centrally located in major data centers, whereas one or several clouds provide part of the network infrastructure necessary for connecting IoT devices to the Internet. Recent advancements in Edge Computing, Edge IoT, and Edge AI make it possible to offer efficient and intelligent stand-alone systems. The large amount of intelligent animal husbandry data gathered may be used for day-to-day decision-making and anal- ysis, these include productivity prediction, growth analysis, quality, and farm manage- ment. However, the combination of the two technologies offers numerous opportunities in terms of advanced machine learning and deep learning to offer real-time prediction, better analytics, and data visualization. Machine learning is the key to the evolution of big data and data science. Machine learning is a mathematical approach to building smart machines [7]. Intelligent farming typically refers to the use of digital technologies, IoT, cloud com- puting, robotics, sensors, tracking systems, and on-farm artificial intelligence [8,9]. Over the last decade, intelligent farming has been developed in a variety of areas such 150 http://www.i-jim.org Paper—Poultry-Edge-AI-IoT System for Real-Time Monitoring and Predicting by Using Artificial Intelligence as large-scale open-air farming (field crops), the control environment and poultry farm- ing. Intelligent farming is the application of engineering and technological innovations to deliver positive interventions in agricultural operations. It has more benefits than traditional farming with new technologies, facilities, and data collected through farm- ing processes. Product quality can be improved through appropriate surveillance, for instance, any pest intrusion or disease could be identified ahead of time. Livestock plays a major role in promoting economic development, guaranteeing sup- ply on the market, and raising the incomes of farmers. Manual observation and empir- ical judgment are often used in conventional poultry barns for detecting information about poultry and the poultry environment. Nevertheless, with the continual enhance- ment of the animal farming scale, these manual methods are not only time-consuming and laborious but also expensive. In addition, the integrity and speed of data detection cannot be assured, which significantly limits the effectiveness of detecting poultry data and developing precision poultry farming techniques. An intelligent poultry farm is characterized by automated information detection, smart decision-making, smart response, and interdisciplinarity. Intelligent poultry barn is progressively becoming a technological trend and a powerful tool for freeing up la- bor, ensuring the well-health of poultry, and improving the level of automation of data detection [10,11]. The poultry farming is shifting from traditional manual management to smart pro- duction methods at scale [12-15]. The surveillance and prediction within the poultry farming process are essential for reducing manpower, preservation of animal well- health, enhancement of automation, effectiveness of poultry farming, and increasing poultry production. The remainder of the paper includes the following main sections: The literature re- view is provided in Section II. Section III gives details of the materials and methods. Section IV introduces the analysis and discussion of the results. Section V furnishes the conclusion and future research. Section VII enumerates the references. 2 Literature review A good environment (temperature, humidity, Illumination, Wind speed, noxious gas concentration…etc) and adequate nutrition are perfect conditions for the growth of poultry, amongst these, the environment is extremely important for preventing disease and effective production [16]. With the rapid growth of major modern poultry farming companies, Structured poultry farms and high-density poultry farming increase the complexity of environmental settings temperature, humidity, Illumination, Wind speed, noxious gas concentration…etc), it is challenging to satisfy practical requirements by using the device to perform manual inspection and measurement. Intelligent surveillance of poultry barn environment (temperature, humidity, Illumi- nation, NH3, CO2, CO, H2S, CH4, O2, PM2.5) information is of significant importance for the automatic regulation of the environment, the well-health of poultry, and the pro- iJIM ‒ Vol. 17, No. 12, 2023 151 Paper—Poultry-Edge-AI-IoT System for Real-time Monitoring and Predicting by Using Artificial Intelligence motion of animal husbandry advantages [17,18]. The development of smart surveil- lance technology for poultry farming and environmental information was efficiently encouraged, due to the development of IoT and AI [19,20]. 2.1 Temperature and humidity Changes in temperature and humidity in poultry houses principally corresponded to lighting, air humidity, ventilation, heat radiation, and the water vapor generated by the poultry itself. The Temperature shall be maintained between 13°C and 27°C and the humidity should remain at 50% to 70%. The inadequate temperature will not only encourage bacterial growth but will also endanger the health of poultry. While they react to small variations in ambient temperature by modifying breathing and food intake, poultry can die of heat loss as temperatures pursue to increase [21,22]. Poultry house temperature and humidity surveillance technology, which relies heavily on temperature and humidity sensors, is increasingly mature. The ventila- tors in a poultry house are controlled through temperature and humidity monitoring to make a smart regulation, and a lot of this technology has been rolled out on commercial farms [23-27]. 2.2 Illumination The appropriate illumination can favor feed, grow and produce poultry, poultry is highly susceptible to lighting [28]. Currently, the lighting in the poultry house was mostly controlled by the sensor of the illumination intensity [22,23,27,29,30,31]. Nev- ertheless, the impact of illumination on poultry is not solely dependent on the light intensity, light radiation time, and color, But also its diversities, development phase, and other elements. More research is required into how to attain smart light adjustment in poultry houses. 2.3 Noxious gases and dust The stools of poultry and the decomposition of organic matter generate numerous noxious gases and dust, which not only contaminate the environment but also raises the risk of spreading diseases [32-33]. The harmful gases like ammonia (NH3) are gener- ated as a result of animal metabolism [34] and decaying animal waste. It is readily absorbed through the mucous membranes, harming the eyes and respiratory system of poultry. The Ammonia (NH3) concentration is dependent on many factors such as tem- perature, moisture, and pH. Other gases are also generated, including Methane (CH4), Hydrogen Sulfide (H2S), Carbon Monoxide (CO), and Carbon Dioxide (CO2). In poultry barn: 1. The ammonia (NH3) levels should be maintained at 10 to 25 ppm and shall not exceed 35 ppm with a type of exposure not more than 50 minutes, the level usually accepted is 15 ppm. 2. The level of hydrogen Sulfide (H2S) shall not exceed 10 ppm and 15 ppm for no more than 50 minutes. 152 http://www.i-jim.org Paper—Poultry-Edge-AI-IoT System for Real-Time Monitoring and Predicting by Using Artificial Intelligence 3. The level of carbon dioxide (CO2) should usually be kept at a concentration below 2500 ppm. The surveillance methods for Carbon Dioxide (CO2), Hydrogen Sulfide (H2S), Me- thane (CH4), Carbon Monoxide (CO), other gases, PM2.5, and other dust were investi- gated in [35]. Table 1 shows the state of the art in poultry barn research and implemen- tation, environmental information surveillance technology, it concentrates primarily on temperature and humidity, Illumination, Wind speed, and concentration of noxious gases or particles (NH3, CO2, CO, H2S, CH4, O2, PM2.5). The literature includes our accumulated experience in earlier works published in var- ious documents, and on the other hand, a review of the general literature related to research in intelligent poultry. The majority of them are still at the laboratory stage, and the yield of the product still requires further enhancement. Table 1. Literature Review R ef er en ce Poultry Barn Environmental Conditions T em pe ra tu re H um id ity Il lu m in at io n C ar bo n M on ox id e (C O ) C ar bo n D io xi de (C O 2) A m m on ia (N H 3) H yd ro ge n Su lf id e (H 2S ) P M 2. 5 O 2 M et ha ne (C H 4) Connectivity [22] √ √ √ √ √ √ √ GPRS [23] √ √ √ √ EWS [24] √ √ √ √ USB [25] √ √ √ √ √ 2G/3G [26] √ √ √ √ Lora [27] √ √ √ √ WIFI [29] √ √ √ √ 3G [30] √ √ √ √ √ Zigbee and 3G [31] √ √ √ √ Arduino data logger [34] √ √ √ GSM (Pt100-6S-SLK) [35] √ √ √ √ √ √ Bluetooth, XBee, and WIFI [36] √ √ √ WIFI [37] √ √ WIFI [38] √ √ √ WIFI [39] √ √ √ Wire [40] √ √ √ WIFI [41] √ √ √ GSM/WIFI [42] √ √ √ USB [43] √ √ √ GPRS [44] √ √ √ GPRS [45] √ √ GPRS [46] √ √ √ GPRS [47] √ - √ √ √ UART [48] √ √ WIFI iJIM ‒ Vol. 17, No. 12, 2023 153 Paper—Poultry-Edge-AI-IoT System for Real-time Monitoring and Predicting by Using Artificial Intelligence R ef er en ce Poultry Barn Environmental Conditions T em pe ra tu re H um id ity Il lu m in at io n C ar bo n M on ox id e (C O ) C ar bo n D io xi de (C O 2) A m m on ia (N H 3) H yd ro ge n Su lf id e (H 2S ) P M 2. 5 O 2 M et ha ne (C H 4) Connectivity [49] √ √ WIFI [50] √ √ [51] √ √ 2.4 GHz Wireless Transceiver [52] √ √ √ Zigbee [53] √ Email [54] √ √ √ √ √ √ √ Data logger and modem 3 The Material and method The online system called Poultry-Edge-AI-IoT has been established to: 1. The Correct collection of poultry information in a complex environment. 2. The Multi-scale surveillance of poultry barns environment. 3. The Prediction of poultry barns' environmental conditions by using artificial intelli- gence. The Poultry-Edge-AI-IoT system functions as described respectively in Figure 1 and Figure 2. Fig. 1. The Poultry-Edge-AI-IoT System (a) 154 http://www.i-jim.org Paper—Poultry-Edge-AI-IoT System for Real-Time Monitoring and Predicting by Using Artificial Intelligence Fig. 2. The Poultry-Edge-AI-IoT System (b) 3.1 IoT level This Level is comprised of all IoT devices intended for the surveillance of the poultry environment (ambient barn conditions for detecting potential stress and harmful gas concentration) and the outside environment. As a result, this Level allows the Poultry- Edge-AI-IoT System to gather information from a heterogeneous array of wireless sen- sor networks. There are two heterogeneous wireless sensor networks based on IoT in this case, each is different and is responsible for the supervision of various aspects. Nevertheless, the design of the Poultry-Edge-AI-IoT System is upgradeable and modular, for this reason, new IoT networks may be added going forward. Sensor nodes inside poultry barn (IoT Node IN). The Poultry-Edge-AI-IoT Sys- tem features environmental sensors to measure the poultry barn environment and how that impacts the poultry health: a) Sensors for estimating temperature and humidity: The AM2315 is the temperature and humidity sensor I2C utilized, it is capable of acquiring temperatures between -40 and 85°C with an accuracy of 0.5°C. b) Gas sensors for measuring levels of potentially hazardous gases (CH4, H2S, NH3, CO, CO2) in the air within poultry barns: 1. The level of Methane (CH4) is evaluated by the digital detector MQ4 in the range of 200 ppm to 10000 ppm. iJIM ‒ Vol. 17, No. 12, 2023 155 Paper—Poultry-Edge-AI-IoT System for Real-time Monitoring and Predicting by Using Artificial Intelligence 2. The amount of Hydrogen Sulfide (H2S) in the air is evaluated by the digital detector MQ136 in the range of 1 ppm to 100 ppm. 3. The level of Ammonia (NH3) is evaluated by the digital detector MQ137 in the range of 1 ppm to 200 ppm. 4. The concentration of Carbon Monoxide (CO) and Carbon Dioxide (CO2) in the air is measured by the digital detector MQ135 in the range of 10 ppm to 1000 ppm. The poultry barn environmental condition surveillance node (IoT Node IN) schema is illustrated in Figure 3. Fig. 3. The IoT Node IN Sensor node outside poultry barn (IoT Node OUT). The Poultry-Edge-AI-IoT System is considering a sensor node outside poultry barns for measuring and gathering various physical amounts of temperature and humidity, for making optimum decisions. This node is based on an ESP32-Wroom-32 and equipped with the sensor AM2315 for measuring temperature and humidity and the DS3231 a real-time clock for time- stamped data. The ESP32-Wroom-32 is a potent and generic WIFI, Bluetooth, and Bluetooth LE MCU module for a broad range of applications. At the heart of this unit lies the ESP32-D0WDQ6 chip. The built-in chip is engineered for scalability and adapt- ability. There are two processor cores that may be controlled on an individual basis, and the CPU clock rate can be adjusted from 80 MHz to 240 MHz. The chip also has a coprocessor with low power. The SHT20 is the temperature and humidity sensor I2C utilized, it is capable of ac- quiring temperatures between -40 and 125°C with an accuracy of 0.3°C. The DS3231 is an inexpensive and highly accurate real-time I2C (RTC) clock with a built-in ther- mal-compensated crystal oscillator (TCXO). The sensor node hangs outside the ceiling of the building and sends the data via WIFI on a regular basis. The poultry barn outside condition surveillance node (IoT Node OUT) schema is illustrated in Figure 4. 156 http://www.i-jim.org Paper—Poultry-Edge-AI-IoT System for Real-Time Monitoring and Predicting by Using Artificial Intelligence Fig. 4. The IoT Node OUT Sensor nodes disposition inside poultry barn. Several sensor nodes must be used to monitor environmental information inside major poultry farms. The sensor nodes' disposition affects the environment surveillance and prediction performance because of differences in sensor detection range. Thereafter, it is needed to investigate the inter- connection between sensor nodes' layout and surveillance and prediction performance and to devise standard sensor nodes' layout rules to assist sensor nodes' placement. As well, big poultry farms and metal cages in poultry houses may interfere with the transmission of sensor and network signals, which does not promote information sur- veillance, another major issue for poultry farming is the transmission of long-range, robust signals in a complex environment. Sensor nodes communication. The communication standards may be utilized for making the Edge AI-IoT gateway, and for connecting the wireless devices of the IoT Level with the Edge AI-IoT Level, including WIFI and ZigBee. In the current applica- tion, ZigBee is utilized as a communication standard for the collection of information from the sensor nodes installed inside the poultry barns. The Zigbee communication advantages are robustness, scalability, and high security. On the other hand, WIFI is employed as a communication for the collection of information from the sensor node installed outside the poultry barns. Once checked, the information is dispatched to the blockchain where it will be uti- lized for the execution of intelligent contracts, The RSA algorithm encrypts the infor- mation that will be transmitted to the Edge AI-IoT nodes. By using SHA256 algorithm, The Edge AI-IoT node that gets the information creates a hash, that can be compared at any moment with the one stocked in the blockchain to make sure that no one has modified the data. The Crypto-IoT chipboard is used as a generic bridge, designed to improve systems and applications in accordance with the IoT blockchain standard, by maintaining the safety, integrity, and reliability of information read and gathered at the IoT layer level prior to transfer to higher Levels. A series of sensor nodes in the poultry barns (inside and outside) were installed to collect the environmental conditions data. The functional design schema of the nodes inside the poultry barn (IoT Node IN) is outlined in Figure 5. iJIM ‒ Vol. 17, No. 12, 2023 157 Paper—Poultry-Edge-AI-IoT System for Real-time Monitoring and Predicting by Using Artificial Intelligence Fig. 5. The functional design schema of IoT Node IN As well as the power module, the Single-on-Chip microcontroller and the AT- mega1281 (ZigBee transceiver) with a 9dBi antenna, 4 analog sensors have been inte- grated for detecting dangerous gases. These sensors are digitalized through the ADS1115 (ADC module) prior to switching to the I2C port on the microcontroller. There are four entry channels in this module. Furthermore, the temperature and mois- ture are measured using the AM2315 sensor. That supplies these physical amounts in the form of digital packages I2C. 158 http://www.i-jim.org Paper—Poultry-Edge-AI-IoT System for Real-Time Monitoring and Predicting by Using Artificial Intelligence 3.2 Edge AI-IoT level The Edge AI-IoT Level collects all data obtained by IoT equipment in the bottom Level. It is responsible for pre-processing these information’s before they attain the top Level that is deployed in the Cloud. In that Level, Crypto-IoT chipboard into IoT devices or Edge AI-IoT gateway, hash the data and stores it as part of the blockchain and keep the information inviolable in order to guarantee traceability. Firstly, all the data gathered by the sensors become an integral part of the distributed ledger. In addition, the information is pretreated and fil- tered using data analysis methods and produces knowledge within the same Edge AI- IoT and reduces transmission costs and data processing to the cloud. The Edge AI-IoT gateway is comprised of following components: 1. The power supply. 2. The Single-on-Chip microcontroller. 3. The AT- mega1281 (ZigBee transceiver). 4. The Crypto-IoT chipboard with blockchain functionality. 5. The Ethernet extension module to channel hashed information between sensors’ nodes and the Edge AI-IoT node that filters, pretreats and transmits information to the Solu- tion Business Level in the remote cloud through an appropriate Internet connection, the connectivity available in rural areas (Cellular Networks, Internet, Digital Sub- scriber Lines). The Edge AI-IoT node gathers all the information from its associated IoT nodes, and filters, pretreats, and stamps this IoT information prior to transmitting it to the remote cloud-based AI-Business Solution Level. These filtering and pretreatment steps involve machine learning techniques at the Edge AI-IoT that are realized by a microcomputer that enables knowledge to be extracted from the Edge AI-IoT and minimized data pro- cessing from the Edge AI-IoT to the Cloud, therefore minimizing transfer and power costs due to cloud charges. The Edge AI-IoT node is made up of an NVIDIA Jetson AGX Xavier (an embedded system-on-module), which has been designed to provide calculation, storage, commu- nication, and artificial intelligence features. The NVIDIA Jetson AGX Xavier functions like an Edge AI-IoT node, which filters and pretreats IoT data deploying deep learning and functioning with ECMAScript on a server based on Express.js and Node.js. This server gathers IoT sensor information from Edge AI-IoT gateway. It filters and removes possible noise, rejects repetitive frames to avoid useless trans- fer to the cloud, and serves as a data summary using a web interface accessible from the same local area network on the Edge AI-IoT without Internet connectivity to the Cloud. It transmits only precious, value-added data, and knowledge extracted to the AI- Business solution Level within the distant cloud. 3.3 AI-business solution level It is rolled out on the Poultry-Edge-AI-IoT System as an integrated series of compo- nents. NoSQL, SQL databases, and background web services are implemented via the iJIM ‒ Vol. 17, No. 12, 2023 159 Paper—Poultry-Edge-AI-IoT System for Real-time Monitoring and Predicting by Using Artificial Intelligence Serverless Function as a service (PaaS, application engine on Google Cloud), in addi- tion, the Artificial Intelligence techniques in the cloud computing Poultry-Edge-AI-IoT System. The Poultry-Edge-AI-IoT System back-end is created using .NET Core and its front-end is established by means the Progressive JavaScript Framework (Vue.js). The Poultry-Edge-AI-IoT System databases used in this case are: 1. Google BigQuery to store high-volume information collected from IoT and Edge AI- IoT Levels sensors. 2. Google Cloud SQL for relational purposes. Within this Level, a virtual collective of agents operates to provide decision-making characteristics for a system. The decisions are taken based on data collected by the various heterogeneous wireless sensor networks at the IoT Level. The Poultry-Edge-AI-IoT System contains extra functionality like data visualization technologies and a warning management system that sends out warning alerts and cor- rective measures when values given from heterogeneous IoT networks report a danger- ous situation. The Poultry-Edge-AI-IoT System is established into a set of levels that add and remove components dynamically, enabling systems realized to be adapted over time. The Cloud furnishes flexibility to the AI-Business Solution Level through pre- filtering information in the Edge AI-IoT Level and extracting knowledge from these Levels. Furthermore, through the distributed ledger technologies that underpin the whole architecture, The data read and gathered by the sensors and appliances of the IoT Level cannot be alterable, because they are registered for tracing by the Edge AI-IoT and AI- Business Solution Levels. 3.4 The artificial intelligence technique (E-GRU) Gated Recurrent Unit (GRU) is part of the fundamental architectures of Deep Learn- ing, that specialize in using sequenced data, hence their used in the treatment of natural language and in the regression of time series. GRU was introduced by [55] in 2014 which is an advanced RNN (Recurrent Neural Networks) type and a simplified LSTM (Long Short-Term Memory) variant due to its similar architecture. Gated Recurrent Unit (GRU) performs better than Long Short-Term Memory (LSTM) on time series. GRU has an update control point 𝑧𝑧𝑧𝑧 and a reset control point 𝑟𝑟𝑧𝑧 that manage the data flow within the unit, with no individual memory cells. It has a potent ability to grasp long-term dependencies between components in a sequence. It computes two control points, which handle the data flow across every hidden unit. Every concealed state 𝑈𝑈ℎ at time t, given input 𝑥𝑥𝑧𝑧 computed by means of the following equations: 𝑧𝑧𝑡𝑡 = 𝜎𝜎𝑔𝑔 (𝑊𝑊𝑥𝑥𝑧𝑧𝑥𝑥𝑡𝑡) + (𝑈𝑈ℎ 𝑧𝑧ℎ𝑡𝑡−1) (1) 𝑟𝑟𝑡𝑡 = 𝜎𝜎𝑔𝑔 (𝑊𝑊𝑥𝑥𝑟𝑟𝑥𝑥𝑡𝑡) + (𝑈𝑈ℎ 𝑟𝑟ℎ𝑡𝑡−1) (2) ℎ�𝑡𝑡 = 𝑧𝑧𝑡𝑡𝑡𝑡ℎ (𝑊𝑊𝑥𝑥ℎ �𝑥𝑥𝑡𝑡) + 𝑈𝑈ℎ ℎ�(𝑟𝑟𝑡𝑡 ∗ ℎ𝑡𝑡−1) (3) ℎ𝑡𝑡 = (1 − 𝑧𝑧𝑡𝑡) ∗ ℎ𝑡𝑡−1 + 𝑧𝑧𝑡𝑡 ∗ ℎ�𝑡𝑡 (4) 160 http://www.i-jim.org Paper—Poultry-Edge-AI-IoT System for Real-Time Monitoring and Predicting by Using Artificial Intelligence 𝑧𝑧𝑡𝑡 is the update control point. 𝑟𝑟𝑡𝑡 is the reset control point. 𝑊𝑊 is the weights matrix and vectors. 𝑈𝑈 is the vectors. 𝜎𝜎𝑔𝑔 is the function of sigmoid activation. 𝑧𝑧𝑡𝑡𝑡𝑡ℎ is the hyperbolic tangent. The GRU training methodology consists of real-time recurrent learning (RTRL) and backpropagation through time (BPTT). In this article, the authors concentrated on the GRU variant, known as the E-GRU encoder, which implements an encoder for the automatic preprocessing of large quan- tities of data. The encoder generally gives the best representation of the input in relation to the original raw input. It systematically compresses input data and selects the char- acteristics important for training. 4 Results and discussion In order to evaluate the performance of the Poultry-Edge-AI-IoT System, it has been deployed and tested in a real scenario on a Morocco poultry farm. This poultry farm utilizes five sensor nodes inside the poultry barn (IoT Node IN) and one sensor node outside the poultry barn (IoT Node OUT) that send data per minute to the Edge AI-IoT node. The database includes data on the environmental conditions of poultry barn col- lected every minute for one week. The experiments were conducted using the artificial intelligence technique called Encoder Gated Recurrent Unit (layer of M-neurons and N-dimensional) to predict the potentially hazardous gas levels (CH4, H2S, NH3, CO, CO2) in the poultry barn. The potentially hazardous gas levels (CH4, H2S, NH3, CO, CO2) in the poultry barn and the corresponding estimate levels that were obtained by the artificial intelligence technique (Encoder Gated Recurrent Unit) are illustrated in Figure 6. iJIM ‒ Vol. 17, No. 12, 2023 161 Paper—Poultry-Edge-AI-IoT System for Real-time Monitoring and Predicting by Using Artificial Intelligence Fig. 6. The experimental findings The results of the experiment showed that the Poultry-Edge-AI-IoT system is able to: 1. Collect correctly the poultry barn environment information, i.e., the concentration of noxious gases (CH4, H2S, NH3, CO, CO2). 2. Monitor the potentially harmful gas levels in the poultry barn: Generally, the thresh- old levels for identifying harmful gases in the poultry barn depend on several factors, such as the specific regulations and guidelines of the country or region where the poultry farm is located. The threshold levels adopted in the experiment are as fol- lows: • Methane (CH4): 1000 ppm. • Hydrogen Sulfide (H2S): 10 ppm. • Ammonia (NH3): 20 ppm. • Carbon Monoxide (CO): 35 ppm. • Carbon Dioxide (CO2): 1000 ppm. 3. Predict the potentially harmful gas levels (CH4, H2S, NH3, CO, CO2) in the near future: The steps for predicting the harmful gas levels in the poultry barn (CH4, H2S, NH3, CO, CO2) by using Deep Learning (E-GRU encoder model) are as follows: a) Collecting the gas concentration data: The IoT Node IN collects data on the concentration of CH4, H2S, NH3, CO, and CO2 gases in the poultry barn over time (every minute). The data is collected over a significant period (one week) to capture variations in gas levels under different con- ditions. The data is organized by gas type, date, and time to facilitate analysis. b) Preprocessing the data: 162 http://www.i-jim.org Paper—Poultry-Edge-AI-IoT System for Real-Time Monitoring and Predicting by Using Artificial Intelligence Preprocessing the data on the concentration of CH4, H2S, NH3, CO, and CO2 gases in the poultry barn by cleaning, normalizing, and transforming it as necessary. This environment information of the poultry barn must be checked for any errors or in- consistencies that can affect the accuracy of the model. The specific steps for pre- processing the data, in this case, include: (i) Cleaning the data: Checking for any values that are significantly higher or lower than the others and removing them if necessary. (ii) Filling in missing values: Using the interpolation method to fill in the miss- ing values. (iii) Scaling the data: By using the technique of min-max scaling so that each gas concentration is on a similar scale. (iv) Checking for errors or inconsistencies: Ensuring that the data is accurate and consistent across all measurements. Resolving the discrepancies or issues before training the model. c) Splitting the data: Splitting the data into training, validation, and testing sets: (i) The training set is utilized for training the E-GRU encoder model. (ii) The validation set is utilized for tuning the hyperparameters of the model. (iii) The testing set is utilized for evaluating the performance of the model. The split ratio used in the experiments is 70% for training, 15% for validation, and 15% for testing. d) Defining the model architecture: Defining the architecture of the E-GRU model. The model has one input layer for each gas type, followed by an E-GRU encoder layer and a dense output layer. The number of neurons in the dense output layer is equal to the number of gas types being predicted. e) Training the model: Training the E-GRU encoder model using the training set. During training, the model will learn to predict the gas concentrations (CH4, H2S, NH3, CO, CO2) based on the input data. f) Evaluating the model: Evaluating the performance of the model using the testing set. Calculation of the mean squared error (MSE) and root mean squared error (RMSE) to assess the accu- racy of the model. g) Using the model for prediction: Once the model is trained and evaluated, it will be used to predict the harmful gas levels (CH4, H2S, NH3, CO, CO2) in the poultry barn in real-time. The input data can be fed into the model to generate predictions for the concentration of each gas type. The predicting algorithm of the harmful gas levels in the poultry barn (CH4, H2S, NH3, CO, CO2) is illustrated as follows: 1. Import necessary libraries: • NumPy: for numerical computations • Pandas: for data manipulation iJIM ‒ Vol. 17, No. 12, 2023 163 Paper—Poultry-Edge-AI-IoT System for Real-time Monitoring and Predicting by Using Artificial Intelligence • TensorFlow: for building and training deep learning models • Input, GRU, Dense, TimeDistributed, Lambda layers, and Model from the Keras API of TensorFlow: for building the E-GRU model architecture • Adam optimizer: for optimizing the model during training 2. Load the historical data from a CSV file into a Pandas dataframe using the read_csv method. 3. Define input and output dimensions: • Input dimension is calculated by subtracting the number of gas concentration columns from the total number of columns in the dataset. • Output dimension is fixed at 5 for CH4, H2S, NH3, CO, CO2. 4. Split the data into training and validation sets using the iloc method: • The first 70% of the data is used for training. • The remaining 30% of the data is used for validation. 5. Define the E-GRU model architecture using the functional API of Keras: • The input shape is specified as (None, input_dim), which means that the model can accept variable-length sequences of input data. • The GRU layer has 256 units and returns sequences. • The Dense layer with sigmoid activation function is used to create the gate. • The Lambda layer performs an element-wise multiplication between the output of the GRU layer and the gate. • The TimeDistributed layer applies a Dense layer to each time step of the se- quence. • The model is defined using the Model class from Keras API and the inputs and outputs of the model are specified. 6. Compile the model using the Adam optimizer and the mean squared error loss. 7. Train the model using the fit method of the model: • The input and output data is reshaped to have a shape of (batch_size, se- quence_length, input_dim) and (batch_size, sequence_length, output_dim) res- pectively. • The model is trained for 100 epochs with a batch size of 32. • Validation data is specified using the validation_data parameter. 8. Make predictions using the predict method of the model: • The input data is reshaped in the same way as for training. • Predictions are made on the validation data. 9. Evaluate the model using the evaluation metrics: • Mean squared error (MSE) is calculated as the mean of the squared differences between the actual and predicted values. • Root mean squared error (RMSE) is calculated as the square root of the MSE. 10. Print the evaluation metrics. By comparing the predicted level of harmful gas and the measured level, it is possi- ble to infer if a sensor is defective or if anomaly data is generated. The main limitation of the paper is that the authors only took into consideration the potentially hazardous gases (CH4, H2S, NH3, CO, CO2) in poultry barns. 164 http://www.i-jim.org Paper—Poultry-Edge-AI-IoT System for Real-Time Monitoring and Predicting by Using Artificial Intelligence 5 Conclusion The paper focuses on the poultry farming sector, and its requirements to adapt to the current market which is in constant flux due to the growing population, the consumption levels enhancement, and accelerated urbanization, by becoming more resource effec- tive, environmentally friendly, and healthy. For this purpose, the stockbreeders need to implement new technologies like the Internet of Things combined with Artificial Intel- ligence and Edge Computing which have a high impact on poultry farms and provide advanced surveillance and predictive solutions. A smart system called Poultry-Edge-AI-IoT has been developed to monitor in real- time and predict poultry barns' environmental conditions using an artificial intelligence algorithm. The experiment results demonstrated that the Poultry-Edge-AI-IoT system is able to collect correctly the poultry barn environment information, to monitor the potentially harmful gas levels (CH4, H2S, NH3, CO, CO2), and predict the harmful gas levels in the near future. The Poultry-Edge-AI-IoT system also makes it possible to determine if a sensor is faulty or if abnormal data is generated. In future works, the authors will plan to expand the Poultry-Edge-AI-IoT System to numerous poultry farms located in the same or different provinces, thus exploiting Edge Computing's advantages. Moreover, the authors will complete the improvement of the Poultry-Edge-AI-IoT System and will conduct experiments on multiple poultry farms by applying various artificial intelligence techniques for real-time monitoring and pre- dicting. 6 Acknowledgements This project is supported by the Ministry of Higher Education, Scientific Research and Innovation, the Digital Development Agency (DDA), and the National Center for Scientific and Technical Research (CNRST) of Morocco. APIAA-2019- KAMAL.REKLAOUI-FSTT-Tanger-UAE. 7 References [1] M.T. Scholten, I.J.M. De Boer, B. Gremmen, and C. Lokhorst, “Livestock farming with care: towards sustainable production of animal source food,” NJAS: Wageningen J. Life Sci., Vol. 66, No. 1, pp. 3–5, 2013. https://doi.org/10.1016/j.njas.2013.05.009 [2] M. Henchion, M. McCarthy, V.C. Resconi, and D. Troy, “Meat consumption: Trends and quality matters,” Meat Sci., Vol. 98, No. 3, pp. 561–568, 2014. https://doi.org/10.1016/ j.meatsci.2014.06.007 [3] S. Nuanmeesri, and L. Poomhiran, “Developing of Intelligence Walking Stick and Mobile Application for Elderly Health Care using the Internet of Things,” International Journal of Interactive Mobile Technologies (iJIM), Vol. 14, No. 14, pp. 4–15, 2020. https://doi.org/ 10.3991/ijim.v14i14.14813 iJIM ‒ Vol. 17, No. 12, 2023 165 https://doi.org/10.1016/j.njas.2013.05.009 https://doi.org/10.1016/j.meatsci.2014.06.007 https://doi.org/10.1016/j.meatsci.2014.06.007 https://doi.org/10.3991/ijim.v14i14.14813 https://doi.org/10.3991/ijim.v14i14.14813 Paper—Poultry-Edge-AI-IoT System for Real-time Monitoring and Predicting by Using Artificial Intelligence [4] G. Katare, G. Padihar, and Z. Qureshi, “Challenges in the integration of artificial intelligence and internet of things,” International Journal of System and Software Engineering, Vol. 6, No. 2, pp. 10–15, 2018. [5] U.N. D, U. S, L. Tamilselvan, and S.N. J, “Client Aware Scalable Cloudlet to Augment Edge Computing with Mobile Cloud Migration Service,” International Journal of Interactive Mo- bile Technologies (iJIM), Vol. 14, No. 12, pp. 165–178, 2020. https://doi.org/10.3991/ijim. v14i12.14407 [6] E. Panfilova, A. Lukyanova, N. Pronkin, and Е. Zatsarinnaya, “Assessment of the Impact of Cloud Technologies on Social Life in the Era of Digitalization,” International Journal of Interactive Mobile Technologies (iJIM), Vol. 15, No. 21, pp. 144–157, 2021. https://doi.org/ 10.3991/ijim.v15i21.22985 [7] D. Cedeno-Moreno, and M. Vargas-Lombardo, “Mobile Applications for Diabetes Self- Care and Approach to Machine Learning,” International Journal of Online and Biomedical Engineering (iJOE), Vol. 16, No. 8, pp. 25–38, 2020. https://doi.org/10.3991/ijoe.v16i08. 13591 [8] Á. Regan, “Smart farming in Ireland: a risk perception study with key governance actors,” NJAS: Wageningen Journal of Life Sciences, Vol. 90-91, No. 1, 2019. https://doi.org/ 10.1016/j.njas.2019.02.003 [9] S. Wolfert, L. Ge, C. Verdouw, and M.J. Bogaardt, “Big data in smart farming - a review,” Agricultural systems, Vol. 153, pp. 69–80, 2017. https://doi.org/10.1016/j.agsy.2017.01.023 [10] G.H. Teng, “Information sensing and environment control of precision facility livestock and poultry farming,” Smart Agriculture, Vol. 1, No. 3, pp. 1–12, 2019. https://doi.org/10.12133/ j.smartag.2019.1.3.201905-SA006 [11] C. Okinda, M. Lu, L. Liu, I. Nyalala, C. Muneri, J. Wang, H.L. Zhang, and M. Shen, “A machine vision system for early detection and prediction of sick birds: a broiler chicken model,” Biosyst. Eng., Vol. 188, pp. 229–242, 2019. https://doi.org/10.1016/j.biosystem- seng.2019.09.015 [12] D. Smith, S. Lyle, A. Berry, N. Manning, M. Zaki, and A. Neely, “Internet of animal health things opportunities and challenges data and analytics,” Internet of Animal Health Things, 2015. [13] B.H. Xiong, L. Yang, and S.S. Zheng, “Research progress on the application of information and intelligent equipment in animal husbandry in China,” China Agric. Inform., Vol. 30, No. 1, pp. 17–34, 2018. https://doi.org/10.12105/j.issn.1672-0423.20180103 [14] S. Mueller, M. Kreuzer, M. Siegrist, K. Mannale, R.E. Messikommer, and I.D. Gangnat, “Carcass and meat quality of dual-purpose chickens (Lohmann Dual, Belgian Malines, Schweizerhuhn) in comparison to broiler and Level chicken types,” Poultry Science, Vol. 97, No. 9, pp. 3325–3336, 2018. https://doi.org/10.3382/ps/pey172 [15] M. Yitbarek, “Livestock and livestock product trends by 2050: a review,” International Journal of Animal Research, Vol. 4, No. 30, 2019. [16] L.Y. Wang, R.Z. Sun, and Z.L. Cao, “Study of monitor and early warning system of live- stock health culture,” J. Agric. Mech. Res., Vol. 34, No. 10, pp. 199–203, 2012. https://doi. org/10.3969/j.issn.1003-188X.2012.10.050 [17] A. Winkel, J. Mosquera, A.J. Aarnink, P.W.G. Koerkamp, and N.W. Ogink, “Evaluation of a dry filter and an electrostatic precipitator for exhaust air cleaning at commercial non-cage laying hen houses,” Biosyst. Eng., Vol. 129, pp. 212–225, 2015. https://doi. org/10.1016/j.bi- osystemseng.2014.10.006 [18] Y. Zhang, Q. Chen, G. Liu, W. Shen, and G. Wang, “Environment parameters control based on wireless sensor network in livestock buildings,” International Journal of Distributed Sen- sor Networks, No. 5, pp. 1–7, 2016. https://doi.org/10.1155/2016/9079748 166 http://www.i-jim.org https://doi.org/10.3991/ijim.v14i12.14407 https://doi.org/10.3991/ijim.v14i12.14407 https://doi.org/10.3991/ijim.v15i21.22985 https://doi.org/10.3991/ijim.v15i21.22985 https://doi.org/10.3991/ijoe.v16i08.13591 https://doi.org/10.3991/ijoe.v16i08.13591 https://doi.org/10.1016/j.njas.2019.02.003 https://doi.org/10.1016/j.njas.2019.02.003 https://doi.org/10.1016/j.agsy.2017.01.023 https://doi.org/10.12133/j.smartag.2019.1.3.201905-SA006 https://doi.org/10.12133/j.smartag.2019.1.3.201905-SA006 https://doi.org/10.1016/j.biosystemseng.2019.09.015 https://doi.org/10.1016/j.biosystemseng.2019.09.015 https://doi.org/10.12105/j.issn.1672-0423.20180103 https://doi.org/10.3382/ps/pey172 https://doi.org/10.3969/j.issn.1003-188X.2012.10.050 https://doi.org/10.3969/j.issn.1003-188X.2012.10.050 https://doi.org/10.1016/j.biosystemseng.2014.10.006 https://doi.org/10.1016/j.biosystemseng.2014.10.006 https://doi.org/10.1016/j.biosystemseng.2014.10.006 https://doi.org/10.1155/2016/9079748 Paper—Poultry-Edge-AI-IoT System for Real-Time Monitoring and Predicting by Using Artificial Intelligence [19] J.C. Guillermo, A. García-Ceden˜o, D. Rivas-Lalaleo, M. Huerta, and R. Clotet, “Iot archi- tecture based on wireless sensor network applied to agricultural monitoring: A case of study of cacao crops in Ecuador,” International Conference of ICT for Adapting Agriculture to Climate Change, pp. 42–57, November, 2018. https://doi.org/10.1007/978-3-030-04447- 3_3 [20] J. Kalezhi, J. Mbale, and L. Ndovi, “Microcontroller-based monitoring and controlling of environmental conditions in farming,” 2018 IEEE PES/IAS PowerAfrica, pp. 284–288, June, 2018. https://doi.org/10.1109/PowerAfrica.2018.8521055 [21] J.R. Brobeck, “Food intake as a mechanism of temperature regulation,” The Yale journal of biology and medicine, Vol. 20, No. 6, pp. 545, 1948. [22] Q. Yu, Y. Zhang, X.L. Wang, and B.Q. Li, “Intelligent Poultry Environment Control System Based on Internet of Things,” ICCCS 2018: Cloud Computing and Security, pp. 407–417, 2018. https://doi.org/10.1007/978-3-030-00018-9_36 [23] H. Bai, G. Teng, L. Ma, Z. Li, Z. Yuan, M. Li, and X. Yang, “Remote sensing and monitor system for a large poultry farm based on Internet,” Remote Sensing and Modeling of Eco- systems for Sustainability II, Vol. 5884, p. 416-423. International Society for Optics and Photonics, September, 2005. https://doi.org/10.1117/12.615900 [24] G. Corkery, S. Ward, C. Kenny, and P. Hemmingway, “Monitoring environmental parame- ters in poultry production facilities,” Computer Aided Process Engineering - CAPE Forum 2013. Institute for Process and Particle Engineering, Graz University of Technology, Aus- tria, 2013. http://hdl.handle.net/10197/4257 [25] M.H. Lashari, A.A. Memon, S.A.A. Shah, K. Nenwani, and F. Shafqat, “IoT based poultry environment monitoring system,” 2018 IEEE International Conference on Internet of Things and Intelligence System (IOTAIS), pp. 1–5, November, 2018. https://doi.org/10.1109/ IOTAIS.2018.8600837 [26] G. Chiluisa-Velasco, J. Lagla-Quinaluisa, D. Rivas-Lalaleo, and M. Alvarez-Veintimilla, “Intelligent monitoring systemof environmental biovariables in poultry farms,” In Proceed- ings of SAI Intelligent Systems Conference, IntelliSys 2020: Intelligent Systems and Appli- cations, pp. 386-399, September, 2020. https://doi.org/10.1007/978-3-030-55190-2_29 [27] W.F. Pereira, L. da Silva Fonseca, F.F. Putti, B.C. Go´es, and L. de Paula Naves, “Environ- mental monitoring in a poultry farm using an instrument developed with the internet of things concept,” Computers and Electronics in Agriculture, Vol. 170, 2020. https://doi.org/ 10.1016/j.compag.2020.105257 [28] S.J. Patel, A.S. Patel, M.D. Patel, and J.H. Patel, “Significance of light in poultry production: a review,” Advances in Life Sciences, Vol. 5, No. 4, pp. 1154-1160, 2016. [29] L. Yu, G. Teng, B. Li, Y. Zhang, F. Lao, and Y. Xing, “A remote monitoring system for poultry production management using a 3G based network,” Applied Engineering in Agri- culture, Vol. 29, No. 4, pp. 595–601, 2013. https://doi.org/10.13031/aea.29.9710 [30] D.S. Xu, and F. Zhang, “Towards a poultry house environment monitoring system based on Internet of Things,” Sensors & Transducers, Vol. 160, No. 12, pp. 304–309, 2013. https://www.proquest.com/scholarly-journals/towards-poultry-house-environment- monitoring/docview/1511026329/se-2 [31] S. Choosumrong, V. Raghavan, and T. Pothong, “Smart poultry farm based on the real- time environment monitoring system using internet of things,” Naresuan Agriculture Journal, Vol. 16, No. 2, pp. 18–26, 2019. https://li01.tci-thaijo.org/index.php/aginujournal/article/ view/247975 247975 iJIM ‒ Vol. 17, No. 12, 2023 167 https://doi.org/10.1007/978-3-030-04447-3_3 https://doi.org/10.1007/978-3-030-04447-3_3 https://doi.org/10.1109/PowerAfrica.2018.8521055 https://doi.org/10.1109/PowerAfrica.2018.8521055 https://doi.org/10.1007/978-3-030-00018-9_36 https://doi.org/10.1007/978-3-030-00018-9_36 https://doi.org/10.1117/12.615900 http://hdl.handle.net/10197/4257 https://doi.org/10.1109/IOTAIS.2018.8600837 https://doi.org/10.1109/IOTAIS.2018.8600837 https://doi.org/10.1109/IOTAIS.2018.8600837 https://doi.org/10.1007/978-3-030-55190-2_29 https://doi.org/10.1016/j.compag.2020.105257 https://doi.org/10.1016/j.compag.2020.105257 https://doi.org/10.13031/aea.29.9710 https://www.proquest.com/scholarly-journals/towards-poultry-house-environment-monitoring/docview/1511026329/se-2 https://www.proquest.com/scholarly-journals/towards-poultry-house-environment-monitoring/docview/1511026329/se-2 https://www.proquest.com/scholarly-journals/towards-poultry-house-environment-monitoring/docview/1511026329/se-2 https://www.proquest.com/scholarly-journals/towards-poultry-house-environment-monitoring/docview/1511026329/se-2 https://li01.tci-thaijo.org/index.php/aginujournal/article/view/247975 https://li01.tci-thaijo.org/index.php/aginujournal/article/view/247975 https://li01.tci-thaijo.org/index.php/aginujournal/article/view/247975 Paper—Poultry-Edge-AI-IoT System for Real-time Monitoring and Predicting by Using Artificial Intelligence [32] D.H. O’neill, and V.R. Phillips, “A review of the control of odour nuisance from livestock buildings: Part 3, properties of the odorous substances which have been identified in live- stock wastes or in the air around them,” Journal of Agricultural Engineering Research, Vol. 53, pp. 23–50, 1992. https://doi.org/10.1016/0021-8634(92)80072-Z [33] D.R. Schmidt, L.D. Jacobson, and K.A. Janni, “Continuous monitoring of ammonia, hydro- gen sulfide and dust emissions from swine, dairy and poultry barns,” American Society of Agricultural and Biological Engineers, pp. 28-31, 2002. https://doi.org/10.13031/2013. 10575 [34] J.K. Othman, and J.R. Mahmood, “Design and implementation of smart relay based remote monitoring and controlling of ammonia in poultry houses,” International Journal of Com- puter Applications, Vol. 103, No. 8, 2014. https://doi.org/10.5120/18093-9149 [35] L.S. Handigolkar, M.L. Kavya, and P.D. Veena, “IoT based smart poultry farming using commodity hardware and software,” Bonfring International Journal of Software Engineer- ing and Soft Computing, Vol. 6, Special Issue, pp. 171–175, 2016. https://doi.org/10.9756/ BIJSESC.8269 [36] B. Lufyagila, D. Machuve, and T. Clemen, “IoT-powered system for environmental condi- tions monitoring in poultry house: A case of Tanzania,” African Journal of Science Tech- nology Innovation and Development, Vol. 14, No. 12, pp. 1–12, 2021. https://doi.org/10. 1080/20421338.2021.1924348 [37] P. Adinegoro, M.H. Habbani, R.A. Karimah, and Y.A. Laksono, “The design of a telegram IoT-based chicken coop monitoring and controlling system,” Journal of Physical Science and Engineering (JPSE), Vol. 5, No. 2, pp. 56–65, 2020. https://doi.org/10.17977/um024– v5i22020p056 [38] H. Supriyono, U. Bimantoro, and K. Harismah, “Design, construction and testing of portable systems for temperature, humidity and ammonia monitoring of chicken coop,” IOP Confer- ence Series: Materials Science and Engineering, Vol. 771, No. 012003, March, 2020. https://doi.org/10.1088/1757-899X/771/1/012003 [39] D.A. Thomas, C. Reji, J. Joys, and S. Jose, “Automated poultry farm with microcontroller based parameter monitoring system and conveyor mechanism,” 2020 4th International Con- ference on Intelligent Computing and Control Systems (ICICCS), pp. 639–643, 2020. https://doi.org/10.1109/ICICCS48265.2020.9120982 [40] A.A. Masriwilaga, T.A.J.M. Al-hadi, A. Subagja, and S. Septiana, “Monitoring system for broiler chicken farms based on Internet of Things (IoT),” Telekontran: Jurnal Ilmiah Tele- komunikasi, Kendali dan Elektronika Terapan, Vol. 7, No. 1, pp. 1–13, 2019. https://doi.org/ 10.34010/TELEKONTRAN.V7I1.1641 [41] M.M. Islam, S.S. Tonmoy, S. Quayum, A.R. Sarker, S.U. Hani, and M.A. Mannan, “Smart poultry farm incorporating gsm and iot,” International Conference on Robotics, Electrical and Signal Processing Techniques (ICREST), IEEE. pp. 277–280, 2019. https://doi.org/ 10.1109/ICREST.2019.8644300 [42] A.A.G. Raj, and J.G. Jayanthi, “Iot-based real-time poultry monitoring and health status identification,” 11th International Symposium on Mechatronics and its Applications (ISMA), pp. 1–7, 2018. https://doi.org/10.1109/ISMA.2018.8330139 [43] K.A. Sitaram, K.R. Ankush, K.N. Anant, and B.R. Raghunath, “Iot based smart management of poultry farm and electricity generation,” IEEE International Conference on Computa- tional Intelligence and Computing Research (ICCIC), pp. 1–4, 2018. https://doi.org/10. 1109/ICCIC.2018.8782308 [44] G.A. Choukidar, and N. Dawande, “Smart poultry farm automation and monitoring system,” International Conference on Computing, Communication, Control and Automation (IC- CUBEA), IEEE. pp. 1–5, 2017. https://doi.org/10.1109/ICCUBEA.2017.8463953 168 http://www.i-jim.org https://doi.org/10.1016/0021-8634(92)80072-Z https://doi.org/10.13031/2013.10575 https://doi.org/10.13031/2013.10575 https://doi.org/10.5120/18093-9149 https://doi.org/10.9756/BIJSESC.8269 https://doi.org/10.9756/BIJSESC.8269 https://doi.org/10.1080/20421338.2021.1924348 https://doi.org/10.1080/20421338.2021.1924348 https://doi.org/10.17977/um024%E2%80%93v5i22020p056 https://doi.org/10.17977/um024%E2%80%93v5i22020p056 https://doi.org/10.1088/1757-899X/771/1/012003 https://doi.org/10.1109/ICICCS48265.2020.9120982 https://doi.org/10.34010/TE https://doi.org/10.34010/TE https://doi.org/10.34010/TELEKONTRAN.V7I1.1641 https://doi.org/10.1109/ICREST.2019.8644300 https://doi.org/10.1109/ICREST.2019.8644300 https://doi.org/10.1109/ISMA.2018.8330139 https://doi.org/10.1109/ICCIC.2018.8782308 https://doi.org/10.1109/ICCIC.2018.8782308 https://doi.org/10.1109/ICCUBEA.2017.8463953 Paper—Poultry-Edge-AI-IoT System for Real-Time Monitoring and Predicting by Using Artificial Intelligence [45] G. Raghudathesh, D. Deepak, G.K. Prasad, A. Arun, R. Balekai, V.C. Yatnalli, S. Lata, and B.S. Kumar, “Iot based intelligent poultry management system using linux embedded sys- tem,” International Conference on Advances in Computing, Communications and Informat- ics (ICACCI), IEEE. pp. 449–454, 2017. https://doi.org/10.1109/ICACCI.2017.8125881 [46] R.B. Mahale, and S. Sonavane, “Smart poultry farm monitoring using iot and wireless sensor networks,” International Journal of Advanced Research in Computer Science, Vol. 7, No. 3, pp. 187–190, 2016. https://doi.org/10.26483/ijarcs.v7i3.2665 [47] R.B. Mahale, and S. Sonavane, “Smart poultry farm: An integrated solution using wsn and gprs based network,” International Journal of Advanced Research in Computer Engineering & Technology (IJARCET), Vol. 5, 2016. [48] K.S. Goud, A. Sudharson, “Internet based smart poultry farm,” Indian Journal of Science and Technology, Vol. 8, No. 19, 2015. https://doi.org/10.17485/ijst/2015/v8i19/76227 [49] H. Li, H. Wang, W. Yin, Y. Li, Y. Qian, and F. Hu, “Development of a remote monitoring system for henhouse environment based on iot technology,” Future Internet, Vol. 7, No. 3, pp. 329–341, 2015. https://doi.org/10.3390/fi7030329 [50] C. So-In, S. Poolsanguan, and K. Rujirakul, “A hybrid mobile environmental and population density management system for smart poultry farms,” Computers and Electronics in Agri- culture, Vol. 109, pp. 287–301, 2014. https://doi.org/10.1016/j.compag.2014.10.004 [51] M. Murad, K.M. Yahya, and G.M. Hassan, “Web based poultry farm monitoring system using wireless sensor network,” Proceedings of the 7th International Conference on Fron- tiers of Information Technology, No. 7, pp. 1–5, December, 2009. https://doi.org/10.1145/ 1838002.1838010 [52] F. Dong, and N. Zhang, “Wireless sensor networks applied on environmental monitoring in fowl farm,” International Conference on Computer and Computing Technologies in Agri- culture, Springer. Vol. 317, pp. 479–486, 2009. https://doi.org/10.1007/978-3-642-12220- 0_70 [53] A. Niimi, M. Wada, K. Ito, M. Toda, K. Hatanaka, and O. Konishi, “Broiler-house environ- ment monitoring system using sensor network and mail delivery system,” Artificial Life and Robotics, Vol. 13, No. 1, pp. 264–270, 2008. https://doi.org/10.1007/s10015-008-0570-0 [54] L.R. Wilhelm, J.M. Milner, S.D. Snyder, and D.B. McKinney, “An instrumentation system for environmental measurements in broiler and swine housing,” Applied Engineering in Ag- riculture, Vol. 17, No. 5, pp. 677–681, 2001. https://doi.org/10.13031/2013.6918 [55] K. Cho, B.V. Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, “Learning Phrase Representations using RNN Encoder-Decoder for Statistical Ma- chine Translation,” arXiv, No. September, pp. 1–15, 2014. https://doi.org/10.48550/arXiv. 1406.1078 8 Authors Hakim Jebari received his Ph.D. in Informatics and Artificial Intelligence at the National School of Applied Sciences of Tangier, University Abdelmalek Essaâdi, Mo- rocco. He is now a Postdoctoral Researcher at the Research Laboratory in Engineering, Innovation, and Management of Industrial Systems. His research areas include Artifi- cial Intelligence, Informatics, and Industrial Engineering (hjebari1@yahoo.fr). Meriem Hayani Mechkouri received her Ph.D. in Mechanical Engineering at the Design and Technology engineering school of Meknes, Morocco. She is now a Profes- sor of Mechanical Engineering at the Faculty of Science and Technique of Tangier, and iJIM ‒ Vol. 17, No. 12, 2023 169 https://doi.org/10.1109/ICACCI.2017.8125881 https://doi.org/10.26483/ijarcs.v7i3.2665 https://doi.org/10.17485/ijst/2015/v8i19/76227 https://doi.org/10.3390/fi7030329 https://doi.org/10.1016/j.compag.2014.10.004 https://doi.org/10.1145/1838002.1838010 https://doi.org/10.1145/1838002.1838010 https://doi.org/10.1145/1838002.1838010 https://doi.org/10.1007/978-3-642-12220-0_70 https://doi.org/10.1007/978-3-642-12220-0_70 https://doi.org/10.1007/s10015-008-0570-0 https://doi.org/10.13031/2013.6918 https://doi.org/10.48550/arXiv.1406.1078 https://doi.org/10.48550/arXiv.1406.1078 Paper—Poultry-Edge-AI-IoT System for Real-time Monitoring and Predicting by Using Artificial Intelligence a Researcher at the Research Laboratory in Engineering, Innovation, and Management of Industrial Systems. Her research areas include Mechanical, and Industrial Engineer- ing (meriem.hayani@outlook.com). Siham Rekiek received her Ph.D. in Informatics and Artificial Intelligence at the Faculty of Science and Technique of Tangier, University Abdelmalek Essaâdi, Mo- rocco. She is now a Professor of Informatics and Artificial Intelligence at The Interna- tional Higher Institute of Tourism of Tangier (ISITT), and a Researcher at the Intelli- gent Automation Laboratory at the Faculty of Science and Technique of Tangier. Her research areas include Artificial Intelligence, Informatics, Industrial Engineering, Tour- ism, and governance (srekiek@gmail.com). Kamal Reklaoui received his Ph.D. in Industrial Engineering at Poitiers University. He is now a Professor of Industrial Engineering at the Faculty of Science and Technique of Tangier, and Director of the National School of Applied Sciences of Tetouan, Uni- versity Abdelmalek Essaâdi. He is also the director of the Research Laboratory in En- gineering, Innovation, and Management of Industrial Systems. His research areas in- clude Artificial Intelligence, Informatics, and Industrial Engineering (kreklaoui@out- look.com). Article submitted 2023-01-14. Resubmitted 2023-04-19. Final acceptance 2023-04-27. Final version pub- lished as submitted by the authors. 170 http://www.i-jim.org mailto:kreklaoui@outlook.com mailto:kreklaoui@outlook.com