The method of solution of equations with coefficients that contain measurement errors, using artificial neural network

This paper presents an algorithm for solving N-equations of N-unknowns. This algorithm allows to determine the solution in a situation where coefficients A i in equations are burdened with measurement errors. For some values of A i (where i = 1,…, N), there is no inverse function of input equations. In this case, it is impossible to determine the solution of equations of classical methods.


Introduction
Mathematical models that describe electric dependencies in the receiver tested are built from discrete components. For a full description of such a model, it is required to identify the parameters x i of these elements (see Eq. 1). Most frequently, this identification is carried out indirectly through the measurements of electrical quantities A i on the object tested [5,8]. The parameters sought are determined from the mathematical relations (1) that describe the object.
A 1 ¼ f 1 y 1 ; y 2 ; . . .; y i ; . . .; y N ð Þ A 2 ¼ f 2 y 1 ; y 2 ; . . .; y i ; . . .; y N ð Þ . . . where f i certain functions depending on the model, A i the values measured, y i parameters that describe the model. The classic method to solve Eq. (1) consists in determining inverse functions (2). Measurement inaccuracies that are contained in A i are transferred to parameters y i to be determined.
In some cases, the determination of Eq. (2) may not be possible [14,16]. This means that for adopted coefficients A i , there are no inverse functions g i . Eq. (2) are determined for the values of environment A i and which contain measurement errors. In this case, approximate solutions are sought which satisfy Relation (3).
A i À f i y 1 ; y 2 ; . . .; y N ð Þ j j % 0 ð3Þ The solution will be close to coefficients A i .

