*2.3. Test Parameters*

All recorded test parameters are listed in Table 2. The table includes tag names, parameter names, parameter units and specified sensor range. The values for VT.2 and VT.3 are specified values sent to the valves by the controllers, not the actual measured position of the valves.


**Table 2.** Recorded parameters.

As mentioned in Section 2.2, three Coriolis flow meters are used to adjust inlet flow rate and water cut, monitor phase purities, determine the amount of water extracted from the MPPS prototype, and the purity of the extracted water. The WC in the respective flow lines is determined by

$$\text{NCC}\_{i} = \frac{\rho\_{i} - \rho\_{o}}{\rho\_{\text{IV}} - \rho\_{o}} \ . \tag{1}$$

Here, *ρ<sup>i</sup>* is the measured density at DT.1/2/3, while *ρ<sup>w</sup>* and *ρ<sup>o</sup>* are the pre-determined temperature-corrected densities of the water and Exxsol D60, respectively. For pure-phase feed streams, WC1 should be equal to 100% while WC2 should be equal to 0%. From calculated WC and measured flow rates, the actual WC in the multiphase transport line (WC*in*) is calculated as

$$\text{WC}\_{\text{in}} = \frac{\text{WC}\_1 \dot{Q}\_1 + \text{WC}\_2 \dot{Q}\_2}{\dot{Q}\_1 + \dot{Q}\_2},\tag{2}$$

where *Q*˙ <sup>1</sup> and *Q*˙ <sup>2</sup> are the water and oil flow, respectively, before mixing. When running experiments, *Q*˙ <sup>1</sup> and *Q*˙ <sup>2</sup> are adjusted such that the desired total flow and WC*in* are reached.

The amount of water extracted from the MPPS prototype is determined by the extraction rate (ER). The ER is the flow rate through the water extraction line divided by the flow rate in the water feed line:

$$\text{ER} = \frac{\dot{Q}\_3}{\dot{Q}\_1} \,\prime \tag{3}$$

where *Q*˙ <sup>3</sup> is the flow at the water outlet of the MPPS.

As the test loop is a closed system, the water and Exxsol D60 phases will be contaminated over time. Microscopic droplets of water will be dispersed in the oil and vice versa. In order to give a performance measurement that is independent of occurring contamination, the WC ratio is calculated. The WC ratio is equal to the WC at the water extraction line (WC3) divided by the WC at the water feed line (WC1):

$$\text{WC}\_{\text{T}} = \frac{\text{WC}\_{3}}{\text{WC}\_{1}}.\tag{4}$$

A WC*r* equal to 100% means that the extracted water from the MPPS prototype is of equal quality to the water, leaving the baseline separator prior to being mixed with the oil. A WC*<sup>r</sup>* of 100% is thus the upper limit on the purity that can realistically be achieved by the MPPS prototype.

#### *2.4. System Identification*

A dynamic model of the system is very helpful when designing controllers. A classical way to identify the dynamic relations between a manipulated variable and a control variable is to perform a step response experiment and calculate the transfer function. In this work, the procedure from [16] was followed, and it was assumed that the dynamic model between each input and output could be described by a first-order plus time delay transfer function on the form

$$\frac{y}{u} = G(s) = \frac{k\varepsilon^{-\theta s}}{\tau s + 1},\tag{5}$$

where *y* is the output, *u* is the input, and *s* is the Laplace variable. The transfer function variables describing the dynamic response, *k*, *τ* and *θ* are of special interest. These variables represent the plant gain, the time constant and the time delay, respectively. The plant gain provides the steady-state output of the plant, for a specific input, and is given by

$$k = \frac{\Delta y}{\Delta u} \,. \tag{6}$$

The time constant, *τ*, is the time it takes the output to reach 63% of the steady-state value, and the time delay, *θ*, is the amount of time it takes the input to cause a reaction on the output.

The step response experiments were performed with one valve at a time, with the other valve in a fixed position, and at a fixed inlet flow rate and inlet WC. The valve openings, inlet flow rate and inlet WCs are listed in Table 3.

Some of the measurements contained significant measurement noise, hence the measured values where filtered using a 1st order Butterworth filter before the parameter analysis was performed. The transfer function between each input and output was then calculated and validated by comparing it to the original response. If any deviations were present, the transfer function variables were tuned manually to improve the fit.


**Table 3.** Inlet conditions and changes in valve openings used in step response experiments.

