An algorithm for solving of Euler parameters differential equations system

The design an optimal numerical method for solving a system of ordinary differential equations simultaneously is described in this paper. System of differential equations was represented by a system of linear ordinary differential equations of Euler’s parameters called quaternions. The components of angular velocity were obtained by the experimental way. The angular velocity of the centre of gravity was determined from sensors of acceleration located in the plane of the centre of gravity of the machine. The used numerical method for solving was a fourth-order Runge-Kutta method. The stability of solving was based on the orthogonality of a direct cosine matrix. The numerical process was controlled on every step in numerical integration. The algorithm was designed in the C# programming language.


INTRODUCTION
The goal of this contribution is that the published research supplement the missing part of many scientific books and scientific articles dealing with spacecraft attitude dynamics of rigid body movement in three-dimensional space. Determination of the dislocation of a certain moving frame of the system is a very important part of applied dynamics. One of these cases refers to the robotic arms movement as defined in [5]. In even a specific case is the problem to determine the dislocation of the whole moving body in three-dimensional spaces. This case refers to a moving vehicle on the ground with respect to an inertial coordinate system. There are many methods how to determine body dislocation, for example, using GPS. But using GPS giving only coordinates of moving objects with no acceptable precision. On the other hand, the data obtained from sensors of acceleration or gyroscopic gauge, giving the more Slovak University of Agriculture in Nitra :: Institute of Statistics, Operation Research and Mathematics, Faculty of Economics and Management :: 2021 2 usable data set. Angular velocities can be utilized by the system of quaternion differential equations (SQDE) [10]. Derivation of SQDE was published by [2,3,6]. The analytical method of solving the system of simultaneous linear differential equations (SLDE) was published by [4]. The application of the numerical integration method to solve ordinary differential equations was published by [8]. The numerical solution of SLDE was published by [9,11]. Matrix notation of the quaternion vector space was analysed by [1,7]. The exact and clear description of numerical solution SQDE is presented in this contribution with the utilization of matrix formalism and C# programming language.

Measurement system and object
An object for measurement was a municipal services tool carrier Reform Metrac H6X. The machine on duty is depicted in Figure 1. The basic parameters and centre of gravity dislocation of the machine were published in [10]. For the measurement of accelerations of the machine were used the ADXL 345 sensors. The sensor measured accelerations in the XYZ axes. The sensors were dislocated in the plane of the center of gravity of the machine where the z-coordinate dimension was zero with respect to the center of gravity. Mounted sensors are depicted in Figure 2. We were provided an experimental ride with a machine with a defined trajectory as depicted in Figure 1. For application, we used the data from the ride down direction along the downhill with turning back to uphill with braking. The relevant accelerations were recorded in real-time [8]. The processed angular velocities of the center of gravity of the machine are depicted in Figure 3.

Numerical method
For stability of numerical solving of system of differential equations, we chose the fourth order Runge-Kutta numerical method. The systems of simultaneous differential equations are in the form (01).
Where the variable n is the count of the differential equations in system and k is the count of discrete points of technical functions in the interval 1, k . In the solutions we assume that the function f , respectively functions 1 f..... n f , are the continuous in the interval j j , 1  and satisfied with the solution on all points. Variable t is the step size of the method.

Simultaneous quaternion differential equations
In most spacecraft applications occur the SQDE in the next form: The equations can be rewritten in matrix form: and without indexation in general form: where:

RESULTS AND DISCUSSION
To design an efficient algorithm we have to rewrite the matrix form (07) to separate single equations system to the form with the derivatives on the left side and other members placed on the right side of the equation. By these steps, we get the system of simultaneous equations (10) as follows: The algorithm has the next structure.

CONCLUSIONS
In this paper, we are dealing with design an algorithm for numerical solving a simultaneous system of differential equations (SSDE). For the model situation, we chose the quaternion differential equation, where the angular velocities we got from the real experiment with an agricultural machine. The aim of this work was to creating and testing the optimal algorithm for solving SSDE. As a programming language, we chose the language Visual C#, where we create the function QTSolver and the function SolveFQP as a subroutine of function QTSolver. The published algorithm was written here in the shortest form with using the indexation of many used variables. The published algorithm has a convention like Visual C# language. The goal of this article is showing the easy way to solve any system of linear differential equations with Runge-Kutta numerical integration method with constant step size. We were chosen the quaternion system of the differential equation as a very suitable example. The benefit of these types of equations is the orthogonality as well as the control of the stability of numerical solving. In the presented example the result of solving are quaternions from which we create the transformation matrix. The determinant of transformation matrix (see Fig.4.) in respect of orthogonality is equal to one. From this assumption, we are able to solve the error of numerical integration (see Fig. 6). The process of solving is very accurate, and the errors values are in the interval 14 14 4.10 ,6.10   .