Hydrocarbon Processing Copying and distributing are prohibited without permission of the publisher
Email a friend
  • Please enter a maximum of 5 recipients. Use ; to separate more than one email address.

Use adaptive modeling to revamp and maintain controllers

06.01.2012  |  Harmse, M.,  Aspen Technology, Cambridge, MassachusettsLodolo, S. ,  Aspen Technology, ItalyEsposito, A.,  ENI R&M, Rome, ItalyAutuori, A. ,  ENI R&M, Rome, Italy

The right tools can improve refinery APC applications

Keywords: [advanced process control] [refining]

ENI Refining and Marketing (ENI R&M), like many other operating companies, found itself challenged to properly maintain its large, installed base of existing advanced process control (APC) applications with a reduced workforce. Frequent lube oil production changes were being made to capitalize on supply chain opportunities. The limited APC resources were struggling to keep up, as these changes required updates to the controller models to ensure that the APC solutions continued to generate the highest value.

After reviewing new tools and methodologies to improve efficiency, ENI R&M selected performance monitoring, automated testing and adaptive modeling tools for APC from a trusted technology provider. ENI R&M tested the adaptive modeling tool at its Livorno refinery in Italy with positive results, prompting the company to deploy adaptive modeling programs at its other refineries.

ENI R&M Livorno refinery

 The Livorno refinery is a fuels and lube oil refinery with a significant number of installed APC applications. Fig. 1 shows a simplified refinery layout. The refinery runs 13 medium- to large-scale model-predictive controllers (MPCs) and 24 inferential modeling applications, for a total of 210 manipulated variables (MVs) and 92 inferential properties.

  Fig. 1. Simplified process flow diagram of
  Livorno refinery.

Fig. 2 shows the refinery’s APC coverage. APC applications cover all major process units, and additional controllers are planned for the remaining plants. Since it is a lube oil refinery, Livorno’s frequent lube oil production changes affect operations and, therefore, the APC application’s performance. This is a significant change in addition to normal crude oil changes and crude oil quality disturbances. For these reasons, APC maintenance for best performance is an ongoing task that keeps the site APC engineer continually engaged.

  Fig. 2.  APC coverage at the Livorno refinery.

Sustaining APC benefits

It is something of a misnomer to say that APC applications require maintenance. If nothing in the plant ever changes, then almost no maintenance and no model updates are required. However, if significant changes are made to the process, or if feedstock characteristics change significantly, then the APC models must be made “aware” of these changes. When model updates are not performed, or when regular controller maintenance is not carried out due to significant process and instrumentation changes, the performance of the APC system starts to degrade.

There are many potential reasons for performance degradation, but some of the most likely are listed below:

  • Internal staff familiar with the application move to a different position, and new staff may not be able to immediately support the application or may require significant training to understand and support it
  • Processes are often changed, and these changes can affect controller performance
  • Catalyst changes, exchanger fouling and changes to valves and other instrumentation can lead to degradation
  • Routine maintenance on instrumentation and equipment can impact performance
  • Economic changes affect the steady-state solver solutions, and if they are not recognized and accommodated, performance may degrade or the controller may lose money instead of accumulating profits.

Typical signs of performance degradation are:

  • Sub-controllers in “off” status and MVs or controlled variables (CVs) are routinely out of service or in distributed control system (DCS) “local” status
  • Some CVs never reach steady-state targets before these targets change
  • Some CVs remain outside limits for extended periods
  • Many MV limits are clamped or MVs are at setpoint—i.e., with high/low limits set to identical values
  • Some MVs show “noise” response with frequent change of direction
  • Almost all MVs in a controller are moving on every controller execution
  • MV dynamics are often limited by the maximum move limit
  • CV prediction error tends to be positive and then negative for extended periods, indicating model mismatch
  • Cycling CVs or MVs
  • Unstable linear programming (LP) solution—i.e., steady-state targets flip frequently
  • Primary controls do not hold setpoints
  • Control is too aggressive, even with insignificant CV error
  • Controller is overly aggressive, with secondary objectives.

The typical manual APC maintenance workflow is labor-intensive and inefficient, since it is largely reactive and not proactive. The APC maintenance workflow goes through the following major steps:

