Next Article in Journal
Estimation of Unknown Parameters of Truncated Normal Distribution under Adaptive Progressive Type II Censoring Scheme
Next Article in Special Issue
A Control Method for IPMSM Based on Active Disturbance Rejection Control and Model Predictive Control
Previous Article in Journal
Spline Curves Formation Given Extreme Derivatives
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

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

1
Industrial Mathematics Laboratory, Baikal School of BRICS, Irkutsk National Research Technical University, 664074 Irkutsk, Russia
2
Department of Applied Mathematics and Programming, South Ural State University, Lenin Prospect 76, 454080 Chelyabinsk, Russia
3
Energy Systems Institute of Russian Academy of Science, 664033 Irkutsk, Russia
4
Higher and Applied Mathematics Department, Penza State University, 440026 Penza, Russia
*
Author to whom correspondence should be addressed.
Mathematics 2021, 9(1), 48; https://doi.org/10.3390/math9010048
Submission received: 31 October 2020 / Revised: 18 December 2020 / Accepted: 22 December 2020 / Published: 28 December 2020
(This article belongs to the Special Issue Model Predictive Control and Optimization for Cyber-Physical Systems)

Abstract

:
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.

1. 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 advection-diffusion 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]:
y Φ x = α 2 Φ 2 y ,
with α = D h v 0 and the boundary conditions are
Φ ( 0 , y ) = ϕ 0 , Φ ( x , ) = ϕ 1 ,
and
D Φ y ( x , 0 ) = q Φ ( x , 0 ) ,
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 semi-boundary. 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
Φ ( x , 0 ) = 3 1 3 q ϕ 0 D I D h v 0 1 3 x 1 3 + ϕ 0 ,
where I = 0 e v 3 v d v 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
| I I n | < ε ,
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
| I n I n + 1 | = @ . 0 ,
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.

2. Main Idea

2.1. 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
Sinc ( s ) = sin ( π s ) π s , s 0 , 1 , s = 0 .
For f R and the step size > 0 , the Whittaker cardinal can be defined in the following form
C a ( f , ) ( s ) = k = f ( k ) S ( k , ) ( s ) ,
and we can write its l-th order as follows
C a l ( f , ) ( s ) = k = l l f ( k ) S ( k , ) ( s ) ,
whenever this series convergence, and we define the M-th order of Sinc function as
S ( M , ) ( s ) = sin [ π ( s M ) / ] π ( s M ) / , M = 0 , ± 1 , ± 2 , . . . .
Now, we introduce the following function space:
Definition 1.
[49] Let α R + . For domain D we get ( a , b ) D where D is bounded and simply-connected. We show the family of functions f by L α ( D ) such that
(i) f is analytic in D;
(ii) C R + ; s D
| f ( s ) | C | ( s a ) ( b s ) | α .
The Sinc function with single exponential decay can be defined as follows
ϕ S E ( t ) = b a 2 tanh t 2 + b + a 2 ,
where
{ ϕ S E } ( t ) = 1 4 ( b a ) s e c h t 2 2 .
Theorem 1.
[51] Assume that f L α ϕ S E ( D d ) and 0 < d < π 2 . Then
= π d α N ,
and for constant value W which is independent from N we get
a b f ( s ) d s k = N N f ϕ S E ( k ) ϕ S E ( k ) W exp π d α N ,
where N is a positive integer value.
Remark 1.
Let I be the exact solution and I N S E be the approximate solution obtained from SE-Sinc integration rule, then
I I N S E = O exp ( π d α N ) .
The Sinc function with double exponential decay is defined as
ϕ D E ( t ) = b a 2 tanh π 2 sinh t + a + b 2 ,
where
ϕ D E ( t ) = b a 2 π 2 cosh ( t ) cosh 2 π 2 sinh ( t ) .
Theorem 2.
[50] Let f L α ( ϕ D E ( D d ) ) and 0 < d < π 2 then
= 1 N log 2 d N α ,
for constant value W which is independent from N we get
a b f ( s ) d s k = N N f ϕ D E ( k ) ϕ D E ( k ) W exp 2 π d N log 2 d N α ,
where N is a positive integer.
Remark 2.
Assume that I is the exact solution and I N D E is the approximate solution obtained from DE-Sinc integration rule, then
I I N D E = O exp 2 π d N log ( 2 d N α ) .