An example of a model for identification
The analysis covered a single phase on an induction motor. The purpose of the analysis is to determine current-voltage dependences on the terminals of one motor phase. These relationships can be determined from the model that consists of serially connected elements: R s , L s i e s (Fig. 1). Coefficients R S , L S , E m , u es , a that are being sought represent many of the phenomena that occur in the motor and the system that is driven. For example, the inertia of the rotor and the system driven will affect e s , and the angular velocity will exert an influence on mutual inductances, which are described with L S . When searching for K. Zajkowski  the parameters of the model, the fact is also important that these factors cannot be determined with the engine being stopped. This means that the R S does not reflect the winding resistance and L S does not reflect their inductance. The parameters of the model are defined for a constant load on the machine shaft and for constant rotations. When changing the load, the parameters of the model change, as well.
In this situation, the parameters that are being determined cannot in any way be unified. They should be determined for a specific drive train (the motor and the machine driven). These parameters can vary considerably for the same engine with different mechanical properties of the system driven.
The identification of the model consists in searching for E m , u es , R S , and L S . These parameters can be determined on the receiver [6,7,[9][10][11] by making measurements in the steady state (in the case of an induction motor: during operation with a constant load and a constant speed) in the system as shown below (Fig. 2): According to the model adopted, we know that: In the field of complex numbers, the following can be written: For one mesh, the voltage equation is as follows: where X S ¼ xL S : Next, by transforming (7), we determine current I a : Voltmeter V measures the difference in the supply voltage and in the voltage drop across internal resistance R. Thus, in the field of complex numbers, there will be the following: From Eqs. (8) and (9), one can obtain the following: Knowing that the forces and the current are equal, respectively: We obtain the following equations: Equation (11) is consistent with (1). The coefficients of the model of the receiver that are obtained from the above equations are not determinable for all the input parameters (U V , I a , P W , Q W ). There are those areas that result from measurement inaccuracies where the system of Eq. (11) has no solutions.
It was found that these coefficients cannot be determined using the Newton's interpolation algorithm [15,16]. There are no functions that are inverse to Eq. (11), either.  Process time constant 1/a that is being sought, and which is mainly related to the inertia of the rotor and the system driven, can be determined experimentally by observing the course of voltage versus time at the motor terminals immediately after commutation.
In [13], the authors proved that amplitude E S can be equal to amplitude U. In this paper, it was also observed that frequency E S is similar to the frequency of the mains voltage. It was also noted that phase shift u es is equal to 0.
In this model, it is assumed that the frequencies of both sources are identical. This assumption does not substantially affect the results of further simulations.

Construction of an artificial neural network
Coefficients E m , R S , and L S can be determined from Eq. (11) using a neural network. The network input parameters contain measurement errors. Due to the nature of the adopted activation function [1][2][3], the output neuron of the output layer must be within range y 2 0; 1 ð Þ. The initial values were as follows: Training of the network must be for those learning i that do not contain any measurement errors. Learning vectors are constructed from Eqs. (1) or (11) for random values y 1 , y 2 , y 3 that lie within the set of permissible changes, and which is limited with values a and b [4,12]. The test vector is built according to Fig. 3 for values y i that are not contained within the training set.
The neural network was built in a VBA environment in EXCEL.
The script associated with the button in Fig. 4 determines the random values: Further values U v , I a , P w and Q w are determined from Eq. (11).
After tests of several neural networks, a decision was made to build a neural network with topology ( Fig. 5), with one hidden layer. The weights of neurons are determined by back propagation.
Individual neurons in the network are structured according to Fig. 6.
In the network being built, the following indications were accepted:  x k j ðtÞ ¼ The error at the output of the network for one learning vector r is: The weights of the individual neuron inputs are determined from the steepest descent rule: where gðwðtÞÞ is the vector gradient. From Eq. (16), for any weight in any layer, the following is obtained: Network training is carried out by an incremental updating of weights, that is, each time after the entry of a successive learning vector, responses are determined and the weights are modified. The simulation is continued until the total output error for entire epoch Q * (t) is smaller than the accepted set Q min .
where M is the number of learning vectors in the epoch. The neuron activation function was adopted as a continuous unipolar function of the signum type: where b is the steepness factor.
With low values of coefficient b, the function is usually mild. By increasing b, the plot becomes steeper until the threshold course is obtained. The derivative of the activation function is as follows: The calculation sheet in Fig. 7 allows an observation of the characteristic values of the network tested. Starting of the network training produces a script written in VBA that executes in a loop of a neural network algorithm according to (12) 7 (21) and the block diagram in Fig. 8. The start of the algorithm is possible for the weights that are selected at random from range À1; 1 h i or the reading stored from the previous simulations (Fig. 9).

Learning of the network
The set of learning vectors that form one epoch consists of 200 elements. Owing to the ability to read and write data, it is possible to pause the simulation and to change its parameters during operation [4,12].
Reading of the stored data allows a continuation of the previously stopped simulation. The window in Fig. 9 retrieves the values from the appropriate data sheet (Fig. 10).
The output values of the neurons (Fig. 8a) are determined by analyzing the neurons in layers starting from the input layer; the output layer comes last.   Correction of the values of weights (Fig. 8c) is carried out according to Relation (17).
Network learning factor g from Formula (17) was adopted on the first stage of the simulation as being constant and equal to 0.1. After an analysis of ca. 70,000 epochs, the value of target function Q * (t), which was calculated in accordance with Formula (19), began to oscillate on the level of 1.42. A decrease in Q * (t) occurred only after a reduction in network learning rate g. The correct procedure for the network training should provide for an ability to change this ratio during the analysis (Fig. 11).
Oscillations around the optimal solution are manifested with a momentary increase in the value of Q * (t).
Once the required value of Q * (t) from Eq. (19) has been reached, the network test is performed (Fig. 12).

Network test
The network test consists in determining the values of U V , I a , P W , and Q W from Relation (11). These values are then substituted into the neural network input, whose solution is R S , L S , and E S . The window in Fig. 12 also allows a determination of the network's solution for a selected set of weights. Table 1 illustrates the network test for randomly selected values of R S , L S , and E S .
The relative error for all the output neurons for the randomly adopted input vectors is: The total network error for the accepted values of R S , L S , and E S are: The percentage error made by the network is determined from the largest error (the top bar in the chart in Fig. 13), and it is equal to 26.8 %.

Conclusions
The large error value is shown for the input values that occur least frequently in the training set. An improved performance is possible by enlarging the training set or by reducing the range of acceptable changes of the values being sought.
Neural Network with η-learning rate Owing to the method presented of the selection of the electrical model parameters from the values that are measured on the receiver, it is not required to build any complex physical and electrical dependences. The engineering method of voltage, current, and power measurement allows one to determine the parameters of the model for constant electrical and mechanical conditions in the engine. The method presented is particularly useful in situations where measurement errors make it impossible to solve Eq. (2).
Building of a network with the use of the VBA environment is relatively simple. It requires the knowledge of the language basics. An important advantage of this approach is the ability to build its own networks of any topology. The design loop iteration depends largely on how one defines those variables that describe the network.   where Lweights is the number of weights of all neurons.This solution facilitates the construction of a loop program, but special attention is to be paid to assigning the weight number with the neuron number.
An alternative is to build one's own variable (using the opportunity to build one's own type of variables) that represents the neuron, and then group all the parameters that describe the type of the neuron in this variable. This approach will make the program more transparent, but there are problems in the construction of iterative loops. This will make the source code longer and will require more CPU load.
Open Access This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.