1. Control

  • There is a change in process or operating mode
  • The controller begins to oscillate or perform badly
  • Operators begin clamping MVs or taking out MVs/CVs, or entire sub-controllers.

2. Detect

  • The control engineer usually is not automatically alerted to the problem
  • Operators will likely call for help only when the problem becomes too severe to tolerate
  • The control engineer may spot the issue while checking trends or controller limits, or when passing by the control room.

3. Diagnose

  • At some point, the control engineer spots the issue or is notified by a keen operator
  • The control engineer will attempt a manual diagnosis by speaking with operators and analyzing data either online or offline.

4. Repair

  • Diagnosis is completed
  • The problem may be ignored or manually repaired; often, a sub-optimal solution is implemented (e.g., the controller is de-tuned or gains are manually adjusted)
  • Small problems tend to build up until parts of the controller or the entire application are switched off; a major revamping step then must be undertaken.

The control engineer must often manually extract process data to isolate the root cause. After the nature of the problem has been determined, the manual model-building method prolongs the amount of time needed to correct the problem and return the controller to full service. If maintenance is deferred, the problems slowly accumulate until a major revamp must be undertaken. This approach is inefficient, and it causes a loss of benefits that can be as high as 50%–60% during the four- to five-year application lifecycle. With supporting automation, this workflow can be significantly streamlined, and the time and effort needed to keep the controllers at peak efficiency can be reduced.

Successful APC application maintenance requires plans and practices to be aligned with business strategy and supported by management, which ensures that tools, people and processes are in sync (Fig. 3). A proper APC maintenance methodology should have the following characteristics:

  • Incorporates APC best practices
  • Minimizes effort by automating and simplifying maintenance tasks
  • Uses proper baselines, as well as key performance indicators (KPIs) covering both controllers and models
  • Uses automated reports to rapidly detect changes in performance
  • Employs diagnostic rules to isolate root causes of performance degradation and make quick assessments of problems
  • Uses automated step testing to quickly generate high-quality data for improved models, which relieves engineering from manual testing
  • Prepares data for modeling using preprocessing rules, establishes automated data-cleaning tasks, and minimizes the need to manually slice data
  • Automatically generates new models without extensive engineering effort
  • Avoids manual data collection and the movement of data through different servers, and does not use flash memories or other media to cross firewalls
  • Simplifies and streamlines to be proactive instead of reactive.

  Fig. 3.  Successful APC maintenance requires
  alignment of plans and practices.

Technology continues to improve, and tools that enable a proactive maintenance methodology are available on the market. With this kind of automation, the four steps to maintain an APC application described previously can now be performed differently, as depicted in Fig. 4.

  Fig. 4.  Automated APC maintenance workflow.

Sustained value tools

The sustained value tools supporting detection, diagnostics and repair are described below.

Performance monitoring. A proprietary performance-monitoring tool has the capability to create a history of controller and process data, build baselines, calculate controller and process KPIs, and automate reporting. Using these performance KPIs, the user can rapidly detect when the process is not operating at peak performance. Model KPIs show the specific MV/CV pairs that are contributing to poor performance.

Automated step testing. An MPC is used to maintain the process within specifications at all times. The automated step-testing tool supports single-test and multi-test methods, and it produces richer data more quickly than manual step testing, since it enforces APC best practices and estimates the largest possible MV steps while maintaining the process within constraints. Much of the plant testing can now be performed without engineering supervision.

Adaptive modeling. This tool automates the maintenance lifecycle of a controller by enabling the collection of historical data; automating calculations for data cleaning; scheduling online model quality (MQ) assessments; and running standard and custom KPIs to assess MQ, model diagnostics and online model identification (ID).

All of this automated workflow is performed online, from a web interface, directly on the running controller. There is no need to start a data collection task, extract data, move data between systems, model or tune offline, or start or stop applications. The process is fully streamlined, and it enforces APC best practices at all stages. It also gives the APC engineer the capability to control and influence the results while eliminating routine manual activities.

The methodology is designed to enable APC end-users to perform regular, proactive APC maintenance on their own, without involving an external consultant. End-users should hire an external consultant only in the case of a major process revamp and never for routine maintenance, since the tools and methodology now enable non-experts to efficiently maintain APC applications.

