Difference between revisions of "PSD Sensor"
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | ==Introduction== | + | == Introduction == |
− | This | + | 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 == |
− | === | + | [[File:BoSLCam front and back.png|thumb|right|300px|Front and back of BoSLCam. Orange: OV7575 camera module, light blue: SIM card slot, yellow: UART connection, grey: battery connector, dark blue: LTE and GPS antenna, red: nRF9160, purple: 23LCV1024 SRAM chip, mint: SD card slot.]] |
− | [[ | + | * 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) | ||
+ | <br><br><br><br> | ||
+ | == Methodology == | ||
+ | === Image Acquisition === | ||
+ | The core of the PSD sensor is the [[BoSLcam|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 === | |
+ | [[File:PSD image processing steps.png|thumb|right|300px|Image processing steps of a 75-90µm sample. (a) Original image captured by BoSLCam, (b) converted grayscale image, (c) image treated by Fourier Transform and high-pass filter, (d) binary mask created after applying threshold.]] | ||
+ | The image processing workflow consists of the following detailed steps: | ||
− | + | ==== 1. Image Pre-Processing ==== | |
+ | # RGB to Grayscale Conversion: | ||
+ | #* The RGB image is converted to grayscale using the following equation: | ||
+ | #*: <code>Grayscale = 0.299 × Red + 0.587 × Green + 0.114 × Blue</code> | ||
+ | #* This equation is commonly used in camera-based measurement of turbidity. | ||
+ | # 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: | ||
+ | ## Applying 2D Fourier transform to the grayscale image | ||
+ | ## Shifting the zero-frequency component to the center of the spectrum | ||
+ | ## Creating a high-pass filter mask | ||
+ | ## Applying the mask to the shifted Fourier transform | ||
+ | ## Performing inverse Fourier transform to obtain the filtered image | ||
− | + | ==== 2. Image Segmentation (Thresholding) ==== | |
+ | # 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). | ||
+ | # Binary Image Creation: | ||
+ | #* The grayscale image is converted to a binary image where: | ||
+ | #** 1 represents particle (foreground) | ||
+ | #** 0 represents background | ||
− | + | ==== 3. Feature Extraction ==== | |
+ | # 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. | ||
+ | # Particle Size Estimation: | ||
+ | #* For each labeled pixel patch (particle): | ||
+ | ## The pixel size is multiplied by the theoretical area-per-pixel value (e.g., 30x30µm for BoSLCam). | ||
+ | ## Assuming spherical particles, the equivalent spherical diameter is calculated. | ||
+ | ## 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 were conducted to assess the performance of the PSD Sensor against traditional laboratory analysis methods. The tests used standard particles of various sizes ranging from 38 to 355 µm, providing a comprehensive evaluation across different size ranges relevant to stormwater sediment analysis. | ||
+ | |||
+ | === Experimental Setup === | ||
+ | The laboratory validation test setup, as shown in Figure 1, consisted of the following components: | ||
+ | * A 3D-printed black, closed container with an openable lid for sample changing | ||
+ | * An LED backlight module (white, 3.3V, 20mA, 110cd/m²) at the bottom of the container | ||
+ | * A clear acrylic plate above the LED module to hold a shallow depth (<5 mm) of water sample | ||
+ | * The BoSLCam coupled with a 25x macro lens, mounted on top of the container | ||
+ | * The shallow sample depth was chosen to prevent particle overlapping and minimize distance-related distortions | ||
+ | |||
+ | === Standard Particles and Sample Preparation === | ||
+ | The following standard particle size ranges were used in the validation tests: | ||
+ | * 38-45 µm | ||
+ | * 53-63 µm | ||
+ | * 75-90 µm | ||
+ | * 125-150 µm | ||
+ | * 300-355 µm | ||
+ | |||
+ | Samples were prepared using deionized (DI) water dosed with these artificial particles. To ensure proper dispersion of hydrophobic particles, surfactant and anti-foam agents were added to the samples. | ||
+ | |||
+ | === Comparison with Laboratory Analyzer === | ||
+ | The PSD Sensor's performance was evaluated against the Accusizer 780 (Entegris), a traditional laboratory particle sizing system. The comparison revealed: | ||
+ | |||
+ | * Strong correlations (R² > 0.99) between the two methods for key PSD parameters (volume-weighted D10, D50, and D90) | ||
+ | * Consistent performance across various particle sizes, with some systematic differences: | ||
+ | ** Slight overestimation for particles smaller than 50 µm | ||
+ | ** Accurate measurements for mid-range particles (50-300 µm) | ||
+ | ** Some underestimation for particles larger than 300 µm | ||
+ | |||
+ | Figure 2 demonstrates this performance using a 75-90 µm sample, showing similar histogram shapes and peak locations in the volume-weighted particle size distribution and cumulative distribution plots for both methods. | ||
+ | |||
+ | Figure 3 further illustrates the correlation between the PSD Sensor and Accusizer 780A measurements across all tested size ranges. The graph shows strong linear relationships for D10 (red), D50 (blue), and D90 (green) values, with slopes around 0.70-0.75. | ||
+ | |||
+ | === Performance Considerations === | ||
+ | While the PSD Sensor showed excellent overall performance, some limitations were observed: | ||
+ | |||
+ | * The slight overestimation for smaller particles (<50 µm) is likely due to the current image resolution and quality limitations of the BoSLCam | ||
+ | * The underestimation for larger particles (>300 µm) may be partially attributed to the upper detection limit of the Accusizer 780, rather than solely a limitation of the PSD Sensor | ||
+ | |||
+ | These findings highlight areas for future optimization, particularly in improving resolution for smaller particles and extending the accurate measurement range for larger particles. | ||
+ | |||
+ | <gallery> | ||
+ | File:PSD sensor lab test setup.png|Figure 1: Laboratory validation test setup for image acquisition. | ||
+ | File:PSD results comparison example.png|Figure 2: Comparison example: volume-weighted particle size distribution and cumulative distribution plots for a 75-90µm sample analysed by (a) Accusizer 780A, and (b) proposed PSD sensor. | ||
+ | File:PSD results D-values comparison.png|Figure 3: Comparison and linear relationships of the averaged volume-weighted D10, D50, and D90 reported by the proposed PSD sensor and Accusizer 780A. Red: D10, blue: D50, green: D90. | ||
+ | </gallery> | ||
+ | |||
+ | == 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). | ||
+ | A presentation slide on this PSD sensor is avilable at: https://docs.google.com/presentation/d/1nz9B4ax-7Trgf9BWI-0MAw2LRiOo3SrO/edit?usp=sharing&ouid=118015437923291707850&rtpof=true&sd=true |
Latest revision as of 02:07, 2 October 2024
Contents
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
- 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.
- The RGB image is converted to grayscale using the following equation:
- 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:
- Applying 2D Fourier transform to the grayscale image
- Shifting the zero-frequency component to the center of the spectrum
- Creating a high-pass filter mask
- Applying the mask to the shifted Fourier transform
- Performing inverse Fourier transform to obtain the filtered image
2. Image Segmentation (Thresholding)
- 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).
- Binary Image Creation:
- The grayscale image is converted to a binary image where:
- 1 represents particle (foreground)
- 0 represents background
- The grayscale image is converted to a binary image where:
3. Feature Extraction
- 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.
- Particle Size Estimation:
- For each labeled pixel patch (particle):
- The pixel size is multiplied by the theoretical area-per-pixel value (e.g., 30x30µm for BoSLCam).
- Assuming spherical particles, the equivalent spherical diameter is calculated.
- 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 were conducted to assess the performance of the PSD Sensor against traditional laboratory analysis methods. The tests used standard particles of various sizes ranging from 38 to 355 µm, providing a comprehensive evaluation across different size ranges relevant to stormwater sediment analysis.
Experimental Setup
The laboratory validation test setup, as shown in Figure 1, consisted of the following components:
- A 3D-printed black, closed container with an openable lid for sample changing
- An LED backlight module (white, 3.3V, 20mA, 110cd/m²) at the bottom of the container
- A clear acrylic plate above the LED module to hold a shallow depth (<5 mm) of water sample
- The BoSLCam coupled with a 25x macro lens, mounted on top of the container
- The shallow sample depth was chosen to prevent particle overlapping and minimize distance-related distortions
Standard Particles and Sample Preparation
The following standard particle size ranges were used in the validation tests:
- 38-45 µm
- 53-63 µm
- 75-90 µm
- 125-150 µm
- 300-355 µm
Samples were prepared using deionized (DI) water dosed with these artificial particles. To ensure proper dispersion of hydrophobic particles, surfactant and anti-foam agents were added to the samples.
Comparison with Laboratory Analyzer
The PSD Sensor's performance was evaluated against the Accusizer 780 (Entegris), a traditional laboratory particle sizing system. The comparison revealed:
- Strong correlations (R² > 0.99) between the two methods for key PSD parameters (volume-weighted D10, D50, and D90)
- Consistent performance across various particle sizes, with some systematic differences:
- Slight overestimation for particles smaller than 50 µm
- Accurate measurements for mid-range particles (50-300 µm)
- Some underestimation for particles larger than 300 µm
Figure 2 demonstrates this performance using a 75-90 µm sample, showing similar histogram shapes and peak locations in the volume-weighted particle size distribution and cumulative distribution plots for both methods.
Figure 3 further illustrates the correlation between the PSD Sensor and Accusizer 780A measurements across all tested size ranges. The graph shows strong linear relationships for D10 (red), D50 (blue), and D90 (green) values, with slopes around 0.70-0.75.
Performance Considerations
While the PSD Sensor showed excellent overall performance, some limitations were observed:
- The slight overestimation for smaller particles (<50 µm) is likely due to the current image resolution and quality limitations of the BoSLCam
- The underestimation for larger particles (>300 µm) may be partially attributed to the upper detection limit of the Accusizer 780, rather than solely a limitation of the PSD Sensor
These findings highlight areas for future optimization, particularly in improving resolution for smaller particles and extending the accurate measurement range for larger 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). A presentation slide on this PSD sensor is avilable at: https://docs.google.com/presentation/d/1nz9B4ax-7Trgf9BWI-0MAw2LRiOo3SrO/edit?usp=sharing&ouid=118015437923291707850&rtpof=true&sd=true