Applying Newton's second order optimization method to define transition keys between planar coordinate systems

. The article considers the theoretical component of Newton's second-order method, its main advantages and disadvantages when used in geodesy. The algorithm for determining the minimum of target functions by the Newton method of the second order was studied and analyzed in detail. Parameters of connection between flat rectangular coordinate systems are calculated. The task of determining the transition keys is relevant for geodesy. Comparative analysis of Newton's method with the method of conjugated gradients was carried out. The algorithm for solving this problem was implemented in the Visual Basic for Applications software environment. The obtained data allow us to conclude that the Newton method can be used more widely in geodesy, especially in solving nonlinear optimization problems. However, the successful implementation of the method in geodetic production is possible only if the computational process is automated, by writing software modules in various programming languages to solve a specific problem.


Introduction
In solving some marketing and geodetic problems (scanning moving objects, calculating transition keys, calculating deformations of various structures), the speed of obtaining the determined parameters, as well as automation of the computing process, plays a special role. The development of geodetic instruments has put the solution of many geodetic problems at a new technological level. So in his works A.A. Kuzin and others [1], as well as Tsvetkov V. Y., & Oznamets V. V [2] used satellite and laser equipment in solving classical geodetic problems. Thanks to modern scanning systems, robotic tacheometers, the surveyor in a short period of time is able to obtain a huge array of data about the object without direct contact with the object [3]. The presence of a large amount of source data provides the ability to calculate the desired parameters repeatedly, which increases the reliability of the obtained parameters. As is known from the theory of mathematical processing of geodetic measurements, nonlinear problems for which it is necessary to create nonlinear target functions with redundant measurements need to optimize the process of calculating the determined parameters. Therefore, the question of the use of computer technologies in geodesy is very relevant. Since it is most often necessary to create software modules for information processing to implement new measurement processing methods. Influence of computer technologies on geodetic production is noted in works [4][5][6].
 From a large number of solutions, the surveyor needs to choose the optimally correct solution. Traditionally, optimization problems in geodesy are solved using the following algorithm:  Determining preliminary values of the desired values (parameters).  The desired parameters are connected by the objective function to the measured values.
 The objective function is approximated (in non-linear problems) by decomposing the objective function into a Taylor series (only first-order derivatives are taken into account in linearization) and finding the extremum of the objective function taking into account previously created constraints (least squares or modules method, etc.).
 Correction to preliminary values of parameters is calculated and equalized values of desired values are obtained.