The step response experiments were performed on the two inputs VT.2 and VT.3, and three measurements were chosen as candidate CVs. The pressure PT.1 is a necessary CV for safety reasons. A measurement that gives a direct indication of the separator efficiency is the the water cut ratio WC*r*, and hence this is also a candidate CV. The laboratory is not equipped with a level measurement sensor, instead the pressure drop dPT.2 over the incline is used for this purpose. The level is often used as an CV in previous work, as mentioned in the Introduction, and will also be a candidate CV in this work.

From the step response experiments, the following transfer functions were identified:

$$\frac{\text{WC}\_{\text{r}}}{\text{VT.2}} = \text{G}\_{1}(s) = \frac{0.2423 \epsilon^{-10s}}{20.9s + 1},\tag{7}$$

$$\frac{\text{PT.1}}{\text{VT.2}} = \text{G2}(s) = \frac{0.0026e^{-10s}}{14.1s + 1},\tag{8}$$

$$\frac{\text{dPT.2}}{\text{VT.2}} = \text{G}\_{\text{3}}(s) = \frac{-0.0739e^{-10s}}{23.1s + 1},\tag{9}$$

$$\frac{\text{WC}\_r}{\text{VT.3}} = \text{G}\_4(s) = \frac{-0.5962\epsilon^{-4s}}{2s+1},\tag{10}$$

$$\frac{\text{PT.1}}{\text{VT.3}} = G\_5(s) = \frac{0.0156 \epsilon^{-4s}}{8.3s + 1},\tag{11}$$

$$\frac{\text{dPT.2}}{\text{VT.3}} = G\_6(s) = \frac{0.2722e^{-4s}}{13.2s+1}.\tag{12}$$

A comparison between the measured response, the filtered response, and the transfer function response is shown in Figure 4. Here, we see that some of the responses could be better described by a second-order transfer function. In particular, the transfer functions between VT.2 and the different outputs (note the second order dynamics in WC*<sup>r</sup>* in Figure 4a not captured by *G*1(*s*) and the overshoot in dPT.2 in Figure 4e not captured by *G*3(*s*)). However, for the control study in this work, it is assumed that a first order model is sufficient. The fluctuations present are purely caused by measurement and process noise.

#### *2.5. Control Structure Analysis*

The separator is a multiple input multiple output (MIMO) system with two inputs and several possible outputs. It is not straightforward to pair an input with an output, and hence a relative gain array (RGA) analysis ([17], Section 3.4) was performed. The RGA provides a measure of interactions between the inputs and outputs and [17,18] recommends pairing inputs and outputs such that the rearranged system has an RGA matrix close to identity. Furthermore, negative steady-state RGA elements should be avoided. The RGA for a square system on the form

$$y = G(s)u\tag{13}$$

is found by calculating the element-wise matrix product

RGA(*G*) = *G*0*G*−*<sup>T</sup>* <sup>0</sup> , (14)

where *G*<sup>0</sup> = *G*(0) is the steady-state transfer function matrix of *G*(*s*) in Equation (13).

**Figure 4.** Step response comparison between measured signal, filtered signal and transfer functions.

Another parameter to consider when investigating the pairing of CVs and MVs is the Niederlinski index (NI) ([18], Section 2.2.1)

$$\text{NI} = \frac{\det\left[G(0)\right]}{\prod\_{i=1}^{n} g\_{ii}(0)},\tag{15}$$

where *gii* are the diagonal elements of *G*(0). If the open-loop system is stable (which is the case here), one should select pairings corresponding to positive NI values [19]; otherwise, the closed-loop system

will be unstable ([18], Th. 1). The RGA matrices and the NI for the separator is shown in Table 4. From the RGA analysis, it is clear that VT.2 should be paired with WC*<sup>r</sup>* or dPT.2, and VT.3 with PT.1, as this corresponds to the pairing closest to 1. The NI is positive for both possible pairings, hence no pairing will lead to an unstable system.


**Table 4.** Relative gain array (RGA) and Niederlinski index (NI) for the separator.

#### *2.6. Controller Design*

A multivariable system, such as the one investigated here, could benefit from a multivariable control scheme. However, since this is an initial control study, the developed controllers are decoupled, single-loop controllers.

#### 2.6.1. PI Control

A PI controller has the form

$$
\mu(s) = k\_{\varepsilon} \left( 1 + \frac{1}{\tau\_{I^{\rm S}}} \right) (r - y), \tag{16}
$$

