Development and research of an information-measuring system for quality control of agricultural products

. The article presents the result of an information-measuring system development for quality control of agricultural products based on the assessment of their moisture content, chemical composition, presence of organic and mineral impurities. It also substantiates the relevance of the use of such systems by the agro-industrial complex enterprises. The proposed information-measuring system is based on the author's dielcometric method for determining the electrophysical parameters of capacitive sensors, the principle of which is to decompose the measuring process into two stages. The study of this method was carried out using simulation modeling in the SimInTech environment, while custom operational amplifier blocks and sample-and-hold circuit were built. As a result of the operational amplifier model research, graphs of the dependency of the output voltage on the change in the integration time constant and amplification gain were plotted, on the basis of which the optimal values of these quantities were selected. Studies of the constructed models of the first and second measurement stages using the proposed method showed a high accuracy in determining the electrophysical parameters of capacitive sensors filled with agricultural products, with a relative error not exceeding ±0.2%.


Introduction
The most important indicators of the agricultural products quality are moisture and the presence of impurities which have a significant impact on their safety, nutritional and consumer value, suitability for storage and processing, cost, etc. The presence of moisture in products leads to the acceleration of negative physicochemical and biological processes, such as germination, self-heating, respiration, the development of microorganisms, insects, mites, etc. [1].
The respiration of agricultural products is associated with the dissimilation process of complex organic substances to simpler ones -water, carbon dioxide and ammonia, the intensity of which directly depends on the initial moisture content and material contamination. For example, with a wheat moisture content of 15.5% or more, 0.05-0.2% of dry matter is lost per day, and the release of carbon dioxide CO2 can reach 18 mg per 100 g of the product, which is associated with aerobic respiration, leading to an increase in heat release up to 16.7 MW/kg and self-heating material. This, in turn, creates conditions for the appearance of free moisture, which will sharply accelerate the microorganisms' development (bacteria, fungi, mold, etc.), insects and mites, which reduce the quality and change the chemical composition of products [2]. As a result of these processes development, the loss of agricultural products can reach 1.3 billion tons per year ( Fig. 1), which is a serious global problem that threatens food security and nutritional satisfaction of the population [3].
One of the ways to reduce losses is the rapid and accurate determination of moisture and impurities in products using modern technical solutions, for example, the information-measuring systems (IMS), which provide the ability to quickly obtain information about the quality of agricultural products and taking measures to bring the indicators to the established standards using technological operations of drying or cleaning [4].

Materials and methods
At the moment, the advance research and development direction of such systems are dielcometric methods for determining the parameters of capacitive sensors (CS), based on indirect measurements of the material electrophysical properties, which make it possible to determine its moisture content, the presence of organic and mineral impurities, chemical composition, etc.

