Introduction

Numerical values are always affected by random errors plus gross errors (error that cannot be explained with statistical distribution). Gross errors are outliers (process leaks and malfunction) or bias (systematical offset). This paper presents the application of a mathematical tool, called the reconciliation method (RM). The latter is recommended to obtain reliable information about the studied process but gross errors have to be identified and eliminated before the procedure. This technique is used since 1961 in chemical engineering [1]. In 1980, the reconciliation method was applied to adjust material balancing of mineral processed data [2]. Later, Weiss and Romagnoli used this tool to better determine the regeneration cycle time of a reactor in an industrial case study [3]. Heyen and Kalitvebtzeff developed a RM optimization to reduce energy use in production plants [4]. Placido and Loureiro study the placement of new instruments to improve the estimation accuracy in ammonia plant units [5]. Schladt and Hu developed a rigorous model to estimate concentrations in a distillation column trough the reconciliation method [6]. In 2008, Lid and Skogestad  [7] used the RM method to assess the optimal operation of a catalytic naphtha reformer. Despite the proven performance of the method, few authors use it in refrigeration systems. In 2007, Bruno et al. applied the method to a hybrid solar/gas single/double effect absorption chiller [8]. In 2013, Martinez-Maradiaga et al. used the method for absorption refrigeration system to obtain performance calculations that are in agreement with the laws of conservation [9]. In 2015, an optimization of redundant measurements location for thermal capacity of power unit steam boiler using data reconciliation method is performed [10]. Finally, a data reconciliation based framework for integrated sensor and equipment performance monitoring in power plants is provided by [11].

Some authors predict unmeasured values (flowrate, oil fraction…) simply by minimizing the sum of the residue of each component [12]. A more complete and accurate method taking into account measurements’ redundancy and accuracy of sensors exists: the reconciliation method corrects each measurement as little as possible, taking its precision into account (assuming a Gaussian distribution around the measured value), to satisfy all constraints and to evaluate the most probable physical state [9]. Redundancy is obtained by having two sensors measuring the same variable and/or variable that can be obtained through balance equations (heat balance, residue, mass balance, thermodynamic state of equilibrium…). This redundancy allows correcting measurements while non-redundant measurements will remain untouched. The RM method does not correct data to better fit a model but simply imposes constrains (physical laws) to improve the dataset intrinsic quality.

Reconciliation method should be used for multiple reasons. First, without this method, it is impossible to close energy and mass balances exactly, which is needed for predictive models. Also, it allows determining some unknowns that are not or that cannot be measured precisely (oil fraction, refrigerant mass flow rate…). Moreover, it fully exploits the collected measurements with redundancy. Finally, it allows to know which sensor should be checked or replaced if necessary.

Mathematically, the minimization of (1) allows to evaluate corrected (or reconciled) values (c i ) (and eventually additional unknowns) based on the measured values (u i ) and on their standard deviation (σ i ) with regard to a certain number of constraints (ψ) by minimizing (2) with Lagrange formalism (λ is a Lagrange multiplier).

$$\varphi (u_{i} ) = \mathop \sum \limits_{i = 1}^{n} \frac{{(u_{i} - c_{i} )^{2} }}{{\sigma_{i}^{2} }}$$
(1)
$$\alpha = \mathop \sum \limits_{i = 1}^{n} \frac{{(u_{i} - c_{i} )^{2} }}{{\sigma_{i}^{2} }} + \mathop \sum \limits_{j = 1}^{m} \lambda_{j} \psi (c_{i} ,z_{k} )$$
(2)

Validation of reconciliation

Data reconciliation is based on two main assumptions. On the one hand, most influent physical phenomena should be correctly described. The first assumption is reached using the validation of measurements. The validation of measurements is achieved by checking heat balances on exchangers, on compressors and on expanders, cross-checking of pressures…

On the other hand, it assumes a Gaussian distribution of the errors. This needs to eliminate gross error (outliers). In this paper, a Kriging method (or Gaussian process regression) is used in this aim [13]. Other advanced methods exist to treat gross error in data reconciliation: Fair, Welsch, Hampel, Cauchy, logistic, Lorentzian, and Quasi-Weighted Least Square, for example [1416].

Finally, to check the confidence of the corrected values, heat balances and residues should be verified a posteriori and the weighted deviation (w i ) should be evaluated (3) to give the confidence level of the correction.

$$w_{i} = \frac{{|u_{i} - c_{i} |}}{{\sigma_{i} }}$$
(3)

The weight is a random variable following a Chi-squared distribution with γ, the degree of freedom. The degree of freedom is equal to the number of reconciled variables minus the number of constraints (=the redundancy level). For example, the confidence level of the RM with a redundancy level of 5, a weight of 1.145 and 21 measured variables is 95 %.

Global methodology

A step by step global methodology can therefore be proposed (Fig. 1). First, the measurements have to be validated: energy and mass balances have to be verified taking into account the propagation of errors due to measurement devices. This step insures the quality of the data, but is also necessary to apply correct physical constraints (2) in the reconciliation method. Following this, the elimination of irrelevant points (outliers) is mandatory to eliminate gross error (which is mandatory for RM). Finally, the reconciliation method can be applied and validated through the weights and confidence level (3).

Fig. 1
figure 1

Global methodology to threat experimental data

Description of the study case

The reconciliation method is applied in the case of a reversible heat pump/organic Rankine cycle (HP/ORC) unit. This unit is a modified heat pump that is able to work as an ORC by reversing its cycle. The test bench is fully described with all its components and sensors by Dumont et al. [17, 18].

The system represented in Fig. 2 presents 21 different sensors (1 mass flow rate sensor (refrigerant), 2 volumetric flow sensors (water), 4 pressure sensors, 2 differential pressure sensors, 10 thermocouples, 1 density sensor and 1 wattmeter). Measurements are performed in steady–state conditions and averaged on a 5-min basis [18]. The oil mass fraction is not measured despite of its strong influence on the results. The reconciliation method allows to evaluate it. The method is presented in the case of the organic Rankine cycle operation.

Fig. 2
figure 2

Hydraulic scheme of the test-rig (Dumont [17])

Application of the method to the case study

Model: assumptions and constraints

First, a zero pressure drop is assumed in the pipes. The redundancy on pressure measurements leads to the first constraint (4).

$$\Delta P_{1} = P_{4} - P_{1}$$
(4)

Also, the first principle of thermodynamic is applied to the expander (5) with the following hypothesis: perfect mixture between oil and refrigerant, kinetic and potential energy neglected and ambient losses are evaluated with (6). Two unmeasured variables are added [ambient temperature (T amb) and heat transfer coefficient between the expander and the ambient (U)] because they play an important role in the heat balance of the expander.

$$\dot{W}_{\text{exp,el}} = \dot{m}_{r} \left( {h_{\text{exp,su}} - h_{\text{exp,ex}} } \right) + m_{\text{oil}} .c_{{p,{\text{oil}}}} .\left( {T_{{\exp ,{\text{su}}}} - T_{{\exp ,{\text{ex}}}} } \right) - \dot{Q}_{{\exp ,{\text{amb}}}}$$
(5)
$$\dot{Q}_{\text{exp,amb}} = A.U.\left( {T_{\exp ,m} - T_{\text{amb}} } \right)$$
(6)

The density measurement allows to evaluate the mass conservation at the inlet of the pump (7).

$$\frac{1}{{\rho_{\text{meas}} }} = \frac{{x_{\text{oil}} }}{{\rho_{\text{oil}} }} + \frac{{(1 - x_{\text{oil}} )}}{{\rho_{r} }}$$
(7)

Finally, heat balances are performed on the evaporator (8) and on the condenser (9) neglecting ambient heat losses and supposing a perfect mixture of oil and refrigerant.

$$m_{{{\text{ev}},w}} .c_{p,w} .\left( {T_{{{\text{ev}},w,{\text{su}}}} - T_{{{\text{cd}},w,{\text{ex}}}} } \right) =\; \dot{m}_{r} \left( {h_{\text{ev,ex}} - h_{\text{ev,su}} } \right) +\, \dot{m}_{\text{oil}} .c_{{p,{\text{oil}}}} .\left( {T_{\text{ev,ex}} - T_{\text{ev,su}} } \right)$$
(8)
$$m_{{{\text{cd}},w}} .c_{p,w} .(T_{{{\text{cd}},w,{\text{ex}}}} - T_{{{\text{cd}},w,{\text{su}}}} ) = m_{r} \left( {h_{\text{cd,su}} - h_{\text{cd,ex}} } \right) + m_{\text{oil}} .c_{{p,{\text{oil}}}} .(T_{\text{cd,su}} - T_{\text{cd,ex}} )$$
(9)

Assuming these assumptions, 5 constraint equations allows exploiting the redundancy of the measurements.

Optimization function, derivatives and redundancy level

