How to explain significant difference between Smoggie and Purple Flex Humidity?

I have a Flex located outdoors directly next to a uRad Smoggie. I believe both use the same pm2.5 sensor. And sometimes I even get the same particle count :slight_smile:

But the Smoggie does not compute/report the US EPA AQI - only the raw pm2.5 count. I want to compute the AQI so I can easily compare both results.

Here is the code I use to calculate the AQI (this follows suggested code elsewhere here and from Google search AI) -

// Standard US EPA PM2.5 Breakpoints (Concentration Low, Concentration High, AQI Low, AQI High)
double[][] BREAKPOINTS = {
{0.0, 9.0, 0, 50},
{9.1, 35.4, 51, 100},
{35.5, 55.4, 101, 150},
{55.5, 125.4, 151, 200},
{125.5, 225.4, 201, 300},
{225.5, 325.4, 301, 500},
{325.5, 504.4, 501, 600} // Extended range if needed
};

int calculatePm25Aqi(double pm25Concentration) {
// Truncate to 1 decimal place
double cp = Math.floor(pm25Concentration * 10.0) / 10.0;

if (cp < 0.0) return 0;
if (cp > 504.4) return 500; // Cap at maximum AQI

for (double[] bp : BREAKPOINTS) {
double bpLo = bp[0];
double bpHi = bp[1];
double iLo = bp[2];
double iHi = bp[3];

if (cp >= bpLo && cp <= bpHi) {
double aqi = ((iHi - iLo) / (bpHi - bpLo)) * (cp - bpLo) + iLo;
return (int) Math.round(aqi);
}
}
return 500;
}

All of this seems reasonable to me. But as you can see in the screenshot below, the result coming from this computation for my outside Smoggie does NOT quite match that shown for the Purple widget - even though the pm2.5 values are identical (5).

At first I tried replacing the call to Math.round() with Math.floor() and Math.ceil() as this seems the mostly likely possible difference in an otherwise pretty well understood computation. the results from Math.floor() is closer to that shown for the Purple widget but it is still higher.

Can anyone suggest why these values do not match? Thanks

Hello. I have co-located both a Smoggie and a Purple Air Flex outdoors for comparison.

It is my understanding that the Purple Air pm2.5 readings are somehow “corrected” during its process of US EPA AQI. Further, I understand that relative humidity is used to some extent in the “correction” process.

It is not clear that the Smoggie does this or does so in the same manner. So in my effort to “compare apples with apples” I am trying to apply the same “correction” equation to the Smoggie data.

In doing so, I see that the Smoggie reports relative humidity shown as “Humidity:77.02RH”. At the exact same time, the Purple is reporting “RH: 54.00%” and this would seem to be a significant difference.

Any ideas on how I need to bring these two disparate readings into a more congruent match? Thanks much.!

I should add to this that, this morning – after initial clear skies – a huge fog rolled in here (we are proximate to the water in Puget Sound, WA USA). I notice that the outdoor Smoggie is showing RH at 81.48 and the Purple Flex is showing only 61. It happens that we had all of our windows open while this change was occurring. So both our indoor Smoggie shows 73.74 and our completely analog hygrometer shows 79. So it appears that it is the Purple Flex which is possibly off-kilter.

Ah! I now see here that this is a known issue and that the reported RH from the sensor is known to NOT reflect actual environmental conditions.

When I look at the values as mentioned:

  • Conversions for temperature and humidity developed by Lance Wallace are used in the “Estimated Temperature” and “Estimated Relative Humidity” data layers.

those values are much closer to those seen on my hygrometer and Smoggies.

Hi Dave, yes, the RH can vary pretty significantly. The Lance Wallace formula attempts to address the accuracy a bit, but it can’t completely fix the variance issue.

That said, the EPA formula used for PurpleAir sensors on the AirNow FASM doesn’t adjust values that much for RH, so changes in the RH values will typically only alter the final output slightly.

1 Like

A post was merged into an existing topic: What are the pm2.5 levels used as breakpoints on Purple Map?