2.2. 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
G = g n 1 2 z ρ n 2 ,
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 a v e as follows
C G a v e , G = log 10 m G a v e τ δ σ
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:
Definition 2.
[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 ,
C p 1 , p 2 = log 10 p 1 + p 2 2 ( p 1 p 2 ) = log 10 p 1 p 1 p 2 1 2 .
(2) p 1 R , C p 1 , p 1 = + .
Theorem 3.
For the exact solution I and the N-th order approximate solution I N S E which is obtained from SE Sinc integration rule (15) we have
C I N S E , I C I N S E , I N + 1 S E = O exp π d α N .
Proof. 
For two successive approximations I N S E and I N + 1 S E we can write I N S E I N + 1 S E = I N S E I ( I N + 1 S E I ) = E n S E E n + 1 S E . Using Remark 1, we can write
O I N S E I N + 1 S E = O E n S E E n + 1 S E = O exp π d α N + O exp π d α ( N + 1 ) = O exp π d α N .
Based on Definition 2, for I N S E and I N + 1 S E we get
C I N S E , I N + 1 S E = log 10 I N S E + I N + 1 S E 2 ( I N S E I N + 1 S E ) = log 10 I N S E I N S E I N + 1 S E 1 2 = log 10 I N S E I N S E I N + 1 S E + log 10 1 1 2 I N S E ( I N S E I N + 1 S E ) = log 10 I N S E I N S E I N + 1 S E + O I N S E I N + 1 S E .
Thus using Equation (23) we can write
C I N S E , I N + 1 S E = log 10 I N S E I N S E I N + 1 S E + O exp π d α N .
Moreover, the NCSDs for exact and approximate solutions I and I N S E can be defined as follows
C I N S E , I = log 10 I N S E + I 2 ( I N S E I ) = log 10 I N S E I N S E I 1 2 = log 10 I N S E I N S E I + O ( I N S E I ) = log 10 I N S E y N S E ( s ) I + O exp π d α N .
Applying Equations (24) and (25) yields
C I N S E , I C I N S E , I N + 1 S E = log 10 I N S E I N S E I log 10 I N S E I N S E I N + 1 S E + O exp π d α N = log 10 I N S E I N + 1 S E I N S E I + O exp π d α N = log 10 O exp π d α N O exp π d α N + O exp π d α N = O exp π d α N ,
and therefore we can write
C I N S E , I C I N S E , I N + 1 S E = O exp π d α N ,
for N enough large the right hand side approaches to zero and
C I N S E , I = C I N S E , I N + 1 S E .
 □
Theorem 4.
Assume that I and I N D E are the exact and approximate solutions using the Sinc integration rule with DE precision. Then we get
C I N D E , I N + 1 D E C I N D E , I = O exp 2 π d N log ( 2 d N α ) .
Proof. 
Applying Definition 2 and Remark 2 we can write   
C I N D E , I N + 1 D E = log 10 I N D E I N D E I N + 1 D E 1 2 = log 10 I N D E I N D E I N + 1 D E + log 10 1 1 2 I N D E ( I N D E I N + 1 D E ) = log 10 I N D E I N D E I N + 1 D E + O w n ( t ) I N + 1 D E = log 10 I N D E ( I N D E I ) ( I N + 1 D E I ) + O ( I N D E I ) ( I N + 1 D E I ) = log 10 I N D E ( I N D E I ) 1 I N + 1 D E I I N D E I + O ( E n ) + O ( E n + 1 ) = log 10 I N D E I N D E I log 10 1 I N + 1 D E I I N D E I + O exp 2 π d N log ( 2 d N α ) .
On the other hand, for I and I N D E we get
C I N D E , I = log 10 I N D E I N D E I 1 2 = log 10 I N D E I N D E I + O ( I N D E I ) = log 10 I N D E I N D E I + O exp 2 π d N log ( 2 d N α ) .
Substituting Equation (28) into Equation (27) leads to
C I N D E , I N + 1 D E = C I N D E , I log 10 1 I N + 1 D E I I N D E I + O exp 2 π d N log ( 2 d N α ) .
For the log term of Equation (29) we can write
I N + 1 D E I I I N D E = O exp π d ( N + 1 ) log ( 2 d ( N + 1 ) α ) O exp π d N log ( 2 d N α ) = O exp 2 π d N log ( 2 d N α ) N + 1 log ( 2 d ( N + 1 ) α ) .
We know that when N , then I N + 1 D E I I I N D E 0 and we have
C I N D E , I N + 1 D E = C I N D E , I + O exp 2 π d N log ( 2 d N α ) .
Also for N enough large O exp 2 π d N log ( 2 d N α ) approaches zero and we have
C I N D E , I N + 1 D E = C I N D E , I .
 □
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).

