Ambient Air Monitoring System With Adaptive Performance Stability

Air pollution is a significant concern in this era. However, large quantities of pollutants can cause environmental damage and human health problems. The existing monitoring systems are highly precise and sensitive; however, they require high laboratory analysis and high operational costs. To overcome these problems, an air quality monitoring system has been proposed as an alternative that can complement the current system. This study aimed to design an inexpensive air quality monitoring system using metal oxide sensors to measure the concentrations of carbon monoxide (CO), nitrogen dioxide (NO2), sulfur dioxide (SO2), and particulate matter (PM) using laser diffraction, a microcontroller, and a general packet radio service module. Our air quality index monitoring system is a sensor node powered by a rechargeable battery supplied by either a solar panel or an alternating current power supply. Our developed system is equipped with an information system, namely a server and graphical user interface, to receive data, calculate the air pollutant standard index, and access data. In this paper, we discussed a novel adaptive algorithm for reducing packet loss in cellular-network-based transmissions. This algorithm allows nodes to perform repeated data transmissions and extends the response waiting times according to the received signal strength indicator. The test results show that the developed algorithm can reduce packet loss by 9.8–11.6% under medium/bad conditions. The node test was carried out in a heavy traffic area approximately 2 km from Atang Senjaya Airport with moderate air quality.


I. INTRODUCTION
Many studies on the adverse effects of air pollution exposure on human health and the environment have been scientifically confirmed in recent decades [1], [2], [3]. In the agricultural sector, air pollution affects crop yields and can have adverse social and economic effects in developing countries [4]. Therefore, air pollution is an urgent problem in the United Nations Sustainable Development Goals (SDGs).
The associate editor coordinating the review of this manuscript and approving it for publication was Liang-Bi Chen .
Targets substantially reduce the health impacts of hazardous substances and human health [5].
Air pollution monitoring is essential to increase public awareness of sustainable urban environments and human health. Unfortunately, the equipment required to meet the regulatory standards for air quality monitoring has high procurement and maintenance costs, despite the high accuracy and selectivity of the measured parameters. In Indonesia, air quality monitoring systems are based on government regulations, which are limited to the measurement of the air pollutant quality standard index (ISPU), namely nitrogen dioxide (NO 2 ), sulfur dioxide (SO 2 ), carbon monoxide (CO), ozone (O 3 ), hydrocarbons (HC), and particulate matter (PM 2.5 , PM 10 ) [6].
One possible solution to complement conventional methods is to design a low-cost air pollutant monitoring device that can transmit air pollutant data in real time. Many innovative methods have been proposed that use low-cost sensors integrated with various data-transmission devices. For example, the application of metal oxide sensors (MOX), electrochemical gas sensors, and particulate matter sensors integrated with wireless network technology can increase the coverage area and spatial resolution of monitoring systems reported in the literature [7]. The standard communication protocols used in wireless network technologies include cellular, Zigbee, Lora, and Wi-Fi, among others, which can be used as air quality measuring instruments and support widespread device placement in remote areas. The advantage of this approach is that air quality monitoring systems can display air pollutant concentrations in real-time.
Air quality monitoring using wireless sensor networks has been widely reported in the literature. Bagula et al. [8] presented an air quality monitoring system with an integrated ubiquitous sensor network for development (USN4D) architecture for opportunistic data dissemination, remote deployment, and information localization using General Packet Radio Service (GPRS) and XbeePro cellular networks with multi-star topologies. USN4D reported that the GPRS and Zigbee packet losses reached 10%. Rahmat et al. [9], [10], [11] succeeded in designing sensors based on crystal photonics and an air quality monitoring system based on numerical analysis of one-dimensional photonic crystals developed by Alatas et al. [12]. The developed system could detect NO 2 and O 3 pollutant levels under ambient conditions and send data via the XBee protocol wireless sensor network.
Azis et al. [9] demonstrated a low-cost air quality monitoring system using gas sensors, nitrogen dioxide, carbon monoxide, sulfur dioxide, particulate sensors, and surface ozone. This system can calculate the air quality index and determine the air quality status in real time and near real time through desktop and web applications via Xbee protocol communication. Developing a Hybrid Tree-Like Mesh network topology proposed by Iqbal et al. [13] using Zigbee and GPRS for air quality monitoring systems has increased data throughput by 32.06%, reducing delay by 23.28%, and packet loss ratio by 0.01%. A Global System for Mobile Communications modem-based cellular monitoring system was developed and tested in Sharjah, UAE, by Al-Ali et al. [14] The system consists of two main parts: mobile data acquisition and a monitoring server (pollution-server). The measurement data were transmitted via a cellular network using a GPRS modem to the pollution server. However, this approach does not appear to be suitable for large-scale deployments. They did not calibrate the sensors and reported the quality of the service for data transmission.
One of the most important aspects of air quality monitoring systems is reliability of data transmission which depends on the quality of the related wireless communication platform. The most developed low-cost air quality monitoring system transmits data using wireless communication based on cellular, Zigbee, and Lora communication [15], [16], [17]. A study by [18] showed that dynamic weather results in a significant decrease in the accuracy of distance estimation based on the received signal strength of a Global System for Mobile Communications (GSM). In the meantime, the results of a study conducted by [19], [20] showed that a decrease in the packet-receive ratio (PRR) often decreases the received signal strength indicator (RSSI) owing to an increase in the distance between the receiver and transmitter and a decrease in the transmit power level. However, wireless communications used in air quality monitoring systems are susceptible to environmental dynamics, which can hinder data transmission performance. The reliability of data transmission can affect the temporal resolution of the air quality monitoring data. This underlies research on developing an adaptive algorithm based on RSSI to set the response waiting time based on the received signal strength of the GSM/GPRS signals. This study also examined the effect of changes in the response time variations on the packet loss ratio and latency of the SIM7000E modem as a transmitter in a static air quality monitoring system.
Opportunities to use low-cost air quality sensors to benefit individuals and national communities are open. This inexpensive device is not intended to replace existing air quality monitoring stations but helps increase the spatial range of complimentary air pollution measurements [8], [13], [14], [15], [17], [21], [22], [23]. However, several factors are related to the technical challenges of developing and implementing low-cost air quality sensors to produce quality data, evaluate sensors, and integrate sensors obtained from various sources need to be considered [24]. High spatiotemporal air quality monitoring systems require a network that can provide broad coverage and high data transmission rates with minimal data loss. This paper proposes an air quality monitoring system based on GPRS wireless technology. An air quality monitoring system prototype was proposed based on the following electronic components: a microcontroller, GSM/GPRS module, sulfur dioxide (SO 2 ) sensor, carbon monoxide (CO) sensor, nitrogen dioxide (NO 2 ) sensor, particulate matter (PM) sensor, and weather sensors (air temperature, air pressure, relative humidity, wind speed, rainfall, and direction). The contribution of this study mainly emphasizes the role of the GPRS module as a real-time data-transfer component. This study also builds an adaptive algorithm for data transmission through cellular networks based on variations in the received signal strength of the GSM/GPRS signals. These results over relatively stable cellular data transmission systems increase the possibility of data transmission and minimize packet loss compared to devices without adaptive algorithms. The proposed air quality monitoring system is deployed and operated in an urban environment. VOLUME 10, 2022

