The thing with Fuel SAS helps the KLM Fuel & Emission DWH
1. The thing with Fuel
SAS helps the KLM Fuel & Emission DWH
Peter Welp
SAS CC
KLM
october 6th 2010
2. Content:
• KLM The company
• SAS Competence Center
• The Speaker
• Corporate Social Responsibility
• Case: Fuel & Emission DWH
• Demo
• Closing Statement
• Sample code
2
The Thing with Fuel
4. KLM: Some Figures about 2010 (2 / 2)
• Transport Figures
– 23.000.000 passengers a year (* 92 Kg p.p.)
– 600.000.000 Kg cargo
• Did you know?
– Taking 3 Kg across Atlantic
takes about 1 Kg of Fuel
4
The Thing with Fuel
5. KLM uses many software systems for
many parts of the company
of
Maintenance ft Contro C re w P
an d Aircra llin g lannin
Engines g
Network Planning
Cateri
C argo ng Bag
ga ge
Han
dling
s
Air Traffic Reservation
Management
…
Others
Almost all of them use SAS somehow
5
The Thing with Fuel
6. Since 1979…
Looks more like
6
The Thing with Fuel
7. SAS Competence Center:
• 12 internal SAS Certified Professionals and some ext.
• z/OS as a platform ( for now ) SAS 9.1.3.
• Over 1300 maintained Batch programs
• Several SAS AF Applications
• IDP Portal and several Stored Processes Applications
• SAS ABM Solutions
• KLM is our customer, still 100 different businesses
7
The Thing with Fuel
8. Speaker
Peter Welp
KLM since 1992
Microsoft certified 2001
SAS Competence Center since 2003
SAS Certified Advanced Programmer since 2008
8
The Thing with Fuel
9. KLM Corporate Social Responsibility
• KLM regards it as its duty to operate in a sustainable manner
– KLM brings people to beautiful places, and wishes to do so in the centuries
to come.
• Recognition
– Six years in a row, Air France-KLM leads the Global Dow Jones
Sustainability Index for Travel & Leisure.
• Initiatives
– Offer easy CO2 compensation
– Top3 Youngest fleet in the world
– Cleaning engines with water
– Invest in new fuel types
– ICT Kidzz Academy
– More…
Read all about it: www.klm.com/csr
9
The Thing with Fuel
10. CSR and Fuel & Emission DWH. Why?
Social Responsibility of our paying customers
Many big companies are honouring their social
responsibility. The Fashion industries for example.
When KLM can present the exact environmental
footprint of 1 parcel or passenger, this attracts
companies and travellers.
Fuel Save
To Save Fuel is to Save the Environment…
To Save Fuel is to Save Money
10
The Thing with Fuel
11. Fuel & Emission DWH. Why?
Emission Trading Scheme
The European parliament approved the Emission
Trading Scheme (ETS) in which emission rights can be
bought and sold within the airline industry.
ETS requires Monitoring, Reporting and Verification of
emission figures since January 2010.
KLM is one of the first airlines to fully meet these
requirements with this DWH.
11
The Thing with Fuel
12. Data sources to be combined
SLS Data (Statistical Load Summary)
What is on board? (Passengers Cargo Mail)
Planning Data (LIDO)
What route must be flown, how much fuel is required?
ACMS Data (Aircraft Condition Monitoring System )
How is the aircraft performing?
– Geographical location ( GPS, Longitude Latitude )
– Timestamp
– Altitude
– Fuel usage
– Temperature, speed, wind, Engine data …
@ @ @ @ @
12
The Thing with Fuel
13. DWH Offers opportunities
• Verified Emission Report
• Optimize Extra Fuel (3Kg takes 1 Kg, the thing with fuel…)
• Comparison Planned versus Actual
• Flying to Houston north of Iceland takes 14.000kg Fuel
• Analysis per Aircraft, even per Engine
• Taxi with 3 of 4 engines saves fuel
• Support Captain-awareness
13
The Thing with Fuel
14. Where SAS comes in
Great Circle Calculations for Distance
• Moving straight north or
south is easy:
Latitude lines are Parallel
• Flying 1 degree is
60 Nautical Miles
14
The Thing with Fuel
15. Where SAS comes in
Great Circle Calculations for Distance
• Longitude NOT Parallel.
Flying 1 degree
straight East or West
• Equator 60 NM
• from Amsterdam
about 42 NM
• at the Northpole
zero NM
15
The Thing with Fuel
16. Where SAS comes in
Great Circle Calculations for Distance
distance between S (start-location of the route)
And A (a planned waypoint)…
D S , A 3437.74677 * 4 * Atn ( )
1 1 2
Lat1 Lat 2 Lon1 Lon 2
) ( ( )
where ((sin( Rad Rad )) 2 Cos ( Lat1 ) * Cos ( Lat 2 ) * (sin( Rad Rad )) 2 )
2 Rad Rad 2
SAS 9.2 provides a new function GEODIST…
16
The Thing with Fuel
17. Where SAS comes in
Emission Calculation
Emission of CO2 is Easy
1 Kg
Fuel
3.15 Kg
CO2 O2
17
The Thing with Fuel
18. Where SAS comes in
Emission Calculation
Emission of other gasses (SO2, CO, NOx and HxCy) depend on
• Fuel consumption
• type of fuel (% Sulphur, … )
• Phase of the flight
• Outside Temperature & Altitude
• Inside engine Temp, Pressure and Rotationspeed
• Correction Factors…
Air-humidity correction factor for NOX, depends on the
static air temperature:
18
The Thing with Fuel
19. Where SAS comes in
Finding ‘Holding’
A ‘Holding’ is an extra circle, because of
too much traffic ahead of the plane.
This requires extra fuel.
A Holding in technical terms, when you
have over 100 of pairs of
longitude/latitude for hundreds of
flights a day,
is a challenge to program and
a nightmare to test.
19
The Thing with Fuel
20. Where SAS comes in
• “Air Traffic Management” has a frontend which they are
familiair with.
• At the time of developing, the frontend could not display new
data yet
• SAS PROC GMAP did not provide the detail Sample Actual Route
Plotted on map
and flexibility we needed
Britain
Germany
Germany
France
France
20
The Thing with Fuel
21. • But then a colleague showed me his ice-skating trip, recorded
with his GPS-phone. Eureka!
21
The Thing with Fuel
22. Putting it al together, a demo
22
The Thing with Fuel
23. Putting it al together, a demo
23
The Thing with Fuel
24. Putting it al together, a demo
24
The Thing with Fuel
25. Closing Statement: The Power to Know
B.I. can be thought of as a clever visualization of data.
At best, any presentation is as good as the underlying data.
For over 30 years now, SAS empowers KLM to get the data
right; supporting the many departments within KLM in
running- and understanding their business.
25
The Thing with Fuel
26. /* ************************************************************/ Data _Null_;
/* Sample program demonstrating Google Earth directly from STP */ FILE xWEBOUT MOD; /* Re-open Temp output file using MOD */
/* Peter Welp for SAS Forum Netherlands , sep 2010 */ set ACTROUTE end=eof;
/* SAS Competence Center, KLM Royal Dutch Airlines */
/* to help you with KML specifics, see */ If _N_=1 Then Do;
/* http://code.google.com/apis/kml/documentation/kml_tut.html */ PUT '<Folder><name>Actual</name><open>1</open>';
/* ************************************************************/ PUT '<Placemark><styleUrl>#AR</styleUrl>';
PUT '<visibility>1</visibility><name>Route</name>';
/* A Temp file to hold STP Output */ PUT '<MultiGeometry><LineString>';
filename xWEBOUT '&temp' lrecl=1024; PUT '<extrude>1</extrude><tessellate>1</tessellate>';
PUT '<altitudeMode>relativeToGround</altitudeMode>';
/* Generate a file with Longitude and Latitude coordinates */ PUT '<coordinates>';
DATA ActRoute; end;
/* Florida, Palm Beach */
set sashelp.zipcode(where=(STATE=12 AND COUNTY=99)); /* The coordinates may not have spaces in between */
Length OneLIne $50;
CALL SYMPUT('COUNTYNM',COMPRESS(COUNTYNM)); OneLine=CATS(X,',',Y,',1000');
RUN; PUT OneLine;
/* Sort North to South, better than random scatter of points */ If EOF Then Do;
PROC SORT Data=ActRoute; PUT '</coordinates>';
BY Y X ; PUT '</LineString></MultiGeometry></Placemark>';
RUN; PUT '</Folder>';
PUT '</Document>';
/* Open document, for now in Temp file, not in _WEBOUT */ PUT '</kml>';
Data _Null_; end;
FILE xWEBOUT; run;
PUT '<?xml version="1.0" encoding="UTF-8"?>'; /* Force the browser in passing the contents to an application */
PUT '<kml xmlns="http://earth.google.com/kml/2.0">'; data _null_;
PUT '<Document xmlns:xlink="http://www.w3/org/1999/xlink">'; rc = stpsrv_header('Content-type',
PUT " <name>&COUNTYNM</name>"; 'application/vnd.google-earth.kml+xml kml');
rc = stpsrv_header('Content-disposition',
/* Color Route */ "attachment; filename=&COUNTYNM..kml");
PUT '<Style id="AR">'; run;
PUT ' <LineStyle><color>ff00ff00</color></LineStyle>';
PUT ' <PolyStyle><color>7f00ff00</color></PolyStyle>'; /* copy Temp output to the web output file, users browser */
PUT '</Style>'; Data _Null_;
RUN; FILE _WEBOUT;
INFILE xWEBOUT;
Input;
PUT _INFILE_;
RUN;