1. Introduction
Oil and gas production will remain a vital energy source during the transition toward green energy. Besides greenhouse gas emissions, oil and gas production pollutes through accidental oil spills and the discharge of produced water (PW). Currently, the Oslo and Paris Commission’s (OSPAR) regulation for the discharge of PW with dispersed hydrocarbon is 30 mg/L (approximately 30 ppm). The oil-in-water (OiW) concentration is measured with the current OSPAR reference method, which is an offline lab-based method using a gas chromatography analyzer with a flame ionization detector (GC-FID) [
1]. Though most oil and gas installations complied with the concentration requirement on average, the annual hydrocarbon discharge in the North Sea amounted to 4000 tonnes between 2009 and 2019 [
2].
Besides the OSPAR recommendations, the Danish Environmental Protection Agency also restricts the total annual hydrocarbon discharge quantity to be below 222 tonnes. To meet this goal, each operator has a discharge permit specifying how much of the 222 tonnes they are allowed to discharge each year. The operators are required to install OiW measuring equipment and flow meters to determine the discharge quantity [
1]. With large quantities of PW, the total discharge can come close to the limit, as in 2016, where the dispersed discharge in the Danish region reached 200 tonnes [
3]. As the oil fields mature, more water is produced, which can lead to larger discharge quantities and, additionally, discharge legislation may become more stringent. One way to reduce the discharge is to improve the control of the separation process.
The offshore oil and gas separation installations typically consist of several three-phase separators, where the incoming well stream is separated into water, oil, and gas, after which each phase undergoes further treatment. Hydrocyclones are commonly deployed to further reduce the oil residuals in the PW leaving the water outlet of the separator vessels. A piping and instrumentation diagram (P&ID) of a typical configuration with a coupled three-phase separator and a hydrocyclone system is shown in
Figure 1.
The conical shape of the hydrocyclone wall delivers the centripetal force needed to generate a vortex flow, and the lighter dispersed oil droplets migrate toward the hydrocyclone’s axial center due to the density difference between oil and water. The accumulated oil-rich stream is rejected through the overflow outlet, while the cleaned water exits through the underflow outlet. The de-oiling performance of hydrocyclone is sensitive to the operating condition, particularly to the feeding flow rate, flow split, inlet concentration, oil droplet size distribution, etc. [
4,
5]. Some control system is thereby needed to maintain the hydrocyclone in a reasonable operating range to gain a high separation performance. One of the most common solutions is to maintain the flow split according to the vendor’s recommendation, where the flow split is defined as:
where
/
is the overflow/inflow volumetric flow rate. In practice, the flow split is controlled by the pressure drop ratio (PDR), which is defined as the ratios between the pressure drop from inlet to overflow and the pressure drop from inlet to underflow, i.e.,
As illustrated in
Figure 1, the control valve (
) located at the hydrocyclone’s overflow (oil-rich) outlet is used to control the PDR. The upstream separator’s water level is controlled by manipulating the control valve (
) located at the hydrocyclone’s underflow (water-rich) outlet. The PDR is used as one of the controlled variables (CVs) in the existing hydrocyclone control solutions [
5,
6]. However, a clear coupling between the level control loop and PDR control loop has been observed but not systematically handled, except for some empirical designs in the existing control solutions, mainly due to the fact that each control loop is developed as a standalone PID type of solution. Furthermore, by deploying online OiW monitors in the process, it has been discovered that the correlation of PDR with OiW concentration at the underflow outlet is not static, i.e., it is temporally dependent on the operating condition [
7,
8]. Thereby, a natural question occurs: how can the available OiW measurement be included in the hydrocyclone control to achieve direct control of hydrocarbon discharge in the produced water treatment (PWT) process? Though some operators have already installed online OiW monitors in their PWT processes, to the authors’ knowledge, there is no report about existing control systems that use online OiW measurements as a feedback signal yet.
One obstacle in getting an OiW-based control solution is the lack of some control-oriented model which can describe the key OiW separation dynamics inside the hydrocyclone in a reasonably precise manner. Computational Fluid Dynamics (CFD) modeling of hydrocyclone systems has been used extensively to design and simulate hydrocyclone systems, e.g., to investigate the effect of different geometries and operating conditions on separation efficiency [
9,
10,
11,
12,
13]. However, these CFD models are too complicated to support feedback control design, which often requires some simple control-oriented mathematical models.
Unlike complicated CFD-based models, Wolbert et al. [
14] presented a simple model describing the hydrocyclone’s separation efficiency using droplet trajectory analysis. The trajectories are defined by the tangential, axial, and radial velocity fields of the carrier (continuum) phase and the (dispersion) droplets’ phase, subject to the assumption of no droplet coalescence or break-ups. The hydrocyclone’s separation efficiency can then be calculated based on the grade efficiency if the droplet size distribution can be known. Similar approaches have been examined by Caldenley et al. [
15] and Amini et al. [
16], and some promising results have been reported on experimental steady-state data. Bram et al. [
17] combined a flow-resistance model with an extended version of the droplet trajectory model by Wolbert et al. [
14] such that the coefficients describing the axial velocity distribution are calculated by considering boundary conditions. The model showed some similarities with dynamic experimental data, and model performance improved after placing the OiW monitors closer to the sampling probes and actively controlling the sidestream flow rate to a constant set point [
4]. The model achieved a better match to the steady-state efficiency curve, but the dynamic characteristics still need to be improved. Vallabhan et al. [
6] presented a droplet trajectory model, where the axial velocity was modeled as a flow through a converging nozzle. This model was compared with a set of steady-state experimental data from Meldrum et al. [
5] and achieved a reasonable fit to the efficiency as a function of normalized inlet flow rate. The droplet size distribution was, however, unknown in Meldrum et al. [
5], and the authors assumed a droplet size distribution with diameters ranging from 5 to 60 µm. The authors approximated the separation efficiency for a fixed underflow valve opening degree as a second-order polynomial function of the overflow flow rate and derived mass balances to describe the separation dynamics. A PI controller was developed using the Skogestad internal model control (SIMC) tuning rules, and later, a sliding mode, feedback linearization, feedforward, cascade, and model predictive controller (MPC) were designed to track a constant discharge concentration reference in simulation [
6,
18,
19]. These models have proven to be capable of representing the steady-state efficiency behavior of hydrocyclones, but the dynamic features have not been validated or have been insufficient to describe the data [
4,
6]. The lack of validation is likely due to the difficulty of measuring the droplet size distribution in a reliable online manner.
Nonlinear black-box models have mainly been used for control-oriented modeling of PDR. Hansen et al. [
20] extended a state-space model from Durdevic et al. [
21] with a non-linear static function on the overflow valve input to make the PDR model valid in a wider operating range. The resulting Hammerstein model was used to design a MPC for the level and PDR, which could better comply with the level constraints than the
controller presented by Durdevic et al. [
21].
Motivated by these previous works, this paper intends to investigate models of the OiW separation dynamics inside the hydrocyclone system using Hammerstein–Wiener (HW) models based only on OiW concentration measurements. A similar idea can be found in our preliminary work in Jespersen et al. [
22], where only the separation efficiency is defined as the CV of the developed model. In this work, the possible CV can be extended as the hydrocarbon discharge concentration and discharge rate as well.
The scientific contributions of this paper consist of: (i) a nonlinear HW model framework is proposed to describe the separation dynamics inside a de-oiling hydrocyclone system based on online (inlet and underflow outlet) OiW measurements; (ii) a data-driven system identification approach is employed to identify the specific HW model coefficients based on a dedicated experiment; and (iii) the benefit and usefulness of the proposed model are validated by a (OiW-based) quality control solution developed by SIMC tuning rules based on the obtained model. The experimental validation of the proposed model and method shows the promising potential to include the online OiW measurement into the feedback control to achieve direct and improved discharge quality control, thereby further mitigating the marine environmental pollution caused by the discharge of PW.
2. Materials and Methods
The definition and the motivation for three different OiW-based CVs are given in
Section 2.1. The HW model structure and identification method are presented in
Section 2.2. The experimental facility and the experiment design are outlined in
Section 2.3, and the data preprocessing steps are described in
Section 2.4. Finally, the approach used to determine the model orders is presented in
Section 2.5.
2.1. Oil-in-Water Based Controlled Variables
To apply OiW-based control, CVs related to PW discharge must be defined. In the following, three potential CVs are presented.
Separation efficiency: PDR does not keep a constant proportional relationship with the separation efficiency, even subject to different steady-state conditions, while the time-varying (dynamic) separation efficiency, denoted as
, can be calculated using online OiW measurements as
where
/
represents the OiW measurement at the underflow/inlet location at time
t. Equation (
3) is also referred to as the reduced efficiency equation [
4]. A more realistic transient efficiency is given as
where
is the transition time for the droplets to pass through the hydrocyclone body. The OiW dynamics (utility and technology dependent [
23]) can only be considered relatively slow (e.g., in minutes) compared with the dynamics of droplets passing through the cyclone (e.g., in seconds), the
’s impact can be ignored or regarded as a part of the model uncertainties.
Oil discharge rate: with the sheer volume of PW, the total discharge of oil can still be large, even with extremely low discharge concentrations. By deploying an OiW instrument and a flow meter at the water outlet of the hydrocyclone system, the total oil discharge rate, denoted as
, can be defined as a new CV, i.e.,
where
is the instantaneous underflow OiW concentration measurement and
is the volumetric flow rate measured by the flowmeter.
Discharge concentration: the discharge concentration denoted as
is a natural choice of CV to comply with the discharge concentration limits, as studied in [
6,
8,
18,
19].
2.2. Hammerstein–Wiener Nonlinear Model
As shown in
Figure 2, a nonlinear HW model can be represented as a linear dynamic model sandwiched between two static/memory-less nonlinear functions. Without the output nonlinearity, the model simplifies to a Hammerstein model, while a linear dynamic system followed by a nonlinear static function is a Wiener model. Hammerstein, Wiener, and HW models have been widely used due to their relative simplicity and capability to describe many nonlinear dynamic systems [
20,
24,
25,
26].
The HW model proposed here is written as follows:
where
is the input,
is the output, and
indicates the measurement noise/output error. The vector functions
and
are the Hammerstein and Wiener static nonlinear functions, respectively, with parameter vectors
and
. The linear time-invariant dynamic model
is a transfer function (TF) matrix of dimension
and parameter vector
. In this work, it is assumed that both
and
are a stack of scalar polynomials of orders
and
, i.e.,
and
i.e., the input
and
have the same dimensions
, while
has the same dimension as outputs
.
The
jth output
of the linear system
is given by
where
is the input delay and
t denotes the sampling instances
. The numerator and denominator polynomials
and
are of the form:
and
where
is the number of zeros plus 1,
is the number of poles, and
is the backward shift operator.
The de-oiling system considered is a multiple-input single-output (MISO) system, resulting in the HW model structure shown in
Figure 3, where
and
are the commanded opening degrees of the control valves and the inlet OiW concentration
is regarded as a measured disturbance input.
The output
represents the three OiW-related CVs considered in this study, i.e., the separation efficiency
from Equation (
3), the discharge rate
given by Equation (
5), and the discharge concentration
.
The HW model identification can be carried out by minimizing the sum of squared prediction errors:
where
N is the number of samples in the estimation data set. Note that Equation (
14) is a mixed-integer minimization problem. To solve this problem, the model orders
,
,
,
and delay
are determined through an exhaustive search while the model coefficients
,
, and
are identified using the
nlhw function from MATLAB’s System Identification Toolbox [
27,
28,
29,
30,
31,
32].
2.3. Experimental Set-Up and Experiment Design
Through a number of research projects, a lab-scaled pilot plant has been built at AAU Esbjerg campus to mimic the separation and PWT systems deployed in real-life offshore platforms.
The pilot plant consists of a supply tank, a transportation pipeline, a pipeline riser, a three-phase separator system, a hydrocyclone system, and a membrane filtration system. The entire plant is “over-actuated and over-sensed” compared with a normal commercial installation. The pilot plant is very flexible and can be configured for different research/validation purposes. It consists of about 300 sensors and actuators, including some advanced sensing instruments, such as different online OiW monitors. The data used in this paper are generated from this pilot plant subject to conditions emulating changes in production due to, e.g., slugging [
33]. The different separation systems of the pilot plant are seen in
Figure 4, as well as the industrial hydrocyclone liners and the installed OiW monitors. A P&ID of the pilot plant, with the sensors and control loops used in this study, is given in
Figure 5. Note that the “membrane filtration system” seen in
Figure 4 is not part of this study.
The identification experiment uses the following PID controllers as seen in
Figure 5:
is the pressure controller for the separator with pressure measurement and control valve . The setpoint is 7 bara;
is the level controller in the separator with level measurement and control valve . The setpoint is 0.15 m;
is the PDR controller with control valve . The setpoint is 2;
is the production flow rate, and is the production flow controller that creates the varying inlet flow to the separator tank by manipulating the feed pump speed;
and are the sidestream flow controllers keeping the flow rates and through the OiW monitors within their recommended range with control valves and . The setpoint is 1.5 L/min.
The control valve
was kept closed during the experiment. The OiW monitors are installed at the hydrocyclone inlet and the underflow outlet, denoted in
Figure 5 as
and
. The OiW monitors are the fluorescence-based Turner Design TD-4100XDC that provide the OiW concentration measurement of the aromatic hydrocarbons. Besides aromatic oil, crude oil also consists of aliphatic hydrocarbons, and the main assumption for UV-fluorescence monitors is that the ratio of aromatic to aliphatic hydrocarbons remains constant [
23]. A detailed analysis and assessment of this technology and calibration procedure can be found in the following studies [
4,
34]. For more information about the pilot plant, see [
17]. The OiW emulsion used is a non-detergent SAE30 Midland engine oil in tap water. Due to safety concerns, open-loop identification experiments may be prohibited on a real PWT system. Instead, the identification data are collected in this semi-closed-loop configuration where the separator’s water level control loop and the hydrocyclone’s PDR control loop are active to keep the system within reasonable (safety) ranges, while the system is subjected to the flow rate disturbance illustrated in
Figure 6. The motivation behind this experiment is that some historical data of this form could be realistic with the legislative incentive to include online OiW discharge measurements.
2.4. Data Preprocessing
The data collected on the pilot plant is sampled at 100 Hz. A Fast Fourier Transform (FFT) of the inputs and output is shown in
Figure 7. The frequency of the input signal
is very low, i.e., below 0.05 Hz. The overflow valve command
consists of frequencies below 1 Hz. The concentration measurements contain some frequency content at 3.7 Hz for the inlet and 7.4 Hz for the underflow. For the valves, the command signals are used as the system inputs with the intention of including the possible valve dynamics inside the lumped model. The frequency of the overflow valve is higher than the underflow valve due to the aggressive PDR controller used in the set-up. An anti-aliasing filter is applied to minimize the influence of the high-frequency content. A sampling rate of 5 Hz was finally chosen based on the FFT analysis and trial-and-error fine-tuning by looking at how well the resampled data matched the input and output signals.
Since the system did not start from a steady state, the data were detrended by removing the means. The data were then divided into two segments used for identification and validation, as shown in
Figure 8.
The underflow valve varies over its full range; in some situations, it is fully open or almost fully closed. The overflow valve saturates when is open more than 50% and chatters when is nearly closed. These extreme regions are heavily nonlinear from a process point of view. When the inlet flow rate to the hydrocyclone is low, the vortex in the hydrocyclone cannot be sustained, and the separation efficiency can be reduced dramatically. When the flow rate becomes too high, droplet shearing can create smaller droplets that need more centripetal acceleration to be separated. Additionally, a higher inlet feeding flow rate reduces the pressure gradient from the underflow to the overflow and, thereby, the flow through the overflow, which can reduce the separation performance.
The degree of persistence of excitation was tested by finding the largest dimension of the covariance matrix of the input signal for which it is non-singular. Based on the experimental data, it is found that
is persistently excited with an order of 1125 for all inputs.
2.5. Model Order Determination
The TF model order and static polynomial order combinations are found using an exhaustive search approach. Some restrictions are imposed to reduce the computational load:
All Hammerstein functions are given the same order;
The TFs are required to be strictly proper, i.e., ;
The delay is assumed to be the unit sample delay, i.e., .
The search is carried out using the MATLAB (R2022B) parallel computing toolbox on a 64-core AMD Ryzen Threadripper PRO 3995WX.
4. Discussion
Modeling the efficiency/concentration ratio based on the control valves as inputs resulted in a validation fit of around 50%. Including the inlet concentration
as a measured disturbance improved the validation fit to approximately 64%, resulting in a better representation of the slow varying features of the validation data. Some of the fast changes in the data may be a result of neglecting the delay
in Equation (
4). This delay would be inherently time-varying, but identifying a mean delay to align the two measurements could possibly improve the data quality. Using
as an extra input besides the two MVs is a special case, since it appears as both an input and directly in the output. Therefore, it has a direct impact on the output but also the indirect dynamic response as the oil travels through the cyclone, affecting
. This is also reflected in the rise times of the step responses for the efficiency models, which are faster than the step responses of the discharge concentration model.
The static efficiency surfaces reflect the reduction in efficiency seen at large opening degrees of . This effect is caused by reducing the pressure gradient towards the overflow, leading to a smaller flow split. When is closed, and is open, theoretically, an efficiency of 100% would be expected. This would require to be zero, which does not happen in practice since the sidestream measurement of is taken before the location of . When is closed, there is still a flow split due to the side stream, and is some value less than , as the surfaces also indicate. When is closed, theoretically, the efficiency would be expected to be 0% in steady state for any nonzero opening degree of . This was, however, not observed on the surfaces.
Modeling the discharge concentration similarly resulted in a validation fit of around 64%. The steady-state underflow concentration surface has the inverse shape of the separation efficiency curves, and the valve opening degrees corresponding to minimum
are close to the location of the maximum efficiency point. This is also expected as the separation efficiency can be calculated from
and the concentration model output through Equation (
3). Pure TF models were insufficient as model candidates for efficiency and underflow concentration. The best model of separation efficiency was a Hammerstein model with 23 parameters, while the best model for the underflow concentration was a HW model with 24 parameters. Thus, a simpler model of separation efficiency can be obtained in this case by modeling the separation efficiency instead of the discharge concentration.
With the oil discharge rate as the output, the validation fit reached approximately 80%, which can be explained by the strong correlation between and that was used to calculate . This is also the reason for the faster step responses of and . The best TF model achieved estimation and validation fits 10% and 6% lower than the presented HW model, respectively. Therefore, even linear models could be considered model candidates for , thus trading some performance for model simplicity. The steady-state surface achieved minimum when closing and fully opening . The non-zero minimum value can be explained by the OiW sidestream configuration, which draws 1.5 L/min even when is closed.
The exhaustive search approach is useful but has the obvious drawback that the number of permutations quickly becomes large, even for a system with three inputs and a single output. To circumvent this issue, some constraints were put on the model set, such as equal order of the Hammerstein functions. In addition, the delay from each input to the output was ignored in this identification study. Identifying an optimal delay for each input could possibly improve the identification results as well. The dynamics of the models seem to be relatively slow compared with the typical retention time of a hydrocyclone, which is in the order of a couple of seconds. The slow responses could partly be due to the unidentified delays, but they could also stem from the model(s) being lumped, including valve dynamics, hydrocyclone dynamics, and the dynamics of the installed monitors.
The dynamics of the chosen identified models were relatively consistent; however, some of the models had very different dynamics and steady-state surfaces, which could indicate that the data could have been more informative. The fact that some models can have very different steady-state characteristics can be explained by the valve travel only exploring a subset of the whole MV space. This is a result of the active control loops, especially the PDR loop, which makes follow . Many different curves can fit this subset of the MV space, and model selection, therefore, has to rely more on the understanding of the process. The significant autocorrelation in the residuals indicates that there is some information the models cannot explain. The autocorrelation could potentially be improved by including a noise model in the linear system description or through improvements in the estimation experiment. In general, to improve the information in the estimation data, the following could be considered:
Increase independence of and . Keep the level control active, i.e., the control of , and vary in either open-loop or inject a disturbance signal;
Include data with less severe disturbance actuation, i.e., smaller variations in the inlet flow to the three-phase separator.
Reducing the correlation between and would improve the information on combinations of the MVs and, thereby, the uniqueness of the steady-state surface. In addition, the input can be designed to excite more dynamic features. With the level control active, the system can be kept in a safe condition. Operating in open-loop or injecting disturbances could impair the separation performance over the duration of the experiment. This increased discharge would either have to be stored or discharged, but the short-term increase in discharge could potentially be justified by the potential increase in performance with the new control system. However, keeping the control loops active is the simplest and the least intrusive way to obtain data for identification. Less severe variations in production rate would make operate less in the extremities and improve the amplitude variations in both and . The motivation behind the identification experiment is that some historical data of this form could be realistic on an offshore PWT facility with the legislative incentive to include online OiW discharge measurements.
The closed-loop simulation of the discharge concentration model shows that the model gives the expected behavior. However, the nonlinearity of the model means that the behavior changes depending on the opening degree of the valves, and a single PI controller would, therefore, not be sufficient. Overall, the selected models seem to describe the essential characteristics of the system from both a dynamic and static point of view.