OPTIMAL ALTERNATIVE TO THE AKIMA’S METHOD OF SMOOTH INTERPOLATION APPLIED IN DIABETOLOGY

advertisement
Surveys in Mathematics and its Applications
ISSN 1842-6298
Volume 1 (2006), 41 – 49
OPTIMAL ALTERNATIVE TO THE AKIMA’S
METHOD OF SMOOTH INTERPOLATION
APPLIED IN DIABETOLOGY
Alexandru Mihai Bica, Marian Degeratu,
Luiza Demian and Emanuel Paul
Abstract. It is presented a new method of cubic piecewise smooth interpolation applied to
experimental data obtained by glycemic pro…le for diabetics. This method is applied to create a
soft useful in clinical diabetology. The method give an alternative to the Akima’s procedure of the
derivatives computation on the knots from [1] and have an optimal property.
1
Introduction
We construct here a method of cubic piecewise smooth interpolation which combine
the calculus of the derivatives on the interior knots, given by the Akima’s procedure
(see [1]), with the cubic piecewise smooth interpolation formula from [6] and a new
procedure to compute the derivatives on the …rst two and last three knots. Such
new procedure is proposed here. The derivatives on the …rst two knots and on the
last three knots are calculated such that to be minimized the quadratic oscillation
in average (de…ned below) of the smooth interpolation function. The quadratic
oscillation in average (de…ned in [2]) was introduced to measure the geometrical
distance between the graphs of the interpolation function and of the polygonal line
joining the interpolation points. In the interior knots where we can use the Akima’s
method (see [1]), we prefer this method because give a natural computation of the
derivatives.
This numerical method is implemented here to obtain a proper soft which is tested
and used on diabetology measurements. For patients which present blood-glucose
2000 Mathematics Subject Classi…cation: 57R12, 65D05.
Keywords: piecewise smooth interpolation, smooth approximations, quadratic oscillation in
average, least squares method.
The research of the …rst author on this paper is supported by the grant 2Cex-06-11-96 of the
Romanian Government
******************************************************************************
http://www.utgjiu.ro/math/sma
42
A.M. Bica, M. Degeratu, L. Demian and E. Paul
homeostasis, the numerical method can be combined with the mathematical model
obtained in [3] the aim to determine the critical hypoglycemia characteristic for such
patients.
2
The cubic piecewise smooth interpolation.
In the plane tOx consider the points (ti ; xi ) ; i = 0; n where ti , represent moments
of time and xi represent measured values of a parameter (which varies in time). Let
the vector x = (x0 ; :::; xn ) ; hi = ti ti 1 ; i = 1; n and the slopes,
mi =
xi+1
ti+1
xi
;
ti
i = 0; n
We use these slopes to compute x0i ; ; i = 2; n
from [1],
x0i =
jmi+2
mi+1 j mi 1 + jmi
jmi+2 mi+1 j + jmi
By (2) we see that mi ;
i = 0; n
1
1
1:
(1)
3, applying the Akima’s procedure
mi
mi
2j
mi+1
2j
;
i = 2; n
3
(2)
1 is not enough to compute
x00 ; x01 ; x0n
x0n
2;
1;
x0n
too. Therefore H. Akima propose in [1] an arti…cial computation of
m
2;
m
1;
mm ; mn+1 ; mn+2
and then the treatment of the end points is a weakness of the method (as it is
mentioned in [1] and [5]). Moreover in [1] is not given the error estimation.
To interpolate the data (ti ; xi ) ; i = 1; n; we de…ne F : [t0 ; tn ] ! R by his
restrictions Fi ; i = 1; n; to the intervals [ti 1 ; ti ] ; i = 1; n. The functions Fi are
cubic polynomials and have expression as in [6] and [5]:
Fi (t) =
+
(ti
t)2 [2 (t ti
h3i
(ti
1)
t)2 (t
h2i
+ hi ]
ti
xi
1+
1)
(t
x0i
ti
(t
1
2
1 ) [2 (ti
h3i
ti
2
1 ) (ti
h2i
t) + hi ]
t)
xi ;
x0i +
t 2 [ti
1 ; ti ] ;
(3)
that is, with other notations,
Fi (t) = Ai (t) x0i
1
+ Bi (t) x0i + Ci (t) xi
1
+ Ei (t) xi :
(4)
******************************************************************************
Surveys in Mathematics and its Applications 1 (2006), 41 –49
http://www.utgjiu.ro/math/sma
43
Optimal alternative to smooth interpolation applied in diabetology
De…nition 1. ([2]) Corresponding to the points (ti ; xi ) ; i = 0; n; let the polygonal
line D (x) : [t0 ; tn ] ! R having the restrictions to the intervals [ti 1 ; ti ] ; i = 1; n;
Di given by
xi xi 1
Di (t) = xi 1 +
(t ti 1 ):
ti ti 1
The quadratic oscillation in average of F is
v
u
n Zti
uX
u
(F; x) = t
[Fi (t)
:
i=1 t
i
Di (t)]2 dt:
1
We will obtain x00 ; x01 ; x0n 2 ; x0n 1 ; and x0n such that the quadratic oscillation
in average of F to be minimal. In this aim we will consider the residual
R
x00 ; x01 ; x0n 2 ; x0n 1 ; x0n
=
n Zti
X
[Fi (t)
Di (t)]2 dt:
(5)
i=1 t
i 1
3
Optimal property and the error estimation
Theorem 2. There exist an unique point x00 ; x01 ; x0n
imize the quadratic oscillation in average (F; x) :
2;
x0n
0
1 ; xn
2 R5 which min-
Proof. We will minimize the residual
R x00 ; x01 ; x0n
0
0
2 ; xn 1 ; xn
=
n Zti
X
[Fi (t)
Di (t)]2 dt:
i=1 t
i 1
applying the least squares method. Therefore, we solve the systems given by the
conditions
@R
@R
= 0;
=0
(6)
0
@x0
@x01
@R
= 0;
@x0n 2
@R
= 0;
@x0n 1
@R
= 0:
@x0n 1
(7)
******************************************************************************
Surveys in Mathematics and its Applications 1 (2006), 41 –49
http://www.utgjiu.ro/math/sma
44
A.M. Bica, M. Degeratu, L. Demian and E. Paul
The system (6), according to (4), have the form :
8
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
:
0t
1
0t
1
Z1
Z1
Zt1
@ A21 (t) dtA x00 + @ A1 (t) B1 (t) dtA x01 = A1 (t) D1 (t) dt
t0
t0
0t
1
Z1
@ A1 (t) C1 (t) dtA x0
t0
0t
1
Z1
@ A1 (t) E1 (t) dtA x1
t0 1
t0
1
0t
0t
Zt2
Zt1
Z1
Z1
@ A1 (t) B1 (t) dtA x00 + @ B12 (t) dt + A22 (t) dtA x01 = B1 (t) D1 (t) dt
t1
1
0t0t
Z1
@ B1 (t) C1 (t) dtA x0
1
0t0t
Z2
@ A2 (t) B2 (t) dtA x02
t0
1
Zt2
@ A2 (t) C2 (t) dtA x1
t1
0
Zt2
+ A2 (t) D2 (t) dt
t1
t1
Since
@2R
@x02
0
1
0 t t0
Z1
@ B1 (t) E1 (t) dtA x1 +
0 t t0
1
Z2
@ A2 (t) E2 (t) dtA x2 :
t1
(8)
0
1
Zt1
= 2 @ A21 (t) dtA > 0
t0
and the determinant of the Hesse matrix
@2R
@x02
0
@2R
@x00 @x01
@2R
@x00 @x01
@2R
@x02
1
!
is
1
0
1 0t
1
Zt1
Z1
= 4 @ A21 (t) dtA @ B12 (t) dtA
t0
t0
0t
12
Z1
4 @ A1 (t) B1 (t) dtA +
t0
1 0t
1
Zt1
Z2
+4 @ A21 (t) dtA @ A22 (t) dtA > 0
0
t0
t1
we infer that the system (8) have unique solution x00 ; x01 : The system (7) according
******************************************************************************
Surveys in Mathematics and its Applications 1 (2006), 41 –49
http://www.utgjiu.ro/math/sma
45
Optimal alternative to smooth interpolation applied in diabetology
to (4), is :
8 0
1
0
1
tZn 1
tZn 1
tZn 2
>
>
>
C
B
C
B
>
>
A2n 1 (t) dtA x0n 2 + @
An 1 (t) Bn 1 (t) dtA x0n 1
Bn2 2 (t) dt +
> @
>
>
>
>
tn 2
tn 2
tn 3
>
>
>
tZn 2
>
>
>
>
>
>
=
Bn 2 (t) [An 2 (t) x0n 3 + Cn 2 (t) xn 3 + En 2 (t) xn 2
>
>
>
>
>
tn 3
>
>
tZn 1
>
>
>
>
>
>
An 1 (t) [Cn 1 (t) xn 2 + En 1 (t) xn 1 Dn 1 (t)]dt
Dn 2 (t)]dt
>
>
>
>
>
tn 2
>
1
1
0
0
>
>
tZn 1
tZn 1
tn
>
Z
>
>
>
C
C
B
B
>
>
A2n (t) dtA x0n 1 +
Bn2 1 (t) dt +
An 1 (t) Bn 1 (t) dtA x0n 2 + @
@
>
>
<
tn 1
tn 2
tn 2
0
1
t
>
Ztn
Zn 1
>
>
>
B
C 0
>
>
+@
An (t) Bn (t) dtA xn =
Bn 1 (t) [Cn 1 (t) xn 2 + En 1 (t) xn 1
>
>
>
>
>
tn 1
tn 2
>
>
>
tn
Z
>
>
>
>
>
Dn 1 (t)]dt
An (t) [Cn (t) xn 1 + En (t) xn Dn (t)]dt
>
>
>
>
>
tn 1
>
0
1
0
1
>
>
t
>
n
Z
Ztn
>
>
>
B
C
B
C
>
>
An (t) Bn (t) dtA x0n 1 + @
Bn2 (t) dtA x0n =
@
>
>
>
>
tn 1
tn 1
>
>
>
>
tn
Z
>
>
>
>
>
=
Bn (t) [Cn (t) xn 1 + En (t) xn Dn (t)]dt
>
>
:
tn
1
(9)
Since
@2R
@x02
n 2
0
B
= 2@
tZn
tn
2
Bn2
2 (t) dt
tn
3
and the determinant of the Hesse matrix
0
2
@
is
2
0
B
= 4@
tZn
tn
1
A2n
2
10
CB
1 (t) dtA @
@ R
@x02
n 2
@2R
@x0n 1 @x0n
tZn
tn
+
1
Bn2
2
tZn
2
A2n
2
@2R
@x0n 2 @x0n 1
@2R
@x02
n 1
1
C
1 (t) dtA
1
1
0
B
4@
tZn
tn
C
1 (t) dtA
>0
1
A
1
An
2
1 (t)
Bn
12
C
1 (t) dtA
+
******************************************************************************
Surveys in Mathematics and its Applications 1 (2006), 41 –49
http://www.utgjiu.ro/math/sma
46
A.M. Bica, M. Degeratu, L. Demian and E. Paul
0
tZn
B
+4 @
tn
1 0
2
Bn2
3
0
B
+4 @
C B
@
2 (t) dtA
tZn
tn
1
2
tZn
tn
Bn2
1 (t) dt
+
tn
2
1 0
C
A2n 1 (t) dtA
Ztn
B
@
tn
1
1
Ztn
1
C
A2n (t) dtA +
1
1
C
A2n (t) dtA > 0;
and in addition for the determinant of the Hesse matrix
0
@2R
@2R
@2R
B
B
@
we have
0
B
= 8@
tZn
tn
1
A2n
1 (t) dt
B
@
Ztn
tn
+
tZn
tn
2
0
1
1
2
Bn2
B
@
tZn
3
0
Ztn
tn
1
1
1
Bn2
2
0
C
1 (t) dtA
1 0
C B
Bn2 (t) dtA @
tZn
tn
C
2 (t) dtA
C
B
An (t) Bn (t) dtA ] + 8 @
tn
B
+8 @
0
2 @xn 1
@2R
@x02
n 1
@2R
@x0n 1 @x0n
12
0
0
@x0n
@x02
n 2
@2R
@x0n 1 @x0n 2
@2R
@x0n 2 @x0n
B
@
tn
1
tZn
1
tn
1
Bn2
2
Ztn
0
B
[@
Ztn
tn
1
C
C
A
1 0
C B
A2n (t) dtA @
1 0
tZn
tn
1 (t)
1 0
C B
@
tZn
tn
2
A2n
2
12
1 (t) dtA
Bn2
3
1
1
C
Bn2 (t) dtA
1
1
C
Bn
2
1 (t) dtA
Ztn
tn
C B
Bn2 (t) dtA [@
An
1
@x0n 2 @x0n
@2R
@x0n 1 @x0n
@2R
@x02
n
C
1 (t) dtA
]+
1
C
2 (t) dtA
> 0;
according to the Cauchy-Buniakovski-Schwarz’s inequality, follows that the system
(9) have unique solution x0n 2 ; x0n 1 ; x0n : Consequently, there exist an unique point
x00 ; x01 ; x0n
0
0
2 ; xn 1 ; xn
R x00 ; x01 ; x0n
2 R5 for which the residual
0
0
2 ; xn 1 ; xn
is minimal. Because
(F; x) =
q
R x00 ; x01 ; x0n
0
0
2 ; xn 1 ; xn
;
we infer that for this point, the quadratic oscillation in average, (F; x) is minimal.
******************************************************************************
Surveys in Mathematics and its Applications 1 (2006), 41 –49
http://www.utgjiu.ro/math/sma
47
Optimal alternative to smooth interpolation applied in diabetology
From (3) follows that F 2 C 1 [t0 ; tn ] ; F 2
= C 2 [t0 ; tn ], but F 00 is piecewise contin00
uous. Then, F is bounded.
Let F x00 ; x01 ; x0n 2 ; x0n 1 ; x0n the smooth interpolation function de…ned by his
restrictions in (3) and obtained in the above theorem. For this function we have the
error estimation obtained below.
Theorem 3. If xi ; i = 0; n are values of a function f : [t0 ; tn ] ! R, that is
f (ti ) = xi ; 8i = 0; n and if f 2 C 1 [t0 ; tn ] with Lipschitzian …rst derivative, then the
function F 2 C 1 [t0 ; tn ] given in (3) realize the piecewise smooth interpolation of the
function f on the knots ti ; i = 0; n and the following error estimation holds :
F kc 6 L0 + M
kf
maxfh2i : i = 1; ng;
(10)
where L0 is the Lipschitz constant of f 0 and
M = maxfmax( Fi00 (ti
1)
; Fi00 (ti ) ) : i = 1; ng:
Proof. Consider ' = f F: Since f (ti ) = F (ti ) = xi ; 8i = 0; n; we infer that
' (ti ) = 0; 8i = 0; n: Therefore, for any i = 1; n there exist i 2 (ti 1 ; ti ) such that
'0 ( i ) = 0:
For any t 2 [t0 ; tn ] there exist j 2 f1; :::; ng such that t 2 [tj 1 ; tj ]: We have,
jf (t)
Z
t
tj
( f 0 (s)
f0
F (t)j =
Z
t
tj
j
+ f0
j
j
+ Fj00
C
[f 0 (s)
F 0 (s)]ds
1
F0
j
+ F0
j
F 0 (s) )ds
1
Z
t
tj
(L0
s
s
j
)ds
(L0 + Fj00
C
) h2j :
1
Since Fi00 is …rst order polynomial 8i = 1; n we get
Fi00
C
= max( Fi00 (ti
1)
; Fi00 (ti ) );
and obtain the estimation (10). We conclude that similar error estimation holds for
the smooth interpolation function F x00 ; x01 ; x0n 2 ; x0n 1 ; x0n :
4
Application
From the above section follows that the presented method optimally improves on the
…rst two knots and on the last three knots, the Akima’s method from [1]. Moreover,
gives the error estimation of order O h2 : This numerical method is used to obtain
******************************************************************************
Surveys in Mathematics and its Applications 1 (2006), 41 –49
http://www.utgjiu.ro/math/sma
48
A.M. Bica, M. Degeratu, L. Demian and E. Paul
a soft applicable in diabetology at the …tting of glycemic pro…le experimental data.
The soft was created in C# and was tested on data harvested in
October 2006
for …ve patients.
As example, for the patient no. 4 blood- glucose levels (in mg/dl) was measured
at the hours 7:00,9:30,12:30,15:00,18:00,20:30,0:00,3:00 and the values obtained were
120,92,114,135,110,130,105,86 (in mg/dl). Variation trends on those moments were :
-11.20, 7.33, -0.99, 8.37, -7.20, 11.60, -14.53, 0.93. The graphic result of this patient
is:
Graphic for patient no. 4
The presented method is su¢ ciently accurate in the aim to approximate the daily
evolution of the blood glucose levels (continuously given by the Holder program)
and cheaper than the Holder method which use a consumable enzyme. Therefore,
represent a more economic method.
References
[1] H. Akima, A new method for interpolation and smooth curve …tting based on
local procedure, J. Assoc. Comput. Mach. 17 (1970), 589-602. Zbl 0209.46805.
[2] A. M. Bica, Mathematical models in biology governed by di¤ erential equations,
PhD Thesis Babeş-Bolyai University Cluj-Napoca 2004.
[3] A. Bica, Lyapunov function for a bidimensional system model in the blood glucose
homeostasis and clinical interpretation, Int. J. Evol. Equ. 1, no. 1 (2005), 69–79.
MR2144218 (2005m:92010). Zbl 1094.34029.
******************************************************************************
Surveys in Mathematics and its Applications 1 (2006), 41 –49
http://www.utgjiu.ro/math/sma
Optimal alternative to smooth interpolation applied in diabetology
49
[4] A. M. Bica, M. Curil¼
a and S. Curil¼
a, Optimal piecewise smooth interpolation
of experimental data, Proceedings of ICCCC2006 (International Conference on
Computing, Comunications, Control, 2006), Oradea, 74-79.
[5] C. Iacob(ed), Classical and modern mathematics, vol.4, Ed. Tehnica, Bucharest
1983 (in Romanian).
[6] K.Ichida, F.Yoshimoto and T. Kiyono, Curve …tting by a Piecewise Cubic
Polynomial, Computing 16 no. 4 (1976), 329–338. MR0403168(53 #6981). Zbl
0321.65010.
Alexandru Mihai Bica
Marian Degeratu
University of Oradea,
University of Oradea,
Department of Mathematics and Informatics,
Department of Mathematics and Informatics,
Str. Universitatii no.1, 410087, Oradea,
Str. Universitatii no.1, 410087, Oradea,
Romania.
Romania.
email: smbica@yahoo.com, abica@uoradea.ro
email: mariand@uoradea.ro
Luiza Demian
Emanuel Paul
University of Oradea,
University of Oradea,
Faculty of Medicine and Pharmacy,
Department of Mathematics and Informatics,
Str. Universitatii no.1, 410087, Oradea.
Str. Universitatii no.1, 410087, Oradea.
Romania.
Romania.
email: paul_emanuel21@yahoo.com
******************************************************************************
Surveys in Mathematics and its Applications 1 (2006), 41 –49
http://www.utgjiu.ro/math/sma
Download