<<

Data Reconciliation and Gross Error Detection for Modelling in Crude Oil Heat Exchanger Networks

A thesis submitted to the University of Manchester for the degree of Doctor of Philosophy in the Faculty of Science and

Jos´eI. Loyola-Fuentes

2019

School of Engineering Department of Chemical Engineering and Analytical Science Contents

Abstract 5

Declaration 6

Copyright 7

Acknowledgements 8

1 Introduction 9 1.1 Research Motivation ...... 12 1.2 Key Challenges ...... 14 1.3 Research Objectives ...... 16 1.4 Thesis Outline ...... 18

2 Literature Review 20 2.1 Fouling Deposition in Heat Exchangers ...... 21 2.1.1 Fouling Mechanisms ...... 21 2.1.2 Stages of Fouling ...... 24 2.1.3 Operational Variables Affecting Fouling ...... 26 2.2 Fouling Modelling in Crude Oil Heat Exchangers ...... 28 2.2.1 Particulate Fouling ...... 29 2.2.2 Chemical Reaction Fouling ...... 30 2.3 Data Reconciliation in Industrial Applications ...... 37 2.3.1 Reconciliation of Measured Data ...... 38 2.3.2 Gross Error Detection ...... 42 2.3.3 Presence of Unmeasured Process Variables ...... 48 2.4 Estimation of Fouling Model Parameters ...... 51

2 3 Fouling Modelling and Data Reconciliation for Single Crude Oil Heat Exchangers 55 3.1 Introduction to Publication 1 ...... 55 3.2 Publication 1 ...... 58

4 Data Reconciliation for Fouling Modelling in Fully Instrumented Crude Oil Heat Exchanger Networks 78 4.1 Introduction to Publication 2 ...... 78 4.2 Publication 2 ...... 79

5 Redundancy and Observability Analysis for Partially Instrumented Crude Oil Pre-heat Trains 97 5.1 Introduction to Publication 3 ...... 97 5.2 Publication 3 ...... 98

6 Conclusions and Future Work 139 6.1 Conclusions ...... 139 6.2 Future Work ...... 142 6.2.1 Hydraulic Effect of Fouling ...... 142 6.2.2 Fouling Modelling ...... 143 6.2.3 Data Reconciliation and Gross Error Detection ...... 143

Bibliography 144

Appendix A Corrigendum for Publication 2 154

Word Count: 55,576

3 List of Figures

1.1 Simplified schematics of a crude oil pre-heat train. Adapted from Coletti and Macchietto (2011) ...... 10 1.2 Fouling-related cost in a conventional crude oil refinery. Adapted from Coletti et al. (2015) ...... 13 1.3 Sulphur content and API gravity for different types of crude oil (EIA, 2012). Source: U.S. Energy Information Administration . . 16

2.1 A typical reaction mechanism for chemical reaction fouling on a heat transfer surface (Watkinson and Wilson, 1997)...... 22 2.2 A general description of different fouling rate behaviours (Kazi, 2012) ...... 29 2.3 A typical fouling threshold curve. Adapted from Ebert and Pan- chal (1995) ...... 34 2.4 Classification of unmeasured variables ...... 49 2.5 Classification of measured variables ...... 49

4 Data Reconciliation and Gross Error Detection for Fouling Modelling in Crude Oil Heat Exchanger Networks Jos´eI. Loyola-Fuentes The University of Manchester 2019 Abstract – PhD Thesis

Heat integration in crude oil refineries is a key process that aims for decreasing the large energy consumption in crude distillation units (CDU). A system consisting of a heat exchanger network (HEN), known as the pre-heat train is used for achieving this goal. Unfortunately, given the chemical characteristics of crude oil, the pre-heat train is severely affected by fouling deposition. Fouling deposition directly impacts the thermal and hydraulic performance of the pre-heat train, decreasing the overall heat transfer coefficient and increasing the pressure drop and emission of greenhouse gases. Fouling deposition is mainly mitigated via equipment cleaning or operational op- timisation. The effect of fouling is quantified using process measurements such as stream flow rates, temperatures and pressures. Previous studies have developed semi-empirical models relating specific operating conditions and the severity of fouling. However, these models require a set of parameters that needs to be esti- mated for each individual crude oil. In addition, the use of process measurements poses a further challenge, as each measurement contains measurement error. This error is associated to different sources such as signal transmission (random errors) and measurement bias (gross errors). Moreover, the number of measured process states plays an important role, as the estimation of unmeasured variables would not take place if the set of initial measurements were not correctly selected. This Thesis provides an integrated methodology for determining fouling model pa- rameters in crude oil pre-heat trains using operating data subject to random and gross errors. A detailed HEN model along with data reconciliation and gross error detection are used for minimising measurement error, identifying faulty instru- ments and estimating unmeasured variables. Additionally, an optimisation-based parameter estimation procedure is implemented for determining specific fouling models. The proposed methodology is tested in several industrially-relevant case studies, indicating that the appropriate processing of measured data increases the accuracy of fouling-related predictions, and that the incorporation of fouling deposition into heat transfer modelling provides a more realistic context for HEN design and optimisation.

5 Declaration

No portion of the work referred to in this thesis has been submitted in support of an application for another degree or qualification of this or any other university or other institute of learning.

6 Copyright

i. The author of this thesis (including any appendices and/or schedules to this thesis) owns certain copyright or related rights in it (the “Copyright”) and s/he has given The University of Manchester certain rights to use such Copyright, including for administrative purposes. ii. Copies of this thesis, either in full or in extracts and whether in hard or electronic copy, may be made only in accordance with the Copyright, De- signs and Patents Act 1988 (as amended) and regulations issued under it or, where appropriate, in accordance with licensing agreements which the University has from time to time. This page must form part of any such copies made. iii. The ownership of certain Copyright, patents, designs, trade marks and other intellectual property (the “Intellectual Property”) and any reproductions of copyright works in the thesis, for example graphs and tables (“Reproduc- tions”), which may be described in this thesis, may not be owned by the author and may be owned by third parties. Such Intellectual Property and Reproductions cannot and must not be made available for use without the prior written permission of the owner(s) of the relevant Intellectual Property and/or Reproductions. iv. Further information on the conditions under which disclosure, publication and commercialisation of this thesis, the Copyright and any Intellectual Property and/or Reproductions described in it may take place is available in the University IP Policy (see http://documents.manchester.ac.uk/ DocuInfo.aspx?DocID=487), in any relevant Thesis restriction declarations deposited in the University Library, The University Library’s regulations (see http://www.manchester.ac.uk/library/aboutus/regulations) and in The University’s policy on presentation of Theses.

7 Acknowledgements

First, I would like to acknowledge the support of my supervisors, Prof. Robin Smith and Prof. Megan Jobson. Your valuable experience and kind feedback helped me aligning every aspect of this Thesis. I have learnt a lot from both. Thank you for your support and encouragement. I would also like to thank the financial support of every Chilean tax-payer, through the Becas Chile program of the National Commission for Scientific and Technological Research (CONICyT). Studying abroad is hard to accomplish and you kind contribution made it possible. Many thanks to my friends from the office B14 in the Centre for Process Inte- gration. Each and everyone of you knows how much your friendship, jokes and conversations meant to me. All the laughs and thoughts we shared during these years have definitely contributed to the completion of this Thesis. Thank you for the overly long lunch-times and the drinks in Wetherspoons. To my Chilean friends in Manchester, I sincerely appreciate all of your support and the loving memories that we have shared over these years. Getting to know you has been a remarkable and wonderful experience, and let this be a temporary farewell. I genuinely wish to see you all again and soon. I would like to further express my gratitude to my family. To my parents Sara and Joaqu´ınand my brothers Cristian and Patricio. Your unconditional love and support have made me the person I am today. I also want to thank my aunts, uncles and cousins because they have always been with me, in good and bad times. Para mi familia, agradezco todo su apoyo y amor, cada uno vive dentro de mi. Finally, I want to dedicate this Thesis and thank my lovely wife Camila, for sharing this entire experience with me. You have supported me when I have been happy and sad, inspired and frustrated. Your love is the cornerstone of what I want for our future. Thank you very much for everything.

8 Chapter 1

Introduction

Crude oil is a global and reliable source for fuels and chemical products. The chemical processing of crude oil demands large amounts of energy and services, and the continuous reduction of these demands has been set as a crucial target over recent decades. The strategies developed for decreasing these large demands aim to improve the environmental, economic and operational performance of the refinery operations. An example is the configuration of the crude distillation unit (CDU), which consists of a distillation column that separates the crude oil into several added-value products, and an energy-recovery network, or pre-heat train, that increases the temperature of the crude oil before distillation in the CDU. A simplified diagram of a crude oil pre-heat train is shown in Figure 1.1. Most commonly, the pre-heat train consists of a shell-and-tube heat exchanger network (HEN), interconnected in series or parallel arrangements. Other pro- cesses are frequently linked to it, such as desalination or fired-heating. These processes pre-treat the crude oil in order to achieve optimal quality for the distil- lation stage. The crude oil fed into the distillation column is normally heated up to approximately 380°C. The energy needed for this pre-heating is provided by recirculated streams coming from the distillation column, such as pump-arounds and side-products streams. The use of this configuration has enabled current crude oil refineries to recover between 60 and 70% of the energy needed for this stage (Panchal and Huangfu, 2000). The overall performance of the pre-heat train is dramatically affected by fouling deposition. Fouling represents a challenging and complicated issue in all operat- ing plants, as its occurrence produces major impacts in thermal, hydraulic and

9 10 CHAPTER 1. INTRODUCTION

Naphtha

Naphtha Kerosene Crude distillation unit

Desalter

Diesel

Crude oil storage Top P.A. Gas oil Kerosene Flash column Diesel

Bottom P.A Gas oil

Residue

Bottom P.A.

Residue

Furnace

Figure 1.1: Simplified schematics of a crude oil pre-heat train. Adapted from Coletti and Macchietto (2011)

economic performance. Increases in fuel consumption, pressure drop and CO2 emissions are examples of a wide series of consequences attributed to it. Fouling is defined as the deposition of unwanted solid material onto a heat transfer surface (Epstein, 1983). The characteristics of such deposits are highly related to the nature of the working fluid (crude oil in this case), and can be the result of crystallisation, chemical reactions or biological processes, among others. In current industrial operations, solid materials such as carbon, waxes, greases and heavy organic deposits such as polymers and tars are commonly regarded as potential fouling deposits (Bott, 1995, Ch. 1). Most of these materials are usually encountered in crude oil refineries, therefore its study and understanding are critical for the design, optimisation and retrofit of heat transfer equipment. In order to mitigate fouling, various approaches have been developed. Previous studies have discovered relationships between fouling deposition and different operational variables such as wall temperature and flow velocity (Knudsen et al., 11

1999, Awad et al., 2007, Shetty et al., 2014). This dependency has been further explored for defining mitigation techniques during the design or retrofit of heat exchangers networks. For instance, the over-sizing of heat transfer area is a common practice for mitigating fouling in design stages. This practice allows for accommodating the inevitable decrease in thermal performance when fouling starts, but it does not prevent its occurrence. A similar set of actions is applied in retrofits, where the addition or removal of heat transfer area can be implemented on single or multiple heat exchangers. Mitigation actions also take place during operation. Heat exchangers are either by-passed or shut-down for cleaning. These cleaning processes are based on both chemical and physical principles and can extend the overall life-span of heat exchangers (Rodr´ıguez,2005). The removal of fouling deposits by means of chemical or mechanical cleaning prevents fouling from developing and, at the same time, eliminates a significant amount of accumulated material. In industrial applications, each cleaning ac- tion must be systematically planned (Rodriguez and Smith, 2007), increasing the complexity of cleaning decisions, especially in the case of heat exchanger net- works. Current approaches aim to obtain accurate heat transfer models, as well as integral methodologies for including realistic fouling deposition scenarios. If successful, these simulation models can potentially improve fouling predictions and decision-making processes related to operational optimisation and cleaning schedules. In order to establish a fouling model, essential information such as composition and physical properties of the deposited materials are needed. Acquiring this information poses a major challenge in crude oil refineries, as these properties are directly related to the nature of the crude oil (or blend). Moreover, experi- mental analyses of different types of crude oil are rather complex, since current experimental techniques are still not adequate to provide a more complete un- derstanding of the underlying causes of crude oil fouling (Chew et al., 2015). The design of fouling mitigation strategies is also driven by the continuous eval- uation of the process states via on-line monitoring. Specific measurement instru- ments are used to capture and store vital process characteristics such as stream flow rate, temperature and pressure drop. The optimal use of this information mainly depends on the reliability and accuracy of each measurement. Similar to process equipment, measurement instruments should be properly maintained, and systematically selected in order to minimise capital investment and maximise 12 CHAPTER 1. INTRODUCTION the amount of pertinent information. However, all measurements are inevitably affected by measurement error, which in the most severe cases, can result in unre- alistic scenarios. To overcome this issue, data-processing techniques such as data reconciliation are integrated into monitoring practices, to ensure that any sig- nificant deviation of the measurements from their corresponding nominal values are sufficiently reduced (Narasimhan and Jordache, 2000). In crude oil pre-heat trains, fouling monitoring is carried out using different types of heat transfer mod- elling and relevant on-line information such as mass flow rates and temperatures of specific heat exchangers within the network.

1.1 Research Motivation

Fouling is responsible for significant amounts of energy and economic losses. Bories and Patureaux (2003) reported the cost associated to fouling in a 160, 000 barrels per day refinery to be equal to US$1.5 million for a period of 3 months. In the United Kingdom, a decrease of 1°C in the furnace inlet temperature causes an approximated economic loss of £250, 000 per year, for a production rate of 200, 000 barrels per day (Macchietto et al., 2011). Additionally, crude oil fouling not only affects the operation of the pre-heat train, it also decreases the refinery throughput and increases the fuel consumption in the furnace (Coletti and Mac- chietto, 2011). Overall, the annual cost of fouling in a typical refinery has been estimated to be close to US$26 million, where almost 50% of it is associated to the CDU (Kashani et al., 2012). A typical fouling-related cost distribution in a typical refinery is shown in Figure 1.2. In general, there are five different types of fouling mechanisms (Epstein, 1983). Depending on the operating conditions, one or more of these mechanisms may take place within a single or a network of heat exchangers. Crude oil is a complex mixture of different components, many of these components, such as asphaltenes and sulphurs tend to foul faster than other fluids with different compositions, such as milk or cooling water (Deshannavar et al., 2010). The relationship among these different variables makes the studying of fouling models a difficult task, currently taking place on a worldwide level. The characterisation of fouling mechanisms is determined through experimen- tal procedures such as those presented by Young et al. (2011) and Crittenden et al. (2009). The aims of these experimental tests are to determine the fouling 1.1. RESEARCH MOTIVATION 13

Hydrotreater

11%

Reformer

Crude distillation unit 18% 48%

23%

Visbreaker

Figure 1.2: Fouling-related cost in a conventional crude oil refinery. Adapted from Coletti et al. (2015) behaviour of a specific sample and evaluate the effect of several operational vari- ables such as surface temperature and fluid velocity. The experimental results are used for determining limiting conditions for fouling occurrence (i.e. threshold conditions), which can be applied in fouling monitoring and operational optimi- sation. However, the operational conditions on each of these tests (such as fluid velocity and heat flux) are highly controlled and fixed, compared to on-site condi- tions that present more variability. This major difference makes the extrapolation from laboratory to field conditions rather impractical (Wang et al., 2015). Predictive models for fouling deposition are necessary for evaluating the thermal performance on heat exchangers and heat exchanger networks. A wide range of semi-empirical models have been reported in the literature. The main concept for the development of these models comes from the fouling rate definition proposed by Kern and Seaton (1959). In this definition, the fouling rate consists of the dynamic competition of a deposition and suppression rate. Most of these models use a set of parameters that are fitted to experimental data. Therefore, as it was discussed above, the uncertain relationship between field and laboratory condi- tions compromises the quality of predictions and affects further simulation and optimisation approaches. For practical reasons, fouling deposition is not directly measured during oper- ation. This issue is addressed by estimating relevant indicators such as heat transfer coefficients. These values are related via the definition of the fouling thermal resistance (or Rf ), and its value suggests the severity of fouling for a given set of operating conditions. Hence, any significant error in the data or the 14 CHAPTER 1. INTRODUCTION data-processing stage consequently affects our understanding and evaluation of the deposition process. This PhD work has been developed to address these limitations and aims for proposing an integrated framework to estimate specific fouling models, using data reconciliation and optimisation techniques. The use of data reconciliation ensures that the measurement error in the operating data is significantly reduced, in such a way that the predicted fouling models capture the individuality of each type of crude oil. The predicted fouling models are based on previously validated and implemented models in crude oil applications. It is desired that the implementation of this methodology can potentially be of help for improving the already established methodologies for the optimisation of cleaning schedules and operating conditions for fouling mitigation.

1.2 Key Challenges

Currently, fouling models are semi-empirical in nature. Their formulation de- pends on a set of parameters that need to be fitted for specific data-sets and set of operating conditions. Because of this, the models found in the literature perform optimally only for those types of crude and sets of operating conditions. Furthermore, refineries process several blends of crude oil in a single day, which substantially alters the chemical properties of the fouling deposits and deposition mechanisms. The presence of fouling not only affects the thermal efficiency of the pre-heat train, but also its hydraulic performance. Fouling deposits block the stream flow direction, decreasing its velocity and increasing the overall network’s pressure drop (Markowski et al., 2013). While most of the state-of-the-art fouling models capture the dependency of the fouling resistance with changes in temperature, there is a limited number of attempts that incorporate the hydraulic effect of fouling in crude oil applications. Moreover, process monitoring and reconcilia- tion tasks become more complex as thermal and hydraulic modelling are linked together. Previous studies have discovered that specific mechanisms like the deposition of waxes and chemical reaction usually dominate in individual heat exchangers in a pre-heat train (Ishiyama et al., 2013). An important limitation of the models developed for these mechanisms is that they have been determined only for the 1.2. KEY CHALLENGES 15 tube-side. It is known that the use of heavy fractions in the shell-side of some heat exchangers may lead to fouling deposition, and its should not be neglected (Diaz-Bejarano et al., 2018). However, the implementation of fouling models on the shell-side of heat exchangers is still a challenging task. The complex flow patterns and the wide range of working fluids dramatically increase the difficulty for considering shell-side fouling in a heat transfer model. The simulation models for heat exchanger networks are determined by complex and nonlinear expressions, which can affect the computational effort when per- forming optimisation techniques. The iterations within any optimisation proce- dure would have to use the model numerous times in order to find an optimal solution. If a simulation model is highly nonlinear, realistic solutions and con- vergence might not be achieved due to insufficient computational potential while iterating. Another challenge is posed when trying to estimate or measure crude oil physical properties. Crude oil is a complex mixture of hydrocarbons and inorganic com- ponents. Its composition varies depending on its source and so do its physical properties. For example, Figure 1.3 shows a distribution of different crude oils based on their characteristic values of sulphur content and API gravity. These differences suggest that for a heat transfer model to be accurate, key physical properties such as heat capacity should not be arbitrarily fixed, but appropri- ately estimated using specific characteristics of the crude oil (i.e. true boiling point, API gravity). On a related context, if reliable data are to be used for formulating a fouling model, an adequate number of measurements and a statistically significant repre- sentation of the process are needed (Narasimhan and Jordache, 2000, Ch. 1). The selection of measured process variables is not a minor task. The information these measurements provide should be sufficient for accurately estimate each piece of missing data. For instance, in a single-pass heat exchanger it is necessary to know the values of inlet flow rates and temperatures, in order to estimate both outlet temperatures. Similarly, a set of flow rates and temperatures are to be known in order to fully characterise a heat exchanger network. Moreover, the inclusion of fouling modelling increases the complexity of this task, as the effect of fouling is directly connected to the outlet conditions of the heat exchangers. The use of process-data for mathematical modelling also faces the challenge of dealing with the malfunctioning of measurement instruments such as biases or 16 CHAPTER 1. INTRODUCTION

Figure 1.3: Sulphur content and API gravity for different types of crude oil (EIA, 2012). Source: U.S. Energy Information Administration degradation of the measurement quality. These failures are called gross errors and the methodologies for treating them are well-established. However, these techniques are still in need for improvements that could allow addressing issues such as dynamic behaviour. Moreover, the presence of gross errors not only affects the measurements that contain them, but also the ones related to these via process constraints such as mass and energy balances. This effect is known as smearing effect (Narasimhan and Jordache, 2000, Ch. 7) and normally leads to the over-correction of free-of-gross-error measurements while reconciling the data, severely influencing the statistical basis of the reconciled measurements.

1.3 Research Objectives

This PhD work mainly aims for addressing most of the aforementioned challenges described in Section 1.2. A novel integrated methodology for estimating state- of-the-art fouling model parameters in the shell-side and tube-side of crude oil pre-heat trains is proposed. It is desired to develop an adaptable scheme that allows for the minimisation of measurement errors, identification of faulty instru- ments, and estimation of miscalibrations and unmeasured process states. The 1.3. RESEARCH OBJECTIVES 17 formulation of this new methodology is intended to be suitable for different topo- logical arrangements of the pre-heat train, and for different types of crude oil. Specifically, the objectives of this work are described as follows:

1. To develop a heat exchanger network model that incorporates the time- dependent nature of fouling deposition in the shell-side and tube-side of heat exchangers. The following issues are addressed:

(i) The selection of a computationally efficient HEN model that can con- tinuously update the network’s operating conditions based on fouling resistance values. (ii) The use of different fouling models for different heat exchangers within the network based on their relative location and thermal levels.

2. To implement an optimisation-based parameter estimation to calculate foul- ing model parameters based on the pre-heat train data in specific periods of operation. Specific objectives are listed as follows:

(i) To minimise the difference between data-driven and model-based val- ues of fouling resistance. (ii) To perform an extensive exploration for feasible solutions to guarantee a certain level of flexibility for different types of crude oil. (iii) To be able to estimate individual contributions of shell-side and tube- side fouling resistance.

3. To integrate data reconciliation and gross error detection algorithms into the heat exchanger network model to assess data-quality for an accurate estimation of process states. This goal considers the points below:

(i) The development of a joined strategy for data reconciliation and gross error detection, using the HEN simulation model as corresponding process constraints. (ii) The selection of a suitable gross error detection technique, able to simultaneously locate and estimate the corresponding gross errors in single or multiple measured variables. (iii) To determine the minimum isolation magnitude of single and multiple gross errors for reliably reconcile all data-sets. 18 CHAPTER 1. INTRODUCTION

4. To perform structural analysis in the pre-heat train to assess the amount of available instrumentation for the estimation of key unmeasured variables. This analysis addresses the items shown below:

(i) The implementation of a -based topological analysis of the pre- heat train that classifies measured and unmeasured variables based on their ability to be estimated. (ii) The use of well-established methodologies for the estimation of un- measured variables, provided the previous topological analysis allows for it.

5. To apply the proposed methodology in industrially-relevant case studies to predict the thermal performance and fouling behaviour of a pre-heat train, considering the following objectives:

(i) To assess the minimisation of measurement error via data reconcilia- tion using statistical indicators such as standard deviation. (ii) To validate the estimated fouling model parameters using independent process-data from the pre-heat train. (iii) To compare the performance of predictions using key process states such as temperature and key process outputs such as fouling resis- tance.

1.4 Thesis Outline

This PhD thesis is organised following the requirements for the “Journal Format” of The University of Manchester. There are a total of six chapters including scientific articles that are either published or submitted to a relevant scientific journal. In Chapter 1, the general background regarding the issue of fouling deposition in crude oil refineries, along with the motivation of this thesis and the main challenges that need to be dealt with are introduced. Also, a detailed description of the main and specific objectives are presented. In Chapter 2, an extensive review on fouling phenomena, mechanisms and mod- elling is given. Additionally, a critical analysis of previous research related to the utilisation of fouling models for the purposes of monitoring, design and optimisa- tion of crude oil pre-heat trains is presented. The integration of data-treatment 1.4. THESIS OUTLINE 19 techniques such as filtering and reconciliation, in the context of crude oil refineries is also discussed, as well as the fundamental concepts for data reconciliation and gross error detection. Chapter 3 introduces the implementation of the proposed methodology in a fully- instrumented single shell-and-tube heat exchanger. Simulated data with added random and gross errors are used to replicate industrially-measured data. Dif- ferent scenarios are tested, where the need for data reconciliation to increase the accuracy of fouling-related predictions is exhibited. In addition, a set of stud- ies for finding the minimum gross error magnitude for accurate reconciliation is reported. An extension of the methodology proposed in Chapter 3 is applied in a fully- instrumented heat exchanger network in Chapter 4. A matrix-based HEN model, including specific formulations for process units such as desalters and cold/hot utilities, is integrated to a time-dependent fouling deposition model. Different sets of fouling mechanisms are assumed in the shell-side and tube-side of each heat exchanger. Data reconciliation and gross error detection strategies are applied for estimating fouling model parameters and predicting fouling behaviour. In Chapter 5, the effect of partial instrumentation and its effect on the estimation of unmeasured variables and fouling model parameters is introduced. The struc- ture of the pre-heat train is first analysed and each measured and unmeasured variable is classified as estimable or non-estimable. This analysis provides vital information as to what extend a given pre-heat train can be instrumented. If the network is fully estimable, the proposed methodology is applied for determining the corresponding fouling models and predictions can be carried out. Otherwise, the minimum set of measurements needed for a complete estimation of the net- work is determined. These features are tested in a case study where a selected set of process states are considered as unmeasured. Lastly, a summary of the contributions of this research work, together with its corresponding limitations, potential improvements and future directions are listed and discussed in Chapter 6. Chapter 2

Literature Review

Developing a fundamental understanding of the underlying causes of fouling re- mains as a challenging issue in crude oil refineries. At the moment, several depo- sition mechanisms and development stages have been identified and extensively studied. However, establishing rigorous relationships between these mechanisms and the working fluid is still problematic. For crude oil pre-heat trains, the avail- able fouling models have been designed for specific crude oils and under highly controlled environments. This leads to distinct fouling models that are not suit- able for extrapolation to other types of crude oil. The features of each of these models rely on a set of parameters that define the net result of the deposition process, i.e. formation or suppression of solid material. Therefore, while the con- ceptual formulation of each fouling model can be implemented for different cases under the same deposition mechanism, a suitable methodology for determining accurate extrapolations is needed. Normally, the estimation of fouling model parameters is accomplished via exper- imental tests that generally demand a significant amount of time. Alternatively, the utilisation of on-site data via process monitoring is able the capture the uniqueness of the process streams, representing a convenient source of informa- tion for the calculation of fouling model parameters. In this context, numerous contributions have been made, incorporating several data-processing techniques in order to deal with measurement errors and statistical outliers. However, there have been a limited number of studies that have explored more rigorous strategies such as data reconciliation and gross error detection. Moreover, the inclusion of fouling modelling and its effect on the measured data over time further decreases the number of research investigations in the available literature.

20 2.1. FOULING DEPOSITION IN HEAT EXCHANGERS 21

This chapter provides a review of the fundamental concepts regarding fouling deposition, followed by the use of data-reconciliation techniques for minimising measurement errors in crude oil process monitoring, and ultimately discussing various strategies for estimating fouling models parameters. Major contributions on each of these parts are highlighted, and their corresponding limitations are detailed and discussed.

2.1 Fouling Deposition in Heat Exchangers

As mentioned in Chapter 1, fouling mechanisms are generally classified into five major categories (Epstein, 1983). These categories are not restricted to crude oil, but some of these mechanisms frequently arise in crude oil applications, specifi- cally in the pre-heat train. The essential characteristics and common development stages of each mechanism are listed in this section, along with the main opera- tional variables that set-on the deposition of solid materials on heat exchangers.

2.1.1 Fouling Mechanisms

Particulate Fouling

Particulate fouling is defined as the deposition of solids suspended in the work- ing fluid, and finally attached to a heat transfer surface (Kashani et al., 2012). In heat exchangers, the two main deposition mechanisms for this category are gravitational settling and transport of particles. For this to occur, the particles in suspension are first transported to the surface via several mechanisms such as diffusion, Brownian motion or, in the case of large-size particles, momentum. Once these particles arrive and attach to the surface, they are considered as part of a fouling layer (Bott, 1995, Ch. 7).

Crystallisation Fouling

This mechanism is defined as the phase-change process from a supersaturated solution of dissolved substances onto the heat transfer surface, and it is mainly categorised into two groups (Epstein, 1983).

(i) Precipitation fouling: Also known as scaling, where dissolved substances precipitate onto the heat transfer surface when either a heating or cooling process is applied. 22 CHAPTER 2. LITERATURE REVIEW

(ii) Solidification fouling: Deposition of solid substances, produced by freezing of the working fluid. This type of fouling mechanism is also known as icing.

The main difference between particulate and crystallisation fouling mechanisms is that in the latter, an incrustation process takes place, and during the heat- ing/cooling process, the supersaturation of the fouling layer in the vicinity of the deposition area is the dominant driving for the deposition mechanism (Bohnet, 1987).

Chemical Reaction Fouling

Chemical reaction fouling is defined as the deposition and transport of insoluble products of a chemical reaction to the heat transfer surface, which usually plays a catalytic role rather than a reactive one (Epstein, 1983). Generally, this re- action takes place via a three step mechanism, where the reactants and fouling agents (products) are identified. In some cases, the precursors are mixed with the working fluid and form the reaction products within a heat exchanger (Watkin- son, 1992, Watkinson and Wilson, 1997). Alternatively, the working fluid may be free of precursors, but depending on the temperature and kinetic conditions, the chemical reaction products are formed on the surface or in the fluid bulk. Figure 2.1 depicts a general multi-step chemical reaction fouling mechanism that produces a solid fouling layer. A list of potential causes for chemical reaction fouling is shown below (Watkinson and Wilson, 1997):

Figure 2.1: A typical reaction mechanism for chemical reaction fouling on a heat transfer surface (Watkinson and Wilson, 1997). 2.1. FOULING DEPOSITION IN HEAT EXCHANGERS 23

(i) Suspended impurities attached to the surface.

(ii) Insoluble gums due to auto-oxidation or oxygen entrance from storage tanks or leaks.

(iii) Asphaltenes precipitation due to changes in temperature and composition along a heat exchanger.

(iv) Chemical reaction between sulphur-soluble components and the tube-wall surface.

(v) Coke formation via thermal decomposition of the oil components.

Among these possible causes, the precipitation of asphaltenes has been considered as the major influence in crude oil pre-heat trains (Asomaning and Watkinson, 2000), although its study is still evolving. Asphaltenes are a complex mixture of compounds that represent the heaviest and most polar fractions of a crude oil cut. These compounds are mainly soluble in toluene and insoluble in n-heptane (Watkinson and Wilson, 1997, Mullins, 2008). Previous investigations have studied the instability or incompatibility between crude oils and asphaltene molecules (Wiehe and Kennedy, 1999, Derakhshesh et al., 2013), in other words, the formation of separated phases resulting from any significant change in temperature, pressure and/or composition. A useful indicator of the stability of a crude oil is the Colloidal Instability Index or C.I.I., shown in Equation 2.1. This indicator is defined as the ratio between the con- centrations of saturates and asphaltenes and the concentration of aromatics and resins contained in a specific crude oil (Asomaning and Watkinson, 2000).

saturates + asphaltenes C.I.I. = (2.1) aromatics + resins For values of C.I.I. less than one, the crude oil will be stable and asphaletenes will not precipitate on the surface. On the other hand, when the C.I.I. is greater than one, asphaltenes may start precipitating and chemical reaction fouling is expected.

Corrosion Fouling

Numerous definitions of corrosion fouling can be found in the literature (Epstein, 1983, Bott, 1995, Somerscales, 1999). Generally speaking, this mechanism is 24 CHAPTER 2. LITERATURE REVIEW described as the accumulation of unwanted corrosion products that are formed via the deterioration or chemical reaction between the working fluid and the heat transfer surface. These corrosion products might arise from the working fluid, impurities in pipes or traces of components within the stream. It is assumed by most authors that this definition should be applied only to those products that are the result of a chemical reaction where the heat transfer surface acts as a reactant (also called in-situ corrosion). When the source of these corrosion products is not the heat transfer surface itself, the term ex-situ corrosion fouling is used. However, as a general convention, the latter type of corrosion is conveniently referred as precipitation or particulate fouling, due to the similarity between both mechanisms.

Biological Fouling

In crude oil industries, biological fouling is not as frequent as the other mecha- nisms, but is one of the most commonly encountered types of fouling in cooling water systems. These processes use water streams at thermal levels similar to am- bient conditions, hence the appropriate conditions for the growth of living matter are rapidly achieved (Bott, 1995). Biological fouling is known as the growth of micro- or macro-organisms onto the heat transfer surface (Epstein, 1983). Gen- erally, this mechanism enhances other deposition processes such as precipitation and corrosion.

2.1.2 Stages of Fouling

Typically, most of fouling deposition processes follow a series of stages that de- termine the rate of growth of a specific fouling layer. Note that this multi-stage progression is not limited for all cases of fouling. Either the physical character- istics of a fouling layer, or the process states (i.e. flow rate, temperature and pressure) can have a significant effect on one or more of these stages.

Initiation

Normally, the formation of a fouling layer on a clean heat transfer surface does not start instantly, but it may be delayed depending on the local conditions such as wall temperature, surface roughness and degree of supersaturation (for crystalli- sation processes). This induction time can be significantly short (of the order of a 2.1. FOULING DEPOSITION IN HEAT EXCHANGERS 25 few seconds) or may take several days, before a decrease in the overall heat trans- fer coefficient can be recognised (Deshannavar et al., 2010). In cases of chemical reaction fouling, the initiation period is affected by the surface temperature, as induction reactions are enhanced with the increase of thermal conditions (Kazi, 2012).

Transport

This stage can be described as the transportation of fouling agents from the bulk of the fluid, through the boundary layer, onto the heat transfer surface. In most cases, the transport stage is driven by the concentration gradient within the boundaries. However, it is believed that an unusual temperature gradient is what the deposition particles to be transported from one location to the other. This mechanism is known thermophoresis and it is considered among the main transport phenomena that creates the on-set of this particular fouling stage (Epstein, 1983). In general, when the transport of fouling precursors is driven by mass transfer, the rate of transportation can be formulated using Equation 2.2.

dm f = K (c c ) (2.2) dt p p,b − p,s

Where Kp is the mass transfer coefficient, cp,b is the precursor concentration in the fluid bulk, and cp,s is the precursor concentration in the heat transfer surface.

Deposition

In this stage, the solid material is attached to the surface, or it can either react or abandon the heat transfer surface, depending on the controlling mechanism in the vicinity of the boundary (Deshannavar et al., 2010). If the deposition stage is controlled by sedimentation of particles, the sticking probability approach (Langmuir, 1916) can be used to model this stage. The deposition stage may also be controlled by crystals growth, mass transfer and surface attachment (Epstein, 1983).

Removal

In this stage, the solid material is removed from the heat transfer surface, depend- ing on how strong the attachment force of the fouling agents is. Under certain 26 CHAPTER 2. LITERATURE REVIEW circumstances, the removal stage begins with the deposition stage simultaneously, and it is controlled by mass transfer from the surface to the bulk of the fluid (Ep- stein, 1983). The removal rate depends on the fouling layer strength and wall shear . The amount of solids that forms a stable fouling layer is the result of the continuous competition between deposition and removal rates (Kazi, 2012).

Ageing

As the deposition stage starts, the ageing stage also starts. Over time, the me- chanical and chemical properties of the deposited layer vary, driven by changes in temperature, concentration or chemical reactions, resulting in several im- provements or deterioration of the fouling layer (Kazi, 2012). These changes in the layer’s properties have critical effects in the design and retrofit of heat exchangers. Some cases of ageing mechanisms include the polymerisation and re-crystallisation of solid components within the layer (Deshannavar et al., 2010). Over the years, ageing has been ignored due to its complexity, thus a significant amount of fouling models do not consider the effect of this stage. Some advances in this area can be found, such as the work proposed by Ishiyama et al. (2010) and Diaz-Bejarano et al. (2016), where kinetic and dynamic models have been developed to account for the changes in the fouling layer properties. These mod- els include the contributions of time and temperature, but have only included the changes in the fouling layer’s thermal conductivity. Nevertheless, these ap- proaches represent the most rigorous attempts for considering the influence of this stage into the thermal and hydraulic performance of heat exchangers.

2.1.3 Operational Variables Affecting Fouling

In crude oil refineries, fouling deposition exhibits a strong dependency with ther- mal, hydraulic and chemical conditions. An optimal set of these conditions can lead to a significant decrease in fouling occurrence. Therefore, understanding the inherent sensitivity between fouling occurrence and operating conditions is necessary for further monitoring and mitigation actions. The main operational variables in crude oil applications are listed and briefly described in this section.

Surface Temperature

The effect of surface temperature is of great importance, especially when chemical reaction fouling is the dominant mechanism. Several studies have proved that 2.1. FOULING DEPOSITION IN HEAT EXCHANGERS 27 surface temperature has an exponential behaviour with the deposition rate, as the latter increases with temperature, following an Arrhenius-type behaviour (Ebert and Panchal, 1995, Watkinson, 2007). However, surface temperature can have different effects when other fouling mechanisms occur. In crude oil applications, the asphaltene deposition due to chemical reaction foul- ing increases with an increase in surface temperature, as the solubility of these particles rises in warmer conditions (Watkinson, 2007).

Flow Velocity

Flow velocity has different effects, depending on the controlling fouling mecha- nism. Whether mass transfer or chemical reaction controls the fouling deposition, flow velocity may increase or decrease the fouling rate for specific temperature and heat flux conditions (Asomaning, 1997, Deshannavar et al., 2010). When mass transfer dominates the deposition phenomenon, the fouling agents’ mass flux increases with an increase in flow rate, thus increasing the fouling rate. However, mass transfer depends on the mass transfer coefficient which has a significant dependence with temperature (when the physical properties of the fluid are not constant), and thermal conditions also affect the solid deposition in different ways. In the case of chemical reaction fouling, an increase in flow velocity will negatively affect the fouling rate. The surface temperature is reduced due to the decrease in flow velocity, thus declining the overall fouling rate (Asomaning, 1997).

Crude Oil Composition

Crude oil contains several components that lead to the formation of fouling layers. Substances such as asphaltenes and sulphurs compounds are examples of fouling precursors that can be found in crude oils. In cases when the concentration of these materials is relatively high, an increase in the fouling rate is expected, for fixed temperature and velocity conditions (Deshannavar et al., 2010). Crude oil blending is also an important factor to account for when preventing fouling. Some blends can reach high levels of instability after mixing, resulting in faster asphaltene precipitation (Wiehe and Kennedy, 1999). There are several other cases, where the concentration of some components may reduce the fouling rate, as they produce a scouring effect in the heat transfer surface, enhancing the suppression rate. 28 CHAPTER 2. LITERATURE REVIEW

2.2 Fouling Modelling in Crude Oil Heat Ex- changers

Over the years, the development of fouling models has continuously improved our understanding of fouling deposition, as numerous prediction frameworks are available in the literature. The core of these models comes from theoretical anal- yses and empirical evidence from laboratory work. As a result, mechanistic and semi-empirical models are commonly used in crude oil applications. The main concept under the majority of the current fouling models is the one proposed by Kern and Seaton (1959), where the fouling rate in a specific geometric domain is defined as the difference between a rate of deposition, or φD and a rate of suppression, or φS. The general trade-off between these variables is defined in Equation 2.3.

dR f = φ φ (2.3) dt D − S The physical nature of these two terms depends on the main phenomenological mechanisms that control the deposition and suppression processes. The first one is usually described as a combination of chemical reaction and mass transfer, between the heat transfer surface and the deposit agents. The second term is often regarded as a mixture of shear stress and mass transfer effects (Deshannavar et al., 2010), involving the Reynolds number or the friction factor. Depending on the main fouling mechanism, both fouling rates in Equation 2.3 are formulated differently, using several physical properties and process conditions to estimate their values. Several cases can be analysed using Equation 2.3, the simplest one being when the rate of deposition is equal to the rate of suppression, which indicates that the fouling rate is equal to zero. In cases where the suppression rate is null, and the deposition conditions remain unchanged during a fixed period of time, a linear trend in the fouling rate is expected. Depending on the dynamics of each fouling rate, several behaviours are explored, some other examples are falling and asymptotic rates (Kazi, 2012), illustrated in Figure 2.2. As mentioned in Section 2.1, a diverse number of fouling mechanisms have been identified for different working fluids, and various modelling attempts are found for each of them. However, only a set of these mechanisms are abundant in crude 2.2. FOULING MODELLING IN CRUDE OIL HEAT EXCHANGERS 29

Figure 2.2: A general description of different fouling rate behaviours (Kazi, 2012) . oil applications, these being the deposition of particles and chemical reaction fouling (Ishiyama et al., 2013). This section outlines the characteristics and lim- itations of the available models for these two mechanisms, with special attention to chemical reaction fouling, as this mechanism is usually identified as the most influential in crude oil refineries (Watkinson, 1988). This part also introduces the concept of threshold fouling, a concept that provides important and useful insights for the design of fouling mitigation strategies.

2.2.1 Particulate Fouling

Following the modelling approach proposed by Bohnet (1987), there is a propor- tional relationship between the mass flow rate of the working fluid and the rate at which solids are deposited. The amount of solid material that is deposited in the heat exchanger, mf is proportional to the fouling resistance Rf , when the physi- cal properties of the fouling layer, such as density (ρf ) and thermal conductivity

(λf ), are constant. This relationship is shown in Equation 2.4.

mf = ρf λf Rf (2.4)

In the mechanism shown in Equation 2.4, the deposition and suppression rates depend on different variables. The first one is defined as a function of the concen- tration of solids and does not depend on time. The suppression term is regarded 30 CHAPTER 2. LITERATURE REVIEW

relative to the wall shear stress and the fouling layer thickness. These proper- ties change with variations in the stream velocity. Mathematical expressions for both, deposition and suppression terms, to represent the increase in the fouling resistance over time are given by Equations 2.5–2.7.

A φ = K c v cr (2.5) D 1 · f · · S τ δ φ = K W · f ρ (2.6) S 2 · µ · f dRf 1 = (φD φS) (2.7) dt ρf λf − where K1 and K2 are empirical constants, cf is the solid particles concentration, v is the stream velocity, Acr is the cross-sectional area of the fluid flow, S is the

heat transfer area, τW is the wall shear stress, δf is the fouling layer thickness and µ is the fluid viscosity. In some crude oil applications, the deposition of particles is considered using a

constant rate α1, following Equation 2.8 (Weston, 2014). Although this formula- tion is rather simplistic, the implementation of constant values for fouling rates (and fouling resistance) has been used in numerous cases, but at the same time fairly criticised (Somerscales, 1990).

dR f = α (2.8) dt 1

2.2.2 Chemical Reaction Fouling

The modelling of chemical reaction fouling is not a straightforward task, due to the vast amount of thermal conditions and different types of feed streams that are processed in crude oil refineries (Crittenden et al., 1987). Depending on the process stage, several chemical reactions are carried out at each part of the pre-heat train. In these cases, decomposition reactions such as pyrolysis or thermolysis are usually dominant (Watkinson, 2007). The modelling perspective has changed over the years. Initially, chemical reaction fouling models were treated from a mechanistic point of view, until the fouling threshold concept arose and provided a more grounded base for the understanding of fouling behaviour, along with the opportunity to expand the study and design of mitigation strategies (Rodr´ıguez,2005). 2.2. FOULING MODELLING IN CRUDE OIL HEAT EXCHANGERS 31

Mechanistic Models

An early modelling attempt was proposed by Crittenden et al. (1987). The au- thors developed a multi-stage mechanism based on the transport of reactants from the bulk of the fluid to the reaction zone. Once the reaction occurs, the de- position of the reaction products is carried out towards the heat transfer surface. Further reactions may still occur after some reaction products are transported to the bulk of the fluid. The model includes mass transfer and first-order kinetics and the fouling rate is shown in Equation 2.9.

dRf 1 cp,b =  Kf cf,s (2.9) dt ρ λ 1 1 − f f +  K k   p r1    where Kp and Kf are the mass transfer coefficient of the reactants and products respectively, kr1 is the reaction kinetics constant, cp,b is the concentration of reactants in the bulk of the fluid and cf,s is the concentration of reaction product in the attachment surface. The implementation of this model is limited by the detailed information needed for the properties of the fouling materials and the complexity added via the calculation of the mass transfer coefficients and reaction kinetics. Moreover, the model only considers a formation rate, although a suppression rate can be accounted for. Crittenden et al. (1992) proposed a crude oil fouling model using three years of operating data. These data included a series of heat exchangers located down- stream of the desalter unit and the values of fouling resistance were fitted against a tailored fouling model including chemical reaction. Two empirical constants including the activation energy were estimated and the results showed that the fouling behaviour was mostly linear, for the majority of the network. The fouling model used for these estimations is shown in Equation 2.10.

dR E f = K exp − A (2.10) dt 3 R T  g W  where K3 is one of the empirical constants, EA is the activation energy, Rg the ideal gas constant and TW is the wall temperature, which is assumed to be con- stant during the period of study. A major drawback of this approach is that 32 CHAPTER 2. LITERATURE REVIEW

Equation 2.10 does not include the effect of fluid velocity as it only relates the fouling resistance rate with the wall temperature via reaction kinetics. Addition- ally, attachment terms such as the wall shear stress and the friction factor are not included, suggesting that the model does not account for suppression rates. Later, Epstein (1994) proposed a model to explain the initial amount of solid de- posits that is required for the back-diffusion from the heat transfer surface to the bulk of the fluid. The author suggested that there is a proportional relationship between the initial fouling rate and the amount of time the fluid is attached to the surface. The fouling model is presented in Equations 2.11 and Equation 2.12.

dR k φ f = r2 D (2.11) dt t=0 ρf λf

cp,b φD = (2.12) 2/3 2 K4Sc K5ρv f 1/2 + a 1 vf µ exp ( E /R T ) c −   · − A g W,0 f,s ! where K4 and K5 are empirical constants, kr2 the kinetics constant, Sc the

Schmidt number, f the friction factor, TW,0 the initial wall temperature and a is the reaction order for the specific reaction and attachment processes. The first term in the denominator of Equation 2.12 represents the mass flux of reactants to the heat transfer area. The second term represents the chemical reaction kinetics and attachment. A limitation of this model is that it is not practical to apply it in crude oil distillation systems, mainly because the details about the Schmidt number and the reaction orders are unknown most of the times. Information about precursors such as composition and quantity adds another dimension of complexity to the use of this approach.

Fouling Threshold Models

Threshold fouling can be referred to as the set of conditions (mainly wall temper- ature and stream velocity) above which fouling would take place. This concept was introduced by Ebert and Panchal (1995). In their research, a set of data originally taken by Scarborough et al. (1979) was analysed. The crude oil was exposed to different thermal and dynamic conditions; as a result, the authors concluded that for certain values of velocity, there is a corresponding surface temperature bound below which no substantial fouling occurs. 2.2. FOULING MODELLING IN CRUDE OIL HEAT EXCHANGERS 33

The threshold model developed in their work assumes that the net rate of fouling is given by the difference between the formation and suppression rates. The first rate denotes the outcome of a one-step chemical reaction in the thermal boundary layer (instead the bulk fluid or the heat transfer surface). The suppression rate represents the removal of fouling deposits due to turbulence or diffusion from the boundary layer to the bulk of the fluid. The temperature profile in the boundary layer is considered to be linear and there is no concentration gradient of fouling precursors in the thermal layer. A significant distinction of this correlation compared to the one proposed by Kern and Seaton (1959) is that the suppression rate in the latter considers the mass transfer of solid deposits taking place after they are attached to the surface. By contrast, Ebert and Panchal (1995) considers the suppression process taking place before any deposit is attached. The resulting threshold model is shown in Equation 2.13.

dR E f = α Reβ1 exp − A γ τ (2.13) dt 2 R T − 1 W  g f  where α2, β1 and γ1 are the empirical parameters estimated for the specific crude oil that was tested. The first term on the right hand side of Equation 2.13 represents the formation rate caused by chemical reaction in the boundary layer, under an average film temperature Tf . The suppression term is represented by the second term Equation 2.13 and relates the transport mechanism via the wall shear stress. The film temperature is defined as a weighted average between the bulk and wall temperatures Tb and TW respectively, as shown in Equation (2.14).

T = T + 0.55 (T T ) (2.14) f b W − b The most important feature of this model is that it is capable of predicting the threshold temperature. In other words, for a given wall shear stress, the film temperature that nullifies the fouling rate in Equation 2.13 is said to be the threshold temperature, under which fouling occurrence can be neglected. If this methodology is applied to several values of shear stress, a threshold fouling curve can be obtained. This curve is of great help for process engineers, as its use allows for determining a set of operating conditions where no fouling deposition is expected. An example of a typical fouling threshold curve is depicted in Figure 2.3. 34 CHAPTER 2. LITERATURE REVIEW

Fouling zone

No fouling zone Film Temperature (°C)

Wall Shear Stress (Nm-2)

Figure 2.3: A typical fouling threshold curve. Adapted from Ebert and Panchal (1995)

A key limitation of the model in Equation 2.13 is that it does not account for the changes in the type of crude, reflected in the change in physical properties such as specific heat and thermal conductivity. For this reason, the model was modified and a new one was proposed by Panchal et al. (1999). As an improvement, the authors added the Prandtl number, in order to account for different sets of physical properties. The new model was used later by Asomaning et al. (2000) in an attempt to obtain extrapolation capabilities between laboratory and field- data. The fouling threshold model is given by Equation 2.15.

dRf β2 0.33 EA = α Re P r− exp − γ τ (2.15) dt 3 R T − 2 W  g f  The application of Equation 2.15 for estimating threshold condition showed incon- clusive results, mainly because the model, which was determined using laboratory- data, was not suitable for extrapolation to on-site conditions. The authors related these shortcomings to factors such as fluid composition and fluid dynamics. Polley et al. (2002) analysed the results from Equation (2.15) and compared them with the experimental threshold conditions published by Knudsen et al. (1999). The main conclusions were that model developed by Panchal et al. (1999) overestimates threshold temperatures for several flow velocities. Based on these conclusion, a different fouling threshold model was proposed. The adjustments applied to the model were based on physical concepts such as the chemical reaction temperature, mass transfer processes and turbulent flow via the use of Reynolds number. Physical properties were evaluated at bulk temperature, 2.2. FOULING MODELLING IN CRUDE OIL HEAT EXCHANGERS 35 although the authors claimed that may be better to use the film temperature. Considering these facts, the proposed modifications were listed (Polley et al., 2002):

(i) The use of wall temperature TW instead of film temperature Tf in the de- position term.

(ii) The update of the exponent of Reynolds number in Equation 2.15 to a fixed value of 0.8.

(iii) The use of a velocity-dependent term in the suppression rate as an opposing 0.8 mechanism to fouling formation, that is, Re− .

The resulting fouling threshold model proposed by Polley et al. (2002) is shown in Equation 2.16 where a new set of empirical parameters α4 and γ3 are used.

dRf 0.8 0.33 EA 0.8 = α Re− P r− exp − γ Re (2.16) dt 4 R T − 3  g W  The model in Equation 2.16 was able to determine threshold conditions and ini- tial fouling rates. However, the calculation did not achieve the expected accuracy, mainly due to the absence of information regarding the crude oil physical prop- erties. In order to develop a more accurate model, Yeap et al. (2004) proposed further modifications to Equation (2.16) combining its fundamental principles with those of Epstein (1994). In cases when the friction factor is a direct calculation, the model can be re-arranged into a function of three parameters, namely α5, β3 in the formation term, and γ4 in the suppression term, shown in Equation 2.17.

2/3 2/3 4/3 dRf α5 f v TW ρ µ− 0.8 = · · · γ4v (2.17) dt 1 + β v3 f 2 ρ 1/3µ 1/3T 2/3exp (E /R T ) − 3 · · · − − W A g W The model exhibited better fitting capabilities to experimental data, compared to those of Panchal et al. (1999) and Polley et al. (2002), due to its multiple velocity-dependent terms. However, the application of the model was restricted to a spedific range of temperatures, thus the comparison carried out in their study did not consider the entire range of operating conditions originally provided by Panchal et al. (1999). 36 CHAPTER 2. LITERATURE REVIEW

A simpler model was proposed by Nasr and Givi (2006). In their study, thresh- old curves and fouling conditions were determined for an Australian crude oil. The parameters of the model were estimated and compared against other semi- empirical correlations, namely the one developed by Polley et al. (2002). Other types of crude oil were tested in this study, resulting in more a trustful model, exhibiting better fitting capabilities. However, the model lacks a physical basis,

as the values of its parameters (i.e. α6, β4, γ4) are not integrated with the work- ing fluid’s physical properties, as the model in Equation 2.18 only includes the Reynolds number. The fouling threshold model is given by Equation (2.18).

dR E f = α Reβ4 exp − A γ Re0.4 (2.18) dt 6 R T − 5  g f  A recent alternative to the previously mentioned threshold models is the one proposed by Shetty et al. (2016). In their work, three different crude oils were tested at different operating conditions, namely bulk and surface temperatures.

The inclusion of an effective temperature Teff , which accounts for the effect of bulk and surface temperatures in the initial formation rate was highlighted as a model feature, and reported as a phenomenon that had not been considered in previous research. The results were compared with those obtained by Panchal et al. (1999), Polley et al. (2002) and Nasr and Givi (2006), showing a more accurate agreement for all the crude oils tested. The improved model and the definition of Teff are given in Equation 2.19 and Equation 2.20 respectively.

dRf β5 0.33 EA = α Re P r− exp − γ τ (2.19) dt 7 R T − 6 W  g eff 

Teff = β6TW + γ7Tb (2.20)

where the set of parameters α7, β5, γ6, β6 and γ7 are empirical parameters for estimating the formation rate, suppression rate and the effective temperature respectively. Similarly to the previous fouling models, each parameter should be estimated for specific types of crude oil, considering different physical properties. The prediction of fouling threshold conditions has allowed designers to specify heat exchangers and heat exchanger networks in such a way that fouling occur- rence can be avoided as much as possible. Numerous advantages are linked with narrowing the gap between the understanding of fouling deposition and key mod- elling approaches such as design and retrofit. However, it is still necessary to 2.3. DATA RECONCILIATION IN INDUSTRIAL APPLICATIONS 37 manage the lack of fundamental information such as crude oil physical properties and construction materials, which pose a further challenge in the extrapolation from experimental testing to on-site conditions.

2.3 Data Reconciliation in Industrial Applica- tions

Reliable process information is paramount in any industrial operation. Accurate measurements can provide useful insights when characterising specific processes related to operational design. These insights are usually affected by measure- ment errors, which are often inevitable and driven by the use of measurement instruments (Narasimhan and Jordache, 2000, Ch. 1). A measurement error (ξ) is defined as the difference between a process state’s measured value (xm) and its corresponding nominal value (xr). Alternatively, a measurement error can also be represented as the sum of random and gross errors, defined by rξ and gξ respectively. Both definitions, in vector form, are shown in Equations 2.21 and 2.22.

ξ = x x (2.21) m − r

ξ = rξ + gξ (2.22)

Random errors are defined as arbitrary events that can cause disruptions within the data. They are produced by changes in the environment, power fluctuations, etc. In process industries, random errors can be estimated using a normal prob- ability distribution with zero mean and known standard deviation (σ). It has been reported that in industrial measurements, random errors are usually found within the range of 3σ (Narasimhan and Jordache, 2000, Ch. 2). ± Gross errors, also known as systematic errors, are produced by non-random events such as miscalibrations, equipment leaking or instrumental malfunctions. Their magnitudes are often higher compared with random errors, thus it is important to reduce their effect accurately before any reconciliation attempt takes place. Com- mon techniques for detecting and mitigating gross errors are the use of statistical tests and nonlinear programming (Romagnoli and S´anchez, 1999, Ch. 5). 38 CHAPTER 2. LITERATURE REVIEW

Commonly, process industries establish a measurement network around key pro- cess units such as heat exchangers, storage units and pumps. The selection of the process states that are to be measured is a challenging task, as the number of measurement instruments is limited by capital costs and the redundancy of information needed for estimating any subset of unmeasured states. Under the right conditions, data reconciliation can handle the lack of information by si- multaneously reconciling the measured variables and estimating the unmeasured ones. The following sections describe the most significant methodologies for addressing each of the items mentioned above, that is, the reconciliation of measured data, the detection of gross errors and the estimation of unmeasured process states within an instrumentation network.

2.3.1 Reconciliation of Measured Data

There is a wide variety of formulations for a data reconciliation problem. Gener- ally, the solution of a data reconciliation problem is optimisation-based, thus its formulation typically depends on the objective function and the nature of the sys- tem’s constraints. In other words, a data reconciliation problem can be classified as steady-state, dynamic, linear and nonlinear (Narasimhan and Jordache, 2000, Ch. 1). This section is focused on steady state data reconciliation approaches, as these methods are relevant to the scope of this thesis and commonly used industrial and academic applications. The first reported analysis of a data reconciliation problem in the context of chemical engineering was done by Kuehn and Davidson (1961). The authors proposed a solution for a steady-state problem using Lagrange multipliers. The use of this approach has been widely implemented for different industrial sys- tems, where the conservation of mass and energy equations are commonly used as process constraints. Furthermore, the major advances and challenges regard- ing data reconciliation have been extensively reviewed and described in previous publications (Crowe, 1996). A general formulation of the data reconciliation problem, for fully-instrumented and free-of-gross-error systems is shown in Equation 2.23, where the functions f (xr) and g (xr) represent the set of equality and inequality constraints, respec- tively. The solution of Equation 2.23 delivers the vector of reconciled values for 2.3. DATA RECONCILIATION IN INDUSTRIAL APPLICATIONS 39 all measurements. Each measurement in the objective function of Equation 2.23 is weighted by its corresponding accuracy (i.e. variance, σ2) via the use of the covariance matrix ψ.

T 1 min (xm xr) ψ− (xm xr) xr − −

s.t. f (xr) = 0 (2.23) g (x ) 0 r ≤ Different methods for solving Equation 2.23 are available, depending on whether the system under study present linear or nonlinear characteristics. Both cases are described in the following sections, as these methods are interconnected through the use of methods such as linearisation and nonlinear programming.

Linear Data Reconciliation

The simplest formulation for a data reconciliation problem lies when the process constraints are described by linear expressions such as total mass balance. In this case, no inequality constraints are considered, and the set of equality constraints f (xr) can be re-written as f (xr) = Arxr. The optimisation problem subject to this new set of constraints is given by Equation 2.24, where the matrix Ar is usually represented as an incidence matrix, which contains the relationship be- tween different process streams and their corresponding process units. Moreover, the product Arxr should result in the mass balance equations around the system that is desired to be reconciled.

T 1 min (xm xr) ψ− (xm xr) xr − − (2.24) s.t. Arxr = 0

The solution of Equation 2.24 is obtained via Lagrange multipliers and by set- ting the necessary conditions for optimality (Kuehn and Davidson, 1961). This solution provides an analytical approach for finding the set of reconciled values, and it is given by Equation 2.25. Note that this approach is usually applied in cases where only mass balance equations are available, or in cases where the set of constraints can be linearised.

1 x = x ψAT A ψAT − A x (2.25) r m − r r r r m  40 CHAPTER 2. LITERATURE REVIEW

The solution shown in Equation 2.25 usually estimates the vector of reconciled values accurately. However, a decrease in performance is expected when linear- ity deviations are within the constraints, such as bilinear terms and especially nonlinear cases.

Nonlinear Data Reconciliation

For the majority of industrial applications, the numerous process variables are mostly related by nonlinear equations such as energy balance, semi-empirical correlations and thermodynamic laws. Additionally, process specifications or set- points are defined for certain states, increasing the complexity and reducing the size of the solution space for finding feasible solutions. To account for these issues, a nonlinear-constrained optimisation problem can be formulated and solved to find the set of reconciled values. Several approaches have been proposed for solving the nonlinear data reconcilia- tion problem. The use of Lagrange multipliers was applied by (Britt and Luecke, 1973), allowing for a general estimation of the reconciled values. Later, an inte- grated framework consisting on the linearisation of the nonlinear constraints was utilised on each iteration for calculating the Lagrange multipliers, reducing the size of the problem (Madron, 1992). However, unlike linear data reconciliation, the estimation of reconciled values in these cases is not straightforward, and an iterative procedure is needed for computing each partial derivative. These numer- ous iterations increase the computational time, complicating the implementation of this type of approaches in most cases. A simpler and more effective method for addressing nonlinear data reconcilia- tion was developed by Swartz (1989). In this method, the nonlinear constraints are linearised and a linear data reconciliation problem is solved iteratively using Equation 2.25. The difference between consecutive solutions at each iteration are compared, and a final solution is found when this difference is lower than a previously defined level of tolerance. An initial estimate of the reconciled values is needed, and the calculation of Jacobian matrices is performed. Variations of this procedure have been establish to reduce the computational time, such as the one proposed by (Pai and Fisher, 1988), where the Jacobian matrices were updated in-between each iteration rather than directly calculated. The use of this method is limited by the existence of a trade-off between convergence and the magnitude of the measurement error within the data. This fact also affects 2.3. DATA RECONCILIATION IN INDUSTRIAL APPLICATIONS 41 the optimality of the solution, as the more iterations needed for convergence, the greater the risk of oscillating among local minima (Narasimhan and Jordache, 2000, Ch. 5). Moreover, the use of an analytical solution does not allow for han- dling inequality constraints, which are useful for setting lower and upper bounds to each optimisation variable. The use of nonlinear programming (NLP) techniques are frequently used and, more importantly, more robust than the previously mentioned methods. The most significant advantages of these techniques are their reliability in terms of convergence, their flexibility when dealing with different objective functions, and their capability for dealing with inequality constraints (Romagnoli and S´anchez, 1999, Ch. 5). In the context of chemical processes, it is common to find the use of Sequential Quadratic Programming (SQP) and Generalised Reduced Gradient (GRG) methods for solving the nonlinear data reconciliation problem. The optimisation via SQP method consists on solving successive optimisation problems using a quadratic approximation of the objective function and a linear approximation of the constraints using Taylor series. The quadratic form of the objective function includes: the gradient of the original objective function (with respect to the measured variables), a search direction and the Hessian matrix of the original objective function. There are several advantages when using SQP in a nonlinear data reconciliation problem. First, the objective function (Equation 2.23) is already quadratic, leaving the set of constraints as the only part of the problem that needs to be reformulated. Second, as pointed out in Narasimhan and Jordache (2000, Ch. 5), the Hessian matrix has a constant value, hence, no further calculations or updates of its value are needed throughout each iteration. Lastly, only the final solution of this method guarantees feasibility with respect to the nonlinear constraints, whereas the intermediate solutions follow an infeasible path, requiring less computational time. The GRG method linearises the objective function and the constraints, and solves a series of linear programming problems in order to minimise the objective func- tion, using a reduced set of optimisation variables called nonbasic, or indepen- dent. This nonbasic set defines a subsequent set called basic or dependent. Once a search direction that minimises the objective function in the nonbasic sub- set is found, the set of basic variables are calculated. The reformulation of the original nonlinear problem into successive linear programming problems, along with the reduced-space algorithm of this method bring meaningful advantages 42 CHAPTER 2. LITERATURE REVIEW in terms of computational time and feasibility. At the same time, however, the re-arrangement of the objective function and constraints is more computation- ally expensive than that of the SQP method. In addition, the GRG method intrinsically guarantees constraint feasibility at each iteration, exhibiting more robustness than the SQP algorithm, but less efficiency in terms of calculation speed. Generally speaking, the use of NLP algorithms are more beneficial than the suc- cessive linearisation method. Nevertheless, it is important to account for sub- stantial features such as the scaling of the problem, computational power and the magnitudes different measurement errors.

2.3.2 Gross Error Detection

Gross or systematic errors are usually found in measurement instruments and process units that present persistent miscalibrations or deterioration over a fixed period of time. In the case of measurement instruments, four main categories of gross errors are commonly encountered. These categories are bias, complete failure, drifting and precision degradation (Dunia et al., 1996). In process units, material leaks and hold-ups are normally considered as gross errors (Narasimhan and Jordache, 2000, Ch. 2). The presence of gross errors, regardless of their magnitudes, should be addressed properly, as they not only affect the measurements containing such errors, but also the ones related to the affected measurements via the process constraints. This propagation of the gross error is known as smearing effect (Narasimhan and Jordache, 2000, Ch. 7) and leads to unreliable reconciliation results for measure- ments containing gross errors as well as over-corrections of those that are free of gross error (Martini et al., 2014). The smearing effect is expected in cases when a particular set of data containing gross errors is reconciled using the objective function in Equation 2.23. The presence of these gross error unavoidably impairs the estimation of the reconciled values, since the optimisation solution will be driven towards adjusting the measurements with gross errors, resulting in the over-corrections for those free-of-gross-error variables. In order to be able to account for the presence of gross errors, a series of stages are to be considered. These stages are not restrictive to all cases, but the use of one or more of these steps significantly increases the performance of any data reconciliation solution (Narasimhan and Jordache, 2000, Ch. 7). 2.3. DATA RECONCILIATION IN INDUSTRIAL APPLICATIONS 43

(i) Detection problem: In this step, the presence of gross errors is detected.

(ii) Identification problem: This stage allows for identifying if the detected gross error is related to measurement instruments or process units.

(iii) Multiple gross error identification problem: Here, the presence and type of multiple gross errors are elucidated.

(iv) Estimation problem: In this stage, the estimation of the magnitude of all detected gross errors is performed.

The detection problem is most frequently solved via the use of statistical tests, which take advantage of the fact that random errors are well approximated by a normal probability distribution, as mentioned in Section 2.3. Gross errors are able to alter the overall behaviour of the measurement error, and the use of sta- tistical tests allows for detecting such deviations. Two statistical hypotheses are tested, the first one called null hypothesis (H0), where it is assumed that no gross errors are contained in the data. The second hypothesis is called the alternative hypothesis (H1), which aims for the presence of gross errors. A representative indicator (or test statistic τ) is calculated for each hypothesis and their values are compared with a pre-specified threshold value τc, related to the critical proba- bility region given by a certain level of significance δ. The null hypothesis is then accepted or rejected depending on the result of this comparison (Narasimhan and Jordache, 2000, Ch. 7).

Along with the use of the aforementioned statistical test, most detection problems are solved using the residuals of the process constraints as a base for building up the test statistic τ. In the case of linear systems and steady state conditions (which will be mostly referred to from now on), the vector of constraints residual qξ is shown in Equation 2.26.

q = A x = A (x ξ) (2.26) ξ r m r r −

In order to detect if these residuals in qξ deviate from their corresponding prob- ability distribution, the test function shown in Equation 2.27 is used, where the matrix φξ is the covariance matrix of the vector qξ, given in Equation 2.28. 44 CHAPTER 2. LITERATURE REVIEW

T 1 τ = qξ φξ− qξ (2.27) T φξ = ArψAr (2.28)

The most common detection test, known as the Global Test (Madron, 1985), uses the function defined in Equation 2.27 to accept or reject the null hypothesis. The global test is considered as passed if the null hypothesis is accepted. In this case, the value of τ will follows a chi-square probability distribution, with a specific number of degrees of freedom ν that corresponds with the full-row rank of matrix

Ar. In other words, when the value of τ is less than that of the specified threshold 2 τc = χ(1 δ) (ν), the global test is said to be passed. On the contrary, when τ τc, − ≥ the global test is said to be failed and a gross error is detected, with a level of confidence equal to (1 δ). Normally, a level of significance between 0.05 and − 0.10 is chosen in industrial applications (Romagnoli and S´anchez, 1999, Ch. 7). The simplicity of the global test is one of its greatest advantages, along with a significant suitability for data reconciliation problems, as the raw data can simply be set as an input to the test, before solving the reconciliation problem. However, the test does not provide any insight as to what type of error is contained within the data, neither for whether multiple errors are present. Other statistical tests are available in the literature and used in chemical pro- cesses. The use of the residual vector qξ is also adopted in the Nodal Test (Mah et al., 1976), where each constraint is tested for the presence of gross error by utilising a test function that depends on each of the diagonal elements of the

covariance matrix φξ. The use of multiple statistical tests grants for a deeper analysis of the data-sets, but similar to the global test, it does not provide further information regarding the source and the type of the detected error. The different sources for a gross error, that is, a measurement instrument (bias) or a process unit (leak), when solving the detection problem can be accounted for using the Generalised Likelihood Ratio Test or GLR test (Narasimhan and Mah, 1987). This test makes use of a gross error model that can represent the difference between a bias and a leak. Depending on these cases, the null and al- ternative hypotheses are compared via the implementation of the likelihood ratio (LR) between the probabilities of obtaining the expected value of the residual vector qξ under both hypothesis. This ratio is shown in Equation 2.29, where the 2.3. DATA RECONCILIATION IN INDUSTRIAL APPLICATIONS 45 operator “sup” indicates the supremum among all possible bias or leaks in each measurement and constraint, respectively.

Prob q H LR = sup { ξ| 1} (2.29) Prob q H { ξ| 0} By implementing the GLR test, the data can be tested for the presence and identification of gross errors. This fact represents a significant advantage over the previous detection tests. However, its application is limited to linear systems (i.e. mass balance) and it requires previous knowledge regarding the type of gross error needed to be detected. Therefore, the complementary utilisation of these strategies can increase the accuracy of the gross error detection framework. For example, the global test can be used before a data reconciliation attempt; if the test fails and a gross error is detected, the GLR test can identify and locate such gross error. Finally, the data reconciliation problem can be solved, guaranteeing that no gross errors are contained in the data. The identification problem allows for locating the source of the gross error after it has been detected using a detection test (except for the GLR test). Most of the strategies for identifying systematic errors are focused in measurement biases, as the failure of measurement instruments can be considered as more likely to occur than equipment failure (Narasimhan and Jordache, 2000, Ch. 7). Rosenberg et al. (1987) described a serial elimination procedure, where individual measurements suspected to contain a gross error are treated as unmeasured variables. A data reconciliation problem is solved and the result is evaluated using the global test. This process is repeated for all measurements and the combination leading to the largest reduction in the objective function is regarded as containing a gross error. The application of the serial elimination procedure can be extended to the identi- fication of multiple gross errors and has been implemented in several contributions (Jiang et al., 2014, Martini et al., 2014). Alternatively, Narasimhan and Jordache (2000, Ch. 7) described a method for identifying a single gross error using principal component analysis. The method analyses the process constraints individually, and further evaluates the measurement adjustments after data reconciliation, in order to locate a faulty measurement, in case of measurement bias. The estimation of single and multiple gross errors are generally based on recursive methods. The integration of the nodal test and the serial elimination procedure was proposed by Serth and Heenan (1986). The authors developed an algorithm 46 CHAPTER 2. LITERATURE REVIEW capable of estimating gross errors using bound information on each measurement and evaluating their effect in the solution of the data reconciliation problem. Although the use of bounds for the measured values is useful from a practical perspective, the algorithm does not use bounds for process variables that are unmeasured, increasing the risk of constraint infeasibility for the estimations of these unmeasured variables. A more flexible approach was developed by S´anchez et al. (1999). In this work, a recursive strategy for simultaneously identifying and locating single and multiple gross errors in the form of bias, leaks and a combination of both was designed. The general optimisation problems for including both types of gross errors individually are shown in Equation 2.30 and Equation2.31, respectively; where Bξ is a location matrix that indicates the measurement or constraint related to the gross errors contained in the data. The proposed method relies on the sequential processing of constraints (Romagnoli and S´anchez, 1999, Ch. 6), along with the use of the global test, and the gross error models shown in Equations 2.30 and 2.31. A set measurements and process constraints are selected as potential biases and leaks candidates, depending on their global effect on the objective function. A data reconciliation problem is solved for all the possible combinations of these candidates, and the subset of measurements and constraints exhibiting the lowest value of objective function are said to contain gross errors. This methodology was only implemented in linear systems under steady state conditions, but it provided better results in terms of identifying systematic errors than those of Narasimhan and Mah (1987) and Serth and Heenan (1986).

T 1 min (xm xr gξBξ) ψ− (xm xr gξBξ) xr,gξ − − − − (2.30) s.t. f (xr, gξ) = 0 g (x , g ) 0 r ξ ≤

T 1 min (xm xr) ψ− (xm xr) xr,gξ − − s.t. f (x ) g B = 0 (2.31) r − ξ ξ g (x ) 0 r ≤

Another interesting approach for solving the simultaneous data reconciliation and gross error detection problems is the use of robust estimators. These estimators 2.3. DATA RECONCILIATION IN INDUSTRIAL APPLICATIONS 47 are based on objectives functions that are different from the least square estimator used in Equation 2.23, and present different sets of parameters that are specifically tuned for the problem under study. The presence is gross errors is eliminated by appropriately tweaking the parameters of the robust estimator. The use of robust estimators can produce reliable results, specially in cases where the deviation of the measurement error from a normal distribution are greatly noticeable. The most used robust data reconciliation frameworks are the ones proposed by Arora and Biegler (2001) and Ozyurt¨ and Pike (2004). More details regarding the use of robust estimators in industrial problems are described in the review of data reconciliation benchmarks collected by do Valle et al. (2018).

The performance of a gross error identification strategy can be evaluated us- ing several options. By carrying out a series of computational simulations and systematically adding pre-specified values of random and gross errors, the per- formance of the identification procedure can be measure using the overall power (OP ), the average type I error (AV T I), and the overall power function (OPF ) (Narasimhan and Jordache, 2000) shown in Equations 2.32–2.34.

number of gross errors correctly identified OP = (2.32) number of gross errors simulated

number of gross errors wrongly identified AV T I = (2.33) number of total simulation trials

number of simulations with perfect identification OPF = (2.34) number of total simulation trials

An important feature to account for when computing multiple data reconciliation solutions is the concept of equivalency of gross error (Bagajewicz and Jiang, 1998). Two or more sets of gross errors are equivalent when they have the same effect in the data reconciliation solution, that is, they present the same value of objective function (Equation 2.23) when independently calculated. This issue poses a major challenge and methodologies such as the one proposed by S´anchez et al. (1999) present a meaningful advantage compared to previous methodologies as it considers the effect of gross error equivalency, providing an accurate location and estimation of gross errors in systems where mass balances are involved. 48 CHAPTER 2. LITERATURE REVIEW

2.3.3 Presence of Unmeasured Process Variables

Typically, any industrial plant will have an instrumentation network around spe- cific process units, pipework and storage facilities, in order to monitor key pro- cess features that are important for operational and administrative decisions. The number of total measurement instruments for a specific part of the plant is restricted to instrumentation costs and technical feasibility (Romagnoli and S´anchez, 1999, Ch. 3). As a result, not all process variables will be measured, and an estimation of the unmeasured variables needs to be carried out in order to fully exploit the measured information. The presence of unmeasured variables adds another layer of complexity into the data reconciliation problem, as raises questions regarding the feasibility of estimating such unmeasured variables. The estimation of unmeasured variables via the use of measurements and process constraints was first addressed by V´aclavek (1969). In this work, a systematic classification of process variables was defined for measured and unmeasured vari- ables, and its usage allowed for reducing the size of the optimisation variables in the data reconciliation problem. Moreover, the following concepts were defined for unmeasured and measured variables, respectively:

(i) Observability: An unmeasured variable is observable, if said variable can be estimated using the available measured data and the process constraints.

(ii) Redundancy: A measured variable is redundant, if said variable is observ- able even if its measured value is no longer available.

The concepts above suggest that a specific classification is related to unmeasured and measured variables, as it is shown in Figure 2.4 and Figure 2.5 respectively. The integration of process variable classification provides a useful tool for solving a data reconciliation problem when unmeasured variables are present, and different approaches have been developed to solve such problem. In general, the most important contributions in the context of the treatment of unmeasured variables in data reconciliation are based on the analysis of the inter- relation between the process streams and units, via different sets of operational constraints. The information provided from this analysis has been interpreted by means of graphical methods and linear algebra. Along with the concepts of observability and redundancy, V´aclavek (1969) pro- posed a graphical method for decomposing a linear data reconciliation problem. 2.3. DATA RECONCILIATION IN INDUSTRIAL APPLICATIONS 49

Observable Redundant

Unmeasured Measured variables variables

Non-observable Non-redundant

Figure 2.4: Classification of unmea- Figure 2.5: Classification of measured sured variables variables

The author stated specific sets of rules in order to classify unmeasured variables successfully. This methodology was extended to bilinear models and chemical reaction systems for multicomponent streams in the work proposed by V´aclavek and Louˇcka (1976). The implementation of this methodology was limited by the narrow range of flow sheets to analyse, as units such as splitters were not considered.

The inclusion of energy streams (temperatures) and specific composition mea- surements was proposed by Kretsovalis and Mah (1987), following the insights from the previous study carried out by Mah et al. (1976). Chemical reactions and splitters were not considered until later (Kretsovalis and Mah, 1988a,b), but the overall novelty of these contributions was the systematic categorisation of mass and energy-related measurements without assuming the location of each measurement instrument. The authors were able to integrate the use of graph theory and linear algebra for classifying the process variables.

The use of linear algebra for the classification of process variables and the esti- mation of unmeasured states is mostly used nowadays, as it contributes with a more systematic and computationally-suited approach. The formulation of the problem is based on the decomposition of the data reconciliation constraints. Equation 2.23 can be re-written using a generalisation of the equality constraint f (xr), shown in Equation 2.35. This reformulation holds for linear constraints or the outcome of a linearisation procedure. If the set of unmeasured variables xu is added, the new data reconciliation problem is given by

T 1 min (xm xr) ψ− (xm xr) xr,xu − − (2.35) s.t. Axxr + Auxu = c 50 CHAPTER 2. LITERATURE REVIEW

where Au is the constraint matrix for the set of unmeasured variables, and vector c contains the constant values resulting from the balance equations in the set of equality constraints. Note that in Equation 2.35, only the set of measured

variables xr is in the objective function, as only the available measurements

can be used for solving the data reconciliation problem. If the entire set xu is observable, then the data reconciliation solution will include the measured reconciled values, and the estimation of the unmeasured variables.

Equation 2.35 can be solved by eliminating vector xu from the set of equality constraints. This is achieved by finding a projection matrix P , such that the use of this matrix can reduce the dimensionality of the system, that is, PAu = 0. Consequently, a reduced-space data reconciliation problem is obtained, given by Equation 2.36. The use of linear algebra techniques are driven by determining the projection matrix P , and maximising the amount of information this procedure can deliver regarding the observability of the variables in xu, and the redundancy of the measurements in xr.

T 1 min (xm xr) ψ− (xm xr) xr − − (2.36) s.t. PAxxr = P c Crowe et al. (1983) proposed a procedure that systematically reduces the columns

of Au. The projection matrix is determined from this procedure and a linear data reconciliation problem is solved. Although the proposed approach provides a projection matrix that eliminates the unmeasured variables, the amount of matrix operations can lead to significant computational burdens, depending on the size of the problem. Moreover, the classification of unmeasured and measured variables is not straightforward. An alternative and more appealing method was proposed by Swartz (1989). The authors introduce QR factorisation as a suitable method for determining the pro- jection matrix P . The proposed approach allows for decomposing a linear data reconciliation problem for cases when the vector xu contains observable and non- observable variables. The extension of this approach was implemented to bilinear systems in the work developed by (S´anchez and Romagnoli, 1996). A structural analysis of the reduced set of constraints and the solution of the estimation of

the vector xu is applied in order to determine the observability and redundancy of the process variables. In cases where non-observable variables are present, the determination of the projection matrix using QR factorisation grants a deeper 2.4. ESTIMATION OF FOULING MODEL PARAMETERS 51 understanding on the minimum number of instruments that are needed for ad- justing the number of measurements into a full estimable system (Narasimhan and Jordache, 2000, Ch. 3). This feature is particularly important for the design of instrumentation networks, as it is desired to maximise the amount of mea- sured data, while simultaneously minimising the investment for measurement equipment.

2.4 Estimation of Fouling Model Parameters in Crude Oil Pre-heat Trains

The need for extrapolating empirical fouling models to field conditions in crude oil applications was discussed by (Asomaning et al., 2000). The threshold model proposed by Ebert and Panchal (1995) was used for predicting the fouling be- haviour of a specific crude oil heated up in a field unit in a common refinery. The results were not satisfying and possible causes of such incorrect predictions were associated to the complexity in the threshold model (and fouling mechanism), crude oil composition, fluid dynamics and pressure effects. Consequently, later attempts to include the concept of fouling threshold into the monitoring and prevention of fouling deposition at industrial scale have focused on the design of methodologies for using particular fouling threshold models and integrating them with the specific characteristics of each case under study. These characteristics are the crude oil physical properties, fouling stages and mecha- nisms, and hydraulics. The use of fouling threshold models into the design of industrial crude oil heat exchanger networks was studied by Wilson et al. (2002). In this work, a graphical method was developed in order to select the most suitable heat exchangers for designing a heat exchanger network subject to chemical reaction fouling. The threshold model obtained by Polley et al. (2002) was used and the results allowed for a deeper analysis when designing heat exchangers, as the operational sen- sitivities between fouling resistance and changes in temperature can be further exploited. A follow-up study carried out by Polley et al. (2007), where a process- data-based approach was established for utilising validated threshold models (i.e. Ebert and Panchal (1995) and Polley et al. (2002)) in a short-cut model for simulating a heat exchanger. The effect of pressure drop in the heat exchanger 52 CHAPTER 2. LITERATURE REVIEW performance was also considered. The short-cut model and both fouling models were implemented in an industrial case study, where a simple data analysis was performed to identify possible outliers. However, this analysis was not sufficiently rigorous for classifying it as data reconciliation. Overall, the method introduced by Polley et al. (2007) supports the need for tailored fouling models for specific operating conditions and crude oil. A particularly interesting contribution was the development of a dynamic mod- elling scheme for crude oil heat exchangers subject to fouling by chemical reaction. This modelling scheme was introduced by Coletti and Macchietto (2011) and ac- counts for local and time-dependent changes in physical properties and fouling resistance, the effect of fouling deposition in pressure drop, and the change in the fouling layer’s thermal conductivity. A parametric ageing model developed by Ishiyama et al. (2010) and the threshold model generated by Ebert and Panchal (1995) were included in the modelling framework. A case study was carried out, where the parameters of the fouling model and the crude oil physical proper- ties were estimated using process data from a multi-pass heat exchanger. These data were filtered using statistical concepts, although no data reconciliation and gross error detection were performed. In addition, the hydraulic model lacked validation as pressure drop data were not available at the time. Costa et al. (2013) used a genetic algorithm to solve a parameter estimation prob- lem, applied to three different threshold models, i.e. Ebert and Panchal (1995), Panchal et al. (1999) and Polley et al. (2002). The authors also highlighted the main obstacles related to the parameter estimation problem in threshold mod- els, namely the difference in magnitudes of each parameter, the multiple local optima and the fact that the estimations are strongly dependent of their initial guesses. The estimation and prediction of fouling conditions were validated using real plant-data. The results showed accurate fittings, with an average error of approximately 8% for each threshold model, indicating that the genetic algorithm has a higher accuracy than some specific deterministic methods (i.e. Simplex and Broyden–Fletcher–Goldfarb–Shanno algorithms). However, no discussion regard- ing the use of any data-processing technique was given. In the context of the use of data reconciliation for improving the accuracy of regressed fouling threshold models in crude oil refineries, the work introduced by Ishiyama et al. (2013) represents a major contribution. The authors developed a software tool that allows for data reconciliation and the selection of different 2.4. ESTIMATION OF FOULING MODEL PARAMETERS 53 fouling models for individual heat exchangers in a crude oil pre-heat train. The data reconciliation approach is based on estimating fouling resistance values, in order to calculate missing temperatures in the network that are able to satisfy the heat balance around the system. Measurement errors were not directly included, but the data were still adjusted in order to satisfy explicit process constraints. The effect of gross error was not mentioned. The use of data reconciliation, gross error detection and estimation of unmea- sured process variables in a crude oil pre-heat train was integrated in a single methodology by Chebeir et al. (2019). The decomposition of the data reconcilia- tion problem via QR factorisation and the identification of gross errors via serial elimination were embedded in a computational tool that exploits the structural analysis of a pre-heat train. This tool is implemented in a case study, exhibit- ing capabilities for process monitoring and predictive maintenance. Nevertheless, even when fouling is indirectly considered as the pre-heat train’s performance de- creases over time, there is no clear distinction regarding the fouling mechanism, or a fouling model that could be of use for the predictive maintenance actions. The previously mentioned contributions have one major limitation in common, and that is acknowledging fouling deposition only in the tube-side of heat ex- changers. Although it is more likely that crude oil will contribute in a greater extend to the overall fouling resistance in a heat exchanger, the deposition of solid material in the shell-side should not be discarded in all cases. A novel dy- namic model, that extends the applicability of the model proposed by Coletti and Macchietto (2011) was recently proposed by Diaz-Bejarano et al. (2018). This new model adds an extra spatial domain for the growth of a fouling layer in the shell-side, including the consequences of solid deposition in the outer surface of the tube-bundle and the occlusion of the shell clearances. The effect of fouling in the pressure drop was also accounted for and the modelling framework was studied using a set of industrial data. Since this work is based on the modelling scheme designed by Coletti and Macchietto (2011), the majority of its limita- tions (specially the one related with the data filtering) still hold true. Moreover, the simulation strategy is restricted by the use of chemical reaction threshold models for shell-side and tube-side, thus a deeper understanding of the fouling mechanisms is needed for further validation. In summary, there has been a continuous interest in improving the understanding of the underlying causes of fouling; this includes the development of experiments 54 CHAPTER 2. LITERATURE REVIEW and mathematical models that can provide researchers with the opportunity of building new tools for the implementation of mitigation strategies, as well as improvements in the current practices of design and retrofit of heat exchanger networks. Additionally, the understanding of the interactions between streams and process units via process monitoring is strictly related to the quality and quantity of the available information supplied by measurement instruments. The proper treatment and management of these data can significantly increase the efficiency of engineering practices. For instance, the identification of faulty mea- surement instruments and the classification of measured and unmeasured process variables can adequately improve predictive-maintenance actions as well as the design of instrumentation networks for process control strategies. Chapter 3

Fouling Modelling and Data Reconciliation for Single Crude Oil Heat Exchangers

3.1 Introduction to Publication 1

This chapter presents the first research outcome of this PhD Thesis, which has been published as a scientific paper in the journal “Industrial Engineering & Chemistry Research”. The main objective is to test the proposed methodology in a fully instrumented crude oil heat exchanger. The use of a single heat exchanger opens to the possibility of analysing the effects and advantages of the selected data reconciliation approach into the parameter estimation procedure in a closer manner. Additionally, the gross error detection features and limitations can be examined with more confidence. The publication shown in this chapter describes the integration of a well-established heat transfer model, including non-constant fouling deposition, with an optimisation- based data reconciliation approach. The use of two different fouling rate models is utilised for representing independent fouling mechanisms in the tube-side and shell-side of the heat exchanger under study. Operational-data are simulated as an input for the data reconciliation method, and the parameter estimation al- gorithm utilises the heat exchanger’s fouling resistance to obtain a set of fitted fouling model parameters. In addition, a series of tests are carried out in order to identify the minimum magnitude of measurement bias needed for perfectly identifying such gross error in flow rate and temperature measurements.

55 56 CHAPTER 3. FOULING IN SINGLE HEAT EXCHANGERS

A set of relevant features regarding this first study are worth mentioning. In terms of fouling modelling, the relevance of shell-side fouling should not be neglected. It has been pointed out by Diaz-Bejarano et al. (2018) that in cases when shell-side fouling is the dominant resistance to heat transfer, the corresponding thermal and hydraulic assessment can lead to erroneous predictions, if the overall fouling rate is only considered in the tube-side. Second, when accounting for the time- dependent nature of fouling deposition, different approaches can be implemented. In this work, the simulation strategy uses fouling rate models for updating the values of fouling resistance (in shell-side and tube-side) of consecutive time steps via an explicit Euler method. This choice is mainly driven by the fact that an explicit estimation of fouling resistance exploits the availability of historical data, and the calculations are faster than an implicit calculation.

During data reconciliation, the accuracy of each measurement is reflected by means of a covariance matrix that contains the variance of each measurement. To do this, the standard deviation of each measurement is needed. As described by Narasimhan and Jordache (2000), a convenient method for approximating these values is using the specific information of measurement instruments, pro- vided by manufacturers. If this information is available, the standard deviation can be approximated to the level of accuracy of such instruments, as this fea- ture reflects how close the instrument’s output is from its nominal value. Other methods include the use of historical data and the probability distribution asso- ciated to the set of measurements. On a related aspect, random errors usually depend on the values of standard deviations, being well-approximated using a Gaussian distribution. In simulation studies (such as the one presented in this Chapter), random errors are added to the data by generating their values using a normal distribution with zero mean and the corresponding standard deviation of the process state (i.e. flow rate and temperature). In the case of gross errors, these usually present a higher magnitude than random errors, being persistent over time, when a measurement bias is present. Thus, when simulating gross errors, a constant value is added at each time step. For standardisation pur- poses, these values are frequently represented by a multiple of the corresponding standard deviation. Lastly, it is important to mention that no normalisation was implemented on the measured values, mainly because there are not significant differences in magnitude among measurements, and the results show that the data are successfully reconciled. 3.1. INTRODUCTION TO PUBLICATION 1 57

In terms of the parameter estimation, a hybrid optimisation approach is pre- sented. This approach uses a genetic algorithm to perform a wide search around the solution space, followed by a deterministic solution that fine-tunes the set of optimal values, if needed. The optimisation parameters for the genetic algo- rithm (i.e. population size and maximum number of generations) are selected as a function of the number of total optimisation variables (i.e. fouling model param- eters). Furthermore, the selection of the mutation function and crossover fraction are driven by the desire of rigorously evaluate the generation of new candidates for the optimal solution, and maintaining a relatively high level of stochasticity at each iteration, in order to avoid local optima. The objective function defined for the parameter estimation is the root mean square error (or RMSE) of the fitted and measured fouling resistance. Although there are some other indicators that reflect the goodness-of-fit of the estimated fouling model, namely the mean absolute error (MAE) or the correlation index (or R2), the RMSE is thought to be more convenient for this study. For instance, whereas MAE is more robust in terms of being less sensitive to outliers in the data, the fact that the data are previously reconciled before the parameter estimation allows for the RMSE to be a better option, mainly because if there is remaining noise in the data, this noise will be penalised by the RMSE, reflecting that the data reconciliation algorithm did not perform as expected. The scope of this paper aims to introduce the basis of the heat transfer model pre- sented in this Thesis, along with the implementation of the parameter estimation and data reconciliation methods. The limitations of this paper are related to the omission of the hydraulic effect of fouling by not considering pressure measure- ments. Additionally, only a constant fouling rate model (as shown in Equation 2.8 in Chapter 2) is used in the shell-side, as the usage of more complex mechanisms in this context are not yet validated. 58 CHAPTER 3. FOULING IN SINGLE HEAT EXCHANGERS

3.2 Publication 1

 Title: Estimation of Fouling Model Parameters for Shell Side and Tube Side of Crude Oil Heat Exchangers Using Data Reconciliation and Parameter Estimation

 Authors: Jos´eLoyola-Fuentes, Megan Jobson, and Robin Smith

 Journal: Industrial & Engineering Chemistry Research

 Year: 2019

 DOI: www.doi.org/10.1021/acs.iecr.9b00457 Article

Cite This: Ind. Eng. Chem. Res. 2019, 58, 10418−10436 pubs.acs.org/IECR

Estimation of Fouling Model Parameters for Shell Side and Tube Side of Crude Oil Heat Exchangers Using Data Reconciliation and Parameter Estimation JoséLoyola-Fuentes,* Megan Jobson, and Robin Smith Centre for Process Integration, School of Chemical Engineering and Analytical Science, The University of Manchester, M13 9PL, Manchester, U.K.

ABSTRACT: Fouling modeling in crude oil heat exchangers is of great importance industrially. Current approaches use empirical or semiempirical approaches, where fouling rate models are necessary. A series of parameters need to be determined, which directly depend on the nature and type of crude oil. These parameters can be estimated either by using laboratory experiments or, in principle, by measured process data. This work focuses on the estimation of fouling rate model parameters using measured data. An optimization- based data reconciliation approach, which accounts for random and gross errors, is integrated with a parameter- fitting algorithm. The methodology is tested in a case study, where a multipass heat exchanger is simulated. The effects of measurement error and fouling deposition on both sides are addressed. The fouling resistance is predicted and compared with the simulated data, showing good agreement as well as providing evidence for a successful separation of fouling resistances on both sides of a heat exchanger. Finally, studies are presented to show the isolation process for the minimum gross error magnitude, for different gross error locations.

1. INTRODUCTION understand the fouling phenomena and to establish standards fi and mathematical models for considering fouling in the design, Ever since heat exchangers were rst implemented, deposition fi of unwanted material known as fouling has been recognized as optimization, and retro t of heat transfer processes. a major problem.1 The effect of fouling on thermal and Remarkable advances have been achieved from several studies regarding experimental and mathematical character-

from https://pubs.acs.org/doi/10.1021/acs.iecr.9b00457. fi hydraulic performance is known to be greatly signi cant if not 6 properly addressed. The formation of an extra thermophysical ization of the fouling deposition process. Stirred vessels and layer across the heat transfer area decreases the flow of heat recirculation systems have been commonly used for analyzing crude oil fouling behavior.7 As a result of these studies, several

Downloaded by UNIV OF MANCHESTER at 05:43:56:069 on June 28, 2019 across both sides of shell-and-tube heat exchangers and increases the pressure drop through the equipment.2 The fouling models and concepts relevant to crude oil have been fouling layer has also a major impact on energy consumption, developed. The foundation for each model relies on the physical concept of the fouling rate, which is defined as the maintenance, and capital costs. For example, in the United 8 Kingdom, the total cost associated with fouling has reached competition between deposition and removal rates. Note that the concept “removal” is used in accordance with the original values close to U.S. $26.0 million per year, for a throughput fi 8 basis of 100 000 barrels per day.3 de nition proposed by Kern and Seaton; however, later Fouling deposition is studied by analyzing its dynamic studies have shown that in the context of crude oil preheat change through a heat exchanger. This change is commonly trains, there is a lack of evidence regarding operating ff 9 known as the fouling rate. Several variables affect this value. conditions that set o the occurrence of fouling deposition. Physical properties such as viscosity and density, as well as For design and optimization applications, the concept of a stream temperature and velocity, usually set the buildup of fouling threshold for chemical reaction models has proven to fi fouling layers, which grow by means of different mechanisms. be of great signi cance, and its study has increased over the fi To date, five major fouling mechanisms have been reported in past decade. The fouling threshold de nes a geometrical locus the literature, as described by Epstein.4 In the case of crude oil (consisting of wall temperature and surface wall shear stress) refineries, a combination of several of these mechanisms, such below which fouling deposition is not expected to occur. The as particulate, chemical reaction, and crystallization fouling are frequently encountered on each side of a heat exchanger,5 with Received: January 24, 2019 chemical reaction fouling being the most common mechanism Revised: May 28, 2019 for high-temperature operations in crude oil heat exchangers. Accepted: May 28, 2019 Field-based and experimental studies have been carried out to Published: May 28, 2019

© 2019 American Chemical Society 10418 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article main disadvantage of these models is that they are originated collected data, confirming that shell-side fouling can be from empirical or semiempirical studies, requiring a set of significant. However, detailed analyses concerning flow parameters that is specific to each type of crude oil and process patterns and fouling mechanisms are still under study. conditions such as stream velocity and temperature. Therefore, Subsequently, any attempt at separating both fouling any change in fluids in a crude oil heat exchanger will have an contributions is, at the moment, simplified but still relevant. effect on the values of these parameters. Changes in the The calculation of fouling model parameters has been dominant fouling mechanism are also expected if operating mostly studied in laboratory experiments, rather than conditions change significantly. addressing this task using operational data. One of the reasons If a certain set of fouling model parameters is to be found, for this is the current lack of methods for improving the specific information regarding the dynamic increase in fouling reliability of measured data when fouling occurs, that is, how resistance is needed. These measurements can be taken from accurate these measurements are when compared to a laboratory tests or via measurement instruments on specific validated plant model.5 Another reason is the complexity locations of the plant. Sampling and experimental testing are associated with building a representative set of data that can used whenever fouling deposition is to be studied, independent include the effect of fouling in process variables, such as from any other significant variable such as heat flux, fluid temperature. In order to reduce the propagation of measure- temperature, and fluid velocities. Such controlled conditions ment error when calculating overall and local heat transfer allow for a better understanding of the fundamental basis of coefficients, the correlations proposed by Wang et al.15 are fouling deposition. However, laboratory-based studies do not used. In their work, a simple and reliable model for evaluating represent realistically what happens during plant operation. On the performance of shell-and-tube heat exchangers was the other hand, field data can be used for determining fouling proposed. Straightforward correlations were developed for models, as they reflect the intrinsic variability of the plant but shell-side and tube-side local heat transfer coefficients and only when each measurement instrument is properly pressure drops. Results were compared with validated calibrated. In other words, well-maintained instruments commercial software such as HTRI and HEXTRAN. improve the quality of measured data, which can be disrupted Comparisons among laboratory, pilot plant, and plant data by miscalibrations, equipment failures, and events that could were done by Yeap et al.16 Different fouling models were perturb the measurements. regressed against these sets of data, and a thermohydraulic When working with operational data and measurement analysis was carried out to determine the most suitable fouling error, numerous methods are available for addressing the rate model for different scenarios. This study focuses mainly on consequences of such measurement errors. In this work, data chemical reaction fouling on the tube side, as it is the dominant reconciliation is used, as it is the most suitable approach. Data mechanism in high-temperature operations, such as the hot reconciliation exploits the existing redundancy among opera- end of a crude oil preheat train. A threshold fouling model was tional variables in order to determine the best set of used, and no data reconciliation was implemented. The measurement magnitudes that could satisfy specific process methodology proved to be useful for encouraging further constraints.10 Data reconciliation can be integrated with the research regarding fouling deposition and modeling develop- identification of faulty instruments through gross error ment. detection techniques.11 These techniques are based on a Local temperature variations across the tube side of a heat combination of statistical tests and optimization problems, exchanger are presented by Polley et al.17 A short-cut model which result in nonbiased solutions for optimal magnitudes of was developed, where an overall fouling resistance was measurements and simultaneously, presence, location (meas- obtained by integrating the fouling rate model with respect urements containing such gross errors), and numerical values to temperature. Temperature variations as a function of tube for any gross error in one or more measurements. Special length were modeled by assuming a linear distribution through attention needs to be placed on the effect of gross errors in the the tube side. Data reconciliation was considered, but no overall measurement adjustments (that is, the change in a details about which algorithm was selected were given. Gross measurement’s value after reconciliation), also known as the error detection was not mentioned. Acceptable agreement was smearing effect.12 The mitigation (reduction) of measurement reported when comparing field data with predictions of the error using data reconciliation can be exploited when model proposed by Polley et al.18 estimating fouling model parameters, as the reconciled data A more rigorous analysis was presented by Coletti and provide unbiased inputs. Macchietto,19 where a dynamic heat exchanger model The majority of current fouling rate models have been including fouling deposition and aging of the fouling layer developed and implemented only on the tube side of a heat was proposed. The simulation strategy accounts for local exchanger, neglecting the effect of fouling deposition on the variations in temperature, flow velocity, and physical proper- shell side. Although fouling on the shell side of heat exchangers ties, and operational data (flow rate and temperature) are used is often less important, it can be a significant issue. Specific as inputs. These data are prefiltered via statistical calculations, cases have been reported, where shell-side fouling dominates without being considered by the authors as a data over tube-side deposition, as shown in Diaz-Bejarano and reconciliation method. The model outputs were compared Coletti.13 In their work, a local-based dynamic model for a against the filtered data, where several outcomes were crude oil heat exchanger including shell-side and tube-side highlighted. Outlet conditions (temperatures for hot and fouling was applied to assess its thermohydraulic performance. cold streams) were used as indicators for prediction capability, Threshold fouling models were considered for both sides of and fouling model parameters were regressed from the filtered the heat exchanger, where slight modifications were employed data, after a specific mechanism was chosen. Several limitations for the shell-side fouling modeling, based on the tube-side were listed; neglecting shell side fouling is one of the most fouling rate model proposed by Ebert and Panchal.14 The significant. The presence of faulty measurement instruments results showed good agreement between the model and was also mentioned.

10419 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article

In order to establish a generally applicable methodology for calculating both shell-side and tube-side local heat transfer calculating fouling model parameters from measured data, coefficients, applying the correlations proposed by Wang et Costa et al.20 developed a computational routine for regressing al.,15 which have been validated by comparison with globally fouling threshold models using a stochastic-deterministic accepted methods such as the Bell−Delaware method.21 hybrid optimization approach. The model predications were This simulation is formulated under a pseudo-steady state. compared with real operational data from a Petrobras refinery The time span is divided into a specific number of time in Brazil. The goodness-of-fit was evaluated by back-calculating subintervals of the same length. Steady state is assumed in each the model parameters using several optimization methods such time interval, where the values of fouling resistances are as Simplex and the Broyden−Fletcher−Goldfarb−Shanno updated from one time interval to the next. The model applies (BFGS) algorithm. The accuracy of the regression method the effectiveness and number of transfer units (ε-NTU) was quantified by estimating the relative error between original method21 to calculate the operating conditions of the heat and fitted parameters. The agreement was found to be exchanger. Mass and energy balances assume no accumulation acceptable, since the relative errors were not greater than in each time step, and heat losses are assumed to be negligible. 10% with respect to literature values for each fouling model No changes in local conditions along each side of the heat parameter. In terms of optimality, by applying a hybrid exchanger are assumed, as lumped models for heat transfer are optimization scheme, the presence of local optima was implemented to estimate the effect of fouling in the outlet addressed. Overall, the proposed routine worked adequately, conditions of the heat exchanger. Temperature-dependent when only tube-side fouling was accounted for, and no physical properties can be implemented if either temperature- significant measurement errors were expected within the data. dependent correlations or plant data are available. Note that In summary, significant advances have been achieved in the including temperature dependence would require an iterative modeling of fouling deposition in crude oil refineries. These process to solve the system of equations. Initial conditions studies provide the research community more opportunities such as the inlet temperatures of streams, heat exchanger for closing the gap between empirical and first-principle geometry, and physical properties are needed to set up and approaches. The use of operational data has been gaining solve the model. attention, but methods for increasing plant data reliability are Fouling deposition is considered as a dynamic process, the still needed. This work develops a methodology for including rate of which can be calculated using fouling rate models. At the effect of measurement error in the estimation of fouling each time step Δt, the heat exchanger fouling resistance is model parameters. Fouling deposition is accounted for updated by means of an explicit Euler integration. It is assumed separately for the shell side and tube side, represented by that the effect of deposit aging on any surface is negligible. This either threshold or simpler semiempirical fouling models. work allows for the presence of multiple fouling mechanisms Further complexity in the fouling modeling can be set in the on different sides of the heat exchanger. Consequently, a form of different fouling models; however, this paper focuses separated analysis regarding fouling resistance can take place on combining a rigorous data reconciliation approach with (that is, fouling resistances for shell-and-tube side are parameter estimation. By implementing a gross error calculated separately). algorithm, this work aims and shows that is possible to 2.1. Mass and Energy Balance. For a single heat identify faulty measurement instruments, as well as the exchanger at steady-state conditions, a mass balance for hot conditions for compensating data miscalibrations. and cold streams is presented in eqs 1 and 2. The new approach for a single shell-and-tube heat exchanger m m 0 undergoing fouling is described in section 2, while section 3 h,i−= h,o (1) defines the data reconciliation and gross error detection methodology and highlights the importance of measurement mc,i−=m c,o 0 (2) error mitigation. Section 4 describes the parameter estimation where the hot stream is denoted by the subscript h and the scheme developed in this work. A description for the cold stream is identified by the subscript c. Inlets and outlets to generation of operational synthetic data in this work is and from the heat exchanger are denoted by the subscripts i presented in section 5. A case study, where the methodology is and o respectively; mass flow rate for each side of the heat tested against simulated measured data, is shown in section 6. exchanger is represented by m. The most important results are also analyzed and discussed. The energy balance is defined as the heat transferred from Finally, overall conclusions are presented in section 7. the hot stream to the cold stream. As steady state is assumed, 2. HEAT EXCHANGER MODELING AND SIMULATION the heat absorbed by the cold stream has the same magnitude as that rejected by the hot stream. Mathematical expressions The heat exchanger model used in this work is applied to a for each stream in the heat exchanger are given by eqs 3−5. single shell-and-tube multipass heat exchanger undergoing fouling deposition on the shell side and tube side. Shell-side CPhh,ih,o (TT−= ) Qh (3) fouling is expected in all heat transfer equipment, especially for fl crude oil applications where viscous uids are used in most of CP(cc,oc,TT−=i ) Qc (4) heat exchangers within a preheat train.13 To simplify the complexities associated with shell-side fouling modeling, this Q h = Q c (5) work uses a constant fouling rate model on the shell side. Tube-side fouling is accounted for by applying existing fouling where Q is the heat duty on both sides of the heat exchanger rate models, namely, the one proposed by Polley et al.17 This and CP is the average heat capacity flow rate (CP = mcp, heat exchanger model can be applied to any commercially where cp is the average heat capacity for the temperature fl available equipment (e.g., straight, oating head, U-type tube interval [Ti, To]). Temperatures for hot and cold streams are bundle). Different geometric configurations are addressed by denoted by the variable T.

10420 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article

An extra, independent set of equations can be obtained by are valid for heat exchangers with n − 2n passes on shell-side applying the concept of thermal effectiveness (ε).21 According and tube side, respectively.21 ff fi to this concept, thermal e ectiveness is de ned as the ratio 2 between the actual amount of heat transferred in the heat ε = 2 exchanger, and the maximum heat transferred, defined by the 2 1exp(NTU+−Cr + 1) (1++CCrr ) + 1 2 maximum temperature difference that could be achieved in the 1exp(NTU−−Cr + 1) (13) − heat exchanger (e.g., (Th,i Tc,i)). If the hot stream presents a nnshells shells lower value of heat capacity flow rate (hot stream is the (1−−−εεarC ) (1 a ) ε forCr 1 fl = nnshells shells ≠ minimum uid) than that of the cold stream, the thermal (1−−−εεarCC ) r (1 a ) (14) effectiveness can be defined as in eq 6. nshellsε a ε = forCr = 1 ()TTh,i− h,o 1(n 1)ε (15) ε = +−shells a ()TTh,i− c,i (6) where nshells is the number of shell passes and the auxiliary fl fi ε The heat capacity ow rate ratio (Cr)isde ned as the ratio variable a is calculated as in eq 16. between the minimum and maximum heat capacity flow rates. 2 When the hot stream is the one with the lower heat capacity εa = 2 fl 2 1exp(NTU/+−nCshells r + 1) ow rate, eq 5 can be rearranged as it is shown in eq 7. At the (1++cCrr ) + 1 2 same time, eq 6 can also be reformulated as it is presented in 1exp(NTU/+−nCshells r + 1) (16) eq 8. The calculation of the thermal effectiveness ε is necessary to solve eq 11 and to calculate the outlet temperatures of the heat Tc,i−+TCTCT c,o r h,i − r h,o =0 (7) exchanger, when only the inlet temperatures are known. 2.2. Heat Transfer and Fouling Modeling. Fouling εTTTc,i+−(1ε ) h,i − h,o = 0 (8) inevitably changes the thermal performance of a heat If the cold stream presents the lower heat capacity flow rate, exchanger, as it adds in an extra thermal resistance. These the energy balance and effectiveness equations are described by changes are reflected in the value of the overall heat transfer eqs 9 and 10. coefficient, where fouling deposition on either or both sides of the heat exchanger reduces the heat transfer performance by −+CTr c,i CT r c,o −+= T h,i T h,o 0 (9) means of decreasing the heat load transferred between both streams. (εε−+−=1)TTc,i c,o T h,i 0 (10) This formulation integrates two different modeling strategies The entire set of equations from eqs 7 to 10 can be for heat transfer and fouling dynamics, as an innovative generalized into a single set of equations by introducing the alternative to account independently for shell-side and tube- binary variable yc, where yc = 1 when the hot stream is the side fouling deposition. fl stream with the lower heat capacity ow rate. Otherwise, yc will 2.2.1. Overall and Local Heat Transfer Coefficients. The be equal to zero.22 The generalized formulation is shown in eq individual fouling resistances from shell side and tube side are ffi 11. formulated in the overall heat transfer coe cient Ud using eq 17. An overall fouling resistance R can be calculated by adding Tc,i f both contributions and adjusting the tube-side fouling εε+−(1)(1)yycc −− y c − − y cTc,o Ä É = 0 resistance accordingly using the outer to inner diameter ratio Cy(1) y Cy (1) y Cy (1) y Cy (1) y ÅT Ñ r cc−+−r c −−c r cc +− −r cc −− Å h,i Ñ Å Ñ (d /d ), as shown in eq 18. ÅÄ ÑÉ Å Ñ o i Å Ñ ÅTh,oÑ Å Ñ Å Ñ Å Ñ Å Ñ −1 Å Ñ Å Ñ Å Ñ Å Ñ(11) 11d ÇÅ ÖÑ Å Ñ o Å Ñ U R R Å Ñ d =+f,tube ++f,shell The simultaneous solution of eq 11 gives the valuesÇÅ ÖÑ for htube dhishell (17) outlet temperatures when inlet conditions for the heat Ä É Å Ñ exchanger are provided. The solution can become iterative Åji d zyji zy Ñ R ÅRj o Rzj z Ñ when temperature-dependent physical properties are consid- ff,tube=+Åj f,shellzj z Ñ ered. Note that an extra equation can be included by ÇÅk di {k { ÖÑ (18) ff ε calculating the thermal e ectiveness as a function of the where h and h are the average heat transfer coefficients fl tube ji shellzy minimum heat capacity ow rate and number of transfer units for the shell sidej andz tube side, respectively, and R and (NTU). The definition for a transfer unit is shown in eq 12.21 j z f,tube Rf,shell are thek fouling{ resistances for both sides of the heat UAd exchanger. Note that in eq 17, the thermal resistance from the NTU = tube wall is neglected. (CP) (12) min Specific correlations for the shell-side and tube-side average ffi ffi where Ud is the overall heat transfer coe cient for the heat heat transfer coe cient are implemented in this work. Special exchanger, A is the heat exchanger area, and the subscript min focus is given to the shell side, where methods such as the stands for the minimum value of the heat capacity flow rate. If Bell−Delaware21 do not perform as accurately as some the number of transfer units, along with the heat exchanger commonly used commercial software, for example, HTRI flow arrangement, are known, the thermal effectiveness can be and HEXTRAN.15 A simpler approach is used for the tube calculated using one of the relations shown in eqs 13−15, side, where a set of correlations is applied, depending on the where eq 13 is only valid for heat exchangers with one pass in flow regime, indicated by the magnitude of tube-side Reynolds − 15 the shell side and two passes in the tube- side (also known as number Retube. These correlations are shown in eqs 19 22. “1−2 shell-and-tube heat exchangers”), whereas eqs 14 and 15 For turbulent flow, an adjusted Dittus−Boelter23 correlation is

10421 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article used, depending if a cooling or heating process takes place in parameter FL is known as the leakage factor. It mainly depends the heat exchanger. on the tube bundle configurations.24 ’ 1/3 2.2.2. Fouling Modeling. To the authors knowledge, λ d fouling impacts both thermal and hydraulic performance in h tube 1.86Re Pr i ;Re 2100 tube =·tube tube tube ≤ heat exchangers, and a joint analysis including these two di Ltube (19) indicators is the most suitable approach. However, as a starting ji zy point, it is desirable to test and validate the results of the j z 2/3 j z proposed methodology in terms of the overall fouling λtube k 2/3 { 1/3 din resistance. For this reason, only thermal-related issues are htube =·−+(0.116Retube 125) Prtube 1 ; di Ltube addressed. Fouling dynamics are implemented within this heat ÅÄ ÑÉ exchanger simulation model by integrating a fouling rate 4 Å Ñ 2100≤≤Retube 10 Å ji zy (20)Ñ model, over a discretized time span. An explicit Euler method Å j z Ñ 2 Å j z Ñ is used, based on the work proposed by Rodriguez and Smith. Å k { Ñ λtube 0.8 0.4 ÇÅ 4 ÖÑ Thus, for two consecutive time intervals, the fouling resistance htube =··≥0.024Retube Prtube ; Retube 10 and heating di for a time step n can be estimated using eq 26. (21) dR f R ff1|=nnRt | +Δ λtube 0.8 0.4 4 − dt htube =··≥0.023Retube Prtube ; Retube 10 and cooling n−1 (26) di (22) A fouling rate model needs to be chosen depending on the λ operating conditions and type of fluid flowing through each where Prtube, Ltube and tube are the tube-side Prandtl number, single tube length, and thermal conductivity for the tube side side of the heat exchanger. The selection of a fouling model fluid, respectively. Physical properties can be considered as should account for the deposition mechanism, and it is crucial constant through the tubes using a single value for each to choose each model accurately (for shell side and tube side). physical property, or by assuming a dependency between the Previous studies have stated that for crude oil preheat trains, property and the average temperature at both ends of the heat deposition of salt and waxes is likely at the cold end, whereas exchanger (for hot and cold streams). The tube-side flow deposition by means of chemical reaction is encountered at the 5 velocity is calculated using available information about the tube hot end. In this work, given the complexity regarding shell- geometry, number of tubes, number of tube passes, and tube- side fouling, a constant rate is used. Note that other types of side flow rate. fouling mechanisms (i.e., fouling models) could take place, but The shell-side local heat transfer coefficient is calculated the effects of such mechanism in the shell-side geometry using a modified version of the correlation proposed by should be considered.13 For the tube side, the widely accepted Ayub.24 The modifications were developed by Wang et al.,15 chemical reaction model proposed by Polley et al.,18 is chosen. where physical properties such as shell-side fluid thermal Both fouling rate models are shown in eqs 27 and 28 λ μ conductivity ( shell), heat capacity (cpshell), and viscosity ( shell) respectively. are used. Depending on the stream allocation in the heat exchanger, these physical properties can correspond to those dR f = α1 for hot or cold streams. That is, if the hot stream is flowing dt (27) though the shell side, then cpshell =cph. This work allocates the streams in such a way, since this preference is widely used in ffi Western countries. The local heat transfer coe cient for the dR f −−0.8 0.33 −EA 0.8 15 Re Pr exp Re shell side is then defined by eq 23. = αγ2tubetube − tube dt RTgW (28) 0.06207FFF λμ2/3 (cp )1/3 spLshell shell shell α α ji zy γ ’ hshell = where 1, 2, the activation energyj EzA and are the models d fi j z o (23) adjustable parameters, speci cj to thez heat exchanger. Rg is the k× 3 { −1 −1 ideal gas constant (Rg = 8.314 10 kJ K mol ), and TW is where Fs, Fp, and FL are correction factors that account for different geometric and hydrodynamic features. The parameter the tube-side inlet wall temperature. This temperature is ff ffl ffl nonuniform along the tube side, having a direct effect on the Fs accounts for the e ects of ba ecut(BC), ba e arrangement, and flow regime, according to the magnitude of value of the fouling rate at the tube side, as shown in eq 28.A practical approach for calculating a representative fouling rate shell-side Reynolds number (Reshell). Equations 24 and 25 ff ff fl on the tube side is to consider a linear increment in wall show di erent expressions for Fs applied to di erent ow regimes. temperature, where values lie within the temperature range spanned by both ends of the tube wall. This temperature range −4 2 FReRes =−5.9969 × 10shell + 0.6191shell + 17.793; can be divided into several temperature intervals of the same length.2 Cold and hot end wall temperatures are defined by eqs Reshell ≤ 250 (24) 29 and 30.

0.6633 −0.5053 FReBResshell=≤≤1.40915C ; 250shell 125000 TTh,o− c,i (25) TW,c=+T c,i hR1 do 1 R fi tube h +++f,tube dh f,shell The correction factor Fp is de ned as the pitch factor, which ()tube ()ishell changes with different tube pitch configurations. The (29) ÅÄ ÑÉ Å Ñ 10422 Å DOI: 10.1021/acs.iecr.9b00457Ñ ÇÅ Ind. Eng. Chem. Res. 2019, 58, 10418−10436ÖÑ Industrial & Engineering Chemistry Research Article

TTh,i− c,o are lower and upper bounds for the optimization variables TW,h=+T c,o (reconciled values) respectively. The parameter ψ is the 1 do 1 hRtube +++f,tube Rf,shell covariance matrix, which is used for estimating the weights ()htube ()dhishell each measurement has in the objective function of eq 32.25 (30) ÅÄ ÑÉ The covariance matrix is assumed to be a diagonal matrix, in where T and T areÅ the tube-wall temperatures at the coldÑ W,c W,h Å Ñ which each diagonal element represents the variances of each and hot end of the tubeÇÅ side, respectively. Values of the wallÖÑ flow rate and temperature measurement. Off-diagonal elements temperature are calculated along the tube side; then a mean are taken to be zero, based on the assumption that there is no fouling rate can be determined by integrating each fouling rate correlation among any set or subset of measurements; that is, for each temperature interval. Equation 31 shows the all measurements are statistically independent from each formulation for calculating the value of the mean fouling rate.2 other.25 Statistical correlation among process measurements can be considered by estimating correlation indicators, which TW,h dR f,tube dTW depend on the covariance relating two or more different dR f,tube ∫TW,c dt = measurements. These values could then be located in their dt TT mean W,h− W,c (31) corresponding entries in the variance matrix ψ. The solution of eq 32 is expected to reach an optimal and The integral on the right-hand side of eq 31 is approximated nonbiased result if and only if no gross errors are contained using the trapezoidal rule over all the temperature intervals, for 11 2 within the data. The presence of gross errors can mislead each time step, although any integration technique could be reconciliation adjustments, directly affecting the level of used. expected reliability for the reconciled data,11 that is, the degree at which the set of reconciled data satisfies each 3. DATA RECONCILIATION AND GROSS ERROR constraint, and it is close to the set of process measurements. DETECTION Hence, when gross errors are expected, their identification In this work, a data reconciliation algorithm is applied to a (detecting their presence) and estimation (calculating their single heat exchanger. It is assumed that flow rate and numerical values) processes need to be considered along with temperature measurements are available and are obtained from any data reconciliation scheme. specific measurement instruments, such as flow meters and 3.1. Nonlinear Data Reconciliation. This work uses mass thermocouples. Pressure measurements could be considered, and energy balances as process constraints for solving the data provided that the heat transfer and fouling modeling include reconciliation problem. Specifically, eqs 1 and 2, along with eqs the hydraulic performance of such heat exchanger. The 7 and 9, are used for this purpose. The reason for the selection accuracy of each of these measurement instruments is assumed of this set of equations is that they only involve values that can to be estimated as the standard deviation of each instrument. be either constant or measurement-dependent (e.g., heat Random errors (rξ) are assumed to be contained in each capacity flow rate). The effect of fouling in the reconciliation measurement and approximated as random variables, following approach is accounted for using temperature measurements, a normal distribution with null mean and specific standard which at the same time define the values for the overall heat σ fl ffi ff ε deviations for each measurement instrument ( m for ow rate transfer coe cient Ud and thermal e ectiveness . Given the σ and T for temperature measurements). nonlinear nature of the above set of equations, the It is assumed that daily average data are used as process optimization problem defined in eq 32 is solved using measurements and steady state is considered for such set of nonlinear programming techniques to achieve an optimum data, as daily data are commonly used in industrial solution (i.e., minimize difference between process measure- applications.19 On the basis of these assumptions, the general ments and reconciled values) while solving the problem data reconciliation problem can be formulated as described in relatively fast. eq 32. The vector of reconciled data contains the estimated The proposed methodology also applies lower and upper measurements that are as close as possible to the process bounds for each measured value in the data reconciliation measurements from each measurement instrument. Each problem. An important feature of a nonlinear formulation is measurement is weighted by its corresponding variance the fact that inequality constraints are accounted for, (square of each standard deviation) to account for the improving the feasibility of the final solution. In this work, a differences in accuracy among all measurement instruments. non-negativity constraint for the fouling resistance is set by Note that this work assumes that all process variables (flow considering the magnitudes of overall heat transfer coefficients rates and temperatures) are measured. The effect of missing for clean and fouled conditions. For each time step, if fouling is measurement can be included, and it is planned to be occurring in the heat exchanger, the value of Ud is always less considered in future contributions, by exploiting the available than the value of the clean (associated with a new or recently set of measurements and matrix-based techniques. cleaned heat exchanger, i.e. at t = 0) overall heat transfer ffi fi coe cient (Uc), de ned in eq 33. min(xx )T ψ −1 ( xx ) MR−−MR 1 xR − 11do subject tofx ( ) 0 Uc =+ R = htube dhishell (33) gx() 0 Ä É R ≤ Å Ñ fi This way,Åji thezyji inequalityzy constraintÑ can be de ned as shown L U in eq 34Å.j Sincezj thez calculationÑ of both overall heat transfer xxxR ≤≤RR (32) Åj zj z Ñ coefficientsÇÅk is based{k { on processÖÑ or simulated data, the fouling where f and g are equality and inequality constraints, xM and xR resistance obtained from this calculation can be regarded as a L U msr are the set of measured and reconciled values, and xR and xR measured fouling resistance (Rf ). This constraint is used for

10423 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article ensuring that no fouling resistance exhibits a negative determine the presence of gross errors. When using the global magnitude. test, the vector of constraints residuals (qξ), which depends on the value of the measured variables, and its covariance matrix msr 11 φ R f =−≥0 ( ξ) are needed. For nonlinear systems, it is necessary to UUdc (34) linearize the constraints, given that the global test has been 25 developed only for linear systems. After linearization, qξ and Practically speaking, it is not possible to measure shell-side φ and tube-side fouling resistances directly, meaning that the ξ can be calculated using eqs 37 and 38. fi de nition for Ud shown in eq 17 cannot be used. To overcome qJxb ξ =−x M xM (37) this issue, the design equation for the heat exchanger is used, M accounting for the heat duty (Q), heat transfer area, ϕψJJ−1 T ff Δ ξ = xxMM (38) logarithmic mean temperature di erence ( TLM), and number fl fi of passes re ected in the correction factor Ft. This de nition is Where J is the Jacobian matrix of the set of constraints formulated in eq 35. xM evaluated at the measured variables, as shown in eq 39. The Q Q h c value of bxM in eq 37 is determined by eq 40. Ud = = ATFLM t ATFLM t (35) Δ Δ d(fxR ) J = In this work, inequality constraints related to stream xM dx R x (39) allocation (i.e., shell-side inlet temperature higher than tube- M side inlet temperature) in the heat exchanger are not bJxfxx =−MM() considered, as it is desired to maintain the problem M xM (40) formulation as flexible as possible. In other words, this The test function for the global test (τ)isdefined in eq 41. methodology can be applied to shell-and-tube heat exchangers This function represents the mean value of the vector of with different (and realistic) stream allocations. residuals. When no gross errors are found, the function τ This methodology solves the optimization problem stated in follows a χ2 probability distribution with ν degrees of freedom, eq 32 using the sequential quadratic programming (SQP) at a specific level of significance δ.11 Thus, null and alternative 26 technique. This method presents certain advantages hypotheses are formulated, where the null hypothesis is set to compared to other nonlinear solvers such as the Generalized be accepted when no gross errors are expected.25 On the other 26 Reduced Gradient method, when implementing data hand, if a single or multiple gross errors are found, the reconciliation. First, the objective function already has a alternative hypothesis is considered as valid. quadratic form. Hence, only the set constraints need to be fi qqT −1 modi ed by linearization. Second, the Hessian matrix is τ = ξ ϕξ ξ (41) constant, and thus needs no updating, which speeds up each δ − iteration when solving the data reconciliation problem.25 The Typical values for are within the range of 5 10%. The fi SQP method is chosen for the above reasons. number of degrees of freedom is de ned as the rank of matrix fi 3.2. Gross Error Detection and Identi cation. System- JxM, which accounts for the number of independent constraints. τ τ atic errors in the form of bias are considered in this work. That The value of is compared to a critical threshold value c, is, gross errors contained within a single or a set of which depends on the available degrees of freedom and level of ff fi τ ≤ τ measurements are addressed in this methodology. The e ect signi cance. If c, then gross errors are said to be detected. τ fi of gross error is considered in the optimization problem of eq The value of c is de ned in eq 42. 32 by adding its magnitude to the set of measured values, as 2 11 τ χν() shown in eq 36. c = 1−δ (42) x xrgB Once the presence of a single or multiple gross errors is MR=++ξ ξ ξ (36) detected, their location and magnitudes are determined. A where gξ is the magnitude of the gross error, which is a vector simultaneous solution for data reconciliation and gross error of single or multiple elements (gross error contained in one or detection problem is developed in this work. The method is 28 multiple measurements). The matrix Bξ is a matrix whose based on the algorithm proposed by Sancheź et al., where a elements are zero or one, depending on the relative position of set of conceivable bias candidates is determined by means of a the gross error with its corresponding measurement in the recursive strategy in which each constraint is systematically measurement vector. The product gξBξ results in the column analyzed for the presence of gross error. Next, a data vector containing the magnitudes of gross errors located in reconciliation problem is solved for each combination of their corresponding measurements. Single or multiple biases such candidates. A global test is also used as a stopping are added into the set of optimization variables in such a way criterion, for selecting the combination of candidates for single that the optimal solution includes the reconciled measure- or multiple gross errors. In the past, this approach has been ments along with the location and magnitudes of each gross applied to linear systems, where only mass balance equations error identified within the data. are used as process constraints and an analytical solution is When applying eq 36 to find single or multiple gross errors, implemented for the reconciled values.28 it is necessary to simultaneously estimate their location and As a modification to the previously mentioned strategy, SQP magnitude. However, since gross errors may or may not exist is used for solving the data reconciliation problem, and at the within a set of measurements, before trying to estimate their same time the locations and value of gross errors are values, the presence of such errors should be detected.25 determined. Different sets of gross errors presenting the In this work, the “global test” is used for addressing the same effect on the reconciliation problem (equivalent sets) and detection problem.27 This method uses a statistical test to sets presenting linear dependency among each other (loops)

10424 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article

Figure 1. Gross error detection and identification schematic methodology. are also considered, following the definitions proposed by gross errors to be found simultaneously is equal to the number Bagajewicz and Jiang.29 For each set of gross error candidates, of process units in the system, when only mass balance the data reconciliation problem is solved. The values of the constraints are considered.29 In this work, only one process objective function of eq 32 are stored and calculated for each unit is assumed, a heat exchanger. Consequently, the gross set of candidates. These magnitudes are compared among each error detection is limited to identify and estimate a single gross fi other for identi cation of equivalences and loops within the error in any process variable within the set of measurements. data. If an equivalent set is found, the vector of reconciled The data reconciliation and gross error detection method is values of each equivalent data set are compared with additional fl summarized in Figure 1. Each step described in Figure 1 is information such as the design parameters (i.e., ow rates, applied to a set of data representing each time step. temperatures). The set of reconciled values with the lowest absolute difference when compared to such additional information is selected and used at the next stages. 4. PARAMETER ESTIMATION OF FOULING MODEL The performance of the gross error detection strategy (when PARAMETERS simulating measurement error) is quantified via the overall The next part of the methodology developed in this work is the 25 fi power function (OPF), de ned in eq 43. The overall power calculation of fouling model parameters. These parameters are function indicates the number of gross errors perfectly fi fi calculated by means of optimization, since each set of fouling identi ed, that is, if all gross errors in a speci c set of model parameters is directly dependent on the type of crude measurements are found in their corresponding simulated oil. Several challenges are found when addressing the measurements. The advantage of the overall power function is parameter estimation of fouling rate models, with three of that it reflects the presence of mispredictions when detecting them being the most significant.20 First, there is a significant and identifying gross errors. difference in magnitudes among each parameter for the same number of simulations with perfect identification foulingratemodel.Theselargedifferences impact the OPF = number of simulations calculation of the optimal solution as the contribution of (43) each optimization variable into the objective function becomes fl ff The maximum number of multiple gross errors that can be irregular, re ecting the di erences in magnitude through the found is limited by the system’s redundancy, that is, the intermediate calculations of the solution algorithm. Second, number of variables that can be estimated using the process the optimization problem presents multiple local optima, given constraints, whether their measurements are available or by the nonlinear nature of some fouling rate models. Third, removed.25 If the interaction between streams and a heat these nonlinearities cause the solution of the optimization exchanger is considered as an open system (i.e., no closed problem to have a high degree of dependency on the initial loops around the unit), then the maximum possible number of estimates.

10425 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article

As an example, Table 1 shows the values of the fouling rate is implemented. The solution is found by randomly generating model parameters determined by Polley et al.18 The specific a series of a set of individuals (population). Every time a new iteration (or generation) is to be produced, the next Table 1. Fouling Model Parameters (eq 28) Determined by population is created by analyzing the value of the objective Polley et al.18 function (fitness value) for each set of individuals. This analysis is carried out by applying specific operators to each generation, parameter unit value consisting of crossover, selection, and mutation. Since each α 2 −1 −1 × 6 2 m KkW h 1.00 10 population is generated by applying random moves (after −1 EA kJ mol 48.0 selecting the most suitable individuals for minimization), the − − − γ m2 KkW 1 h 1 1.50 × 10 9 algorithm allows for a wide search, minimizing the likelihood of getting trapped in local optima. Consequently, no initial units of these parameters have been compared with later estimations are needed, which addresses the third and last research (Polley et al.17), as the reported values for the challenge discussed previously. Note that the use of Genetic parameters present an inconsistency regarding the formation Algorithm is not strict for this problem, as alternative methods term in eq 28. Given this issue, several simulations for a single that are independent from initial guesses could also bring heat exchanger were carried out, and the suitable units for each successful results. In the second stage, the solution from the parameter were determined based on the results. The suitable stochastic optimization is fine-tuned by using this solution as units for each fouling parameter in Polley’s model are reported an initial estimate for a deterministic solver. The degree of fine- in Table 1. tuning was tested by studying the change (relative to the Following the procedure proposed by Costa et al,20 to stochastic solution) in each fitted parameter once the mitigate the effect of the large difference among fouling model deterministic optimization was applied. The Interior Point parameters, a set of normalized optimization variables is method26 was selected, as it was able to readjust the set of defined as shown in eqs 44−47, where the symbol (∼) is used parameters when using the solution from the stochastic to denote normalized values, and the symbol (^) denotes the optimization. Subsequently, a feasible solution that satisfies parameters fitted via the parameter estimation algorithm. the set of constraints is obtained and used for further assessment and predictions on the heat exchanger. The α1̂ 20 α1̃ = performance of this strategy has been tested and validated. α1 (44) Hence, this hybrid approach is selected as it provides a widespread search for a solution, without depending on initial α2̂ estimates, in contrast with alternative methods such as global α2̃ = α2 (45) optimization techniques. For the objective function, it is desired to minimize the root EÂ mean square error (RMSE) between the fouling resistances EÃ = msr EA (46) calculated from the reconciled data (Rf ) using eq 34, and from the ones calculated using the fouling rate models for γ̂ shell-side and tube-side R (eqs 27 and 28). The values of the γ̃ = ̂f γ (47) fitted fouling resistances can be obtained using the fitted − parameters and the definitions shown in eqs 26−28, for each The parameters in each denominator in eqs 44 47 are the fi set of base parameters for normalization, taken from specific time step. The objective function is de ned in eq 50, where α each time step is represented by n, and the total number of fouling models found in the literature. For 1, its value is considered as a constant fouling rate model (see eq 27), and it time steps by k. is equal to 5.40 × 10−5 m2 KkW−1 h−1. This value of fouling k msr 2 rate is considered to be relatively low, and it has been used in a ∑n 1 ()RRf,nn− ̂f, 2 min = previous work. The values corresponding with α , E m and γ ∼ 2 A αα∼∼12A,,,E γ∼ k are defined for chemical reaction fouling in Table 1 and 18 L U selected from the model developed by Polley et al., which has subject to ααα1̃ ≤ 11̃ ≤ ̃ been proven to predict fouling behavior with acceptable 7 L U accuracy. ααα2̃ ≤ 22̃ ≤ ̃ Combining eqs 44−47 with the fouling models shown in eqs L U 27−28, the normalized fouling rate models are defined. This EEEÃ ≤ AÃ ≤ ̃ formulation is presented in eqs 48 and 49. LU γγγ̃ ≤ ̃ ≤ ̃ (50) dR f αα The upper and lower bounds are set for the measured = 11̃ (48) dt fouling resistances by fixing limiting values for each fouling model parameter, based on their normalized form. In order to dR EẼ f −−0.8 0.33 − AA 0.8 have a robust solution, these bounds are defined within a wide = ()αα22̃ Re tube Prtube exp− () γγ̃ Retube dt RTgW range of values. i y (49) j20 z 5. SYNTHETIC DATA GENERATION A two-level optimization schemej is usedz for addressing the j z problem of local optima. In this approach,k { a combination of Operational data are to be used for the application of this stochastic search and deterministic solutions is used, in two methodology. For careful control of the testing, synthetic data different stages. In the first stage, a Genetic Algorithm (GA)30 were generated. The simulation strategy presented in Section 2

10426 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article is implemented to replicate industrial measurements. To calculations are needed for solving the parameter estimation include the effect of measurement error, random and gross problem. errors are added into the data. The analysis of three different cases (see Table 3)is Random error is included by adding a random value to its presented for assessing the effect of the measurement error in corresponding simulated measurement. The magnitude of each random error is generated using the built-in function normrnd Table 3. Description of Analyzed Cases in MATLAB. Following the definitions stated by Narasimhan and Jordache,25 these random values are generated by setting a case number description normal Gaussian distribution with a mean value of zero and 1 no measurement error in data standard deviation of 1.5 kg s−1 and 1.0 °C for flow rates and 2 only random errors, no data reconciliation temperatures, respectively.31,32 Note that in the case of flow 3 only random errors, with data reconciliation meters, percentages of 1.0% of the value of the measurement 4 random and gross errors considered are commonly used and a fixed upper bound of 1.5 kg s−1 is selected in this work for the sake of robustness regarding the the solution of the parametric fitting. In other words, it is different orders of magnitude for shell-side and tube-side flow desired to understand the relevance of the presence and rates. These values are within acceptable ranges in commonly magnitudes of measurement error. Geometric parameters and used instruments such as thermocouples and ultrasonic flow inlet operating conditions are shown in Table 4. In this case meters. Gross error is included by adding a constant value study, temperature dependence for each physical property is (over time) to any individual or set of measurements. Gross ignored. errors can change their magnitude over time, but these changes are not significantly different between consecutive time steps.25 Table 4. Geometric and Stream Data for Case Study Usually, gross errors present higher magnitudes to any random parameter units value error, and they are produced by malfunctions or miscalibra- − tions of any measurement instrument. Any detection and tube pitch m 2.54 × 10 2 identification of gross error is applied using a level of number of tubes − 250 significance δ of 0.1, i.e., a confidence level of 90% (see eq 42). number of tube passes − 1.00 tube length m 7.50 6. CASE STUDY tube layout angle ° 30.0 × −2 The methodology described in sections 2−4 is applied for tube inner diameter m 1.54 10 × −2 simulating and assessing fouling development and data tube outer diameter m 1.90 10 shell inner diameter m 0.75 reliability on a multipass shell-and-tube heat exchanger. Figure − 2 illustrates the heat exchanger used in this case study. The number of shell passes 1.00 number of baffles − 25.0 baffle spacing m 3.00 × 10−1 inlet baffle spacing m 1.50 × 10−1 outlet baffle spacing m 1.50 × 10−1 baffle cut % 20.0 tube bundle clearance m 6.00 × 10−2 crude oil flow rate kg s−1 77.7 crude oil inlet temperature °C 210.0 residuum flow rate kg s−1 34.54 Figure 2. Crude oil heat exchanger used for case study. residuum inlet temperature °C 334 selected heat exchanger is a modification from the last exchanger of the preheat train studied by Ahmad et al.33 The simulation time is one year, and it is assumed that each Physical properties33 for each fluid in the heat exchanger are process variable (flow rate and temperature) in the heat provided in Table 2. Crude oil is flowing through the tube- exchanger is measured. Steady state is assumed, and daily averaged sets of synthetic measurements are used as opera- Table 2. Physical Properties for Each Stream of Case Study tional data. The entire set of measurements is divided into two subgroups, with the purpose of determining a reliable and parameter units crude oil residue accurate degree of prediction. density kg m−3 748.60 830.00 An “estimation set” of data is defined as the first 50% of data thermal conductivity W m−1 K−1 9.60 × 10−2 8.50 × 10−2 obtained from the data reconciliation procedure. These data viscosity Pa s 0.60 × 10−3 2.00 × 10−3 are used as an input for the parametric fitting. The second set specific heat J kg−1 K−1 2.82 × 103 2.82 × 103 of data is used for comparison after calculating the fouling resistances for the same time period, using the fitted models side, while atmospheric residue is the hot stream in the shell determined by using the estimation set. This approach is side. Note that the temperature dependency in physical chosen for using the fitted parameters with a different set of properties plays an important role in the simulation and data, and tests the predictive capabilities of the fouling rate optimization strategies (data reconciliation and parameter models. A simulation of the heat exchanger using the fitted estimation). The more complex the relations among process models is used to analyze the prediction capabilities of the variables and physical properties are, the greater the effect of fitted model. Outlet temperatures are selected as a criterion for these relations on the parameter estimation results. This effect this comparison. Shell-side and tube-side fouling are is also reflected in computational time, as a greater number of represented by the fouling rate models from eqs 27 and 28.

10427 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article

The heat exchanger simulation, data reconciliation, and shown in Table 7. The results show significant differences parameter estimation methods are coded in MATLAB, where between the two sets; these can be explained by the fact that the input information is integrated to the main algorithm by using Microsoft Excel spreadsheets for the heat exchanger Table 7. Fitted Fouling Rate Model Parameters for Case 1 geometry and stream specifications. These calculations are done by a computer with an Intel Core i5 processor of 3.20 parameter units value α̂ 2 −1 −1 × −4 GHz and 8.00 GB of installed RAM. In order to account for 1 m KkW h 2.23 10 α̂ 2 −1 −1 × 6 the effect of different levels of complexity (i.e., cases 1−4), 2 m KkW h 4.65 10 ̂ −1 each case from Table 3 is analyzed separately. For all cases, a EA kJ mol 55.04 − − − single set of optimization parameters is used. This set of γ̂ m2 KkW 1 h 1 7.57 × 10 9 − parameters for all cases is shown in Table 5. The in-built RMSE 5.17 × 10 4 ff Table 5. Optimization Parameters for Estimation of Fouling di erent approaches are used for calculating both sets of Models fouling resistances; in the case of measured fouling resistances, eq 34 is used, where only an overall value of this variable is parameter value considered, without any regard to the contribution from each population size 400 side of the heat exchanger. On the other hand, the effect of maximum number of generations 400 shell-side and tube-side fouling deposition is accounted for crossover fraction 0.20 when solving the parameter estimation problem, where eq 26 is number of optimization variables 4.00 used for shell side and tube side separately. mutation function “adaptive feasible” Good agreement is obtained, as shown in Figure 3 and Figure 4, where predictions for fouling resistance and outlet Genetic algorithm solver ga in MATLAB is used, which uses decimal encoding and an intermediate crossover function that takes a weighted average of the parents for generating a child for the next generation. The mutation function is shown in Table 5, which is selected as such function adapts the mutation actions accordingly depending on the changes between generations and the inequality constraints. In order to prioritize mutation actions for next generations, the stochastic nature of the solver is exploited by choosing a low value of crossover fraction. The number of generations and size of the population matrix are based on the number of optimization variables. Lower and upper bounds for the optimization variables are applied for all cases. For each parameter, a wide range of values is selected, as it is desired to maintain a flexible and robust set of parameters, which can capture the uniqueness of a specific type of crude oil when necessary. The values for these lower and upper bounds are reported in Table 6. Normalized bounds

Table 6. Lower and Upper Bounds for Parameter Estimation Figure 3. Parity plot for fouling resistance Rf: Case 1. normalized parameter lower bound upper bound α̃ 1 0.00 10.0 α̃ temperatures for the heat exchanger are depicted and reflected 2 0.00 10.0 ̃ in the value of the RMSE in Table 7. The plots show an EA 0.50 2.0 fi γ 0.00 10.0 accurate t for both variables, which is expected given the fact ̃ that measurement error is not considered in this case. 6.2. Case 2: Parametric Fitting without Data (dimensionless) are set for these cases, since the optimization Reconciliation and Considering Only Random Errors. problem is solved based on the normalization procedure As described in section 5, random errors are added to the data described in section 4. A narrower range of bounds is selected points using known values for standard deviations and for the activation energy, where typical values for Polley’s generated for each time step. That is, for the same process model on crude oil applications are found within the range of variable, different values of random error are added at each 38 and 59 kJ mol−1.16 time step. The parameter estimation strategy is applied using 6.1. Case 1: No Measurement Error within Data. The the raw data, without considering data reconciliation. The flow parameter estimation approach is tested by neglecting the rate and temperature simulated measurements are illustrated in effect of measurement error and back-calculating each fouling Figure 5. model parameter from the simulated data. These results are The results of the parametric fitting are shown in Table 8. compared with the base values. No data reconciliation is The estimated parameters present (as in Case 1) significant implemented in this case, as no measurement error is differences between the two sets of parameters. The value of considered. The results from the parameter estimation are the RMSE is higher than that of Case 1. This increase is (as

10428 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article

A comparison of predicted and measured fouling resistance is shown in Figure 6. As it can be seen, each point

Figure 4. Simulated (synthetic data) and predicted (fitted model) outlet temperatures for tube side and shell side: Case 1

Figure 6. Parity plot for fouling resistance Rf: Case 2.

corresponding to the fouling resistance evolution through time is more scatter compared to Case 1. In the next case, these results are contrasted with a parameter estimation considering the reconciliation of measurements. 6.3. Case 3: Data Reconciliation Considering Only Random Errors. The effect of random error and data reconciliation in the parameter estimation for fouling rate models are now studied. The results from the data reconciliation are shown in Figure 7. The results show that the reconciliation performance in the flow rate for shell side and tube side is significantly reduced, as shown in Figure 7a. On the other hand, from Figure 7b, it can be seen that this is not the case for the temperature measurements. Nevertheless, both mass and energy balances are satisfied, and the adjustments alleviate the impact of random noise for this set of measurements. The main difference between the results for the reconciliation of flow rates and temperatures is the use of flow rate specifications for both sides of the heat exchanger. The flow rates for inlet and outlet conditions are related through mass balance equations. Figure 5. Simulated (synthetic) flow rates and outlet temperatures for This fact reflects in the data reconciliation results, as the flow (a) tube-side and (b) shell-side: Case 2. rate information is used as a direct constraint, whereas for outlet temperatures nonlinear relations are used for calculating Table 8. Fitted Fouling Rate Model Parameters for Case 2 and estimating the reconciled values. This increase in nonlinear parameter units value complexity has a direct impact on the reconciliation solution. As a consequence, the overall reconciliation performance is α̂ 2 −1 −1 × −7 1 m KkW h 3.50 10 relatively adequate but sufficient so the energy process α̂ 2 −1 −1 × 5 2 m KkW h 4.32 10 fi ̂ −1 constraints are satis ed for all measurements. EA kJ mol 43.91 The performance of the data reconciliation can be quantified 2 −1 −1 × −8 γ̂ m KkW h 1.49 10 by analyzing the reduction in standard deviation for all RMSE 0.103 measurements, across the entire time span. If the data reconciliation is able to reduce the magnitude of random errors completely, the standard deviation for the reconciled expected) directly related to the presence of random errors in measurement error will be close to zero, as a negligible the flow rate and temperature measurements, which is further magnitude of measurement error is contained within the data propagated to the calculation of fouling resistance. set. The standard deviations of the measurement error for flow

10429 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article

deviations of the measurement errors are greatly reduced after reconciliation. The fouling model parameters are fitted using the set of reconciled data. The results are presented in Table 10, with

Table 10. Fitted Fouling Rate Model Parameters for Case 3

parameter units value α̂ 2 −1 −1 × −7 1 m KkW h 9.16 10 α̂ 2 −1 −1 × 5 2 m KkW h 5.03 10 ̂ −1 EA kJ mol 44.58 − − − γ̂ m2 KkW 1 h 1 1.48 × 10 8 RMSE 4.43 × 10−2

their corresponding RMSE. The set of parameters differs from that shown in Table 7. The main reason for these differences is the presence of random error, which has been partially reduced after reconciling each measurement. The values of the fouling parameters are within expected ranges, where the parameter γ presents a value close to its upper bound (i.e., 1.50 × 10−8 m2 KkW−1 h−1). Note that these results show that a different set of fouling model parameters can be fit to regress and predict the same fouling resistance and thermal performance. The capability of identifying the correct fouling mechanism in both sides of the heat exchanger is limited to either previous or fundamental information regarding the fouling phenomenon in the shell side and the tube side. The fouling model parameters Figure 7. Data reconciliation results for (a) flow rates and (b) outlet are used to predict the outlet temperatures and fouling temperatures for tube side and shell side: Case 3. resistance of the heat exchanger, just as in Case 1 and 2. A parity plot for fouling resistance is depicted in Figure 8.Asthe rates and temperatures before and after data reconciliation were calculated. An annual average for the standard deviation is obtained, and these values are used to calculate the reduction of standard deviation before and after reconciliation. The mean values of standard deviation before and after data reconcilia- tion and the relative percentage of reduction of standard

Table 9. Standard Deviation and Percentage of Reduction of Standard Deviation for Measurement Errors in Flow Rates and Temperatures

reduction in standard deviation σbefore σafter (%) flow rates 0.29 2.0 × 10−12 100 temperatures 0.19 0.07 62.0

fi deviation (errsd) (de ned in eq 51) are shown in Table 9, for flow rate and temperature measurements. before after σσ− Figure 8. Parity plot for fouling resistance Rf: Case 3. errsd = before · 100 σ (51) value of the fouling resistance increases, several predicted where σbefore and σafter are the standard deviations of the data points tend to have a higher difference compared to that of the ji zy set (flowj rates or temperatures)z before and after data set of reconciled values. Nevertheless, the overall performance j z reconciliation.k { in terms of predictions of outlet temperatures is satisfactory. The results from Table 9 show that the data reconciliation is Figure 9 illustrates the agreement between reconciled and better for flow rate measurements than for the corresponding predicted data for both stream temperatures, which also temperatures. These results are consistent with the points validates the satisfaction of mass and energy constraints set in made about the effect of nonlinearities on each energy the data reconciliation problem. Moreover, the value of the constraint. These figures also validate the idea that each RMSE is lower than that of Case 2. This difference shows the process constraint is suitably satisfied, as the values of standard relevance of the data reconciliation for improving the accuracy

10430 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article

Figure 9. Simulated (synthetic data) and predicted (fitted model) outlet temperatures for tube side and shell side: Case 3.

of the parameter estimation strategy for assessment and prediction of the fouling behavior. It is possible to quantify the agreement for temperature predictions by analyzing the absolute error between predicted and reconciled values. The absolute error (absT) for outlet temperatures in both sides of the heat exchanger is defined in msr eq 52, where To and T0̂ are the measured (synthetic) and Figure 10. Absolute error for outlet temperature prediction of tube fitted outlet temperatures for shell side and tube side of the side (a) and shell side (b): Case 3. heat exchanger, respectively. Figure 10 shows histograms for shell-side and tube-side outlet temperatures. The absolute The presence of gross errors affects the measurement errors values are within the ranges of as −0.23 and 0.23 °C for adjustments during reconciliation, as their impact differs from the tube side, and −0.52 and 0.52 °C for the shell side, one measurement to the next, depending on the correlation respectively. These differences are considered acceptable since between the measurements and the process constraints. In both of these values have a low frequency, meaning that they other words, if a single measurement is present in most of the do not repeat themselves within the data set as much as the process constraints, it is more likely that the presence of gross rest. It may be concluded that the data reconciliation approach error will impact this measurement’s adjustments during reduces the effectofrandomerrorfromthesetof reconciliation in a higher level, compared to another measurements and allows for reliable parameter estimation measurement used in fewer constraints. This effect is known and prediction of outlet thermal conditions. as the smearing effect,12 and it needs to be accounted for, as it msr defines the minimum gross error magnitude for complete abs TT̂ (52) T =−o o identification and estimation of such gross error. 6.4. Case 4: Data Reconciliation and Gross Error For quantifying performance, the overall power function Detection and Identification. Identification and estimation (OPF)25 is used. This indicator is the ratio of the number of of gross error locations and magnitudes are evaluated in this simulation trials where gross errors are perfectly identified, case study. That is, to find the presence of gross errors, along over the total number of simulations. The value of the overall with the measurement(s) that contains said gross error(s), and power function is calculated using the whole set of simulation finally their numerical value. The statistical framework (one year with time steps of 1 day), when a given flow rate or described in section 3.2 is implemented in several subcases temperature measurement has a bias. A successful solution for where a single error in different single measurements is the gross error detection problem exists when the value of the deliberately added. The performance of the parameter OPF is equal to 1.28 estimation in each of these subcases is reported, along with Different values of gross errors are added, based on the σ σ an analysis of the accuracy of the gross error estimation magnitude of standard deviation for each variable ( m and T method, that is, if the gross errors added in each subcase are respectively). Each gross error is assumed to be constant with correctly identified, located, and estimated. Note that it is of time, and their numeric values are added in two different great importance that all gross errors are correctly identified measurements, separate and independently. Applying the and estimated, as the accuracy of the parameter estimation approach described in section 3.2 allows for identifying the depends on the level of reduction of random and gross errors, presence, location, and value of the gross errors. The cold that is, how well the data are reconciled. stream inlet flow rate and the hot stream outlet temperature

10431 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article measurements are selected to have gross errors, giving a total of eight subcases. These measurements are used for visualizing the performance of the data reconciliation, when a gross error is present in a flow and temperature measurement. An outlet temperature is selected, as the value of this process variable directly depends on the severity of fouling deposition occurring in the heat exchanger. The effect of the presence and reconciliation of gross errors on the parameter estimation for fouling models is determined by the accuracy of the fitted parameters and the prediction capability of the fitted model, when predicting the outlet conditions of the heat exchanger (temperatures) after reconciling random and gross errors, as implemented in Case 3. The values of bias for each subcase are summarized in Table 11.

Table 11. Levels of Gross Errors Added to Data Set: Case 3

variable bias fl σ σ σ σ ow rates 3 m,6 m,9 m, and 12 m σ σ σ σ temperatures 3 T,6 T,9 T, and 12 T

The gross error identification and detection results for a Figure 12. Minimum gross error magnitude estimation for hot stream outlet temperature. single gross error in the cold stream inlet flow rate are shown in Figure 11. In this subcase, a gross error can be detected, of gross errors is estimated as 3.0 °C approximately. As previously said, gross errors of less overall power than the estimated threshold are reconciled as random error. Even if the presence of gross error is identified and mitigated resulting in an overall power function of 1.00, the alleviation of the effect of these gross errors in each measurement adjustment during data reconciliation does not reduce the entire value of the measurement error. Because of the smearing effect, for relatively high gross errors values, such as those σ σ greater than 9 m or 9 T, the set of reconciled measurements is different from the ones obtained for the same set, when no gross error is present, indicating the presence of a smearing effect. This behavior is exhibited in the results of the parameter estimation. Results from the parameter estimation procedure for both subcases are shown in Table 12 and Table 13 respectively. The same four levels of gross error shown in Table 11 are used, and the set of fouling model parameters, along with the value of RMSE is compared. By comparing the results summarized in Table 12 and Table 13, it can be seen that the fouling model parameters are less Figure 11. Minimum gross error magnitude estimation for cold accurate, as indicated by the values of RMSE, when a gross stream input flow rate. error is present in a temperature measurement. The value of RMSE is lower for all levels of gross errors when this bias is in the flow rate measurement of the cold identified, and estimated with sufficient accuracy (OPF equal stream. Temperature measurements are related through to 1.00) when the magnitude of the gross error has a value of nonlinear equations, and, as a consequence, the quality of σ fl at least 9 m. In terms of ow rate, the minimum magnitude for adjustments for reconciled values is lower than that of linear identification and estimation of a bias is 4.50 kg s−1. Any other mass balance constraints. This effect is amplified when gross gross error presenting a lower magnitude is not detected as errors are considered. The smearing effect has a direct impact bias (data set passes the global test, see eq 41), and the data on the accuracy of measurement adjustments and decreases the reconciliation algorithm adjusts this error as if it were a accuracies of the reconciled estimates. As a result, higher values random error, which in some cases, leads to inaccurate of the objective function for data reconciliation (eq 32) are reconciled measurements.25 obtained, leading to different values of fitted fouling model Similar behavior is exhibited when there is a gross error parameters, corresponding to higher values of RMSE. These located in the hot stream outlet temperature. The results for differences are evident when comparing the values of RMSE in the minimum gross error value are illustrated in Figure 12. The Table 10 and Table 13. value of the overall power function reaches 1.00 for a minimum The goodness-of-fit results for fouling resistances, when σ σ σ bias magnitude of 9 T. In terms of temperature, the minimum minimum gross errors of 9 m and 9 T are added to the

10432 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article

Table 12. Estimated Fouling Model Parameters for Different Levels of Gross Errors: Cold Stream Input Flow Rate σ σ σ σ parameter units 3 m 6 m 9 m 12 m α̂ 2 −1 −1 × −7 × −6 × −7 × −7 1 m KkW h 8.99 10 4.61 10 9.16 10 9.17 10 α̂ 2 −1 −1 × 5 × 5 × 5 × 5 2 m KkW h 5.08 10 5.34 10 5.03 10 5.03 10 ̂ −1 EA kJ mol 44.63 44.87 44.59 44.59 − − − − − − γ̂ m2 KkW 1 h 1 1.48 × 10 8 1.42 × 10 8 1.49 × 10 8 1.49 × 10 8 RMSE 0.044 0.044 0.044 0.044

Table 13. Estimated Fouling Model Parameters for Different Levels of Gross Errors: Hot Stream Outlet Temperature σ σ σ σ parameter units 3 T 6 T 9 T 12 T α̂ 2 −1 −1 × −7 × −6 × −7 × −7 1 m KkW h 4.45 10 2.37 10 8.33 10 8.33 10 α̂ 2 −1 −1 × 5 × 5 × 5 × 5 2 m KkW h 9.69 10 1.16 10 7.49 10 7.49 10 ̂ −1 EA kJ mol 47.19 48.01 46.26 46.26 2 −1 −1 × −8 × −8 × −8 × −8 Γ̂ m KkW h 1.49 10 1.48 10 1.48 10 1.48 10 RMSE 0.064 0.110 0.056 0.056 previously analyzed measurements (inlet cold flow rate and outlet hot temperature), are shown in Figure 13. Predictions

Figure 14. Shell-side and tube-side outlet temperatures using fitted σ fouling parameters for gross error magnitudes of 9 m in cold stream fl σ inlet ow rate (a) and 9 T in hot stream outlet temperature (b).

predictions for the outlet temperature in each subcase present Figure 13. Parity plot for fouling resistance Rf: Single gross error of σ fl σ good agreement, as indicated by the values of absolute magnitude 9 m in inlet cold stream ow rate (a) and 9 T in outlet hot ff stream temperature (b). temperature di erence in Figure 15. The shell-side and tube-side outlet temperatures are accurately predicted as shown in Figure 14. There is a good for the heat exchanger’s outlet conditions are illustrated in agreement between the sets of values, and the difference Figure 14. Absolute temperature differences between meas- between predictions and adjusted measurements are judged to ured, and predicted outlet temperatures for both subcases are be acceptable, for both cases where a single gross error is shown in Figure 15. As mentioned, the presence of found. The absolute errors in temperature prediction are measurement error is more evident when gross errors affect shown in Figure 15. For both sides of the heat exchanger, a a temperature measurement, where the outlet temperature at wider range of absolute error is calculated when gross errors the hot stream is used as an example. The predicted fouling are detected in temperature measurements, compared to the resistances when a flow rate bias is added are closer to their distribution of prediction error when the gross error is located corresponding simulated values than those of when a in flow rate measurements. The temperature differences are temperature bias exists. As in Case 3, more scattering is within the ranges of −0.23 and 0.23 °C and −0.52 and 0.52 °C found for higher values of fouling resistance. Nevertheless, the for tube side and shell side respectively, when a flow rate bias is

10433 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article

ff σ fl Figure 15. Absolute di erences for predictions of tube-side (a) and shell-side (b) outlet temperatures for a gross error of 9 m in cold stream ow σ rate and tube-side (c) and shell-side (d) outlet temperatures for a gross error of 9 T in hot stream outlet temperature. present. On the other hand, when the gross error is located in a presence of gross errors become greater when higher levels of temperature measurement, the absolute differences for tube redundancy and nonlinearities are present. side and shell side are in the ranges of −0.38 and 0.36 °C, and The fitted models worked with accuracy in the case study, as −0.81 and 0.85 °C respectively. These last values are slightly it is evident from comparisons of fouling resistances and outlet higher than the ones from Case 3. This fact is explained by the temperatures of the heat exchangers. In terms of prediction same reason mentioned in the analysis of Case 3, where the errors, the maximum absolute difference in temperature smearing effect and nonlinearities disturb the accuracy of each predictions among the entire set of cases was 0.85 °C. measurement adjustment. Different fouling rate models were used for the shell side and tube side of the heat exchanger. The overall fouling resistance 7. CONCLUSIONS was successfully split into these two contributions, attributing specific values to shell- and tube-side fouling model This work proposes an integrated methodology for determin- parameters. This approach can only be taken when each ing fouling model parameters using data reconciliation and fouling mechanism is known, or at least when there is enough fi parametric tting. It is shown that predictions for fouling information regarding operating conditions and fluid proper- resistance and heat exchanger conditions are also implemented ties (for both sides), so the correct mechanism can be selected, ff using this methodology. The approach accounts for di erent based on up-to-date evidence concerning the most suitable types of geometries and stream allocations in the simulation fouling mechanism. The methodology developed in this work and prediction strategies, as well as temperature-dependent allows for flexibility as to the type of mechanism that should be physical properties when necessary. An advantage of this work chosen for a certain heat exchanger. Note that shell-side is that it uses a pseudo-steady-state formulation, which helps to fouling is a complex process, and its study is limited at the reduce the complexity of calculations. Also, the updating of moment. Therefore, it is of great importance to understand fouling resistance using fouling rate dynamic models helps to this phenomenon (shell-side fouling deposition) and address bring a more realistic perspective into the problem. In practice, any new discovery to an integrated methodology such as the measured data should be obtained from a fully instrumented one presented in this work. heat exchanger. However, to develop the approach and have The use of this approach can be extended to a fully confidence in the data sources, the measurement error has instrumented heat exchanger network, where fouling can occur been accounted for by adding random and systematic noise on both sides of all heat exchangers, presenting different rate into the simulated data. Then, the data reconciliation and gross mechanisms. The advantage gained from accurately calculating error detection algorithms have been applied to produce a fouling rate models can be further exploited by integrating this usable (free-of-error) data set. A case study has been approach with existing methods for design, retrofit, and presented, where the effectiveness of the data reconciliation optimization of cleaning schedules for heat exchangers and and gross error detection methods, along with the parameter heat exchanger networks, for estimating more realistically any estimation approach, were tested. Results showed good economic savings in capital, maintenance, and energy costs. agreement for all cases. It has been shown that special The effect of fouling in the hydraulic performance of heat attention is required when a gross error is located in any exchangers and heat exchanger network, as well as the effect of temperature measurement, as the smearing effect and the missing measurements along the equipment, is to be

10434 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article considered for future contributions, in order to reach the level Greek α 2 ° −1 −1 of complexity of real processes and to increase the rigorousness 1 particulate fouling rate term, m CkW h α 2 ° −1 −1 of the modeling framework. 2 chemical reaction fouling deposition term, m CkW h γ chemical reaction fouling suppression term, m2 °CkW−1 ■ AUTHOR INFORMATION h−1 δ fi − Corresponding Author level of signi cance, * ε thermal effectiveness, − E-mail: [email protected]. ε ff − a thermal e ectiveness for multiple shells heat exchangers, ORCID λ thermal conductivity, kW m−1 JoséLoyola-Fuentes: 0000-0002-7512-6148 μ viscosity, Pa m Megan Jobson: 0000-0001-9626-5879 ν degrees of freedom, − −1 Notes σ standard deviation, kg s or °C fi τ test statistical for global test, − The authors declare no competing nancial interest. τ − c threshold value for global test, φ − ■ ACKNOWLEDGMENTS ξ constraint residuals covariance matrix, ψ measurement error covariance matrix, − The authors gratefully acknowledge the Chilean National Subscripts Commission for Scientific and Technological Research (CONICyT) for the financial support granted for the c cold stream development of this work. h hot stream i inlet fl ■ NOMENCLATURE m mass ow rate measurement 2 mean mean value A area, m min minimum ff absT absolute temperature di erence for model prediction, o outlet ° C shell shell side − bxm linearization term, T temperature measurement − Bξ bias location matrix, tube tube side −1 ° −1 cp heat capacity, kJ kg C W wall CP mean capacity flow rate, kJ °C−1 fl − Superscripts Cr heat capacity ow rate ratio, ^ fitted values di tube inner diameter, m ∼ normalized values do tube outer diameter, m −1 after after data reconciliation EA activation energy, kJ mol − before before data reconciliation errsd relative error for reduction in standard deviation, − L lower bound FL leakage factor, − msr measured Fp pitch factor, ffi − U upper bound Fs correction factor shell-side heat transfer coe cient, −1 gξ bias magnitude, kg s or °C h local heat transfer coefficient, kW m−2 °C−1 ■ REFERENCES − Jxm Jacobian matrix, (1) Bott, T. R. Fouling of Heat Exchangers; Elsevier Science B.V.: k total number of time steps, − Amsterdam, 1995. L length, m (2) Rodriguez, C.; Smith, R. Optimization of operating conditions − m mass flow rate, kg s 1 for mitigating fouling in heat exchanger networks. Chem. Eng. Res. Des. n time step index − 2007, 85 (6), 839−851. nshells number of shells, − (3) Coletti, F.; Joshi, H. M.; Macchietto, S.; Hewitt, G. F. Chapter − One: Introduction. In Crude Oil Fouling; Gulf Professional Publishing: NTU Nnumber of transfer units, − OPF overall power function, − Boston, 2015; pp 1 22. Pr Prandtl number, − (4) Epstein, N. Thinking about heat transfer fouling: a 5x5 matrix. Heat Transfer Eng. 1983, 4 (1), 43−56. Q heat duty, kW − (5) Ishiyama, E. M.; Pugh, S. J.; Paterson, B.; Polley, G. T.; Kennedy, qξ vector of constraint residuals, J.; Wilson, D. I. Management of crude preheat trains subject to Re Reynolds number, − fouling. Heat Transfer Eng. 2013, 34 (8−9), 692−701. 2 ° −1 Rf fouling resistance, m CkW (6) Watkinson, A. P. Deposition from crude oils in heat exchangers. −1 ° −1 − Rg ideal gas constant, kJ mol C Heat Transfer Eng. 2007, 28 (3), 177 184. RMSE root mean square error, − (7) Wang, Y.; Yuan, Z.; Liang, Y.; Xie, Y.; Chen, X.; Li, X. A review −1 rξ random error magnitude, kg s or °C of experimental measurement and prediction models of crude oil T temperature, °C fouling rate in crude refinery preheat trains. Asia-Pac. J. Chem. Eng. ffi −2 ° −1 2015, 10 (4), 607−625. Uc clean overall heat transfer coe cient, kW m C ffi −2 ° −1 (8) Kern, D. Q.; Seaton, R. E. A theoretical analysis of thermal Ud fouled heat transfer coe cient, kW m C − −1 ° surface fouling. British Chemical Engineering 1959, 4 (5), 258 262. xM measured magnitude, kg s or C (9) Wilson, D.; Polley, G.; Pugh, S. Ten years of Ebert, Panchal and −1 ° xR true or reconciled magnitude, kg s or C the ‘threshold fouling’ concept. ECI Symposium Series, Volume RP2; − yc binary variable for NTU formulation, Proceedings of 6th International Conference on Heat Exchanger Fouling Δt time step difference, s and Cleaning: Challenges and Opportunities, Germany, June 5−10, Δ ff ° TLM logarithmic mean temperature di erence, C 2005.

10435 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Industrial & Engineering Chemistry Research Article

(10) Jiang, X.; Liu, P.; Li, Z. Data reconciliation and gross error (31) EngineeringToolbox Comparing Flowmeters; https://www. detection for operational data in power plants. Energy 2014, 75,14− engineeringtoolbox.com/flowmeter-selection-d_526.html (accessed 23. 28th March 2019). (11) Romagnoli, J. A.; Sanchez, M. C. Data Processing and (32) Thermocoupleinfo.com Thermocouple Accuracies; https:// Reconciliation for Chemical Process Operations; Academic Press: San www.thermocoupleinfo.com/thermocouple-accuracies.htm (accessed Diego, California, United States, 1999; Vol. 2. 28th March 2019). (12) Martini, A.; Coco, D.; Sorce, A.; Traverso, A.; Levorato, P., (33) Ahmad, S.; Polley, G. T.; Petela, E. A. In Retrofit of Heat Gross error detection based on Serial Elimination: Applications to an Exchanger Networks Subject to Pressure Drop Constraints; AIChE industrial Gas Turbine. In ASME Turbo Expo 2014: Turbine Technical Spring Meeting, Houston, Texas, US, 1989. Conference and Exposition;Düsseldorf, 2014. (13) Diaz-Bejarano, E.; Coletti, F. Modelling shell side crude oil fouling in shell and tube heat exchangers. In Proceedings of International Conference of Heat Exchanger Fouling and Cleaning; Malayeri, M. R.; Müller, E. A.; Watkinson, A. P., Eds.; Dublin, Ireland, 2015; pp 81−88. (14) Ebert, W. A.; Panchal, C. B. Analysis of Exxon crude-oil-slip stream coking data. In Fouling Mitigation of Industrial Heat-Exchange Equipment; Begell House, 1995; pp 451−460. (15) Wang, Y.; Pan, M.; Bulatov, I.; Smith, R.; Kim, J.-K. Application of intensified heat transfer for the retrofit of heat exchanger network. Appl. Energy 2012, 89 (1), 45−59. (16) Yeap, B. L.; Wilson, D. I.; Polley, G. T.; Pugh, S. J. Mitigation of crude oil refinery heat exchanger fouling through retrofits based on thermo-hydraulic fouling models. Chem. Eng. Res. Des. 2004, 82 (1), 53−71. (17) Polley, G. T.; Wilson, D. I.; Pugh, S. J.; Petitjean, E. Extraction of crude oil fouling model parameters from plant exchanger monitoring. Heat Transfer Eng. 2007, 28 (3), 185−192. (18) Polley, G. T.; Wilson, D.; Yeap, B.; Pugh, S. Evaluation of laboratory crude oil threshold fouling data for application to refinery pre-heat trains. Appl. Therm. Eng. 2002, 22 (7), 777−788. (19) Coletti, F.; Macchietto, S. A dynamic, distributed model of shell-and-tube heat exchangers undergoing crude oil fouling. Ind. Eng. Chem. Res. 2011, 50 (8), 4515−4533. (20) Costa, A. L. H.; Tavares, V. B. G.; Borges, J. L.; Queiroz, E. M.; Pessoa, F. L. P.; Liporace, F. D. S.; de Oliveira, S. G. Parameter estimation of fouling models in crude preheat trains. Heat Transfer Eng. 2013, 34 (8−9), 683−691. (21) Cao, E. Chapter 7: Thermal design of shell and tube heat exchangers. In Heat Transfer in Process Engineering, 1st ed.; Soda, T.; Smith, S. M.; Madru, J. K., Eds.; McGraw Hill Professional: USA, 2009; pp 147−216. (22) de Oliveira Filho, L. O.; Queiroz, E. M.; Costa, A. L. H. A matrix approach for steady-state simulation of heat exchanger networks. Appl. Therm. Eng. 2007, 27 (14−15), 2385−2393. (23) Bhatti, M. S.; Shah, R. K. Chapter 4: Turbulent and transition convective heat transfer in ducts. In Handbook of Single-Phase Convective Heat Transfer; Kakac, S.; Shah, R. K.; Aung, W., Eds.; Wiley: New York, 1987. (24) Ayub, Z. H. A new chart method for evaluating single-phase shell side heat transfer coefficient in a single segmental shell and tube heat exchanger. Appl. Therm. Eng. 2005, 25, 2412−2420. (25) Narasimhan, S.; Jordache, C. Data Reconciliation and Gross Error Detection: An Intelligent Use of Process Data; Gulf Professional Publishing: Houston, TX, United States, 1999. (26) Edgar, T. F.; Himmelblau, D. M.; Lasdon, L. S. Optimization of Chemical Processes; McGraw-Hill: New York, 2001. (27) Madron, F. V. A new approach to the identification of gross errors in chemical engineering measurements. Chem. Eng. Sci. 1985, 40 (10), 1855−1860. (28) Sanchez,́ M.; Romagnoli, J.; Jiang, Q.; Bagajewicz, M. Simultaneous estimation of biases and leaks in process plants. Comput. Chem. Eng. 1999, 23 (7), 841−857. (29) Bagajewicz, M. J.; Jiang, Q. Gross error modeling and detection in plant linear dynamic reconciliation. Comput. Chem. Eng. 1998, 22 (12), 1789−1809. (30) Goldberg, D. E. Genetic Algorithms in Search, Optimization and Machine Learning; Addison-Wesley Longman Publishing Co., Inc.: Reading, MA, 1989; p 372.

10436 DOI: 10.1021/acs.iecr.9b00457 Ind. Eng. Chem. Res. 2019, 58, 10418−10436 Chapter 4

Data Reconciliation for Fouling Modelling in Fully Instrumented Crude Oil Heat Exchanger Networks

4.1 Introduction to Publication 2

A follow-up study that extends the methodology detailed in Chapter 3 is pre- sented in this Chapter. The features of data reconciliation, and the advantages of using fouling threshold models for considering fouling dynamics are implemented in a crude oil pre-heat train. The implementation of the proposed methodology to a heat exchanger network increases the complexity of every aspect of the prob- lem. The reasons for this is that any sensitive change in a stream within the network directly affects the remaining ones. The same can be held for changes in the fouling resistance in either side of the heat exchangers. Furthermore, be- cause of the wide range of temperatures the crude oil is heated up to, several fouling mechanisms can occur along the pre-heat train. Additionally, numerous measurement instruments are installed around the heat exchanger network, thus the probability of encountering measurement bias and severe cases of misleading data is much higher. The work outlined in this chapter applies the methodology defined in Chapter 3 in a fully instrumented crude oil heat exchanger network. The heat exchanger

78 4.2. PUBLICATION 2 79 network was modelled by means of a matrix-based formulation that describes the mass and energy conservation equations as a set of linearly independent relations that uses the topological information from the pre-heat train. Flow rate and tem- perature (simulated) measurements of each streams in the network are reconciled, and specific fouling model parameters for each heat exchanger in the network are estimated. Different fouling mechanisms are assumed on each heat exchanger. The selection of this mechanisms are based on their relative location within the network, in order to be consistent with the operational temperature range along the pre-heat train. Gross errors are also considered and the performance of the identification of multiple gross errors is tested. The estimated fouling threshold models are validated with the measured data and further utilised for predicting the network’s fouling behaviour. As each stream is assumed to be characterised, the effect of unmeasured variables was not considered in this work. Likewise, pressure measurements were not considered and only the thermal effect of fouling was accounted for. To address some issues during the proof-reading stage of this publication, a cor- rigendum for this paper is attached in Appendix A.

4.2 Publication 2

 Title: Data Reconciliation and Gross Error Detection in Crude Oil Pre- Heat Trains Undergoing Shell-side and Tube-side Fouling Deposition

 Authors: Jos´eLoyola-Fuentes and Robin Smith

 Journal: Energy

 Year: 2019

 DOI: www.doi.org/10.1016/j.energy.2019.06.119 Energy 183 (2019) 368e384

Contents lists available at ScienceDirect

Energy

journal homepage: www.elsevier.com/locate/energy

Data reconciliation and gross error detection in crude oil pre-heat trains undergoing shell-side and tube-side fouling deposition

* Jose Loyola-Fuentes , Robin Smith

Centre for Process Integration, School of Chemical Engineering and Analytical Science, The University of Manchester, M13 9PL, UK article info abstract

Article history: Fouling is a problem in crude oil refineries. The effect of fouling deposition is particularly significant in Received 16 January 2019 the heat exchanger network (or pre-heat train) upstream of the crude oil distillation unit. A wide variety Received in revised form of semi-empirical models are available for predicting the fouling behaviour. These models can be ob- 11 June 2019 tained by fitting experimental or industrial operating data to a specific fouling model. When industrial Accepted 17 June 2019 data are used, the effect of measurement error and presence of faulty instruments (or gross errors) Available online 20 June 2019 should be accounted for. This work presents a new methodology that allows for data reconciliation and gross error detection, together with the estimation of fouling model parameters for a pre-heat train Keywords: Heat exchanger network undergoing different fouling mechanisms on the shell and tube-sides. The methodology is tested in a Optimisation simulated case study. It is shown that the data reconciliation and gross error detection algorithms are Energy recovery able to minimise the measurement errors and to identify the presence of single or multiple faulty in- Process integration struments. The fouling models for each heat exchanger are estimated using the reconciled data, and the fouling behaviour and thermal performance of the network are predicted and analysed. © 2019 Elsevier Ltd. All rights reserved.

1. Introduction In the pre-heat train, crude oil increases its temperature pro- gressively, absorbing heat from several side products of the crude Crude oil continues to be the major contributor and most distillation unit, or CDU (Kerosene, Diesel, Heavy and Light exploited resource for the production of fuel and petrochemicals Naphtha, etc.). As temperature increases, different fouling mecha- [1]. Its global importance has driven past and current research to nisms combine together, contributing to the overall fouling resis- develop methodologies for improving the design and operability of tance in each heat exchanger [4]. To date, several fouling refining processes. One of the foremost improvements in terms of mechanisms have been identified [5]. It has been found [6e8] that energy savings has been the development and implementation of these mechanisms depend on the crude oil chemical composition, heat integration in the pre-heating of crude oil. This pre-heating physical properties and the HEN operating conditions. In general, system is commonly known as the pre-heat train and consists of more focus is given to the hot end of pre-heat trains, where a heat exchanger network (HEN) of shell-and-tube heat exchangers chemical reaction fouling is the dominant mechanism, due to the (in most cases) interconnected in series and/or parallel arrange- high temperatures crude oil is pre-heated to. On the other hand, at ments, as it is illustrated in Fig. 1. The pre-heat train is able to the cold end, a decrease in thermal performance in one heat recover between 60 and 70% of the energy needed for the pre- exchanger is partially compensated by the heat recovery down- heating of crude oil [2]. However, the performance of any heat stream of that heat exchanger, as the temperature difference be- exchanger and heat exchanger network is affected by fouling tween cold and hot streams becomes higher [9]. deposition. Its occurrence not only has a detrimental effect on the Fouling is a complex phenomenon. Detailed information is thermal performance of the energy recovery system, but also in- needed for simultaneous understanding of the underlying causes creases the pressure drop across the network, potentially leading to and predicting fouling deposition in single and multiple heat ex- critical failure when no maintenance actions are considered. changers. In the case of crude oil refineries, plant monitoring is increasingly becoming a standard practice for capturing and ana- lysing fouling behaviour [10]. The use of field-data in modelling, control and optimisation of processes brings several advantages. * Corresponding author. First, it provides a more realistic context as to the state of E-mail address: [email protected] (J. Loyola-Fuentes). https://doi.org/10.1016/j.energy.2019.06.119 0360-5442/© 2019 Elsevier Ltd. All rights reserved. J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384 369

Fig. 1. Crude Oil Pre-heat Train, based on Ahmad et al. [3]. equipment. Second, it allows for a rigorous model validation, as The gross error detection (GED) problem is a problem related to monitored data can be compared with the model predictions. the solution of the data reconciliation problem. The identification of Finally, the implementation of process monitoring improves crucial faulty measurements or equipment leaks needs to be accounted for business activities such as production planning and risk before implementing data reconciliation [14]. The GED problem can assessments. be mainly divided into two sub-problems. The first sub-problem is One of the major challenges when monitoring industrial pro- the detection of the presence of a gross error. The solution for this cesses through measured data is the presence of measurement problem is achieved using statistical tests, which detect any devi- error. Different types of measurement instruments are used in ation of the measurement errors from their corresponding proba- pipelines, equipment and storage units. A wide variety of technol- bility distribution. Examples of these tests for detecting the ogies is available for measuring key operational variables (i.e. mass presence of gross errors are the Global Test [15], the Nodal Test [16], or volumetric flow rates, temperatures, pressures). Orifice-plate, the Measurement Test [17] and the Generalised Likelihood Ratio magnetic and ultrasonic flow-meters can be used for measuring (GLR) Test [18]. The second sub-problem is the simultaneous esti- flow rates in pipes; temperature is monitored using thermal sen- mation of the location, type and numerical value of the gross error. sors and transmitters, and similar instruments can be used for After determining the presence of gross errors using one of the tests pressure or pressure drop measurements. These numerous types of mentioned above, it is necessary to identify the measurement(s) instruments differ in their corresponding accuracy. Although some containing gross error(s) or the process constraint containing an specific instruments present relatively high measurement- equipment leak. The estimation of the numerical value(s) of these accuracy, they can be affected by systematic errors (or gross er- gross errors is also needed. Several methods have been developed rors). In most cases, these systematic errors are manifested in the for addressing this sub-problem. In general, most of these estima- form of measurement bias, equipment leaking or even complete tion techniques are based on either recursive or combinatorial failure due to environmental factors [11]. approaches. In the case of measurement biases, recursive serial Data reconciliation (DR) has proven to be a useful tool for elimination approaches [19] are a convenient option. These minimising the effect of measurement error in industrial and aca- methods can be implemented for the identification of single or demic applications [12,13]. This data processing technique exploits multiple gross errors, although they are not valid for identifying the existing system redundancy from measured data to adjust and equipment leaks. Combinatorial methods such as the one devel- estimate relevant process data that satisfy specific system con- oped by Sanchez et al. [20] presents enough flexibility for esti- straints (i.e. mass and energy balance) [14]. The estimations of the mating measurement biases and process leaks. At the same time, reconciled data are obtained via a minimisation problem that in- their methodology is able to simultaneously solve the DR and GED volves the redundant measured data and estimations of the mea- problems by solving a DR problem for each combination of sus- surements’ standard deviations. It is assumed that the pected candidates of measurements biases and process constraints measurement error consists in the sum of random and gross errors. for equipment leaks. The effect of equivalent sets of reconciled Random errors are considered as a random variable following a measurements (that is, sets of reconciled measurements presenting normal Gaussian distribution with an expected value (mean) equal equal value of objective function) is also considered. However, the to zero [14]. In the case of gross errors, they can present a greater algorithm was developed for linear systems, where only mass value than that of random errors. Gross errors alter the probability balance equations are set as process constraints. distribution of the measurement error, directly affecting the esti- The accuracy of the different methods for the identification and mation of reconciled measurements in the data reconciliation estimation of gross errors can be tested and quantified using problem. computational simulations [19]. Gross errors are manually added 370 J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384 into a set of simulated data and after a series of trials where a to account for the effect of any bias contained in single or multiple specific GED method is applied, different performance indicators measurements. An optimisation-based parameter estimation is are calculated. A common indicator is the overall power function used for calculating the fouling model parameters. The generation (OPF) [21], which is defined as the ratio between the number of of data and the prediction of the pre-heat train conditions (internal simulation trials with perfect identification (that is, the location of a flow rates and temperatures) are performed via a matrix-based single or multiple gross error is correctly identified) and the total simulation strategy. The main results show this method's capa- number of simulation trials. bility of reconciling process data including random and gross error, The major challenge regarding fouling monitoring in crude oil along with the identification of faulty instruments. Moreover, refineries is the integration of rigorous data-processing techniques fouling is considered for shell-side and tube-side via fitted fouling into the modelling and simulation of thermal equipment (i.e. heat rate models that are able to accurately predict fouling resistances exchanger networks). Smaïli et al. [22] implemented a data- and thermal performance of crude oil pre-heat trains. The potential filtering approach as a data reconciliation method in the calcula- of this methodology can be further exploited when designing and tion of fouling model parameters. These fouling parameters were retrofitting heat exchanger networks and design of sensor net- used in a cleaning schedule optimisation problem solved by a works when locating measurement instruments for fouling multi-start algorithm. Although economic savings are reported, monitoring. most of these results were related to local optimum and the data- fi ltering was not well detailed. The importance of the application 2. HEN and fouling model of these data-processing methods in crude oil refining processes is explained in the case study proposed by Ishiyama et al. [4]. In their The modelling and simulation of HENs subject to fouling are study, a simulation of a crude oil pre-heat train was carried out; complex tasks. This complexity is directly related to the network's data reconciliation is applied by means of calculating an overall topology and physical restrictions such as the temperature- fouling resistance and comparing the estimations of missing tem- dependency of some key physical properties, namely the heat ca- peratures with available plant-measurements. Fouling models pacity and dynamic viscosity. Fouling should also be considered as a fi fi were obtained by tting the reconciled data with speci c models dynamic phenomenon, where all process-to-process heat ex- within the simulation environment. Their methodology provides changers in the network are subject to changes in their thermal fi signi cant insights as to how important the implementation of data performance, based on their corresponding values of fouling reconciliation is for fouling assessment. Nevertheless, their study resistance. It is assumed that no phase change and pressure drop did not consider the effect of gross errors within the data and take place across the HEN. Stream interactions and different fouling fouling on both sides of each heat exchanger was ignored. A data mechanisms are accounted for in the modelling strategy described reconciliation method based on matrix decomposition techniques in Sections 2.1 and 2.2. (e.g. QR decomposition [19]) was implemented in an integrated A flexible, matrix-based HEN-simulation strategy is used in this methodology for simulation and optimisation of heat exchanger work. Linear equations are formulated for solving mass and energy networks in the work presented by Ijaz et al. [23]. Linear models balances. This matrix formulation was initially proposed by de were used to formulate mass and energy balance equations, and an Oliveira Filho et al. [31]. The network's structure is characterised by analytic solution for the data reconciliation problem was applied to a directed graph, composed of vertices and edges. Vertices are estimate the reconciled measurements. The reconciled data pre- described by supply and demand units at the beginning and end of sented good agreement compared with simulated measurements the HEN (PS and PD respectively), heat exchangers (HE), splitters obtained from commercial software (i.e. Aspen HYSYS). However, (SP), mixers (MX) and other unit operations (UP). Edges are rep- fouling was not considered in both the heat exchanger network resented by cold (c) and hot (h) streams connecting one vertex to simulation and data reconciliation methods. Further applications another. The inclusion of other unit operations (i.e. desalters, flash can be found regarding the use of data reconciliation in different units) as well as cold and hot utilities (CU and HU respectively) is fi industrial processes such as crude oil re nery cracking units [24] considered by implementing the updated simulation strategy and power plants [25]. proposed by Ochoa-Estopier et al. [32]. An example of this char- The modelling, determination and prediction of fouling depo- acterisation is shown in Fig. 2. The network in this figure consists of sition in crude oil pre-heat trains has been extensively studied. two heat exchangers, one splitter, one mixer, one desalter unit, two Until recently, most of these studies have focused on the fouling cold utilities, one hot utility, one cold process stream and two hot phenomenon in the tube-side of heat exchangers. Some examples process streams. Each vertex is represented by a Roman numerical, e can be found in Refs. [26 28]. Later studies have invested whereas each edge in the network is represented by an Arabic remarkable effort in the development of modelling frameworks for number. The total number of elements in the HEN (i.e. vertices) is fouling in the shell-side of heat exchangers. In particular, the work defined as N and the total number of internal streams is defined as proposed by Diaz-Bejarano et al. [29] is highlighted. The authors S. presented a dynamic model for shell-and-tube heat exchangers The total number of vertices and edges are grouped according to subject to shell-side and tube-side fouling. This model is locally the type of element and stream interconnected within the network. distributed and incorporates the effects of flow patterns and For vertices, the number of supply units NPS, demand units NPD, clearance occlusions in the shell-side. Tube-side fouling is also HE SP MX UP considered by using a fouling threshold model, which was fitted heat exchangers N , splitters N , mixers N , unit operations N , UT UT ¼ CU þ HU using operational data, under a simple but functional filtering cold and hot utilities N (where N N N ) are used to approach. Moreover, the implementation of hybrid optimisation describe each of these elements. The total number of streams is techniques has proven to be a viable option for determining fouling grouped according to the number of cold streams Sc and hot model parameters in crude oil heat exchangers, as it was shown by streams Sh. The interactions within the network can be further ð Þ Costa et al. [30]. represented using an incidence matrix M of dimensions N S . In this paper, an integrated approach for determining fouling The elements inside the matrix vary depending on each interaction. ð Þ¼ model parameters in a crude oil pre-heat train subject to fouling on If an edge j is directed to a vertex i, then Mi;j 1. On the other ð Þ ¼ both sides of each heat exchanger is proposed. Data reconciliation is hand, if an edge j is directed from a vertex i, M i;j 1. The value ð Þ applied and gross error detection is simultaneously implemented of any other element M i;j is set to be zero otherwise. The J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384 371

Fig. 2. Simple HEN diagram: Cold streams - continuous lines, hot streams - dashed lines, supply units - white squares, demand units - black squares, mixer - black circle, splitter - white circle. previously described notation for each element and stream in the and into supply and demand units for vector n (nT ¼ HEN is used for organising the incidence matrix, as it is shown in ½ðnPSÞT ðnPDÞT ). Flow rate specifications related to the streams of Equation (1). The corresponding incidence matrix for the network each supply unit have known values and are represented by the depicted in Fig. 2 is detailed in Fig. 3. For the sake of simplicity, null vector ðnPSÞ . Similarly, internal and external temperatures in the entries and utility streams (cold and hot) are omitted. The inci- network are defined as vectors T (dimension S 1) and V dence matrix M is used for formulating the mass and energy con- (dimension ðNPS þ NPDÞ 1) respectively. These two vectors are servation equations to solve for the values of internal flow rates and T ¼ temperatures. This simple arrangement allows for fast calculations, further divided into cold and hot streams for vector T (T ½ T T T ¼ improving the convergence of the simulation strategy. Tc Th ) and into supply and demand units for vector V (V ½ðVPSÞT ðVPDÞT ). Temperature specifications for the streams in 2 3 PS 2 3 each supply unit have known values, contained in the vector ðV Þ . 6 MPS MPS 7 Mass and energy conservation equations are now formulated, 6 MPS 7 6 c h 7 6 7 6 PD PD 7 assuming steady state and no mass and energy losses to the cor- 6 MPD 7 6 Mc Mh 7 6 HE 7 6 HE HE 7 responding surroundings. 6 M 7 6 Mc Mh 7 6 7 6 7 M ¼ 6 MMX 7 ¼ 6 MMX MMX 7 (1) 6 7 6 c h 7 6 MSP 7 6 SP SP 7 6 7 6 Mc Mh 7 2.1. Full HEN modelling 4 MUP 5 6 UP UP 7 UT 4 Mc Mh 5 M UT UT The sets of mass and energy conservation equations are inte- Mc Mh grated into a set of two linear systems of equations. The first set is For the mass balance, all internal and external flow rates are solved for the mass balance for vector m and it is shown in Equation calculated using specific input information. Internal and external (2), whereas the second one is solved for the energy balance for fi flow rates are represented by the vectors m (dimension S 1) and vector T, which is de ned in Equation (3). ð PS þ PDÞ n (dimension N N 1) respectively. Both vectors can be Ax ¼ b (2) T ¼½ T T divided into cold and hot streams for vector m (m mc mh ) Cz ¼ d (3)

where the vectors x and b are defined in Equations (4) and (5). The

Fig. 3. Incidence matrix for example in Fig. 2. Fig. 4. Structure of coefficients for matrix A 372 J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384

tube-side and shell-side respectively. Each coefficient is calculated using empirical correlations. These correlations depend on heat exchanger geometry and fluid physical properties. In this work, the correlations proposed by Wang et al. are used, as they provide confident and reliable results [33]. These correlations utilise detailed information related to tube-side and shell-side stream allocation, hydraulics and flow patterns caused by pitch selection and tube-bundle configurations. Additionally, the overall thermal resistance for the tube-side is adjusted using the outer-to-inner = tube diameter (dout din). This work includes the accumulation of fouling over time in the HEN simulation by using fouling rate models and integrating these models over a specific time-span, divided in equally sized time- Fig. 5. Structure of coefficients for matrix C steps Dt. Different fouling mechanisms are considered in the shell-side and tube-side of all heat exchangers in the HEN. These fouling mechanisms also change along the pre-heat train, as the vectors z and d are shown in Equations (6) and (7). The structure of temperature of the crude oil progressively increases. The updating matrices A and C are depicted in Figs. 4 and 5 respectively. Details of the fouling resistance (shell-side or tube-side) for two consec- regarding the elements contained in each matrix are described in utive time-intervals ðn 1Þ and n is shown in Equation (9). Appendix A. 2 3 2 3 m dR 6 c 7 j ¼ j þ f j 6 7 Rf Rf Dt (9) 4 m 5 6 mh 7 n 1 n dt n x ¼ ¼ 6 7 (4) n 4 nPS 5 Normally, deposition of waxes, together with chemical reaction nPD fouling are more likely to occur in crude oil pre-heat trains [4]. 2 3 These mechanisms are considered in this work by implementing a suitable fouling rate model for each mechanism in both sides of the 0 ¼ 4 5 heat exchangers within the pre-heat train. A simple, constant b nPS (5) fouling rate model is selected to represent deposition of waxes, whereas the fouling model proposed by Polley et al. [9] is used for 2 3 chemical reaction fouling. As no pressure drop is assumed within 2 3 6 Tc 7 the HEN, the effects of friction factors into the severity of fouling are 6 7 ¼ 4 T 5 ¼ 6 Th 7 not considered. The selection of Polley's model is chosen over more z 6 PS 7 (6) V 4 V 5 rigorous fouling models (i.e. Yeap et al. [34]) based on this PD V assumption. Both fouling models are shown Equations (10) and (11) respectively. 2 3 0 6 7 6 DTUP 7 6 7 dR 6 Q U 7 f ¼ d ¼ 6 7 (7) a1 (10) 6 Q U 7 dt 4 5 VPS dRf 0:80 0:33 EA 0:80 ¼ a2Re Pr exp gRe (11) dt RgTW

2.2. Fouling modelling and simulation where Re, Pr, Rg and TW are the relevant Reynolds number, Prandtl number, the ideal gas constant and the tube-wall temperature. The fouling resistance (Rf ) for all process-to-process heat ex- These parameters mainly depend on the system geometry and the changers in the HEN are included in the main modelling framework corresponding physical properties, namely density (r), specific heat by considering the contributions from shell-side and tube-side (cp), thermal conductivity (l) and viscosity (m). The parameters a1, fi (Rf ;shell and Rf ;tube respectively) in the value of the overall heat a2, EA and g are the speci c fouling model parameters. Note that fi transfer coef cient Ud. These contributions are related to the value there is a strong dependency of the fouling rate in the chemical of Ud in Equation (8). In this Equation, the thermal resistance reaction model in Equation (11) with the relevant wall-temperature attributed to the tube-wall is assumed to be negligible, compared to TW . The value of the wall temperature is non-uniform through a the thermal resistances due to fouling and heat convection. Note heat exchanger (either shell-side or tube-side). Therefore, a that when fouling does not occur in neither side of any heat representative value is needed when calculating the fouling rate. A exchanger, the overall heat transfer coefficient is defined as Uc, useful approximation for this representative temperature is to which denotes absence-of-fouling conditions. integrate the fouling rate along both ends of the heat exchanger wall. When chemical reaction fouling occurs in the tube-side of a 1 1 dout 1 heat exchanger, cold and hot end wall-temperatures can be esti- U ¼ þ R ; þ þ R ; (8) d f tube f shell mated using Equations (12) and (13) respectively, where T ; and htube din hshell W c TW;h are the wall temperatures at the cold and hot end of the tube- fi where htube and hshell are the local heat transfer coef cients for wall. J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384 373

presence of unmeasured variables xu is not considered in this work, T T ¼ þ h;o c;i as this methodology assumes that all process variables are TW;c Tc;i (12) 1 d 1 measured. h þ R ; out þ þ R ; tube htube f tube din hshell f shell T 1 min ðxm xrÞ j ðxm xrÞ T T xr ¼ þ h;o c;i : : ð Þ¼ (17) TW;h Tc;o (13) s t f xr 0 1 dout 1 ð Þ h þ R ; þ þ R ; g xr 0 tube htube f tube din hshell f shell

The vector of nonlinear constraints f ðxrÞ contains the mass and The integrated fouling rate for chemical reaction in the tube- energy balances described in Section 2.1. The vector of inequality side is then calculated using Equation (14) [35]. In this work, the constrains gðxrÞ is used for specifications of each flow rate and wall temperature range is divided into equally sized temperature temperature measurement. Fouling is included in the reconciliation sub-intervals and the trapezoidal rule is used for integrating the by adding a non-negativity constraint to the value of the measured mean fouling rate value. msr overall fouling resistance (Rf ) for each set of measured data, ð T ; following Equation (18), where Uc is the overall heat transfer co- W h dRf dT efficient when no fouling is considered. dR dt W f j ¼ TW;c mean (14) dt TW;h TW;c msr ¼ 1 1 Rf 0 (18) Ud Uc In this work, Equation (17) is solved using Sequential Quadratic fi 3. Data reconciliation and identi cation of faulty Programming (SQP), as it has been proven to present several ad- instruments vantages compared to other commonly used nonlinear program- ming methods, namely Generalised Reduced Gradient (GRG) [19]. The minimisation of measurement error in a specific set of data is to be obtained via data reconciliation. This method adjusts the values of measured variables in order to satisfy relevant process constraints such as mass and energy conservation equations [14]. In this work, a nonlinear data reconciliation problem is formulated 3.2. Gross error detection and identification and implemented to the HEN flow rates and temperatures. Each of these variables is considered to be a measurement from specific In this work, gross error in the form of measurement bias is instruments presenting individual values of accuracy. considered. The key challenges are to identify if a given set of data The measurement error vector (x)isdefined as the difference contains a gross error (detection problem), to find the measure- between the vectors of measured (xm) and reconciled values (xr)in ment(s) containing the gross error(s) (identification problem) and Equation (15). An alternative definition for the measurement error finally to estimate the value of such error(s) (estimation problem). is shown in Equation (16), where x corresponds to the sum of two The detection problem is addressed using the global test [14]. different types of errors, random error (rx) and gross error (gx). This test uses a statistical test function t that depends on the vector of constraints residuals qx. This test function is shown in Equation x ¼ xm xr (15) (19), where fx is the covariance matrix of the constraint residuals vector. In this work, the equality constraints in vector f ðx Þ is a x ¼ þ r rx gx (16) representation of the linear formulations of mass and energy bal- Random errors are defined as random events that can cause ances described in Section 2.1. disruptions within the data. In the process industries, these errors ¼ T 1 are estimated using a normal probability distribution with zero t qx fx qx (19) mean and the within the range of ±3 times the standard deviation When no gross errors are contained in the data, t follows a chi- of the corresponding measurement instruments [14](sm and sT for flow rate and temperature measurements respectively). On the square distribution with n degrees of freedom. The value of t is ¼ 2 ð Þ other hand, gross errors are produced by non-random events such compared with a threshold value tc cð1dÞ n , where d is the as miscalibrations or instrumental malfunctions. The reconciliation chosen level of significance or confidence. If t > tc, a gross error is of these two types of errors is necessary for reliable results, as the detected. Otherwise, the global test is passed and no gross errors presence of measurement error in process data can mislead further are present. calculations and process-related decisions such as maintenance The identification and estimation problems are accounted for by and process control [19]. using the simultaneous estimation of the location and value of gross errors proposed by Sanchez et al. [20]. A modified method is 3.1. Data reconciliation formulation implemented in this work to integrate the use of nonlinear pro- gramming. As a first step, several gross error candidates are In the absence of gross errors, the data reconciliation problem in selected. The data reconciliation problem for each combination a heat exchanger network is formulated as a nonlinear constrained (single and multiple) of these gross errors is solved using SQP. The minimisation problem, as shown in Equation (17). The general minimisation problem when considering measurement bias is formulation in Equation (17) includes the vector of measured and shown in Equation (20), where the matrix Bx contains ones or zeros unmeasured variables (xm and xu respectively) and the covariance depending on the measurement in which the gross error(s) is matrix j, which is defined as a diagonal matrix containing the contained. The number of rows of this matrix corresponds with the variance of each measured value in its main diagonal, as no sta- number of measurements, whereas the number of columns corre- tistical correlation among measurements is assumed. Note that the sponds with the number of gross errors within the data-set. 374 J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384

ð ÞT j1ð Þ b min xm xr gxBx xm xr gxBx ~ ¼ EA xr ;gx EA (23) (20) EA s:t: f ðxr; gxÞ¼0 gðxr; gxÞ0 gb g~ ¼ (24) The global test is used as a stopping criterion and for the se- g lection of the best combination of gross error that minimises the measurement error vector. Moreover, this work accounts for the The selected fouling models (see Equations (10) and (11)) are re- presence of equivalent sets of gross errors, based on the definition formulated in order to include the new set of normalised param- fi proposed by Bagajewicz and Jiang [36], where two sets of gross eters and the models are tted to the reconciled values via the fi errors are equivalent when they have the same effect in the data minimisation of the root mean square error between the tted and fit msr reconciliation problem (see Equation (20)). In cases when the measured fouling resistances (Rf and Rf respectively), for each minimum value of measurement error results from several equiv- data-set representing a day of operation. The minimisation prob- alent sets, each of these sets is compared with additional infor- lem is shown in Equation (25), where k is the total number of data- mation from the network (i.e. design flow rate and temperature sets, and n is a counter representing each data-set. The mini- specifications); the set presenting the lowest absolute difference is misation problem is subject to lower and upper bounds for each selected as the one containing the correct gross errors in the data normalised fouling model parameter (contained in the vector p)to set. account for different types of crude oil undergoing to the same To quantify the performance of the gross error detection algo- fouling mechanisms. This feature is implemented as a modification rithm, simulation-based tests are carried out and the value of the from the original source, as the authors solved the parameter overall power function (OPF) is used. This function is defined as the estimation problem using an un-bounded approach, only consid- ratio between the number of simulations with perfect identifica- ering the tube-side of a single exchanger. tion (the simulations where all gross error are located in their vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi uX corresponding measurement); and the total number of simulations. u k t msr fit ð Þ This definition can be applied to scenarios a gross error is contained ¼ Rf ;n Rf ;n p min n 1 multiple measurements, where the maximum number of multiple p k (25) gross errors that can be detected is limited to the existing number subject to pL p pU of units (i.e. heat exchangers, mixers, splitters and unit operations) [36].

4.2. Optimisation algorithm 4. Parameter estimation of fouling models In order to avoid local optimality, a hybrid optimisation strategy The set of parameters in a fouling rate model, such as the ones consisting in the application of stochastic search and deterministic presented in Equations (10) and (11), vary depending on the char- methods is used for the parameter estimation. The stochastic acteristics of the crude oil or crude oil blend. Thus, an adaptable search implemented in this work is the Genetic Algorithm (GA) method is needed to account for the changes in crude oil when [37]. This solver has the advantage of not needing an initial guess, as process data are used. In this work, it is assumed that the available it initially searches for a solution based on a random search around data for reconciliation and parameter estimation are based on daily the solution-space. The selection of this algorithm is not strict to averages indicating steady state conditions. Temperature- this specific one. However, it is desired to achieve a wide search to dependency can be considered for the crude oil and side- avoid local optimality and a stochastic search suits this particular products physical properties. However, to establish a relationship aim. Hence, other alternative algorithms can be used for solving the between these properties and temperature is a complex task. problem defined in Equation (25). By applying lower and upper Hence, the parameter estimation method described in this work bounds, the algorithm looks for the best set of parameters that considers constant values of physical properties. minimises the objective function in Equation (25). The set of pa- rameters resulting from the Genetic Algorithm is then used as an initial guess for applying deterministic optimisation based on the 4.1. Problem formulation interior point method. This hybrid approach is implemented in order to improve the likelihood of reaching a global optimum and Following the analysis provided in the methodology developed for calculating the best set of fouling model parameters to predict by Costa et al. [30], normalised fouling model parameters are and assess the fouling behaviour in a heat exchanger network. defined for each fouling model, based on reported values for spe- cific fouling rate models found in the available literature [9]. This 5. Case study normalised set of parameters is shown in Equations (21)e(24), where the symbols (~) and (^) denote normalised and fitted fouling The methodology in this work is applied to predict the fouling model parameters respectively. behaviour and identify potential faulty instruments in a crude oil pre-heat train. The structure of this pre-heat train is based on the b ~ a1 heat exchanger network shown in the work proposed by Ahmad a1 ¼ (21) a1 et al. [3], and it is illustrated in Fig. 6. The heat exchanger network consists of eight process-to-process heat exchangers, one desalter ab unit, three cold utilities and one hot utility. Initial operating and a~ ¼ 2 (22) 2 a geometric data are illustrated in Table 1 and Table 2 respectively. 2 The data in Table 1 are used as supply unit specifications for the HEN simulation and data reconciliation of HEN inlets, after random J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384 375

Fig. 6. Pre-heat train structure for case study.

Table 1 Table 3 Input conditions for pre-heat train. Input data for cold and hot utilities.

1 Stream Inlet flow rate Inlet temperature Stream Inlet flow rate (kg s ) Inlet temperature ( C) Heat duty (MW) (kg s 1) (C) Cold utility 559 10 70 Crude oil 194 10 C1 375 e 47 Naphtha P.A. 288 160 C2 80 e 10 Kerosene 18 210 C3 104 e 13 Gasoil 36 260 Hot utility 50 1500 95 Gasoil P.A. 144 280 Diesel 20 350 Residue 55 380 side of the pre-heat train, whereas side-products from the CDU flow through the shell-side. The simulation and optimisation strategies in this work have been coded in MATLAB, using in-built and gross errors are added to the data. Hence, these values change functions for the optimisation methods. within the time span. In the case of cold and hot utilities, inlet flow In order to replicate the variability of an operating process, the rates and temperatures, together with their corresponding heat simulation strategy described in Section 2.1 is used and measure- duties are presented in Table 3. Physical properties for cold and hot ment errors are added to the data. A simulation time of one year streams in each exchanger are shown in Table 4. All process-to- with time intervals of 24 h are used, resulting in a total of 366 sets process heat exchangers are subject to shell-side and tube-side of steady-state daily-averaged measured data, where fouling pro- fouling, where more than one mechanism can take place in a sin- gressively increases in each heat exchanger, as it is stated in gle heat exchanger. The effect of fouling on the pre-heat train's Equation (9). It is assumed that all flow rates and temperatures are pressure drop is not considered. Crude oil goes through the tube

Table 2 Geometric data for pre-heat train.

E1 E2 E3 E4 E5 E6 E7 E8

Tube inner diameter (mm) 15.4 15.4 15.4 15.4 15.4 15.4 15.4 15.4 Tube outer diameter (mm) 19.0 19.0 19.0 19.0 19.0 19.0 19.0 19.0 Tube length (m) 7.16 8.35 24.47 3.74 8.50 10.22 12.16 12.05 Number of tubes 597 597 597 597 597 597 597 597 Tube passes 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 Area (m2) 255 298 872 133 303 364 433 429 Tube pitch (mm) 25.4 25.4 25.4 25.4 25.4 25.4 25.4 25.4 Shell diameter (m) 1.00 1.00 1.22 1.00 1.00 1.00 1.22 1.00 Number of baffles 30.0 34.0 38.0 15.0 22.0 26.0 32.0 31.0 Baffle spacing (mm) 340 240 650 240 390 390 382 390 Inlet baffle spacing (mm) 150 150 150 150 150 150 150 150 Outlet baffle spacing (mm) 150 150 150 150 150 150 150 150 Baffle cut (%) 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 Bundle clearance (mm) 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 Shell passes 1.00 2.00 2.00 1.00 2.00 3.00 4.00 3.00 376 J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384

Table 4 “estimation set”), and a second for comparing the total fouling Physical properties for heat exchangers. resistance predictions using the estimated model parameters Shell-side E1 E2 E3 E4 (defined as “prediction set”). The hybrid optimisation approach

r (kg m 3) 763.0 825 640 750 described in Section 4 is implemented using the optimisation pa- cp (J kg 1K 1) 2377 2408 2600 2900 rameters shown in Table 6, where the type of mutation function is l (W K 1) 0.117 0.110 0.110 0.088 selected in order to have a mutation function that determines the m (Pa s) 1:00 103 4:00 103 3:00 104 1:00 103 mutation fraction that adaptively changes according to the value of Shell-side E5 E6 E7 E8 the objective function. These parameters are associated with the in- r (kg m 3) 738 875 732 830 cp (J kg 1K 1) 2800 2420 2870 2820 built function ga (Genetic Algorithm) in MATLAB. The population l (W K 1) 0.101 0.100 0.096 0.085 size and maximum number of generations depend on the number m (Pa s) 7:00 104 5:00 104 2:00 104 2:00 103 of optimisation variables. The value of the crossover fraction is Tube-side E1 E2 E3 E4 chosen so that the algorithm prioritises a wide search to avoid local r (kg m 3) 837.0 830 808 790 optima. Moreover, lower and upper bounds for each optimisation cp (J kg 1K 1) 1914 1994 2027 2385 variable (in normalised form) are shown in Table 7. A broad range of l (W K 1) 0.128 0.0.125 0.118 0.112 m (Pa s) 8:50 103 4:00 103 2:00 103 1:50 103 values is used with the exception of the activation energy, as this Tube-side E5 E6 E7 E8 value has been reported to be within the range of 38 and r (kg m 3) 780 768 751 748 59 kJ mol 1 [34]. cp (J kg 1K 1) 2520 2560 2708 2842 The calculations are made in a desktop computer with an Intel l (W K 1) 0.109 0.106 0.0.101 0.096 Core i5 processor of 3.20 GHz and 8.00 GB of installed RAM. A m (Pa s) 1:20 103 1:00 103 0:80 103 0:60 103 summary of the entire methodology for this case study is depicted in Fig. 7. measured variables. Random and gross errors are added separately, fi as it is desired to identify the speci c capabilities of both the data 5.1. Data reconciliation and gross error detection reconciliation and gross error detection algorithms. The values of the added random errors are generated using a normal probability A constant value or gross error via measurement bias has been distribution with known standard deviations via a random gener- added in one flow rate and temperature within the pre-heat train. s s 1 ator in MATLAB. The values of m and T are 1.50 kg s and 1.50 C The flow rate bias is assumed to be contained in the Diesel stream, respectively. These values correspond with common magnitudes of entering exchanger E4, whereas the temperature bias is assumed to fl accuracy in measurement instruments such as ow meters and be in the furnace inlet temperature. The values of these gross errors thermocouples. In the case of gross errors, constant magnitudes are are defined with respect to the corresponding standard deviations added to specific measurements as a representation of a constant for each measurement. The flow rate bias is equal to 12sm and the bias in these measurements, which can be related to flow rates or temperature bias is equal to 12sT , which are equivalent to temperatures. For the detection of gross errors (i.e. the global test), 6.00 kg s 1 and 6.00 C respectively. a level of significance of 90% (or d ¼ 0:01) is selected, as this value is commonly accepted in similar applications [14]. Fouling in each process-to-process heat exchanger is considered Table 6 using two different fouling mechanisms. In the cold end of the pre- Optimisation parameters for Genetic Algorithm. heat train (exchangers E1 to E4), deposition of waxes and particles Parameter Value occurs on both shell-side and tube side. A constant fouling rate Population size 400 model is assumed for this mechanism (see Equation (10)). This Maximum number of generations 400 mechanism is also assumed in the shell-side of each heat exchanger Crossover fraction 0.20 at the hot end of the pre-heat train (exchangers E5 to E8). In the Optimisation variables 4.00 “ ” tube-side of this heat exchangers, the chemical reaction fouling Mutation function Adaptive Feasible model proposed by Polley et al. [10] is considered (see Equation (11)). Known values of the fouling model parameters for each mechanism are used for simulating the operating data. The values Table 7 Lower and upper bounds for normalised fouling model parameters. for both of these models are shown in Table 5. These data is then reconciled and the fouling model parameters for the pre-heat train Model parameter Lower bound Upper bound ~ are back-calculated to test the resulting agreement of the param- a1 0.00 100 ~ eter estimation algorithm. a2 0.00 100 ~ 0.50 2.00 The set of reconciled data is evenly divided into two parts; one EA ~ for estimating the fouling model parameters (defined as the g 0.00 100

Table 5 Fouling model parameters used for simulation of operating data. From Rodriguez and Smith [35] and Polley et al. [10].

2 1 1 1 2 1 1 2 1 1 a1 (m KkW h ) EA (kJ mol ) g (m KkW h ) a2 (m KkW h )

E1 5:50 104 ee e E2 5:50 104 ee e E3 5:50 104 ee e E4 5:50 104 ee e E5 5:50 104 48.00 1:50 109 1:00 106 E6 5:50 104 48.00 1:50 109 1:00 106 E7 5:50 104 48.00 1:50 109 1:00 106 E8 5:50 104 48.00 1:50 109 1:00 106 J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384 377

Fig. 7. Schematic description of methodology.

The results from the data reconciliation for the two biased Table 8 measurements are presented in Fig. 8. From this figure, it is clear Average estimation of gross error values in the data-set. that both sets of measurements are modified from their biased Bias Simulated value Estimated value values (black curve) to their reconciled ones (blue curve). For both Diesel flow rate (kg s 1) 6.00 5.99 sets of measurements, the value of OPF has a value of 1, indicating Furnace inlet temperature (C) 4.00 5.97

that these two values of gross errors are correctly located in all data-sets. The annual average estimation for both of these gross errors is shown in Table 8. The minimisation of random error for the all data-sets is assessed by calculating the reduction in standard deviation of the random error before and after reconciliation. The relative difference between these values provides an accurate indicator regarding the amount of random error that is reconciled. The percentage of reduction in standard deviation of the random error (errs)is defined in Equation (26), where the superscripts before and after indicate the conditions of the data-sets relative to the data reconciliation. ! sbefore safter errs ¼ 100 (26) sbefore

The value of errs is calculated for each data-set (daily mea- surements) and an annual average value is estimated. The results for the reduction of measurement error in the data reconciliation algorithm are shown in Table 9. The data reconciliation results in Table 9 indicate that the measurement error is completely minimised in the flow rate measurements, whereas in temperature measurements the mea- surement error is reduced by approximately 80%. This result could be explained from the fact that temperature measurements are interrelated through nonlinear equations (energy balances), this is more challenging for the reconciliation algorithm to minimise the effect of random error. However, the overall performance is satis- factory as the mass and energy constraints are satisfied, as it is Fig. 8. Data reconciliation and gross error detection results for Diesel flow rate (a) and exhibited in the reduction in the standard deviation of the mea- furnace inlet temperature (b) measurements. surement error. 378 J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384

Table 9 parameters are correlated. This phenomenon is worse in the hot Reduction is standard deviation of measurement error. b b end of the pre-heat train (E5 to E8), where the parameters a1 and g sbefore safter Standard deviation reduction (%) are under-predicted. Nevertheless, each fouling model parameter is

estimated within an acceptable range of magnitudes; in particular Flow rates (kg s 1) 0.91 0.00 100.00 b Temperatures ( C) 0.91 0.18 80.72 the activation energy EA. Note that the complexity of the solution directly depends on the fouling mechanisms (fouling rate models) that the heat exchangers are subject to. Different combinations of 5.2. Parameter estimation and prediction of fouling behaviour fouling models and model parameters add different levels of complexity when estimating the fitted fouling models. The more The quality of the reconciled data is tested and used in the model parameters are to be calculated for a specific heat exchanger, parameter estimation algorithm described in Section 4. A crucial the greater the computational burden and impact on the accuracy aspect regarding this process is the performance of the data of the parameter estimation algorithm. reconciliation. If a significant amount of measurement error is still The agreement between the measured and predicted fouling contained within the data, the accuracy of the estimated fouling resistances for all heat exchangers can be used as a performance model will not be sufficient for further predictions. Furthermore, indicator for the parameter estimation algorithm. Parity plots for when gross errors are present, the correct identification and miti- the overall fouling resistance of exchangers E1 to E8 are shown in gation (reconciliation) of such errors is paramount if accurate Fig. 9. The presence of remaining random error in the data is still predictions are sought. present. However, the prediction of fouling resistance is in good As previously mentioned in this section, an estimation data-set agreement with the measured values, indicated by the parity plots corresponding to half of the whole data-set is used for back- presented in Fig. 9. This result supports the performance obtained calculating the fouling model parameters for this particular pre- in the data reconciliation, and even though 20% of measurement heat train. The results from this process are shown in Table 10. error is still contained within the data, the overall prediction ca- Some discrepancies are found among each parameter, as most pabilities are acceptable. The maximum absolute difference

Table 10 Fitted fouling model parameters and corresponding root mean square error (RMSE).

b 2 1 1 b 1 b 2 1 1 b 2 1 1 2 1 a1 (m KkW h ) EA (kJ mol ) g (m KkW h ) a2 (m KkW h ) RMSE (m KkW )

Base values 5:50 104 48.00 1:50 109 1:00 106 e E1 5:50 104 ee e 0.035 E2 5:49 104 ee e 0.030 E3 5:50 104 ee e 0.029 E4 5:50 104 ee e 0.032 E5 7:04 104 41.03 4:90 108 1:68 105 0.018 E6 9:26 104 51.87 8:75 108 2:95 106 0.030 E7 1:00 103 49.28 8:86 108 1:40 106 0.037 E8 1:11 103 48.91 9:00 108 1:27 106 0.034

Fig. 9. Measured and predicted fouling resistances for all heat exchangers in the network. J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384 379 between these sets of fouling resistances was found in exchanger indicate accurate predictions, where the maximum absolute dif- E8, with an absolute difference of 0.35 m2KkW 1. ference is found in exchanger E8 with a value of 0.82 C. A closer analysis of the predictions is made by calculating the The absolute errors for the shell-side outlet temperatures in the absolute differences between the outlet conditions of the pre-heat pre-heat train are presented in Fig. 11. The predictions differences train. The fitted models are used in a simulation of the heat are higher than those of the cold streams (tube-sides). Again, the exchanger network and the outlet temperatures in both sides of maximum absolute difference is located in heat exchanger E8 with each heat exchanger are compared with the ones obtained from the a value of 2.37 C. The decrease in prediction accuracy is related to data reconciliation (reconciled measurements). The comparisons the parameter estimation algorithm, where the shell-side fouling for the tube-side outlet temperatures are shown in the histograms model parameters for the heat exchangers in the hot end of the pre- depicted in Fig. 10. The differences between these sets of values heat train differ from the base values in one order of magnitude

Fig. 10. Absolute errors when comparing reconciled and predicted tube-side outlet temperatures in the pre-heat train.

Fig. 11. Absolute errors when comparing reconciled and predicted shell-side outlet temperatures in the pre-heat train. 380 J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384

(see Table 10). Although these predictions are not as accurate as the potential for further applications in the areas of design, retrofit and ones presented in Fig. 10, the overall prediction performance is still optimisation of heat exchanger networks based on historical or on- acceptable when predicting the overall fouling resistance of all heat line data. exchangers in the pre-heat train, as most of the prediction errors are contained in the range of 0.00 and 0.50 C for both sides. The results from the case study show that operating data can be Acknowledgements treated in a way such that they satisfy a set of process constraints and provide a reliable input for characterising the fouling behaviour The authors gratefully acknowledge the Chilean National Com- of a pre-heat train when more than one fouling mechanism occurs mission for Scientific and Technological Research (CONICyT) for the in each heat exchanger. An important challenge to account for is the financial support granted for the development of this work. complexity associated with the fouling phenomenon in the shell- side, as these models are still in the process of development and more understanding of the underlying causes is needed for further Appendix A. HEN Modelling improvements regarding the proposed methodology. Appendix A.1. Heat Exchangers 6. Conclusions The mass balance for cold-side and hot-side of a single heat A new methodology for the calculation of fouling model pa- exchanger in the network is defined in Equations A.1 and A.2. The rameters for a crude oil pre-heat train using reconciled data has subscripts i and o indicate inlet or outlet streams. been developed in this work. The interactions among streams and equipment is characterised via a simple but convenient formulation m ; mc;o ¼ 0 (A.1) using linear algebra. This simulation approach provides enough c i flexibility for various topology arrangements, elements and tem- ¼ perature dependence of physical properties. Fouling is considered mh;i mh;o 0 (A.2) as a dynamic process, where the thermal performance of the pre- The matrix representation for the mass balance of Equations A.1 heat train varies accordingly with the development of fouling and A.2 is shown in Equations A.3 and A.4. Each set of mass balance layers in both sides of each heat exchanger. HE Data reconciliation and gross error detection are applied to the has a total number of N equations. measured data, minimising the effect of measurement errors and HE ¼ faulty instruments. These algorithms allow for a detailed analysis of Mc mc 0 (A.3) the propagation of measurement error and the effect of the pres- ence of gross error on different process measurements, namely HE ¼ Mc mh 0 (A.4) flow rates and temperatures. The inclusion of the identification of faulty measurement instruments into the HEN and fouling The energy balance equations are formulated using the concepts modelling represents a novel and innovative solution for the long- of thermal effectiveness (ε) and number of transfer units (NTU), also lasting concern regarding measurement reliability and selection of known as the ε NTU method [38]. The thermal effectiveness is plant instrumentation. The reconciled data are further used for defined as the ratio between the heat duty of the heat exchanger accurately estimating the fouling model parameters, which are (Q) and its maximum amount of heat that could be exchanged strictly related to the crude oil being processed, meaning that the considering the highest temperature difference (e.g. (Th;i Tc;i)). proposed methodology can be used whenever a new crude oil or The value of ε is calculated using Equation (A.5). In this Equation, CP fi crude oil blend is re ned, if enough data are provided. is the average heat capacity flow rate (CP ¼ mcp, where cp is the A case study has been presented, and the results indicated a ½ ; average heat capacity in the temperature interval Ti To ). The successful separation between shell-side and tube-side fouling subscript min indicates the stream (cold or hot) presenting the mechanisms by calculating their individual contributions into the lower value of CP. On the other hand, the value of NTU is calculated overall fouling resistance. Moreover, the use of the data reconcili- using Equation (A.6), where U and A are the overall heat transfer ation and gross error detection methods were able to mitigate the d coefficient and the heat transfer area of the heat exchanger. Two effect of random errors and to locate, identify and estimate a set of more variables are needed to complete this formulation. The first two gross errors in two different measurements. The fitted fouling one is the heat capacity flow rate ratio (Cr), which is defined as the parameters presented a good agreement with the initial simula- ratio between the values of the higher and lower heat capacity flow tions, where accurate predictions for fouling resistance and outlet rates. The second one is a binary variable that identifies if either the temperature were obtained. Note that these predictions were cold or the hot stream presents the lower value of CP. This binary calculated using reconciled process variables rather than fouling variable is defined as y and its value will be equal to 1 if the hot resistances, which contribute additional errors when no data r stream is the stream with the minimum heat capacity flow rate reconciliation is considered. A study is needed where the proposed methodology is applied value. Otherwise, when the lower value of CP is in the cold stream, using real operating data. In this work, a steady-state data recon- yr will have a value of zero. The generalisation of the energy balance ciliation method was chosen. This assumption should be tested and equations is shown in Equation (A.7). updated to consider the dynamic changes when monitoring a crude Q oil pre-heating process. Furthermore, the parameter estimation ε ¼ À Á (A.5) method is still limited by the current understanding and modelling CPmin Th;i Tc;i of fouling rates in both sides of heat exchangers. The authors acknowledge the on-going progress in this field, and modifications UdA are to be made consistently with the state-of-the-art modelling NTU ¼ (A.6) CP approaches for shell-side and tube-side fouling mechanisms. min Nonetheless, the study presented in this work delivers enough J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384 381

2 3

4 εþðyr þ1Þðyr 1Þ yr yr 5 h i h i Crðyr 1Þþyr Crðyr 1Þyr Cryr þðyr 1ÞCryr þðyr 1Þ ð Þ HE þ ð Þ HE ¼ 2 3 Rc Mh Tc Rh Mh Th 0 (A.21)

6 Tc;i 7 6 7 6Tc;o 7 6 7 4 Th;i 5 Appendix A.2Mixers Th;o

¼0 Mixers join together several inlet streams into a single outlet (A.7) stream. They can be installed in any cold or hot stream. Mass and energy balance equations for a single mixer are defined in Equa- Using the incidence matrix M, the energy balance equations are tions A.22 and A.23. The subscripts 1, 2 and 3 indicate the different defined in Equations A.8 and A.9. inlet streams of the mixer.

þ þ þ ¼ þ þ þ / ¼ EciTci EcoTco EhiThi EhoTho 0 (A.8) mi;1 mi;2 mi;3 mo 0 (A.22)

þ ¼ þ þ þ / ¼ RcTci RcTco RhThi RhTho 0 (A.9) CPi;1Ti;1 CPi;2Ti;2 CPi;3Ti;3 CPoTo 0 (A.23) The auxiliary matrices Eci, Eco, Ehi, Eho, Rc and Rh in Equation The matrix representation for the mass and energy balances of a (A.8) and Equation (A.9) are used for simplifying the formulation of mixer unit is described in Equations A.24 and A.25 respectively. the energy balance equations. All these matrices are diagonal matrices, where the ith element of their main diagonals is defined MMXm ¼ 0 (A.24) in Equations A.10 to A.15. MX ð Þ ¼ ε þð Þ M ½diagðCPÞT ¼ 0 (A.25) Eci ith yr 1 (A.10) where CP is a vector containing the heat capacity flow rates of each ð Þ ¼ð Þ Eco ith yr 1 (A.11) stream in the network. The total number of equations for each set is NMX . The operator diag converts a vector into a diagonal matrix, ð Þ ¼ ε Ehi ith yr (A.12) where its main diagonal contains the elements of such vector.

ð Þ ¼ Eho ith yr (A.13) Appendix A.3. Splitters

ð Þ ¼ ð Þþ Following the assumptions proposed by de Oliveira Filho et al. Rc ith Cr yr 1 y (A.14) [31], a splitter divides a single inlet stream into two different outlet streams. If more than two outlet streams are needed, a series of ð Þ ¼ þð Þ Rh ith Cryr yr 1 (A.15) splitters can be used. Mass and energy balance models for a single The auxiliary vectors Tci, Tco, Thi and Tho are defined in splitter are shown in Equations A.26 to A.29. Equations A.16 to A.19. These vectors contain the inlet and outlet m m ; m ; ¼ 0 (A.26) temperatures of each heat exchanger in the network. The i o 1 o 2 subscripts þ and - indicate the inlets and outlets of the corre- ¼ sponding entries in the incidence matrix M. fmi mo;1 0 (A.27) HE Tci ¼ M T (A.16) CP T CP ; T ; CP ; T ; ¼ 0 (A.28) c þ c i i o 1 o 1 o 2 o 2

¼ ¼ Ti To;1 To;2 (A.29) Tco ¼ MHE T (A.17) c c where f is the fraction of the inlet stream m that flows into the i ¼ HE outlet stream mo;1. The mass and energy equations in matrix form Thi M Th (A.18) h þ are presented in Equations A.30 to A.33. There are a total of 2NSP equations. Tho ¼ MHE T (A.19) h h MSPm ¼ 0 (A.30) Combining Equations A.16 to A.19 with Equations A.8 and A.9, h i the energy balance formulation is obtained. These re-arrangements SP diagðfÞMþ SP m ¼ 0 (A.31) are shown in Equations A.20 and A.21. Each set of energy balance has a total number of NHE equations. h h ðEciÞ MHE ðEcoÞ MHE T þ ðEhiÞ MHE ðEhoÞ MHE T ¼ 0 (A.20) c þ c c h þ h h 382 J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384

SP ¼ M ½diagðCPÞT ¼ 0 (A.32) mi mo 0 (A.40) h i SP T T ¼ DTUP (A.41) Mþ SP T ¼ 0 (A.33) i o

The split fraction f is introduced in vector form in Equation where DTUP (dimensions NUP 1) is a vector containing the tem- (A.31) using the vector f of dimensions (NSP 1). A different vector, perature differences for each operational unit within the network. defined as a is also introduced in order to facilitate the formulation The matrix representation of these units is presented in Equations UP of the conservation equations using the incidence matrix. This A.42 and A.43. There is a total of N of equations for each balance. vector indicates the corresponding outlet stream index related to UP each split fraction contained in vector f. The matrix SP (dimensions M m ¼ 0 (A.42) SP fi ð Þ ¼ ð Þ ¼ N S)isdened such that SP i;j 1if a i j; otherwise ð Þ ¼ þ UP ¼ D UP SP i;j 0. The subscript represents the same concept as indi- M T T (A.43) cated in A.1.

Appendix A.7. Cold and Hot Utilities Appendix A.4. Supply and Demand Units

Mass balance equations for cold and hot utilities, using the These units represent operations that are carried out upstream incidence matrix are shown in Equations A.44 and A.45. and downstream of the pre-heat train (i.e. crude storage, atmo- spheric distillation respectively). For a single supply or demand unit MUT m ¼ 0 (A.44) k, mass and energy balance formulations are defined in Equations c c A.34 and A.35. The vectors for flow rate and temperatures of supply UT ¼ and demand units n and V are used in these Equations. Mh mh 0 (A.45) ¼ The energy balance is specified in terms of the heat duty of each mk nk 0 (A.34) utility Q U (dimension NUT 1), instead of the total equipment area ¼ as in the case of process-to-process heat exchangers (see Section Tk Vk 0 (A.35) A.1). The matrix representation of the energy balance for each The matrix representation of the mass and energy balance for type of utility is presented in Equations A.46 and A.47. supply and demand units is shown in Equations A.36 and A.37. Each h i set of has a total number of ðNPS þ NPDÞ equations. UT UT ¼ U diag CPc Mc Tc Q (A.46) 2 3 h i MPS 4 5m þ n ¼ 0 (A.36) UT UT ¼ U MPD diag CPh Mh Th Q (A.47)

T T 2 3 ð UT ÞT ¼½ð UT Þ ð UT Þ where CP CPc CPh is a vector containing the PS fl 4 M 5T þ V ¼ 0 (A.37) average heat capacity ow rate for each cold and hot utility. MPD Nomenclature

Symbols Appendix A.5. Supply Units Specifications A Matrix of coefficients for HEN mass balance b Vector of solutions for HEN mass balance Each supply unit presents its own value for flow rate and tem- B Bias location matrix perature. Mass and energy balance equations are shown in Equa- x CP Vector of average heat capacity flow rates tions A.38 and A.39. Specification vectors ðnPSÞ and ðVPSÞ are used. CP Vector of heat capacity flow rates There are a total of NPS equations per set of balance model. C Matrix of coefficients for HEN energy balance d Vector of solutions for HEN energy balance PS PS ¼ n n 0 (A.38) Eci, Eco, Ehi, Eho Auxiliary matrices for HEN energy balance g Vector of bias magnitudes x I Identity matrix VPS VPS ¼ 0 (A.39) m Vector of HEN internal mass flow rates M Incidence matrix for HEN structure n Vector of HEN external mass flow rates p Vector of fouling model parameters Appendix A.6. Desalter Q Vector of HEN heat duties qx Vector of constraints residuals for gross error detection These units are considered as units that modify the temperature Rc, Rh Auxiliary matrices for HEN energy balance or enthalpy of a specific stream, without significantly changing SP Split fraction matrix their flow rate. Mass and energy balance for a single unit are pre- T Vector of internal HEN temperatures sented in Equations A.40 and A.41. Tci, Tco, Thi, Tho Auxiliary matrices for HEN energy balance J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384 383

V Vector of external HEN temperatures m Mass flow rate measurement x Vector of variables for HEN mass balance mean Mean value xm Vector of measured variables min Minimum value xr Vector of reconciled variables o Outlet z Vector of variables for HEN energy balance shell Shell-side A Heat transfer area T Temperature measurement CP Average heat capacity flow rate tube Tube-side CP Heat capacity flow rate W Tube-wall cp Average heat capacity * Specification value cp Heat capacity Cr Heat capacity flow rate ratio Superscripts din Inlet tube diameter ^ Fitted fouling model parameter dout Outlet tube diameter ~ Normalised fouling model parameter EA Activation energy after After data reconciliation errs Reduction percentage of standard deviation in random before Before data reconciliation error CU Cold utility h Local heat transfer coefficient fit Fitted value m HEN internal mass flow rate HE Heat exchanger n HEN external mass flow rate HU Hot utility N Element number in HEN L Lower bound NTU Number of transfer units msr Measurement OPF Overall power function MX Mixer Pr Prandtl number PD Demand unit Q Heat duty PS Supply unit rx Random error magnitude SP Splitter Re Reynolds number T Transpose Rf Fouling resistance U Upper bound Rg Ideal gas constant UP Unit operation RMSE Root mean square error S Stream number in HEN References t Time T HEN stream temperature [1] Ledezma-Martínez M, Jobson M, Smith R. Simulation-optimization-based fl U Clean overall heat transfer coefficient design of crude oil distillation systems with pre ash units. Ind Eng Chem Res c 2018;57:9821e30. fi Ud Overall heat transfer coef cient for fouling conditions [2] Panchal C, Huangfu E-P. Effects of mitigating fouling on the energy efficiency e yr Binary variable for HEN energy balance of crude-oil distillation. Heat Transf Eng 2000;21:3 9. [3] Ahmad S, Polley G, Petela E. Retrofit of heat exchanger networks subject to pressure drop constraints. In: AIChE spring meeting; 1989. Paper 34a. Greek Letters [4] Ishiyama EM, Pugh SJ, Paterson B, Polley GT, Kennedy J, Wilson DI. Manage- DTUP Vector of temperature difference for HEN unit ment of crude preheat trains subject to fouling. Heat Transf Eng 2013;34: 692e701. operations [5] Epstein N. Thinking about heat transfer fouling: a 5x5 matrix. Heat Transf Eng f Vector of split fractions 1983;4:43e56. f Covariance matrix of constraints residuals [6] Macchietto S, Hewitt GF, Coletti F, Crittenden BD, Dugwell DR, Galindo A, x Jackson G, Kandiyoti R, Kazarian SG, Luckham PF, Matar OK, Millan-Agorio M, j Covariance matrix of measurement error Müller EA, Paterson W, Pugh SJ, Richardson SM, Wilson DI. Fouling in crude oil a1 Constant fouling rate parameter preheat trains: a systematic solution to an old problem. Heat Transf Eng e a Chemical reaction fouling rate formation parameter 2011;32:197 215. 2 [7] Young A, Venditti S, Berrueco C, Yang M, Waters A, Davies H, Hill S, Millan M, d Level of significance for gross error detection Crittenden BD. Characterization of crude oils and their fouling deposits using a DTUP Temperature difference specification batch stirred cell system. Heat Transf Eng 2011;32:216e27. ε Thermal effectiveness [8] Kukulka DJ, Devgun M. Fluid temperature and velocity effect on fouling. Appl Therm Eng 2007;27:2732e44. g Chemical reaction fouling rate removal parameter [9] Polley GT, Wilson DI, Yeap BL, Pugh SJ. Evaluation of laboratory crude oil l Thermal conductivity threshold fouling data for application to refinery pre-heat trains. Appl Therm e m Dynamic viscosity Eng 2002;22:777 88. [10] Polley GT, Wilson DI, Pugh SJ, Petitjean E. Extraction of crude oil fouling model n Degrees of freedom for gross error detection parameters from plant exchanger monitoring. Heat Transf Eng 2007;28: f Split fraction 185e92. r Density [11] Martini A, Coco D, Sorce A, Traverso A, Levorato P. Gross error detection based on serial elimination: applications to an industrial gas turbine. In: Proceedings s Standard deviation of ASME turbo expo 2014: turbine technical conference and exposition, 3A; t Test function for global test 2014. V03AT07A024. [12] Szega M. An improvement of measurements reliability in thermal processes tc Threshold value for test function in global test by application of the advanced data reconciliation method with the use of x Total measurement error fuzzy uncertainties of measurements. Energy 2017;141:2490e8. [13] Szega M. Extended applications of the advanced data validation and recon- ciliation method in studies of energy conversion processes. Energy 2018;161: SubscriptsMatrix with negative entries e þ 156 71. Matrix with positive entries [14] Narasimhan S, Jordache C. Data reconciliation & gross error detection: an c Cold stream intelligent use of process data. Houston, Texas, USA: Gulf Publishing Co.; 2000. h Hot stream [15] Madron F. A new approach to the identification of gross errors in chemical engineering measurements. Chem Eng Sci 1985;40:1855e60. i Matrix entry, inlet [16] Mah RS, Stanley GM, Downing DM. Reconciliation and rectification of process j Matrix entry flow and inventory data. Ind Eng Chem Process Des Dev 1976;15:175e83. 384 J. Loyola-Fuentes, R. Smith / Energy 183 (2019) 368e384

[17] Mah RSH, Tamhane AC. Detection of gross errors in process data. AIChE J fouling deposits and its application to the simulation of fouling-cleaning cy- 1982;28:828e30. cles. AIChE J 2015;62:90e107. [18] Narasimhan S, Mah RSH. Generalized likelihood ratio method for gross error [29] Diaz-Bejarano E, Coletti F, Macchietto S. Modeling and prediction of shell-side identification. AIChE J 1987;33:1514e21. fouling in shell-and-tube heat exchangers. Heat Transf Eng 2018;0:1e17. [19] Romagnoli JA, Sanchez MC. Data processing and reconciliation for chemical [30] Costa ALH, Tavares VBG, Borges JL, Queiroz EM, Pessoa FLP, dos Santos process operations. Orlando, Florida, USA: Academic Press, Inc.; 1999. Liporace F, de Oliveira SG. Parameter estimation of fouling models in crude [20] Sanchez M, Romagnoli J, Jiang Q, Bagajewicz M. Simultaneous estimation of preheat trains. Heat Transf Eng 2013;34:683e91. biases and leaks in process plants. Comput Chem Eng 1999;23:841e57. [31] de Oliveira Filho LO, Queiroz EM, Costa AL. A matrix approach for steady-state [21] Rollins DK, Davis JF. Unbiased estimation of gross errors in process mea- simulation of heat exchanger networks. Appl Therm Eng 2007;27:2385e93. surements. AIChE J 1992;38:563e72. [32] Ochoa-Estopier LM, Jobson M, Chen L, Rodríguez-Forero CA, Smith R. Opti- [22] Smaïli F, Vassiliadis VS, Wilson DI. Mitigation of fouling in refinery heat mization of heat-integrated crude oil distillation systems. part ii: heat exchanger networks by optimal management of cleaning. Energy Fuels exchanger network retrofit model. Ind Eng Chem Res 2015;54:5001e17. 2001;15:1038e56. [33] Wang Y, Pan M, Bulatov I, Smith R, Kim J-K. Application of intensified heat [23] Ijaz H, Ati UM, Mahalec V. Heat exchanger network simulation, data recon- transfer for the retrofit of heat exchanger network. Appl Energy 2012;89: ciliation & optimization. Appl Therm Eng 2013;52:328e35. 45e59. [24] Ishiyama EM, Kennedy J, Pugh SJ. Fouling management of thermal cracking [34] Yeap B, Wilson D, Polley G, Pugh S. Mitigation of crude oil refinery heat units. Heat Transf Eng 2017;38:694e702. exchanger fouling through retrofits based on thermo-hydraulic fouling [25] Jiang X, Liu P, Li Z. Data reconciliation and gross error detection for opera- models. Chem Eng Res Des 2004;82:53e71. tional data in power plants. Energy 2014;75:14e23. [35] Rodriguez C, Smith R. Optimization of operating conditions for mitigating [26] Coletti F, Macchietto S. A dynamic, distributed model of shell-and-tube heat fouling in heat exchanger networks. Chem Eng Res Des 2007;85:839e51. exchangers undergoing crude oil fouling. Ind Eng Chem Res 2011;50: [36] Bagajewicz MJ, Jiang Q. Gross error modeling and detection in plant linear 4515e33. dynamic reconciliation. Comput Chem Eng 1998;22:1789e809. [27] Assis BCG, Lemos JC, Liporace FS, Oliveira SG, Queiroz EM, Pessoa FLP, [37] Goldberg DE. Genetic algorithms in search, optimization and machine Costa ALH. Dynamic optimization of the flow rate distribution in heat learning. Boston, MA, USA: Addison-Wesley Longman Publishing Co., Inc.; exchanger networks for fouling mitigation. Ind Eng Chem Res 2015;54: 1989. 6497e507. [38] Cao E. Heat transfer in process engineering. McGraw-Hill Professional; 2010. [28] Diaz-Bejarano E, Coletti F, Macchietto S. A new dynamic model of crude oil Chapter 5

Redundancy and Observability Analysis for Partially Instrumented Crude Oil Pre-heat Trains

5.1 Introduction to Publication 3

In order to address the fourth objective of this PhD work, a process variable classification method based on QR factorisation is integrated to the methodology developed in this project. The inclusion of this method delivers a more realis- tic outlook to the applicability of the approach presented in this Thesis. As it was discussed in Section 2.3.3, the solution of the data reconciliation problem when unmeasured variables are involved is a challenging task, and depending on the number and proper selection of measurement instruments in different process units, the states of a partially instrumented heat exchanger network can be fully estimated, and additional monitoring actions can take place. Also, in cases where certain process variables are not estimable, the application of the topological anal- ysis using QR factorisation provides a systematic approach for determining the minimum set of measurements (instruments) needed for a complete reconciliation of the process variables. This chapter presents a manuscript that is intended to be submitted to the journal “Industrial & Engineering Chemistry Research”. In this manuscript, the observ- ability analysis that results from the use of QR factorisation is integrated into

97 98 CHAPTER 5. OBSERVABILITY ANALYSIS IN PRE-HEAT TRAINS the data reconciliation formulation presented in Chapter 4. A selection of process states (i.e. flow rates and temperatures) are designated as unmeasured, whilst the remaining states are used as available measurements and later reconciled. Gross error detection is applied to the set of measured variables in order to guarantee that the data reconciliation provides an unbiased solution. Both sets of process variables are classified under the concepts of observability and redundancy intro- duced in Section 2.3.3 and the estimation of missing measurements are compared with a fully instrumented case for assessing the estimation capabilities of the updated approach. Fouling behaviour is analysed via the parameter estimation method shown in Chapter 3 and the overall performance of the proposed method- ology are discussed in the context of a real industrial pre-heat train, where only a set of specific measurements are present. The applicability of this methodology is limited to the thermal effect of fouling, as the effect on pressure drop was not considered.

5.2 Publication 3

 Title: Classification and Estimation of Unmeasured Process Variables in Crude Oil Pre-heat Trains Subject to Fouling Deposition

 Authors: Jos´eLoyola-Fuentes and Robin Smith

 To be submitted to: Industrial & Engineering Chemistry Research

 Year: 2019 Classification and Estimation of Unmeasured Process Variables in Crude Oil Pre-heat Trains Subject to Fouling Deposition

José Loyola-Fuentes∗ and Robin Smith

Centre for Process Integration, School of Chemical Engineering and Analytical Science, The University of Manchester, M13 9PL, UK

E-mail: [email protected]

Abstract

Crude oil refineries use a series of measurement instruments to monitor several pro-

cess units and operations. One of these units is pre-heat train. Flow rate, temperature

and pressure measurements are taken in specific locations of the pre-heat train for mon-

itoring purposes, especially fouling deposition. The availability of these measurements

is related to the instrumentation cost and this dependency limits the number of in-

struments installed on each unit. Dealing with missing measurements requires specific

techniques for allowing the estimation of such unmeasured variables. Data reconcilia-

tion and gross error detection can be integrated to improve the accuracy and reliability

of process measurements. This work presents an integrated approach that considers the

estimation of missing measurements, identification and estimation of measurement bias

and reconciliation of measured data. The set of reconciled data is used for the estima-

tion of fouling models for predicting the thermal performance of a crude oil pre-heat

train. The fouling models can also be used for the optimisation of cleaning to mitigate

the effect of fouling.

1 Introduction

In chemical process industries, several streams are interconnected in different process units, in which heat transfer, mass transfer and chemical reactions may take place. In crude oil distillation systems, heat integration plays a major role in the pre-heating of crude oil for achieving an optimal separation.1 The performance of heat integration (carried out in a pre-heat train) is impaired by the deposition of unwanted solid material, known as fouling.2 The fouling phenomenon currently imposes one the most critical issues in crude oil-related operations and its understanding has become crucial.3 For different combinations of process conditions, fouling deposition occurs via several mechanisms that differently affect the ther- mal efficiency of the pre-heat train. In order to address this issue and develop appropriate mitigation strategies, process monitoring represents a viable method as it provides enough information for estimating a wide set of key process indicators. Process monitoring relies on the quantity and quality of the available instrumentation around process units. The information provided by these instruments should accurately reflect the state of different streams and the performance of different processes. The reliabil- ity of the measurements is affected by measurement errors that deviate each measurement from their corresponding nominal value and (in severe scenarios) lead to the failure of key engineering practices such as process control and real-time optimisation. In order to deal with this challenge, data-processing techniques offer a suitable solution as they address the effect of measurement errors in several ways. For industrial processes, data reconciliation is considered as a highly suitable approach.4 This method adjusts the measured data in order to satisfy several constraints based on a particular process model, and allows for identifying different types of measurement errors such as random and gross errors. Data reconcilia- tion can be implemented in a wide range of systems. Normally, steady-state snapshots of measurements in different process units are used for monitoring purposes. Consequently, a steady-state data reconciliation can be formulated for minimising the measurement error within this data-set. Linear and nonlinear constraints can also be handled, as well as dy-

2 namic processes. In the case of fouling monitoring in crude oil distillation systems, data reconciliation is used for improving the quality of flow rate and temperature measurements (also pressure measurements when needed) and estimating the severity of fouling deposition via heat transfer modelling.5 The use of data reconciliation in industrial applications is restricted by the statistical basis of the measured data, but also by the amount of data. Not all process variables are measured in all process units. The investment and operational costs associated to plant instrumentation usually limits the number of instruments installed on-site. The allocation of measurement instruments is not a trivial task, as this distribution directly depends on the estimation of the remaining unmeasured variables. The number of process constraints defines the level of estimability of the missing data.6 The more process constraints are available, the more unmeasured variables can be estimated, provided that the process model is based on sufficient independent equations. The presence of faulty measurements and process leaks should also be considered. A further challenge is posed in this context, as the systematic classification of measured and unmeasured variables with respect to their degree of estimability is needed. The classifi- cation and decomposition of the data reconciliation problem is a well-established methodol- ogy for the design of sensor networks and a convenient approach derives from the topological analysis of the process model.7 Moreover, the capability of estimating fouling resistance and fouling rate increases the level of complexity of the estimability problem. The number of available instruments for measuring the process conditions should be sufficient for estimating unmeasured variables, and at the same time, intrinsically account for the effect on fouling on a given time span. This work proposes the integration of fouling modelling and data reconciliation consider- ing the presence of gross errors and unmeasured process variables. A detailed heat transfer model accounting for fouling deposition in both sides of shell-and-tube heat exchangers is used for simulating and predicting the thermal performance of a crude oil pre-heat train.

3 A matrix decomposition technique is applied for reducing the dimensionality of the data reconciliation problem in order to address the issue of the presence of unmeasured variables. A reduced data reconciliation problem is solved, gross errors are located, the missing mea- surements are estimated and this full data-set is used for determining specific fouling rate models for the heat exchanger network. This integrated methodology allows for assessing the thermal performance and designing mitigation actions of a crude oil pre-heat train. The entire methodology is tested in a case study, where a partially-instrumented crude oil pre- heat train included random and gross errors is simulated. The process variables are classified and the importance of the amount of measured variables is highlighted. The fully reconciled data are used for assessing thermal performance and the potential applications of the results are mentioned.

Previous Research

The development of different data reconciliation techniques has significantly helped re- searchers and process engineers to improve their understanding on the behaviour of industrial processes. The gathered information during monitoring is of great support for administra- tive and operational decisions. Generally, data reconciliation can be classified in steady-state and dynamic reconciliation. Both categories can include the simultaneous detection of gross errors (in any of their two types: measurement bias and process leaks). In addition, the pres- ence of unmeasured variables and nonlinear constraints can also be considered for these two categories. However, the steady-state and dynamic data reconciliation approaches handle these particular issues in different ways. This work focuses on the integration of fouling mod- elling in crude oil heat exchanger networks and steady-state, nonlinear data reconciliation and gross error detection. Commonly, a data reconciliation problem is formulated as a weighted least squares min- imisation problem, subject to several types of constraints. The presence of unmeasured

4 variables can also be considered using linear algebra techniques, which allow for reducing the dimensionality of the system for achieving a feasible solution via the introduction of the concepts of redundancy and observability.8 These concepts are of great importance, as they allow for a systematic classification of process variables, according to the number of available process constraints. The most common method for addressing the presence of unmeasured variables, was developed by Crowe et al. 9 and applied to linear data reconciliation using QR factorisation as a decomposition method. This formulation can be extended to nonlin- ear cases via linearisation of the process constraints. However, when considering inequality constraints, the solution of a nonlinear data reconciliation problem becomes a more complex issue. The use of nonlinear programming (NLP) techniques provides a suitable alternative, as it was presented by Tjoa and Biegler.10 This work presented a simultaneous solution for reconciling data and detecting gross errors for a data reconciliation problem subject to nonlinear equality and inequality constraints. In the same context, several methodologies have been developed for detecting, identifying and estimating gross errors. The use of statistical tests is widely accepted and commonly applied to industrial cases. These tests compare two hypotheses, where the presence of gross errors is detected. Some examples of the most common gross error detection tests are the global test and the measurement test,11 along with the nodal test8 and the generalised like- lihood ratio.12 The use of Bayesian methods13 and strategies based on principal component analysis14 have also been implemented for solving the detection problem. The identification of the location and estimation the magnitude of gross errors are strategies that complement the solution of the detection problem. These two problems can be solved simultaneously by considering a set of candidates for specific types of gross errors and solving a data reconcil- iation problem for each possible combination based on the set of chosen candidates. This approach was proposed by Sánchez et al. 15 and has proved to be accurate for linear systems subject to mass balance equations. Alternatively, robust data reconciliation methods can be used to eliminate the presence of gross errors. These robust estimators are defined as

5 objective functions that differ from the initial weighted least squares function, and provide unbiased estimations of the reconciled measurements, even when gross errors are present in the data.16 The application of robust estimators for addressing the presence of gross errors has been studied in recent publications,17–19 and follow-up strategies are yet to be established. The importance of data reconciliation, gross error detection and estimation of unmeasured variables in industrial applications has been broadly studied, specifically in steady-state and nonlinear cases. Recent studies have shown that an appropriate method for reconciling data and estimating missing measurements can significantly increase the accuracy and reliability of field-data. These approaches have been implemented in various scales, from single equipment such as compressors20 and more complex units and processes such as steam power plants.21 In the context of crude oil fouling, data processing techniques have gained more attention and previous studies have implemented these techniques at different levels. The use of data filtering and reconciliation including specific fouling rate models were presented by Markowski et al. 22 and Ishiyama et al.,5 where gross errors were considered as outliers, but no detection strategy was described. Data were filtered using a validation procedure based on the energy-conservation equations. A similar filtering approach was applied in the methodology developed by Diaz-Bejarano et al. 23 where the authors considered local and time-dependent variation of the process states, along with individual mechanisms for fouling deposition in the shell-side and tube-side of a crude oil pre-heat train. However, the effect of missing measurements was not considered and each process variable was assumed to be measured. Later on, the implementation of gross error detection in the modelling and prediction of fouling deposition in crude oil pre-heat trains was addressed by Loyola-Fuentes and Smith.24 This integrated methodology allowed for reducing the effect of measurement error and locating faulty instruments when biases are present. Different fouling models are used in both sides of shell-and-tube heat exchangers and estimated depending on the type of crude oil being processed. Nevertheless, the issue related to unmeasured variables was not

6 examined. Chebeir et al. 25 integrated the classification of process variables and estimation of unmeasured variables in the monitoring of crude oil heat exchanger networks. The authors exploited the structure of a heat exchanger network to formulate an environment for gross error detection and estimability analysis. The data reconciliation problem is decomposed via QR factorisation and daily-average data were used for monitoring the thermal performance of a crude oil pre-heat train. Fouling deposition and modelling was not directly considered in this work, but the dynamic change of the overall heat transfer coefficient was acknowledged. This paper presents a suitable methodology for including the estimation of fouling models in a partially-instrumented crude oil pre-heat train subject to the presence of measurement bias. The well-known advantages of QR factorisation for process variable classification in a data reconciliation problem are used, and the reconciled data are obtained via nonlinear programming to account for the complexity of heat transfer equations and inequality con- straints. Fouling models are determined via a subsequent parameter estimation approach based on a hybrid-optimisation method. The severity of fouling is intrinsically regarded from the information provided by the process-data. The time-dependant changes in thermal per- formance is quantify via fouling resistance, which also presents a time-dependant behaviour. The interactions among streams and process units within the network are further capitalised on in the heat transfer model, as these interactions reflect the uniqueness of the pre-heat train under study.

Heat Exchanger Network and Fouling Modelling

The heat exchanger network (HEN) and fouling modelling is applied to multi-pass shell-and- tube heat exchangers undergoing fouling deposition in both sides via different mechanisms. The modelling strategy is flexible for different types of geometry in the shell-side (pitch layout, tube-bundle clearance, etc.) and tube-side (number of tubes, tube-side velocity, etc.). Mass and energy balances are formulated in steady-state, as a linear system of equations

7 that calculates the network’s internal flow rates and temperatures. This formulation was first proposed by de Oliveira Filho et al. 26 and later modified by Ochoa-Estopier et al. 27 for the inclusion of utilities and unit operations such as desalters and flash columns. The integration of fouling deposition in the heat exchanger network simulations is based on the modelling framework proposed by Loyola-Fuentes and Smith.24 This framework uses different fouling rate models and updates the value of the overall fouling resistance over a given time-span. The modelling approach focuses on the thermal performance of the heat exchanger network. The effect of fouling in the hydraulic performance is ignored. Physical properties for all streams can be considered as fixed or non-constant values depending on the availability of empirical correlations and characteristic parameters for each stream such as API gravity, boiling point, etc.

HEN Modelling

The topology of the heat exchanger network is represented by a digraph consisting in edges and vertex, representing internal streams and HEN units respectively. Each edge is split in cold (c) and hot (h) streams. HEN units are denoted by heat exchangers (HE), splitters (SP ), mixers (MX), desalters or other unit operations (UP ) and cold and hot utilities (CU and HU respectively). The units at the beginning and end of the pre-heat train are represented by supply and demand units (PS and PD respectively). Mass and energy conservation equations can be formulated using an incidence matrix M, which contains the interactions among edges and vertex based on the HEN structure. These interactions are shown in Equation 1.

8 PS PS PS M Mc Mh

 PD   PD PD  M Mc Mh      HE   HE HE  M  Mc Mh      M =  MX  =  MX MX  M  Mc Mh  (1)          M SP   M SP M SP     c h       UP   UP UP   M   Mc Mh       UT   UT UT   M   Mc Mh          The matrix formulation for both sets of conservation equations is shown in Equations 2 and 3. These equations solve for the vector of internal and external flow rates m and n (contained in vector x) and the vector of internal and external temperatures T and V (contained in vector z) respectively. Matrices A and C and vectors b and d comprise of the mass and energy balances equations respectively. Details regarding the full model and the contents of each matrix and vector can be seen in Reference 24.

Ax = b (2)

Cz = d (3)

Heat transfer equations are based on the ε NTU method and initial flow rates and − temperatures for the supply units are used as inputs to start the simulation. As an initial condition, no fouling resistance is considered and its value builds up as time increases. Overall fouling resistances for shell-side and tube-side are calculated using different fouling rate models.

9 Fouling Modelling

In principle, several fouling mechanisms can be implemented in both sides of a each heat exchanger. However, it is known that specific mechanisms are most likely to take place in a heat exchanger depending on the relative location within the pre-heat train.5 Moreover, the modelling of fouling deposition in the shell-side is still a challenging task and only a limited number of attempts have addressed this issue.23 For this reason, this work only includes a constant fouling rate model in the shell-side. The complex geometry of both sides are considered by calculating both average heat transfer coefficients htube and hshell, and including these values into the overall heat transfer coefficient Ud using Equation 4, where

Rf,tube and Rf,shell are the fouling resistances in each side of the heat exchangers. Note that the outer to inner diameter ratio dout/din is used and the thermal resistance of the tube-wall is neglected. Specific correlations are used for calculating htube and hshell, these correlations were used in the retrofit methodology proposed by Wang et al. 28 and provide accurate and validated results.

1 1 dout 1 − Ud = + Rf,tube + + Rf,shell (4) h d h  tube   in   shell  This work uses two different fouling mechanisms for both sides of each heat exchanger in the pre-heat train depending on their relative location. For both sides of heat exchangers upstream of the desalter, and on the shell-side of exchangers closer to the distillation unit, a constant linear fouling rate shown in Equation 5 is used. On the other hand, for the tube-side of exchangers downstream of the desalter, a chemical reaction rate model based on the formulation proposed by Polley et al. 29 is implemented and shown in Equation 6. This model is widely accepted and suits the physical context proposed in this work (lumped heat transfer model and no pressure drop across each heat exchanger), as it considers the tube-wall temperature TW in the formation and rate, and the fluid velocity (within the Reynolds number Re) as the main contributor in the suppression rate in the second term on

10 the right-hand side of Equation 6. The fouling model also uses the Prandtl number P r and the ideal-gas constant Rg.

dRf = α1 (5) dt dRf 0.80 0.33 EA 0.80 = α2Re− P r− exp − γRe (6) dt R T −  g W 

The parameters α1, α2, EA and γ are adjustable values corresponding with a specific type of crude oil and need to be determined via process-data analysis. The fouling models in Equations 5 and 6 are appropriately applied to each heat exchanger in the network. In order to consider the time-dependency of fouling deposition, the overall fouling resistance Rf between two consecutive time-steps are updated using Equation 7, where ∆t is the chosen time-step within a given time-span.

dRf Rf n 1 = Rf n + ∆t (7) − dt n

Estimation of Fouling Model Parameters

The set of adjustable parameters for both models in Equations 5 and 6 is estimated using an optimisation-based approach via the minimisation of the root means square error between the

msr fouling resistances obtained from measured-data (Rf ) and the resistances using the fitted fit fouling models (Rf ). The minimisation problem for the parameter estimation problem is shown in Equation 8, where k is the total number of data-sets. The fouling model parameters are used as optimisation variables and these are contained in vector p. Upper and lower bounds (pL and pU respectively) are used to limit the magnitudes of these parameters, but at the same time to provide enough flexibility when processing different types of crude oils.

11 2 k msr fit n=1 Rf,n Rf,n(p) min v − p u   (8) uP k t subject to pL p pU ≤ ≤ The minimisation problem in Equation 8 is solved via a hybrid approach, where a stochas- tic algorithm is first carried out, as no initial guesses are available, and it is desired to avoid local optimality. The solution of this problem is used as an initial guess for a second-level minimisation problem solved by a deterministic solver, as it was originally proposed and validated by Costa et al. 30 More details regarding the application of this hybrid approach can be found in Reference 31. Note that in order to improve the accuracy of the optimal solution, the fouling model parameters are normalised using the empirical values reported in the literature (see Reference 29). The definition of these normalised variables are shown in Equations 9 to 12, where the superscripts (˜) and (ˆ) represent normalised and fitted conditions.

αˆ1 α˜1 = (9) α1 αˆ2 α˜2 = (10) α2

EˆA E˜A = (11) EA γˆ γ˜ = (12) γ

Reconciliation of Measured and Unmeasured Data

As it has been previously stated, in most of industrial applications the amount of instrumen- tation is limited by several factors such as space availability and instrumentation investment.

12 This affects the complexity of the data reconciliation problem, as the presence and number of unmeasured process variables are directly related to the feasibility and existence of a unique solution. For addressing this issue in a more understandable way, the concepts of observability and redundancy4 in the context of data reconciliation are now defined.

• Observability: An unmeasured variable is said to be observable if such variable can be estimated using the available process measurements and constraints.

• Redundancy: A measured variable is said to be redundant if such variable is observable even if its measured value is not available.

From the above definitions, it is clear that unmeasured variables can be either observable or non-observable, whereas measured variables can be redundant or non-redundant. Thus, the most suitable context for a data reconciliation problem considering unmeasured variables is when there is sufficient instrumentation for satisfying the observability condition, that is, when all unmeasured variables can be estimated using the available measurements. For successfully reconciling the process measurements, it is also necessary to account for the presence and values of gross or systematic errors. These gross error detriments the statistical basis of the process measurements, leading to instrument malfunction and inaccurate measurements.6 The detection and estimation of gross error are usually joined approaches that can be applied alongside data reconciliation. Using this integrated approach allows for an accurate, non-biased set of reconciled values than can be confidently used for further analyses and studies. Note that the gross error detection process can only be applied to measured variables, as unmeasured variables cannot contain any type of measurement error. In this work, the simultaneous detection of gross errors and reconciliation of measured variables and estimation of unmeasured variables is explored and considered. Process vari- ables are classified according to the concepts of observability and redundancy in order to assess the system’s estimability.

13 Problem Formulation

The measurement error vector ξ consists on the contributions of random and gross errors, defined by the vectors rξ and gξ respectively. It is assumed that the random errors follow a normal distribution with null mean value and that all measurements are statistically in- dependent from each other (no statistical dependence).4 An alternative definition for ξ is given by the difference between the measured variables and reconciled values, contained in vectors xm and xr respectively. Moreover, the unmeasured variables vector can be defined as xu. The general formulation for the data reconciliation problem in absence of gross errors is given by Equation 13, where the process variables are related among each other through the set of equality constraints f (xr, xu) and inequality constraints g (xr, xu), where c is the resulting vector from the equality constraints. Both sets of constraints represent individually the mass and energy balance equations and heat transfer relations.

T 1 min (xm xr) ψ− (xm xr) xr,xu − −

s.t. f (xr, xu) = c (13)

g (x , x ) 0 r u ≤ The objective function in Equation 13 is a weighted least square function that is used for minimising the difference between measurements and reconciled values. The weighting matrix ψ is known as the covariance matrix and reflects the measurements’ accuracy, repre- sented by the variance of each measured value σ. For a crude oil pre-heat train, flow rate and temperature measurements are usually taken in field operations, each of them presenting a different level of accuracy. Consequently, the variance values for these two sets of process measurements are represented by flow rate-related variance σm and temperature-related vari- ance σT . Several methods can solve the optimisation problem in Equation 13. The selection of an appropriate method depends on the nature of the optimisation variables and process

14 constraints. Although the mass and energy balance equations are formulated using linear equations, the presence of inequality constraints and nonlinear intermediate calculations pose a significant challenge when solving the minimisation problem. In order to include these challenges, a nonlinear programming algorithm is selected. This work uses the Sequential Quadratic Programming method (SQP), as it is compatible with the nature of the least square function of Equation 13. However, in cases of partially instrumented systems, only the measured variables can be reconciled and the unmeasured variables are subsequently estimated. Therefore, a systematic method is needed for determining observability and redundancy, and reconciling the measured variables.

Decomposition of Data Reconciliation Problem

The solution of a reconciliation problem including measured and unmeasured variables can be challenging as there is not a convenient way to reconcile these two types of measurements simultaneously. A more efficient way to address this issue is by decomposing the problem and reduce the dimensionality of the optimisation problem, where only the measured variables are first reconciled. Next, the degree of observability can be assessed and depending on this result, the observable unmeasured variables are estimated. To achieve this, the reconciliation problem in Equation 13 can be reformulated. This reformulation is based on the use of linear constraints and steady-state data reconciliation. The heat exchanger network formulation presented in Section 3 is integrated into this method to further exploit this linear decompo- sition problem. The set of equality constraints in f (xr, xu) can be rewritten in linear terms as it is shown in Equation 14.

Axxr + Auxu = c (14)

where Ax and Au are the corresponding constraint matrices for measured and unmea- sured variables respectively. For reducing the dimension of the overall problem, a reduced

15 problem is obtained by using a projection matrix P such that satisfies

PAu = 0 (15)

Using the property shown in Equation 15, pre-multiplying P in Equation 14, a reduced set of constraints is obtained. At this point, it is desired to estimate the projection matrix P such that satisfies Equation 15.

PAxxr = P c (16)

The projection matrix is estimated using the QR decomposition method, as its application

7 in data reconciliation is widely accepted. Matrix Au is decomposed using this method in matrices Qu and Ru. Depending on the case, a permutation matrix Πu can also be estimated with the purpose of reordering the columns of Au when necessary. The factorisation result can be seen in Equation 17.

Ru1 Au = QuRuΠu = Qu1 Qu2   Πu (17)   0     9 T According to Crowe et al., the matrix Qu2 corresponds to the projection matrix P . Using this result, the reduced data reconciliation problem can be formulated, where only the measured variables are denoted as optimisation variables. This reconciliation problem is shown in Equation 18, where the set of inequality constraints g (xr, xu) can be included to consider upper and lower bounds for each measured variable.

T 1 min (xm xr) ψ− (xm xr) xr − − T T (18) s.t. Qu2Axxr = Qu2c

g (x ) 0 r ≤ The minimisation problem in Equation 18 can be solved for estimating the reconciled

16 measured variables, and this result is useful for estimating the observable unmeasured vari- ables. Using the definition of Equation 17 in Equation 14 leads to the solution for the unmeasured variables xu, shown in Equation 19.

1 T 1 T Πuxu = R− Q c R− Q Axxr (19) u1 u1 − u1 u1

The formulation described above is only valid when each unmeasured variable is observ-

4 able, that is, when the columns of matrix Au are linearly independent. When this condition is not satisfied, the presence of non-observability must be accounted for. For this particular case, let s and d be the number of linearly independent and dependent columns of Au. The QR decomposition in this context results in the factorisation in Equation 20.

Ru1 Ru2 Au = QuRuΠu = Qu1 Qu2   Πu (20)   0 0     T The projection matrix P is still defined by the matrix Qu2. The reduced reconciliation problem in Equation 18 can be solved and the s observable unmeasured variables are esti- mated using Equation 21. Note that in order to determine the set of observable variables, the values of the remaining set of non-observable variables d should be specified. This set of variables can also be interpreted as the minimum amount of instruments needed for satisfying the observabilty condition.25

1 T T Πuxu,s = R− Q c Ru1Q Axxr Ru1Ru2xu,d (21) u1 u1 − u1 −

The above formulations allow for a systematic way to classify measured and unmea- sured variables according to their respective level of redundancy and observability. First,

T the columns of the reduced constraint matrix Qu2Ax in Equation 18 provide the classifica- tion for redundant measured variables. When all the elements in a column of this matrix are zero, it is said that the corresponding measured variable is non-redundant. On the

17 contrary, when a column contains non-zero elements, the corresponding measured variables is said to be redundant, as its value will be adjusted during reconciliation. In the case of unmeasured variables, the classification is conducted via analysing the rows of the matrix product Ru1Ru2 in Equation 21. If all the elements of this matrix are zero, it is said that the corresponding unmeasured variable is observable, as it does not depend on the set of unmeasured variables xu,d to estimate its value. On the other hand, if a row of Ru1Ru2 contains a non-zero element, the corresponding variable is said to be non-observable and the set xu,d needs to be specified.

Simultaneous Detection and Estimation of Gross Errors

The classification of process variables and reconciliation of the measured data described in the previous sections can only be applied in absence of gross errors. These errors significantly affect the performance of any data reconciliation method, therefore the identification of their location and magnitude are paramount when an accurate and reliable reconciliation is sought. In this work, the presence of gross errors in the form of measurement bias is considered. The simultaneous detection, identification and estimation of gross errors are solved along with the reduced reconciliation problem for measured variables. The detection of gross errors in a particular set of measured data is performed by means of statistical inference. Two hypotheses are tested in order to determine the presence of gross errors. The first one is a null hypothesis, sustaining that no gross errors are present. On the contrary, an alternative hypothesis holds the presence of single or multiple biases in one or more process variables. This work uses the global test4 for solving the detection problem. The statistical test is applied via a test function τ that depends on the vector of residuals from the process constraint, defined as qξ. The relation between these two values is shown in Equation 22, where φξ is the covariance matrix for vector qξ.

18 T 1 τ = qξ φξ− qξ (22)

When the null hypothesis is true, the function τ follows a chi-square distribution with

T ν degrees of freedom, where ν is the rank of the reduced set of constraints Qu2Ax. If the

2 value of τ is compared against a pre-defined threshold value τc = χ(1 δ) (ν), with a specified − level of significance δ, the null hypothesis is selected if τ > τc. The alternative hypothesis is selected otherwise. If gross errors are detected, the identification of their location and estimation of their mag- nitudes are carried out using a modified version of the methodology presented by Sánchez et al..15 This methodology has been updated in this work for considering inequality con- straints and the estimation of gross errors via a joined data reconciliation problem using SQP. A set of potential candidates is generated using a sequential analysis of each process constraint and a data reconciliation problem is solved for all possible combination within this set of candidates. The global test is used as a stopping criterion and the presence of equiva- lent sets of gross errors is accounted for, considering the definitions proposed by Bagajewicz and Jiang.32 The objective function for the joined data reconciliation problem considering the presence of gross errors is defined in Equation 23, where the location matrix Bξ is introduced to indicate the relative location of one or more gross errors to their corresponding measurements.

Note that the set of upper and lower bounds in g (xr, gξ) is also applied to any gross error that may be present in the set of measured variables. The solution of Equation 23 provides the estimation of reconciled measured values, the location of gross errors and the numerical values of these errors. The process variable classification using QR decomposition is implemented before data reconciliation, as it only depends on the system’s topology.

19 T 1 min (xm xr gξBξ) ψ− (xm xr gξBξ) xr,gξ − − − − T T (23) s.t. Q Ax (xr gξBξ) = Q c u2 − u2 g (x , g ) 0 r ξ ≤

Case Study

A simulated case study is presented in this work for testing and exhibiting the capabilities of the proposed methodology. A crude oil pre-heat train consisting of 8 process-to-process heat exchangers, 1 desalter unit, 3 cold utilities and one fired-heater as hot utility is used. The structure of this pre-heat train is based on the heat exchanger network studied by Ahmad et al. 33 and it is presented in Figure 1. For replicating industrial data, the HEN simulation approach described in Section 2 is used and measurement error in the form of random and gross errors are added to these data. The input information, such as inlet flow rates, temperatures, heat exchangers’ geometry and physical properties, as well as input data for all utilities are the same ones as presented in the case study used in Reference 24. Fouling is considered for each process-to-process heat exchanger, where different mechanisms can occur on either side (shell-side or tube-side). Crude oil is flowing inside the tubes, whereas the hot streams are flowing inside the shell-side of each exchanger. The effect of fouling on the pre-heat train’s pressure drop is not accounted for, as this work is more focused on the effect of the data reconciliation with partial instrumentation into the estimation of thermal performance when fouling is included in the heat transfer modelling. The entire modelling and optimisation frameworks have been developed in MATLAB, using the in-built functions corresponding to SQP and Genetic Algorithm methods for data reconciliation and fouling parameter estimation respectively. For generating the measured data, random errors are added following the assumption that

20 35

16 17

18 20 22 25 31 27 29 36 24

1 2 3 4 5 6 7 8 9 10 11

19 21 28 37 26

23 14 15 30

34 32

Supply unit 12 13

Demand unit 33 Cold stream Hot stream

Figure 1: Flow diagram of pre-heat train in case study these errors can be modelled using a normal distribution with null mean and known standard deviations σm and σT for flow rate and temperature measurements respectively. The selected

1 values for these standard deviations are 1.50 kg s− and 1.50°C respectively. These values can be considered as acceptable as they are common in industrial applications.34,35 Gross errors are added as single values, usually of a greater magnitude than those of random errors, into specific measurements. More than one measurement can present a gross error and this fact affects the complexity of finding an optimal solution for the reconciled data. When applying the global test for detecting the presence of gross errors, a level of significance of 90% or δ = 0.01 is selected, as this value is commonly used in industrial applications.4 The simulation time is 1 year, with time steps of 24 hours. This generates 366 sets of data that are considered as daily-averaged snapshots of the process. Each flow rate and temperature from the simulation (without measurement error) is used as nominal value and stored for comparison purposes after missing measurements are accounted for. After having the nominal process data, several streams are chosen to be unmeasured, and the topological analysis detailed in Section 4 is implemented for determining the estimability of the system.

21 Fouling is considered via fouling rate models, specifically using the correlations shown in Equations 5 and 6. Both of these equations present a set of parameters corresponding to the type of crude oil processed in the pre-heat train. For simulating the process-data, the base values of the fouling model parameters are shown in Table 1. These values will then be back-calculated in order to test the rigour of the data reconciliation and the parameter estimation algorithms once the effect of partial instrumentation is accounted for. Note that a chemical reaction mechanism is only considered for the tube-side of the heat exchangers downstream of the desalter unit, whereas a constant fouling rate model is used in both sides of the heat exchangers upstream of the desalter unit. This mechanism is also used in the shell-side of the remaining exchangers.

Table 1: Fouling model parameters used for simulation of process-data. From Rodriguez and Smith 36 and Polley et al. 29

2 1 1 1 2 1 1 2 1 1 α1 (m K kW− h− ) EA (kJ mol− ) γ (m K kW− h− ) α2 (m K kW− h− ) 4 E1 5.50 10− ––– × 4 E2 5.50 10− ––– × 4 E3 5.50 10− ––– × 4 E4 5.50 10− ––– × 4 9 6 E5 5.50 10− 48.00 1.50 10− 1.00 10 × 4 × 9 × 6 E6 5.50 10− 48.00 1.50 10− 1.00 10 × 4 × 9 × 6 E7 5.50 10− 48.00 1.50 10− 1.00 10 × 4 × 9 × 6 E8 5.50 10− 48.00 1.50 10− 1.00 10 × × ×

There is a total of 37 streams and flow rates and temperatures measurements are con- sidered as the process data. This leads to a total of 74 measurements if the pre-heat train is fully instrumented. In order to account for the effect of unmeasured variables, several measurements are selected as missing data and the methodology described in Section 4 is used for classifying the process variables and determining if the entire system allows for the estimation of unmeasured variables. The unmeasured variables are listed in Table 2.

22 Table 2: Unmeasured variables in pre-heat train

Flow rate Temperature 2 3 3 5 4 7 5 9 6 11 7 13 8 15 9 17 10 21 11 26 13 28 15 33 17 35 21 37 24 – 28 – 33 – 35 – 37 –

Redundancy and Observability Analysis

Considering the set of measured variables shown in Table 2, the results of the topological analysis of the heat exchanger network are shown in Table 3. From a total of 41 measured variables, 23 of them are considered as redundant. This means that each of these measure- ments can be estimated even if such measurements are missing. The remaining 18 measured variables are classified as non-redundant, that is, such variables become non-observable if these are unmeasured. Also, the entire set of unmeasured variables in Table 2 is classified as observable, meaning that with the current instruments and measurements, each missing state within the pre-heat train can be estimated via data reconciliation and the use of the measured variables. No unmeasured variable is classified as non-observable. Nevertheless, note that if one or more unmeasured variables are added to the current set of missing data, non-observable variables can be found and greater number of measured variables should be needed for compensating the lack of redundancy. For example, if the

23 temperature of stream 24 is not measured, this leads to rank-deficient matrix Au, resulting in a subset of non-observable variables that in this case are the temperatures of streams 15, 33 and 37 respectively. This sub-set of unmeasured variables represents the minimum set of states necessary for a complete estimation of the process variables in the pre-heat train, defined as xu,d. These variables should be measured in order to assure to absence of non-observable unmeasured variables.

Table 3: Process Variable Classification for Pre-heat Train

Measured variables Unmeasured variables Redundant Non-redundant Observable Non-observable Flow rate 10 8 19 0 Temperature 13 10 14 0

Data Reconciliation and Estimation of Unmeasured Data

Following the addition of random and gross errors to the measured data, the corresponding procedures for data reconciliation, gross error detection and estimation of unmeasured vari- ables were carried out. In this case study, 2 different gross errors are added to a single flow rate and a single temperature, based on the standard deviations for flow rates and temper- ature measurements σm and σT , respectively. The values of these gross errors are selected in such way that their correct location and estimation are guaranteed for each data-set. Note that depending on the relative impact different gross errors have on all data-sets, these minimum isolation magnitudes may vary and possibly not found if the amount of measured data is not sufficient. The location and magnitudes of these gross errors are shown in Table 4 and the effect of the detection of such errors is analysed along with the data reconciliation results.

Table 4: Gross errors for streams in pre-heat train

1 Stream Flow rate bias (kg s− ) Temperature bias (°C) 30 12σm – 6 – 12σT

24 The simultaneous detection, identification and estimation of gross errors is based on the recursive approach developed by Sánchez et al. 15 and later implemented for nonlinear systems and inequality constraints by Loyola-Fuentes et al..31 The global test is first used for detecting the presence of gross errors; next, several measurements are classified as candidates for containing gross errors. A data reconciliation problem is solved for each set of candidates using Equation 23 and the global test is used again to track the presence of gross errors once a set of reconciled measurements is obtained. While estimating this set of reconciled measurements (free of gross errors), Equation 19 (or Equation 21 depending on the case) is used for solving the estimation of unmeasured variables. These steps are repeated for each data-set within the chose time-span. A comparison between the set of measurements before and after data reconciliation are shown in Figure 2. The reconciled data show that the effects of random and gross errors have been reduced. The estimation of gross errors have been correctly located in the corresponding measurements shown in Table 4. Average values along the entire simulation time for both estimates of gross errors are shown in Table 5. These average estimations are sufficiently accurate and the amount of random noise is decreased.

Table 5: Average estimation of gross error for case study

Location Simulated bias Estimated bias Flow rate in stream 30 12σm 12.05σm Temperature in stream 6 12σT 11.97σT

Whilst reconciling the measured data, the unmeasured variables are estimated based on the redundancy and observability analysis. The entire set of missing data is compared with the previously stored data in order to assess the accuracy of such estimations. The absolute differences between these sets of variables are shown in the histograms in Figure 3. To illustrate these results, the flow rate of streams 8 and 24, along with the temperature of streams 5 and 35 are selected as they directly depend on the measurements that initially contained gross errors (via mass or energy balance). The presence of gross error inevitably

25 Figure 2: Data reconciliation and gross error detection results for (a): flow rate of stream 30 and (b): temperature of stream 6 impacts the estimation of the reconciled data, especially in cases where there is an explicit dependency between these variables and other sets of data. Thus, an accurate estimation of these related unmeasured variables can reflect the performance of the gross error detection procedure. However, it was found that for specific sets of variables, their approximated values were overestimated if considered as unmeasured. For example, when the temperature measure-

26 Figure 3: Absolute error for estimation of unmeasured variables of (a): flow rate of stream 8, (b): flow rate of stream 24, (c): temperature of stream 5 and (d): temperature of stream 35 ments of stream 19 are missing and later calculated using data reconciliation, their estima- tions show absolute differences higher than 10°C for some data-sets when compared with the fully-instrumented case. A similar scenario is obtained when considering the temperature of stream 23. This behaviour can be explained by the fact that the flow rates of these streams are relatively lower compared to the rest of flow rates. When random noise is added to the data, the impact of this noise (that depends on the standard deviation of their corresponding measurement instrument) is more severe for streams that present lower magnitudes of flow rates and/or temperatures. This means that the estimation of unmeasured variables that depend on these measurements is more sensible to subtle changes in measured variables when reconciling, leading to an inevitable overestimation of temperatures in this case. Despite the issue described above, the reported estimations of unmeasured variables

27 are accurate and further validated by comparing their numerical values with the simulated

1 data. Maximum deviations for these estimations are 1.87 and 1.20 kg s− for the selected − unmeasured flow rates of streams 8 and 24, and 0.97 with 2.12°C for the unmeasured − − temperatures of streams 5 and 35 respectively. The results indicate that the data reconcilia- tion algorithm is able to minimise the impact of random error, to correctly identify location and magnitudes of multiple gross errors, and reliably estimate specific sets of unmeasured process variables.

Parameter Estimation and Prediction of Fouling Behaviour

The complete set of reconciled data is now used for estimating the fouling model parameters for the pre-heat train in Figure 1. Based on the fouling mechanisms assumed initially, specific fouling models are selected (along with their corresponding amount of parameters) and the hybrid optimisation approach described in this work is used for such estimation. Note that a pre-existing knowledge regarding the fouling mechanisms that potentially occur along the pre-heat train is of great importance. The understanding of the nature of fouling deposits as well as the process by which these deposits develop on each heat exchanger is crucial for the design of mitigation strategies. In this context, on-site information from plant operators and historical data can provide insightful details for correctly select specific fouling mechanisms and their corresponding models. The estimated fouling model parameters for all heat exchangers and the values of their root mean square errors are shown in Table 6. No significant deviations are seen for the fitted parameters in the cold end of the pre-heat train (exchangers 1 to 4), as a single mechanism is assumed both shell-side and tube-side. On the other hand, the parameters fitted for the hot end present more differences than the cold end, specifically the suppression parameter γˆ. Most of the heat exchangers exhibit different trends of under and overestimation of each parameter, with the exception of exchanger 7, where all fouling model parameters are overestimated. Nonetheless, the estimated parameters are within the range of lower

28 and upper bounds and the deviations reported in Table 6 are expected to account for the remaining measurement error that is not reduced after the data reconciliation procedure.

Table 6: Estimation of fouling model parameters and their corresponding values of RMSE

2 1 1 1 2 1 1 2 1 1 2 1 αˆ1 (m K kW− h− ) EˆA (kJ mol− ) γˆ (m K kW− h− ) αˆ2 (m K kW− h− ) RMSE (m K kW− ) Base values 5.50 10 4 48.00 1.50 10 9 1.00 106 – × − × − × E1 5.50 10 4 ––– 0.127 × − E2 5.52 10 4 ––– 0.110 × − E3 5.48 10 4 ––– 0.117 × − E4 5.51 10 4 ––– 0.083 × − E5 7.49 10 4 45.43 5.90 10 8 5.47 105 0.069 × − × − × E6 9.93 10 4 33.02 1.25 10 7 2.34 104 0.042 × − × − × E7 1.00 10 3 66.51 6.75 10 8 8.23 107 0.121 × − × − × E8 1.11 10 3 39.39 9.07 10 8 1.46 105 0.041 × − × − ×

The heat exchanger network can now be simulated over a specific time-span using the fitted fouling models. This simulation allows for a variety of analysis including the prediction of fouling resistance over time and the evolution of the thermal performance of the pre-heat train. Figure 4 shows comparisons of the change in fouling resistance over time for each heat exchanger in the network. The fouling resistances obtained directly from the sets of reconciled data are compared with the ones calculated using the fitted fouling models and the parameters in Table 6. The overall agreement presents no significant deviations and can be considered as sufficiently accurate for all heat exchangers. The maximum discrep- ancy in terms of prediction error is found in heat exchanger 3, which presented an absolute

2 1 difference of 1.60 m K kW− . These results are helpful for visualising the prediction capa- − bilities of the estimated fouling model parameters and their correspondence with the specific type of crude oil used in this case study. Moreover, the pre-selection of individual fouling mechanisms for each heat exchanger allows for a satisfactory separation of shell-side and tube-side fouling mechanisms, which provides a more realistic perception of the what actu- ally happens during operating periods. However, it is important to acknowledge that there are still some aspects to clarify and further study in terms of describing and understanding the fouling phenomenon, specifically in complex physical systems such as the shell-side in heat exchangers. Overall, with the continuous increasing in the study of the underlying causes of fouling, methodologies such as the one proposed in this work present an interesting

29 potential for more detailed analyses including operational optimisation and the design of monitoring-based mitigation strategies.

Figure 4: Parity plots comparing measured and predicted fouling resistance in pre-heat train

Conclusions

Process monitoring in crude oil refineries is crucial for various related activities such as process control and on-line optimisation. The quality of these monitored data is directly connected with the design and degree of maintenance of on-site instrumentation. In this context, data reliability can be improved using data-processing techniques such as data reconciliation. This technique is able to reduce the effect of measurement error in measured data, and deal with the presence of faulty instruments as well as missing process states. The benefits of data reconciliation can be applied into the monitoring, analysis and further

30 prediction of fouling behaviour in crude oil pre-heat trains. When fouling rate models are used, the estimated parameters corresponding to a specific type of crude oil lead to accurate predictions and more suitable mitigation strategies. Moreover, under optimal conditions, data reconciliation enables for a full knowledge of the relevant process variables, without altering the current instrumentation network. This work presented a methodology for integrating the use of crude oil fouling threshold and heat transfer models with the application of data reconciliation and gross error detec- tion. A more realistic scenario, where a partially-instrumented pre-heat train processing a particular type of crude oil is considered. Depending on the amount of measured process variables, the missing data can be classified according to their capability of being estimated using the set of process measurements. If the entire set of process states is determined, the information is used for calculating a set of fouling models for all heat exchangers in the network, in order to capture the individual characteristics of each deposition mechanism. The proposed methodology was tested in a case study, where an industrially-scaled crude oil pre-heat train with a given amount of measured and unmeasured variables is subject to different fouling mechanisms as the crude oil flows from cold to hot end. A detailed and flexible HEN model was used for generating process data, and random and gross errors were added to replicate the variability of on-site measurements. The results showed that the methodology presented in this work is able to classify the process variables and deter- mine their estimation capability based on the HEN’s topology. Additionally, the data was reconciled and the gross errors were correctly detected and estimated for multiple data-sets representing one year of operation. The reconciled data was useful as a reliable input for the estimation of fouling model parameters, presenting significant prediction capabilities in terms of the evolution of the network’s fouling resistance. The current limitations of this method are attributable to the implicit complexities of each pre-heat train in study, such as the relative differences in magnitudes of flow rates and temperatures, as well as the impact of the number of unmeasured variables in the gross

31 error detection stage. Furthermore, the authors acknowledge the importance of including the impact of fouling into the hydraulic performance of the network, as well as in the data reconciliation procedure via pressure or pressure drop measurements. The proper treatment of these challenges should improve the robustness of this work, and enhance the visibility of the importance that process monitoring exhibits in the context of fouling mitigation.

Acknowledgement

The authors thank the Chilean National Commission for Scientific and Technological Re- search (CONICyT) for the financial support granted for the development of this work.

References

(1) Panchal, C.; Huangfu, E.-P. Effects of Mitigating Fouling on the Energy Effi- ciency of Crude-oil Distillation. Heat Transfer Engineering 2000, 21, 3–9, DOI:

10.1080/014576300270843.

(2) Epstein, N. Thinking about Heat Transfer Fouling: A 5 5 Matrix. Heat Transfer En- × gineering 1983, 4, 43–56, DOI: 10.1080/01457638108939594.

(3) Wilson, D. I.; Ishiyama, E. M.; Polley, G. T. Twenty Years of Ebert and Panchal - What Next? Heat Transfer Engineering 2017, 38, 669–680, DOI:

10.1080/01457632.2016.1206407.

(4) Narasimhan, S.; Jordache, C. Data Reconciliation & Gross Error Detection: An Intel- ligent Use of Process Data; Gulf Publishing Co.: Houston, Texas, USA, 2000.

(5) Ishiyama, E. M.; Pugh, S. J.; Paterson, B.; Polley, G. T.; Kennedy, J.; Wilson, D. I. Management of Crude Preheat Trains Subject to Fouling. Heat Transfer Engineering

2013, 34, 692–701, DOI: 10.1080/01457632.2012.739036.

32 (6) Romagnoli, J. A.; Sánchez, M. C. Data Processing and Reconciliation for Chemical Process Operations; Academic Press, Inc.: Orlando, Florida, USA, 1999.

(7) Sánchez, M.; Romagnoli, J. Use of Orthogonal Transformations in Data Classification- Reconciliation. Computers & Chemical Engineering 1996, 20, 483 – 493, DOI:

10.1016/0098-1354(95)00212-X.

(8) Mah, R. S.; Stanley, G. M.; Downing, D. M. Reconciliation and Rectification of Process Flow and Inventory Data. Industrial & Engineering Chemistry Process Design and

Development 1976, 15, 175–183, DOI: 10.1021/i260057a030.

(9) Crowe, C. M.; Campos, Y. A. G.; Hrymak, A. Reconciliation of Process Flow Rates by Matrix Projection. Part I: Linear Case. AIChE Journal 1983, 29, 881–888, DOI:

10.1002/aic.690290602.

(10) Tjoa, I.; Biegler, L. Simultaneous Strategies for Data Reconciliation and Gross Error Detection of Nonlinear Systems. Computers & Chemical Engineering 1991, 15, 679–

690, DOI: 10.1016/0098-1354(91)85014-L.

(11) Almasy, G.; Sztano, T. Checking and Correction of Measurements on the Basis of Linear System Model. Problems of Control and Information Theory 1976, 4, 57–69.

(12) Narasimhan, S.; Mah, R. S. H. Generalized Likelihood Ratio Method for Gross Error

Identification. AIChE Journal 1987, 33, 1514–1521, DOI: 10.1002/aic.690330911.

(13) Tamhane, A. C.; Iordache, C.; Mah, R. S. A Bayesian Approach to Gross Error Detec- tion in Chemical Process Data: Part I: Model Development. Chemometrics and Intel-

ligent Laboratory Systems 1988, 4, 33–45, DOI: 10.1016/0169-7439(88)80011-X.

(14) Tong, H.; Crowe, C. M. Detection of Gross Errors in Data Reconciliation by Principal Component Analysis. AIChE Journal 1995, 41, 1712–1722, DOI:

10.1002/aic.690410711.

33 (15) Sánchez, M.; Romagnoli, J.; Jiang, Q.; Bagajewicz, M. Simultaneous Estimation of Biases and Leaks in Process Plants. Computers & Chemical Engineering 1999, 23,

841–857, DOI: 10.1016/S0098-1354(99)00104-0.

(16) Llanos, C.; Sánchez, M.; Maronna, R. Classification of Systematic Measurement Er- rors within the Framework of Robust Data Reconciliation. Industrial & Engineering

Chemistry Research 2017, 56, 9617–9628, DOI: 10.1021/acs.iecr.7b00726.

(17) Arora, N.; Biegler, L. T. Redescending Estimators for Data Reconciliation and Pa- rameter Estimation. Computers & Chemical Engineering 2001, 25, 1585–1599, DOI:

10.1016/S0098-1354(01)00721-9.

(18) Özyurt, D. B.; Pike, R. W. Theory and Practice of Simultaneous Data Reconciliation and Gross Error Detection for Chemical Processes. Computers & Chemical Engineering

2004, 28, 381–402, DOI: 10.1016/j.compchemeng.2003.07.001.

(19) Zhang, Z.; Shao, Z.; Chen, X.; Wang, K.; Qian, J. Quasi-weighted Least Squares Esti- mator for Data Reconciliation. Computers & Chemical Engineering 2010, 34, 154–162,

DOI: 10.1016/j.compchemeng.2009.09.007.

(20) Cicciotti, M.; Xenos, D. P.; Bouaswaig, A. E.; Martinez-Botas, R. F.; Ma- nenti, F.; Thornhill, N. F. In 24th European Symposium on Computer Aided Process Engineering; Klemeš, J. J., Varbanov, P. S., Liew, P. Y., Eds.; Com- puter Aided Chemical Engineering; Elsevier, 2014; Vol. 33; pp 457–462, DOI:

10.1016/B978-0-444-63456-6.50077-6.

(21) Jiang, X.; Liu, P.; Li, Z. Data Reconciliation and Gross Error Detection for Operational

Data in Power Plants. Energy 2014, 75, 14–23, DOI: 10.1016/j.energy.2014.03.024.

(22) Markowski, M.; Trafczynski, M.; Urbaniec, K. Identification of the Influence of Fouling on the Heat Recovery in a Network of Shell and Tube Heat Exchangers. Applied Energy

2013, 102, 755 – 764, DOI: 10.1016/j.apenergy.2012.08.038.

34 (23) Diaz-Bejarano, E.; Coletti, F.; Macchietto, S. Modeling and Prediction of Shell-Side Fouling in Shell-and-Tube Heat Exchangers. Heat Transfer Engineering 2019, 40, 845–

861, DOI: 10.1080/01457632.2018.1446814.

(24) Loyola-Fuentes, J.; Smith, R. Data Reconciliation and Gross Error Detection in Crude Oil Pre-heat Trains Undergoing Shell-side and Tube-side Fouling Deposition. Energy

2019, 183, 368 – 384, DOI: 10.1016/j.energy.2019.06.119.

(25) Chebeir, J.; Webb, Z.; Romagnoli, J. An Environment for Topology Analysis and Data Reconciliation of the Pre-heat Train in an Industrial Refinery. Applied Thermal Engi-

neering 2019, 147, 623–635, DOI: 10.1016/j.applthermaleng.2018.10.081.

(26) de Oliveira Filho, L. O.; Queiroz, E. M.; Costa, A. L. A Matrix Approach for Steady- state Simulation of Heat Exchanger Networks. Applied Thermal Engineering 2007, 27,

2385–2393, DOI: 10.1016/j.applthermaleng.2007.03.002.

(27) Ochoa-Estopier, L. M.; Jobson, M.; Chen, L.; Rodríguez-Forero, C. A.; Smith, R. Op- timization of Heat-Integrated Crude Oil Distillation Systems. Part II: Heat Exchanger Network Retrofit Model. Industrial & Engineering Chemistry Research 2015, 54, 5001–

5017, DOI: 10.1021/ie503804u.

(28) Wang, Y.; Pan, M.; Bulatov, I.; Smith, R.; Kim, J.-K. Application of Intensified Heat Transfer for the Retrofit of Heat Exchanger Network. Applied Energy 2012, 89, 45–59,

DOI: 10.1016/j.apenergy.2011.03.019.

(29) Polley, G. T.; Wilson, D. I.; Yeap, B. L.; Pugh, S. J. Evaluation of Laboratory Crude Oil Threshold Fouling Data for Application to Refinery Pre-heat Trains. Applied Thermal

Engineering 2002, 22, 777–788, DOI: 10.1016/S1359-4311(02)00023-6.

(30) Costa, A. L. H.; Tavares, V. B. G.; Borges, J. L.; Queiroz, E. M.; Pessoa, F. L. P.; dos Santos Liporace, F.; de Oliveira, S. G. Parameter Estimation of Fouling Mod-

35 els in Crude Preheat Trains. Heat Transfer Engineering 2013, 34, 683–691, DOI:

10.1080/01457632.2012.738566.

(31) Loyola-Fuentes, J.; Jobson, M.; Smith, R. Estimation of Fouling Model Parameters for Shell Side and Tube Side of Crude Oil Heat Exchangers Using Data Reconciliation and Parameter Estimation. Industrial & Engineering Chemistry Research 2019, 58,

10418–10436, DOI: 10.1021/acs.iecr.9b00457.

(32) Bagajewicz, M. J.; Jiang, Q. Gross Error Modeling and Detection in Plant Linear Dynamic Reconciliation. Computers & Chemical Engineering 1998, 22, 1789–1809,

DOI: 10.1016/S0098-1354(98)00248-8.

(33) Ahmad, S.; Polley, G.; Petela, E. Retrofit of Heat Exchanger Networks Subject to Pressure Drop Constraints. AIChE Spring Meeting. 1989.

(34) Comparing Flow meters. 2003; https://www.engineeringtoolbox.com/ flowmeter-selection-d_526.html, Accessed on: 12-06-2019.

(35) Thermocouple Accuracies. 2011; http://www.thermocoupleinfo.com/ thermocouple-accuracies.htm, Accessed on: 12-06-2019.

(36) Rodriguez, C.; Smith, R. Optimization of Operating Conditions for Mitigating Fouling in Heat Exchanger Networks. Chemical Engineering Research and Design 2007, 85,

839–851, DOI: 10.1205/cherd06046.

36 Nomenclature

Symbols

A Coefficient matrix for HEN mass balance

Au Constraint matrix of measured variables

Ax Constraint matrix of unmeasured variables b Solution vector for HEN mass balance

Bξ Bias location matrix C Coefficient matrix for HEN energy balance c Solution vector for linearised constraints in data reconciliation d Solution vector for HEN energy balance gξ Vector of bias magnitudes M Incidence matrix for HEN topology m Vector of HEN internal flow rates n Vector of HEN external flow rates P Permutation matrix in QR decomposition p Vector of fouling model parameters

Qu Decomposed matrix from QR decomposition qξ Vector constraints residuals for gross error detection

Ru Decomposed matrix from QR decomposition T Vector of HEN internal temperatures V Vector of HEN external temperatures x Vector of HEN flow rates xm Vector of measured variables xr Vector of reconciled variables xu Vector of unmeasured variables z Vector of HEN temperatures din Inner tube-side diameter

37 dout Outer tube-side diameter

EA Activation energy h Local heat transfer coefficient NTU Number of transfer units P r Prandtl number Re Reynold number Rf Fouling resistance Rg Ideal gas constant rξ Random error magnitude RMSE Root mean square error t time

TW Tube-wall temperature

Ud Overall heat transfer coefficient

Greek Letters

Πu Permutation matrix for unmeasured variables

φξ Covariance matrix of constraints residuals ψ Covariance matrix of measurement error ξ Vector of measurement error

α1 Constant rate fouling model parameter

α2 Formation parameter in chemical reaction fouling model γ Suppression parameter in chemical reaction fouling model δ Level of significance for gross error detection ε Thermal effectiveness ν Degrees of freedom for gross error detection σ Standard deviation for process measurements τ Test function for global test

τc Threshold value for global test

38 Subscripts c Cold stream d Set of linearly-dependent equations in matrix Au h Hot stream m Flow rate measurement s Set of linearly-independent equations in matrix Au shell Shell-side T Temperature measurement tube Tube-side

Superscripts

ˆ Fitted fouling parameter ˜ Normalised fouling parameter CU Cold utility fit Fitted fouling resistance HE Heat exchanger HU Hot utility L Lower bound msr Measured fouling resistance MX Mixer PD Demand unit PS Supply unit SP Splitter T Transpose U Upper bound UP Unit operation (desalter)

39 Graphical TOC Entry

Stream data HEN topology Measured variables Unmeasured variables

Problem decomposition Gross error detection Reconciliation of measured data

Parameter estimation Thermal assessment Prediction of fouling and process states

40 Chapter 6

Conclusions and Future Work

6.1 Conclusions

Crude oil refineries are a vast and important supplier of most of the fuels and chemical products that are used worldwide. The manufacturing of these products demands large amounts of energy during the crude oil distillation stage. Here, an energy-recovery network known as the pre-heat train, increases the temperature of the crude oil using recirculated streams from the crude distillation column. This practice allows for high energy-recovery rates, which bring significant en- ergy cost savings. However, the performance of the pre-heat train is affected by the deposition of unwanted solid material, known as fouling. This phenomenon not only affects the thermal performance of the pre-heat train, but also increases the overall pressure drop, pumping power and fuel consumption. Therefore, the design of fouling mitigation strategies by means of mathematical modelling and experimental work is crucial for minimising the inevitable effects of fouling depo- sition. Commonly, the characterisation of fouling phenomena is carried out in labora- tories, where the process conditions are highly controlled, and the extrapolation to field conditions is rather impractical. Furthermore, the frequent changes in crude oil feed during the space of a few day’s duration increases the complexity, as different crude oils can trigger different fouling mechanisms under the same set of operating conditions. Thus, the fundamental understanding of fouling mecha- nisms and their relation with operating variables has been targeted as a crucial milestone over the years, and the knowledge acquired via experimental studies has been implemented in industrial processes. In particular, the use of fouling

139 140 CHAPTER 6. CONCLUSIONS AND FUTURE WORK threshold models as a characterisation tool for different crude oils represents a major breakthrough, and its application in industry using process data has proven to be beneficial. However, process monitoring faces several challenges, which are mostly related to the quantity and quality of the monitored data. Measurement instruments are intrinsically limited by their corresponding measurement accu- racy. As a result, the measured values deviate from their equivalent nominal ones. In addition, measurement instruments are prone to be severely damaged under particular conditions such as the lack of maintenance. Subsequently, the number of measurement instruments and their location directly influence the feasibility of estimation of the system under study. This thesis has focused on the design of a new methodology for integrating data reconciliation (and gross error detection) into the estimation of fouling threshold model parameters in crude oil pre-heat trains. Special considerations were taken for the fouling phenomenon, as its time-dependent nature is significant, and the wide range of mechanisms that occur in heat exchangers can be encountered in the tube-side as well as the shell-side. A series of simulation-based studies were carried out, using random and systematic noise to replicate the behaviour of real operating data. A flexible simulation strategy, based on fundamental concepts in heat transfer modelling was selected and used for generating the data and predicting the ther- mal effect of fouling on the pre-heat train’s outlet conditions. The independent contributions from shell-side and tube-side fouling were incorporated in the mod- elling of the pre-heat train via a pseudo-steady-state formulation over a given time-span. The simulation scheme was further exploited and used as the set of process constraints needed for the data reconciliation method. The mass and en- ergy balance equations, along with the non-negativity requirement for the fouling resistance, were set as equality and inequality constraints respectively. In addition, the violation of the process constraints was quantified and utilised as an indicator for detecting the presence of gross errors. The detection of gross errors was followed by the estimation of their numerical value by means of a serial strategy, which has been adapted for handling energy balance and inequality relations as process constraints. Numerous studies were carried out in different types of measurements (i.e. flow rates and temperatures) in order to identify the minimum value of gross error(s) to be contained in the data, needed for perfectly locating their source. In cases where unmeasured process variables were present, 6.1. CONCLUSIONS 141 a classification method was applied in order to determine whether the available instrumentation is sufficient for a complete reconciliation of the pre-heat train. Moreover, a hybrid-optimisation algorithm was used for estimating fouling model parameters from the reconciled data, where shell-side and tube-side fouling are separately included in the parameter estimation objective function. A wide search is first carried out using Genetic Algorithm and the solution is fine-tuned via a gradient-based deterministic method. The set of estimated parameters for each heat exchanger in the pre-heat train are fed into the simulation model and pre- dictions of fouling behaviour can take place. This methodology (included the data reconciliation if needed) can be successively implemented when changing the crude oil feed, provided that its physical properties and dominant fouling mechanisms are known. The results from the series of case studies presented throughout this Thesis sug- gest several outcomes. First, the proper treatment of measured data can signif- icantly increase the accuracy and reliability of any calculation performed later. In particular, the agreement between the values of fouling resistance from mea- surements and the regressed fouling models is notoriously different when data reconciliation is not included. Additionally, the effect of measurement errors varies according to the type of measurement the error is contained in, as errors in temperature measurements are reconciled at a lower degree than those in flow rate measurements. Another important feature of the implementation of data recon- ciliation is the identification of faulty instruments, which supports maintenance decisions regarding equipment calibration or replacement. Second, by accounting for separate fouling mechanisms in the shell-side and tube- side of heat exchangers, a more realistic perspective is given to the problem. Even in cases where shell-side fouling could be neglected, the use of the proposed methodology enables for sufficient flexibility in such a way that different scenarios can be assessed. This advantage is more evident in the case of heat exchanger networks (compared to single heat exchangers), where multiple fouling mecha- nisms occur at different stages along the pre-heat train. Furthermore, this deeper understanding of the evolution of the performance of the pre-heat train is of great importance for complementary methods such as design and retrofit (including the design and optimisation of cleaning schedules). Finally, the topological analysis included in the data reconciliation method pro- vides an effective solution for evaluating an existing instrumentation network and 142 CHAPTER 6. CONCLUSIONS AND FUTURE WORK its effect on whether the set of measurements can inherently capture fouling be- haviour. This feature is rather important as the inclusion of fouling in the heat transfer model increases the amount of information needed for accurately recon- ciling the data. Therefore, a non-trivial formulation of fouling deposition into the HEN modelling facilitates the assessment of the pre-heat train, and the relevant selection or design of sensor networks can be properly managed.

6.2 Future Work

The applicability of the methodology proposed in this Thesis is limited under certain assumptions and specific scenarios. The potential improvements that could expand the implementation and versatility of this work are listed in this section. These improvements are related to the inclusion of the hydraulic effect of fouling in the performance of the pre-heat train, the fundamental knowledge regarding fouling modelling, and the data reconciliation and gross error detection methods.

6.2.1 Hydraulic Effect of Fouling

In this Thesis, the integration of data reconciliation and parameter estimation into the modelling and simulation of crude oil pre-heat trains was evaluated. In order to do this, only the thermal effect of fouling was assessed, given that this simplification provides a suitable starting point for validation purposes. However, it is acknowledged that in some cases, the effect of fouling in the overall pressure drop of the pre-heat train is significant and should be accounted for by means of appropriate hydraulic modelling. These models should include the changes in the flow cross-sectional area due to the growth or decline of the fouling layer thickness. Commonly, hydraulic models use the friction factor and the affected flow cross-sectional area to estimate the pressure drop across a specific domain (i.e. tube-side or shell-side) (Coletti and Macchietto, 2011). The pressure-drop contributions of elements such as inlet and outlet nozzles, and different piping fittings along the equipment should also be considered. Likewise, changes in the fouling layer characteristics such as thermal conductivity and/or roughness have a meaningful effect on the rate of formation or suppression at a specific time-range. The inclusion of the consequences of fouling in the pre-heat train’s pressure drop allows for a more rigorous selection of fouling models. For instance, the use of 6.2. FUTURE WORK 143 the tube wall shear stress is included in various fouling threshold models (see Section 2.2.2). The shear stress presents a dependency with the friction factor, which is directly related to the pressure drop of the system. The calculation of the fouling rate via these fouling models (in the case of chemical reaction) represents a feasible alternative for the current fouling threshold models chosen in this Thesis, and different scenarios can be analysed, where the significance of the hydraulic effect of fouling could be evaluated.

6.2.2 Fouling Modelling

Numerous fouling mechanisms have been identified and characterised, and a par- ticular set of these mechanisms is generally abundant in crude oil applications. One of these mechanisms is chemical reaction, which has been extensively stud- ied over the years and several models are available, including fouling threshold models. Nevertheless, these models were developed for specific conditions and typically implemented in the tube-side of heat exchangers. On the other hand, shell-side fouling is still a challenging task and only a limited number of studies have investigated this phenomenon (Diaz-Bejarano et al., 2018). Still, the inclu- sion of these modelling approaches can further improve the reliability of the entire methodology proposed in this Thesis. Also, the use of more realistic models in the cold end of pre-heat trains (where chemical reaction does not dominate as a controlling mechanism), can further increase the applicability of this work. Moreover, in order to include the hydraulic effect of fouling, the ageing phe- nomenon should be integrated to account for the variation of the fouling layer physical properties, as in specific cases this contribution is decidedly relevant. For example, ageing models suitable for chemical reaction fouling, such as the one proposed by Ishiyama et al. (2010) provides a fairly detailed representation of the ageing process, in which the thermal conductivity of the fouling layer changes from that of a recently deposited to a fully coked material, by means of the application of lower and upper bounds.

6.2.3 Data Reconciliation and Gross Error Detection

The data reconciliation approach used in this Thesis can be extended to the inclusion of mass or energy leaks as gross errors around the pre-heat train. A si- multaneous and flexible formulation of the gross error detection problem, in which 144 CHAPTER 6. CONCLUSIONS AND FUTURE WORK multiple scenarios including the individual or joined effects of measurement bias and process leaks are evaluated, could improve the robustness of the methodology developed in this work. The use of this approach can be implemented for iden- tifying faulty measurements and process units, where usually storage equipment such as tanks are prone to present mass or product leakage. Additionally, the versatility of the methodology presented in this Thesis can be expanded by introducing alternative methods for reconciling the data, depending on the reconciliation purpose. For instance, the use of robust estimators (Arora and Biegler, 2001) is a convenient option for reconciling data in presence of severe gross errors, where only a restrictive amount of information is provided regard- ing the probability distribution of the measurement error. In this case, a robust estimator can be selected from the wide variety available in the literature, and the presence of gross errors can be addressed in a more realistic way, as the vari- ability of the measurement error is not restricted by an explicit set of probability distribution. Another particular feature that should be accounted for is the performance of the data reconciliation method in large-scale dynamic systems. In terms of problem- scales, the gross error detection strategy selected in this work uses a combinatorial approach that significantly increases the computational time when more than one gross error is contained in the data. A re-formulation of the gross error detection technique that allows for a simultaneous estimation of different gross error loca- tions (i.e. including binary variables in a mixed-integer-programming problem) could decrease the number of calculations, reducing the computational time and performing more efficiently when a large number of process states is evaluated in existing heat exchanger networks. This strategy can also be implemented when dealing with dynamic systems, however the formulation of the data reconcili- ation problem (and the formulation of process constraints) should be updated to a suitable dynamic, instead of a series of steady-state calculations. To do this, a corresponding set of differential equations for mass and energy balance should be specified, along with the dependency of process states with time. All these considerations dramatically increase the complexity of the reconciliation solution, nevertheless dynamic data reconciliation is topic that has gained atten- tion within the scientific community, and its links with process control certainly provides enough importance for its implementation in ever-changing systems. Bibliography

Arora, N. and Biegler, L. T. (2001). Redescending Estimators for Data Rec- onciliation and Parameter Estimation. Computers & Chemical Engineering, 25(11):1585–1599.

Asomaning, S. (1997). Heat Exchanger Fouling by Petroleum Asphaltenes. PhD thesis, University of British Columbia.

Asomaning, S., Panchal, C., and Liao, C. (2000). Correlating Field and Labora- tory Data for Crude Oil Fouling. Heat Transfer Engineering, 21(3):17–23.

Asomaning, S. and Watkinson, A. P. (2000). Petroleum Stability and Heteroatom Species Effects in Fouling of Heat Exchangers by Asphaltenes. Heat Transfer Engineering, 21(3):10–16.

Awad, M., Abd El-Wahab, I., and Gad, H. (2007). Effect of Surface Temperature on the Fouling of Heat Transfer Surfaces. In Eleventh International Water Technology Conference, pages 283–298.

Bagajewicz, M. J. and Jiang, Q. (1998). Gross Error Modeling and Detection in Plant Linear Dynamic Reconciliation. Computers & Chemical Engineering, 22(12):1789–1809.

Bohnet, M. (1987). Fouling of Heat Transfer Surfaces. Chemical Engineering & Technology, 10(1):113–125.

Bories, M. and Patureaux, T. (2003). Preheat Train Crude Distillation Foul- ing Propensity Evaluation by the Ebert and Panchal Model. In Watkinson, P., M¨uller-Steinhagen, H., and Malayeri, M., editors, Understanding Heat Ex- changer Fouling and Its Mitigation, pages 200–211. ECI Symposium Series.

145 146 BIBLIOGRAPHY

Bott, T. R. (1995). Fouling of Heat Exchangers. Elsevier, Amsterdam, The Netherlands.

Britt, H. and Luecke, R. (1973). The Estimation of Parameters in Nonlinear, Implicit Models. Technometrics, 15(2):233–247.

Chebeir, J., Webb, Z., and Romagnoli, J. (2019). An Environment for Topol- ogy Analysis and Data Reconciliation of the Pre-heat Train in an Industrial Refinery. Applied Thermal Engineering, 147:623–635.

Chew, J., Joshi, H., Kazarian, S., Millan-Agorio, M., Tay, F., and Venditti, S. (2015). Chapter 4: Deposit Characterization and Measurements. In Coletti, F. and Hewitt, G., editors, Crude Oil Fouling, pages 95–178. Gulf Professional Publishing.

Coletti, F., Joshi, H., Macchietto, S., and Hewitt, G. (2015). Chapter 1: Intro- duction. In Coletti, F. and Hewitt, G., editors, Crude Oil Fouling, pages 1–22. Gulf Professional Publishing.

Coletti, F. and Macchietto, S. (2011). A Dynamic, Distributed Model of Shell- and-Tube Heat Exchangers Undergoing Crude Oil Fouling. Industrial & Engi- neering Chemistry Research, 50(8):4515–4533.

Costa, A. L. H., Tavares, V. B. G., Borges, J. L., Queiroz, E. M., Pessoa, F. L. P., dos Santos Liporace, F., and de Oliveira, S. G. (2013). Parameter Estimation of Fouling Models in Crude Preheat Trains. Heat Transfer Engineering, 34(8- 9):683–691.

Crittenden, B., Kolaczkowski, S., and Hout, S. (1987). Modelling Hydrocarbon Fouling. Chemical Engineering Research & Design, 65(2):171–179.

Crittenden, B., Kolaczkowski, S., Takemoto, T., and Phillips, D. (2009). Crude Oil Fouling in a Pilot-Scale Parallel Tube Apparatus. Heat Transfer Engineer- ing, 30(10-11):777–785.

Crittenden, B., S., K., and Downey, I. (1992). Fouling of Crude Oil Preheat Exchangers. In Transactions of the Institution of Chemical Engineers: Part A, pages 547–557. BIBLIOGRAPHY 147

Crowe, C. M. (1996). Data Reconciliation - Progress and Challenges. Journal of Process Control, 6(2):89–98.

Crowe, C. M., Campos, Y. A. G., and Hrymak, A. (1983). Reconciliation of Process Flow Rates by Matrix Projection. Part I: Linear Case. AIChE Journal, 29(6):881–888.

Derakhshesh, M., Eaton, P., Newman, B., Hoff, A., Mitlin, D., and Gray, M. R. (2013). Effect of Asphaltene Stability on Fouling at Delayed Coking Process Furnace Conditions. Energy & Fuels, 27(4):1856–1864.

Deshannavar, U., Rafeen, M., Ramasamy, M., and Subbarao, D. (2010). Crude Oil Fouling: A Review. Journal of Applied Science, 10(24):3167–3174.

Diaz-Bejarano, E., Coletti, F., and Macchietto, S. (2016). A New Dynamic Model of Crude Oil Fouling Deposits and its Application to the Simulation of Fouling- cleaning Cycles. AIChE Journal, 62(1):90–107.

Diaz-Bejarano, E., Coletti, F., and Macchietto, S. (2018). Modeling and Predic- tion of Shell-Side Fouling in Shell-and-Tube Heat Exchangers. Heat Transfer Engineering, 40(11):845–861. do Valle, E. C., de Arajo Kalid, R., Secchi, A. R., and Kiperstok, A. (2018). Col- lection of Benchmark Test Problems for Data Reconciliation and Gross Error Detection and Identification. Computers & Chemical Engineering, 111:134–148.

Dunia, R., Qin, S., Edgar, T., and McAvoy, T. (1996). Identification of Faulty Sensors Using Principal Component Analysis. AIChE Journal, 42(10):2797– 2812.

Ebert, W. and Panchal, C. (1995). Analysis of Exxon Crude-oil-slip Stream Coking Data. In Fouling Mitigation of Industrial Heat-exchange Equipment, pages 451–460. Begell House.

EIA (2012). Crude Oils Have Different Quality Characteristics. https://www. eia.gov/todayinenergy/detail.php?id=7110 [Accessed on: 31-07-2019].

Epstein, N. (1983). Thinking About Heat Transfer Fouling: A 5x5 matrix. Heat Transfer Engineering, 4(1):43–56. 148 BIBLIOGRAPHY

Epstein, N. (1994). A Model of the Initial Chemical Reaction Fouling Rate for Flow Within a Heated Tube and its Verification. In 10th International Heat Transfer Conference, pages 225–229.

Ishiyama, E. M., Coletti, F., Macchietto, S., Paterson, W., and Wilson, D. I. (2010). Impact of Deposit Ageing on Thermal Fouling: Lumped Parameter Model. AIChE Journal, 56(2):531–545.

Ishiyama, E. M., Pugh, S. J., Paterson, B., Polley, G. T., Kennedy, J., and Wilson, D. I. (2013). Management of Crude Preheat Trains Subject to Fouling. Heat Transfer Engineering, 34(8-9):692–701.

Jiang, X., Liu, P., and Li, Z. (2014). Data Reconciliation and Gross Error Detec- tion for Operational Data in Power Plants. Energy, 75:14–23.

Kashani, M. N., Aminian, J., Shahhosseini, S., and Farrokhi, M. (2012). Dynamic Crude Oil Fouling Prediction in Industrial Preheaters Using Optimized ANN based Moving Window Technique. Chemical Engineering Research and Design, 90(7):938–949.

Kazi, S. (2012). Chapter 19: Fouling and Fouling Mitigation on Heat Exchanger Surfaces. In Mitrovic, J., editor, Heat Exchangers Basics Design and Applica- tions, pages 507–532. IntechOpen.

Kern, D. and Seaton, R. (1959). A Theoretical Analysis of Thermal Surface Fouling. British Chemical Engineering, 4(5):258–262.

Knudsen, J., Lin, D., and Ebert, W. (1999). The Determination of the Threshold Fouling Curve for Crude Oil. In Bott, T., Melo, L., Panchal, C., and Somer- scales, E., editors, Understanding Heat Exchanger Fouling and Its Mitigation, pages 265–272. Begell House.

Kretsovalis, A. and Mah, R. (1988a). Observability and Redundancy Classifi- cation in Generalized Process Networks–I. Theorems. Computers & Chemical Engineering, 12(7):671–687.

Kretsovalis, A. and Mah, R. (1988b). Observability and Redundancy Classifica- tion in Generalized Process Networks–II. Algorithms. Computers & Chemical Engineering, 12(7):689–703. BIBLIOGRAPHY 149

Kretsovalis, A. and Mah, R. S. (1987). Observability and Redundancy Classifi- cation in Multicomponent Process Networks. AIChE Journal, 33(1):70–82.

Kuehn, D. and Davidson, H. (1961). Computer Control. II. Mathematics of Control. Chemical Engineering Progress, 57:44–47.

Langmuir, I. (1916). The Constitution and Fundamental Properties of Solids and Liquids. Part I. Solids. Journal of the American Chemical Society, 38(11):2221– 2295.

Macchietto, S., Hewitt, G., Coletti, F., Crittenden, B., Dugwell, D., Galindo, A., Jackson, G., Kandiyoti, R., Kazarian, S., Luckham, P., Matar, O., Millan- Agorio, M., M¨uller,E. A., Paterson, W., Pugh, S., Richardson, S., and Wilson, D. (2011). Fouling in Crude Oil Preheat Trains: A Systematic Solution to an Old Problem. Heat Transfer Engineering, 32(3-4):197–215.

Madron, F. (1985). A New Approach to the Identification of Gross Er- rors in Chemical Engineering Measurements. Chemical Engineering Science, 40(10):1855–1860.

Madron, F. (1992). Process Plant Performance: Measurement and Data Process- ing for Optimization and Retrofits. Ellis Horwood, New York, USA.

Mah, R. S., Stanley, G. M., and Downing, D. M. (1976). Reconciliation and Rectification of Process Flow and Inventory Data. Industrial & Engineering Chemistry Process Design and Development, 15(1):175–183.

Markowski, M., Trafczynski, M., and Urbaniec, K. (2013). Identification of the Influence of Fouling on the Heat Recovery in a Network of Shell and Tube Heat Exchangers. Applied Energy, 102:755–764.

Martini, A., Coco, D., Sorce, A., Traverso, A., and Levorato, P. (2014). Gross Error Detection Based on Serial Elimination: Applications to an Industrial Gas Turbine. In Proceedings of ASME Turbo Expo 2014: Turbine Technical Conference and Exposition, volume 3A, page V03AT07A024.

Mullins, O. (2008). Review of the Molecular Structure and Aggregation of As- phaltenes and Petroleomics. Spe Journal, 13(1):48–57. 150 BIBLIOGRAPHY

Narasimhan, S. and Jordache, C. (2000). Data Reconciliation & Gross Error Detection: An Intelligent Use of Process Data. Gulf Publishing Co., Texas, USA.

Narasimhan, S. and Mah, R. S. H. (1987). Generalized Likelihood Ratio Method for Gross Error Identification. AIChE Journal, 33(9):1514–1521.

Nasr, M. and Givi, M. (2006). Modeling of Crude Oil Fouling in Preheat Exchang- ers of Refinery Distillation Units. Applied Thermal Engineering, 26(14):1572– 1577.

Ozyurt,¨ D. B. and Pike, R. W. (2004). Theory and Practice of Simultaneous Data Reconciliation and Gross Error Detection for Chemical Processes. Computers & Chemical Engineering, 28(3):381–402.

Pai, C. C. D. and Fisher, G. D. (1988). Application of Broyden’s Method to Reconciliation of Nonlinearly Constrained Data. AIChE Journal, 34(5):873– 876.

Panchal, C. and Huangfu, E.-P. (2000). Effects of Mitigating Fouling on the Energy Efficiency of Crude-oil Distillation. Heat Transfer Engineering, 21(3):3– 9.

Panchal, C., Kuru, W., Liao, C., Ebert, W., and Palen, J. (1999). Threshold Conditions for Crude Oil Fouling. In Bott, T., Melo, L., Panchal, C., and Somerscales, E., editors, Understanding Heat Exchanger Fouling and Its Miti- gation, pages 273–282. Begell House.

Polley, G., Wilson, D., Yeap, B., and Pugh, S. (2002). Evaluation of Laboratory Crude Oil Threshold Fouling Data for Application to Refinery Pre-heat Trains. Applied Thermal Engineering, 22(7):777–788.

Polley, G. T., Wilson, D. I., Pugh, S. J., and Petitjean, E. (2007). Extraction of Crude Oil Fouling Model Parameters from Plant Exchanger Monitoring. Heat Transfer Engineering, 28(3):185–192.

Rodr´ıguez, C. (2005). Fouling Mitigation Strategies for Heat Exchanger Networks. PhD thesis, The University of Manchester. BIBLIOGRAPHY 151

Rodriguez, C. and Smith, R. (2007). Optimization of Operating Conditions for Mitigating Fouling in Heat Exchanger Networks. Chemical Engineering Re- search and Design, 85(6):839–851.

Romagnoli, J. A. and S´anchez, M. C. (1999). Data Processing and Reconciliation for Chemical Process Operations. Academic Press, California, USA.

Rosenberg, J., Mah, R. S. H., and Iordache, C. (1987). Evaluation of Schemes for Detecting and Identifying Gross Errors in Process Data. Industrial & En- gineering Chemistry Research, 26(3):555–564.

S´anchez, M. and Romagnoli, J. (1996). Use of Orthogonal Transformations in Data Classification-reconciliation. Computers & Chemical Engineering, 20(5):483–493.

S´anchez, M., Romagnoli, J., Jiang, Q., and Bagajewicz, M. (1999). Simultaneous Estimation of Biases and Leaks in Process Plants. Computers & Chemical Engineering, 23(7):841–857.

Scarborough, C., Cherrington, D., Diener, R., and Golan, L. (1979). Coking of Crude Oil at High Heat Flux Levels. Chemicanl Engineering Progress, 75(7):41– 47.

Serth, R. W. and Heenan, W. A. (1986). Gross Error Detection and Data Rec- onciliation in Steam-metering Systems. AIChE Journal, 32(5):733–742.

Shetty, N., Deshannavar, U. B., Marappagounder, R., and Pendyala, R. (2016). Improved Threshold Fouling Models for Crude Oils. Energy, 111:453–467.

Shetty, N., Ramasamy, M., and Pendyala, R. (2014). Effect of Bulk Temperature on Formation of Crude Oil Fouling Precursors on Heat Transfer Surfaces. In Ahmed, I., editor, Process and Advanced Materials Engineering, pages 482–485. Trans Tech Publications Ltd.

Somerscales, E. (1999). Fundamentals of Corrosion Fouling. British Corrosion Journal, 34(2):109–124.

Somerscales, E. F. C. (1990). Fouling of Heat Transfer Surfaces: An Historical Review. Heat Transfer Engineering, 11(1):19–36. 152 BIBLIOGRAPHY

Swartz, C. (1989). Data Reconciliation for Generalized Flowsheet Applications. In 197th National Meeting American Chemestry Society.

V´aclavek, V. (1969). Studies on System EngineeringIII. Optimal Choice of the Balance Measurements in Complicated Chemical Engineering Systems. Chem- ical Engineering Science, 24(6):947–955.

V´aclavek, V. and Louˇcka, M. (1976). Selection of Measurements Necessary to Achieve Multicomponent Mass Balances in Chemical Plant. Chemical Engi- neering Science, 31(12):1199–1205.

Wang, Y., Yuan, Z., Liang, Y., Xie, Y., Chen, X., and Li, X. (2015). A Review of Experimental Measurement and Prediction Models of Crude Oil Fouling Rate in Crude Refinery Preheat Trains. Asia-Pacific Journal of Chemical Engineering, 10(4):607–625.

Watkinson, A. (1988). Critical Review of Organic Fluid Fouling. Technical report, Argonne National Laboratory.

Watkinson, A. (2007). Deposition From Crude Oils in Heat Exchangers. Heat Transfer Engineering, 28(3):177–184.

Watkinson, A. P. (1992). Chemical Reaction Fouling of Organic Fluids. Chemical Engineering & Technology, 15(2):82–90.

Watkinson, A. P. and Wilson, D. (1997). Chemical Reaction Fouling: A Review. Experimental Thermal and Fluid Science, 14(4):361–374.

Weston, S. (2014). Parametric Regression of Tube-side and Shell-side Fouling Rates in Crude Oil Preheat Trains. Master’s thesis, The University of Manch- ester.

Wiehe, I. A. and Kennedy, R. J. (1999). The Oil Compatibility Model and Crude Oil Incompatibility. Energy & Fuels, 14(1):56–59.

Wilson, D., Polley, G., and Pugh, S. (2002). Mitigation of Crude Oil Preheat Train Fouling by Design. Heat Transfer Engineering, 23(1):24–37.

Yeap, B., Wilson, D., Polley, G., and Pugh, S. (2004). Mitigation of Crude Oil Re- finery Heat Exchanger Fouling Through Retrofits Based on Thermo-Hydraulic Fouling Models. Chemical Engineering Research and Design, 82(1):53–71. BIBLIOGRAPHY 153

Young, A., Venditti, S., Berrueco, C., Yang, M., Waters, A., Davies, H., Hill, S., Millan, M., and Crittenden, B. (2011). Characterization of Crude Oils and Their Fouling Deposits Using a Batch Stirred Cell System. Heat Transfer Engineering, 32(3-4):216–227. Appendix A

Corrigendum for Publication 2

During the publication process of the scientific article presented in Chapter 4, a particular set of formatting mistakes were found. These mistakes are contained in the published version of the paper and have been corrected in the Corrigendum article presented in this appendix. The details of the publication of this article are detailed below, followed by the article itself. Note that the set of errors shown in this document do not affect the ending results presented in the original publication, but it was found necessary to correct them in order to avoid any confusion from the authors to the reader.

 Title: Corrigendum to “Data Reconciliation and Gross Error Detection in Crude Oil Pre-heat Trains Undergoing Shell-side and Tube-side Fouling Deposition [Energy 183 (2019) 368e384]

 Authors: Jos´eLoyola-Fuentes and Robin Smith

 Journal: Energy

 Year: 2019

 DOI: www.doi.org/10.1016/j.energy.2019.06.119

154 Energy xxx (xxxx) xxx

Contents lists available at ScienceDirect

Energy

journal homepage: www.elsevier.com/locate/energy

Corrigendum Corrigendum to “Data reconciliation and gross error detection in crude oil pre-heat trains undergoing shell-side and tube-side fouling deposition”[Energy 183 (2019) 368e384]

* Jose Loyola-Fuentes , Robin Smith

Centre for Process Integration, School of Chemical Engineering and Analytical Science, The University of Manchester, M13 9PL, UK

The authors regret the following points, needed for correction: Fig. 4 [Page 4 in article]: The figure does not show any of the borders that were shown originally. Please refer to the figure below for the corrected version.

Appendix, Equation A.7 [Page14 in article]: Please ignore the ‘x’ sign, as this would suggest a cross product, rather than a simple matrix multiplication. All elements of the equation should remain in the same row.

2 3

2 3 6 T ; 7 6 c i 7 ε þð þ Þð Þ 6 7 6 yr 1 yr 1 yr yr 7 6 Tc;o 7 4 5 6 7 ¼ 0 C ðy 1Þþy C ðy 1Þy C y þðy 1ÞC y þðy 1Þ 6 T ; 7 r r r r r r r r r r r r 4 h i 5 Th;o

DOI of original article: https://doi.org/10.1016/j.energy.2019.06.119. * Corresponding aurhor. E-mail address: [email protected] (J. Loyola-Fuentes). https://doi.org/10.1016/j.energy.2019.07.159 0360-5442/© 2019 Elsevier Ltd. All rights reserved. 2 J. Loyola-Fuentes, R. Smith / Energy xxx (xxxx) xxx

Subscripts section in nomenclature [Page 16 in article]: The title says ‘Subscripts Matrix with negative entries’, which is not correct. The second part of the text corresponds to the first entry of the nomenclature list, described by the symbol ‘-’ as shown below. Subscripts. - Subscripts Matrix with negative entries. þ Subscripts Matrix with positive entries. The authors would like to apologise for any inconvenience caused.