where *kc* is the proportional gain, *τ<sup>I</sup>* is the integral time in seconds, *r* is the reference and *y* is the measured output to be controlled. PI controllers are developed for the separator by applying the SIMC tuning rules [16]. The SIMC tuning rules states that the proportional gain and integral time of the PI controller should be chosen as

$$k\_c = \frac{1}{k} \frac{\tau}{\tau\_c + \theta'} \tag{17}$$

$$
\pi\_l = \min\left(\pi\_\prime \left(\pi\_\varepsilon + \theta\right)\right),
\tag{18}
$$

where *kc* is the proportional gain, *τ<sup>I</sup>* is the integral time, and *τ<sup>c</sup>* is the desired closed-loop time constant, which is the only tuning parameter. For tight and robust control, Ref. [16] recommends choosing *τ<sup>c</sup>* = *θ*. Although the RGA analysis recommended a specific pairing of inputs and outputs, PI controllers are developed and tested for all configurations. The parameters used in the PI controllers are found in Section 3.2.1.

A derivative part could have been added to the controllers, but this would have required a measurement of the derivative of the CV. This is not available but could have been calculated numerically. However, as the control objective is to keep the CVs at steady-state, the derivative of the CV would be close to zero when operating at steady-state and the contribution would only be from the measurement noise. Derivative action is uncommon in process control applications where the plants are stable with overdamped responses and first-order dominant dynamics (which is the case here), since the performance improvement is usually too small compared to the added complexity [17,20].

#### 2.6.2. Adaptive Control

As an alternative to conventional PI control, a model reference adaptive controller (MRAC) ([21], Section 6.2.2) was implemented and tested for the two control configurations recommended by the RGA analysis, i.e., VT.3 controls PT.1 and VT.2 controls either WC*r* or dPT.2.

When using MRAC, the controller parameters are automatically updated such that the error between the measured variable and the output of a reference model is reduced. This could be very beneficial if the process parameters change over time or at different operating points, which may lead to poor control when using a controller with fixed gains. The MRAC structure is different from a PI controller structure, i.e., there is no proportional and integral gain in the MRAC, but rather two parameters that try to approximate a value that causes the closed-loop system dynamics to be equal to the reference model dynamics. Hence, using the proportional and integral gain of a PI controller as initial values in an MRAC is not necessarily helpful. A schematic of the MRAC is shown in Figure 5.

**Figure 5.** Model reference adaptive control (MRAC) schematic.

The MRAC has the form

$$u = -k\_a(t)y + l\_a(t)r,\tag{19}$$

where *ka*(*t*) and *la*(*t*) are time-varying gains, updated by the adaptive laws

$$
\dot{k}\_a = \gamma\_k \epsilon y \operatorname{sign}(k),
\tag{20}
$$

$$\dot{l}\_d = -\gamma\_l \varepsilon r \,\text{sign}(k),\tag{21}$$

where *γk*, *γ<sup>l</sup>* are adaptation gains, *y* is the measured value to be controlled, *r* is the reference and sign(*k*) is either 1 or −1. The error signal *e* = *y* − *ym*, where *ym* is the output of the reference model

$$
\dot{\mathbf{x}}\_{\text{m}} = a\_{\text{m}} \mathbf{x}\_{\text{m}} + b\_{\text{m}} r\_{\text{s}} \tag{22}
$$

$$y\_m = x\_{m\prime} \tag{23}$$

where *am* < 0 and *bm* are chosen by the operator and specify the desired closed-loop dynamics of the system.

The only system knowledge required by the MRAC is the sign of *k*. It can be shown ([21], Section 6.2.2) that, if *y* = *x* is the state in a linear system, the controller given by Equations (19)–(23) causes *y* → *ym* asymptotically for *γk*, *γ<sup>l</sup>* > 0. The parameters used in the MRAC are found in Section 3.2.2.

#### **3. Results**

In total, six experiments were carried out in the laboratory: four experiments with PI controllers and two experiments with MRAC. When using PI control, all control pairings were tested, but with MRAC only the pairings recommended by the RGA analysis was carried out.

#### *3.1. LabView Implementation*

The laboratory is controlled through a computer running LabView 2015 (National Instruments, Austin, TX, USA) on Windows 7 (Microsoft, Redmond, WA, USA) with an Intel i7 4770S (Santa Clara, CA, USA), 3.1 GHz processor and 16 GB RAM. The PI controllers could be readily implemented in the LabView 2015 block diagram through existing PI controller blocks.

The MRAC, however, had to be implemented using an add-on for LabView called MathScript Module. This module allows the user to write code, and execute it at each iteration of the LabView program. To calculate the MRAC input in Equation (19), the differential equations in Equations (20)–(22) must be solved. This was done using first-order Euler integration with a step length of 0.0001 s. A dead band was introduced to the adaptation algorithms, i.e., the adaptation was stopped if the error was less than 5% of the setpoint for dPT.2 and PT.1 and less than 0.5% for WC*r*.

#### *3.2. Controller Tuning*

#### 3.2.1. PI Controllers

A transfer function model is only an approximation of the real system dynamics. It was assumed that the transfer functions were of first order. The controller parameters may require re-tuning if the transfer function models differ significantly from the real dynamics (they may change with operating point and inlet conditions) or if nonlinearities in the valve openings are not considered. Furthermore, there are interactions between the control loops; hence, a multivariable controller would probably be a better choice. This, however, has not been studied in this work.

It was found during initial testing that the choice of *τ<sup>c</sup>* = *θ* was too aggressive for VT.2 and, hence, *τ<sup>c</sup>* = 30 s was chosen for this valve. For VT.3, *τ<sup>c</sup>* = *θ* could only be used when controlling WC*r*. Otherwise, *τ<sup>c</sup>* = 10 s was used. The controller parameters for the different PI controllers are listed in Table 5.


**Table 5.** PI controller parameters.

#### 3.2.2. Model Reference Adaptive Controller

It was found during testing in the laboratory that the initial values *ka*(0) and *la*(0) as well as the adaptation gains *γk*, *γ<sup>l</sup>* had to be chosen with care. This is due to the fact that time delays and measurement noise was ignored when the controller was derived. The adaptive controller parameters used are listed in Table 6.

**Table 6.** Model reference adaptive controller (MRAC) parameter values.


#### *3.3. Test Sequence and Control Objectives*

All experiments presented here were performed on the same day. Prior to each experiment, the lab was operated at nominal inlet conditions for 5 min, i.e., a flow rate of 350 L/min and 60% WC. The valves were manually set to VT.2 = 30% closed and VT.3 = 70% closed. This led to an initial pressure PT.1 ∼ 0.1 barg, an initial WC*<sup>r</sup>* ∼ 99% and an initial dPT.2 ∼ 1.9 mbar when the controllers were activated. The static pressure is initialized at 0.1 barg in order to see how the controllers, and especially the adaptive controllers, perform during an initial transient. A setpoint of 0.4 barg for PT.1 was necessary as the valve controlling the pressure could then operate in the middle of its range, and not saturate, when the inlet flow rate was high.

The inlet conditions were varied in order to emulate situations that may occur in a subsea oil/water separator. The inlet variables available for manipulation are the total liquid flow and the inlet WC. Table 7 shows the different inlet conditions and the scenarios they emulate.

The main control objectives in all experiments are to maintain the desired pressure PT.1 and to keep WC*<sup>r</sup>* as high as possible. The latter is important in order to ensure that the water quality is high enough for the downstream water cleaning equipment. A setpoint of 99% is chosen for the WC*r*. Looking only at WC*<sup>r</sup>* may, however, be misleading, since it says nothing about how much water is extracted. For this, the ER is used. It is important to maintain a high ER while maintaining a high WC*r*. If the ER is very low, almost no liquid is leaving the separator through the water outlet. In this case, the WC*r* may be high, but a lot of water is leaving through the oil outlet.

In Experiments 1 and 2, the WC*r* is controlled directly using either VT.2 or VT.3. In Experiments 3, 4 and 6, the dP between the bottom of the outlet incline and the top of the outlet incline is controlled. This serves as a proxy level measurement of the water level in the incline. When controlling the dP, and the level, by proxy, a buffer of water is built up in the incline, making the WC*r* more robust to inlet variations. It was found through image analysis that a dP of 2 mbar gave stable oil and water layers (see the Appendix A) and the buffer volume was assumed sufficient. Hence, this setpoint is used in the controllers. Figure 6 shows a sketch of this.

**Figure 6.** When controlling WC*r* directly, no buffer volume of water is present in the inclined section. Hence, oil breakthrough into the water outlet is more frequent when comparing to the dP/level control.


**Table 7.** Inlet conditions used in all experiments.