Fig. 2.
Block scheme of the method for determining the electrophysical properties of agricultural products using capacitive sensors.
The use of capacitive sensors is due to their design simplicity and versatility in determining moisture and impurities in various agricultural products (wheat, rice, barley, corn, etc.), which provides unlimited opportunities for implementation in various technological processes of agricultural enterprises. For the system being developed, a coaxial capacitive sensor was used (Fig. 2), which is an aluminum container 1 filled with the test product 3 and is one of the electrodes in which internal aluminum rod electrodes 2 are built through a dielectric spacer 4.
Studies of similar capacitive sensors with agricultural materials placed in them in the works of Stuart O. Nelson [5] showed that their properties can be described by a four-element RC equivalent circuit (EC), including through resistance R1 and capacitance C1, relaxation resistance R2 and capacitance C2, while each of the elements characterizes individual electrophysical properties of the product. R1 is organic impurities (leaves, weeds, stems, etc.); R2 is mineral impurities (sand, pebbles, earth, etc.); C1 is chemical composition (iron, phosphorus, sulfur, etc.); C2 is the number of water particles and their sizes, i.e., humidity of the controlled environment.
The determination of the indicated properties of the material under study in the developed IMS can be implemented using the author's method [6], based on the decomposition of the measurement process into two stages. The first stage is performed in the steady operating conditions of the measuring circuit (MC) and allows determining the through resistance R1. The second stage is carried out during a rapidly developing transient process in the MC and makes it possible to determine the rest of the electrophysical properties of the product -C1, C2 and R2.
The block scheme of the proposed author's method is shown in Figure 2 and includes the following designations: RVS is a reference voltage source; RE1-2 is reference elements; SK1.1-SK3.2 are switching keys; OA is an operational amplifier; MV1-4 is a measured value; I-II are measurement stages.
To confirm the operability and relevance of using the proposed method for determining the electrophysical BIO Web of Conferences https://doi.org/10.1051/bioconf/20225200008 00 52, 0 FIES 2022 08 (2022) properties of agricultural products based on a capacitive sensor, it was simulated in the modern environment of model-based design SimInTech (Simulation In Technic) [7], which allows the construction and calculations of complex dynamic RC circuits in the real-time mode. The model of the first stage of measurements I is shown in Figure 3, while the measurement process is performed as follows. RVS, consisting of the standard blocks " Step" and "Controlled voltage source", forms a jump in DC voltage U0 = 5 V, which through the switch SK1.1 and RE1 in the form of a resistor R0, is supplied to the CS represented by a four-element EC grounded by the SK1.2. As a result of it the resistors R1 and R0 form a classic resistive divider, which makes it possible to determine the through resistance R1 when measuring the voltage U1y at the midpoint through the SK2.2 and the block "Voltmeter" according to the following expression: (1) The calculation according to the specified expression is implemented using a programmed module which, based on a programming language similar to C/C ++, allows you to perform calculations of any complexity (Fig. 4). To calculate the model, the values of the MC elements were taken from the known method for determining the parameters of bipolar circuits [8]: U0 = 5 V; R0 = 100 kOhm; C0 = 17 nF; R1 = 150 kOhm; С1 = 3 nF; R2 = 12 kOhm; С2 = 6.2 nF; τ = 74.4 µs. As a result of the calculations we obtained R1 = 149 kOhm with a relative error δR1 = -0.0083%, which indicates the high accuracy of the proposed method at the first stage of measurements.
When building the MC model of the second stage of measurements II, it was necessary to develop an OA model, since such a block is not available in the standard libraries of the SimInTech environment. For this, blocks "Aperiodic link of the 1st order" 1, a comparing device 2, voltmeters with additional ports of mathematical communication for outputting the instantaneous value of the measured voltage 3-4, a voltage supply with the ability to set voltage function through port 5 or, in other words, voltage-controlled voltage source (VCVS) (Fig. 5). The complex amplification gain (transfer factor) can be represented as follows: where K0 is the DC amplification gain of the operational amplifier;  is the angular frequency of the input signal, rad/s;  is the time constant of the low-pass RC filter, corresponding to the integration time constant of the OA.
Based on this, the modulus of the gain transfer function will be equal to: Then the dependence of the integration constant ОУ on the frequency of unity gain 1 of the OA model at K  =1: Therefore, the complex amplification gain (transfer factor) according to expression (2) can be represented as: To select the correct properties of the 1st order aperiodic link, which describes the frequency characteristics of the operational amplifier, it is extremely important to establish the relationship between the value of the integration time constant ОУ and the time constant of the measuring RC-circuit (MC) MC connected to the inverting input of the operational amplifier (Fig. 6). When choosing these properties, one should take into account the transient processes occurring both in the MC and in the operational amplifier model itself, operating in the mode of a summing integrator connected according to an inverse circuit.
where U0 is the reference voltage, V; C0 is the standard capacitor, pF; R1, R2 are MC elements in the form of resistances, Ohm; C1, C2 are MC elements in the form of capacitances, pF.
The above expression is obtained on the basis of the conversion function of the inverting amplifier: where Z feedback is the feedback resistance OA, Оhm; Z input is the resistance at the inverting input OA, Ohm. The input signal is formed by step action on the input circuit and is an aperiodic function. In such a situation, when building an OA model, it is advisable to consider not the frequency characteristics, but the rate of aperiodic function change at the output, which has the following form: From which it follows that the output voltage is inversely proportional to the time constant where K0 is the given amplification gain of the OA; τMC calc. is the calculated value of the MC time constant, established on the basis of preliminary data on the object of research and refined during the modeling process.
As an example, let's calculate OA for the simulated circuit at K0= 10 5 and time constant MC = 100 µs: With the indicated values, the amplitude-frequency characteristic (AFC) of the OA model will be as follows (Fig. 7). For clarity, the AFC is built on a logarithmic scale, on which the cutoff frequency is marked   To do this, it will be necessary to add four additional circuits in parallel to the circuit for research and set the indicated parameters in the properties of the 1st order aperiodic link (Fig. 8).
As a result of the simulation, it was found that a change in the value of the integration time constant OA leads to a change in the output signal U out (t) of the OA model in a wide range (Fig. 9), while the most optimal value is 0.  By analogy with the circuit in Figure 8, a circuit was built to assess the effect of the amplification gain K on the OA model, as a result of which it was found that changing the value of the gain K has a significant effect on the output voltage U out(t) of the OA model, while in comparison with the previous research, the range of change is more pronounced, and changes in the exponent shape of the transient process have cardinal differences from the calculated curve. The optimal value of the amplification gain K for the developed OA model is 10 5 , which is confirmed by the superposition of the curve with this gain and the calculated curve. Invalid gain values are 10 4 ÷10 1 , as evidenced by the deviations of the output voltage values from the ideal curve in the range from 0.45 to 2.5 V, while the last two curves have a linear voltage change, which does not completely correspond to the waveform of the output signal on the OA.  After confirming the performance and selecting the parameters of the OA model (Fig. 5), it was transferred to the constructed MC model of the second stage of measurements II according to the proposed method for determining the electrophysical parameters of the CS in the form of a submodel (Fig. 11). To obtain accurate time readings, signal sampling and accurate voltage values U(t0), U(t1), U(t2) during the developing transient process, the MC model implements a sample-and-hold circuit (S/H circuit), which is built using blocks «Impulse», «Turn-on delay» and «Storing the signal value», while similarly to the previous cases, the S/H circuit is combined into a separate submodel.
The measurement process at the second stage is as follows: a DC voltage jump is supplied from the RVS, which, through the SK2.1 goes to the CS connected to the inverting input of the OA, the negative feedback of which is implemented by the RE2 in the form of the capacitor C0, after which the signal is sent to the S/H circuit, performing voltage readings U(t0), U(t1) and U(t2) at fixed times and transferring them to a programmed module that performs the calculation based on the following system of equations: The solution of this equations system, taking into account the through resistance R1 obtained at the first stage, allows us to establish the ratios of the coefficients A0, A1, A3 and the time constant τ: Based on these parameters, the search values of C1, C2, R2 of the studied CS, represented by a four-element EC, can be found using the following expressions:

