Selection of the Form and Determination of Parameters of an Empirical Formula on the Minsk-1 Electronic Digital Computer
Abstract Generated abstract
This paper addresses the practical problem of deriving an analytic empirical formula from tabulated or instrument-recorded data for engineering applications. It outlines an algorithm for choosing among seven two-parameter monotone function forms by comparing mean-based diagnostic equalities, then linearizing the selected form and estimating its parameters by the method of least squares. The work also describes a program flowchart for the Minsk-1 digital computer that performs numerical conversion, formula selection, parameter calculation, computation of fitted values, and reporting of pointwise deviations and aggregate error measures.
Full Text
Selection of the Type and Determination of the Parameters of an Empirical Formula on the Minsk-1 Digital Computer
G. L. Kalinichenko
(Presented by the scientific seminar of the Department of Computer Engineering, TPI)
In studying a particular physical phenomenon, an engineer obtains some functional dependence between two quantities, expressed in the form of a table of values or as a graph on an oscilloscope or some other instrument. The problem arises of finding, for this functional dependence, an analytic expression, usually given in the form of a polynomial or other simplest elementary functions; that is, of obtaining an empirical formula whose values, for the given values of the argument, would differ as little as possible from the experimental data.
It is known that the construction of an empirical formula consists of two stages: 1) determining the general form of the formula, 2) determining the best parameters of this formula.
Although these questions have been worked out in detail in the specialized literature, for the engineer these tasks present certain difficulties, most often connected with a large volume of computations. This article gives the basic concepts concerning the selection of the type of empirical formulas, briefly discusses the method for computing the parameters of an empirical formula, and describes a flowchart of a program for selecting the type and parameters of an empirical formula and for finding the deviations at each point from the values found by the selected formula.
The parameters of the empirical formula are found by the method of least squares.
Selection of the Type of Empirical Formula with Two Parameters
For a monotone function given in tabular form, we find an empirical formula from the following seven types:
\[ \begin{gathered} 1.\ y=ax+b;\\ 2.\ y=xa^b;\quad 3.\ y=a\cdot b^x;\quad 4.\ y=a+\frac{b}{x};\quad 5.\ y=\frac{1}{ax+b};\\ 6.\ y=\frac{x}{ax+b};\quad 7.\ y=a\cdot \ln x+b— \end{gathered} \tag{1} \]
according to the following algorithm.
From the table of the given function, for the extreme values of the independent variable and the dependent variable we find the arithmetic-
arithmetic, geometric, and harmonic means according to the formulas
\[ \bar{x}_1=\frac{x_2+x_n}{2};\qquad \bar{x}_2=\sqrt{x_1x_n};\qquad \bar{x}_3=\frac{2x_1x_n}{x_1+x_n}; \]
\[ \bar{y}_1=\frac{y_1+y_n}{2};\qquad \bar{y}_2=\sqrt{y_1y_n};\qquad \bar{y}_3=\frac{2y_1y_n}{y_1+y_n}. \tag{II} \]
Then, for each \(\bar{x}_i\), \(i=1,2,3\), by the formula of linear interpolation
\[ y(\bar{x}_i)=y_k+\frac{y_{k+1}-y_k}{x_{k+1}-x_k}(\bar{x}_i-x_k), \tag{III} \]
where \(x_k\) and \(x_{k+1}\) are intermediate values between which \(\bar{x}_i\) is contained \((x_k-\bar{x}_i<x_{k+1})\).
If the values of the tabulated function lay exactly on one of the above-listed formulas, then the following equalities would hold.
For the linear function—\(\bar{y}_1=y(\bar{x}_1)\); for the power function—\(\bar{y}_2=y(\bar{x}_2)\); for the exponential—\(\bar{y}_2=y(\bar{x}_1)\); for the logarithmic—\(\bar{y}_1=y(\bar{x}_2)\); for function 4—\(\bar{y}_2=y(\bar{x}_1)\); for function 5—\(\bar{y}_3=y(\bar{x}_1)\); for function 6—
\[ \bar{y}_3=y(\bar{x}_3). \tag{IV} \]
Since each of these functions describes the tabulated function approximately, the equalities will be approximate. We choose that empirical formula for which the most accurate approximate equality will be obtained. For this purpose we first find the moduli of the absolute errors of the approximate equalities.
Then the selected formula is linearized by means of the corresponding substitutions. For this straight line in curvilinear coordinates, its parameters are found by the method of least squares. Then we find the parameters of the corresponding curve in the original coordinate system.
Brief description of the program flowchart
- Conversion of numbers from the decimal system to binary.
- The \(x_i\) and \(y_i\) are found according to formulas II).
- \(y(x_i)\) is computed according to formula III).
- The moduli of the absolute errors of the approximate equalities IV) are compiled.
- The smallest modulus of the absolute error is found.
- It is established which function corresponds to the smallest modulus of the absolute error, and the corresponding number of this function is printed.
- The selected function is linearized.
- The parameters of this function are found by means of a special subroutine.
- The value of the function is computed according to the formula found.
- By means of a special subroutine, the values of the function according to the formula found and the corresponding deviation are printed.
- At the end, the arithmetic mean deviation and the sum of the squares of the deviations are printed.
- Control is transferred to 5, where the smallest modulus of the absolute error of the remaining 6 functions is found, and 6, 7, 8, 9, 10, 11 are again carried out. After this, stop.
References
-
B. P. Demidovich, I. A. Maron, E. Z. Shuvalova. Numerical Methods of Analysis. IFML, 1962.
-
V. M. Savenkov, V. V. Shurakov. Programming for the Minsk-1 Digital Computer. Vysshaya Shkola Publishing House, Moscow, 1964.
-
V. A. Malyshev. An Interpreting System for the Minsk-1 Computer. Izv. TPI, vol. 187. Proceedings of the Computing Laboratory. TSU Publishing House, 1974.