Many optimization geodetic problems can be solved using classical equalization methods. However, parameters can also be searched using different methods. For example, J. L. Awange and E.W. Grafarend [7] considered the use of non-linear programming methods in geodesy. The methods of this group are quite diverse and have a branched classification and structure. However, you cannot choose one method that would solve all marketing and geodetic problems without exception. It should be said that gradient methods, which are often used in optimization, have found their application in geodesy, so J. Li, et al. [8] used this method to determine the orientation parameters of stereoparas. Gradient methods were also used in the equalization of geodetic constructions [9].
It should be noted that non-linear programming methods use partial derivatives of different orders to find the extremum of the objective function. This should be taken into account, since in the presence of a large number of defined parameters, it is not always possible to calculate derivatives in an analytical way, which is simpler to implement, compared to the numerical method. Therefore, many nonlinear problems take quite a long time to prepare for the solution -this is the writing of special program modules for the iteration process, the calculation of derivatives and the compilation of matrices (Hessian and Jacobian), as well as the definition of their sign. In this regard some authors (Eliseeva N.N. [10.11]) at the decision optimizing marksheidersko -geodetic tasks, incline to application of direct methods of search (search methods which don't use derivatives in iterative process).
Nonlinear programming methods using derivatives to determine the minimum (maximum) of a function, compared to direct search methods (an iterative process occurs without using derivatives), have the following advantages: -A large number of previously developed methods that can be put into practice.
-Allow solving systems of nonlinear equations without forming linearized parametric equations.
-Possibility of combining different methods and algorithms with each other to obtain a new method.
We can say that the use of non-linear programming methods in geodetic production is a very relevant topic, because a large class of geodetic problems is associated with the processing and obtaining of the desired parameters by solving nonlinear equations. An example of such problems is: finding parameters of communication between different coordinate systems, this problem was solved by J. Yan etc. [12], as well as other authors [13,14]. The design and equalization of geodetic networks, and the construction of digital models of terrain, the importance of accurate solution of these problems is justified in the works [15][16][17]. The determination and prediction of deformations is also an important aspect of geodetic production. In solution of these problems nonlinear equations are used, methods of deformation determination are considered in works [18,19]. All the above mentioned problems are related to solving nonlinear equations, as well as to processing a huge amount of data array.
In recent decades, there has been a widespread introduction of computers into geodetic production, this made it possible to use not only classical methods of processing geodetic measurements (correlate and parametric equalization), but also to experiment and use other methods to obtain defined parameters. The development of computer technology and various programming languages has made it possible to solve many problems that were not possible to solve before in computer-aided design systems [20,21]. The article provides a study of the possibility of using non-linear programming methods in calculating the transition parameters between planar coordinate systems.

Materials and methods
The article discusses in detail Newton's second-order method. The method is included in the group of methods of nonlinear programming, for the implementation of which, information about the value of the function at the point, as well as about derivatives of the first and second order [22] is required. The method is well studied in optimization theory and has been used by Y. Dang and S. Xue [23] as well as other authors [24,25] for practical purposes. However, its practical significance for engineering geodesy and marksmanship is still poorly understood. The essence of Newton's second-order method is the quadratic approximation of the objective function. To infer the basic formula of the method, it is necessary to decompose the original objective function ( ) into a Taylor series, in which you need to consider the first three terms [22]. The following is a number (1): where is the approximation to the minimum point in the q-th approximation; ′ ( ) -the value of the first derivative of the function ( ) at the point ; ′′ ( ) -the value of the second derivative of the function ( ) at the point ; = +1 − . To determine the extremum in the direction , need to differentiate the function ( ) for each of the components and equate the resulting expression to zero. The formula will look like this (2): Expressing the variable +1 from formula (2), one can derive the main iterative formula of the Newton method of the second order (3): where is ′ ( ) -the first derivative of the function ( ) at the point ; ′′ ( ) -the second derivative of the function ( ) at the point ; +1 -is the approximation to the minimum point in q + 1 approximation.
By writing the expression (3) in matrix form, we obtain the formula (4), by which an iterative search is built for the multivariate case: where is -matrix of first order derivatives of the objective function ( ) ; −1the Hesse inverse matrix, (a matrix of second-order partial derivatives of the objective function ( )); -vector column of calculated parameters in q-th approximation; +1 -vector column of calculated parameters in q+1 -th approximation [22].
The convergence rate, as well as the direction of the search, depends on the Hesse matrix The creation and definition of the sign of the Hesse matrix are considered the main disadvantages of the second-order Newton method, this idea is confirmed in the works [26][27][28], therefore this method has been little applied in practice. Since the calculation of the matrix of second partial derivatives is a rather complex process, if you do not use computers for automation, therefore, previously the most common optimization methods in geodesy were gradient methods. The advent of personal computers made it possible to automate the process of calculating the Hesse matrix. The main advantage of using computers is the ability to calculate derivatives in a numerical way using the method of difference schemes.
Using the Newton method, it is necessary to determine the sign of the Hesse matrix on each approximation, according to the Sylvester criterion. If the Hesse matrix has a plus sign, that is ( ) > 0, the search direction will be directed to reach the minimum point. In approximations where this condition is not met, the extreme point is searched using other methods, most often gradient. When using gradient methods, the search direction is calculated using the formula (6):  where is -the amount of step of one approximation can be constant or calculated on each iteration again.
 From the above we can conclude that when solving the problem by the Newton method of the second order, it is necessary:  Create a target function.  Select the preliminary value of the parameters to be defined (an important condition is that the values are in the convergence region of the method).
 Specify exit conditions for the iterative process.  Calculate the matrices of the first and second derivatives, and also determine the sign of the Hesse matrix.
 Calculate the approximation by formula (4) and check the exit condition.

Obtained results
The article discusses the use of the second-order Newton method using the example of calculating the transition keys between flat coordinate systems. During marketing and geodetic work (tunnel scanning, as-built survey), the task of converting the coordinates of points from a conditional rectangular coordinate system to a global coordinate system often arises. Transformation of coordinates in geodesy is quite urgent problem, O. Akylmaz noted in his work [29]. This problem is solved uniquely and with high accuracy in the presence of transient parameters (keys) 0 , 0 , , (Fig. 1).

Fig. 1. Graphical representation of transition parameters.
To recalculate the coordinates of points from one system to another, you must define linear offset parameters 0 , 0 one system (conditional) relative to the other (local) coordinate system. Also calculate the flip angle and scale factor . The values of the transition keys (parameters) are unknown and can be either learned in special organizations or, most often, calculated from reference points whose position is known in both coordinate systems. If there are more than three datum points, an optimization task occurs. You can recalculate the coordinates of points from the global coordinate system ( ) to the conditional coordinate system ( ) using the equation system (7): where is , -coordinates of points in the global coordinate system; , coordinates of points in a conditional coordinate system; -the number of points whose coordinates you want to convert.
Minimization of the sum of squares of corrections (8) was chosen as the objective function: The correction can be calculated by formula (9): Using Newton's method to the objective function (8), a search process was performed to find the minimum point. The data obtained during the search are shown in Table 1.
For comparison with the second-order Newton method, the problem of determining transition parameters was solved using the conjugate gradient method, which is also part of the group of non-linear programming methods and only the values of first-order derivatives are necessary for the search process. The transition parameters are defined in the MathCAD15 environment using the Minimize () function. The data obtained during the iteration process are shown in Table 2. In Fig. 2. shows a simplified visualization of comparing the work of two methods when searching for a parameter 0 . Since the successful implementation of the second-order Newton method in geodetic production is possible only if the computational process is automated, by writing program modules using a certain programming language, the program "Parameters" was written to calculate the transition parameters (Fig. 3). Visual Basic for Applications was chosen because it is most convenient for automation of geodetic calculations, this idea is confirmed in works [30,31]. The program developed during the study allows you to read the coordinates of reference points from a text file, calculate the value of the objective function, calculate first and second order derivatives, and also determine the sign of the Hesse matrix on each iteration. After the iteration process, all the results are displayed on the MS Excel worksheet.   Table 1 shows that the transition parameters were obtained in five approximations. The criterion for stopping the search process was the value . This value is characterized by the difference module of the value of the determined parameter on the subsequent iteration and the previous one. For linear parameters = 0,0001 m, for angular = 0,00001 radians. Figure 3 shows a simplified visualization of the iterative process, which is performed using the Newton method of the second order. After analyzing Table 1 and Figure 3, it can be concluded that the search process is not built according to a linear law, since increments change hopefully. Increments are different on each iteration. This can be explained by the use of the second derivatives in iterative formula (4). Figure 3 shows that after the first approximation, when calculating the parameter 0 , here is a sharp change in the search direction and in four iterations the value of the sought parameter was obtained. As can be seen from the data presented in Table 2, the values of the parameters by the two different methods are significantly different. This fact can be explained by the fact that the Newton approximation uses second partial derivatives that are responsible for the concavity of the function and allow you to find the smallest value along the curve. While, the gradient method requires values of only the first derivatives (geometrically this is a tangent), so a minimum value can be found only at the ends of the line, and not along. The preliminary values of the parameters also played a role, if you specify them too far from the minimum point, then when using gradient methods, an error accumulates that affects the final values. In Table 2, the value of the objective function ( 0 , 0 , , ) is quite large, although all stop criteria were met during the iteration process. However, if you take the preliminary values of the defined parameters closer to the minimum point, then using the method of conjugate gradients you can get more accurate results. The comparison of the two methods is presented in table 3.

Conclusions
Nonlinear programming methods have a wide field of application, especially in methods using the values of higher-order derivatives. With them, you can solve problems in which the desired parameters change at a high speed. In the work, the second-order Newton method was considered, using it, the transition keys between flat coordinate systems were calculated. In the course of solving this problem, the main advantages of the method were confirmed, namely a high convergence rate (compared to methods using first-order derivatives) and the possibility of using coarse values of preliminary parameters for the iterative process. On the other hand, the main disadvantages of the method were confirmed: this is a highly complex computational process (forming a Hesse matrix and controlling its sign), as well as complex preliminary preparation of the problem for solving. These shortcomings were solved due to the use of computer technologies, in particular, program modules were written, the use of which made it possible to automate the iteration process. In conclusion, methods using higher-order derivatives are a worthy alternative to the traditional methods used in geodesy. Special attention should be paid to quasi-Newtonian methods, in which the Hesse matrix is replaced by an approximating factor, the use of which makes it easier to implement the method. In the future, it is planned to use the Newton method when equalizing geodetic networks.