Livorno refinery proof of concept

Among the Livorno refinery’s APC applications, there are two hot oil circuits: HOTOIL1 and HOTOIL2. The first circuit delivers around 65 MM Kcal/h, and the second delivers around 25 MM Kcal/h, to reboilers and other exchangers in plants throughout the refinery. Fig. 5 shows a simplified screenshot of the circuits.

  Fig. 5.  Simplified screenshot of hot oil circuit

The adaptive modeling evaluation focused on the HOTOIL1 circuit controller, and specifically on the F1 furnace. The HOTOIL1 controller design includes the following attributes:

  • 11 MVs, 54 CVs, and nearly 100% service factor
    • Most MVs are related to the F1 furnace
    • Most CVs are valve outputs of hot oil user control loops
    • Controller was originally deployed in 2005.
  • Controller objectives and benefits
    • Operations flexibility and maximization of delivered duty when required
    • Rejection of disturbances
    • Temperature and loop pressure stability
    • Optimization of furnace combustion.
  • Controller main constraints
    • Loop pressure and return temperature
    • Feed pump capacity
    • Furnace skin temperature, draft and excess O2.

Likewise, the F1 furnace design includes four cells, eight passes, mixed fuel gas/fuel oil burners, four dampers and one blower with backup, as shown in Fig. 6. An evaluation of the new tool and methodology was conducted in a meeting room near the control room, with around 15 APC engineers from several ENI R&M refineries.

  Fig. 6.  Simplified screenshot of F1 furnace.

Efficiency control of the F1 furnace—which uses a multivariable MPC—was found to have been running with limited capability for some months, due to model degradation after field equipment maintenance. The service factor was still around 100%, but significant benefits were left on the table. A model revamp for that section was required, since the old models could not run on a closed-loop system after the process changes. The furnace was found to be an ideal candidate for an adaptive modeling pilot project.

Six MVs were involved in the maintenance activity, which began with the scenario described in Table 1. The two-day evaluation encompassed the following steps:

  1. Controller performance assessment through baselines and KPIs
  2. Automated step-testing tool configured and run throughout the entire process
  3. As-is MQ assessment performed
  4. Automated data cleaning and case setup on the performance monitoring system
  5. Model ID iterations
  6. Online model update and deployment
  7. Post-revamp MQ assessment.

A virtual machine connected to the ENI R&M control network was used for the evaluation. All work was done online from the production control web server operator interface. During automated testing activity, the engineer group had time to discuss maintenance methodology, and revise baselines and KPIs.

The most interesting KPI that was discussed and enabled is a modified version of the utilization factor (UTL), which is available as part of a collection of built-in KPIs in the refinery’s performance monitoring system. The idea of a UTL was first proposed by Allan G. Kern in Hydrocarbon Processing in October 2005. This KPI, modified by ENI R&M engineers, is defined as follows:

ENI_UTL = (CCS + MFU + MOK) ÷ IPMIND 3 100

CCS = Number of CVs at high/low limit, setpoint, ramp or external targets
MFU = Number of MVs at external target or engineering limits
MOK = Number of MVs at minimum movement, wound up, in bad status or taken out of service by the engineer
IPMIND = Actual number of MVs in the controller.

A favorable performance for this KPI guarantees that the controller is not only on, but that it is also moving and using all available MVs to push constraints—i.e., to accumulate APC benefits. A multi-test mode was used in the MPC from the beginning. This allowed the MVs to be tested simultaneously to minimize step-testing time, while minimizing MV correlation and maximizing the signal-to-noise ratio to enhance MQ. As the automated tester evaluated the unit, the group concentrated on adaptive modeling usage and results, as outlined below:

  • View and clean up the MQ data
    • User can view the data used in the MQ analysis evaluation
    • Some data cleaning is automatically performed
    • The engineer can manually clean the data further, using a web viewer
    • Calculations for automated data cleaning can beconfigured (e.g., when an MV is moved to DCS control
      or when a CV control error is too high).
  • Run an MQ test
    • Run the test from the web viewer
    • Schedule a recurring MQ test at a designated time and interval
    • Model KPI carpet plots are automatically updated.
  • Configure and run a model ID case
    • Browse the performance monitor’s database for tags to include in the model ID case
    • The ID case can be run on demand or scheduled to run automatically, at a particular time and interval.
  • Review model and deploy
    • Multiple model ID cases can be compared with the current model directly in the web viewer
    • Bode plot analysis is available in the web viewer, to assess model uncertainty
    • Once satisfied, the model can be assembled and deployed online.

