PSD Sensor

From BoSL Wiki
Revision as of 01:28, 2 October 2024 by SCP (talk | contribs)
Jump to navigation Jump to search

Introduction

The PSD Sensor is a novel, low-cost camera-based sensor designed for near-continuous in-situ measurements of Particle Size Distribution (PSD) in stormwater. This sensor addresses the limitations of traditional PSD measurement methods, which are often expensive, labour-intensive, or unable to provide real-time data.

Key Features

  • Utilizes a self-developed and highly customised compact camera with a 25x macro lens
  • Employs image processing techniques for particle size estimation
  • Provides affordable (less than $100), low-power, and mini-sized solution
  • Capable of near-continuous measurements
  • Designed for field deployment in stormwater systems (work in progress)

Methodology

Image Acquisition

The core of the PSD sensor is the BoSLCam, a self-developed camera logger. Key features of the BoSLCam include:

  • Custom-designed PCB measuring 70 mm by 15 mm
  • Powered by a single 3.7V Li-ion battery
  • OV7675 colour camera module capable of capturing VGA (640x480) resolution images
  • nRF9160 chip for main microcontroller functions and LTE-M1 cellular connectivity
  • GPS location and time data acquisition capability
  • 23LCV1024 SRAM buffer for image data processing
  • SD card storage for captured images, and SIM card capability to upload images to FTP servers
  • Power-efficient design with sleep mode reducing current consumption to less than 400 µA
  • UART port for communication with external sensors and dataloggers

Image Processing

The image processing workflow consists of the following detailed steps:

1. Image Pre-Processing

  1. RGB to Grayscale Conversion:
    • The RGB image is converted to grayscale using the following equation:
      Grayscale = 0.299 × Red + 0.587 × Green + 0.114 × Blue
    • This equation is commonly used in camera-based measurement of turbidity.
  2. Fourier Transform and High-Pass Filter:
    • A Fast Fourier Transform (FFT) is applied to convert the image from the spatial domain to the frequency domain.
    • A high-pass filter with a cutoff frequency of 2 is used to mitigate background noise and enhance image contrast.
    • The process involves:
      1. Applying 2D Fourier transform to the grayscale image
      2. Shifting the zero-frequency component to the center of the spectrum
      3. Creating a high-pass filter mask
      4. Applying the mask to the shifted Fourier transform
      5. Performing inverse Fourier transform to obtain the filtered image

2. Image Segmentation (Thresholding)

  1. Threshold Determination:
    • A threshold grayscale value of 241 was determined to be adequate for the BoSLCam sample images.
    • This threshold distinguishes pixels representing particles (darker) from the background (brighter).
  2. Binary Image Creation:
    • The grayscale image is converted to a binary image where:
      • 1 represents particle (foreground)
      • 0 represents background

3. Feature Extraction

  1. Connected Component Labelling:
    • 8-connectivity is used to perform connected component labelling on the binary image.
    • This process identifies and labels patches of pixels that are grouped together, representing individual particles.
  2. Particle Size Estimation:
    • For each labeled pixel patch (particle):
      1. The pixel size is multiplied by the theoretical area-per-pixel value (e.g., 30x30µm for BoSLCam).
      2. Assuming spherical particles, the equivalent spherical diameter is calculated.
      3. Particle surface area and volume are also calculated based on this diameter.

4. Data Cleaning and Preparation

  • Particles larger than 500 µm (exceeding the proposed detection range) are excluded.
  • Histogram bins containing fewer than 2 particle counts are removed to mitigate potential noise effects, such as those caused by bubbles.

PSD Analysis

The sensor produces the following outputs:

  • Number-based (count-based) and volume-weighted particle size distribution histograms
  • Cumulative distribution curves
  • Statistical parameters such as D10, D50 (median diameter), and D90

Validation Results

Laboratory validation tests using standard particles of various sizes (38-355 µm) demonstrated:

  • Strong linear relationships (R² > 0.99) between the sensor's measurements and those obtained by a traditional laboratory analyser for key PSD parameters (volume-weighted D10, D50, and D90)
  • No significant differences in central tendency measurements for most size ranges, with some limitations observed for very small (<50 µm) and very large (>300 µm) particles

Future Work

Planned improvements and future research directions include:

  • Trialing a 100x microscopy lens to improve measurement accuracy for smaller particles
  • Optimizing the image processing algorithm and calibration method
  • Investigating the underestimation issue for larger particle sizes
  • Developing a field-ready sensor and testing with real-world stormwater samples
  • Exploring machine learning algorithms for improved particle detection
  • Investigating simultaneous measurement of other water quality parameters such as turbidity and TSS

References

For a complete list of references, please refer to the original research paper (currently not available, but contact Canwei if you are interested).