II. PROPOSED APPROACH
This research was conducted comprehensively through modeling and simulation, experimentation and instrumentation, and the application of information technology. First, modeling and simulation were performed to describe the physical phenomena of the chamber and the gas sampling. Experiments and instrumentation were conducted to test the sensor performance and to transmit data. Finally, information technology is applied to collect, display, and process the data. Figure 1 illustrates the flow of this study.
The system designed in this study used low-cost and readily available components (common parts). Consequently, the production costs are affordable and facilitate further system development. The developed system consists of a sensor node called an air quality index monitoring system (AQIMoS) and a website application. The AQIMoS device consists of three main parts: a microcontroller, sensors, and a GSM/GPRS modem that is fully integrated with solar power. The main capabilities of AQIMoS include continuously measuring pollutant levels in real time and adapting data transmission according to signal conditions. An AQIMoS instrumentation system was successfully developed by using the concept of modularity. For optimization, the AQIMoS system is divided into modules that can work independently, integrated, and controlled by the primary control system. Several AQIMoS subsystems, such as the gas sensor module, particulate sensor module, and weather sensor module, can operate properly, as shown in Figure 2.  In contrast, ESP8266 is a 32-bit microcontroller equipped with Wi-Fi 802.11 b/g/n 2.4 GHz.
The MCU plays a primary role as a control, data collection, and data-processing unit. The MCU uses UART to obtain data from gas sensors, weather, and particulate data and sends commands to SIM7000E using AT commands. The number of hardware modules integrated with the primary MCU increases complexity. This affects the identification, finding, and correction of errors in the created and tested programs. LCD actuators are required to display results or indicators that are separate from the computer.
The Nextion LCD NX4024T032 series has a clock speed of 48 MHz, 4 MB flash memory, and 3584 bytes of RAM to store variables, characters, and images. NX4024T032 is controlled using human-machine interface (HMI) technology and can run programs without relying on the capabilities of the primary MCU. The LCD communicates via the serial TTL port with the primary controller and vice versa.

B. SENSOR SPECIFICATIONS
The gas sensors used in this study were metal oxide (MOX) sensors such as MiCS-6814 (Sensortech), MQ-7 (Zhengzhou Winsen Electronics Technology), and MQ-136 (Hanwei Electronics) sensors. MOX sensors have advantages over other sensors, particularly in terms of the response time, price, and integration with instrumentation systems [25]. For particulate measurements, we used an SDS011 sensor based on light scattering. SDS011 was chosen because it can simultaneously measure particulates with diameters less than 2.5 µm (PM 2.5 ) and less than 10 µm (PM 10 ) ( Table 1).
The MiCS-6814 sensor has been extensively developed to design an air quality system as an ambient NO 2 and CO sensor, with the advantages of compact design and small dimensions, robust MEMS sensors for harsh environments, and high-volume manufacturing for low-cost applications [26], [33], [34], [35]. The measured resistance value (R s ) was normalized to the air resistance (R o ) and then converted to a concentration value using the graph in the MiCS-6814 datasheet to obtain the detected pollutant concentration. The actual value of R o depends on the environmental conditions, particularly air temperature and relative humidity. The MQ-136 sensor measured the ambient SO 2 levels in previous studies [36], [37], [38]. The results of the MQ-136 test show that the sensor can measure ambient SO 2 levels at 1-min intervals [36]. In contrast, [38] shows the MQ-136 ability to operate continuously for more than one month with hourly measurement intervals.
The light-scattering-based PM sensor that performs well under real conditions is SD011. This sensor had a fast response time and low power consumption. Evaluation studies of the SDS011 particulate sensor using standard equipment have been conducted for nearly four months [39]. The experimental results show that the SDS011 sensor has an accuracy of 80.76-98.16% compared with the reference.
The stability and nonlinearity of measuring air pollutant levels are related to ambient air conditions, weather, emissions, and other factors reported in the literature [40], [41], [42], [43]. Therefore, the Sensor Assembly p/n 80422 can be integrated with the Weather Shield (SparkFun) using an MCU to become a standalone system ( Table 2). This system can collect and process meteorological data independently and transmit the data to the primary MCU via the UART. Figure 3 shows that air enters the chamber cavity and flows through the gas sensor during the sensing process. Air was sucked at a specific flow rate using a fan attached to the chamber to measure pollutants. In this study, the total volume of closed air in the section was 456.22 cm 3 , and it took 3.8 s to be refilled using a fan with a flow rate of 7 l/m. The flow rate was maintained using a PC817X optocoupler control circuit and IRF540 MOSFET with the PWM method, which can maintain a stable suction airflow path at the desired level [47].