3. 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 ϕ S E ( s ) and { ϕ S E } ( s ) ;
  • Step 3: Enter a , b ;
  • Step 4: Do:
  • {
  •      Step 4-1: Let h = π d α N ;
  •      Step 4-2: Find k = N N f ( ϕ ( k h ) ) ϕ ( K h ) ;
  •      Step 4-3: Calculate h k = N N f ( ϕ ( k h ) ) ϕ ( K h ) ;
  •      Step 4-4: Print N , I N , | I N + 1 I N | and | I I N | ;
  •      Step 4-5: N = N + 1 ;
  •      } while | I N + 1 S E I N | @ . 0 .
In order to evaluate I, we consider interval [ 0 , m ] where m is a number enough large such that | m e v 3 v d v | = @ . 0 which means that this value has no any significant digits [32,34]. By choosing m = 10 , we have:
Q = 0 10 e v 3 v d v = 0.4513726464754668 . . . .
Table 1 and Table 2, show the numerical results based on the FPA for ε = 10 5 . 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 Table 3 and Table 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 Table 5 and Table 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 o p t S E = 545 , the optimal approximation is I N o p t S E = 0.451372646475192 E + 000 and the optimal error is E N o p t S E = 0.27 E 012 . Moreover, the results of the SE integration rule are shown in Table 6. Based on this table, the optimal step is N o p t D E = 78 , the optimal approximation is I N o p t D E = 0.451372646475444 E + 000 and the optimal error is E N o p t D E = 0.2 E 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
Φ ( x , 0 ) ϕ 0 = 1.5361171751 ( q D ) D h v 0 1 3 x 1 3 + 1 ,
where it is a mathematical formula to forecast the condensation of salt solutions in semi-penetrable covers in the RO model.

4. 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.

Author Contributions

Conceptualization, S.N. and D.S.; data curation, S.N. and A.D.; formal analysis, S.N., A.Z. and A.D.; funding acquisition, D.S.; investigation, S.N., D.S. and A.Z.; methodology, S.N., A.Z. and A.D.; project administration, D.S.; resources, S.N., D.S. and A.T.; software, S.N.; supervision, D.S.; validation, S.N., A.T. and A.D.; visualization, A.Z. and A.T.; writing—original draft, S.N., D.S. and A.Z.; writing—review & editing, S.N., D.S. and A.Z. All authors have read and agreed to the published version of the manuscript.

Funding

The works of D. Sidorov, A. Dreglea and S. Noeiaghdam were supported by a grant from the Academic Council in the direction of the scientific school of Irkutsk National Research Technical University in cooperation with the Russian Academy of Sciences No. 14-NSH-RAN-2020.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