All of these activities have been carried out online, through a web interface, using data available in the performance-monitoring database. MQ data appear as a KPI plot where each model (MV/CV pair) is flagged with different colors. The colors indicate how functional the models used by the controller are compared to those assessed with only a few MV moves. The complete model matrix is shown in Fig. 7, and the models on which the project team concentrated are highlighted in red within an oval.

  Fig. 7. Complete model matrix plot.

When an MQ case is executed, an estimated gain multiplier (gmult) value is calculated in such a way that the prediction errors of the corresponding dependent variable are minimized. The estimated gmult will then include contributions from the model uncertainty, not only in the steady-state gain, but also in the accuracy of the dynamics.

The patented MQ technology uses the existing controller model as a reference to calculate an MQ index, which is a combination of the estimated gmult value and the calculated model uncertainty error bound. This index represents the accuracy of the model pair in predicting the process response:

  • Good (green) means the model pair has a high degree of accuracy
  • Fair (light blue) means the accuracy is somewhere between good and bad
  • Bad (red) means the model accuracy is low
  • Unknown (yellow) means a clear answer could not be derived from the data provided, likely due to insufficient significant data.

During the evaluation, focus was placed on a small portion of the matrix, and MV steps were performed in that portion; this is the reason that so many red and yellow blocks can be seen in Fig. 7.

In a routine maintenance activity, three to four steps should be performed for all relevant MVs for MQ analysis. After assessing if and where models need further improvement (via the MQ analysis), more steps should be implemented for the models that need to be re-identified, and the model ID results should be checked every few hours. Step testing is only performed for the MVs for which new models are needed, and only for as many as are required to obtain a sufficiently accurate model. A proper maintenance routine will require tests of only a few MVs, as models typically show some local degradation following an event. It is uncommon for the entire matrix to exhibit model accuracy issues.

Models can be inspected as step responses or as bode plots, as shown for the HOTOIL1 controller in Fig. 8. The starting model is shown in blue, while the newly identified model (based on 20 hours of step testing) is shown in pink. Note the substantial differences on the diagonal, which is exactly where the MQ analysis previously reported the model accuracy to be poor.

  Fig. 8. Models can be inspected as step
  responses or as bode plots.

Bode plots have been useful in monitoring modeling progress during step testing. In Fig. 9, three hours of step-test data are compared against nearly 20 hours of step-test data. It can be seen that the uncertainty bands become narrow, while the signal-to-noise ratio improves as the step test proceeds.

  Fig. 9. Step-test data for three hours vs. 20 hours.

The evaluation was stopped after 24 hours of unattended step testing, and then the updated models were replaced online from the web interface without needing to restart the controller. The effects of models and tuning changes can be directly checked online, through the production control web server interface, using a “what-if” simulation that permits a comparison between old and new responses before deployment. Model quality was reassessed after deployment to confirm the improvement, as shown in Fig. 10.

  Fig. 10. Reassessment of model matrix plot 
  shows quality improvement.


The HOTOIL1 controller was brought back into full operation at the end of the evaluation, with the following significant results:

  • Correct operation for HOTOIL1’s multivariable MPC was restored, allowing for tighter control of excess O2 and draft in F1 furnace cells
  • Operating target was increased for dampers and decreased for blowers, since the updated models exhibited favorable performances
  • Excess O2 was significantly reduced
  • F1 efficiency increased by 1.2%, on average, after the revamp, which is significant for a 65-MM Kcal/h furnace in terms of reduction in fuel consumption, and worth well above €100,000/year at the current cost of fuel oil.

Advantages of the solution

The entire maintenance process is performed online, directly from a web viewer and on the running controller. It enforces best practices and moves maintenance from reactive to proactive, thereby maximizing controller uptime and benefits. Also, controller performance checkups become a regular activity that requires limited effort.