D. NETWORK CONFIGURATION
Several wireless communication alternatives, such as Wi-Fi, Bluetooth, and GSM/GPRS, which can be used as data transmission protocols for air quality systems, have been reported in the literature [8], [13], [14], [15], [17], [21], [48], [49], [50], [51], [52], [53]. The GSM was chosen for this study because it allows digital communication in urban and rural areas with broad coverage. The 1800/1900 MHz band was used as a short-distance high band in urban areas, and the 850/900 MHz long-range band was used in rural areas. GPRS is a GSM for broadband cellular transactions and connects to the internet.
The SIM7000E (SIMCom Wireless Solutions Co.) is a modern GSM/GPRS variant. SIM7000E is a tri-band LTE-FDD and dual-band GPRS/EDGE wireless module that supports LTE CAT-M1 (eMTC) and NB-IoT. SIM7000E was designed for low-latency applications suitable for machine-to-machine (M2M) applications such as measurement, telematics, asset tracking, and remote monitoring [54]. Data delivery in AQIMoS refers to the basic IoT model, which consists of sensor, network, and application layers. Figure 4 shows the stages of data collection and processing using the AQIMoS at the sensor layer. The network layer receives the data sent by the device via GPRS. Finally, the application manages the data in the last layer and reaches the end-user.