SE-Sinc integration rule:
# include <stdio.h>
# include <math.h>
# include <cadna.h>
double st phi(double st x,double st a,double st b)
{
double st w,Pi;
Pi = atan2(1., 1.) * 4.;
w=((b-a)/2)* tanh(x/2)+((b+a)/2)
return w;
}
double st pphi(double st x,double st a,double st b)
{
int i;
double st ww,Pi;
Pi = atan2(1., 1.) * 4.;
ww=((1./4)*(b-a))*((1./cosh(x/2))*(1./cosh(x/2)));
return ww;
}
main()
{
cadna init(-1);
double st z,s[700],a,b,exact,Pi,d,alpha,h,SS[700];
int n,i,j,k,r;
a=0;b=10;
n=1;
Pi = atan2(1., 1.) * 4.;
exact=0.451372646475466805648429342718;
printf("———————————————————————————————————-∖ n");
printf(" n          approximate solution          difference of two terms          absolute error ∖ n");
printf("———————————————————————————————————–∖ n");
do
{
h=sqrtf((Pi*d)/(alpha*n));
SS[n]=0;
for(i=1,r=-n;i < = 2*n+1,r < = n ;i++,r++)
{
s[i] = exp(-phi(r*h,a,b)*phi(r*h,a,b)*phi(r*h,a,b))*phi(r*h,a,b)*(pphi(r*h,a,b));
s[i]=s[i]+s[i-1];
}
SS[n]=h*s[2*n+1];
printf("     %d      %s     %s     %s     ∖ n",n,strp(SS[n]),strp(fabs(SS[n]-SS[n-1])),strp(fabs(exact-SS[n])));
n=n+1;
}
while(SS[n-1]-SS[n-2] ! = 0);
printf("——————————————————————————————–∖ n ∖ n ∖ n");
cadna end();
}
DE-Sinc integration rule:
# include <stdio.h>
# include <math.h>
# include <cadna.h>
double st phi(double st x,double st a,double st b)
{
double st w,Pi;
Pi = atan2(1., 1.) * 4.;
w=((b-a)/2)* tanh((Pi/2)*sinh(x))+((b+a)/2);
return w;
}
double st pphi(double st x,double st a,double st b)
{
int i;
double st ww,Pi;
Pi = atan2(1., 1.) * 4.;
ww=((b-a)/2)*(((Pi/2)*cosh(x))/(cosh((Pi/2)*sinh(x))*cosh((Pi/2)*sinh(x))));
return ww;
}
main()
{
cadna init(-1);
double st z,s[300],a,b,exact,Pi,d,alpha,h,SS[300];
int n,i,j,k,r;
a=0;b=10;
n=1;
Pi = atan2(1., 1.) * 4.;
exact=0.451372646475466805648429342718;
printf("———————————————————————————————————-∖ n");
printf(" n approximate solution difference of two terms absolute error ∖ n");
printf("———————————————————————————————————- ∖ n");
do
{
h=(1./n)*log((2*d*n)/alpha);
SS[n]=0;
for(i=1,r=-n;i < = 2*n+1,r < = n;i++,r++)
{
s[i] = exp(-phi(r*h,a,b)*phi(r*h,a,b)*phi(r*h,a,b))*phi(r*h,a,b)*(pphi(r*h,a,b));
s[i]=s[i]+s[i-1];
}
SS[n]=h*s[2*n+1]; printf(" %d %s %s %s ∖n",n,strp(SS[n]),strp(fabs(SS[n]-SS[n-1])),strp(fabs(exact-SS[n])));
n=n+1;
}
while(SS[n-1]-SS[n-2] ! = 0);
printf("———————————————————————————————–∖ n ∖ n ∖ n");
cadna end();
}

