Design of a Smart Sensor Network System for Real-Time Air Quality Monitoring on Green Roof

The research on the green roof is of great importance in the field of urban beautification and improving ecological effect. According to the previous research, plants have shown a significant impact on the absorption of particulate matter (PM2.5) in the air. Therefore, it is justified that the appropriate planting design or some particular combinations of plants can be considered as a solution, dealing with the urban PM2.5. This paper presented a work in progress on developing wireless sensor networks (WSN) system based on a prototype wind tunnel, which is used for the simulation of the green roof. Several data collection processes are handled by this system, where the concentration of PM2.5, wind speed, temperature, and relative humidity are obtained and stored in the database simultaneously. Additionally, users are able to real-timely define their commands in detail, controlling the sensor’s height through a GUI on the website. Experimental and simulation results and measurements have verified the validity of the wind tunnel module as well as the reliability of the sensor network. The system can be operated on thousands of devices when the packet delay maintained in a low level.


Introduction
In 2014, 92% of the world population were living in places where the WHO air quality guideline levels were not met, especially for the particulate matter with diameter equal or smaller than 2.5 micrometers, which acts as a major environmental risk to health [1].Therefore, it is urgent to look for ways to mitigate the PM2.5 pollution [1].Green roofs become popular in urbanized area to fight air pollution.Green roofs, referred as roofs with planted vegetation on top of buildings, not only have aesthetic and economic benefits but also have been proved to be an effective way to mitigate air pollution [2].Particularly, green roofs can be used to reduce the particulate matter in the air as shown in one study that one square meter green roof can remove the particulate matter generated by a car [3].
However, until now, there are not many field measurements on the green roof filtering effect on air-borne particles.Most of measurements were conducted in the wind tunnel with artificial aerosols, whose structure, density, and thus dynamics will be significantly different from natural particulate matter.Therefore, one of the main purposes of this study is to design a portable wind tunnel system to monitor the roof vegetation performance on air cleaning under different meteorological conditions outdoors.
Most related research projects are generally based on the theoretical mathematical models [4], whose simulation accuracy relies on the verification from field or lab experiments.However, they cannot be well controlled to obtain the results under the desired environment.On the other hand, the lab work often uses the artificial aerosols, whose shape and dynamics are different from natural aerosols.In addition, other wireless sensor system solutions based on the similar projects such as in [5,6] did not take the duplex control into consideration, which sometimes is essential when the settings of the sensors need changing from time to time to adapt the change to some circumstances of the environment.The duplex control designed in the system enhances the flexibility and facility of the structure.Moreover, extensibility of the whole system is considered as well.Several solutions presented in the literature such as in [7] provided a limited design concept of the extensible structure of the system.When the growth in the variety of devices is connected to the server, further needs of throughput of the whole system would be driven, which reflects the extensibility of the system especially the choice of the data transmission protocol [8].In the light of these, a wind tunnel system with the functionality of real-time sensor measuring as well as the duplex control was designed.It is suitable for outdoor use especially the scenario of the roof in urban to study on the actual process of pollutants' movement.
The paper demonstrates the development of a robust data acquisition as well as remote-control system for a wind tunnel design that monitors in-air PM2.5 concentration, temperature, relative humidity, and wind speed at both terminals of working section in the wind tunnel.Wireless sensor networks (WSN) are selected as the solution to deal with works including integrating sensing, data processing, packet formation, and wireless transmission, which are attributed to the combination of a cluster of low costs but easily deployed nodes [9].Each unit of the monitoring system can be freely joined or separated from the network and adjusted independently, which is designed in parts to meet various demands.
In this project, a real-time environment measurement monitoring, duplex communication, and control system are built, which are connected to a prototype outdoor wind tunnel so as to simulate complex environmental changes that occurred in the urban outdoor space.The system itself can be applied to urban environmental monitoring.Additionally, the prototype wind tunnel can also be regarded as a microsystem utilized in the research process, creating a convenient research environment on how the effectiveness of the green roof is influenced by the different plant species combination.
The primary contribution of this paper are as follows: (i) A remotely controllable sensor network system used to monitor the environment of a green roof is deployed in a wind tunnel.The sensors equipped in the system include a temperature sensor, a relative humidity sensor, inhalable particle sensor, and the anemometer.All of these sensors can be remotely controlled to adjust their positions, which enables us to monitor a green roof environment actively and quantitatively.
(ii) An extensible server and a user-friendly front for data analysis are used.The server interacts with the sensor network via an Asynchronous JavaScript and XML-(AJAX-) based Web application.The data will be collected and stored in MongoDB every second.A user-friendly graphical user interface (GUI) is developed to facilitate data analysis and remote sensor control.
The remainder of this paper is structured as follows: Section 2 describes the hardware architecture of the whole system including the wind tunnel as well as developed wireless sensor system, listing specific components and their specifications.Section 3 describes details of the software design and comprehensive comparison, and analysis of choices in each par is also included.Section 4 presents experiment, and Section 4.2 presents the results.Finally, the conclusion is brought in Section 5.