Results and discussion
The calculation results of the MC model of the second measurements stage in the programmed module were (Fig. 11): C1 = 2.993 nF; C2 = 6.198 nF; R2 = 12.021 kOhm. In this case, the relative error was: δC1 = ±0.232%; δC2 = ±0.023%; δR2 = ±0.175%. The positive results of modeling the proposed method in the SimInTech environment allow us to conclude that it is appropriate to use it in the developed quality control system for agricultural products based on the determination of their moisture content and impurities. In this regard, the next stage in the development of IMS was the construction of its functional diagram (Fig.  12) in accordance with the known requirements for such systems [10], the operating principle of which is as follows. In one container of the CS we placed agricultural product with unknown moisture content Wx and the amount of impurities AdSx, acting as a sample or object of study. The same product is placed in another container, pre-dried to the set value W0 and cleaned of impurities AdS0, which is a standard or measure of comparison. They, according to a given method determination of the electrophysical parameters of the CS, are connected to the measuring circuits (MC) 1-2, which include MC of the first and second stages of measurements with reference elements in the form of a resistor R0 and a capacitor C0. As a result of it, the parameters R1x, C1x, R2x and C2x of the research object are determined and R10, C10, R20 and C20 of the standard, which enter the comparison links in the form of comparators, where the input signals are compared and their ratio is established. They are transmitted through data links R1, C1, R2 and C2 to the data analysis unit, which performs the final calculations of product humidity W res. and impurities AdS res based on the information received from the comparators and the calibration characteristics recorded in the long-term memory ROM. Such IMS scheme makes it possible to further improve the accuracy of determining the product quality indicators by comparing with the measure, as well as reducing constant systematic and multiplicative errors. However, in real conditions of agricultural objects, the calibration characteristics stored in the system memory will act as a standard.
As a «Data analysis» block in the proposed system, it is recommended to use modern AVR microcontrollers. They have versatility, the required speed, built-in analogto-digital converters (ADC), digital-to-analog converters (DAC), timers, a sufficient number of input / output ports for control switching in the MC, low power consumption, large amount of RAM and Flash memory, easy programming and customization flexibility.

Conclusion
Thus, the proposed quality control system for agricultural products has improved accuracy characteristics, due to the use of an improved method for determining the electrophysical parameters of CS with a low relative error of measurement results, not exceeding ±0.2% and confirmed by modeling in the SimInTech environment. And it also meets modern requirements versatility and speed, due to the use of a simple hardwaresoftware implementation based on high-speed AVR microcontrollers, operational amplifiers, comparators and analog-to-digital converters.
The use of this IMS will allow agricultural enterprises to minimize losses by reducing the response time to product quality deviations such as excessive moisture, an increased amount of organic and mineral impurities, chemical composition. At the same time, due to the simplicity of the components design used in the system, in particular the CS, it can be concluded that there is a great potential for its implementation in the technological processes of harvesting, transporting, processing and storing agricultural products.