FUZZY LOGIC MODELING OF SURFACE OZONE CONCENTRATIONS Rachel Mintz June 3, 2005
OVERVIEW • Fuzzy logic • Modified Learning from Examples • Edmonton Predictive Model • Edmonton Forecast Model • NEW! Edmonton PM2.5 Model
AIR POLLUTION MODELS
Deterministic models - EPA’s UAM model chemistry - Environment meteorology Canada’s CHRONOS model - mass transport
Empirical models - Environment Canada’s statistical CANFIS model - neural networks - fuzzy logic
WHAT IS FUZZY LOGIC?
Membership Membership Membership
• • •
1 Example: Warm wind from the west. 1 0.8 Perfectly west wind = 270° 0.8 Values from 0.6 What wind from 250°? What 0.6 0.6 about 0 to 1 about 290°? 0.4 0.4
0.4
0.2 0.2 0.2 0 00 000
100 100100
200 200 200
Wind Direction Wind WindDirection Direction
300 300
300
1
1
0.8
0.8
Membership
Membership
FUZZY LOGIC: IF-THEN RULES
0.6 0.4 0.2
0.6 0.4 0.2 0
0 0.5
1.5
2.5
3.5
4.5
5.5
250
270
310
330
350
Wind Direction
Wind Speed (m/s)
TWO INPUTS: IfIf WIND WIND SPEED SPEED is is LOW MEDIUM and Wind speed and Wind and If WIND If WIND DIRECTION DIRECTION is is Direction NORTHERLY WESTERLY ONE OUTPUT: Then Then OZONE OZONE isis MEDIUM LOW Ozone Concentration
290
0.002
0.02
0.039
OZONE CONCENTRATION (ppm)
1
1
0.8
0.8
Membership
Membership
FUZZY LOGIC: IF-THEN RULES
0.6 0.4 0.2
0.6 0.4 0.2 0
0 0.5
1.5
2.5
3.5
4.5
5.5
250
270
OUTPUTS: Wind speed 4.0 m/s and Wind Deg. REDDirection and BLUE290 Rules OUTPUTS: DEFUZZIFICATION RED and BLUE Rules
310
330
350
Wind Direction
Wind Speed (m/s)
INPUTS:
290
f ( x) =
0.002
3
2
i =1 3
j =1 2
∑ bi ∏ µij
0.02 ∑ ∏ µ0.039 ij i =1 j =1
b = OZONE CONCENTRATION (ppm)
Why Use Fuzzy Logic in Air Pollution Modeling?
• Approximate solutions are acceptable. • Variables involve measurements of uncertainty or observational errors. • Input-output relationships exist but are not well-defined or even consistent. • Mathematical formulas are either unknown or complex. • Emissions inventory is often unknown.
MLFE MODEL
• Objective: Create a rule base (membership functions) to describe the system. • Experiential learning method. • Steps: – Training data – Create rule base – Test data
1
MLFE MODEL Membership
First training data point:
0.8 0.6 0.4 0.2 0 0.5
WSP = 3.0 m/s
1.5
2.5
3.5
4.5
5.5
Wind Speed (m/s)
WDR = 285 deg. 1
Output :
b1 = 0.002
0.8 Membership
Ozone = 0.002 ppm
User specified initial spread.
0.6 0.4 0.2 0 250
270
290
310
Wind Direction
330
350
MLFE MODEL
WSP = 2.0 m/s
0.8 Membership
Next training data point:
1 0.6 0.4 0.2 0
WDR = 325 deg.
0.5
1.5
Output :
3.5
4.5
5.5
Wind Speed (m/s)
Ozone = 0.02 ppm
1 0.8 Membership
If the difference Evaluate a fuzzy between the fuzzy Rule 1:for band = 0.002 Compare the fuzzy 1these output actual output next output 0.002 to the output exceed a user data inputs based on defined tolerance, then actual output 0.02 . the rule base. a new rule is added.
2.5
0.6 0.4 0.2 0 250
270
290
310
Wind Direction
330
350
1
Rule 1: b1 = 0.002
Membership
MLFE MODEL
0.8 0.6 0.4 0.2 0
Rule 2:
0.5
1.5
2.5
3.5
4.5
5.5
Wind Speed (m/s)
b2 = 0.02 Membership
1 new i 0.8 c c min − The new spread is σ new = determinedwusing either 0.6 0.4 or the max or new min distance i 0.2 c c max − centers. σ newbetween = 0 w 250
270
290
310
330
Wind Direction
350
EDMONTON PREDICTIVE MODEL • 3 Months: July, August, September. • Training Data: 2000 and Test Data: 2001 • Perfect prognosis: past meteorological events are used as inputs.
INPUT VARIABLES and TUNING PARAMETERS
• Different training data sets tested. • Input combinations tested with past ozone, temperature, relative humidity, wind direction, and wind speed. • Three and four input MLFE models. • Different initial spread specifications tested. • Maximum and minimum distance criteria tested.
BEST MLFE MODEL • • • •
City of Edmonton during the summer months. Four-Input: {Past O3, WSP, Temp, RH} Maximum Distance Criteria Range specification as the initial spread.
INPUT VARIABLES and TUNING PARAMETERS • Compare residual error: 1n 2 RMSE = ∑ ( y predicted − yobserved ) n i =1 1n MAE = ∑ y predicted − yobserved n i =1
• Compare scatter plots of observed versus predicted: – Slope – Coefficient of Determination (R2)
0.020 0.018
RMSE and MAE (ppm)
0.016
July RMSE August RMSE September RMSE
July MAE August MAE September MAE
0.014 0.012 0.010 0.008 0.006 0.004 0.002 0.000
RH Temp Past O3
Temp WDR Past O3
RH WDR Past O3
RH WSP Past O3
WDR WSP Past O3
Temp WSP Past O3
Three-Input Variable Combination
RH Temp WDR
Temp WDR WSP
1.000
July Coefficient of Determination July Slope August Coefficient of Determination August Slope September Coefficient of Determination September Slope
Scatter Plot Measurement
0.900 0.800 0.700 0.600 0.500 0.400 0.300 0.200 0.100 0.000 RH Temp Past O3
Temp WDR Past O3
RH WDR Past O3
RH WSP Past O3
WDR WSP Past O3
Temp WSP Past O3
Three-Input Variable Combination
RH Temp WDR
Temp WDR WSP
0.016 0.014
July B RMSE
July A MAE
July B MAE
July isdifferent only asets Two July BBproduces model slightly better. training data withof better performance
0.01 0.008 0.006
Four-input Three-input 0.002variable variable combination combinations 0 Temp, RH Past O3, WDR
Temp, RH Past O3, WSP
WDR, RH Past O3, WSP
Input Combinations
WDR, Temp Past O3, WSP,
0.004
Temp, RH Past O3
Residual Error (ppm)
0.012
July A RMSE
0.06
Ozone Concentration (ppm)
Observed 0.05
Predicted
0.04
0.03
0.02
0.01
0 1-Jul-01
6-Jul-01 11-Jul-01 16-Jul-01 21-Jul-01 26-Jul-01 31-Jul-01 Date
Ozone Concentration (ppm)
0.06 Observed Predicted
0.05 0.04 0.03 0.02 0.01 0 30-Aug-01
5-Sep-01
11-Sep-01 17-Sep-01 23-Sep-01 29-Sep-01 Date
SEPTEMBER EXPERT MODEL • Objective: predict highest ozone concentration. • Add “expert” training data points to clearly specify the highest ozone concentrations. • Re-construct the rule base. • 6 training data points are added : Temp high (>26C), WSP is low ( 11 ug/m3
30
MLFE Model Output Observations Edmonton East
12 Hour PM2.5 (ug/m3)
25
20
15
10
5
0 0
200
400
600
800
Data Point (Jan-Feb 2005)
1000
1200
SUMMARY • Fuzzy logic has the potential to be a very useful tool in air pollution modeling. • The MLFE model is good at tracking changes and predicting ozone concentrations. • Care must be taken in choosing the training data and tuning parameters. • The MLFE model is simple and does not require extensive computing power. • MLFE and PM2.5 (?)
FUZZY LOGIC MODELING OF SURFACE O3 AND PM2.5 Contact:
[email protected] QUESTIONS?
ACKNOWLEDGEMENTS • Dr. Svrcek and Dr. Young • Fellow Graduate Students • The University of Calgary and the Department of Chemical and Petroleum Engineering • NSERC, AIF and CEERE