In this case study, the number of unknowns is equal to 29: there are 21 measurements to reconcile, plus two additional variables (expander heat transfer coefficient and ambient temperature), plus the oil fraction and 5 Lagrange multipliers (2). 29 equations are needed: the 5 physical constraints (4, 5, 79), 23 equations resulting from the partial derivatives regarding each reconciled variable to minimize (2) and 1 additional coming from the minimisation of (1). The solution is computed with EES solver coupled with the Coolprop library [19] (which allows to evaluate derivatives of thermodynamic properties). The redundancy level is simply equal to the number of constraints in this case, 6.

Methodology

The applied methodology is conducted using the following 6 steps:

  1. 1.

    The corrected values are imposed to be equal to measurements (guess value).

  2. 2.

    The standard deviation for each sensor is computed following sensor datasheet.

  3. 3.

    The weights are evaluated through Eq. 3.

  4. 4.

    The confidence in the reconciliation method is evaluated (see “Validation of reconciliation”).

  5. 5.

    Physical constraints are imposed and partial derivatives of Eq. 2 are computed and imposed equal to zero. At this step, guess values for corrected values have to be removed.

  6. 6.

    Finally, the minimization of Eq. 1 allows to evaluate unmeasured variable(s).

Results

Reconciliation method

41 steady-state measurement points are reconciled. The results obtained from the reconciliation method are detailed for one point in Table 1. For each measurement, the original value, the reconciled value, the weight (3) and the confidence level are given. The ambient temperature (T11) and the heat exchange coefficient of the expander (U) are not measured but estimated with a large standard deviation to evaluate (6). The method applied to a typical point (Table 1) leads to an oil fraction of 6.2 % which is a realistic value compared to the amount of oil and refrigerant injected into the system. Logically, measurements with high accuracy (i.e. low standard deviation) are very slightly (or not at all) corrected. The weighted correction is not really a reliable assessment of confidence since correction will be zero for non-redundant variables. They will not be corrected and results are, therefore, optimistic in Table 1. A reliable criterion is to use the value of the objective function, φ (Eq. 1), that should follow a Chi-square distribution [4]. In this case, the confidence of the reconciliation method reached a probability of 73 %.

Table 1 Results from reconciliation method for one measurement point. Each measurement is detailed in Fig. 2

Improvement in the validation of semi-empirical models

The efficiency of this method is proven by comparing the outputs of steady-state models of the different components with and without the reconciliation method. For the sake of conciseness, the models are not presented in this paper. Exchangers are subdivided into three zones and modeled by means of the ε-NTU method [20]. The expander is modeled through a semi-empirical model taking into account internal leakages, ambient losses, under- or over-expansion losses and electro-mechanical losses [21]. A comparison between reconciled and non-reconciled measurements is performed with the prediction of the pinch-point in the evaporator in Fig. 3.

Fig. 3
figure 3

Comparison of the prediction of the model calibrated with raw data and versus the model prediction with reconciled data

The improvement obtained with the RM for the evaporator pinch-point prediction is obvious on this graph. To quantify this improvement, results are compared in terms of the normalized root mean square deviation—NRMSD (10). x pred corresponds to the prediction of the model and x meas corresponds to the measurement value (or to the reconciled value in the case of the RM).

$${\text{NRMSD}} = \sqrt {\frac{{\mathop \sum \nolimits_{s = 1}^{n} (x_{{{\text{meas}},s}} - x_{{{\text{pred}},s}} )^{2} }}{n}} .\frac{1}{{(x_{ \hbox{max} } - x_{ \hbox{min} } )}}$$
(10)

Table 2 compares the NRMSD for different models with and without reconciliation method. These results show that reconciled values are closer to semi-empirical model predictions than non-treated measurements. It proves the efficiency of the method and that it should be considered more often when dealing with experimentation.

Table 2 Comparison of the normalized root mean square deviation of the prediction of semi-empirical models with and without the reconciliation method

Conclusion

Experimental data are often the result of long and costly experimentations. Many times, measurements are used directly without (or with few) analysis and treatment.

This paper presents a simple mathematical tool to threat and enhance the quality of measured data. This reconciliation method is described and a global methodology including validation of measurement, elimination of irrelevant points and validation of the reconciliation method is proposed.

The efficiency of the global methodology is proven with experimental data of a reversible HP/ORC unit. The normal root mean square deviation on model predictions is significantly lower when using reconciled values for model calibration. This proves the validity of the method.

The presented methodology is simple and fast to perform. More advanced methodologies exist but are more complex and require more computational time [12, 13]. Moreover, advanced physical phenomena such as oil solubility could be taken into account for more accurate results.