Научная статья на тему 'Relationship plurality approximation'

Relationship plurality approximation Текст научной статьи по специальности «Математика»

CC BY
69
29
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
APPROXIMATION / ORDINARY LEAST SQUARES / DEPENDENCES PLURALITY

Аннотация научной статьи по математике, автор научной работы — Lukyanov V.D.

An algorithm for the approximation of relationship pluralities is set by linear combinations of functions with unknown coefficients, which in part coincides in all relationship pluralities having been built using ordinary least squares. Examples of the algorithm’s realization, when finding particular solutions plurality of linear nonhomogeneous differential equations, have been given.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «Relationship plurality approximation»

RELATIONSHIP PLURALITY APPROXIMATION

V. D. Lukyanov JSC Avangard, Saint Petersburg, Russia [email protected]

PACS 02.30.Mv

An algorithm for the approximation of relationship pluralities is set by linear combinations of functions with unknown coefficients, which in part coincides in all relationship pluralities having been built using ordinary least squares. Examples of the algorithm's realization, when finding particular solutions plurality of linear nonhomoge-neous differential equations, have been given.

Keywords: approximation, ordinary least squares, dependences plurality. Received: 4 June 2014

1. Introduction

During experimental data processing, there arises a problem of analytical dependence recovery being a linear combination of basic functions with unknown coefficients. It is possible to face this situation when the data obtained in the experiment is not for one relationship, but for several of such equations of curves, that for instance describe the same physical process at different values of external parameters. We assume that these differences in the context of the experiment provide data that lead to analytical dependences, differing from each other by values of some linear combination of coefficients; all other coefficients for relationship pluralities are the same. In this case we shall talk about dependences plurality approximation.

In order to evaluate relationship pluralities, we may face approximation of the solution of linear nonhomogeneous differential equation (LNDE) of N-th order with constant coefficients with special right-hand side:

dNy dN-!y M

dXN + bN-1 dXN-1 + ••• + b°V (1)

m=l

Let R plurality of particular solutions be built when working out R various Cauchy problems for LNDE (1):

N M

Vr = Vr (x) = + Am/m(x), (2)

n= 1 m=1

where r is a serial number of a particular solution, r = 1, 2,..., R; functions ^1(x), tp2(x), ..., (x) are linearly independent solutions of homogeneous equation, the second summand is LNDE particular solution. Coefficients A1, A2, ..., AM are calculated by finding a particular solution for the nonhomogeneous differential equation and they are the same for all solutions. Coefficients C1r), C2r), ... , C^ are calculated from the initial conditions of the Cauchy problem or from boundary conditions and determine LNDE particular solution.

Function (2) is the expansion of yr (x) functions on a given basis, consisting of a plurality of linearly independent functions {^n(x))N and {/m(x)}M.

The set of equations given by representation of function (3) shall be called the relationship plurality, if some of the coefficients of linear functions combination — here they are Ai, A2, ..., Am coefficients — are equal for all relationships of the plurality, and the other coefficients C(r), C2r), ..., CN for varied relationships differ in at least one value. The number of coefficients in function (2) equals NR = M + RN.

We have R equations of dependences plurality for type (2). For each equation of this plurality, we know several pairs of x argument and y(x) function values, however, the function values are known approximately. For the r-th relationship, we have Sr > 0 of xrs argument values with s = 1, 2, ..., Sr and approximate yrs function values. For each relationship argument, values may not match, as well as the number of these values.

R

In total, we have S values for the entire relationship plurality, S = ^ Sr, while

r=1

S> Nr.

We pose the task to determine all NR of analytical dependence coefficients (2) with the help of these data. Briefly, we shall name the task as (M, N, R) task, where M is the number of coefficients whose relationship plurality values are the same, N — number of coefficients whose values are different and R is the number of relationships in the plurality.

