Smart and Portable Air-Quality Monitoring IoT Low-Cost Devices in Ibarra City, Ecuador

1. Introduction

2
%

of the geographic area and accommodate over

50
%

of the world’s population [

Environmental pollution is an issue that has undeniably attracted our full attention. The problem of air pollution affects people’s physical and mental health, and long-term exposure increases the risk of cardiovascular and respiratory diseases [ 1 ]. In addition, the World Health Organization (WHO) forecasts that 4.2 million people die every year because of exposure to air pollutants. This concern is more evident in urban sectors with high population density, since their air-pollution levels have increased [ 2 ]. Indeed, cities represent only aboutof the geographic area and accommodate overof the world’s population [ 3 ]. Therefore, it is necessary to describe human behavior to detect where and when traffic increases and people are at greater risk of air-pollution exposure [ 4 ]. Thus, governments can receive relevant information to propose new transport policies/alternatives that are adjusted to the specific characteristics of each city [ 5 ].

the Paris Agreement, because it had several countries commit to reducing the production of polluting gases [

Following this environmental concern, several initiatives from worldwide organizations have proposed limiting the emission of harmful gases that come from the combustion of fuels, especially petroleum [ 6 ]. For this reason, one of the most relevant proposals in this field is, because it had several countries commit to reducing the production of polluting gases [ 7 ]. Its main objective in environmental terms is to limit the increase in global temperature to below two degrees Celsius per year. In fact, if the global temperature exceeds this value, this could have an irreversible impact on the environment and could affect all ecosystems on the planet [ 8 ].

waqi.org (

Therefore, from a traditional point of view, environmental protection agencies have started to set up fixed-site air-quality monitoring stations in many regions to collect data on air-quality conditions. Additionally, nonprofit organizations, such as https://waqi.info/ accessed on 17 August 2022), provide information on current air pollution using more than 30,000 monitoring stations installed in 2000 cities around the world. However, in Latin America [ 9 ], several cities do not have air-quality monitoring stations. For example, in Ecuador, there is currently only one air-quality measurement node located in Cuenca, and nine in Quito [ 10 ]. For this reason, the commitment made by some countries to limit their emissions of polluting gases has become a challenging task. This is because of the following two reasons: (a) traditional air-quality stations do not have the necessary infrastructure to acquire data on environmental pollution [ 11 ], and (b) these stations are rigid and, consequently, fixed installation points can only represent approximations of the phenomenon [ 12 ]. For these reasons, low-cost sensors are a suitable solution to deploy data acquisition systems and, combined with conventional equipment, allow air quality to be monitored more effectively [ 13 ]. In addition, low-cost sensors are part of an embedded system (i.e., sensors, microcontroller, and battery) and are capable of sending data by means of different communication protocols. In this way, they become Internet of Things (IoT) devices [ 14 ].

The main characteristics of low-cost sensors can be summarized as follows: ease of deployment, fast integration of several sensors with low power consumption, and their flexibility to be installed in remote locations [ 9 ]. However, due to their interaction with the environment, IoT low-cost devices can suffer from malfunctions caused by environmental conditions or deterioration of their materials [ 15 ]. On the other hand, due to the exponential use of IoT devices, their development in recent years has improved their data processing capability, power consumption, and various long-range wireless technologies for sending data. Consequently, today, these devices have enough computational resources to implement machine learning (ML) model inference aimed at local decision making [ 16 ]. Therefore, some trends, such as federated learning, allow complex algorithms to be compiled based on their input data on end devices such as tablets, phones, and, specifically in this case, electronic devices [ 17 ]. It also ensures that data are processed locally and avoids the risk of being intercepted. In addition, it reduces the processing load on servers due to massive data sending [ 8 ]. Nevertheless, it is necessary to determine the random-access memory (RAM) needed to compile a robust application that enables secure processing and avoids remote attestation [ 18 ].

Taking into account everything stated above, this research proposes the development of low-cost smart, portable IoT devices for air-quality monitoring. These devices will be installed in public and private vehicles in Ibarra, Ecuador, to collect the required information to describe the air-pollution phenomenon. To do so, first, we design an electronic system that collects data while having the ability to detect outliers [ 5 ]. Then, with the data sent to an external server, we will train several supervised learning models to determine which one best describes the studied phenomenon. Later, the algorithm with the highest classification performance and lowest computational cost will run on the IoT device to infer the class of new incoming data.

The implementation of classification algorithms helps provide relevant information for decision making. In this paper, through labels, a heat map of the city is represented in accordance with the pollution indexes and the areas of high vehicular traffic. This is carried out together with the concentration of gases. With this information, we can validate whether the policies of government entities meet the objective of reducing emissions of polluting gases. In addition, citizens can choose to take alternative routes so as not to be exposed to areas with a high concentration of air pollutants. When mentioning that the system infers the class of the new data, it means that the nodes have the ability to make decisions locally, freeing up computational cost on the server and avoiding latencies. Additionally, once the classification is implemented in its memory, the system can determine and classify the pollution indexes at any time of day. Established classes are shown in upcoming sections of the paper.

In short, the classification benefits citizens, because they can now access the required information and observe the heat map of the city, with respect to the concentration of polluting gases. Likewise, the classification allows researchers in the field of polluting gases analysis to compare the results obtained with a system that detects local patterns—that is, in the place where the measurement is carried out. In other words, the device’s decision means it is not necessary to constantly perform analyses from the server, which consumes much more energy and computational power.

Finally, a user interface (GUI) is available on a cloud server in order to store relevant data to improve the model and display the environmental pollution of the city in a heat map. As a result, One-Class Support Vector Machine (One-Class SVM) is defined as an anomaly detection algorithm used to eliminate outliers. In terms of classification algorithms, we had similar results with the Decision Tree algorithm and Neural Networks, with consumption of 12 Kbytes of flash and 3 Kbytes in RAM, with a processing time of approximately 1 s.

In short, the novelty of this research is the presentation of an IoT architecture used to deploy ML models locally, using low-cost sensors to reduce the power consumption and bandwidth needed to process large datasets in the Cloud. Therefore, the main contributions of this paper are as follows:

  • We present an extensive literature review to select the suitable low-cost sensors available to collect air-pollution data properly.

  • We design an IoT architecture showing characteristics of the transmission channel, the type of database used, and the corresponding data analysis tasks needed to run ML models close to the end-user.

  • Robust data analysis based on ML techniques is presented with stages of data acquisition and data preprocessing, such as: (a) outlier detection, (b) classification model building, and (c) tests that are necessary to work in natural environments. Here, this analysis has been applied to contribute to the solution of current concerns such as environmental pollution.

  • A computational cost analysis is performed to define suitable ML algorithms for IoT devices and the new challenges of implementing them in devices with limited processing capabilities.