Hardware Architecture
2.1.General Overview.The module of the proposed system is briefly described in this section as presented in Figure 1.The ambient sensors act as a stand-alone device, which measures the level of the fine particulate matter (PM2.5) in the air.As another influencing factor, wind speed is measured by a portable intelligent wind speed measuring instrument.The humidity coupled with temperature data is recorded by AM2301.The acquired information is sent to the Wi-Fi module via the UART after the formation of the data packet.Simultaneously, acquired data is available to be displayed on a local LCD screen unit, where 8 rows data text representing for data collected from both terminals of the wind tunnel are shown.When the device is power on, users will receive the real-time data with visualizing numerical and graphical values through the website at a remote location.As shown in Figure 1, all sensors together with other peripheral devices such as the LCD are attached to a core microcontroller where the data are concentrated and are communicated to the Wi-Fi module via USART.The specifications are listed in Table 1.Considering that outdoor environment may exacerbate aging of the device, the STM32F103VET6 is selected, equipping on the advanced Cortex-M3 kernel in ARM, which has a right balance between high operating speed  Journal of Sensors and robustness [10,11].Moreover, the cost of minimum system design is represented as another essential criterion implemented in this project.When STM32F103 controller is used, the cost leads this system design to be suitable for mass production.Furthermore, the program occupies 72% of flash memory and 4.2% of SRAM.All related sensors are attached to the MCU, operating simultaneously.All sensors are chosen to respect a reasonable range and requirement of accuracy.