To solve the problem, we shall use ordinary least squares (OLS) [1-4]. For the s-th curve of the plurality, with every xrs argument value, we shall calculate a deviation square £(xrs) function preset value yrs of the set function (2) value, while argument value equals: £(xrs) = yrs — yr (xrs. Then, we shall calculate F value — mean square deviation £(xrs) for all argument values:

1 RSr 1 RSV/ N M \ 2

F = ^ EE ¿2(xJ = ^ EE Urs — E C^Wxrs) — E Am/m(xrs) . (3)

r=1 s=1 r=1 s=1 \ n=1 m=1 /

The F function depends on NR arguments: A1, A2, ..., AM coefficients, as well as on all C(r), C2r), ..., Cjr) coefficients with r =1, 2, ..., R.

For brevity, we shall use the designation for two types of function G(x) averaging:

1 Sr

data averaging for r-th dependence Gr = — ^ G(xrs) and averaging over all data (G) =

Sr s=1

1 R Sr i R

y^ y^ G(xrs) = — ^ SrGr. In this designation, it will be F = /¿2\ function.

S s 1

r=1 s=1 r=1

According to ordinary least squares, values of unknown coefficients can be obtained from minimum F function condition. Setting all the partial derivatives of all function arguments to zero is a necessary condition for the function's minimum. Calculating partial derivatives gives:

1 dF / N _\ M _ _

Y^ CirVn(xr)fi(xr M + E A

m \ /m (xr)fi(xr) ) — (yrfi(xr ) ) ,

2 Sr dAi 1

\ra=1 / m=1

when i = 1, 2, ..., M,

S dF ^ ^r M

0 s /r) = E CnVj (xr Vn(xr ) + E Am^j (xr )/m(xr ) — yr (xr ), 2Sr dCj ) n=1 m=1

when j = 1, 2, ..., N.

Equating partial derivatives dF/dA^ and dF/dCjr) to zero, and performing elementary transformations for every r value, we obtain a nonhomogeneous system of linear equations (SLE), which we write in matrix form:

Q(r) + ^A = (B^

iry „ _ (4)

R(r) C(r) + T(r)A = B2r), r = 1, 2, ..., R,

where matrix columns are introduced C(r) = ^C(r), C2r),..., CN^ , A = (A1, A2,..., AM)T,

B(1r) = (^Vr/1 (xr),Vr/2(xr),..., Vr/m(xr)) , B2r) = (yr^1(xr),Vr^2(xr),..., Vr^N(xr)) , T is the operation of matrix transposition, Q(r) = (qmn)M N = ( /m(xr) ^n(xr )) - matrix of

M'N V / M,N

