**Research of the Equipment Self-Calibration Methods for Di**ff**erent Shape Fertilizers Particles Distribution by Size Using Image Processing Measurement Method**

#### **Andrius Laucka, Vaida Adaskeviciute and Darius Andriukaitis \***

Department of Electronics Engineering, Kaunas University of Technology, Studentu St.50-438, LT-51368 Kaunas, Lithuania

**\*** Correspondence: darius.andriukaitis@ktu.lt

Received: 4 June 2019; Accepted: 24 June 2019; Published: 27 June 2019

**Abstract:** The fourth digital revolution of industry makes substantive changes to the rate and methodology of work performance. Machines and robots do the majority of work in robotized and automated factories, while people only supervise them. After an increase of production efficiency, quality control became a critical point. Therefore, quality control systems of computer visions are increasingly installed. The branch of chemical industry requires measurements of quality at as great a frequency as possible. Consequently, indirect measurements are effectively used at this point. This research presents the method of indirect particle measurement. Particles are measured using digital image processing. The algorithm is used for particle measurement to automatically adjust the measurement results. Numerical intelligence is added to the algorithm to increase the accuracy of correction results. The research deals with the problem of matching the results of indirect measurements and the results of the control equipment. For data analysis, fertilizer diameter, mean diameter, aspect ratio, symmetry, sphericity, convexity and some other parameters are used. The mismatch of the artificial neural network results with the control equipment results is slightly higher than 1%.

**Keywords:** image processing; particle; distribution

#### **1. Introduction**

The fourth industrial revolution has already become the present-day reality; the development is greatly influenced by the concept of the internet of things. As technologies interconnect physical and digital worlds together, changes are observed in all living spheres of the state. The largest changes occur in those industries where smart factories are established. Robots, which are replacing employees in production, do not get tired, which allows them to fulfill larger orders. It is essential to ensure required qualitative parameters of production together with productivity growth. It is not enough to provide production in series to quality control anymore. Volumes of quality production increase only by using continuous control and by checking every product [1].

The branch of chemical industry, fertilizer production, requires performance of quality checks as frequently as possible because production capacity amounts to hundreds and thousands of tons per hour. Decreasing utilized agricultural areas and the increase of population determines an increasing demand for fertilizers. Hence the growth of larger and more qualitative harvest requires balanced fertilization of plants. The most optimal result of fertilization is facilitated not only by chemical substances but also their physical parameters—the shape, size, and density of fertilizer granules. Therefore, one of the most significant indicators in the process of fertilizer production is distribution of granules in accordance with their diameter.

Every product, whatever industrial branch it belongs to, is characterized by tens or even hundreds of parameters. Due to increasing capacity of production equipment, human resources are not enough for the periodic inspection of production. Parameters of quality are checked by using indirect measurements, for which measurement errors usually are a typical deviation of the measurement result from the fair value.

Direct measurements of fertilizer granules, which are still widely used, are not effective due to the interval of their performance, which is very long. Measurement intervals are reduced by involving indirect measurements carried out alongside the production line. Different indirect methods are used for the measurement of granule distribution: laser diffraction [2–4], acoustic spectroscopy [5–7], infrared spectroscopy [8], dimensional filtering [9,10], radar [11], technique of sedimentation [12], transmission electron microscopy [13,14], X-rays diffractive spectrum [15], and digital image processing (one of the modern methods based on multistage entropy [16]). The processing of visual information provided additional details about particles. It also assesses the roundness of the product; its distribution is in accordance with its quantity and volume. Not to mention that certain information about the color [17,18] or porosity [19] of the product is received by applying an appropriate system of lighting. Systems of computer vision are applied to establish the distribution of participles in liquids [20] by using microscopes (SEM and TEM) [21,22] applying a three-dimensional technique of measurement by analyzing the surface of the granule sample [23,24] or approximating the segmented image of participles [25–27]. The selection of measurement methodology is influenced by the size of an object. The analysis of digital images is applied to assess participles within the interval of 0.01 to 20 mm. Quality control systems of computer vision are increasingly installed in factories due to their large capacity, reliability, mobility, and ability to process additional information. Of course, image processing results strongly depends on granules roundness. In most cases it is needed to recalculate results.

The results of indirect measurements are strongly influenced by the composition of analyzed sample. Different measurement methods are used to obtain reliable results in comparison with control equipment data. Results of the received distribution could be adjusted according to the distribution average coefficient [28] or compared with several other measurements [29,30]. The light reflection is used for the evaluation of larger particles [31]. The surface shape of particles is evaluated more accurately by three-dimensional images obtained with two cameras [32] or the reflection in mirrors [33]. A laser is often used to obtain the optimal result in conjunction with the image system [34,35].