References

  1. Naik, P.A.; Zu, J.; Owolabi, K.M. Global dynamics of a fractional order model for the transmission of HIV epidemic with optimal control. Chaos Solitons Fractals 2020, 138, 109826. [Google Scholar] [CrossRef] [PubMed]
  2. Naik, P.A. Global dynamics of a fractional order SIR epidemic model with memory. Int. J. Biomath. 2020. [Google Scholar] [CrossRef]
  3. Naik, P.A.; Yavuz, M.; Zu, J. The Role of Prostitution on HIV Transmission with Memory: A Modeling Approach. Alex. Eng. J. 2020, 59, 2513–2531. [Google Scholar] [CrossRef]
  4. Noeiaghdam, S.; Sidorov, D. Caputo-Fabrizio Fractional Derivative to Solve the Fractional Model of Energy Supply-Demand System. Math. Model. Eng. Probl. 2020, 7, 359–367. [Google Scholar] [CrossRef]
  5. Garud, R.M.; Kore, S.V.; Kore, V.S.; Kulkarni, G.S. A short review on process and applications of reverse osmosis. Univers. J. Environ. Res. Technol. 2011, 1, 233–238. [Google Scholar]
  6. Wimalawansa, S.J. Purification of contaminated water with reverse osmosis: Effective solution of providing clean water for human needs in developing countries. Int. J. Emerg. Technol. Adv. Eng. 2013, 3, 75–89. [Google Scholar]
  7. Warsinger, D.M.; Tow, E.W.; Nayar, K.G.; Maswadeh, L.A.; Lienhard, V.J.H. Energy efficiency of batch and semi-batch (CCRO) reverse osmosis desalination. Water Res. 2016, 106, 272–282. [Google Scholar] [CrossRef] [Green Version]
  8. Paulina Maure, O.; Mungkasi, S. Application of numerical integration in solving a reverse osmosis model. Aip Conf. Proc. 2019, 2202, 020043. [Google Scholar] [CrossRef]
  9. Bartman, A.R.; McFall, C.W.; Christofides, P.D.; Cohen, Y. Model-predictive control of feed flow reversal in a reverse osmosis desalination process. J. Process. Control. 2009, 19, 433–442. [Google Scholar] [CrossRef]
  10. Al-haj Ali, M.; Ajbar, A.; Ali, E.; Alhumaizi, K. Robust model-based control of a tubular reverse-osmosis desalination unit. Desalination 2010, 255, 129–136. [Google Scholar]
  11. Janghorban Esfahani, I.; Ifaei, P.; Rshidi, J.; Yoo, C.K. Control performance evaluation of reverse osmosis desalination system based on model predictive control and PID controllers. Desalin. Water Treat. 2016, 57, 26692–26699. [Google Scholar] [CrossRef]
  12. Li, D.; Yang, N.; Niu, R.; Qiu, H.; Xi, Y. FPGA based QDMC control for reverse-osmosis water desalination system. Desalination 2012, 285, 83–90. [Google Scholar] [CrossRef]
  13. Fulford, G.R.; Broadbridge, P. Industrial Mathematics: Case Studies in the Diffusion of Heat and Matter; Cambridge University Press: Cambridge, UK, 2002. [Google Scholar]
  14. Abbas, A. Model predictive control of a reverse osmosis desalination unit. Desalination 2006, 194, 268–280. [Google Scholar] [CrossRef]
  15. Sanjaya, F.; Mungkasi, S. A simple but accurate explicit finite difference method for the advection diffusion equation. J. Phys. Conf. Ser. 2017, 909, 012038. [Google Scholar] [CrossRef]
  16. Williams, F.A. A nonlinear diffusion problem relevent to sedalination by reverse osmosis. SIAM J. Appl. Math. 1969, 17, 59–73. [Google Scholar] [CrossRef]
  17. Mastroianni, G.; Monegato, G. Some new applications of truncated Gauss-Laguerre quadrature formulas. Numer. Algorithms 2008, 49, 283–297. [Google Scholar] [CrossRef]
  18. Muftahov, I.; Tynda, A.; Sidorov, D. Numeric solution of Volterra integral equations of the first kind with discontinuous kernels. J. Comput. Appl. Math. 2017, 313, 119–128. [Google Scholar] [CrossRef]
  19. Sizikov, V.; Sidorov, D. Generalized quadrature for solving singular integral equations of Abel type in application to infrared tomography. Appl. Numer. Math. 2016, 106, 69–78. [Google Scholar] [CrossRef] [Green Version]
  20. Qiu, W.; Xu, D.; Guo, J. The Crank-Nicolson-type Sinc-Galerkin method for the fourth-order partial integro-differential equation with a weakly singular kernel. Appl. Numer. Math. 2021, 159, 239–258. [Google Scholar] [CrossRef]
  21. Rahmoune, A.; Guechi, A. Sinc-Nyström methods for Fredholm integral equations of the second kind over infinite intervals. Appl. Numer. Math. 2020, 157, 579–589. [Google Scholar] [CrossRef]
  22. Okayama, T.; Shintaku, Y.; Katsuura, E. New conformal map for the Sinc approximation for exponentially decaying functions over the semi-infinite interval. J. Comput. Appl. Math. 2020, 373, 112358. [Google Scholar] [CrossRef] [Green Version]
  23. Weber, V.; Daul, C.; Baltensperger, R. Radial numerical integrations based on the sinc function. Comput. Phys. Commun. 2004, 163, 133–142. [Google Scholar] [CrossRef] [Green Version]
  24. Noeiaghdam, S.; Fariborzi Araghi, M.A.; Abbasbandy, S. Valid implementation of Sinc-collocation method to solve the fuzzy Fredholm integral equation. J. Comput. Appl. Math. 2020, 370, 112632. [Google Scholar] [CrossRef]
  25. Noeiaghdam, S.; Fariborzi Araghi, M.A. Valid implementation of the Sinc-collocation method to solve the linear integral equations by CADNA library. J. Math. Model. 2019, 7, 63–84. [Google Scholar]
  26. Alt, R.; Lamotte, J.-L.; Markov, S. Stochastic arithmetic, Theory and experiments. Serdica J. Comput. 2010, 4, 1–10. [Google Scholar]
  27. Graillat, S.; Jézéquel, F.; Wang, S.; Zhu, Y. Stochastic arithmetic in multi precision. Math. Comput. Sci. 2011, 5, 359–375. [Google Scholar] [CrossRef]
  28. Graillat, S.; Jézéquel, F.; Picot, R. Numerical Validation of Compensated Summation Algorithms with Stochastic Arithmetic. Electron. Notes Theor. Comput. Sci. 2015, 317, 55–69. [Google Scholar] [CrossRef]
  29. Vignes, J. Discrete Stochastic Arithmetic for Validating Results of Numerical Software. Spec. Issue Numer. Algorithms 2004, 37, 377–390. [Google Scholar] [CrossRef]
  30. Vignes, J. A stochastic arithmetic for reliable scientific computation. Math. Comput. Simulation 1993, 35, 233–261. [Google Scholar] [CrossRef]
  31. Jézéquel, F.; Mecanique, C.R. A dynamical strategy for approximation methods. Comptes Rendus Mec. 2006, 334, 362–367. [Google Scholar] [CrossRef] [Green Version]
  32. Chesneaux, J.M.; Jézéquel, F. Dynamical control of computations using the Trapezoidal and Simpson’s rules. J. Univers. Comput. Sci. 1998, 4, 2–10. [Google Scholar]
  33. Scott, N.S.; Jézéquel, F.; Denis, C.; Chesneaux, J.-M. Numerical ‘health check’ for scientific codes: The CADNA approach. Comput. Phys. Commun. 2007, 176, 507–521. [Google Scholar] [CrossRef] [Green Version]
  34. Abbasbandy, S.; Fariborzi Araghi, M.A. Numerical solution of improper integrals with valid implementation. Math. Comput. Appl. 2002, 7, 83–91. [Google Scholar] [CrossRef]
  35. Abbasbandy, S.; Fariborzi Araghi, M.A. The valid implementation of numerical integration methods. Far East J. Appl. Math. 2002, 8, 89–101. [Google Scholar]
  36. Abbasbandy, S.; Fariborzi Araghi, M.A. A stochastic scheme for solving definite integrals. Appl. Numer. Math. 2005, 55, 125–136. [Google Scholar] [CrossRef]
  37. Fariborzi Araghi, M.A.; Noeiaghdam, S. Dynamical control of computations using the Gauss-Laguerre integration rule by applying the CADNA library. Adv. Appl. Math. Sci. 2016, 16, 1–18. [Google Scholar]
  38. Abbasbandy, S.; Fariborzi Araghi, M.A. The use of the stochastic arithmetic to estimate the value of interpolation polynomial with optimal degree. Appl. Numer. Math. 2004, 50, 279–290. [Google Scholar] [CrossRef]
  39. Noeiaghdam, S.; Dreglea, A.; He, J.H.; Avazzadeh, Z.; Suleman, M.; Fariborzi Araghi, M.A.; Sidorov, D.; Sidorov, N. Error estimation of the homotopy perturbation method to solve second kind Volterra integral equations with piecewise smooth kernels: Application of the CADNA library. Symmetry 2020, 12, 1730. [Google Scholar] [CrossRef]
  40. Noeiaghdam, S.; Sidorov, D.; Sizikov, V.; Sidorov, N. Control of accuracy on Taylor-collocation method to solve the weakly regular Volterra integral equations of the first kind by using the CESTAC method. Appl. Comput. Math. Int. J. 2020, 19, 81–105. [Google Scholar]
  41. Noeiaghdam, S.; Fariborzi Araghi, M.A.; Abbasbandy, S. Finding optimal convergence control parameter in the homotopy analysis method to solve integral equations based on the stochastic arithmetic. Numer. Algorithms 2019, 81, 237–267. [Google Scholar] [CrossRef]
  42. Noeiaghdam, S.; Fariborzi Araghi, M.A. A novel approach to find optimal parameter in the homotopy-regularization method for solving integral equations. Appl. Math. Inf. Sci. 2020, 14, 1–8. [Google Scholar]
  43. Noeiaghdam, S.; Fariborzi Araghi, M.A. Homotopy regularization method to solve the singular Volterra integral equations of the first kind. Jordan J. Math. Stat. 2018, 11, 1–12. [Google Scholar]
  44. Abbasbandy, S.; Fariborzi Araghi, M.A. A reliable method to determine the ill-condition functions using stochastic arithmetic. Southwest Pure Appl. Math. 2002, 1, 33–38. [Google Scholar]
  45. Noeiaghdam, S.; Sidorov, D.; Muftahov, I.; Zhukov, A.V. Control of Accuracy on Taylor-Collocation Method for Load Leveling Problem. Bull. Irkutsk. State Univ. Ser. Math. 2019, 30, 59–72. [Google Scholar] [CrossRef]
  46. Fariborzi Araghi, M.A.; Noeiaghdam, S. Finding the optimal step of fuzzy Newton-Cotes integration rules by using CESTAC method. J. Fuzzy Set Valued Anal. 2017, 2, 62–85. [Google Scholar]
  47. Fariborzi Araghi, M.A.; Noeiaghdam, S. A valid scheme to evaluate fuzzy definite integrals by applying the CADNA library. Int. J. Fuzzy Syst. Appl. 2017, 6, 1–20. [Google Scholar] [CrossRef]
  48. Anandan, P.; Gagliano, S.; Bucolo, M. Computational models in microfluidic bubble logic. Microfluid. Nanofluid. 2015, 18, 305–321. [Google Scholar] [CrossRef]
  49. Maleknejad, K.; Nedaiasl, K. Application of Sinc-collocation method for solving a class of nonlinear Fredholm integral equations. Comput. Math. Appl. 2011, 62, 3292–3303. [Google Scholar] [CrossRef] [Green Version]
  50. Okayama, T.; Matsuo, T.; Sugihara, M. Error estimates with explicit constants for Sinc approximation, Sinc quadrature and Sinc indefinite integration. Math. Eng. Tech. Rep. 2009, 124, 361–394. [Google Scholar] [CrossRef]
  51. Stenger, F. Numerical Methods Based on Sinc and Analytic Functions; Springer: New York, NY, USA, 1993. [Google Scholar]