With the use of the sustained value tools, maintenance activities are triggered by a few properly designed controller KPIs and model KPIs. These KPIs can be easily compared against one or more baselines that can be manually or automatically built in minutes. Automatic reports can be scheduled and designed to include KPIs, calculations and trends; these reports are then sent to operators, engineers and managers.

KPI carpet plots, diagnostics and drill-down capabilities enable control engineers to rapidly detect and diagnose the problem, whether it is instrumentation, DCS proportional-integral-derivative (PID) controller tuning, MPC tuning, MPC design or MPC models. Fixing the problem is then mostly automated (although still under engineer control), but it avoids the need for time-consuming manual tasks or controller downtime.

A streamlined APC maintenance process with proper tools is now available to preserve APC know-how, even with APC engineers moving into other positions. Proactive maintenance prevents benefits degradation and nearly eliminates the need for costly “full-controller” revamps. It also permits the APC engineer to spot new opportunities to increase delivered benefits.


The evaluation performed at ENI R&M’s Livorno refinery clearly demonstrated the validity of the methods and tools used. The HOTOIL1 multivariable MPC section was successfully revamped in only two days through non-continuous work, with an automated tester taking care of nighttime plant testing. Models were updated and all MVs were put back in service, which delivered immediate and significant benefits of greater than €100,000/year. Other advantages included a faster model ID process due to the use of adaptive modeling features, and the capability to run MQ assessment and model ID from a web interface.

The maintenance activity was completed in around 24 hours, with almost no engineering supervision during step testing, and with plenty of time to become familiar with the tools and technology. Time was available to discuss what KPIs to put in place, and how to improve controller performance.

The key lesson learned from the experience was to spend available time optimizing operations and increasing benefits, and not to execute repetitive tasks. In a refinery with numerous APC applications, such as ENI R&M’s Livorno facility, there are many opportunities to improve performance, even with favorable onstream factors. These opportunities are not always noted or taken advantage of, however, due to a lack of proper tools and methodology. Also, there is not always enough time to address them when conducting work in the traditional way. HP

The authors 

Stefano Lodolo is a senior advisor and industry consultant with Aspen Technology in Italy. He has more than 25 years of APC field experience in the refining, chemical and petrochemical industries. Mr. Lodolo has successfully implemented dozens of MPC and other automation projects at a wide variety of process units. He holds a master’s degree in chemical engineering from Bologna University in Italy.

Michael Harmse is the senior director of APC product management at Aspen Technology in Houston, Texas. He has 28 years of experience in process control, and has completed 45 APC applications since 1994. He is the inventor of the SmartStep constrained multivariable testing technology and the SmartAudit co-linearity detection and repair tool. He is listed as the principal inventor on multiple US and EU patents. Mr. Harmse has also introduced several new APC products: Aspen SmartStep, Aspen PID Watch, Aspen Nonlinear Controller (Aspen Apollo), Aspen Fuel Gas Optimizer and Aspen State-Space Controller.


Andrea Esposito is a senior APC engineer at ENI R&M’s Livorno refinery in Italy. He is in charge of project development and application maintenance for APC, as well as automation at the DCS level. Before joining ENI in 2006, Mr. Esposito worked as a software engineer. He has an engineering degree in telecommunications from the University of Pisa in Italy.

Augusto Autuori is responsible for APC project coordination at ENI refineries. After earning his bachelor’s degree in chemical engineering from the University of Salerno in Italy, he joined ENI in 2002 as an APC engineer. Between 2002 and 2006, Mr. Autuori participated in several APC projects, including DMCplus and inferential implementation. In 2006, he moved to the technology department at ENI R&M’s headquarters to manage APC project coordination, oil movement systems implementation at ENI’s primary logistics hubs, innovative systems implementation for plant monitoring, and operator training.

Have your say
  • All comments are subject to editorial review.
    All fields are compulsory.

Related articles


Sign-up for the Free Daily HP Enewsletter!

Boxscore Database

A searchable database of project activity in the global hydrocarbon processing industry


Is 2016 the peak for US gasoline demand?




View previous results

Popular Searches

Please read our Term and Conditions and Privacy Policy before using the site. All material subject to strictly enforced copyright laws.
© 2016 Hydrocarbon Processing. © 2016 Gulf Publishing Company.