Hardware
In test environments, sensors for environmental data measurement work continuously, passing information to the MCU, where the packet is formed and transmitted to the host computer once per second.
2.2.2.PM2.5: Wind Speed Sensors.The TSI DUSTTRAK™ II 8530 aerosol monitor was selected for the measurement of the in-air PM2.5 concentration.It can monitor PM2.5 concentration between 0 and 500 μg/m 3 , where real data is translated to a voltage level between 0 and 5 V proportionately (analog signal).It is essential that the level of PM2.5 is possibly affected by the change in temperature and humidity of the outdoor environment.Furthermore, the wind speed may also have an indirect effect on temperature and humidity derived from the agency of plant.The Kanomax Anemomas-ter™ 6036 was chosen to do the wind speed measurement (±0.1 m/s).Corresponding data is recorded by the core chip through a group of ADC channels.After filtering, signals experience the conversion from analog to digital.Due to the fact that stm32F103Vx is equipped with three 12-bit ADCs which share up to 16 external channels, they perform conversions in a relative fast speed, which aids stability when the core is dealing with an abundant supply of sensor data.Because of the 1-wire bus digital transmission, cable wiring work of the sensor node becomes more flexible [12].Meanwhile, the antinoise performance of the whole system is further enhanced with the help of insulating and damageprotecting cover.
2.2.3.Temperature and Humidity.The AM2301 digital sensor is a product integrated with 1-wire digital bus and temperature and relative humidity sensor, which has industrial reliability.
Its measuring range is 0~100% for relative humidity and 0~50 degree Celsius for temperature, showing the positive agreement with the typical situation of the atmospheric environment.Therefore, collected data is returned more effectively.
The check bit is applied on the final inspection of a read, where the read error can be avoided.In addition, because AM2301 acts as a typical representative of the device based on 1-wire bus communication pattern, another technical property of AM2301 minimizes its impact on the working system.Its function is merely triggered by receiving a special signal from the microprocessor based on the established telecommunication protocol.Therefore, the stability of the system has been further guaranteed.
2.2.4.Wireless Module.The wireless module performs all the data which exchanges between different nodes.A stand-alone wireless 802.11 b/g/n networking module, the ESP8266EX Wi-Fi chip, was chosen for sending the measurement data to the broker configured in the cloud via the Message Queuing Telemetry Transport protocol [13,14].The slave computer, MCU of STM32f103, uses Universal Asynchronous Receiver Transmitter (UART) to reach the connection to the wireless transmission module.It talks in baud-rate 115200, to further realize wireless transceivers of data collecting and motor controlling.According to the requirements of low power consumption of the devices which work outdoors for extended time, the performance of energy consumption of the Wi-Fi chip should be considered.The ESP8266 provides three working modes, which, respectively, correspond to different scenarios: Deep sleep forces all of the components except for the RTC (real-time clock) module of the chip to pause working.The chip can wake up from the deep-sleep state at each set interval of time to upload data.In modem sleep mode, the chip will be automatically woken up each time before the next Beacon arrives.The sleep time is determined by the DTIM Beacon interval time of the router.In this way, ESP8266 can stay connected to the Wi-Fi during sleep mode and receive the interactive information from the MQTT server.Light sleep is similar to the modem sleep mode.The only distinction between them is that the chip in light-sleep mode cannot respond to the signals and interrupts from peripheral hardware ports or the server.Since real time is one of the main requirements of the WSN system, apparently, the deep-sleep mode cannot reach it.ESP8266 will not be in keep-alive connection under this mode, which means that the packet loss rate will be high [5].With regard to the light-sleep mode, if the mode is applied in, the chip would suspend the internal CPU (central process unit), which results in much less consumption of power than the modem sleep mode together with not receiving any packets from the MQTT server.Therefore, the proper way to apply a low-power resolution in the system is to utilize its modem sleep mode in the aspect of Wi-Fi chip.The system can respond to the external interruption as the occasion demands including the UART, bridge between ESP8266 and STM32, and the MQTT processing unit.It would not be affected with over average 30 mA compared to the normal mode.The transmission mechanism and the details about the MQTT protocol along with the message format will be presented in Section 3.  A pinion and rack mechanism is supported by a pair of type-42 step motors located at both the terminals of the wind tunnel to support the functionality of duplex control.Figure 2 shows the overview of core functional circuit board which was designed in Altium Designer.The PCB (Figure 3) was double-sided.All components including the MCU, Wi-Fi module, power circuit, and pins for LCD were on the top layer, and the bottom layer was used for traces.The wind tunnel design and the established mechanical structure are demonstrated in Figure 4.The precision of pinion and rack mechanism through minimizing the spacing between each measurement was considered to increase the accuracy of the data.The rack size is maintained to the minimum, in order to have a better control through the step motor.On the other hand, to ensure enough air-tightness, the structure of the elevator screw was abandoned, which may cause a large hole on the side of the tunnel.Detailed explanation will be specified in the experiment part.

Software Design
3.1.General Overview.The flow diagram of the main routines is presented in Figure 5.As one of the most common applications employing a large number of wireless sensors, WSN model is the archetype of this system.All environmental sensors together with the LCD work as input, and they are connected to STM32 via different protocols such as SPI, 1-wire bus, and UART.The MCU sends the monitoring packet, messages consist of header, order, data contents, direction, CRC (cyclic redundancy check), and the end of frame observing the designed data transmission protocol, via USART at PA9 (TX) to ESP8266, the Wi-Fi module, according to an established period (1 second by default) which can be set on the website.A timer interrupt is implemented in the STM32, which is responsible for the function of this part.When the wireless module is first used, it should be initialized and configured, including connecting to the gateway (router) together with setting the key information such as host IP, PORT, user name, and password concerning to the MQTT connection.
These actions can be triggered off while resetting or powering up the device via pressing the button on the board.Once the ESP8266 receives messages sent from STM32 via USART, the MQTT client configured in the Wi-Fi module will send out the message momentarily.Another important mechanism applied in the system is the MQTT (Message Queuing Telemetry Transport).Numerous applications utilize the MQTT such as health care, monitoring, and energy meter.The MQTT protocol represents an ideal messaging protocol for the M2M (machine to machine) communication in WSN since it is able to provide routines for small, low power, and low memory devices in unstable and low bandwidth networks [15].
The MQTT server, also commonly called "broker," is configured and bound on the cloud, which provides publishing/subscribing message transportation among (or between) devices that configure an MQTT client.The website backend implemented with node-JS and ESP8266 configures an MQTT client in their internal system.

