It can be estimated that one person produces an average of 300 g of waste in a daily basis. Therefore, an average of 100 kg of waste, is produced over a year (365 days) by that one person. In this notion, a residential complex with 100 residents can produce up to 10 tons of organic waste within a year. This kind of waste, although organic, is treated as regular garbage, disposed in municipal garbage dumpsters, until garbage collectors collect them and transfer them to the designated municipal garbage-disposal areas. As cities and their population become larger, residential areas become denser, thus producing larger volumes of waste, big part of which is organic. The disposal of such kind of waste in dumpsters poses several health risks for the community and its residents as it attracts insects and rodents that are potential disease carriers.
To alleviate this issue, municipalities have resorted to composting, as it introduces a viable and profitable solution for the management of organic waste. In more detail, several cities have raised citizen awareness on separating regular household garbage from organic waste and initiated organic-waste-specific protocols for its collection and composting. Composting creates a unique opportunity for cities and citizens, as it transforms useless organic matter into odorless, nutrient-rich manure that can be beneficial to both parties. Cities can commercially exploit the created compost, and citizens can be reimbursed in municipal taxes refunds according to their waste contribution [1
Nevertheless, cities are obligated to perform the composting procedure in designated safe zones, away from residential areas. Additionally, composting is a rather delicate procedure that requires constant supervision by experts to produce high-quality compost in a timely manner, thus requiring the employment of specialized personnel. Automated composting machinery has emerged to minimize human intervention as much as possible, but overall fails to deliver high-quality outcomes like supervised composting. To tackle human absence and provide continuous supervision and effective manipulation of the compost material, ubiquitous, high-end computation systems are required that can perform real-time analysis of sensor data concerning the compost material and its surrounding environment, and export relevant conclusions concerning the necessary actions to be taken to facilitate an optimal composting procedure. This poses a great financial limitation on such systems and creates a need for onsite administrative management (IT) and regular maintenance of those complex infrastructures.
On the other hand, cloud computing [4
], along with the proliferation of Internet of Things (IoT) systems, frameworks, and architectures [8
], has recently played a significant role in the development of intuitive and unsupervised systems and services. Taking into account all the issues mentioned above, this work, which is an evolution of our previous work presented in References [11
], introduces COMPosting as a Service (COMPaaS), a combination of an innovative IoT composting appliance and a cloud service that performs all necessary calculations and actions to provide a completely unsupervised, uninterrupted composting procedure. Our approach produces compost up to 30% faster than traditional composting methods, that is, in two months instead of three. In this work, our main focus has been on the layered IT approach that has been adopted following the edge-computing paradigm and not on the biological aspects involved. To the best of our knowledge, there is not other such tiered approach in bibliography for automating composting procedures. In more detail, we present a composting frame enriched with several sensors to measure humidity, temperature, and sunlight intensity, in and out of the frame, and the core of the compost material. Additionally, an IoT gateway aggregates all sensor data and controls all the actuators (fans, motors, etc.). The gateway sends all sensor data to the cloud service and provides a middleware Application Programming Interface (API), for the manipulation of the underlying hardware (actuators and IoT devices) by the cloud service.The cloud service receives all sensor data and performs composting-specific analytics in real time. This analysis illustrates the most appropriate action (ventilate, water, stir, etc.) to be performed to guarantee a fast and smooth composting procedure.
This paper is organized as follows. Related work and the contribution of this study are presented in Section 2
. The proposed system’s architecture and detailed functionality are presented in Section 3
. A field evaluation of our system is presented in Section 4
. Finally, this paper is concluded in Section 5
2. Related Work
2.1. About Composting
Composting and its benefits on agriculture have been known since the tenth century. Greeks and Romans knew about compost, a fact contained in tenth- and twelfth-century Arab writings, in medieval Church texts, and in Renaissance literature. Since then, as science evolved, compost has evolved with it. In general, compost is high-quality, nutrient-rich, inactive manure that detracts insects and pests. It is a natural soil curb that enhances organic-matter content and functions as a water reserve, preventing runoff and soil erosion, a characteristic that is typical in the Mediterranean due to its mostly hilly terrain [13
]. To produce high-quality compost, it requires uninterrupted attention and intervention, and certain expertise in the field. The overall process is delicate and easily corrupted. Process corruption can lead to toxicity in the produced material that can be disastrous for agriculture [14
]. The composting procedure is divided in two main phases, the decomposition and maturation phase. The decomposition phase is characterized by intense microbial activity, introduced by the rapid decomposition of the material. This phase is dissected in two subphases depending on the material’s temperature. In the first subphase (mesophilic), decomposition has just started, and temperature rises, reaching up to 60 °C. In the second phase (thermophilic), decomposition is in full extend and the temperature rises up to 65–70 °C. During these two subphases, the material’s moisture must be kept between 50% and 60%. Moisture decrease below 50% slows down or even stops the degradation process since, in order for the nutrients to be consumed by micro-organisms, they must be in the solution. Moisture increase above 60% renders the process anaerobic and results in contamination of the procedure. The overall duration of the first phase varies, from fifteen to thirty days. In the maturation phase, decomposition has finished, and the material starts to mature and settle. Temperature steadily drops, and the material volume starts to decrease. The overall duration of the second phase varies, from thirty to sixty days. Figure 1
illustrates the correlation of each phase with the material’s temperature.
It is obvious from the above description that successful completion of composting heavily depends on the material’s moisture and temperature. Hence, in any manned or unmanned system that supervises composting, these two parameters should be permanently monitored as composting progresses to assure, via interventions, maintenance of the material within the required maturation curves. The next section presents efforts to partially or fully automatize the composting procedure using various sensors.
2.2. Composting in the IoT Era
The smart-city paradigm has inspired several research initiatives to address the notion of centralized management of cities’ resources and waste. Composting and the ability to perform it efficiently, unsupervised and uninterrupted, has been a rather popular issue to tackle. Jordao et al. in Reference [15
] presented a low-cost station for measuring air temperature, where the composting procedure took place to provide an overview of the overall procedure’s progress to experts. In Reference [16
], Casas et al. presented a more elaborate infrastructure that integrated a Wireless Sensor Network (WSN) to provide experts with continuous remote monitoring of the composting procedure. Similarly, Lopez et al. in Reference [17
] introduced an evaluation system that assesses the compost’s maturity, and therefore its progress, by implementing O2
and CO sensors (electronic nose), and feeding the sensor data to the assessment system that was trained with preconstructed compost profiles. Furthermore, Puyuelo et al. in Reference [18
] presented a system that measures the gas emissions of the compost material and determines whether to insert or remove oxygen from the frame, to guarantee an uninterrupted and efficient composting procedure. A more sophisticated approach was presented in Reference [19
], where Rahane et al. introduced a composting infrastructure that periodically performs specific tasks (stirring, ventilating, etc.), but also performs dynamically invoked actions, according to the compost material’s temperature.
To the best of our knowledge, this work is the first time that a cloud-based architecture following the edge-computing paradigm is introduced for controlling composting frames. In contrast to other typical client–server bibliography architectures, such as the one reviewed above, our approach can support scalability, since the cloud infrastructure we introduce here can potentially monitor and control several composting frames in parallel, distributed across remote locations. In addition, this takes place without any lack of efficiency, since the scheduling of tasks is decided on the Cloud, but execution is assigned to the edge modules that run very close to the composting frames.
2.3. Our Contribution
The research initiatives presented above constitute a small but representative portion of the ongoing endeavors towards making composting, a long, complex, and delicate procedure, smoother and shorter, with as little human intervention as possible. Yet, the majority of past or ongoing research proposes simple telemetry systems to provide remote monitoring of the composting procedure to experts and simple scheduled tasks to reduce human involvement. In some cases, more elaborate systems are presented that perform dynamically invoked tasks by assessment mechanisms. In all cases, all automation is implemented locally, and human intervention is inevitable.
To tackle a unsupervised, uninterrupted, and more efficient composting procedure, we propose a composting architecture/infrastructure, which introduces:
A composting frame enriched with a set of sensors to measure temperature, humidity, and sunlight of the environment inside and outside of the frame, as well as the compost material itself. Our intention was to correlate the progress of composting with the ambient conditions. This why we also used ambient sensors. To this end, the frame’s roof is made of glass to take advantage of the sunlight that heats the material and potentially accelerates the overall procedure.
A “smart” IoT gateway that performs basic scheduled tasks, data logging, and aggregates all sensor data and sends them to a cloud service for processing, analysis, and assessment. It also provides an overlay middleware/API to allow control of the underlying systems to the cloud service.
A novel cloud composting service that collects all sensor data from the IoT gateway, performs analysis on those data, assesses the current condition of the composting procedure, and invokes all necessary actions if needed.
illustrates the adopted approach of the composting frame. The approach we introduce here is an extension of our work presented in Reference [11
] so it includes an edge-based computing approach similar to the one we presented in Reference [12
]. Hence, the centralized approach of Reference [11
], comprising an Extreme Edge and a Cloud layer, is now complemented with an Edge layer to make control of composting devices less network-dependent and, hence, more efficient. In the following sections, we discuss in detail and elaborate on the design, development, and deployment of the presented infrastructure.
3. System Architecture
The proposed architecture is depicted in Figure 3
and comprises three main layers. The cloud, where the composting service is deployed; the edge, where the IoT gateway and the Programmable Logic Controller (PLC) are deployed; and the extreme edge, where the composting frame facilitates the composting procedure. The proposed architecture illustrates the decoupling of the composting “logic” from the edge and sent to the Cloud to allow for uninterrupted and ubiquitous service. To allow a more comprehensive explanation of the system’s architecture, we provide a top-to-bottom presentation.
The top abstraction layer of the presented infrastructure is the Cloud, where the overall decoupled system logic is hosted. A composting service, composed of several microservices, handles the composting procedure through its whole lifecycle, performing complex data processing and deducting specific decisions concerning the appropriate action to be taken (e.g., stir, water, ventilate, etc.). In more detail, the system data-aggregation service collects all data sent from the IoT gateway and formats them in an appropriate structure, to be processed by the data-analyzer service. The data-analyzer service is a neural-network system, trained with extensive empirical data manually collected and assessed by experts in the field, performing analytics on the data received by the data aggregator (anomaly detection, pattern recognition, etc.). The results of that analysis are fed to the decision-making microservice, which, in turn, deduces the next action to be taken. Once the action has been decided, the system-controller microservice is probed. The system-controller microservice performs the action by utilizing the middleware/API exposed by the IoT gateway at the edge. Finally, an administration dashboard for tweaking system settings and monitoring the system’s status is implemented. Interaction between the Cloud and the edge-abstraction layers is realized through a secure MQTT communication channel.
The core of our composting system resides in the edge-abstraction layer. Therein, the IoT gateway and the PLC controller are deployed.
3.2.1. IoT Gateway
The IoT gateway, is the central point of connection between the edge and the cloud-abstraction layers. It exposes an MQTT API to allow well-defined interaction between entities (composting service and IoT gateway). MQTT is a popular solution in IoT developments due to its small fingerprint and the bidirectional communication it enables between entities. Similarly to the cloud composting service, the IoT gateway hosts several microservices, each of which is responsible for a certain task. Namely the Device Data aggregator service, is responsible for collecting all data from sensors and actuators and formatting it into an appropriate structure. This data will be sent to the cloud composting service in a periodic manner. The device-controller service, is responsible for manipulating all the actuators in the edge (motors, fans etc.). It utilizes an Ethernet communication channel to instruct the PLC controller to start a task such as stir or water. The logic service, is the main service inside the IoT gateway which holds the overall edge-system logic. It receives “instructions” from the middleware API, thus the composting service, and performs accordingly (e.g., get data from the device data-aggregator, start an actuator etc.). Finally, an admin dashboard is deployed to allow administrators and IT personnel monitor and administer the edge infrastructure.
3.2.2. PLC Controller
The PLC controller is the device that is directly connected to the edge system’s sensors and actuators. It gathers all metrics (sensor data and actuators’ status), and controls all the actuators. The PLC controller comprises an Ethernet network interface to interact with external entities, such as the IoT gateway. Wired communication is preferred, in our case, to a wireless solution due to the ambient environment of the PLC that is polluted by electromagnetic noise. To this end, Ethernet is the dominant wired networking technology. Additionally, the PLC controller contains analog and digital inputs to connect with and control various sensors and actuators.
3.3. Extreme Edge
This is the lowest abstraction layer. In this layer, the composting frame houses all sensors and actuators. Interaction with the upper layers, i.e., the edge, is realized through a CAN Bus communication channel. The CAN bus is an industrial-grade serial communication protocol that can assure immunity to ambient electromagnetic interference from motors, fans, high voltage, etc.
4. Field Evaluation
During the implementation and testing of the presented architecture, several issues had to be addressed to allow uninterrupted and unsupervised operation of the whole infrastructure, and produce quality results. Initially, since implementation of the presented composting architecture is an academic endeavor, the design and construction of the frame (Figure 4
), along with the selection and mounting of sensors and actuators (Figure 5
and Figure 6
), had to be revisited several times. In this notion, the initial selection of sensors, motors, and mounting frames had to be rethought, and several parts of the frame had to be redesigned to achieve an optimal result. Figure 4
illustrates the final real-life implementation of the composting frame, and Figure 5
illustrates the final mounting of the temperature and humidity sensors. Figure 7
illustrates the electrical infrastructure.
One other issue we had to deal with was the collection of organic waste. Several businesses, such as cafeterias, hotels, butcher shops, and vegetable markets, agreed to offer their organic waste. To collect the offered waste, municipal garbage-collection vehicles had to be employed, and specific waste containers and special biodegradable waste-disposal bags had to be distributed to the businesses. The collected waste was disposed in the compost frame daily.
Finally, due to the odor emissions of the composting infrastructure, the frame had to be stationed in an uninhabited area. This fact rendered internet connectivity very scarce and volatile. In this respect, the communication payload between the IoT gateway and the Cloud had to be minimal. Thus, several communication aspects had to be redesigned.
4.2. Composting Frame
At the extreme edge, the physical world, the composting frame is a 20 m3 tank where the composting material is processed. A set of sensors deliver indoor/outdoor environment and material metrics in real time. A set of actuators was installed to provide all necessary functions to facilitate the composting procedure. Lastly, a PLC module was used to control all underlying actuators and collect all sensor data. In more detail, the composting frame is a 20 m3 stainless steel tank to hold the compost material with a transparent ceiling to take advantage of the sunlight that helps raise the temperature of the indoor environment and, thus, the temperature of the compost material. The manipulation of the indoor and material temperature is managed by a set of roof fans and a housing ventilator. Several sensors were installed to provide a detailed overview of the indoor/outdoor environment and material status. In more detail, two sensors measure the temperature of the compost material. Two sensors measure the air temperature and humidity in the frame. Two sensors measure the air temperature and sunlight levels out of the frame. Finally, a level sensor measures the height of the compost pile in the frame. As material humidity is a very critical part of the overall composting procedure, a control mechanism is installed to manipulate it. A sprinkler is used to water the material if necessary, and excessive water is strained through the bottom of the frame and kept in a separate compartment to be reused from the sprinkler to manipulate humidity. Two level sensors are used to measure the water level in that compartment. If the water is below a certain threshold, a pump adds water from the network. To allow for an unsupervised composting procedure, several actuators were installed. A water pump is used to spray water on the material through the sprinkler in order to manipulate its humidity. An air compressor is used to periodically unclog the strain rails at the bottom of the frame by blowing in air in standard intervals. A ventilator is used to extract excessive hot air from the frame to manipulate the indoor air temperature. Two ceiling fans are used to circulate the air inside the frame and manipulate the material’s temperature. Finally, two motors are used to perform regular stirring of the material, allowing oxygen to circulate through it by moving two Archimedes screws that are positioned at the bottom of the enclosure. An industrial PLC module is used to collect all sensor data through a CAN bus communication channel and control all actuators. This PLC module does not perform any automated action and it is completely controlled by the IoT gateway.
4.3. IoT Gateway
The IoT gateway is deployed at the edge-abstraction layer of our architecture. The gateway utilizes the Liota open-source IoT gateway agent created by VMWare [20
]. The Liota agent aggregates all sensor data and sends them to the cloud composting service through an MQTT (Message Queuing Telemetry Transport) communication channel over Secure Sockets Layer (SSL) protocol. Additionally, it performs scheduled tasks sent by the composting service, such as stirring the material and ventilating the frame, by instructing the PLC module. Finally, it exposes a middleware/API to allow remote management and manipulation of the actuators by the composting cloud service. A lightweight dashboard is also available for on-site management and data logging.
4.3.1. Scheduled Tasks
Regardless of sensor values, a number of tasks have to be periodically performed to maintain material integrity. In more detail, the IoT gateway stirs the material three times a day to homogenize the possible periodically added waste (municipal employees add waste once or twice a day), and allow more oxygen to flow within the pile, thus enhancing microbial activity. While the pile is being stirred, hot air and methane are emitted. Thus, the ventilation system must be activated to work in parallel. Additionally, since methane is constantly being emitted by the compost material, ventilation is also activated every hour for 10 minutes. The assigned tasks are sent to the IoT Gateway for execution by the composting service. There are two types of tasks: on the one hand, there are the scheduled tasks that are executed at certain times, and on the other hand, there are the dynamic tasks that are both time- and sensor-dependent. Figure 8
illustrates the notion of scheduled and dynamic tasks that are assigned to the IoT gateway for execution.
The composting service integrates a system dashboard to display the real-time status of the composting frame, also allowing manual control over the frame actuators and defining algorithm settings, such as stirring time, temperature, and moisture thresholds. The system dashboard backend was developed on a Python Flask lightweight web framework. The first view of the compost service dashboard illustrates the real-time sensor values and motor status (Figure 9
A separate section in the dashboard displays the real-time sensor values in time-series graphs. Figure 10
illustrates the top four sensor real-time values displayed in the dashboard.
Finally, all durations (stirring duration, ventilation duration, etc.) and thresholds (e.g., soil-moisture threshold) are configurable through the settings view (Figure 11
The evaluation of composting systems is a rather long procedure and requires deep expertise in the field. To evaluate the efficiency of the proposed architecture, we implemented a completely supervised composting procedure and the unsupervised composting procedure provided by the presented system, and compared the produced results. In more detail, approximately 20 m3 of household-produced organic waste was disposed of in a designated field to undergo composting. The whole procedure was continuously supervised by experts to guarantee the optimal development of the composting process. In several cases, the experts performed actions such as watering or drying the compost material to meet the appropriate conditions in humidity and temperature, allowing the process to progress uninterrupted. Similarly, approximately 20 m3 of the same material was disposed of in the presented composting frame. The whole procedure was performed in a completely unsupervised manner. Both procedures produced high-quality compost and performed as expected. The total duration of the manual procedure was three months, and required the employment of two experts for the overall supervision of the process. The presented system took two months to complete and required no supervision at all. The produced outcomes from both processes were rather similar in quality and quantity.
The evaluation of composting systems is a rather long procedure and requires deep expertise in the field. To evaluate the efficiency of the proposed architecture, we implemented a completely supervised composting procedure and the unsupervised composting procedure provided by the presented system and compared the produced results. In more detail, approximately 20 m3 of household-produced organic waste, were disposed in a designated field to undergo the composting procedure. The whole procedure was continuously supervised by experts, to guarantee the optimal development of the composting process. In several cases, the experts performed actions such as watering or drying the compost material to meet the appropriate conditions in humidity and temperature, allowing the process to progress uninterrupted. Similarly, approximately 20 m3 of the same material was disposed in the presented composting frame. The whole procedure was performed in a completely unsupervised manner. Both procedures produced high quality compost and performed as expected. The total duration of the manual procedure was three (3) months and required the employment of two experts for the overall supervision of the process. The presented system took two (2) months to complete and required no supervision at all. The produced outcomes from both processes, were rather similar in quality and quantity.
With respect to the IT infrastructure we used and the overall evaluation of the system we developed, the following can be highlighted:
Our IoT gateway runs on Raspberry Pi 3 model B+ equipment without any performance issues. Taking into consideration that data processing at the edge is limited, it is obvious why there is no requirement for more processing power at this layer.
Our cloud infrastructure is hosted on a virtual machine with 2 dual-core CPUs and 8 GB RAM. These hardware resources are enough for our deployment that includes only one composting frame. However, considering the operation of data aggregation and analysis using neural networks, which takes place on the Cloud, potential scaling of the system to include more composting frames definitely requires more resources. With respect to data storage, our system consumes almost 50 GB of hard disk for every reporting two-month reporting period.
The communication delay between the IoT gateway and the cloud application does not exceed 10 ms. Our gateway is wired, connected to the Internet through a gigabit Ethernet connection.