Most methodologies of particle measurement provided in scientific publications make corrections to the measurement of a specific material alongside different production lines. The results are influenced by the temperature and humidity of a granule mix, including some other factors as well. Granules forming equipment is clogged during production. This affects the size and shape of the granules. Following the changes in the shape of the particles, these processes can be precisely identified, and the line stopped for equipment washing. Correction parameters of the results are established one time by carrying out equipment calibration. A significant change in the production process causes a problem—the noncompliance of measurement results exceeds the allowable errors determined by the international standards. An automated algorithm for result correction can make improvements by taking geometric changes in particles and the results of previous measurements into consideration. The universal algorithm may be applied to a wider spectrum of products. Consequently, the key goal of the research analyzed in the article is to develop an automated methodology of result correction to prepare assessment equipment for granule distribution in accordance with their size. The main aim of this research is to achieve a better correlation results between indirect measurements and control equipment. The goal is achieved by improving computer vision system.

#### **2. Materials and Methods**

One of the essential features of the fourth industrial revolution is the installation of computer vision systems for the inspection of industrial production quality parameters. The shape of fertilizer granules in the chemical industry has more advantages over the powder shape. The transportation and storage of granules are more convenient, segregation of the product is avoided, and production of homogenous mixes is more effective, as well as the process of fertilization. The measuring of granules by using a computer vision system is based on the geometric shape of particles, which, in an ideal situation, is a sphere.

Digital image processing within an indirect measurement is the primary source of information input. By using a video camera, morphological operators set the outlines of particles in the captured images of granule shadows (part of the researchers use image segmentation [36] by solving the problem of particle overlaying [37]). A precisely accurate result of the measurement is received by using well-calibrated equipment (hardware). To optimize the work of the system, it is important to optimize the computer resources for parallel image processing [38]. Optimal exposure duration ensures the identity of the distinguished granule outline with its real outline. The outlines of particles depend on the binarization of the images [39].

The outlines of granule shadows are approximated by an ellipse [40] because this geometric form most precisely assesses roundness of granules. The outline of an ellipse provides certain information about longitudinal and transverse dimensions of a particle, the ratio of which is the meaning of roundness. The results of particle distribution in accordance with their quantity correspond to the results attained by using the control equipment only in the events when the shape of granules is close to the ideal circle (an interval of roundness of 0.95 to 1.00). That depends on the product type, e.g., ammonium nitrate or carbamide constitutes solid round granules. However, such a product as monocalcium phosphate is small, frail and the shape of its particle is distinguished as anisotropic. Consequently, the image processing algorithm must assess an uneven surface of the granule.

The correlation of the results of the digital image analysis with the results of the control equipment is obtained by evaluating the volume of particle. The latter distribution corresponds to the mass distribution. In the production process, the density of the production in the interval of 4–6 hours varies by 5–7%. However, in the sample for the analysis, this difference is abnormally low (<0.1%), so the distribution must be calculated on the total volume of all particles.

The quality of physical features of fertilizer granules is evaluated by the following factors; an average diameter of granules d50, Uniformity Index, SGN (Size Guide Number), and an average square deviation of the granule size. After the sieve correction factor has been applied for the correction of d50 index, the diameter of every analyzed particle is divided by the latter factor. A more effective correction result is obtained by using the advantage of visual particle information, i.e., distribution of roundness. Then, the sieve correction factor is applied to the particles of an irregular shape only because the diameter of the latter ones depends on the position of falling particles in respect of the camera. The diameter of the granules, which is close to the ideal circle, does not require any correction.

By analyzing the visual information of the granules, it was found that the cumulative particle volume distribution curve accurately reproduces the results of the distribution obtained by the control equipment. Only the shadow of the granules close to the ideal circle was evaluated (an example of an image captured by the camera is provided in Figure 1). Such coincidence of the results depends on the roundness of the analyzed particles (higher rounding index), their mechanical resistance, and the number of granules.

**Figure 1.** Shadows of granules digital images were captured with a linear video camera.

The regression model functions are used for the correction of the cumulative curve shape of granule distribution. The essence of this new approach is in that the automatic understanding methods were used to develop new generation system [41]. The establishment of the factors of these functions uses samples measured by the control equipment. Depending on the scope of production process variations, the regression model cannot always recalculate the results accurately. That is related to the changes in distribution of particle roundness. If the roundness average has shifted below the 0.9 ratio of the minimum and maximum diameters, the quantity of round particles is not enough to establish accurate results. The assessment of the remaining particles can be carried out by using the results of previous measurements and the results of the most circular particle distribution of a new sample in accordance with their volume. After carrying out an analysis of granule images, the results, together with the data of previous measurements, are used to establish variables of the regressive function. This operation is performed after the analysis of every sample. The algorithm of the methodology is submitted in Figure 2. The cumulative curve of particle distribution describes the function

$$Q(q,c) = \int\_{d\_{\mu}}^{d\_{\sigma}} \frac{4}{3} \pi \cdot r\_{\text{max}}(q,c) \cdot r\_{\text{min}}^2(q,c) \tag{1}$$

where *r*max is defined in

$$r\_{\max}(q\_\prime c) \cdot r\_{\min}^2(q\_\prime c) = \begin{cases} \frac{r\_{\min}(q)}{r\_{\max}(q)} > c : r\_{\max} \times r\_{\min}^2 \\ 0 \end{cases} \tag{2}$$

where *q*—analyzed particle; *r*min—the minimum approximation ellipse radius of analyzed particle [mm]; *r*max—the maximum approximation ellipse radius of analyzed particle [mm]; *du* and *do*—interval of used sieves [mm]; and *c*—particle round index (ratio of minimum and maximum radius).

**Figure 2.** The algorithm to results correction using the function of polynomial.

An artificial neural network can be used to increase the efficiency of the particle correction algorithm. In scientific articles about particle measurement using image processing, authors use the neural network [42] for approximation of individual particles [43]. However, to achieve that, more resources are needed for calculations. Also, supporting vector machines (SVM) are used for particle measurement for the characterization of digital image classification [44]. In this research an artificial neural network is used to correct the cumulative curve. The general formula of the artificial neural network results in the function of activation:

$$y = q(\sum\_{j=0}^{n} w\_j x\_j) \tag{3}$$

where *wj*—input weights; *xj*—inputs; and *y*—output [45].

The results of particle image analysis together with the control equipment data of the previous measurement are used for the formation of the regression model function.

Linear video camera was used for particle measurement in the research. Due to their high-speed these cameras can capture real-time shadows of the particles falling from the conveyor, because a new image can be captured parallel with sending the image captured before. A frame of practically unrestricted height is attained. A linear video came typically has smaller geometric distortions; that is why they are more easily corrected than the ones of a matrix camera, because only one-dimensional correction of image distortions is necessary. It captures an image of higher resolution and a larger dynamic range. Moreover, the linear video camera has been selected because of better repeatability of the results. The equipment of experiment is submitted in Figure 3.

**Figure 3.** The equipment of the experiment.

By using visual information for the establishment of granule distribution, the minimal diameter of every particle of the sample is assessed. Such classification is an alternative to sieves because it is accepted that a particle can pass through sieves by its narrow par. When carrying out measurements, the volume of every particle is added to the volume of the particles with the same diameter. The intervals of diameters of added particles correspond with sieves. In the end of the analysis, the percentage of the distribution of all granules is attained.

#### **3. Results**

In this section, we used different methods for recalculation of the granules cumulative curve. The results of image processing were not accurate because of the anisotropic shape of granules.

#### *3.1. Measurements Repeatability*

The investigation of the indirect measurement equipment was completed by repeatedly obtaining the same results to evaluate the reliability of the experimental measurements. The roundness of the particles is related to their mechanical strength, which was also included into considered of the repeatability of the results. In the research, two different material (monocalcium phosphate and ammonium nitrate) samples were used. Each sample was measured three times (Figure 4).

**'LVWULEXWLRQE\YROXPHPRQRFDOFLXPSKRVSKDWH**

**Figure 4.** Repeatability of indirect measurement results (particle distribution is estimated by volume).

Additionally, the use of impurities in the production of ammonium nitrate gives better mechanical strength of particles, and therefore they have a better repeatability. Monocalcium phosphate particles crystals are irregular and brittle. This causes the sample deviation after each measurement. A correction of the results is necessary due to the different composition of the particles measurements.

#### *3.2. Cumulative Curve Correction*

The coefficient of sieve correction affects the indicator d50 of the average of particle diameter. The diameters of particles are magnified or reduced by moving the cumulative curve. The coefficient of the correction does not affect the shape of cumulative curve. The results of measurement corrections are provided in Figure 5. The latter method is not reliable, especially with small diameter (<1 mm) particle measurements.

**Figure 5.** The cumulative curve of particle distribution is changed by applying a sieve correction coefficient.

Two samples were analyzed to evaluate of correlation between indirect measurement results and the control equipment results. Ammonium nitrate material was used for the analysis (two samples of 200 g). The results of the analysis showed that, when evaluating only the roundness of the particles, the received values correlate with the standard particle distribution. However, the amount of analyzed particles also affects the result (see Tables 1 and 2 of the results of measurements and Figure 6).




**,QGLUHFWPHDVXUHPHQWRIVDPSOHQRGLVWULEXWLRQE\YROXPH**

**Table 2.** Circularity evaluation results (sample no. 2).

**Figure 6.** Comparison of indirect measurement results by evaluating only roundness particles.

For the analysis of spherical granules, it is enough to evaluate only part of the granules. If at least 75% of the granules fall within the 0.9 to 1.0 range according to the roundness distribution, it is enough to measure the volume of the granules in the interval 0.95 to 1.00 by roundness. This interval includes approximately 30% of all granules. That is directly related to volume calculation. By analyzing a two-dimensional image the smallest and the largest diameters of granules differ by at least 10%; therefore, it may be assumed that the third diameter (oriented towards the depth of an image) will also be different not more than by 10%. However, this tendency is noticed only with round granules. The more particles of an irregular shape there are in the sample, the worse correspondence to the

results is attained by the control equipment. The relative error of the first sample cumulative curve between the control equipment and 5% of round particles is

$$
\delta\_1 = 0.58\% \tag{4}
$$

The relative error of the second sample between cumulative curves:

$$
\delta\_2 = 0.57\% \tag{5}
$$

The first sample (measurement results is provided in Table 1) is consisted of 29322 granules, of which the circular ones were ranked in the interval 0.95 to 1.00 according to the ratio of the smallest and the largest diameters. The number of particles used to find the distribution:

$$Quantity\_1 = 29322 \times \frac{12.42 + 10.79 + 10.16}{100} = 9784\tag{6}$$

The second sample (measurement results is provided in Table 2) is consisted of 30054 particles. The roundest particles from this sample were used to find the distribution by volume:

$$Quantity\_2 = 30054 \times \frac{14.73 + 17.22 + 3.19}{100} = 10560\tag{7}$$

The unplanned changes in production conditions determined problems in the measurement. At that time, it is not possible to rely only on the results of the distribution of a part of the most rounded particles, because the average of the circularity falls below the 0.9 limit. In this case, a correction of results is necessary. One of the most widely used methods is the use of a linear or nonlinear regression model.

The choice of the regression functions used to correct the particle measurement results is influenced by the accuracy which is related to the particle circularity. The experiment determined that the best results are achieved with the linear regression polynomial function (calculation results are presented in Table 3). The test was performed using two samples of monoammonium phosphate, for which four different functions in the MATLAB software environment was adapted.


**Table 3.** Regression analysis (2 samples).

The degree of polynomial function was evaluated in the research with the MATLAB software tools. Depending on the amount of sieve used, the best results were recorded using the 5-grade polynomial function (data of experiment is provided in Table 4). The radical of polynomial is found in the evaluation of round particles and all particles distributions.


**Table 4.** The calculation of polynomial degree (2nd sample).

<sup>1</sup> SSE—sum of squared errors of predictions.

Recalculated results of all sample particles and the results of control equipment correlate well. The relative error between these measurements is

$$
\delta = 0.53\% \tag{8}
$$

The 5-degree polynomial function results and those of the control equipment correlate well. The changes in the production can lead to a change of results, but not the precise mismatch of it (there may be significant differences between the results and results of the control equipment).

Changed conditions of the production highlight the shortages of the polynomial function. When the standard deviation of individual measurement results changes more than 5% together with the decrease in the average of roundness, the results recalculated in accordance with the polynomial function do not correspond to the standard measurement results. Interconnecting measurements of the particles having the largest roundness with the remaining ones, it is possible to carry out the recalculation of polynomial function radical after every analysis (algorithm is shown in Figure 2 and measurement results are presented in Table 5).

**Table 5.** The results according to the proposed algorithm.


In the experiment an average of distribution results of last three measurements was used. According to the current measurement data, distribution of the particles with the largest roundness is

assessed. When carrying out the experiment, 10% of the granules with the largest roundness were assessed. Distribution of the last measurement of all granules is used to establish polynomial radicals together with an average of the measurements from the database. The recalculated result is compared with the distribution of the granules having the largest roundness and with the database average. The distribution of the best result is obtained with the lowest relative error:

$$
\delta\_{\text{recalc}} = 1.22\% \tag{9}
$$

$$
\delta\_{10\%\\_circ} = 2.73\% \tag{10}
$$

After calculating the estimated errors, the selected particle distribution is recalculated with the polynomial function (calculation results are presented in Table 5 and Figure 7). The received results and the results of control equipment correlate well (distribution by weight).

**5HFDOFXODWHGLQGLUHFWPHDVXUHPHQW UHVXOWVE\WKHDYHUDJHIURPGDWDEDVH GLVWULEXWLRQE\YROXPH**

**Figure 7.** Recalculated indirect measurement results by the average from last 3 measures from database.

#### *3.3. Neural Network Simulation*

The Artificial intelligent method was applied to the development of intelligent system [46]. A simulation of the artificial neuron network has been performed using the software MATLAB (structure is provided in Figure 8). The two-layer feed-forward network with sigmoid hidden neurons and linear output neurons was used in the research. The ANN was trained with Levenberg–Marquardt backpropagation algorithm. The results of optical measurement have been recalculated using the samples analyzed by the control equipment in advance. The first sample provided in the table is an average of the last three measurements from the database, which is acknowledged as the standard. In accordance to these measurements, polynomial radicals are calculated and the neuronal network is trained (measurement results are provided in Table 6). Other two measurements use the algorithm provided in Table 5. Distribution of the granules with the largest roundness is presented to the neuron network as well as to the polynomial function. After significant noncompliance has been established between the curves, the cumulative curve of distribution of all particles is presented to the artificial neuron network. The attained results correlate with the mass distribution of the sample.

**Figure 8.** The artificial neural network for the recalculation of fertilizer particles distribution.


**Table 6.** Artificial neural network comparison with polynomial.

Shortages of the linear regression model show up by analyzing more samples of the composition, which changes during the production (longer measurement intervals). An artificial neuron network is distinguished for more accurate results of distribution in this situation (results in Table 6). The identity of ANN results with mass distribution of the sample is determined by the quantity of data for network training.

#### **4. Conclusions**

In this paper, the method of correction of optical measurement results of fertilizer particles (indirect method) is presented. The results obtained by the digital image processing method depend on the geometric and mechanical properties of the particles. Better repeatability of data is achieved by analyzing mechanically stronger particles, which also have rounder geometric shapes.

The equalization of the obtained results and the control equipment results is converted using a linear regression model. This method identifies the changes in production, but not the size of it. As a result, the obtained results may vary by more than 8% depending on the production conditions and the composition of the material.

The main disadvantage of this method is the dependence of reliability on the sphericity of particles. The best results are obtained when at least 75% of the fertilizer amount falls within the range of 0.9 to 1.0 of distribution by roundness. However, the algorithm can be applied not only to fertilizers, but also to the measurement of other round particles.

While analyzing the production, in which the granules are characterized by large scale roundness, it is enough to assess granules with the largest roundness because the noncompliance reaches up to 0.6%. To increase the effectiveness of the results when the shape of the particle surface varies, it is appropriate to extend the model of linear regression, which is based on the previous results from the database. To achieve result correction the latter algorithm uses not only the results of the distribution of the granules having the largest roundness but also distributions of the previous samples. The attained results precisely correlate with the results obtained by the control equipment even when production conditions significantly change. The noncompliance of the cumulative curve of particles recalculated in the experiment was 1.22%, while the 10% noncompliance of the cumulative curve of the particles with the largest roundness, in comparison with the mass distribution attained by the control equipment, which was 2.73%.

The system was installed in a factory in real production line. It brings real benefits to the operators managing the production process. Also, the fertilizer manufacturer gets more information about their production. One of the most important advantages of the system is that measurements are made very often, which is every 5–7 min.

The most accurate results of indirect measurements for work with many sieves are attained for correction by using an artificial neuron network. The accuracy of the latter results depends on the quantity of the data accumulated for training. Carrying out more accurate measurements requires an assessment of more variables of the production process. In the further investigation, the involvement of humidity and temperature measurements in the artificial neuron network is planned.

**Author Contributions:** A.L. and V.A. wrote the paper; A.L. and D.A. gave guidance in experiments and data analysis.

**Funding:** This research received no external funding.

**Acknowledgments:** The system was created and all researches were made in JSC "Elinta". The owner of intellectual property is JSC "Elinta". We thank JSC "Elinta" and its director Vytautas Jokuzis for the opportunity to publish this research.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