E. SOFTWARE ARCHITECTURE
Communication between the primary microcontroller and other hardware modules is an essential requirement for AQIMoS devices to operate as ordered. Therefore, the Arduino program code for AQIMoS was built based on a block algorithm, according to the specific function of each module. The code consists of several main stages: configuration, network initialization, GPS data and timing capture, sensor data, JavaScript object notation (JSON) data format, and packet transmission via GSM/GPRS. First, the configuration stores and changes variables such as the device ID, data transmission interval, and access points accessed by smartphones via Wi-Fi ESP8266 ( Figure 5). The stored variables were used to adjust the operation of the Mega 2560 to match the specified configuration. The configuration was built using the Serial Peripheral Interface Flash File  System method by storing the HTML and CSS files in ESP8266 extra flash memory. Second, the initialized network contained a command to connect AQIMoS to the GSM/GPRS network. Third, the extracted timestamps and GPS data were retrieved in National Marine Electronics Association (NMEA) format. Fourth, all sensors were read and compiled into the JSON format. Finally, the data are sent via the Transmission Control Protocol/Internet protocol (TCP/IP), waiting for a response from the provider and central server, and evaluating the data transmission ( Figure 6).
AQIMoS can send data such as time, device location, and pollution level via GSM/GPRS to a particular application server or database via the TCP/IP protocol in JSON, as shown in Figure 7. For all the gas parameters, the keys are still provided with a default value of zero. However, this study was limited to ISPU parameter measurements of NO 2 , SO 2 ,   CO, PM 2.5 and PM 10 . This was intended to accommodate the addition of the gas parameters measured in further work. Table 3 presents details of the JSON structure. The measurement result data stored in the database can be accessed by users using a front-end application.
The time required for one cycle of data transmission depends on the time it takes for a sensor to read and send a packet. For example, AQIMoS transmits data continuously without fixed intervals. Weather, PM, and gas readings were performed for 1 s each time. Therefore, the weather sensor required three readings, whereas the PM and gas sensors required 100 readings. The readings were then averaged to reduce the noise. Once collected, data were sent over the GSM/GPRS network using the TCP/IP protocol.
The signal quality can be expressed using the received signal strength indicator (RSSI). The RSSI is often equivalent to the power measured by the receiver [55]. However, several factors can affect RSSI values measured by the receiver. These factors are reflection, diffraction, signal sources, the dynamic environment, and obstacles in the path of radio signal waves. Mo et al. [56] reported that RSSI is a significant packet loss indicator in wireless sensor networks.
As shown in Figure 6, the main subroutine is a part of the program that runs continuously. However, some commands require a response from the service provider, such as the AT+CSQ, AT+CCLK, AT+CGATT, AT+CIPSTART, AT+CIPSEND, among others. The response time (t resp ) varied depending on the strength of the RSSI signal. The RSSI stability in outdoor conditions can be affected by temperature, humidity, obstacles, multipath fading effects, distance between the transmitter and receiver, and other noises [18], [57], [58]. Therefore, a digital filter was applied in this study as a simple moving average (SMA) to process the RSSI readings and help interpret them into more reliable data. SMA is suitable for reading RSSI owing to its simplicity despite its settling and response delay [57]. The SMA was used to filter out unwanted noise from the raw RSSI data. The SMA works by taking n RSSI readings to produce an average RSSI reading. Mathematically, the SMA is expressed as follows: where z is the raw RSSI value, N is the number of data points before filtering, and y is the filtered RSSI, which is categorized into two groups, namely, signals with good strength (medium/excellent, ME) in the 50-100% range and signals with inadequate strength (medium/bad, MB) in the range of 0-50%. Figure 8 shows the algorithm for executing AT commands on an SIM7000E modem. The response time limit (t LR ) is the maximum time required to wait for a response after executing the AT command. If a response is obtained when t resp is less than t LR , another AT command (j = 1, 2, 3 . . . , n, where n is the last AT command) is automatically executed by first setting t LR for the AT command. If the response is not received even though t resp has exceeded t LR , the same AT command will be re-executed m times without the t LR setting. It then continues with another AT command, if a response is received.
Suppose that a response is not received. In this case, it automatically returned to the initial command from the main subroutine. It is calculated as the data loss in the data transmission cycle and impacts data transmission. Thus, the time spent executing AT commands and waiting for a response will contribute to latency. In other words, this method is nonadaptive (NAL) to variations in t resp value. Based on the above problems, this study proposes a simple data transmission algorithm for the SIM7000E modem that behaves adaptively (AL) to variations in t resp values. As shown in Figure 9, the adaptive mechanism of the proposed algorithm updates the t LR value owing to changes in t resp . First, the initial t LR is provided as the default to wait for the AT command response. The response obtained when t resp is less than t LR reduces t LR in the next sending cycle by a specific time increment (i.e., X ) based on the AT command (j = 1, 2, 3 . . . , n). Reducing the t LR value (t LR − X ) has an effect when the response is not received, accelerating the stage of repeated data transmission. However, if the response is not received when t resp is greater than t LR , the t LR value increases by X (t LR + X ) at the repeating stage of the AT command (i = 0, 1, 2, 3, 4, . . .). The iteration stage of the AT command should be limited to finite iterations, and the variable m is proposed as the maximum iteration limit corresponding to the response time limit and a specific time increment as follows: When the response fails, the iteration repeats the AT command if i is less than or equal to m (i = 0, 1, 2, . . . , m). In this study, for a maximum of three iterations (m = 2), t LR was determined to be 2000 ms based on the response time of AT commands varying from 500 to 1500 ms, such as ''AT+ CGDCONT?;CGREG?;+CPSI?'' and ''AT+CGATT=1,'' and X is specified in simple algebra, as in (2). Based on the data transmission diagram of the adaptive algorithm, a linear adaptive model was proposed as follows: where t LR is the default maximum time to wait for a response after executing the AT command, X is a specific time increment, X positively increases t LR when data transmission fails in the previous transmission cycle, and X is negative when Algorithm 1 presents the pseudocode of the adaptive program. The output is a command to update the response time limit on the following data transmission cycle. The adaptive algorithm begins by initializing several variables such as the index for iterations, specific time increments, response-time limits, maximum iteration limits, time markers, and RSSI. Next, the maximum iteration limit was defined, RSSI was filtered, and a specific time increment was defined. Finally, the response time limit was updated, and the latency and packet loss were determined.
Two AT commands are directly related to sending data using the TCP/IP communication protocol in one data transmission cycle: CIPSTART and CIPSEND. Table 4 lists the response times of the two AT commands. For example, in AT+CIPSTART with single-IP mode, the maximum t resp reaches 160 s, whereas the maximum t resp on ''AT+CIPSEND'' to get a ''>'' response is 645 s. If the response time limits are set close to both response times, the transmission cycle of the data will be very long, and it will not be possible to set the interval in the future. Therefore, in this study, the initial t LR values in the adaptive and nonadaptive algorithm programs for AT+CIPSTART and ''AT+CIPSEND'' are each set at 1.5 s and 2 s. The adaptive algorithm updates the t LR according to the conditions by adding and subtracting using a specific time increment.

F. POWER MANAGEMENT
The voltage regulator powered the AQIMoS from a 12 V/7200 mAh valve-regulated lead acid battery. A solar panel with a peak power of 10 watts and maximum voltage of 22 V charges the battery when there is sufficient sunlight. A PWM solar charge controller was used to regulate battery charging, current loading, and battery overcharging.
The power consumption of AQIMoS is intended for use in microcontrollers, modern GSM/GPRS, weather sensors, gas sensors, particulate sensors, regulators, and other electronic components. Maximum power consumption occurs while reading the sensors and transmitting data through a cellular network. The problem with the SIM7000E GPRS modem is related to the need for power supply. Regular modem operation requires several tens of milliamperes, but opening the socket and sending data require a current of approximately 1-2A in milliseconds [59].

G. SERVER AND DATABASE
Servers run on cloud systems managed by Amazon Elastic Compute Cloud (Amazon EC2). The system is run on a Docker basis; thus, it can be automatically reactivated if the server is suddenly down and scaled to improve performance.
The back-end server system was built using the Go programming language, which receives data from a device, processes it, and stores the data in a database. Data processing was performed on the server using the pollutant concentration formula for the air quality index [60].
In addition to running the back-end system and database, the server ran a real-time monitoring dashboard built using HTML, CSS, and JavaScript programming with the ReactJS framework. The dashboard was also integrated with the Google Maps Navigation application to display the measurement location. In addition, as shown in Figure 10, users can easily view the values of all measured parameters on the dashboard via a mobile browser.

