MAQS is a system for collecting, storing and displaying measurements of air pollution and meteorological parameters in real time. It is based on internet cloud, as shown in
Figure 2. The software components of MAQS are designed using open source projects. The code for server, which is responsible for direct communication with sensors, is developed in-house and written from scratch in C++ plus programming language with significant use of Boost library [
5]. It is highly optimized, state-of-the-art asynchronous code designed to be flexible and scalable. In order to test the scalability of MAQS server code, a simulator was created to test the performance of MAQS server under the concurrent activity of many thousand sensors, and the results were outstanding: MAQS server worked well even on Raspberry Pi 3 single board computer (i.e. with very limited hardware resources). In reality, MAQS server uses Ubuntu Linux operating system installed on a mid-range desktop PC (Intel Core i5-4460 with 6 GB of DDR3 RAM). The measurements are stored in a database. We use open source relational database PostgreSQL [
6]. Clients with appropriate permissions can access the database using SQL queries.
MAQS sensors represent the most important component of the system. We have developed two generations of sensors:
Any combination of sensors from first and second generation is supported by our server. Communication between sensors and server is implemented using our own protocol and TCP/IP connection. This choice is crucial to achieve the reliability and robustness of the system. In reality Wi-Fi connections are unstable (particularly at some of our locations of measurements) and we can’t afford to lose data because of that. TCP has mechanism of retransmission: if data packet is damaged or lost it will be resent. In case of total connection loss, the measurements are stored locally in the RAM memory of the sensor microcontroller (or SD card if available). After the connection is reestablished, all stored data will be sent to the server and stored in MAQS database.
2.1. Particulate Matter Sensor
The choice of particulate matter sensor for the MAQS project was the most important decision. We previously evaluated PM sensors for mobile measurements [
3], and found suitable sensor for this project: PMS5003 (Plantower, China). Apart from being the low-cost sensor, PMS5003 demonstrated surprisingly good correlations with reference measurements of PM
under conditions of strong urban pollution in Bosnia and Herzegovina, which is illustrated in
Figure 3. In order to verify performance of PMS5003 sensor, we organized campaign from DEC/2/2019 until MAR/2/2020 with reference (gravimetric) measurements of PM
concentrations. Sampling was performed with a Gemini sampler (Dadolab, Italy) with air flow rate of 2.3 m
/h. The sampling started at 12:00 (local time, CET zone) each day and ended at 11:58 the next day. Two minutes were reserved for automatic filter exchange. Particles were collected on quartz filters with diameter of 47 mm. The filters were carried out through a stabilization and weighing procedures strictly according to the requirements of the standard EN 12341:2014. In this campaign PMS5003 produced coefficient of determination
with reference measurements (for daily average concentrations of PM
), and performed better than more expensive OPC-N2 (Alphasense, UK) sensor [
9]. The absolute values are overpredicted by PMS5003 , mostly due to effect of the hygroscopic growth of aerosols as we explained in details [
9]. However, this behavior is suitable for corrections, especially if take into account good linearity of the sensor and no observable time drift in the long-term use [
9].
PMS5003 is one of the most analyzed particulate matter sensors. Numerous studies are dedicated to laboratory and field tests of PMS5003. It was tested in [
10] using laboratory and field tests where high bias of PurpleAir (PMS5003) was observed. In [
11] PurpleAir (PMS5003) was analysed for 16 months in Charlotte, North Carolina, USA, against BAM-1022, and high bias of PurpleAir (PMS5003) that increases with humidity was reported. High mean bias of (PMS5003) was reported in [
12] as well.
The PMS5003 sensor uses Mie scattering theory to determine PM concentrations. Mie theory provides the solution of the Maxwell equations for the scattering of plane waves on spherical particles [
13]. Laboratory tests of [
14] and [
15] are particularly important for understanding the limitations of PMS5003. According to these tests, two major limitations of PMS5003 are:
it can’t detect properly coarse particles (especially those larger than 2.5 m) because most particles miss the focal point of laser beam. When this happens for large particle, it is incorrectly sized,
strong wind can obstruct sensor’s aspiration, depending on the wind direction relative to the sensor inlet.
The reason why PMS5003 works so well in Sarajevo, when urban pollution is strong, is that none of these two conditions apply: during temperature inversion periods there is no wind under inversion layer, and mass spectrometry of the particles shows that contribution of coarse particles is very small. In our campaign [
9] we simultaneously measured PM
and PM
concentrations using reference gravimetric method, from 12/2/2019 until 03/12/2020, and calculated that PM
makes 87% of PM
mass. These are favorable conditions for the Plantower sensor. However, when spectrum of PM contained large number of coarse particles, such as the Aralkum desert sand observed in Sarajevo on 03/27/2020, the PMS5003 performed poorly (Alphasense OPC-N2 was much better in this scenario) [
9]. But these desert sand episodes are not frequent in Sarajevo, while the pollution from combustion dominates most of the time, so the overall conclusion is that PMS5003 is indeed optimal sensor for this project.
Apart from these general observations of PMS5003, each sensor is additionally calibrated (
Figure 4). All tested sensors show the same trends, but there is slight difference in their readings (acknowledged by the manufacturer in data sheet). As we explained in [
9], we propose correction of raw readings from the sensor using steady (seasonal) calibration coefficients, determined for each sensor individually. These corrections can be linear for concentrations of PM
up to 300
g/m
. Above 300
g/m
(which is rare situation even in Sarajevo) we observed non-linear effects, so the quadratic corrections fit better. We don’t recommend calibrations using floating correction coefficients (for example based on instantaneous value of ambient air humidity), because such procedure inserts noise into results since effective hygroscopic growth coefficient depends on composition of particles. Furthermore, internal structure of the sensor and self-heating effect represent additional uncertainties in such approach [
9]. It is known that PMS5003 readings show dependence on relative humidity but less than predicted by simple hygroscopic growth theory [
16].
It would be useful to test enclosures with some kind of humidity regulation, which is our future task. We already demonstrated effectiveness of in-house developed diffusion dryer, but it was applied to different class of instrument - portable aerosol spectrometer 11-D (Grimm, Germany) [
9]. Promising results of development of dryers for low-cost sensors were reported in [
17] and [
18].
In the MAQS system calibration is implemented at the database level. When a new measurement arrives, it is stored in the main table (without corrections). At the same time, the calibration trigger calls special function which corrects the measurement based on the parameters from the calibration table. Corrections with three parameters (linear and quadratic polynomial) are supported in real time (apparently any correction can be applied in post processing). The corrected value is calculated and saved in the appropriate table. Hourly and daily averages are also recalculated. In this way, users have calibrated measurements in real time.
Each MAQS sensor has PMS5003 inside, while other sensors are optional.
Table 2 shows physical quantities which have been measured using MAQS system. Enclosures for MAQS sensors are designed and produced in-house. Basic enclosure is produced using 3D printer (
Figure 4), while advanced enclosure requires machining as well (
Figure 8). Measurements of optional quantities can be calibrated the same way as PM concentrations (they have their own entries in the MAQS calibration table).
MAQS is not the only project of this type. For example, PurpleAir network is often discussed [
19]. However, combination of sensors, vertical measurements for temperature inversion research, live pollution map (based on modified IDW algorithm) and non-linear real-time corrections make MAQS unique.