M xN size with qw = /m(xr) ^n(xr), P(r) = l/m(xr )/j (xr) ) , R(r) = (Vn(xr Vj (xr )) ,

V / M,M V / N,N

R(r) = (Vn(xr)<£,• (xr )) elements, in this designations it is believed that during matrix aver-

V / N,N

aging, the averaging of its elements also takes place.

In order to solve SLE (4), C(r) column matrices shall be excluded from its first matrix equation with the help of other R matrix equations. Taking into account the nonsingularity of Q(r) matrix, at all r =1, 2, ..., R, we obtain:

C(r) = (RM)-1 Bfy - (RM)-1 T«A. (5)

Substitution of proportion (5) into the first matrix equation in SLE (4) gives a linear matrix equation for the unknown A matrix, which can be rewritten as

( ' (r)\ /o(r) ^T3(r)N ("

P(r) \ / Q(r) R(r) T(rM A = ( B(rM - ( Q(r) R(r) T(rM .

Assuming nondegeneracy of this equation, we find the required A matrix whose elements are Am coefficients in function (2)

-(_\ \ -( / , /_ ,_N -(.

A = ( P(rA - / Q jr) ( R(rM T(rm ( B (r) ) - ( Q(r) (R(r) ) T(r)

After finding A column matrix by means of formulas (7) we shall calculate C(r) column matrices.

Let us consider the implementation of this technique for solving of some particular (M, N, R) tasks. It is necessary to note that the solution of (1, 1, R) task at approximation of R linear function pluralities Vr = C(r)x + A is given in [2].

2. Function plurality approximation in (1, 1, R) task

Let's define the relationship plurality Vr = Vr(x) = C(r)<^(x) + A/(x). SLE (4) takes the form of:

f 2(Xr }) A + )f (xr ) C(r)) = (yyr f (Xr )) ,

f (xr )A + ^2(xr ) C(r) = ^yr^(X^) , r = 1, 2, ..., R.

C (r) values shall be excluded from the first equation by means of solving of the following R equations:

C(r) = ) — A/(xr)^(xr) ) , (7)

^2(xr) V J

with r =1, 2, ..., R. Exclusion of C(r) values leads to a linear equation for the A value. The solution of this equation has the following form: A = A1/A, where

A1 = (/)) - //(xrr^cxr^N, A = ^) — / f<xr)

) / \ / \ )

After finding A value, we shall calculate C(r) coefficients using function (7).

3. Functions plurality approximation in (2, 1, R) task

Having the relationship plurality, yr = yr (x) = C(rV(x) + Ai fi(x) + A2 /2(x), SLE (4) takes the form:

V(Xr )fi(Xr) C (r)} + /TKXT) Ai + (/i(xr)/2(xr) } A2 = /yr /i(xr) } , Wr )/2(Xr ) C(r) } + (/i(xr )/2(xr ) } Ai + (/2f(Xr) } A 2 = (/a")} , (8)

^2(xr) C(r) + ^(xr)/i(xr) Ai + ^(xr)/2(xr) A2 = yr ^(xr), r =1, 2, ..., R.

From the last R equations, we obtain the following:

C(r) = 1 (V ^(xr) - Ai^(xr)/i(xr) - A2^(xr)/2(xr)) , (9)

^2(xr) v y

with r = 1, 2,..., R. After exclusion of C(r) value from the first two equations in SLE (10) we move to SLE of the second order for matrix A = (Ai, A2)T: VA = D, where V matrix and D column matrix have the following elements:

Vij = (fi(xr )fj (xr )) — ( <^(xr )fi(xr ) ^(xr2)/j (.xr M , = (yr fi(xr A — ( <^(xr )fi(xr ) yr f.(xr. ) \ / \ ^2(xr ) / \ / \ ^2(xr )

where i, j = 1, 2.

Let's find the required A = V-1D matrix. With the help of A1 and A2 coefficients obtained from the function (9), we shall find C(r) coefficients with r =1, 2, ..., R.

4. Second order LNDE partial solutions plurality approximation according to experimental data for partial solutions (task (1, 2, R))

For a second order LNDE, we have a general solution in the form of:

yr (x) = C(rV(x) + C2rV2(x) + A/(x). (10)

Coefficients Cjr), C2r) and A in function (10) shall be obtained from SLE (4):

2

CfV(Xr )/ (Xr )} + ( )/ (xr )} + A/2(xr )} = (yr (Xr )/ (xr )

Jr)J V^r)

Clr) (^i(Xr))2 + C2r) ^i(Xr)^2(Xr) + A <£i(Xr)/(Xr) = yr(Xr)<£i(Xr) , r =1, 2, . . . R, Clr) ^i(Xr)^2(Xr) + C2r)(^2(Xr))2 + A ^2(Xr)/(Xr) = yr(Xr)^(Xr), r =1, 2, . . . R.

(11)

From every r-th pair, consisting of the second and third equation of function (11), we

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

shall express the unknown C(r) and C2r) values, through the sought quantity A:

■/r)

Ci

(r)

Ti2(Xr) - APi2(Xr) A(Xr) :

C

(r) _ T2i (Xr) - AP2i(Xr) ~ A(Xr)

(12)

where

Tj (Xr ) = yr (Xr )^i(Xr ) ■ ^2(Xr ) - ^i(Xr )^2(Xr ) ■ yr (Xr )<£j (Xr ),

Pj (Xr) = /r (Xr)^i(Xr) ■ ^2(Xr) - ^i(Xr)^2(Xr) ■ /r (Xr)<£j(Xr).

Using formulas (12), we shall exclude C(r) and C2r) values from the first equation of function (11). Thus we shall obtain a linear equation for A value, whose solution has the form:

