An inversion method for peach fruit hardness on trees based on finite element simulation and transfer learning
By constructing a highly biomimetic peach fruit vibration finite element model and domain adversarial neural network, the destructiveness of traditional detection methods and the accuracy problem of deep learning under small samples are solved, and the accurate inversion of the hardness of peach fruits before harvest is achieved, reducing costs and damage.
Patent Information
- Application Number
- CN202411370312.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-09-29
AI Technical Summary
Traditional fruit hardness detection methods are highly destructive and difficult to meet large-scale detection needs. In addition, existing deep learning methods have low prediction accuracy under small sample sizes and uneven feature distribution, and cannot accurately invert the pre-harvest hardness of peach fruits.
A highly biomimetic peach fruit vibration finite element model was constructed, and transfer learning was performed using a domain adversarial neural network. The feature extraction network was trained using a finite element simulation dataset to achieve hardness inversion.
The accurate inversion of peach fruit pre-harvest hardness was achieved with a small sample size, which improved detection accuracy, reduced mechanical damage, and lowered data collection costs.
Smart Images

Figure CN119227540B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fruit quality detection, and in particular to an on-tree peach fruit hardness inversion method based on finite element simulation and transfer learning. Background Art
[0002] Firmness is a key quality indicator for peaches, correlated with their taste, ripeness, and storage stability. The need for firmness measurement permeates the entire peach supply chain. Peaches harvested within a specific firmness range typically exhibit greater resistance to damage, a longer shelf life, and a better taste after fully softening. Therefore, preharvest firmness monitoring is crucial for determining the optimal harvest time for peaches.
[0003] Traditional fruit firmness testing methods are destructive and cannot meet the needs of large-scale testing. The acoustic vibration method analyzes the vibration response of vibrating peaches, extracts vibration features, and inverts the mechanical parameters of the fruit, thereby determining the fruit's firmness, which can reduce mechanical damage. However, in pre-harvest applications, the vibration response of the peach fruit is noisy due to wind interference, making it difficult even for workers with prior knowledge to accurately extract vibration features from the signal. Currently, deep learning-based feature extraction methods have shown promising performance in vibration signal processing. They can unsupervisedly extract task-relevant features from large amounts of signals and are widely used in fields such as mechanical fault diagnosis, electrocardiogram analysis, and agricultural product quality testing. However, traditional deep learning methods require a large number of data samples and assume that the training and test data have the same feature distribution, which places high demands on both quantity and quality. Collecting more samples not only increases manpower, material, and financial resources, but also leads to various errors caused by fatigue among workers. In agricultural field applications, obtaining such a large number of high-quality and evenly distributed samples is almost impossible. Numerical simulation provides an effective solution to this problem. Numerical simulation techniques can be used to simulate the vibration of objects, generating a large amount of simulation data. Finite element analysis is a commonly used numerical simulation method. However, due to the complex shape and structure of fruit and the difficulty in determining material properties, existing fruit finite element models oversimplify the shape, internal structure, or material properties, resulting in significant discrepancies between the simulated and experimental data. Constructing an accurate finite element model can improve the similarity between simulated and experimental data, but the complex and variable field measurement environment and the varying sizes and shapes of fruit inevitably lead to differences in the characteristic distributions of simulated and experimental data, which can reduce the prediction accuracy of deep learning prediction models. Therefore, how to accurately invert the pre-harvest firmness of peach fruit with a small sample size remains an unresolved issue. Summary of the Invention
[0004] The purpose of the present invention is to address the above-mentioned shortcomings and propose a method for inverting the hardness of peach fruit on the tree based on finite element simulation and transfer learning. It solves the problem of low accuracy of results caused by over-simplification of traditional fruit finite element models, overcomes the problems of small number of data set samples and large differences in feature distribution, and provides an effective solution for accurately inverting the hardness of peach fruit before harvest.
[0005] To solve the above technical problems, the present invention proposes a technical solution: a method for inverting peach fruit hardness on a tree based on finite element simulation and transfer learning, comprising the following steps:
[0006] Step 1: Use a laser Doppler vibrometer to collect vibration signals of peach fruits at different growth stages on the tree. After preprocessing, the vibration signals are used as input to the model. Use a texture analyzer to measure the peach fruit hardness reference value as the output of the model to construct an experimental data set.
[0007] Step 2: Establish a finite element model of peach fruit vibration with a high degree of biomimetic and calculate the simulated vibration response;
[0008] Step 2.1, using a handheld laser 3D scanner to obtain a 3D point cloud of the outer surface of the peach fruit, pit, and kernel, and constructing a 3D geometric model with the accurate shape and structure of the peach fruit through reverse modeling;
[0009] Step 2.2: Use a texture analyzer and a universal mechanical testing machine to test the compressive elastic modulus of the peach pulp, pit, and kernel, and the tensile elastic modulus of the peel, respectively, as the material properties of the finite element model;
[0010] Step 2.3, based on the three-dimensional geometric model of the peach fruit, the material properties measured in step 2.2, the experimental excitation, and the fruit constraint conditions, a finite element model of peach fruit vibration with a high degree of biomimetic is established, and the simulated vibration response of the response point is simulated and calculated;
[0011] Step 3, changing the material properties of the finite element model in step 2 to obtain simulated vibration responses of peaches with different hardness;
[0012] Step 4: Construct a domain adversarial neural network, use simulation data with hardness values as the source domain and experimental data without hardness values as the target domain for training, and achieve domain transfer and hardness inversion through adversarial training;
[0013] Step 4.1: Build a feature extraction network based on multi-scale convolution and channel attention mechanism to achieve adaptive feature extraction;
[0014] In step 4.2, we build a predictor and use the fully connected layer to predict the hardness of the features. We also choose the mean square error (MSE) as the loss function of the predictor:
[0015]
[0016] Where, is the loss function of the predictor; N is the number of samples; y i is the hardness value; To predict the hardness value.
[0017] Step 4.3: Build a domain discriminator. This step uses a gradient reversal layer to automatically reverse the gradient direction during backpropagation, maximize the domain classification loss, and confuse the target domain data with the source domain data. The cross entropy loss is used as the loss function of the domain discriminator:
[0018]
[0019] Where, is the loss function of the predictor; N is the number of samples; y i is the hardness value; To predict the hardness value.
[0020] In step 4.4, the network loss function is composed of the predictor loss function and the domain discriminator loss function:
[0021] L=L p -λL d
[0022] Where L is the total loss function; λ is the parameter for adjusting the adversarial strength.
[0023] As a further improvement of the present invention, a bandpass filter is used for filtering during signal preprocessing, and the power spectrum density of the vibration response is calculated as the model input.
[0024] As a further improvement of the present invention, in step 1, a force-displacement curve of the puncture process is obtained through a puncture experiment, and the initial slope of the curve is used as a reference value for peach fruit hardness.
[0025] As a further improvement of the present invention, in step 2.1, the peach fruit point cloud is denoised and surfaced in Geomagic software, and then imported into Solidworks software to combine various parts according to the physiological structure of the peach fruit to construct a complete peach fruit three-dimensional model.
[0026] As a further improvement of the present invention, in step 2.2, the pulp is prepared into a 15×15×15 mm cubic sample and subjected to a compression test using a texture analyzer. After obtaining the force-displacement curve, its elastic modulus is calculated according to the following formula:
[0027]
[0028] Where E is the elastic modulus, σ is stress, ε is strain, F is the compression force, L is the initial length of the specimen, A is the cross-sectional area of the specimen, and ΔL is the deformation.
[0029] As a further improvement of the present invention, in step 2.2, the intact fruit core and kernel are placed on a texture analyzer for compression testing. After obtaining the force-displacement curve, the elastic modulus is calculated according to the following formula:
[0030]
[0031] Where E is the elastic modulus, F is the force, D is the deformation, K U and K L is a constant determined by the curvature of the contact point between the upper and lower surfaces, R U and R′ U are the maximum and minimum curvature radii of the upper surface contact points, R L and R′ L are the maximum and minimum radii of curvature of the lower surface at the contact point.
[0032] As a further improvement of the present invention, in step 2.2, the peel is prepared into a rectangular sample, and a tensile test is performed on the peel using a universal mechanical testing machine, and its elastic modulus is calculated according to the following formula:
[0033]
[0034] Where E is the elastic modulus, σ is stress, ε is strain, F is the compression force, L is the initial length of the specimen, A is the cross-sectional area of the specimen, and ΔL is the deformation.
[0035] As a further improvement of the present invention, in step 2.3, a fixed constraint is set at the fruit stem, an exciting force is applied at the equator, all modes within 2000 Hz are calculated, and the vibration response output is obtained through transient analysis.
[0036] Compared with the prior art, the advantages of the present invention are:
[0037] The bionic peach fruit vibration finite element model of this invention fully considers the complex shape, internal structure, and material properties of the peach fruit. Through 3D scanning and inverse modeling, an accurate 3D geometric model of the peach fruit is constructed. Experimental measurements of the elastic modulus of the peach peel, flesh, pit, and kernel are used as material properties for finite element analysis to improve the accuracy of finite element simulation. By using finite element simulation to obtain a simulation dataset for transfer learning, this invention can invert the hardness of peach fruit on the tree using acoustic vibration methods with a small sample size. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of a specific implementation of the present invention.
[0039] Figure 2 This is a simplified diagram of the domain adversarial neural network structure.
[0040] Figure 3 This is a simplified diagram of the network structure for extracting peach fruit vibration response features.
[0041] Figure 4 Feature visualization for different network outputs. DETAILED DESCRIPTION
[0042] The present invention will be further described below with reference to the accompanying drawings.
[0043] Reference Figures 1 to 4 A method for inverting peach fruit hardness on a tree based on finite element simulation and transfer learning, the method comprising the following steps:
[0044] Step 1: Collect vibration response data of peach fruits on the tree, measure hardness, and construct an experimental data set;
[0045] Step 1.1: Use a laser Doppler vibrometer to collect vibration signals from peaches at different growth stages on the tree to obtain vibration response data for peaches of different hardness and size. Noise reduction is performed using a bandpass filter with a cutoff frequency set between 5 and 2000 Hz. The power spectral density of the vibration response is calculated using an autoregressive model as the model input.
[0046] Step 1.2: Perform a puncture test on peach fruit using a texture analyzer. The probe diameter is 5 mm, the loading speed is set to 0.5 mm / s, and the loading distance is 8 mm. The initial slope of the force-displacement curve is calculated to obtain a hardness reference value as the output of the model.
[0047] Step 2: Establish a finite element model of peach fruit vibration with a high degree of biomimetic and calculate the simulated vibration response;
[0048] Step 2.1: Use a handheld laser 3D scanner to obtain 3D point clouds of the outer surfaces of 10 different peach fruits, pits, and kernels. De-noise and surface-convert the point clouds of each peach fruit part in Geomagic software. Then, import the point clouds into SolidWorks software and combine the various parts according to the physiological structure of the peach fruit to construct a complete 3D model of the peach fruit.
[0049] In step 2.2, 15 peaches at different growth stages were selected and the pulp was prepared into 15 × 15 × 15 mm cubic samples. A compression test was performed using a texture analyzer. A cylindrical probe with a diameter of 100 mm was selected, the loading speed was set to 0.1 mm / s, and the loading distance was set to 8 mm. After obtaining the force-displacement curve, the elastic modulus was calculated according to the following formula:
[0050]
[0051] Where E is the elastic modulus, σ is stress, ε is strain, F is the compression force, L is the initial length of the specimen, A is the cross-sectional area of the specimen, and ΔL is the deformation.
[0052] Place the intact fruit core and kernel on a texture analyzer for compression testing. Select a cylindrical probe with a diameter of 100 mm, set the loading speed to 0.1 mm / s, and the loading distance to 3 mm. After obtaining the force-displacement curve, calculate its elastic modulus according to the following formula:
[0053]
[0054] Where E is the elastic modulus, F is the force, D is the deformation, K U and K L is a constant determined by the curvature of the contact point between the upper and lower surfaces, R U and R′ U are the maximum and minimum curvature radii of the upper surface contact points, R L and R′ L are the maximum and minimum curvature radii of the contact points on the lower surface. The curvature radii of the core and kernel vertices are given by the three-dimensional model.
[0055] The peel was prepared into a rectangular sample and subjected to a tensile test using a universal mechanical testing machine. The elastic modulus was calculated according to the following formula:
[0056]
[0057] Where E is the elastic modulus, σ is stress, ε is strain, F is the compression force, L is the initial length of the specimen, A is the cross-sectional area of the specimen, and ΔL is the deformation.
[0058] In step 2.3, a highly biomimetic finite element model of the peach fruit is established in ANSYS finite element simulation software based on the 3D geometric model of the peach fruit, the material properties measured in step 2.2, the experimental excitation, and the fruit constraints. A fixed constraint is set at the fruit stem to simulate the external constraints of the peach fruit, and all modes within 2000 Hz are calculated. An excitation force of 0.5 N is applied at the equator to simulate the gas excitation force during the experiment, and the vibration response output is obtained through transient analysis.
[0059] Step 3: Change the material properties of the pulp in the finite element model in step 2. According to the elastic modulus range of the pulp measured in the experiment, 100 values are evenly selected in the range of 0.5 MPa to 2.5 MPa as the elastic modulus of the pulp to obtain the simulated vibration response of peaches with different hardness;
[0060] Step 4, such as Figure 2The domain adversarial neural network (DANN) is constructed as shown in the figure. It mainly consists of a feature extraction network, a hardness predictor, a domain discriminator, and a gradient reversal layer. The gradient reversal layer automatically reverses the gradient of the domain discriminator to maximize the domain classification error and extract domain-invariant features. In the experiment, simulation data with hardness values is used as the source domain, and experimental data without hardness values is used as the target domain for training. Domain transfer and hardness inversion are achieved through adversarial training.
[0061] Step 4.1, based on multi-scale convolution and channel attention mechanism, construct Figure 3 The feature extraction network shown in Figure 1 implements multi-scale feature extraction. It mainly consists of two convolutional layers, an Inception module, a Squeeze-and-Excitation (SE) module, and a Dropout layer. A BatchNormalization layer, ReLU activation function, and max pooling layer are added after each convolutional layer to accelerate convergence and improve the nonlinear ability of the network.
[0062] In step 4.2, we build a predictor and use the fully connected layer to predict the hardness of the features. We also choose the mean square error (MSE) as the loss function of the predictor:
[0063]
[0064] Where, is the loss function of the predictor; N is the number of samples; y i is the hardness value; To predict the hardness value.
[0065] Step 4.3: Build a domain discriminator. This step uses a gradient reversal layer to automatically reverse the gradient direction during backpropagation, maximize the domain classification loss, and confuse the target domain data with the source domain data. The cross entropy loss is used as the loss function of the domain discriminator:
[0066]
[0067] Where, is the loss function of the predictor; N is the number of samples; y i is the hardness value; To predict the hardness value.
[0068] In step 4.4, the network loss function is composed of the predictor loss function and the domain discriminator loss function:
[0069] L=L p -λL d
[0070] Where L is the total loss function; λ is the parameter for adjusting the adversarial strength.
[0071] The 1000 vibration response data obtained by simulation are used as the source domain, and the vibration response data of 300 peach fruits measured in the experiment are used as the target domain for training. The learning rate is set to 0.001, the penalty parameter λ is set to 1, the number of iterations is 100, and the batch size is 64 for training.
[0072] In order to verify the effectiveness of the present invention, the Inception-SE network and the Inception-SE+DANN network with the same network structure are selected for comparison. The results after feature visualization using t-SNE are shown in the figure below. Figure 4 As shown in (a) and (b), the results show that the Inception-SE+DANN network in this invention can effectively extract domain-invariant features. The root mean square error (RMSE) and the coefficient of determination (R 2 ) as the evaluation index to evaluate the effectiveness of this method, and the results are shown in Table 1. From the comparison results, it can be seen that the feature extraction network proposed by the method of the present invention can effectively extract features related to peach fruit hardness. The method of obtaining simulated vibration data through the finite element method and performing transfer learning can improve the accuracy of peach fruit hardness inversion with a limited sample size.
[0073] Table 1
[0074]
Claims
1. A method for inverting peach fruit hardness on a tree based on finite element simulation and transfer learning, characterized in that: The method comprises the following steps: Step 1: Use a laser Doppler vibrometer to collect vibration signals of peach fruits at different growth stages on the tree. After preprocessing, these signals are used as input to the model. A texture analyzer is also used to measure the peach fruit firmness reference value to construct an experimental dataset. Step 2, establishing a biomimetic peach fruit vibration finite element model and calculating the simulated vibration response; Step 3, changing the material properties of the peach fruit vibration finite element model with biomimetic degree obtained in step 2 to obtain the vibration response of peach fruits with different hardness and construct a simulation data set; Step 4: construct a domain adversarial neural network, using the simulation dataset obtained in step 3 as the source domain and the experimental dataset obtained in step 1 as the target domain for training, and obtain a peach fruit hardness inversion model through adversarial training; Step 5: Input the vibration response of peach fruits on the tree into the peach fruit hardness inversion model to obtain the peach fruit hardness value to guide fruit picking.
2. The method for inverting peach fruit hardness on a tree based on finite element simulation and transfer learning according to claim 1, characterized in that: In step 1, the preprocessing method adopts bandpass filtering and power spectrum density estimation.
3. The method for inverting peach fruit hardness on a tree based on finite element simulation and transfer learning according to claim 1, characterized in that: In step 2, a biomimetic peach fruit vibration finite element model is established and the simulated vibration response is calculated, specifically including: Step 2.1, using a handheld laser 3D scanner to obtain a 3D point cloud of the outer surface of the peach fruit, pit, and kernel, and constructing a 3D geometric model with the accurate shape and structure of the peach fruit through reverse modeling; Step 2.2, using a texture analyzer and a universal mechanical testing machine to test the compressive elastic modulus of the peach pulp, pit, and kernel, and the tensile elastic modulus of the peel as material properties; Step 2.3, based on the three-dimensional geometric model with the accurate shape structure of the peach fruit and the material properties measured in step 2.2, a peach fruit vibration finite element model with bionic degree is established, and the simulated vibration response of the response point is simulated and calculated using the peach fruit vibration finite element model with bionic degree under the conditions of experimental excitation and fruit constraints.
4. The method for inverting peach fruit hardness on a tree based on finite element simulation and transfer learning according to claim 3, characterized in that: In step 2.3, the experimental excitation is the gas excitation force applied to the peach fruit during the experiment.
5. The method for inverting peach fruit hardness on a tree based on finite element simulation and transfer learning according to claim 3, characterized in that: In step 2.3, the fruit constraint condition is that the peach fruit is subject to constraint force at the stalk.
6. The method for inverting peach fruit hardness on a tree based on finite element simulation and transfer learning according to claim 1, characterized in that: In step 4, a domain adversarial neural network is constructed, which includes: Step 4.1: Construct a feature extraction network based on multi-scale convolution and channel attention mechanism; Step 4.2, build a predictor, predict the hardness of the features through the fully connected layer, and choose the mean square error MSE as the loss function of the predictor: Where, is the loss function of the predictor; N p is the number of samples; y p is the hardness value; To predict the hardness value; In step 4.3, we construct a domain discriminator. We use a gradient reversal layer to automatically reverse the gradient direction during back propagation, and use the cross entropy loss as the loss function of the domain discriminator: Where, L d is the loss function of the discriminator; N d is the number of samples; y d is the hardness value; To predict the hardness value; In step 4.4, the network loss function is composed of the loss function of the predictor and the loss function of the domain discriminator: L=L p -λL d Where L is the total loss function; λ is the parameter for adjusting the adversarial strength.
Citation Information
Patent Citations
Method suitable for evaluating fruit hardness of pears with irregular fruit shapes
CN113468787A
Pear quality prediction method based on visible near infrared spectrum and transfer learning
CN115684074A