Table 1. The numerical results of the reverse osmosis (RO) system using the single exponential (SE)-Sinc integration rule for ε = 10 5 based on the floating point arithmetic (FPA).
Table 1. The numerical results of the reverse osmosis (RO) system using the single exponential (SE)-Sinc integration rule for ε = 10 5 based on the floating point arithmetic (FPA).
N I N + 1 | I N + 1 I |
10.000000000000000841800.45137264647546598839
20.000000007124304311130.45137263935116250790
30.000010741601183028960.45136190487428379248
40.000521873672239414050.45085077280322738424
50.004730856158645231800.44664179031682160748
700.451014025411936525510.00035862106353029555
710.451042534982425691310.00033011149304112974
720.451068607009630806460.00030403946583601460
730.451092464808362070270.00028018166710475079
740.451114310730523326850.00025833574494349421
750.451134326595977908080.00023831987948891298
1150.451359266909964362830.00001337956550245822
1160.451360109461754477330.00001253701371234373
1170.451360895711206022710.00001175076426079835
1180.451361629635726180340.00001101683974064072
1190.451362314947007625680.00001033152845919538
1200.451362955036637814030.00000969143882900703
Table 2. The numerical results of the RO system using the double exponential (DE)-Sinc integration rule for ε = 10 5 based on the FPA.
Table 2. The numerical results of the RO system using the double exponential (DE)-Sinc integration rule for ε = 10 5 based on the FPA.
N I N + 1 | I N + 1 I |
1−0.074872586473638771950.52624523294910563465
2−0.006047249484285218030.45741989595975202088
3−0.000000000000000000000.45137264647546682106
40.000000000000001002720.45137264647546582186
50.001247770179447176560.45012487629601966033
60.147160393704803577060.30421225277066321624
70.342281907234291415950.10909073924117540511
80.417277334723688830830.03409531175177799023
90.440761037024814616990.01061160945065220407
100.448033236008771373890.00333941046669544717
110.450299773794711089000.00107287268075573206
120.450999054264720367070.00037359221074645399
130.451212626808921601910.00016001966654521915
140.451286762820675091400.00008588365479172966
150.451326265771209544920.00004638070425727614
160.451355111402202857640.00001753507326396342
170.451374224775226540190.00000157829975971913
Table 3. The number of iterations for different values of ε using the SE-Sinc integration rule for solving the RO system based on the FPA.
Table 3. The number of iterations for different values of ε using the SE-Sinc integration rule for solving the RO system based on the FPA.
ε Small Values ε = 10 5 ε = 10 3 ε = 10 1 ε = 0.5 Large Values
N > > 120120591811
Table 4. The number of iterations for different values of ε using the DE-Sinc integration rule for solving the RO system based on the FPA.
Table 4. The number of iterations for different values of ε using the DE-Sinc integration rule for solving the RO system based on the FPA.
ε Small Values ε = 10 5 ε = 10 3 ε = 10 1 ε = 0.5 Large Values
N > > 171712821
Table 5. The numerical results of the SE-Sinc integration rule to approximate the RO system based on the stochastic arithmetic (SA) and the CESTAC method using the CADNA library.
Table 5. The numerical results of the SE-Sinc integration rule to approximate the RO system based on the stochastic arithmetic (SA) and the CESTAC method using the CADNA library.
N I N + 1 | I N + 1 I N | | I N + 1 I |
1 0.84180 × 10 15 0.84180 × 10 15 0.451372646475465
2 0.71243 × 10 8 0.71243 × 10 8 0.4513726393511
3 0.10741 × 10 4 0.10734 × 10 4 0.4513619048
4 0.52187 × 10 3 0.51113 × 10 3 0.45085077
5 0.473086 × 10 2 0.420898 × 10 2 0.44664178
6 0.176690 × 10 1 0.129381 × 10 1 0.4337036
7 0.411022 × 10 1 0.234332 × 10 1 0.4102703
8 0.730929 × 10 1 0.319907 × 10 1 0.378279
9 0.110007 0.369143 × 10 1 0.341365
10 0.148336 0.383293 × 10 1 0.3030360
5350.451372646475095 0.1 × 10 13 0.37 × 10 12
5360.451372646475107 0.1 × 10 13 0.359 × 10 12
5370.451372646475117 0.1 × 10 13 0.349 × 10 12
5380.451372646475127 0.1 × 10 13 0.33 × 10 12
5390.451372646475138 0.1 × 10 13 0.328 × 10 12
5400.451372646475148 0.1 × 10 13 0.3184 × 10 12
5410.451372646475157 0.9 × 10 14 0.309 × 10 12
5420.451372646475166 0.9 × 10 14 0.299 × 10 12
5430.451372646475176 0.9 × 10 14 0.290 × 10 12
5440.45137264647518 0.8 × 10 14 0.28 × 10 12
5450.451372646475192 @ . 0 0.27 × 10 12
Table 6. The numerical results of the DE-Sinc integration rule to approximate the RO system based on the SA and the CESTAC method using the CADNA library.
Table 6. The numerical results of the DE-Sinc integration rule to approximate the RO system based on the SA and the CESTAC method using the CADNA library.
N I N + 1 | I N + 1 I N | | I N + 1 I |
1 0.74872505235097 × 10 1 0.74872505235097 × 10 1 0.52624515171056
2 0.604727538493393 × 10 2 0.68825229850163 × 10 1 0.457419921860400
3 0.2078711342386 × 10 4 0.604727538493393 × 10 2 0.451372646475466
4 0.100271560210787 × 10 14 0.100271560210787 × 10 14 0.451372646475465
5 0.124777017944717 × 10 2 0.124777017944617 × 10 2 0.450124876296019
60.1471605807424030.1459128105629560.304212065733063
70.3422818520383610.195121271295950.10909079443710
80.417277334723689 0.74995482685327 × 10 1 0.3409531175177 × 10 1
90.440761051486252 0.2348371676256 × 10 1 0.1061159498921 × 10 1
100.448033241254691 0.72721897684392 × 10 2 0.3339405220775 × 10 2
110.450299775805271 0.226653455057 × 10 2 0.107287067019 × 10 2
440.451372644708314 0.131409 × 10 8 0.176715 × 10 8
450.451372645943506 0.123519 × 10 8 0.531960 × 10 9
460.451372646738228 0.794721 × 10 9 0.262761 × 10 9
470.451372647057581 0.319353 × 10 9 0.582114 × 10 9
730.451372646475593 0.57 × 10 13 0.127 × 10 12
740.451372646475533 0.600 × 10 13 0.66 × 10 13
750.451372646475486 0.46 × 10 13 0.2 × 10 13
760.451372646475458 0.2 × 10 13 0.8 × 10 14
770.451372646475445 0.1 × 10 13 0.20 × 10 13
780.451372646475444 @ . 0 0.2 × 10 13
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Noeiaghdam, S.; Sidorov, D.; Zamyshlyaeva, A.; Tynda, A.; Dreglea, A. A Valid Dynamical Control on the Reverse Osmosis System Using the CESTAC Method. Mathematics 2021, 9, 48. https://doi.org/10.3390/math9010048

AMA Style

Noeiaghdam S, Sidorov D, Zamyshlyaeva A, Tynda A, Dreglea A. A Valid Dynamical Control on the Reverse Osmosis System Using the CESTAC Method. Mathematics. 2021; 9(1):48. https://doi.org/10.3390/math9010048

Chicago/Turabian Style

Noeiaghdam, Samad, Denis Sidorov, Alyona Zamyshlyaeva, Aleksandr Tynda, and Aliona Dreglea. 2021. "A Valid Dynamical Control on the Reverse Osmosis System Using the CESTAC Method" Mathematics 9, no. 1: 48. https://doi.org/10.3390/math9010048

APA Style

Noeiaghdam, S., Sidorov, D., Zamyshlyaeva, A., Tynda, A., & Dreglea, A. (2021). A Valid Dynamical Control on the Reverse Osmosis System Using the CESTAC Method. Mathematics, 9(1), 48. https://doi.org/10.3390/math9010048

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop