Use of fractal analysis to evaluate the surface quality of agricultural machinery parts

The research of the determination of the fractal characteristics of the surface of a material proposes the use of a stationary profilograph and a computer program for calculating the Hurst exponent. The low accuracy of fractal analysis using the well-known computer program Fractan is revealed. A computer program developed in VBA for the fractal analysis of the time series is described. The high accuracy of the algorithms for calculating the Hurst exponent incorporated in this program is shown.


Introduction
In recent years, in the agro-industrial complex the interest towards the mathematical apparatus of fractal analysis to assess such dynamic systems as agroecosystems (for example, studying the dynamics of the humus content in leached chernozem with prolonged use of fertilizers and dynamics of potato yields in various farms of the Leningrad Region) has been observed.
It is worth noting that any time series can be considered as a fractal, including a series formed from the values of the heights of the surface roughness of the material.
It is known that some parts of agricultural machinery have a complex geometric shape. To evaluate the quality of their surface, traditional approaches based on direct measurement of micro roughness are used. Moreover, the obtained measurement results do not allow assessing the correspondence of the surface quality to the specified values adequately. The recently developed approach for measuring the parameters of the surface layer based on fractal analysis (by the numerical value of the fractal dimensionparameter D, or by the numerical value of the Hurst exponentparameter H) makes possible to solve this problem.

Relationship of surface properties and its fractal dimension
Currently, two key features of the formation of surface roughness can be distinguished: • roughness is considered not as a result of the impact of the tool, but as a property of the structure itself; • when processing the material by modern methods, elements arise on the surface whose shape does not correspond to the traditional notions of roughness as a combination of depressions and protrusions.
Given the mentioned features, traditional step-type and altitude parameters do not adequately assess the roughness.
In this regard, work is underway to develop new numerical roughness characteristics. One of them is fractal dimension.
At the moment, the dependences of the surface properties and its fractal dimension are revealed [1,2]: • the relationship of parameter D and tribotechnical parameters (coefficient of friction) of a diamond-like material; • the relationship of the fractal dimension of the surface of the polymer material and the dynamic modulus of elasticity and impact toughness; • the dependence of the fractal dimension of the tungsten surface on the rate of surface etching in the watermonoethanolaminesodium chloride system; • the relationship between the thickness of the polymer, which was obtained in a glow discharge of reduced pressure and the fractal dimension; • the dependence of the durability of samples of martensitic steel on parameter D.
Thus, it can be assumed that for agricultural machinery parts having a complex shape, the fractal surface dimension (parameter D) can be used to assess roughness with subsequent determination of the operational properties of the parts.

EXISTING approaches for direct measurement of the fractal dimension of the surface of a material
Currently, there are the following technical means to measure parameter D [3,4]: • the device for radio-optical measurements (Fig. 1); • scanning probe microscopy. The mentioned device is a prototype and is used for the analysis of the earth's cover. It does not allow performing a fractal analysis of the surface of the material without changing the design and operating modes.
Scanning probe microscopes are high-precision scientific means of measurement technology.
As a rule, the computer programs used to work with them contain the function of calculating fractal characteristics based on the results of scanning a sample.
Gwyddion program is one of such programs. The program is free. It makes it possible to process an image without a scanning probe microscope connected to a computer, and open and process not only files received from the SPM, but also ordinary graphic data (in *.jpeg format, for example).
The fractal dimension in the mentioned software product can be calculated using the following methods: • method of counting cubes; • method of triangulation; • variational method; • power spectrum method.
To study the accuracy of the fractal methods embedded in Gwyddion program, some studies were conducted. The program downloaded two-dimensional images of objects with a known fractal dimension: • Sierpinsky carpet; • Levi curve; • black square; • generated fractal with a known fractal dimension value.
Information on the objects of research and the results of their fractal processing in Gwyddion program is presented in Table 1. However it is worth noting that such microscopes are characterized by high cost, the ability to examine a sample only with certain limited linear dimensions, a small surface scanning area and the need to comply with stringent requirements for measurement conditions (in some cases measurements are carried out in vacuum). This limits the use of scanning probe microscopes in other fields, with the exception of scientific research.
The concept of determining the traditional altitudinal roughness parameters based on the use of a flatbed scanner and a computer program for mathematical processing of images obtained from the scanner is described in [5,6]. The disadvantages of this approach include inaccuracy of measuring the roughness parameters due to the loss of a significant part of the information when scanning a part on a scanner and converting color gradations to numerical values of roughness heights.
In this paper, further development of the mentioned idea is proposed. To determine the fractal dimension of the surface of agricultural machinery, it is proposed to use modern stationary digital profilers. As a rule, they include the possibility of not only obtaining a surface profile, but also saving it as a text file. Such a file is a time series composed of the values of the heights of the roughness of the surface elements. Having a similar twodimensional representation of the profilogram, it is possible to calculate the values of the fractal dimension in a computer program that will mathematically process the time series loaded into it.

4
Mathematical apparatus for calculating the fractal dimension of a time series As noted above, the essence of fractal analysis is to determine fractal characteristics. Most often, the values of Hurst exponent (parameter H) or the values of fractal dimension (parameter D) are calculated. The latter is related to parameter H by a simple mathematical expression.
To calculate parameter H, the Hurst method is used (other names: normalized span method, R / S analysis [4]). This method is based on the following formula: where α is the coefficient (in the classical method α = 1, a number of authors propose other values, for example, α = 0.5 or α = 1.57); τnumber of measurements (row extension); H -Hurst exponent (takes values in the range from 0 to 1); Rtime series deviation range; Stime series standard deviation. The value of parameter H is determined in two ways: 1) exact method: determining the slope of function R/S versus τ constructed on a double logarithmic scale; 2) approximate method: calculation according to the above formula; the Hurst exponent is considered for the last element of the time series.
Using the values of parameter H, one can estimate the time series as follows: • the time series exhibits fractal properties at H = 0...0.5 and at H = 0.5...1; • the time series is described by the Markov process at H = 0.5; and non-Markov process when H = 0...0.5 and at H = 0.5...1.
In addition, according to the value of the Hurst exponent, one can qualitatively assess the dependence of the "past" time series on its possible "future": persistent dependence at H = 0.5...1; anti-persistent correlation at H = 0...0.5.
The value of the fractal dimension of the surface itself is calculated by the following formula (2)

Computer program Fractan
Fractan computer program is being actively used among the scientists in the field of fractal analysis. It is designed to perform mathematical modeling and mathematical data processing. In particular, it contains the possibility of calculating Hurst exponent by calculating the slope of function R/S versus τ (in the calculations the classical value α = 1).
The high popularity of Fractan program is due to the following reasons: • the program is freeware, • algorithms for creating attractors of Henon, Lorentz, Ressel, generation of time series with certain specified parameters; • the possibility to calculate the fractal dimension of a time series; • English and Russian interfaces; • high speed.
There is no information in the literature about the accuracy of the algorithms included in the program, which does not make possible to choose this software product for fractal analysis of the surface of agricultural machinery parts.
In order to determine the accuracy of the Fractan fractal analysis algorithm, the following methodology has been developed.
1. Fractan program was launched and a time series was created in it with the given parameters: the length of the time series, standard deviation and the value of parameter H.
2. The created series was saved to an ASCII file. Each file consisted of the only column, which contained the values of the time series. After creating a text file, Fractan closed.
3. Fractanprogram loaded again. The text file generated in step 2 was opened in it, which was then processed: parameter H was calculated for the entire length of the time series.
4. Steps 1-3 were repeated for other time series with different parameters. Tables 2-3 show the initial data and the results of fractal processing of time series in Fractan program. In all experiments, a time series with a size of 10,000 elements was generated (since, according to [7][8], it is advisable to perform R/S analysis with a series length of more than 2,500 elements).

Development of a computer program for fractal time series analysis
By analyzing the results of evaluating the accuracy of the fractal algorithm of Fractan program, one can assume the reasons for the discrepancy between the obtained results and theoretical and given data. The reasons may be: • errors in the time series modeling algorithm; • errors in the algorithm for calculating Hurst exponent; • the influence of coefficient α used in R / S analysis formula; • combined exposure to any two or all reasons. It is possible to increase the accuracy of calculating fractal parameters of a time series by developing own alternative computer program.
A similar software product should have more features than Fractan program: • calculation of Hurst exponent for various values of coefficient α; • calculation of parameter H in two ways (approximately and accurately).
A software environment like Excel or Calc makes it possible to develop a similar product and ensure the implementation of the above features.
The visual programming language VBA was selected for the development.
The time series load code has the form: Private Sub CommandButton2_Click() 'filename = GetFileName("Select a text file ", , "Text files (*.txt),") filename = GetFileName("Select a text file", ,"Text files(*.dat),") ' other options for calling a function ' text files, no start folder specified ' File name = GetFileName("Select a text file", , " Text files (*.txt),") ' files of any type from folder "C:\Windows" ' File name = GetFileName(, "C:\Windows", "") If filename = "" Then Exit Sub ' exit if the user has refused to select a file MsgBox "  End If Next i 'here it is necessary to write the sorting of the array to find its smallest and largest elements R = maxMassiveFact -minMassiveFact 'we find Alogarithm, etc. Dim A As Double A = Log(R / S) / Log(10) 'we find B Dim B As Double B = Log(alpha * Count) / Log(10) 'we find Hurst Н Herst = A / B End Function To calculate parameter H, it is necessary to enter the values of the members of the series in column "A". In the next step, you need to click on the virtual button on the Excel worksheet (Fig. 5). Then a window appears (Fig. 6) with an area for entering α parameter value.  After executing a special command, a window is displayed with the results of calculating Hurst exponent -H and fractal dimension -D (Fig. 7).

Fig. 7. Calculation of fractal parameters
The proposed computer program makes possible to load third-party time series with a * .DAT file format into it. After loading such a file, column "A" is automatically filled.

Methodology for assessing the accuracy of the developed computer program for fractal analysis of time series
In order to study the accuracy of fractal information processing in the program, the following technique was developed: 1) Fractan program generated a time series with predetermined initial data: the length of the time series, standard deviation, Hurst value H = 0.5.
2) The resulting series using Fractan program is saved in a separate text file in DAT format. This file consists of a column with the values of the members of the series.
3) Excel opens and the time series is loaded into it. 4) Hurst exponent is calculated. 5) Paragraphs 1-4 are repeated for a time series with other parameters. 9 Analysis of the results of the accuracy assessment of the developed computer program for fractal analysis of time series Table 3 shows the comparative results of fractal processing of time series in Fractan program and in the written software product. The table shows that the written program performs fractal processing more accurately: the calculated values of the Hurst exponent are closer to theoretical in comparison with the results of Fractan program (the theoretical value for Gaussian noise is H = 0.5).

Conclusion
1. Fractal analysis makes possible to study not only the dynamic systems of the agro-industrial complex, but also to evaluate the quality and functional properties of the surface of agricultural machinery parts.
2. To determine the fractal characteristics of the material surface, the optimal approach is the combined use of modern stationary profilographs and a computer program for R / S analysis of the time series.
3. In the scientific environment, Fractan is actively used to perform fractal analysis of the time series. The results of evaluating the accuracy of the fractal data processing algorithm showed that Fractan program has low accuracy in calculating the fractal parameters of the time series. So it is not possible to use it for fractal analysis of the surface of agricultural machinery parts. 4. A computer program for fractal analysis of the time series has been developed. The program is written in Excel using visual programming language VBA. The written program performs fractal data processing more precisely: the calculated values of the Hurst exponent are