Streamlining Enterprise Emissions Reporting at a Large Oil & Gas Company

Establishing an accurate and efficient enterprise emissions reporting system can be a daunting task, especially when the system goal is to reconcile data collection and processing differences across more than 40 established plants and their more than 700 sources. That was the challenge Trinity Consultants/T3 recently faced for Saudi Aramco’s more than 40 oil and gas processing plants, large terminals, and petroleum refineries in the Kingdom of Saudi Arabia.


In support of corporate social responsibility reporting, Saudi Aramco initiated an enterprise air emissions inventory project for corporate environmental reports in the mid-2000’s. The emissions inventory includes criteria pollutants and greenhouse gases (GHG) from various types of sources as listed in Table 1.

EQ Winter 2015 - T3 Pollutants List

Historically, Excel® spreadsheets were developed to collect process source data and used emission factors from technical references. Most of the source data (e.g., fuel usage) required for the calculations are available in the various plants local process historian database system (i.e., PI System). These data were manually extracted from the process historian and entered for each plant. This method required extensive, time consuming quality assurance reviews to ensure accurate reporting. To address the challenges associated with data accuracy, the extensive resources required for quality assurance, and the difficulty of consolidating data for reporting, Saudi Aramco chose Trinity/T3 to establish and implement its centralized emissions Data Integration and Automation (DIA) system. The primary objective of DIA is to accurately perform near real time (i.e., hourly) emissions calculations using process data as well as data collected from field operations. The system also needed flexibility to expand and support various environmental reporting requirements.

Saudi Aramco’s emissions inventory system poses unique challenges due to the immense number of data transactions and calculations performed by each plant, each hour.

DIA Core Technology

The DIA© system, developed by Trinity Consultants/T3, retrieves user specified data from multiple PI system servers and pushes it to an environmental data mart (EDM) within DIA. This EDM makes historical data available for environmental regulatory compliance demonstrations. Specifically, the DIA system:

  • Integrates with process historian data:
    • Extracts ‘raw’ data from the PI system on user specified instant or averaging intervals (e.g., hourly)
    • Validates all data and flags bad data
    • Reconciles bad and missing data per user defined processes
    • Stores validated and reconciled process data in user specified locations and formats
  • Allows user data entry for manually collected data
  • Performs calculations based on user specified schedules (hourly, daily, and monthly)
  • Stores all calculated results in a user specified location and format
  • Checks system and user defined compliance limits with tag values or calculated values for performance and compliance tracking
  • Sends email notifications to users when a datum or calculated result is missing, out of range, or exceeds compliance limits
  • Generates preconfigured reports for regulatory and corporate reporting requirements

These key DIA system features significantly reduce human interactions required for process data extraction, validation, and reconciliation thereby allowing massive data volumes to be processed hourly. As an example, DIA may pull 30,000 records for 500 tags from the PI system each hour and validate all records. It then sends 500 validated averages to the EDM. Subsequently, any missing or bad data can be filled with user specified data reconciliation rules for each tag. Performing this step prior to the calculations increases the reliability of the emissions results and reduces the data intensity burden on the calculation engine.

EQ Winter 2015 - T3 DIA Architecture

Overcoming Technical Challenges

Throughout the system development and implementation process, obstacles were overcome as a result of the enormous effort required to achieve an emissions reporting system that was both reliable and verifiable.

One of the biggest challenges was establishing efficient communication among the multiple disciplines within one of the world’s largest oil companies. Project team members with engineering backgrounds in information technology (IT), PI data base systems, chemical processes, operations, instruments, and environmental all had to “speak” a common language to ensure a common understanding of the project’s goals and business requirements. Each Saudi Aramco site was subject to providing data and developing emission inventories. The effort to standardize these data and inventories across the enterprise posed a significant challenge due to Saudi Aramco’s unique operation network that connects multiple operations sites such as oil/gas wells, gas oil separation plants, refineries, and gas plants.

Optimizing voluminous data processing
To calculate hourly emissions for numerous pollutants, the DIA emission calculation engine processes a series of equations each hour. To help minimize the number of executed calculations, equations were categorized within various “tiers.” Results of lower level functions (equations) were stored in lower level tiers and used as variables in subsequent, higher level functions, thereby eliminating the repetitive and timeconsuming processes of recalculating the same formula with the same data over and over. More than 13,000 equations were created to quantify emissions for all of Saudi Aramco’s facilities. Each equation runs every hour with hourly results stored in the DIA database.

With the massive scale of data generated hourly, inserting data into the database could result in a significant bottleneck in the overall process. To overcome this obstacle, the DIA system, installed on a SQL database server, was enhanced to optimize performance by eliminating unnecessary database calls and employing best techniques for working with large sets of data. In addition, “bulk insert” functionality was developed to write data to the SQL database instead of a traditional one by one data insertion process. This effectively debottlenecked the SQL database update process and facilitated the insertion of voluminous data quickly with a single call.