Information Processing.
In this section, the main information processing as well as details about data transmission protocol parts are described.
The collected ambient sensor data are sometimes not of accuracy or even get corrupted results due to inherent errors and random errors in the system.These unreliable readings should be well coped with.Data packet formation and processing take place at each ambient data transmission cycle.The core data transmission protocol used in the sensor network is MQTT.
3.2.1.Data Smoothing and Reduction of Noise.Unstable sensor hardware, internal inaccuracy of hardware units such as ADC progress, and clutter during collecting lead to the data noise to some extent.The system explores a method from the perspective of software, specifically, the moving average filter method which can alter the significance level.
The MCU collects the sensor data and combines them into the message packet every second (by default).By applying the moving average filter method, the continuous data would be balanced so that the measurement noise can be reduced.
Take the temperature data as an example.The system takes the continuous 6 values where the length of the queue is fixed.Each time a new sample of data is added to the queue, the origin data of the queue would be thrown out as shown in Figure 6.The MCU would compute the citation error at each cycle, if the result is over than the preset threshold, it would obtain and update the calibrated value by calculating the weighted average value of the 6 values (including the latest one) in the queue.

Journal of Sensors
The random error can be handled to some extent which improves the real-time performance.
3.2.2.Packet Formation.The main data packet formation takes place at every one second (by default) in the MCU, which means the packet is created at the same rate as the MCU sends it out.Also, it is created on the cloud (web back end) whenever the control order is triggered.There is another kind of special data packet, which is created in the MCU whenever an error happens during the data transmission.The main packet consists of six parts, and the whole content is in string format.These describe the settings of the measurement results or action commands.
The specific fields of each part in a main data frame are shown below.
(i) Frame header: fixed as "AA." (ii) Function: the function field is filled according to the specific action such as setting "00" to represent the function of controlling the device.
(iii) Frame data: if the function is sensor collecting, the frame data is passed from all the sensors including temperature and humidity sensors AM2301, PM2.5 sensors.The field stores the specific numerical values.If the function is to control the device, the field will store the crucial information concerning to the specific action commands.
(iv) Identifier: the identifier comes from the MCU, which represents the whole collecting and duplexcontrol system.Each stand-alone system is unique as it would be put on the roof, and for each ID of the entire system, there is a corresponding location stored in the database.
(v) End of frame: fixed as "ZZ." (vi) Cyclic redundancy check: the CRC is used to detect error such as accidental changes to raw data [16].
The CRC is combined in the frame, and the receiver can judge whether the CRC matches the data.If the data does not match the CRC, then the frame would be discarded which ensures the stability of data transmissions to some extent.
(vii) Figure 7 shows the frame packet format.

Transmission Protocol.
The Wi-Fi standard was used to accomplish the part of wireless sensor data transmission since the application scenario, roof of buildings in city, is not large where the wireless node can associate and send messages directly via the access to the router in the building.
The success of Wi-Fi technology has even catalyzed many city administrations to build city-wide Wi-Fi coverage.Therefore, some more complex routing protocols such as ZIGBEE were not taken into consideration.The protocol chosen for data transmission was MQTT, which is a lightweight TCP/IP-based publish-subscribe protocol.Compared with other transmission protocols such as UDP, MQTT utilizes the publish/subscribe pattern to provide transition flexibility and simplicity of implementation [15].Also, MQTT is suitable for resource-constrained devices since each message header can be as short as 2 bytes to minimize the network traffic.To improve the stability and reliability of the whole system, three levels of quality of service (QoS) are used since conditions of wireless connection differ from each roof of the buildings.In accordance with the various connection requirements, the corresponding QoS level can be configured which costs the system low computational resource usage in a weak network condition.
According to the requirement of real-time integration approach to data as well as the potential needs of big data, the extensibility of the system is also of significance.The mode of Sub/Pub realizes a flexible interface, which means each time a client publishes a message on a particular topic, all the clients' devices (including the client configured in the cloud) that have subscribed to the same topic can receive this message.
The broker, regarded as the key component that completes the transfer process by which one-to-many connections are enabled, is portable to be configured on different platforms such as a server with more capacity.