H. PERFORMANCE ANALYSIS
System performance measurement is carried out to determine the performance quality of AQIMoS based on quality-ofservice parameters, such as latency and packet loss ratio. Latency determines the time required to transmit data from the transmitter to the receiver. Distance, physical media, and long processing times affect latency. Latency is calculated as the difference between the time the device sends data (P sd ) and the time the server receives data (P rd ) in seconds, as shown in (4). AQIMoS and its servers refer to coordinated universal time (UTC) as a standard of uniformity of seconds to measure the latency. Equation (4) can be used to estimate the latency between the GSM module and the server. latency = P sd − P rd (5) Packet loss is a parameter that describes the ratio of the number of failed packets received by the receiver (P L ) to the total packets sent by the transmitter. Packets may be lost if the signal strength received at the receiver is lower than the radio sensitivity [61]. The percentage of data packets lost is the ratio of the number of packets that failed to receive the total data sent (P TS ), as shown in (6).

Packet Loss Ratio
AQIMoS always maintains a record of the data packets sent to determine the number of packages sent by the device within a certain period. During the same period, the server logs also show the number of data packets received. The difference between the number of data packets sent by the device and those received by the server is used to calculate the percentage of packet transmission failures within a particular data transmission period.

I. AIR POLLUTANT STANDARD INDEX (ISPU)s
The determination of the daily air quality status is based on ISPU calculations according to Indonesian standards, as shown in (7) [21]. The server calculates the index of pollutant concentration sent from AQIMoS using Table 5 to determine the two breakpoint values, which include the observed concentration (C p ).

I p = I Hi − I Lo BP Hi − BP Lo C p − BP Lo + I Lo
where BP Hi and BP Lo are concentration breakpoint that is the higher and lower than or equal concentrations of the air pollutant, I Hi and I Lo are the AQI values corresponding to those concentration breakpoints, and I p is the AQI values corresponding to pollutant concentration p.

III. IMPLEMENTATION AND RESULTS
The measurement results are presented in the following section. The results show the calculated power consumption, latency, and packet loss ratio. Power consumption observations were carried out at 50 ms intervals using the INA219 sensor module in a separate system. The SIM7000E module works in the GPRS mode, and the ripple current usually reaches 2 A that occurs in a short time of approximately 577 µs, and this phenomenon may not be observed. The signal received by the SIM7000E modem is listed in the RSSI as a unitless number with values ranging from 0 to 31, as presented in Table 6. Signal strength is obtained by executing ''AT+CSQ=?.'' To test the performance of AQIMoS data delivery, the RSSI filtered using SMA was expressed as a percentage to simplify the interpretation of the signal strength during the test.

A. POWER CONSUMPTION
Power consumption is measured during data transmission in the JSON format, where the data size for each transmission cycle is 689 B and 265 B for the body message and header, respectively. In addition, a power meter was installed on the supply line of the SIM7000E module between the input voltage pin and ground to determine the power consumption profile in the transmission process.
The data transmission cycle starts by checking the signal strength (AT+CSQ) until the termination of the TCP connection (AT+CIPCLOSE). The power measurement starts when AQIMoS is turned on, until the data are sent to the server. However, it is interesting to discuss the power consumption during data transmission. As shown in Figure 11, the current ripple appears as some AT commands are executed and messages are received from the server. Current and voltage ripples were recorded using INA219 every 100 ms from 13:27:00:04 to 13:28:00:04 (1-min) for one data transmission cycle displayed in real-time on a computer. Simultaneously, AQIMoS was monitored using a serial monitor to display the executed AT commands and retrieved messages. The most significant current ripple occurs when SIM7000E initiates a TCP connection, sends header and body messages, receives HTTP responses, and terminates the connection. After a study was conducted [49], the larger the data packet sent, the longer it takes for transmission and the greater the power consumption. Figure 12 shows the difference in the current and voltage ripple patterns from the AQIMoS simulation, which can initially send data but suddenly does not receive a signal and fails to transmit data. The simulation is carried out by removing the antenna on the SIM7000E module so that AQIMoS is ensured that it does not get a signal by getting ''99'' feedback on the AT+CSQ command. As shown in Figure 12, AQIMoS does not receive a signal and there is no current  ripple (950000-2100000 ms). However, a small spike of tens of milliamperes is caused by some AT commands still being executed, such as AT+CSQ and AT+CIPSHUT, to disable GPRS PDP context and AT+CGATT for activation and deactivation of GPRS service. Finally, the antenna was reassembled at 140000 ms, resulting in a signal detected (AT+CSQ response not ''99'') and entered a transition state. Subsequently, AT commands for connection to the GPRS service network and data transmission can usually be executed, and an appropriate response can be obtained from the service provider or server.
The power consumption of the AQIMoS device was monitored to determine the power requirements of the system. As shown in Figure 13, the power consumption of the AQIMoS devices is in the range 280-410 mA, and this value is much greater than the power consumption only for the data transmission module. PM sensors and fans are the primary sources of power consumption, whereas gas and weather sensors add only a negligible amount. However, the power consumption of the system is the result of the accumulation of the power consumption of all electronic components, in contrast to that of the AQIMoS device. The daily intensity of sunlight during the test affected the output voltage of the solar panel, which subsequently affected the charging of the battery by the solar panel. Figure 14 shows the charge-discharge cycle of the battery based on the ability of the solar panel to harvest solar energy. During the day (06.30 AM to 05.30 PM), solar power is harvested in stages with a solar panel output voltage of 21.25 V. However, at night (06.00 PM to 06.00 AM), the solar panel output voltage is only hundreds of millivolts. Therefore, under cloudy and rainy conditions, battery charging is hampered, and the battery cannot be fully charged at the battery voltage level on June 15, 2022, which did not return to the same battery level as the previous date. Rainy and cloudy conditions during the day for several hours significantly affect battery charging, making it difficult to reach full conditions (12.8-13.0 V).

