Trondheim municipality aims to give the inhabitants the best possible outdoors air quality and in order to make sure that measures actually work, it is important to have sufficient data of a high enough quality to work with.
NILU - the Norwegian Institute for Air Research ("Norsk institutt for luftforskning" in Norwegian - https://www.nilu.com/about-nilu/) provides high quality and high precision air quality sensors. However, these high quality sensors are rather costly and therefore cannot be placed at many locations. In Trondheim, we have four stations, three of which are owned by Statens Vegvesen (Bakke kirke, Torvet and Elgeseter) and one by Trondheim Kommune (E6 - Tiller).
In order to overcome the sparsity problem, Trondheim has placed a number of relatively cheap air quality sensors throughout the city to supplement the coverage and therewith give better insight in the air quality throughout the municipality.
On this website, we give you an example of the prototype we already have built using the data from the different types of sensors, and in the hope that we inspire you to creating a new case, we give you access to a data sample, source code that we have used, as well as details needed to build and set up your own air quality sensor network. To sum up, we provide a scientific viewpoint and give access to research results based on the Trondheim sensor data and point to funding opportunities.
The sensor network in Trondheim and the various associated projects are based mainly on collaborations between Trondheim Kommune, Telenor, Lab5e, NTNU and NILU.
Trondheim Kommunes air quality sensor project is a project where we test small and cheap sensor technology.
As small children and elderly typically are more sensitive to bad air quality, we prioritized to mount the sensors at locations such as schools, kindergartens and nursing homes/elderly care institutes in order to map the air quality at these locations. We are however not guaranteed correct data from these sensors, as we know that low-cost sensors for example give wrong readings in very foggy conditions. The sensors log GPS position, temperature, humidity and air quality data. Of course, no camera, microphone or other type of surveillance is installed.
Trondheim Kommune has developed a front end for displaying air quality values, which can be found here http://luftkvalitet.tipcloud.trondheim.kommune.no/ . As each sensor has a built in GPS, the locations are plottet on a map. We have associated the sensors to location names, typically named of the schools, etc., where the sensors are mounted.
The colour of the pin indicates the status of the sensor. Green for relatively recently received data, orange if its less than two days since last message and red otherwise. When clicking each sensor we show exact time for last received message. We have dynamic positioning by using the coordinates of the last received message from the sensor. This allows us to have moving sensor without having to change anything.
When you click the pins, you get the detailed information for this location, including zero or more pictures to show where and how the sensor is mounted, as well as time series data on PM, gasses and temperature/humidity levels delivered by the sensors.
The time series data can be shown by the past 24 hours, the past week, month, or a date range specified by the user. An explanation on the readings is available under the "i" symbol. Averages are displayed, as well as the upper bounds for the air quality.
In the next section, we explain the technical background so you can learn how air quality sensors readings become machine-understandable, and thereafter human-understandable.
The image below gives an overview of the different components as well as the data and information flow from sensor to the website. On the left hand side you see "air" coming into the system, it gets measured by sensors, who in turn convert these measurements in machine readable data, which is transmitted via NB-IoT (Narrow-band IoT) to an air quality server. This server makes the sensor data available via an API, from which the data is pulled into a database owned by Trondheim Kommune. At this place, the sensor data is contextualized with among others location information and pictures, also the data is converted so it can easily be used by the front-end, a website aimed to the general public.
Raw measurement data is processed before it is shown in graphs. The processing is handled differently for dust and gas data as sensors behave differently. Below, we explain how we process the data prior to plotting.
In a given time-span (1 day, 1 week, 1 month or custom) the average of the measured values PM10 (small to fairly large particles) and PM2.5 (small to medium-sized particles), is calculated in intervals. The size of each interval is one day on timespans above one week, and one hour for 24-hour timespans. These values are shown in a bar graph. Each bars height represents the PM10-values, however the bar also has a different color up to a given height that represents the PM2.5-values. This is because all the PM2.5 particles are part of the PM10 dataset. We also include an horizontal line that displays FHI (The Norwegian Institute of Public Health) daily maximum for PM2.5 and PM10 particles.
In a give time-span (4 hours, 1 day, 1 week, 1 month or custom) we calculate the average of the gases NO2, NO and O3. These values are approximately the average of a 1-hour period for time-spans of 1 day or above, or 15 minutes in the 4 hour time-span. The sensor often give negative values (in reality this isn't possible). We have experimented on what gives the most correct end-result, and it turned out that dropping the negative values gave a better result than lowering the zero point or to set the negative values to zero.
The values of the graphs is the average of the positive values from the sensor. We are displaying the gas values in a line chart. In addition we are showing FHI hourly maximums for NO2 and O3 as a horizontal line. The data from the sensors are retrieved as PPB (parts per billion), though we wish to present them as µg/m³ since this is the most common form to present the values. We calculate these with constants that are correct for exactly 25 degrees Celsius and 1 atmosphere pressure. The constants we multiply the values with are 1.88(NO2), 1.25(NO) and 2(O3). In the future we plan to use temperature data from external sources and use a more exact formula for the conversion.
In some cases, the GPS data is received as 0. When that happens, we simply substitute the value with the previous non-zero reading.
In this section we describe how you can get access to the data both from NILU sensors as well as the TKAQ sensors.
Source code and APIs for the various parts of the Trondheim Kommune Air Quality (TKAQ) project can be found here:
https://github.com/ExploratoryEngineering/air-quality-sensor-node
https://github.com/telenordigital/nbiot-go
The APIs at the AQ server and TK database will be opened for access. This page will be updated with relevant access information.
The screenshot below gives an impression of what the raw data looks like. These are the first 5 out of 1367 readings from the sensor on Trondheim Torg 15-16 October 2020. The full csv file can be downloaded here: https://data.trondheim.kommune.no/download/e6dxz/qtj/TrdTorg_r%C3%A5data_15-16-oktober.csv
NILU makes its data available through the following channels:
https://luftkvalitet.miljostatus.no/
https://api.nilu.no/lookup/stations?area=Trondheim
https://api.nilu.no/obs/utd?areas=trondheim&components=PM2.5;PM10;NOx;NO2;NO
https://api.nilu.no/aq/utd?areas=trondheim&components=pm10;pm25
https://api.met.no/weatherapi/airqualityforecast/0.1/documentation
The Norwegian Environmental agency has published a map with the air quality boundary values for Trondheim, for details (in Norwegian), refer to: https://www.miljodirektoratet.no/tjenester/fagbrukertjeneste-for-luftkvalitet/?kommune=5001&underside=luftsonekart. The site can also be used for other municipalities.
The first generation had a 12V adapter of low quality, it looked and felt rather fragile. Therefore, building owners were a bit skeptical to mounting these on their buildings. To gain more confidence, we have upgraded the power supply to be much more robust.
The air quality sensor casing contain a GPS enabled NB-IoT Sensor node for sampling NO2, NO, O3 and particulate matter.
It contains a:
Power board
EE-NBIoT-02 module
OPC-N3 particle sensor
AFE-3 Analog frontend for NO2, NO and O3 electrochemical sensors
Controller board with nrf52, GPS and ADC
For more detailed information, refer to https://github.com/ExploratoryEngineering/air-quality-sensor-node#air-quality-sensor-node
The enclosure is a 3D printed structure with air nozzles. For the full specifications, refer to https://github.com/ExploratoryEngineering/air-quality-sensor-node/tree/master/enclosure.
A TKAQ second generation sensor costs about 5000 NOK in parts.
Mounting according to the given recommendations (see below for details) and in accordance with local regulations has cost Trondheim Kommune approximately 6000 NOK +VAT per sensor when installation is performed by an electrician. This amount includes lift rental (to due local safety regulations, ladders are not to be used). The lowest amount we have spent for mounting a sensor is 3000NOK, the highest approximately 9000NOK.
You may be able to install free of cost if you are lucky to have en electricity socket at a suitable location. It is also possible to use a ladder instead of a lift and save money that way. Just make sure that whatever you do, you do this in accordance to local regulations.
The Norwegian Environmental Agency will publish a report (Norwegian language, "Rapport om mikrosensorer") on microsensors by the end of 2020. A brief summary of that report will be made available in English here.
Coverage means two different considerations, the first one being where in the city and the second one where on a building.
The environmental department in the municipality selects and prioritizes locations. Reasons for choosing a location can be vicinity to roads with heavy traffic, construction work, construction traffic, rail roads, too little AQ data coverage, neighborhoods with a lot of wood burners, and so on.
The property ownership department provides a contact person and IT-services together with the contact person take a field trip to do an inspection of the building in order to find the best placement for the sensor. Then, the contact arranges for the sensor to be mounted according to all recommendations, and as soon as the sensor is plugged in, it will start sending data.via NB-IoT.
The sensors are protected by their enclosure and are designed to withstand rocks and snowballs being thrown at it. The sensors should be placed as open as possible, preferable 3-5 meters over the surface. Enclosed corners for example should be avoided. For mounting and maintenance reasons, is convenient -though not a requirement- to place the sensor on a easily accessible place, such as near a parking space. Also, consider whether the location is convenient for mounting an electricity socket. If the location is far away from power, the extra wiring will increase the installation cost. In that case, check if there is an alternative location with good features. In addition to this, consider whether the placement is aesthetic and for example does not interrupt the line of sight for special architectural features.
The sensor should not be mounted near the buildings ventilation system intake or exhaust. It should also not be mounted directly under roof extensions or in the close vicinity of large trees. Make sure the placement is as open airy as possible, external corners are typically good locations.
The cable is 200 cm in length. The sensor casing is equipped with two mounting brackets with holes for 4-5 mm diameter screws.
Screws are not included, as the type of screws are building material specific for each building.
Please note that the casing is configured for vertical mounting on walls.
The wire outlet is to point downwards and the "Exploratory Engineering" sticker upwards in order to ensure correct functioning of the GPS module, as well as to avoid water entering the air inlets.
Make sure to note the serial number of the casing, so that the sensor can be assigned a name for its GPS location and to be able to know the location even if the GPS fails.
The package comes with an IP44-graded plug (meaning it is splash water resistant), 20cm 230V cable, a converter, 2 meters 12V cable attached to the casing for the air quality sensor.
The power supply/converter is a metal box with an IP67 rating, meaning it can be used in wet environments, and has 4 mounting brackets (maximum 4mm screw diameter) and is easy to mount. Screws are not included, as the type of screws are building material specific for each building.
It is possible to reduce the length of the 12V cable, it can be cut and reattached by an electrician. In order to reduce the length, it is important to know that the cable is fixed in a water proof casing, so the length reduction is to take place outside of the casing. Cut to desired length, reconnect the colour pairs with matching colours and waterproof the new connection. Do not open the casing, as it contains sensitive sensors and delicate and thin wiring.
After connecting the air quality sensor to a power source, it takes approximately one minute before it starts sending data.
In the overview below, you find information about the location, reason for the placement, direction, pictures and more (in Norwegian). The overview is last updated 1/12/2020.
The following projects use the Trondheim data.
Andreas Jacobsen Lepperød Master’s thesis in Computer Science: Air Quality Prediction with Machine Learning
Submission date: June 2019. Supervisor: Hai Thanh Nguyen, IDI. Co-supervisor: Sigmund Akselsen, Telenor, Leendert Wienhofen, Trondheim Municipality, Pinar Øzturk, IDI.
Norwegian University of Science and Technology, Department of Computer Science
AI4EU project (https://www.ai4eu.eu/), which has received funding from the European Union’s Horizon 2020 research and innovation program, under the Grant Agreement No 825619.
The Air Quality Pilot is described here: https://www.ai4eu.eu/ai4iot#paragraph-222
A relevant project using a similar type of low cost sensors, though without Trondheim Municipality as a partner, is iFlink: https://iflink.nilu.no/en/about-iflink-2/ .
Lepperød A., Nguyen H.T., Akselsen S., Wienhofen L., Øzturk P., Zhang W. (2020) Air Quality Monitor and Forecast in Norway Using NB-IoT and Machine Learning. In: Santos H., Pereira G., Budde M., Lopes S., Nikolic P. (eds) Science and Technologies for Smart Cities. SmartCity 360 2019. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 323. Springer, Cham. https://doi.org/10.1007/978-3-030-51005-3_7
Sigmund Akselsen, Pontus Edvard Aurdal, Kerstin Bach, João Paulo Costeira, Ilias Kalamaras, Andreas Jacobsen Lepperød, Pedro Lima, Ieva Martinkenaite, Ole Jakob Mengshoel, Arne Munch-Ellingsen, Hai Thanh Nguyen, Dimitrios Tzovaras, Tiago Veiga, Konstantinos Votis, Leendert Wienhofen, Weiqing Zhang, Pinar Øzturk. On the need for explanations, visualisations and measurements in data-driven air quality monitoring and forecasting. Paper presented at the 1st International Workshop on Evaluation and Benchmarking of Human-Centered AI Systems (EBHAIS-2019), Milton Keynes, UK, Sep 20, 2019. https://folk.idi.ntnu.no/kerstinb/paper/2019-EBHAIS-AkselsenEtAl.pdf
Ilias Kalamaras, Ioannis Xygonakis, Konstantinos Glykos, Sigmund Akselsen, Arne Munch-Ellingsen, Hai Thanh Nguyen, Andreas Jacobsen Lepperød, Kerstin Bach, Konstantinos Votis, Dimitrios Tzovaras. 2019. Visual analytics for exploring air quality data in an AI-enhanced IoT environment. Paper presented at the 11th International ACM Conference on Management of Digital EcoSystems (MEDES'19), Limassol, Cyprus, Nov, 12-14, 2019. https://folk.idi.ntnu.no/kerstinb/paper/2019-KalamaresEtAl.pdf
Tiago Veiga, Arne Munch-Ellingsen, Christoforos Papastergioupolos, Dimitrios Tzovaras, Ilias Kalamaras, Kerstin Bach, Konstantinos Votis and Sigmund Akselsen. 2021. From a Low-Cost Air Quality Sensor Network to Decision Support Services: Steps towards Data Calibration and Service Development. Sensors 2021, 21(9), 3190; https://www.mdpi.com/1424-8220/21/9/3190
If you got inspired by the description of the sensor network, though lack the funds to get started, we would like to point out that there are several options for applying for innovation/research project funding in Norway. This is a non-exhaustive list.
"Innovative anskaffelser"/innovative procurements in Norway http://innovativeanskaffelser.no/about/
NFR - The Norwegian Research Council www.nfr.no
Innovation Norway www.innovasjonnorge.no