(13)

A = Ai

A = A ,

where

A

/(X)) - ( ,i(Xr )/(Xr ) - ( ,2(Xr )/(Xr ) i^)

P2i(Xr )

A(Xr)

Ai=(y<X)7(X)) - (i^^^r) - ■

5. Example

Figure 1 shows the result of LNDE partial solutions approximation

y" + y + 9.250y = -0.275 sin(4X). Its general solution has the form:

y = Cie-0'5x cos(4x) + C2e-0'5x sin(4X) + 0, 3 sin(4X).

In order to set the initial data, values of x arguments in function (14) have been obtained using a generator of uniformly distributed random numbers in the interval [0,3] for curves 1 and 3, and in the interval [1,2] for curve 2. Initial data for approximation, simulating experimental values were obtained after addition of calculated values, according to function (14) with the values of normally distributed random variable with zero mean of distribution and mean-square deviation a = 0.1.

Initial data are marked at Fig. 1: crosses — for the first solution, points — for the second, squares — for the third one. Solid lines — graphics of functions approximating initial data, where the coefficients are calculated according to functions (12) and (13). Dashed lines shows a dependence diagram of type (14) with coefficients Ci = 1, C2 = 1 (curve 1), Ci = -1, C2 = 1 (curve 2), Ci = 0, C2 = 1 (curve 3).

Figure 2 compares the proposed OLS method of relationship plurality recovery and a traditional OLS for one relationship. We approximate the data for curve No. 2 at Fig. 1. Dashed and solid lines are taken from Fig. 1 and are constructed by method of relationship plurality approximation. Dash-dot line is the reconstructed relationship of a private solution

A(xr)

T2i (Xr ) '

(14)

2

-1.5 -

"2 0 0.5 1 1.5 2 2.5 3

Fig. 1. Results of approximation of family of private solutions of LNDE

only according to data for curve No. 2. The calculated formulae are obtained by solving a SLE, if we assume that there is only one relationship (R = 1). An unsatisfactory result on the last relationship recovery at [0, 3] is explained by small data quantity for this curve, grouped near the middle of the gap. However, curve approximation as a representative of curves plurality gives quite a satisfactory result.

The proposed OLS usage for analytical relationship plurality approximation allows consideration of a certain function feature, combining them into a plurality. Relationships are set by a linear combination of known functions with the desired coefficients. Analytic plurality properties are given by the fact that a part of linear combination coefficients are the same for all the relationship pluralities. Coefficients are calculated using OLS, which provides a minimum of the average of data deviation square for all functional relationship pluralities. Combining data for all functional relationships leads to good results for their approximation, even when only having a small amount of data for some of the relationships.

Practical application of the proposed approximation algorithm of function plurality showed the recovery efficiency for the analytic dependence, included into the relationship plurality, with insufficient quantity of measured values or with unsuccessful location of interpolation point of some curves in this plurality. Availability of data for other plurality relationships allows quite satisfactorily the approximation of the equation and these curves.

y

i f 4

\S V \\i

« M,

/LA ¿w \ t /

11

" 0 0.5 1 1.5 2 2.5 3

Fig. 2. Comparison of two approximations of one of solutions of LNDE. The first approximation (the continuous line) is received with use of all data for family of curves. The second approximation (the dash-dotted line) — according to the data noted by points, only for this decision. The shaped line — the exact solution of LNDE

References

[1] Kobzar' A.I. Applied Mathematical Statistics. For Engineers and Scientists. Moscow, Fizmatlit, 2006.

[2] Seber G.A.F. Linear Regression Analysis. John Wiley and Sons. New York, London, Sydney, Toronto, 1977.

[3] Williams E.J. Regression Analysis. New York, Wiley, 1959.

[4] Sprent P. Models in Regression and Related Topics. London, Methuen, 1969.

[5] Lukyanov V.D. On the Issue of Interpolation Approximation Polynomial Construction. Nanosystems: Physics, Chemistry, Mathematics, 3 (6), P. 5-15 (2012).

i Надоели баннеры? Вы всегда можете отключить рекламу.