B. TRANSMISSION PERFORMANCE
In this study, to test the performance of the adaptive algorithm, the AQIMoS prototype used in rural and urban areas to obtain RSSI readings on SIM7000E was in the medium/bad (MB) and medium/excellent (ME) categories. Achieving these conditions is important for determining the performance of the AQIMoS prototype of the adaptive algorithm under both conditions. VOLUME 10, 2022 The tests were performed using two AQIMoS devices (A and B) designed with the same PCB, electronic components, and voltage source specifications. The test was carried out in two sets, where each set was repeated three times with each repetition for 30 min for each ME and MB signal condition to avoid bias in the test results. The AQIMoS-A device programmed with the adaptive algorithm (AL), named AQIMoS-A-AL, and the AQIMoS-B device programmed with the nonadaptive algorithm (NAL), named AQIMoS-B-NAL, were tested simultaneously in the first test set. In contrast, the second set of tests was performed by setting AQIMoS-A as NAL and AQIMoS-B as AL. Fig. 15 shows the results of the first test under the MB cellular signal conditions. Figure 15a, 15c, and 15e show a comparison of the latency by AQIMoS-A-AL and AQIMoS-B-NAL under signal conditions, as shown in Figure 15b, 15d, and 15f for U1, U2, and U3.

1) FIRST TEST SET
Tables 7 and 8 summarize the statistical analyses of the signal levels and latency from the first test set in the MB category. In the MB signal category, the signal level received by the two AQIMoS devices fluctuated in the signal-reading range presented in Table 6. Fluctuations in the signal received by the device caused variations in t resp , affecting the fluctuations in the data transmission latency during the test. In AQIMoS-A-AL devices, changes in t resp can cause the t LR value to be set higher or lower than the initial value, thereby affecting high and low latency. Therefore, the measured latency of the AQIMoS-A-AL device can be smaller or larger than that of the AQIMoS-B-NAL device, as presented in Table 8.  The total amount of data transmitted by AQIMoS-A-AL and AQIMoS-B-NAL differed for each replicate, as shown in Figure 15g. For example, in the U1, U2, and U3 repeats, the total amount of data sent by AQIMoS-A-AL was 132, 134, and 132, respectively. The total data sent by AQIMoS-B-NAL to U1, U2, and U3 were 128, 146, and 140, respectively. The difference in the total data transmitted by the device in each test was due to the different signal reception conditions in each trial. Meanwhile, the difference in the total data sent between AQIMoS-A-AL and AQIMoS-B-NAL in each replication was owing to the adaptive algorithm adjusting the t LR value such that it was possible to obtain a response, although the first AT command execution failed. Meanwhile, in the nonadaptive algorithm, the t LR value is constant, although the AT command execution is repeated three times at the end. Consequently, the response is still not obtained.
The packet loss ratios of AQIMoS-A-AL for tests U1, U2, and U3 were 0.8%, 3.0%, and 2.3%, respectively. Meanwhile, the packet loss ratios of AQIMoS-B-NAL for the U1, U2, and U3 tests were 4.7%, 21.9%, and 14.3%, respectively. The most significant packet loss ratio occurred in the AQIMoS-B-NAL U2 test of 21.9%, where the percentage was mainly due to failure to receive responses from AT+CCLK and AT+CGSINF. Fig. 16 shows the results of the first set of tests in the ME category. Figure 16a, 16c, and 16e show a comparison of the latency by AQIMoS-A-AL and AQIMoS-B-NAL under signal conditions, as shown in Figure 16b, 16d, and 16f. Tables 9 and 10 show the statistical analyses of the latency and signal levels. The average signal level received by both devices in each replication was relatively stable, ranging from 82.1% to 86.8%. The average latency of both devices was lower than that of the MB signals.  In the ME signal category, t resp has a lower value of t LR so that the transfer between AT commands becomes fast, causing the time required for data transmission to be faster. In AQIMoS-A-AL, the adaptive algorithm updates the t LR value to half of the initial t LR value if the response is obtained when the t resp value is less than the t LR value. The narrowing of the t LR value is owing to the expectation of a decrease in the signal, resulting in a t resp greater than t LR , which causes the timeout to be achieved faster and the t LR to be updated.
The packet loss ratio analysis was based on the total data sent by the AQIMoS device to the data-acquisition system, as shown in Figure 16. At each iteration, the AQIMoS-A-AL device had a smaller packet loss ratio than that of the AQIMoS-B-NAL device. This is because adaptive algorithms can update t LR when the expected response fails or receives an unexpected response. This adaptive mechanism can increase the probability of AQIMoS-A-AL obtaining the expected response with a smaller packet loss ratio than the AQIMoS-B-NAL devices. However, when comparing the packet loss ratio in the MB signal category, the packet loss ratio between the AQIMoS-A-AL and AQIMoS-B-NAL devices in the ME signal category was insignificant. This is because under ME signal conditions, the t resp recorded by both devices was shorter than the t resp recorded during the MB signal conditions.