Standardizing emission calculations
The project team established more than 13,000 equations for Saudi Aramco’s 36 plants and more than 700 sources within the Kingdom of Saudi Arabia. The spreadsheets created by Saudi Armaco as part of its emissions inventory initiative became the foundation for the DIA system implementation. The source emission calculation methods were extracted, reviewed, and validated for accurate emissions quantifications. Throughout this process, significant efforts were made to validate the accuracy of source parameters. Key issues associated with many of the parameters included the following:

  • Difficulty identifying and organizing PI tag names for sources from multiple plants: All sources with available PI process data were verified and replicated to a centralized PI server with identifiers for use in the DIA system.
  • Erroneous emission factor usage: Most of the sources in Saudi Aramco’s emissions inventory are combustion sources using a variety of fuel types. Emissions calculations for these sources are primarily based on published emission factors widely accepted by the petroleum industry. To ensure the use of proper emission factors, significant efforts were made to verify that sources were associated with the correct fuel types thereby allowing the correct emission factors to be applied in the emission calculations.
  • Inconsistent units of measurement (UOM): Source data from the different plants often used inconsistent UOMs which could result in erroneous emissions calculations. A unit conversion function was incorporated into DIA to enable the use of standardized equations for calculating emissions from similar sources.
  • Bad/missing PI data: Users had few options to correct periods of bad or missing PI data. A set of equations with PI tag names was built within DIA for all sources with PI tag data. The DIA system provides several mechanisms for users to fill missing PI tag data for emission calculations at the source level. Saudi Aramco performs plant level mass balance to validate the activities. Should the plant level evaluation reveal uncertainty of some PI tags, the emissions may be calculated using user entered activity data rather than PI tag data.
  • Source data without PI tags: Approximately one third of the sources had no PI tags for activity data. Emissions from these sources must be calculated based on user entered source activity data. Therefore, a duplicate set of equations was built with activity data tags for sources with PI tags in case the PI tags were disconnected for an extended time. DIA allows user entered activity data for a defined period. These data are converted into hourly data and handled similarly to data from the PI system. This provides for standardized emissions data stored in DIA’s EDM for compliance tracking and reporting.
  • Equation building: Over 13,000 equations were necessary to perform the various emission calculations. To create and manage these equations without a tool to streamline the process would be formidable. With standardized calculation methods, emission factors, and a UOM conversion method for input parameters, the emission calculation equations can be generated with a set of rules. An equation builder tool was developed to generate the massive number of equations. Throughout the implementation process, the tool was updated to account for the numerous changes identified by the project team. As a result, the project team can now efficiently generate a new set of equations based on user specified changes.

Quality checking equation formulas and calculation results The emission calculation methods were executed in five calculation tiers. A standardized set of equations were created for downstream refineries. Saudi Aramco chose its largest downstream facility as the pilot site due to its size and source type complexity. A set of equations were built using the DIA equation builder and subsequently validated for each source at this refinery. Following the pilot implementation, an equation set was generated for each of Saudi Aramco’s other plants using the DIA equation builder. Validation was conducted at both the micro and macro levels.

System Installation, Testing, and Debugging

The process of installation, testing, and debugging was iterative. As updates to DIA were made, changes in the system infrastructure and business logic as well as software bugs and change requests would trigger a restart of the process. Each new version of DIA was first tested on servers that resided in the development environment. The Saudi Aramco production environment collected real-time data whereas the development environment did not. This, coupled with the fact that outside consultants did not have access to the PI data historian made the overall quality control and assurance of the system laborious.

Due to these challenges, debugging was essentially performed in two stages. The first round of testing was conducted to ensure that the intended logic was functioning as desired. With no access to the data historian, tests were conducted with simulator generated tag values to represent data coming from the historian. Once the logic was confirmed to be accurate, a complete system test was initiated to ensure that implemented changes did not impact other components of the application. Upon satisfactory test completion, a DIA update was deployed to the production environment with real historian data.


Saudi Aramco’s emissions inventory system posed unique challenges due to the enormous amount of data transactions and calculations performed by each plant. Trinity’s Data Integration and Automation (DIA) solution proved to be an ideal platform for accurately calculating near real-time emissions and facilitating reporting.

To enable users of the system, Saudi Aramco’s Environmental Protection Department provided significant training to its operators and engineers on the emission inventory program and the emission calculations. As a result, Saudi Aramco facilities are able to update and run the emissions calculations and establish emission reduction KPI targets. In mid-2014, final testing was completed and the system was cutover to production; it is currently processing reliable emission data for corporate reporting.

A version of this article was previously published in the November 2014 issue of Hydrocarbon Engineering.

EQ Winter 2015 - T3 Industry Collage