A Valid Dynamical Control on the Reverse Osmosis System Using the CESTAC Method

The aim of this study is to present a novel method to find the optimal solution of the reverse osmosis (RO) system. We apply the Sinc integration rule with single exponential (SE) and double exponential (DE) decays to find the approximate solution of the RO. Moreover, we introduce the stochastic arithmetic (SA), the CESTAC method (Controle et Estimation Stochastique des Arrondis de Calculs) and the CADNA (Control of Accuracy and Debugging for Numerical Applications) library instead of the mathematical methods based on the floating point arithmetic (FPA). Applying this technique, we would be able to find the optimal approximation, the optimal error and the optimal iteration of the method. The main theorems are proved to support the method analytically. Based on these theorems, we can apply a new stopping condition in the numerical procedure instead of the traditional absolute error. These theorems show that the number of common significant digits (NCSDs) of exact and approximate solutions are almost equal to the NCSDs of two successive approximations. The numerical results are obtained for both SE and DE Sinc integration rules based on the FPA and the SA. Moreover, the number of iterations for various ε are computed in the FPA. Clearly, the DE case is more accurate and faster than the SE for finding the optimal approximation, the optimal error and the optimal iteration of the RO system.


Introduction
Mathematical models have an undeniable role in our life and we can express and analyze various problems in the form of linear and nonlinear models [1][2][3][4]. The RO model is one of the most important and practical processes in water treatment that can produce drinking water based on a semi-permeable membrane that removes unwanted molecules and larger particles such as ions from water [5]. In the RO, we must be able to overcome the osmotic pressure by applying pressure to the system to carry out the water treatment process. Therefore, we will have the ability to remove chemicals and biological substances such as bacteria from water [6]. As a result, the waste must remain in the pressurized area and the pure water is transferred to the other side. So in general, small molecules pass through the membrane and larger molecules, including ions, will not be allowed to pass [7]. Because of importance of the model, recently the RO model has been studied by many researchers that they implemented the RO model using different controls. In [8], the combination of the model predictive control and the dynamic matrix control was applied and in [9], the model-predictive control algorithms was studied directly. In [10], the more realistic control strategy based on the computer simulations and the mathematical modelling was illustrated. The proportional-integral-derivative controllers on the RO model were discussed in [11] and the quadratic dynamic matrix control strategy on the RO model was studied in [12].
Generally, we can formulate the RO phenomenon mathematically as an advectiondiffusion equation [13][14][15][16]. The following model is presented to forecast the condensation of salt solutions in semi-penetrable covers in the RO model as [13]: with α = Dh v 0 and the boundary conditions are and where space variables are demonstrated by x and y and Φ = Φ(x, y) shows the condensation of salt solutions in semi-penetrable covers at point (x, y). q is the velocity of water flow in semi-permeable distribution, D is the salt diffusion in water, h is the distance from semi-permeable boundary to canal center and finally φ 0 and v 0 are the concentration away from semi-permeable membranes and horizontal velocity at distance h from semiboundary. Moreover, we should note that q, D, h and v 0 are constant values. According to [13], solution of osmosis model (1) is in the following form where I = ∞ 0 e −v 3 vdv and Equation (4) is used to predict the condensation of salt solutions in semi-penetrable covers in the RO model. Solving the improper integral I by using analytical methods is difficult, so we need to solve this integral numerically. In [17], the authors applied the Gauss-Laquerre quadrature formulas directly. However, calculating the nodes and weights of the formula for large powers of polynomials leads to an increase of the arithmetic complexity of calculations.
The efficient combinations of analytical and numerical methods taking into account the integrand singularity are among the most efficient methods for both solution of integral equations and numerical integration, see [18,19]. Sinc functions with SE and DE precisions are among powerful and applicable rules to solve the mathematical and engineering problems. They can be combined with other method such as collocation method, Galerkin method and other methods. Moreover, we can apply these functions to solve the integral numerically. In [20] the Sinc-Galerkin method of the Crank-Nicolson-type was applied to solve the fourth-order partial integro-differential equation. The Fredholm integral equations were studied by the Sinc-Nystrom methods in [21] and the singular boundary value problems were solved using the Sinc-Collocation method. In [22], the Sinc approximation for exponentially decaying functions over the semi-infinite interval was discussed and in [23], the radial numerical integrations based on the Sinc function was studied. Finally, the numerical validation of the Sinc-collocation method for solving integral equations was illustrated in [24,25].
In some of mentioned studies and many other researches, when the authors want to show the accuracy of the numerical or iterative methods, they need applying the absolute error and in some cases absolute error with positive small value ε based on the FPA as where I and I n are exact and approximate solutions. We should note that condition (5) has many problem to be accepted. The first problem is depending of this condition to the exact solution I. But we can ask, if we have the exact solution, why do we need solving this problem numerically. The second problem is the value ε, because we do not know the optimal value of ε. For small values of ε we will have so many iterations without improving the accuracy of the method and for large values we will have one or two iterations without accurate results. Thus condition (5) is not an applicable termination criterion. In this study, instead of applying the mentioned condition the following condition is used where I n and I n+1 are two successive approximations of the numerical procedure and @.0 is the informatical zero [26][27][28][29][30]. This condition is based on the SA and the CESTAC method. It is more flexible and applicable than condition (5). For applying this termination criterion, instead of applying the mathematical softwares, the CADNA library will be used. This library is based on the C/C++, FORTRAN or ADA codes and it should be done on Linux operating system [31]. The CADNA library designed by Jean-Marie Chesneaux, Fabienne Jézéquel and Jean-Luc Lamotte in Laboratoire de recherche en informatique, Sorbonne University, Paris, France (LIP6) (https://www-pequan.lip6.fr) and they have many researches based on the CESTAC method and the CADNA library [27,32,33]. Using this method, we can find the optimal solution, optimal error and optimal iteration of the numerical method [31,32]. In this method, we should prove a theorem to show that the NCSDs between two successive approximations are almost equal to the NCSDs between exact and approximate solutions and it can support us to apply condition (6) instead of (5). The informatical zero sign @.0 shows that the NCSDs between I n and I n+1 are almost zero. Thus in this situation the numerical algorithm will be stopped and we can prevent from producing the extra iterations. Recently this method has been applied to validate the numerical results obtained form various methods for solving different problems such as numerical integration rules [34][35][36][37], interpolation [38], solving integral equations [24,25,[39][40][41], finding the optimal value of the regularization method [42,43], solving ill-posed problems [44], solving the load leveling problem [45] and solving fuzzy integrals [46,47]. Moreover, looking at the proposed approach we retain that the same approach could be useful in some innovative applications in microfluidics and nanofluidics [48]. The aim of this paper is to implement the CESTAC method to validate the numerical results of the RO model based on the Sinc integration rule with DE and SE precisions. Two main theorems of the CESTAC method are proved for DE and SE cases of the Sinc integration rule. Moreover, the numerical algorithms are presented for both cases based on condition (6). Thus using the obtained results we would be able to find the optimal solution, optimal iteration and the optimal error of the RO system.

Sinc Integration
In this section, we present some main definitions and details of the Sinc functions. For more details see [49][50][51]. We define the Sinc function on the real line as For f ∈ R and the step sizeh > 0, the Whittaker cardinal can be defined in the following form and we can write its l-th order as follows whenever this series convergence, and we define the M-th order of Sinc function as Now, we introduce the following function space: The Sinc function with single exponential decay can be defined as follows where and for constant value W which is independent from N we where N is a positive integer value.

Remark 1.
Let I be the exact solution and I SE N be the approximate solution obtained from SE-Sinc integration rule, then The Sinc function with double exponential decay is defined as where where N is a positive integer.

Remark 2.
Assume that I is the exact solution and I DE N is the approximate solution obtained from DE-Sinc integration rule, then .

CESTAC Method and the CADNA Library
In this section, we describe the CESTAC method and the CADNA library [31,32]. Moreover, the general algorithm of the CESTAC method is presented. The CADNA codes of the Sinc integration rule for SE and DE precisions are presented in Appendix A. Some advantages of the CESTAC method and the CADNA library over other methods based on the FPA are illustrated. Moreover, the main theorems are proved to guarantee the obtained results based on the SA. These theorems show that the NCSDs for I N , I N+1 are almost equal to the NCSDs between I, I N in both SE and DE cases. Thus we will be able to apply condition (6) instead of (5).
Let A be the set of represented values produced by computer. Then based on the computer arithmetic for G ∈ A we can produce g ∈ R with ρ mantissa bits as where n 1 is sign, 2 −ρ n 2 is the missing segment of the mantissa and z is the binary exponent such that for ρ = 24, 53 we can find the results with single and double precisions [26][27][28][29][30]. Let the casual variable n 2 be the uniformly distributed on [−1, 1]. Then for perturbed values of the last mantissa bit of g, the mean (µ) and the standard deviation (σ) can be obtained for results of G. For m times repeating the process we will have the quasi Gaussian distribution for G k , k = 1, ..., m and the mean of these values will be equal to g. Thus we will be able to find the NCSDs G and G ave as follows where τ δ is the value of T distribution and 1 − δ is the confidence distance with m − 1 degree of freedom [28][29][30].
For applying the CESTAC method we do not need to implement the method directly. If we write the CADNA codes, this library can implement the CESTAC method on the problem to validate the numerical results. We should write the CADNA codes applying C, C++, FORTRAN or ADA codes. Moreover, we should run the library on the LINUX operating system [31,33]. Applying this method, we have some important advantages as: • The termination criterion (5) which is based on the FPA, depends on the existence of the exact solution. But in the CESTAC method we do not need to have the exact solution. The termination criterion of the CESTAC method depends on two successive approximations. • In the FPA, stopping condition (5) depends on the value ε, but in the CESTAC method we do not have this parameter. • In the FPA, since we do not know the optimal ε, so for large values we will produce extra iterations. But in the CESTAC method we can avoid producing the extra iterations.
• In the CESTAC method, we can produce the informatical zero sign @.0 to show the NCSDs, but in the FPA we do not have this ability. • In the CESTAC method, we can find the optimal approximation, the optimal error and the optimal step of numerical procedure, but in the FPA we can not find them. • In the CESTAC method, we can show some of numerical instabilities but in the FPA we can not show them.
Thus, generally we can recommend the SA, the CESTAC method and the CADNA library instead of the FPA to find the approximate solution of the numerical methods and validate the results.
In sequel, two main theorems for SE and DE precisions of the Sinc integration rule are proved. Using these theorems, we can show that the NCSDs of I and I N are almost equal to the NCSDs of I N and I N+1 in both SE and DE cases. Thus, these theorems can support us analytically to apply condition (6) instead of the FPA's condition (5). At first the following definition is presented: [29,30] The number of significant digits for two real numbers p 1 , p 2 can be computed as follows (1) for p 1 = p 2 , (2) ∀ p 1 ∈ R, C p 1 ,p 1 = +∞.
Moreover, the NCSDs for exact and approximate solutions I and I SE N can be defined as follows C I SE N ,I = log 10 Applying Equations (24) and (25) yields and therefore we can write for N enough large the right hand side approaches to zero and . Theorem 4. Assume that I and I DE N are the exact and approximate solutions using the Sinc integration rule with DE precision. Then we get Proof. Applying Definition 2 and Remark 2 we can write On the other hand, for I and I DE N we get Substituting Equation (28) into Equation (27) For the log term of Equation (29) we can write We know that when N → ∞, then Theorems 3 and 4, show that the NCSDs for exact value I and the approximate value I N are almost equal to the NCSDs of two successive approximations I N and I N+1 for SE and DE Sinc integration rules. Thus, these theorems can support us to apply the SA and the CESTAC method and specially the termination criterion (6) instead of the FPA and the stopping condition (5).

Numerical Results
In order to show the efficiency of the presented method and the CADNA library, the RO system is illustrated. Both conditions (5) and (6) are investigated. Applying the CESTAC method and the CADNA library, the optimal iterations, optimal approximations and optimal errors are obtained. Moreover, we find the numerical results based on the FPA for ε = 10 −5 and moreover, the number of iterations for different values of ε are shown. Clearly, we can see that the numerical results based on the double exponential decay are more accurate than the single form. Moreover, its numerical algorithm is stopped faster than the SE. The following Algorithm 1 is presented for the SE Sinc integration rule. For DE case, it would be the same and we should change the functions.

Algorithm 1 The algorithm of the SE Sinc integration rule based on the CESTAC method.
Step 1: Put N = 1; Step 2: Enter φ SE (s) and {φ SE } (s); Step 3: Enter a, b; Step 4: Do: Step 4-5: N = N + 1; In order to evaluate I, we consider interval [0, m] where m is a number enough large such that | ∞ m e −v 3 vdv| = @.0 which means that this value has no any significant digits [32,34]. By choosing m = 10, we have: In Table 1, the results are obtained for SE Sinc integration rule and the algorithm is stopped at step N = 120 with error |I N+1 − I| = 0.00000969143882900703 but in Table 2 which is based on the DE integration rule the algorithm is stopped in N = 17 with absolute error 0.00000157829975971913 with same value of ε. In Tables 3 and 4, the number of iterations for different values of ε are demonstrated in SE and DE cases based on the FPA. Clearly, we can see that for large values of ε we have so many numbers of iterations and for large values of ε, the algorithm can be stopped without producing the accurate numerical results. Thus, instead of the FPA we apply the SA and the CESTAC method which numerical results are presented in Tables 5 and 6. Using these results we can find the optimal approximations, optimal errors and optimal iterations for both SE and DE cases. In Table 5, the results are obtained for the SE Sinc integration rule using the CESATC method and the CADNA library. So the optimal iteration of the SE Sinc integration rule for solving the RO is N SE opt = 545, the optimal approximation is I SE N opt = 0.451372646475192E + 000 and the optimal error is E SE N opt = 0.27E − 012. Moreover, the results of the SE integration rule are shown in Table 6. Based on this table, the optimal step is N DE opt = 78, the optimal approximation is I DE N opt = 0.451372646475444E + 000 and the optimal error is E DE N opt = 0.2E − 013. Thus, we have not only more accurate solution in the DE integration rule but also we can obtain the numerical results faster than the SE case. The informatical zero @.0, shows that we have equal values of the NCSDs between exact and approximate solutions and two successive approximations.
Finally, the optimal solution of the RO model can be obtained based on the DE Sinc integration rule as follows where it is a mathematical formula to forecast the condensation of salt solutions in semipenetrable covers in the RO model.

Conclusions
The RO system is one the important and applicable methods for water purification process. It can be modelized as a mathematical problem and using numerical integration methods we can find the approximate solution of the model. Thus finding the accurate and applicable method for solving the model is important. This model has been solved by some of researchers but their methods were based on the FPA and in order to show the accuracy of the method they applied the traditional absolute error that in some cases depended on the small positive value ε. In this study, we applied the Sinc integration rule with SE and DE precisions. Moreover, we introduced the SA and the CESTAC method to find the approximate solution of the RO system. We applied the CADNA library to implement the CESTAC method that should be run on the LINUX operating system. Using this method we can find the optimal approximation, the optimal error and the optimal iteration of the numerical procedure. We presented the numerical results for both the SA and the FPA. By studying the obtained results it is obvious that the Sinc integration rule with DE precision is more accurate and faster than the SE case.