A cotton picker impurity rate prediction method, system and electronic device
By preprocessing the cotton harvester's operating parameters and optimizing them using the Grey Wolf algorithm, a Kriging prediction model was established, and the optimal range of operating parameters was selected. This solved the problem of low accuracy in predicting the impurity content of cotton harvesters and improved the harvesting quality of cotton harvesters.
Patent Information
- Application Number
- CN202211500987.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-11-28
AI Technical Summary
Existing cotton harvesters are not very accurate in predicting impurity content, and it is difficult to accurately represent the complex relationship between the operating parameters in the field operation data of cotton harvesters and the impurity content of harvesting using traditional Kriging models.
By preprocessing the cotton harvester's operating parameters and impurity content, dividing the dataset and generating training samples, a Kriging prediction model is established. The Grey Wolf algorithm is used to optimize the model to select the optimal range of operating parameters, dynamically update the predicted values, and obtain the operating data combination with the minimum impurity content.
It improved the accuracy of predicting the impurity content of cotton harvesters and enhanced the harvesting quality of cotton harvesters.
Smart Images

Figure CN116307030B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of cotton harvester impurity content prediction technology, and particularly relates to a cotton harvester impurity content prediction method, system and electronic equipment. Background Technology
[0002] Cotton has a long history of cultivation in my country, and harvesting has traditionally been done primarily by hand. In recent years, cotton harvesting in my country has gradually become mechanized. The impurity content of cotton harvesters has always been a significant weakness of domestically produced cotton harvesters compared to imported ones. Although various teams have made considerable progress in reducing impurity content, much of their work focuses on structural design, with relatively little research on mathematical models for predicting impurity content.
[0003] As a machine learning interpolation method, Kriging has been successfully applied in big data modeling in industries such as industry, commerce, and healthcare. Kriging's estimates are always close to the actual observed values, with little difference from reality. However, its estimated predictions always vary between observed values, making it difficult to provide accurate predictions when the predicted values change drastically.
[0004] The impurity content of cotton harvesters is related to various factors such as brush roller speed, forward speed, and drum linear speed, resulting in an extremely complex relationship between the operating parameters and the impurity content in the cotton harvester's field operation data, which is difficult to represent using traditional Kriging models. Therefore, the modeling accuracy of Kriging methods for cotton harvester field operation data needs to be improved. Summary of the Invention
[0005] To address the aforementioned technical problems, one objective of this invention is to provide a method for predicting the impurity content of cotton harvesters. First, the operating parameters and impurity content of the cotton harvester are preprocessed. Then, the dataset and samples are divided, and a Kriging prediction model for the impurity content of the cotton harvester is established using the samples. Next, with the goal of minimizing the impurity content, the optimal range of operating parameters is selected as the input to the Kriging prediction model. The Gray Wolf algorithm is used to optimize the Kriging prediction model, dynamically updating the predicted values to obtain the combination of operating data for the cotton harvester with the minimum impurity content. This invention can be used to predict the impurity content during cotton harvesting, solving the technical problem of existing cotton harvesters having difficulty predicting the impurity content and low prediction accuracy.
[0006] One objective of this invention is to provide a cotton harvester impurity content prediction system, comprising a data processing module, a data partitioning module, a data modeling module, and a model optimization module. This system can establish a Kriging prediction model for the cotton harvester's impurity content using cotton harvester operating data and impurity content, then optimize the Kriging prediction model using the Grey Wolf algorithm, dynamically updating the predicted values to obtain the cotton harvester operating data combination with the minimum impurity content, thereby improving the accuracy of existing cotton harvester impurity content prediction results.
[0007] One objective of this invention is to provide an electronic device including a memory and a processor, and computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the steps described in the cotton harvester impurity content prediction method.
[0008] Note that the description of these objectives does not preclude the existence of other objectives. One aspect of the invention does not require achieving all of the above objectives. Objectives other than those described above can be extracted from the description, drawings, and claims.
[0009] The present invention achieves the above-mentioned technical objectives through the following technical means.
[0010] A method for predicting the impurity content of cotton harvesters includes the following steps:
[0011] Step S1: Data preprocessing: Obtain cotton harvester operation data and corresponding cotton harvester impurity content, and preprocess the operation data;
[0012] Step S2, Dataset Partitioning: Construct a dataset using the cotton harvester operation data and impurity content preprocessed in Step S1, and then partition the dataset.
[0013] Step S3: Generate samples: Use the dataset constructed in step S2 to generate training samples and validation samples, wherein 80% of the dataset is randomly selected as training samples and 20% of the dataset is selected as test samples.
[0014] Step S4: Establish a Kriging model: Use the training samples described in step S3 to establish and train a Kriging prediction model for the impurity content of cotton harvesters.
[0015] Step S5: Input Filtering: With the goal of minimizing impurity content, filter out the optimal range of operating parameters as input to the Kriging prediction model for impurity content of the cotton harvester.
[0016] Step S6, Gray Wolf Algorithm Optimization: The Gray Wolf Algorithm is used to optimize the Kriging prediction model for the impurity content of the cotton harvester, dynamically updating the predicted values to obtain the combination of operating data for the cotton harvester with the minimum impurity content.
[0017] In the above scheme, the specific steps of the preprocessing in step S1 include:
[0018] Step S1.1: Divide the acquired data into groups and select the stable segments of data in each group;
[0019] Step S1.2: Use the 3δ criterion to examine the data selected in step S1.1 and remove abnormal data;
[0020] Step S1.3: Preprocess the data after detection in step S1.2 by calculating the average value of each group.
[0021] In the above scheme, step S4, establishing a Kriging prediction model for the impurity content of cotton harvesters, includes the following steps:
[0022] Step S4.1: Construct the basis function matrix F based on the input x and output y and the conditions they satisfy;
[0023] Step S4.2: Construct the input expression;
[0024] Step S4.3: Construct the sample x to be predicted new The output estimates and prediction errors;
[0025] Step S4.4: Calculate the regression mean square error
[0026] Step S4.5: Establish the optimal parameters for the optimization problem solution model.
[0027] In the above scheme, the inputs to the Kriging prediction model for the impurity content of the cotton harvester in step S4 are the brush roller speed, forward speed, and roller linear speed, and the output is the impurity content. The initial input and output relationship of the Kriging prediction model for the impurity content of the cotton harvester is as follows:
[0028]
[0029] Where y is the output;
[0030] x is the input;
[0031] f j (x) is the j-th basis function;
[0032] β j Let be the coefficients of the j-th basis function;
[0033] p is the number of basis functions;
[0034] Z(x) is a Gaussian process.
[0035] Furthermore, the Gaussian process Z(x) satisfies the following condition:
[0036] E(Z(x))=0
[0037] E(Z(x i )Z(x j ))=σ 2 R(θ,x i ,x j )
[0038] Where E(·) represents the expectation of the variable;
[0039] σ 2 This represents the sample variance.
[0040] R(θ,x i ,x j () represents the correlation matrix;
[0041] θ is the parameter vector of the correlation matrix;
[0042] x i It is the input vector of the i-th data;
[0043] x j It is the input vector of the j-th data.
[0044] In the above scheme, the expression for the Kriging prediction model of the impurity content of the cotton harvester after training in step S4 is:
[0045]
[0046] in, For the new sample x new The output predicted value;
[0047] f(x new ) represents x new A vector composed of values obtained through basis functions;
[0048] This is the correlation vector between the data to be predicted and the training data, obtained through the correlation matrix;
[0049] R is the correlation matrix;
[0050] Y is a vector composed of the training data output;
[0051] It is an estimate of the basis function coefficient vector β, expressed as:
[0052]
[0053] Where F is the basis function matrix, F = (f(x1), f(x2), ..., f(x...) n )) T n is the number of training samples;
[0054] F T It is the transpose of F.
[0055] In the above scheme, step S6, the optimization of the gray wolf algorithm, includes the following steps:
[0056] Step S6.1: Initialize the number of iterations and the impurity prediction results;
[0057] Step S6.2: For each prediction result, calculate the distance between each running parameter data and the impurity prediction result, and assign each running parameter data to the class of the nearest impurity prediction result to form a group;
[0058] Step S6.3: For each group, randomly select multiple running parameter data and calculate the fitness of each selected running parameter data. Based on the fitness value, select α wolf, β wolf, δ wolf and ω wolf, where α wolf is the optimal result, β wolf is the second best result, δ wolf is the third best result, and ω wolf is the result group.
[0059] Step S6.4: Based on the selected α, β, and δ wolves, update the best hunting position for each ω wolf, and recalculate the fitness value for all gray wolves after the update to update the α wolf, and use it as the new impurity prediction result.
[0060] Step S6.5: If the iteration converges or meets the stopping condition, retain the impurity prediction result with the best fitness value and output the group corresponding to the impurity prediction result; otherwise, increment the iteration count by 1 and return to step 6.2.
[0061] Furthermore, the expression for updating each optimal hunting position in S6.4 is as follows:
[0062]
[0063]
[0064] in, It is the kth velocity in the (i+1)th generation determined by the Kriging method;
[0065] θ is the inertia weight;
[0066] It is the k-th velocity in the i-th generation determined by the Kriging method;
[0067] λ1, λ2, and λ3 are learning factors;
[0068] A random number between [0, 1] modulo r1, r2, and r3;
[0069] It is the k-th best hunting position in the i-th generation;
[0070] It refers to the prey's position relative to the positions of the three gray wolves, α, β, and δ.
[0071] A cotton harvester impurity content prediction system based on Kriging and the Grey Wolf algorithm includes a data processing module, a data partitioning module, a data modeling module, and a model optimization module.
[0072] The data processing module is used to acquire cotton harvester operating data and the corresponding cotton harvester impurity content, and to preprocess the operating data;
[0073] The data partitioning module is used to construct a dataset using the cotton harvester operation data and impurity content preprocessed by the data processing module, and to partition the dataset, and then use the partitioned dataset to generate training samples and validation samples.
[0074] The data modeling module is used to establish and train a Kriging prediction model for the impurity content of cotton harvesters using training samples generated by the data partitioning module.
[0075] The model optimization module is used to select the optimal range of operating parameters as input to the Kriging prediction model for the impurity content of the cotton harvester. Then, the Grey Wolf algorithm is used to optimize the Kriging prediction model for the impurity content of the cotton harvester, dynamically update the predicted values, and obtain the combination of operating data of the cotton harvester with the minimum impurity content.
[0076] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, complete the steps described in the cotton harvester impurity content prediction method.
[0077] Compared with the prior art, the beneficial effects of the present invention are:
[0078] According to one aspect of the present invention, a method for predicting the impurity content of a cotton harvester is provided. First, the operating parameters and impurity content of the cotton harvester are preprocessed. Then, the dataset and samples are divided, and a Kriging prediction model for the impurity content of the cotton harvester is established using the samples. Next, with the goal of minimizing the impurity content, the optimal range of operating parameters is selected as the input to the Kriging prediction model for the impurity content of the cotton harvester. The Gray Wolf algorithm is used to optimize the Kriging prediction model for the impurity content of the cotton harvester, dynamically updating the predicted values to obtain the combination of operating data for the cotton harvester under the condition of minimizing the impurity content. This method can improve the accuracy of the impurity content prediction and improve the harvesting quality of the cotton harvester.
[0079] According to one aspect of the present invention, a cotton harvester impurity content prediction system is provided, comprising a data processing module, a data partitioning module, a data modeling module, and a model optimization module. This system can establish a Kriging prediction model for the impurity content of the cotton harvester based on the cotton harvester's operating data and the impurity content. Then, the Gray Wolf algorithm is used to optimize the Kriging prediction model, dynamically updating the predicted values to obtain the combination of cotton harvester operating data with the minimum impurity content, thereby improving the accuracy of existing cotton harvester impurity content prediction results.
[0080] According to one aspect of the present invention, an electronic device is provided, including a memory and a processor, and computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, complete the steps described in the cotton harvester impurity content prediction method.
[0081] Note that the description of these effects does not preclude the existence of other effects. One aspect of the invention does not necessarily have all the aforementioned effects. Effects other than those described above can be readily observed and extracted from the description, drawings, claims, etc. Attached Figure Description
[0082] Figure 1 is a flowchart of Embodiment 1 of the present invention.
[0083] Figure 2 is a schematic diagram of the interaction between the brush roller rotation speed and the forward speed on the impurity content in Embodiment 1 of the present invention.
[0084] Figure 3 is a schematic diagram of the interaction between the forward speed and the roller linear speed on the impurity content in Embodiment 1 of the present invention.
[0085] Figure 4 is a schematic diagram of the interaction between the roller linear speed and the brush roller rotation speed on the impurity content in Embodiment 1 of the present invention. Detailed Implementation
[0086] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0087] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "front," "rear," "left," "right," "upper," "lower," "axial," "radial," "vertical," "horizontal," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0088] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0089] Example 1
[0090] Figure 1 shows a preferred embodiment of the cotton harvester impurity content prediction method:
[0091] A method for predicting the impurity content of cotton in a cotton machine includes the following steps:
[0092] Step S1: Data preprocessing: Obtain cotton harvester operation data and corresponding cotton harvester impurity content, and preprocess the operation data;
[0093] Step S2, Dataset Partitioning: Construct a dataset using the cotton harvester operation data and impurity content preprocessed in Step S1, and then partition the dataset.
[0094] Step S3: Generate samples: Use the dataset constructed in step S2 to generate training samples and validation samples, wherein 80% of the dataset is randomly selected as training samples for subsequent training of the Kriging model, and 20% of the dataset is used as test samples to verify whether the subsequent Kriging model prediction model meets the accuracy requirements.
[0095] Step S4: Establish a Kriging model: Use the training samples described in step S3 to establish and train a Kriging prediction model for the impurity content of cotton harvesters.
[0096] Step S5: Input Screening: With the goal of minimizing impurity content, the optimal range of operating parameters is screened out as input to the Kriging prediction model for impurity content in the cotton harvester. The range of impurity content variation in the constraints depends on the adjustment range of the operating parameters during actual operation of the cotton harvester. According to this embodiment, preferably, the optimized ranges for the cotton harvester's rotational speed and advance speed are determined: brush roller rotational speed [270, 350] (r / min), advance speed [7.1, 8.5] (km / h), and roller linear speed [7, 14] (m / s). The interaction of these two factors is as follows: Figure 2 , three As shown in Figures 1 and 4, Figure 2 is a schematic diagram of the interaction between brush roller speed and forward speed on impurity content, Figure 3 is a schematic diagram of the interaction between forward speed and roller linear speed on impurity content, and Figure 4 is a schematic diagram of the interaction between roller linear speed and brush roller speed on impurity content. The darker the color in the figure, the lower the impurity content.
[0097] Step S6, Gray Wolf Algorithm Optimization: The Gray Wolf Algorithm is used to optimize the Kriging prediction model for the impurity content of the cotton harvester, dynamically updating the predicted values to obtain the combination of operating data for the cotton harvester with the minimum impurity content.
[0098] The methods for obtaining cotton harvester operation data in step S1 include on-board monitoring of agricultural machinery, remote monitoring, or smart farm platforms. The specific preprocessing steps include:
[0099] Step S1.1: Divide the acquired data into groups and select the stable segments of data in each group;
[0100] Step S1.2: Use the 3δ criterion to examine the data selected in step S1.1 and remove abnormal data;
[0101] Step S1.3: Preprocess the data after detection in step S1.2 by calculating the average value of each group.
[0102] In step S4, the inputs to the Kriging prediction model for the impurity content of the cotton harvester are the brush roller speed, the forward speed, and the roller linear speed, and the output is the impurity content.
[0103] Step S4, establishing a Kriging prediction model for the impurity content of cotton harvesters, includes the following steps:
[0104] Assume the input-output relationship of the Kriging prediction model for the impurity content of the cotton harvester in step S4 is as follows:
[0105]
[0106] Where y is the output;
[0107] x is the input;
[0108] f j (x) is the j-th basis function;
[0109] β j Let be the coefficients of the j-th basis function;
[0110] p is the number of basis functions;
[0111] Z(x) is a Gaussian process.
[0112] The Gaussian process Z(x) satisfies the following condition:
[0113] E(Z(x))=0
[0114] E(Z(x i )z(x j ))=σ 2 R(θ,x i x j )
[0115] Where E(·) represents the expectation of the variable;
[0116] σ 2 This represents the sample variance.
[0117] R(θ,x i x j () represents the correlation matrix;
[0118] θ is the parameter vector of the correlation matrix;
[0119] x i It is the input vector of the i-th data;
[0120] x j It is the input vector of the j-th data.
[0121] Construct the basis function matrix F based on the input x and output y and the conditions they satisfy:
[0122] F=(f(x1), f(x2),..., f(x n )) T
[0123] Where n is the number of samples in the training data;
[0124] f(x i (i = 1, 2, ..., n) represents the value obtained by the basis function for the i-th data, as shown below.
[0125] f(x i )=(f1(x i ), f2(xi ), ..., f p (x i ))
[0126] The basis function matrix F can be rewritten as
[0127]
[0128] Step S4.2: Construct the input expression:
[0129] Y = Fβ + Z
[0130] Where β is a vector composed of the coefficients of the basis functions;
[0131] Z is a vector composed of Gaussian processes of the training data.
[0132] Z=(Z(x1),z(x2),...,Z(x n )) T
[0133] Step S4.3: Construct the sample x to be predicted new Output estimates and prediction errors:
[0134] Sample x to be predicted new The output estimate is
[0135]
[0136] Y is a vector composed of the training data output;
[0137] c(x) T Yes, it is the coefficient vector.
[0138] Sample x new The prediction error is as follows.
[0139]
[0140] y(x new ) is sample x new The actual output value.
[0141] From the linear unbiased condition, we get
[0142]
[0143] F T c(x)-f(x)=0
[0144] Step S4.4: Calculate the regression mean square error
[0145]
[0146] σ 2 =D(Z)=E(Z) 2 )-(E(Z)) 2 =E(Z) 2 )
[0147] It is sample x new The corresponding vector obtained from the training data input through the correlation matrix:
[0148] Step S4.5: Establish the optimal parameters for the optimization problem solution model:
[0149]
[0150] stF T c(x)-f(x)=0
[0151] Construct the Langron function.
[0152]
[0153] λ is a Lagrange multiplier.
[0154] Taking the partial derivative, we get
[0155]
[0156]
[0157] have to
[0158] The estimated value of x is obtained by the following formula.
[0159]
[0160] Depend on The optimal estimate of β is obtained.
[0161]
[0162] Where F is the basis function matrix, F = (f(x1), f(x2), ..., f(x...)) n )) T n is the number of training samples;
[0163] F T It is the transpose of F.
[0164] The final expression for the Kriging prediction model of the impurity content of the cotton harvester in step S4 is as follows:
[0165]
[0166] in, For the new sample x new The output predicted value;
[0167] f(x new ) represents x new A vector composed of values obtained through basis functions;
[0168] This is the correlation vector between the data to be predicted and the training data, obtained through the correlation matrix;
[0169] R is the correlation matrix;
[0170] Y is a vector composed of the training data output;
[0171] To verify the accuracy of the established impurity prediction model, the coefficient of determination R0 was used. 2 The evaluation is defined as follows:
[0172]
[0173] y i It is the true output value of the i-th sample in the validation set;
[0174] It is the predicted output value of the i-th sample in the validation set;
[0175] n is the sample size of the validation set;
[0176] It is the average of the actual output values;
[0177] R 2 The closer it is to 1, the higher the accuracy of the prediction model.
[0178] The gray wolf algorithm optimization step S6 includes the following steps:
[0179] Step S6.1: Initialize the number of iterations and the impurity prediction results;
[0180] Step S6.2: For each prediction result, calculate the distance between each running parameter data and the impurity prediction result, and assign each running parameter data to the class of the nearest impurity prediction result to form a group;
[0181] Step S6.3: For each group, randomly select multiple running parameter data and calculate the fitness of each selected running parameter data. Based on the fitness value, select α wolf, β wolf, δ wolf and ω wolf, where α wolf is the optimal result, β wolf is the second best result, δ wolf is the third best result, and ω wolf is the result group.
[0182] Step S6.4: Based on the selected α, β, and δ wolves, update the best hunting position for each ω wolf, and recalculate the fitness value for all gray wolves after the update to update the α wolf, and use it as the new impurity prediction result.
[0183] Step S6.5: If the iteration converges or meets the stopping condition, retain the impurity prediction result with the best fitness value and output the group corresponding to the impurity prediction result; otherwise, increment the iteration count by 1 and return to step 6.2.
[0184] The expression for updating each optimal hunting position in S6.4 is as follows:
[0185]
[0186]
[0187] in, It is the kth velocity in the (i+1)th generation determined by the Kriging method;
[0188] θ is the inertia weight;
[0189] It is the k-th velocity in the i-th generation determined by the Kriging method;
[0190] λ1, λ2, and λ3 are learning factors;
[0191] A random number between [0, 1] modulo r1, r2, and r3;
[0192] It is the k-th best hunting position in the i-th generation;
[0193] It refers to the prey's position relative to the positions of the three gray wolves, α, β, and δ.
[0194] According to this embodiment, the preferred mathematical model for an individual gray wolf tracking its prey's location is described as follows:
[0195]
[0196] Then we can obtain:
[0197]
[0198] in, These represent the current positions of the four wolves: α, β, δ, and ω. These represent the distances between the current three wolves α, β, and δ, and the wolf ω, respectively. It is a coefficient vector.
[0199] This invention can be used to predict the impurity content during cotton harvesting, solving the technical problem of low accuracy and difficulty in predicting impurity content in existing cotton harvesters. Furthermore, by using the predicted optimal combination of operating parameters for cotton harvesting, the quality of cotton harvesting can be improved.
[0200] Example 2
[0201] A prediction system for predicting the impurity content of cotton harvesters includes a data processing module, a data partitioning module, a data modeling module, and a model optimization module.
[0202] The data processing module is used to acquire cotton harvester operating data and the corresponding cotton harvester impurity content, and to preprocess the operating data;
[0203] The data partitioning module is used to construct a dataset using the cotton harvester operation data and impurity content preprocessed by the data processing module, and to partition the dataset, and then use the partitioned dataset to generate training samples and validation samples.
[0204] The data modeling module is used to establish a Kriging prediction model for the impurity content of cotton harvesters using training samples generated by the data partitioning module.
[0205] The model optimization module is used to select the optimal range of operating parameters as input to the Kriging prediction model for the impurity content of the cotton harvester. The Gray Wolf algorithm is then used to optimize the Kriging prediction model for the impurity content of the cotton harvester, dynamically updating the predicted values to obtain the combination of operating data for the cotton harvester with the minimum impurity content. This embodiment has the beneficial effects of Embodiment 1, and therefore will not be elaborated further.
[0206] Example 3
[0207] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, complete the steps described in the cotton harvester impurity content prediction method.
[0208] It should be understood that although this specification is described according to various embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0209] The detailed descriptions listed above are merely specific illustrations of feasible embodiments of the present invention and are not intended to limit the scope of protection of the present invention. All equivalent embodiments or modifications made without departing from the spirit of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting the impurity content of cotton harvesters, characterized in that, Includes the following steps: Step S1: Data preprocessing: Obtain cotton harvester operation data and corresponding cotton harvester impurity content, and preprocess the operation data; Step S2, Dataset Partitioning: Construct a dataset using the cotton harvester operation data and impurity content preprocessed in Step S1, and then partition the dataset. Step S3: Generate samples: Use the dataset constructed in step S2 to generate training samples and validation samples, wherein 80% of the dataset is randomly selected as training samples and 20% of the dataset is selected as test samples. Step S4: Establish a Kriging model: Use the training samples described in step S3 to establish and train a Kriging prediction model for the impurity content of cotton harvesters. Step S5: Input Filtering: With the goal of minimizing impurity content, filter out the optimal range of operating parameters as input to the Kriging prediction model for impurity content of the cotton harvester. Step S6, Gray Wolf Algorithm Optimization: The Gray Wolf Algorithm is used to optimize the Kriging prediction model of the impurity content of the cotton harvester, dynamically update the prediction value, and obtain the combination of operating data of the cotton harvester with the minimum impurity content. The specific steps of the preprocessing in step S1 include: Step S1.1: Divide the acquired data into groups and select the stable segments of data in each group; Step S1.2: Utilize The criteria are used to detect the data selected in step S1.1 and to remove abnormal data; Step S1.3: Preprocess the data detected in step S1.2 by calculating the average value of each group; In step S4, the inputs to the Kriging prediction model for the impurity content of the cotton harvester are the brush roller speed, forward speed, and roller linear speed, and the output is the impurity content. The initial input and output relationship of the Kriging prediction model for the impurity content of the cotton harvester is as follows: ; in, For output; For input; For the first One basis function; For the first The coefficients of the basis functions; The number of basis functions; It is a Gaussian process; The gray wolf algorithm optimization step S6 includes the following steps: Step S6.1: Initialize the number of iterations and the impurity prediction results; Step S6.2: For each prediction result, calculate the distance between each running parameter data and the impurity prediction result, and assign each running parameter data to the class of the nearest impurity prediction result to form a group; Step S6.3: For each group, randomly select multiple running parameter data and calculate the fitness of each selected running parameter data. Based on the fitness value, select α wolf, β wolf, δ wolf and ω wolf, where α wolf is the optimal result, β wolf is the second best result, δ wolf is the third best result, and ω wolf is the result group. Step S6.4: Based on the selected α, β, and δ wolves, update the best hunting position for each ω wolf, and recalculate the fitness value for all gray wolves after the update to update the α wolf, and use it as the new impurity prediction result. Step S6.5: If the iteration converges or meets the stopping condition, retain the impurity prediction result with the best fitness value and output the group corresponding to the impurity prediction result; otherwise, increment the iteration count by 1 and return to step 6.
2.
2. The method for predicting the impurity content of cotton harvesters according to claim 1, characterized in that, Step S4, establishing a Kriging prediction model for the impurity content of cotton harvesters, includes the following steps: Step S4.1: Based on the input and output Construct the basis function matrix based on the conditions it satisfies. ; Step S4.2: Construct the input expression; Step S4.3: Construct the sample to be predicted The output estimate and prediction error; Step S4.4: Calculate the regression mean square error ; Step S4.5: Establish the optimal parameters of the optimization problem solution model, which are the number of basis functions and a Gaussian process.
3. The method for predicting the impurity content of cotton harvesters according to claim 1, characterized in that, The Gaussian process The following conditions must be met: ; ; in, Represents the expected value of a variable; This represents the sample variance. This is the correlation matrix; This is the parameter vector of the correlation matrix; It is the first The input vector of data; It is the first The input vector of data.
4. The method for predicting the impurity content of cotton harvesters according to claim 1, characterized in that, The expression for the Kriging prediction model of the impurity content of the cotton harvester trained in step S4 is as follows: ; in, For new samples The output predicted value; express A vector composed of values obtained through basis functions; This is the correlation vector between the data to be predicted and the training data, obtained through the correlation matrix; This is the correlation matrix; It is a vector composed of the training data output; It is the vector of basis function coefficients The estimated value is expressed as: ; in, For the basis function matrix, , It is the number of training samples; yes The transpose of .
5. The method for predicting the impurity content of cotton harvesters according to claim 1, characterized in that, The expression for updating each optimal hunting position in S6.4 is as follows: ; ; in, It is the kth velocity in the (i+1)th generation determined by the Kriging method; It is inertial weight; It is the k-th velocity in the i-th generation determined by the Kriging method; , , It is a learning factor; , , A random number between [0, 1] modulo 0; It is the k-th best hunting position in the i-th generation; , , The location of the prey relative to The positions of the three gray wolves.
6. A prediction system for the cotton harvester impurity content prediction method according to any one of claims 1-5, characterized in that, It includes a data processing module, a data partitioning module, a data modeling module, and a model optimization module; The data processing module is used to acquire cotton harvester operating data and the corresponding cotton harvester impurity content, and to preprocess the operating data; The data partitioning module is used to construct a dataset using the cotton harvester operation data and impurity content preprocessed by the data processing module, and to partition the dataset, and then use the partitioned dataset to generate training samples and validation samples. The data modeling module is used to establish and train a Kriging prediction model for the impurity content of cotton harvesters using training samples generated by the data partitioning module. The model optimization module is used to select the optimal range of operating parameters as input to the Kriging prediction model for the impurity content of the cotton harvester. Then, the Grey Wolf algorithm is used to optimize the Kriging prediction model for the impurity content of the cotton harvester, dynamically update the predicted values, and obtain the combination of operating data of the cotton harvester with the minimum impurity content.
7. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the steps of any one of claims 1-5.
Citation Information
Patent Citations
Method and system for optimizing LSTM neural network model through grey wolf algorithm
CN115034126A
Cotton crop row detection method and apparatus based on computer vision, and storage medium
WO2021226900A1