2) SECOND TEST SET
The second set of tests was conducted to validate the performance differences between AQIMoS devices with and without the adaptive program. In the second test, the AQIMoS-A device initially inserted with the adaptive program was set as a nonadaptive device and named AQIMoS-A-NAL. In contrast, the native AQIMoS-B program, initially inserted with a nonadaptive device, was configured into an adaptive device, AQIMoS-B-AL. Figure 17 shows the results of the second test on the MB cellular signal conditions. Figure 17a, 17c, and 17e show a comparison of data transmission latency by AQIMoS-A-NAL and AQIMoS-B-AL under signal conditions, as shown in Figure 17b, 17d, and 17f for U1, U2, and U3 repetitions. Tables 11 and 12 summarize the statistical analyses of the signal levels and latencies of the AQIMoS devices. The average signal levels received by both the devices were the same for each repetition. However, the reception rate of the AQIMoS-A-NAL signal fluctuated during the U3 repetition. Therefore, the AQIMoS-A-NAL latency on U3 fluctuated owing to the fluctuations in the signal received by the device.
As shown in Figure 17g, the packet loss ratio analysis indicates that the AQIMoS-B-AL device has a lower packet loss ratio than AQIMoS-A-NAL because the AQIMoS-B-AL device embedded with an adaptive algorithm can update the t LR value when t resp becomes more extensive owing to the deteriorating signal. Relaxation of the t LR results in increased latency and waiting time to increase the possibility of a response being received by AQIMoS-B-AL, causing the packet loss ratio of AQIMoS-B-AL to be higher than that of AQIMoS-A-NAL. A constant t LR value cannot increase the probability of data transmission owing to changes in t resp value, particularly when t resp increases.   Figure 18 shows the results of the second test for the ME signal category. Figures 18a, 18c, and 18e show the results of the AQIMoS-A-NAL and AQIMoS-B-AL latency tests, respectively. Figures 18b, 18d, and 18f show the signal levels obtained during the tests. The experimental results show that the signal levels received by AQIMoS-A-NAL and AQIMoS-B-AL were not significantly different based on the statistical analysis presented in Table 13. Nonetheless, the signal level fluctuated during the test, as shown in Figures 18b, 18d, and 18f. Fluctuations in the signal level received by both devices cause t resp to fluctuate and potentially affect the latency. Figures 18a, 18c, and 18e show that the actual latencies recorded by AQIMoS-A-NAL and AQIMoS-B-AL fluctuated during the test. As shown in Table 14, the statistical analysis results indicate that the AQIMoS-A-NAL latency is lower than that of AQIMoS-B-AL. As shown in Figure 18g, the total number of packets sent by the two devices did not differ significantly because tresp was smaller than t LR set for AQIMoS-A-NAL and AQIMoS-B-AL. Another result is that even though the signal strength fluctuates, the AQIMoS-B-AL device can maintain the data transmission process, which is indicated by the low packet loss ratio for each repetition.  The fluctuation of the RSSI in each test is another result that needs to be discussed from the second test result. RSSI spikes still appear even though the SMA has filtered it with a 7-point data sample (n = 7). This can be overcome by using a more significant number of data sample points; however, this can increase deposition and response delays. Another alternative is to use a digital filter, such as the Kalman filter, which has a better noise reduction capability and lower response delay than SMA to eliminate RSSI spikes [62]. Significant RSSI changes can cause signal strength categorization errors (MB or ME category), especially for signal strengths of approximately 50%, affecting t LR . However, a significant difference in the performance of adaptive and non-adaptive algorithms is shown in the packet loss analysis under MB conditions, where devices with adaptive programs have a lower packet loss than non-adaptive devices.  Meanwhile, there was no significant difference in packet loss under the ME conditions of the two devices. However, in MB conditions, AQIMoS devices tend to be constrained to send packets and receive responses compared to ME conditions because at low RSSI levels, there is a decrease in the data rate and an increase in packet loss [19], [61]. Therefore, on nonadaptive devices, packet loss in the MB condition experienced a significant increase compared to the ME condition. For adaptive devices in the MB and ME conditions, there is a t LR adjustment by adding and subtracting certain time increments that can reduce packet loss but can increase latency, which is a weakness of the linear adaptive model, especially in MB conditions. In the future, to anticipate these weaknesses, RSSI readings with different levels of variation will be adaptively filtered with different filtering levels to build a graded RSSI classification method (above or below 50%). The RSSI categorization can be used to determine the specific time increment value for each RSSI classification and build an adaptive mechanism for determining the t LR .

