Skip to main content
. 2023 Nov 3;23(21):8941. doi: 10.3390/s23218941
Algorithm 1. for air pollution spikes detection in transportation for better health
Input: Sensor data (Particulate matter levels, Temperature, Humidity, O3, NO2, SO2, CO2)
Output: Pollution level, alerts for spikes or dangerous levels
  • Step 1: Data Collection

  • Set up air quality monitoring sensors at predetermined locations.

  • Continuously collect sensor data, including readings for various pollutants such as Temperature, Humidity, PM2.5, PM10, CO2, NO2, O3, and SO2.

  • Record the timestamp for each data point.

  • Step 2: Data Preprocessing

  • Check for sensor anomalies and calibration issues.

  • Handle missing or erroneous data through interpolation or data imputation techniques.

  • Smooth the data to reduce noise using filters or moving averages.

  • Step 3: Spike Detection

  • Define a threshold for each pollutant.

  • Compare the current data by applying the Heaviside step, Direc delta, Sigmoid, and Spike functions with the threshold values.

  • If any parameter exceeds the threshold, generate an alert indicating a pollution spike.

  • Step 4: Data Reporting and Visualization

  • Display real-time or periodic pollution data on a dashboard.

  • Provide historical pollution data for analysis and comparison.

  • Step 5: Mitigation and Response

  • Implement strategies to reduce pollution sources if persistent high pollution levels are detected.

  • Step 6: Data Storage

  • Store collected data in a secure and accessible database for future analysis and research.

  • Step 7: Continuous Monitoring

  • Continuously run the algorithm, repeating steps 1 to 5, to ensure ongoing air quality monitoring.