Web Front and Back End.
Considering the accessibility of this monitoring system for the green roof, a website was particularly designed and established to visualize the data acquired from the multiple sensors on which real-time data is displayed and an up-to-date dynamic line chart is rendered accordingly as shown in Figures 8 and 9.The data collected is also stored in the database for further retrieval and analysis.Moreover, for the purpose of collecting adequate data simulating various scenarios and better analyzing while piloting the system, the website added support for manipulating the mechanical parts of the sensors in wind tunnel model through the control panel, controlling the sensors to alter their positions and collect the corresponding data.

Front End.
Despite the fact that the front end did not act as an indispensable role in the implementation of the overall system, it defines how the experiments' data is visualized.In this system, the design of the web's front end enables users to monitor the data of all sensors remotely and most importantly in real time.Evaluating the principles as human-computer interaction design approaches described [17], we elaborately designed the user interface as well as the operation logic of the web to make it more intuitive and userfriendly.For instance, particular snippets of JavaScript code enable users to manually specify/set the frequency of the dynamic line chart updating or even temporarily freeze the chart to inspect the current trend of the sensor data.Due to the utilization of AJAX technology, the latest data transferred Figure 6: Sketch of data queue using smooth algorithm.6 Journal of Sensors from the back end can be displayed dynamically without the need of refreshing the web page which guarantees the instantaneity and accuracy of the data as further analysis requires.

Back End.
The last main component is the back end of the website which undertakes the concrete core tasks including receiving the messages from the sensors while storing the preprocessed data in the database simultaneously and feeding them to the front end when invoked.Furthermore, it also acts as a crucial part in initiating a request for hardware manipulation in wind tunnel model.We were confronted with several choices when deciding the appropriate structure for the back end of the website.Ones using PHP, JSP, and Node.JS are all examples of the current trending structures, and each of them has its own superiority and drawbacks.At the very beginning, PHP was picked as the back end solution for the primary model of the website due to its convenience of deploying.However, keeping subscribing MQTT messages consumed much memory and server resources, giving rise to latency to be reckoned with which compromised the accuracy, reliability, and promptness of the data.
Therefore, we reconsidered the overall structure of the website and the choice of framework for the back end.According to experimental results acquired from a benchmark test, PHP and Node.JS performed at virtually the same level when "Hello World" module, which was a fundamental module to build an adequate web server, was requested by a total of no more than 100 users at the same time, both handling about 3000 requests.However, when the number of multiuser access reached 200, Node.JS still can handle about 3500 requests while PHP could only handle 500 requests per  second, leading to the case that Node.JS was virtually 7 times faster than PHP, and the difference was even more dramatic with the increase of users.The result gave rise to a conclusion drawn by the experiment researcher that PHP was only suitable for applications of small scale and middle scale while Node.JS was an ideal choice for I/O intensive website applications which to some extent matches this project's requirements considering the extensibility and real-time performance of the entire system, and further demonstration is clarified in the experiment part.

Experiment and Simulation
Elaborated experiments were carried out in a particularly designed wind tunnel model to simulate the complicated situations that might occur in real applications and to justify the overall effectiveness of the prototype, the monitoring system for the green roof, spotting the potential need for optimization in the process.