C. PERFORMANCE TESTING
The AQIMoS field test to show the ability of the device to measure pollutants in real-world conditions, a simple setup was performed, i.e., the AQIMoS deployment location for testing was determined in an area close to Atang Senjaya Airport, Bogor City. This location was chosen because it has a high level of traffic owing to the large number of motorized VOLUME 10, 2022 vehicles, especially diesel trucks carrying sand, as shown in Figure 19. In addition, safety, and permit placement of the monitoring equipment during the test were considered. The complete experimental results regarding the application of AQIMoS require further testing.
Pollutant sensor data sent from AQIMoS to the server were downloaded using a web application and averaged into hourly data, as shown in Figure 20. The average hourly pollutant concentration data were used to determine the fluctuations in the concentration pattern change in the measurement time range. To determine the daily air quality status during the measurement, the pollutant concentration was averaged every 24-h from the start of the measurement onwards. The 24-h average concentration was used to calculate the air pollutant standard index (ISPU) to obtain the ISPU category. The ISPU for June 13-14, 14-15, 15-16, and 16-17, 2022, were 66, 82, 60, and 72, respectively, of which the first three ISPUs were dominated by PM 2.5 and the last ISPU by PM 10 . Thus, all the air quality statuses based on the ISPU category were moderate.
The critical technical point in determining the location of air quality observations using AQIMoS is another interesting point to discuss, considering the range of cellular signals that support GSM/GPRS communication. AQIMoS placed in an area with no cellular signal cannot connect to the internet and fails to send packets to the server. Therefore, from the outset, locations to monitor the availability of cellular signals must be identified, considering environmental aspects such as industrial areas, mining areas, and congested urban roads. The device can be used anywhere if a cellular signal is available.
The development of remote monitoring technology, which is becoming increasingly advanced along with the implementation of the Internet of Things, has increased the use of modems and the expansion of cellular networks available in remote areas. This has positively impacted the development of modern GPRS technology that can implement TCP/IP protocols and is supported by general input and output, the Modbus protocol, and GPS, which can be integrated with controllers capable of static or mobile monitoring systems.
However, in contrast to its advantages, the GPRS modem has disadvantages related to the operational cost of data transmission. This problem becomes more prominent and severe owing to the number of nodes deployed. An alternative solution to reduce costs is to set a data-transmission interval. In the future, this interval setting can also be adjusted according to the supply voltage level to adaptively reduce the power consumption. However, this solution must be studied with respect to the temporal resolution of air quality data. Another solution is to use a GPRS modem as an interface for the entire wireless sensor network, as proposed by Gutiérrez et al., Wang et al.,and Schiavo [63], [64], [65]. Wireless sensor networks can be built using radio communications such as Zigbee, LoRa, or Wi-Fi protocols.

IV. CONCLUSION
This paper develops and tests a linear adaptive model for the RSSI signal at the AQIMoS (Mobile Air Quality IPB Monitoring System) sensor node based on GSM/GPRS cellular communication. The proposed model can adaptively adjust the response time limit based on the RSSI and response-receiving status to improve data transmission performance. The results show that by applying the proposed method, devices with adaptive programs have a much lower packet loss ratio than nonadaptive devices, especially when the signal level is below 50% (MB). However, at signal levels below and above 50% (ME), there are conditions where adaptive devices have much greater latency than nonadaptive devices because of the repetition of the data transmission process and added response time limit with a specific increment time. In the future, it will be necessary to categorize signal strength based on variations in RSSI so that several other signal categories can be tested to increase the effectiveness of setting the response time limit. In addition, digital filters can also use the Kalman filter, which has a better ability to reduce RSSI noise and a lower response delay than the moving average. Moreover, performance tests must be conducted in the long term to demonstrate the stability of the overall system performance.
ARIEF SABDO YUWONO received the B.S. degree in agricultural engineering from Bogor Agricultural University, Indonesia, in 1989, the M.Sc. degree in environmental sanitation from Universiteit Gent, Belgium, in 1996, and the Ph.D. degree in bioenvironmental engineering from Universitaet Bonn, Germany, in 2003. He is currently a Professor in civil and environmental engineering at the Faculty of Agricultural Engineering and Technology, IPB University. He was an Air Quality and Noise Expert, an Air Emission Expert, and an Environmental and Agricultural Specialist. His research interests include environmental monitoring, environmental instrumentation, and water and air pollution quality controls.
I. DEWA MADE SUBRATA received the bachelor's degree from Bogor Agricultural University, in 1986, the M.S. degree from Shimane University, Japan, in 1995, and the Ph.D. degree from the United Graduate School of Agricultural Sciences, Tottori University, Japan, in 1998. He is currently an Associate Professor with the Department of Mechanical and Biosystem Engineering, Faculty of Agricultural Engineering and Technology, IPB University, Bogor, Indonesia. His research interests include automation and robotics in agriculture.
SUPANDI received the bachelor's degree in metallurgical engineering from the Industrial Military Academy, in 1982, and the master's degree from Satyagama University, in 1995. He is currently a Co-Researcher in environmental engineering from the Unilab Perdana (Environment and Calibration Laboratory). He is also the Chairman of the Indonesian Society for Standardization and the Founder of the Indonesian ISO Expert Association. His research interests include environmental monitoring, instrumentation, and control systems.
HUSIN ALATAS received the B.S., M.Sc., and Ph.D. degrees from the Bandung Institute of Technology, Indonesia, in 1995, 1998, and 2005, respectively. He is currently a Professor with the Physics Department, Faculty of Mathematics and Natural Sciences, IPB University, Bogor, Indonesia. He is also the Head of the Theoretical Physics Division, IPB University, where he is also the Executive Secretary of the Center for Transdisciplinary and Sustainability Sciences (CTSS). His research interests include the theory and modeling of photonic crystal-based sensors. He is also a member of the Indonesian Center for Theoretical and Mathematical Physics (ICTMP), the Indonesian Optical Society (InOS), and Optica (formerly OSA). VOLUME 10, 2022