Experimental Setup.
A wooden wind tunnel which has three parts including an air intake part in shape of a big trumpet with convergence from the inlet entrance to the head of working section, a cylindrical part with 20 centimeters of diameter and 100 centimeters of length, and an adjustable suction auxiliary system was designed and produced as shown in Figure 4.The suction system consists of a velocity-regulating motor-driven fan which can control the range of simulated wind speed in the tunnel to keep constant between 0 and 15 m/s.The PM2.5 sensor is installed under the lever.The wind tunnel was set on the balcony in the Environmental Science Department at the Xi'an Jiaotong-Liverpool University.
The underlying surface part in the cylinder is the main experimental space in the apparatus.The PM2.5 concentration and other sensor values are measured at the beginning and ending of the working section.
There was a total of three sets of comparison experiments to justify the feasibility of the system by measuring the PM2.5 absorption capacity of plants under separate circumstances, using the same kind of plants with different leaf area indexes (LAI) [18], under different wind speeds, and under different weather conditions which represent different conditions of temperature and humidity.Due to the fact that the distribution of PM2.5 in the air is nonlinear and presents an irregular density, we define the following formula as a metric to describe the flux of PM2.5 flowing through the cross section of the two sides of the working section and to further track the quantity of PM2.5 absorbed by plants.
where Q (μg/s) represents the mass flow rate of PM2.5, which passes through a wind tunnel cross section S (m 2 ) with PM2.5 concentration of C (μg/m 3 ) and wind speed of V (m/s).PM2.5 concentration is collected at the average height of the leaves of the plants, where the position of a sensor implemented by the duplex control and S has the value of 0.3 square meters.After obtaining the value of Q, it would be practical to acquire the quantity of PM2.5 absorbed by plants by calculating the difference between the amount of PM2.5 at the head and end to justify the absorption capacity.Considering the complex influence factors in the test, Ophiopogon japonicus, with a less complex contour shape to be calculated for LAI, was chosen to be the experimental plant [19].Before the start of the experiment, we carried out a pretest, in which PM2.5 measurement is exempted from the influence of the apparatus and the wind tunnel walls itself by not placing any plants in the working section to minimize the error.The comparison of Q values obtained at head and end of the working section is shown in Figure 10.The area inside the curves represents the PM2.5 absorbed by apparatus during 2 hours with 10 m/s of wind speed.The cause of this effect is considered in follow-up experiments.
The position of a PM2.5 sensor in each of the test, flexibly controlled by web page due to the functionality of duplex control, should be fixed to minimize the effects of different measuring angles on the entrance.Since the experimental subjects are plants and most PM2.5 was absorbed by the area of dense leaves, the standard position of the measuring sensor we regulated was at the plants' average height.We compared the PM2.5 values measured at different positions under similar environmental conditions to testify the theory and the functionality of duplex control as Figure 11 displays.The pretest was carried out continuously to compare the effects of different measuring positions of the sensor.It is apparent that data collected at the average height of the plants have shown a more dramatic change over the position at the top of tunnel, which can reflect the conclusion of the numerical simulation more intuitive.
To justify the capability of the overall system, we also simulated the situation in which 5000 devices sent and received sensor data simultaneously.
The sampling rate of data transmitted in the whole system is configured to one sample per second by default, which can be customized to any interval value greater than the default value.
For the purpose of collecting more accurate data, the system has added support for timer configuration, where sensors can be set to automatically patrol at multiple heights for certain different periods of time.
Each experiment dedicated to testing and verifying one influencing factor lasted for 2 hours in consideration of the changing environment affecting elements such as different kinds of flowing particles in the air especially under the unstable weather conditions in Suzhou, the city where we processed the experiment.

Result Analysis.
The leaf area index (LAI) is an important parameter to describe how plant populations use the resources as well as the efficiency of capturing the particles, and it can be calculated by the formula below [18].The leaf area measurement is based on the LI-3000C portable meter which utilizes an electronic method of rectangular approximation to provide 1 mm 2 resolution.

LAI =
S leafarea S ground 2 The experimental result for the effects of LAI is shown in Figure 12.The scale of left y-axis represents the Q condition at the head of working section while the right one represents the real-time value of delta Q which can be obtained by adding all the differences of Q values (measured at head and end of the working section) at each second.Under the same conditions of environmental factors, working section with a higher LAI performs a better ability of PM2.5 absorption.Two curves below the diagram have indicated that the absorption rate of PM2.5 gradually reaches a local minimum point over time, then tends towards stability and shows a modest growth.The experiment was operated under the condition of 10 m/s wind.Additionally, leaves will experience procedures of washing and drying in the clean room during the time gap between experiments.We wiped and dried the surface of the wind tunnel in order to minimize the interrelationship between each group of experiment.
As the demonstration of Figure 13, the displayed realtime data in the situation of LAI = 2 indicates the extent of impact on the absorption rate caused by different wind speed conditions (5 m/s/10 m/s).This is evident: the experiment showed the same trend of delta Q as its counterpart in the LAI experiments.With other equal conditions, the PM2.5, however, is better absorbed under the high-speed wind condition, which agrees well with the real measurement revolving around wind speed and PM2.5 absorption in the ambient environment.
It is complicated to analyze the relationship between the PM2.5 absorption behavior by plants and the weather.However, temperature and relative humidity are main effect elements which can be the dependent variables in tests.Three typical groups of data are chosen for the illustration of PM2.5 absorption circumstance under different weather conditions as shown in Figure 14.Data was recorded in a three-month experiment time span when the weather condition of the high T&RH difference has been experienced.Abnormal measurements were eliminated by moving average algorithm on the software and hardware level.
In the light of the application of WSN, it is essential for the system to satisfy the real-time requirement [20].Therefore, corresponding packet delay tests were conducted in situations where the levels of QoS in MQTT data transmission are different.The subject in the test is the MQTT publisher whose packet delay performance can be simulated via JMeter-MQTT, a third-party open source that helps do the load testing [21].We created a JMeter plugin which provides the configuration element interfaces that allow virtual clients to register the server.The result of the test is  9 Journal of Sensors shown in Figure 15.Obviously, the latency of packets has a positive correlation with the level of QoS [22].Nevertheless, in the situation of experiments and simulation, a higher level of QoS set in transmission will exactly result in a more serious latency.Simultaneously, the value of QoS, however, has the positive correlation with the stability of communication.Thus, the QoS level for the green roof scenario is level 1 for devices which can ensure the quality of communication as      Journal of Sensors well as achieve a relative high concurrency.In general, it has been approved by the results of the tests that the system can ensure a relative low packet delay and low packet loss rate according to the data analyzed while the number of devices is under 50,000.Because of the high extensibility of the MQTT broker, corresponding server configuration operations can be flexibly achieved according to the number of devices.Due to the fact that strategies and methods to reduce errors on both levels of software and hardware are considered at the very beginning, this proposed system is expected to achieve a higher stability and real-time performance.In addition to this, the selection of elements also owns a high-cost performance.

Conclusion
Aimed at studying on the problem of urban air pollution which is highly correlated with the excessive particular     11 Journal of Sensors matter in the air, the work develops a real-time wireless sensor system simulating the scenario of a green roof that monitors the PM2.5 and other related sensor parameters such as relative humidity, temperature, and wind speed which are based on the IEEE 802.11b/g/n standards.The main goal of the approach is to justify the stability, extensibility, and data accuracy of the prototype which was designed and tested.Considering the fact that real applications of green roofs in the city require multiple concurrent devices online, the performance in the monitoring system was elaborately evaluated and optimized for concurrent connections.And we carried out multiple experiments to examine and evaluate the system in terms of key points overall performance, latency, and accuracy of data.Also, by carefully selecting the hardware components as well as software configuration, the solution is highly effective and has a wide potential application.

2. 2 . 5 .
Mechanical Structure and PCB.Concerning that the distribution of particulate matter has a different pattern at a different height, sensors are transported to different

Figure 8 :
Figure 8: Front panel of the web application.

Figure 9 :
Figure 9: User interface to enter control commands.

Figure 10 :
Figure 10: Pretest to measure the PM2.5 absorbed by the equipment itself.

18
Head of sectionQ (휇g/s)End of section (at the top of space) End of section (at the plants' average height)

Figure 11 :
Figure 11: Pretest to verify the effects of different measuring positions of the sensor.

Figure 13 :
Figure 13: Time series representation of PM2.5 absorption measurement under the condition of wind speed: 5 m/s and 10 m/s.

Figure 14 :
Figure 14: Time series representation of PM2.5 absorption measurement under different weather conditions.
Infrastructure.The hardware infrastructure is decomposed into five parts, which is demonstrated below.

Table 1 :
The measured data., usually fixed at the average height of the plants, to measure data. heights