Two-stage regulation and control method for forward speed of pepper harvester based on multi-source prediction model
By employing a two-level control method based on a multi-source prediction model, combined with ARIMA torque and CNN-LSTM impurity rate models, adaptive control of a chili harvester in complex environments was achieved. This solved the problem of insufficient information representation capabilities in existing technologies and improved harvesting efficiency and quality.
Patent Information
- Application Number
- CN202510454223.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-10-28
AI Technical Summary
The forward speed control of existing pepper harvesters relies on feedback from a single sensor, resulting in limited information representation capabilities, insufficient generalization capabilities, low robustness, difficulty in adapting to complex operating environments, and affecting harvesting efficiency and quality.
A two-stage control method based on a multi-source prediction model is adopted, which combines an ARIMA torque prediction model improved by image processing technology and a CNN-LSTM impurity prediction model improved by ant colony algorithm. Data is collected in real time by torque sensor and high-speed camera to perform first-stage and second-stage speed control, ensuring the stability of roller load and low impurity.
It has achieved adaptive control of the chili harvester in complex environments, reduced chili loss and impurity rates, improved harvesting efficiency and quality, and enhanced the level of intelligence.
Smart Images

Figure CN120848609A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of chili harvester technology, specifically relating to a two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model. Background Art
[0002] Currently, the harvesting methods for chili peppers in large-scale cultivation in China have largely shifted from manual to mechanized harvesting. Chili pepper harvesting methods include vibration, airflow, and rotary harvesting, with rotary drum harvesting being the most widely used. Its main working principle involves a comb-like structure attached to the drum, mounted at the front of a traveling vehicle. As the vehicle moves forward at a certain speed, the rotating drum drives the comb to comb the chili peppers, causing them to fall onto a conveyor belt and be transported into a storage bin. Currently, the parameters of chili pepper harvesters are mainly determined and controlled by manual experience, resulting in low levels of automation, low operating efficiency, and an inability to adjust the harvesting speed according to the chili pepper's growth. This can lead to overloading of the harvester drum, hindering efforts to reduce chili pepper loss and impurity levels, and ultimately resulting in poor harvesting outcomes. With the development of automation and intelligent technologies, the intelligentization of chili pepper harvesting machinery has become an inevitable trend. The forward speed of a chili harvester directly affects harvesting efficiency and the impurity rate of harvested chilies. Current technologies generally employ threshold control strategies based on single sensor feedback (such as load or impurity rate), using single-data-source prediction models for single-stage control of the harvester's forward speed. The mainstream single-data-source prediction models are LSTM and ARIMA models. However, traditional single-data-source prediction models suffer from limited information representation capabilities, insufficient generalization ability, and low robustness, leading to significant prediction accuracy and control lag. Furthermore, the fruiting and branching patterns of chili plants are random within agronomical requirements, and single-stage control lacks adaptability in practical applications, struggles to cope with complex operating environments, and results in unstable harvest quality.
[0003] To improve the adaptability of the forward speed and the harvesting quality of chili peppers, this invention proposes a two-stage control method for the forward speed of a chili pepper harvester based on a multi-source prediction model. This method utilizes two multi-source prediction models—an ARIMA torque prediction model improved with image processing technology and a CNN-LSTM impurity prediction model improved with ant colony algorithm—and their corresponding forward speed adjustment strategies to achieve adaptive control of the harvester's forward speed through primary and secondary speed regulation. The model improvements address the problems of low robustness, control lag, and poor environmental adaptability inherent in traditional single-source prediction models. Furthermore, this method can monitor the chili pepper harvesting status in real time, significantly reduce the impurity content of harvested chili peppers, ensure harvesting quality, improve drum load stability and harvesting efficiency, and meet the needs of intelligent agriculture development. Summary of the Invention
[0004] To address the shortcomings of existing technologies and the demands of intelligent agricultural development, this invention proposes a two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model. A torque sensor collects the torque signal on the main shaft of the drum during chili harvesting, which is then input into a Differential Integrated Moving Average Autoregressive Model (ARIMA) to predict the torque value on the main shaft at the next moment. A high-speed camera captures images of the plants in front of the harvester, and image processing technology is used to determine the fruit density. Based on the chili fruit density obtained from the image recognition, a torque correction factor is designed to make the torque value predicted by the ARIMA model closer to the actual value. A mechanical model converts the predicted torque value into a predicted load value, and the method is then applied based on the harvesting load and... The system uses changes in chili pepper density to first-level control the forward speed. Furthermore, an improved CNN-LSTM model based on ant colony optimization is applied to predict the impurity content of the harvested chili peppers. A CNN layer is built within the LSTM model to extract spatial feature vectors from the image, enhancing the model's generalization ability. The ant colony optimization algorithm optimizes the model's hyperparameters through a global search mechanism, accelerating convergence and making predictions faster. Second-level control of the forward speed is then implemented based on the predicted impurity content, while the load status is monitored in real time. When the load status is abnormal, the forward speed is adjusted first to restore normal load before the second-level control based on the predicted impurity content is executed. This ensures the chili harvester operates under normal drum load and low impurity content conditions. This improves the harvesting efficiency and automation level of the chili harvester in complex working environments.
[0005] The technical solution of the present invention to solve the above-mentioned technical problems is as follows:
[0006] Obtain the current torque signal of the chili harvester drum;
[0007] The torque signal is acquired by the torque sensor in the middle of the drum spindle and displayed on the screen of the host computer as a set of time-series randomly fluctuating torque curves.
[0008] The acquired torque signal is preprocessed, and multi-step difference is used to process the torque information at the current moment to obtain a set of stable torque curve signal waves, which greatly improves the fit between the torque signal and the ARIMA model.
[0009] The ARIMA model operates according to the following formula:
[0010]
[0011] In the formula, c is a constant, which can be 0 in the ARIMA model, and ε t For white noise, θ represents the autoregressive coefficient and the influence coefficient of the MA model in the ARIMA model, respectively. p and q are the order of the model, which control the autoregressive and moving average parts of the model, respectively. d controls the higher-order difference of the signal.
[0012] First, the parameters are determined. In the ARIMA model, the ACF autocorrelation coefficient curve and PACF partial autocorrelation coefficient curve of the torque signal are plotted. The calculation formulas for the ACF autocorrelation coefficient ρ(k) and the PACF partial autocorrelation coefficient φ(k) are as follows:
[0013] ρ(k)=cov(x t ,x t+k ) / var(x t );
[0014] φ(k)=cov(x t -E[x t |x t-1 ,...,x t-(k-1) ],x t-k -E[x t-k |x t-(k-1) ,...,x t-1 ]) / var(x t );
[0015] In the formula, cov represents covariance, var represents variance, E represents expectation, and k represents lag value;
[0016] Observe the function curves of ACF and PACF. The lag order at which both are truncated is represented by the values of p and q. p indicates how many historical values are used for prediction. d is set to 1 to perform first-order difference on the torque information after multi-step difference processing, so that the torque information can be further periodicized and better adapted to the ARIMA model. After the parameters are determined, the previously preprocessed historical time-series torque signal is used as the training dataset for the ARIMA model. The ARIMA model is trained and the residuals are checked. If there is a white noise term, the Akaike Information Criterion (AIC) is used to further evaluate the model quality.
[0017] The model quality assessment of AIC follows the following formula: AIC = 2m-2 ln(L);
[0018] m is the number of estimated parameters in the model, and L is the maximum log-likelihood of the model fit. If there is no white noise or the prediction accuracy requirement is not met, the parameters are reset.
[0019] A high-speed camera is installed above the cab of the chili harvester to collect real-time images of the chili harvester's drum. The images captured are of the chili plants at a certain distance in front of the harvesting head, and each image corresponds to a chili fruit density value.
[0020] Image recognition processing technology is used to detect the density of chili peppers in front;
[0021] The captured images are input into the machine vision processing model. After converting the RGB color chili plant images into HSV color space images, the Region of Interest (ROI) is extracted. The ROI is a rectangular area with a width of 1.5 meters, with a reference distance of 2 meters in front of the picking head. The feeding amount is normalized by the area occupied by the chili fruit in the ROI, and used as a substitute for density. Morphological closing operations are used to eliminate voids in the fruit area, and the percentage of fruit pixels (Q) within the ROI is calculated by contour detection.
[0022] The calculation formula is as follows:
[0023] Based on the density of chili pepper fruits obtained from image recognition, a torque correction factor was designed;
[0024] The goal is to adjust the torque predicted by the ARIMA model to make it closer to the true value;
[0025] Calculate the average value of the normalized index and use it as the standard for deviation adjustment to design the correction factor. The formula for calculating the correction factor is as follows:
[0026]
[0027] The purpose of this formula is to reduce torque based on the deviation from the normalized index average if the torque is higher than the average value, and to increase torque if the torque is lower than the average value.
[0028] In the formula, μ is a correction factor; a negative result indicates that the torque needs to be reduced, while a positive result indicates that the torque needs to be increased. Q is the measured density of the chili pepper fruit. The torque prediction result is calculated by multiplying the ARIMA-predicted torque result by the correction factor μ, and then adding it to the original prediction value to obtain the final torque prediction value.
[0029] Finally, the ARIMA predicted torque signal for the next moment, after image processing correction, is obtained.
[0030] A set of time-series torque signals acquired by a torque sensor is used to define the level of torque values using the fuzzy C-means clustering algorithm (FCM).
[0031] A mechanical model is established to convert the predicted torque value and the torque value ranges of the three levels obtained by fuzzy clustering into the predicted load value and the load value ranges of the three levels.
[0032] The forward speed is adjusted by comparing the predicted load value with three load value ranges. If the predicted load value is in the high load range, the forward speed is reduced; if it is in the low load range, the forward speed is increased, until the forward speed is adjusted to stop when the predicted load value is within the normal load value range.
[0033] Furthermore, the CNN-LSTM chili pepper harvest impurity prediction model improved by the ant colony algorithm specifically includes:
[0034] Establish 3-5 CNN convolutional layers, and denote the processed ROI region as... The input is fed into the layers of a CNN convolutional neural network, and the n-layer convolutional layer passes through the convolutional kernel. After feature mapping of the image, the feature maps of each corresponding layer are output as follows: The calculation formula is
[0035] F n =MaxPool(ReLU(K) n *F n-1 +b n ));
[0036] After global average pooling, the feature map is compressed into a spatial feature vector. Used to represent spatial features in an image related to impurity level;
[0037] In the above formulas, H, W, and C represent height, width, and number of channels, respectively; k and D represent kernel size and number of output channels, respectively; * represents convolution operation; ReLU activation function enhances nonlinear expressiveness; and MaxPool represents max pooling operation.
[0038] Load time-series data is collected in real time by weight sensors installed on the upper and lower conveyor belts of the chili harvester's separating device. The time series of the total mass of material measured by the upper sensor is denoted as follows: The time series of net weight of cleaned chili peppers measured by the lower sensor is denoted as follows: Calculation of impurity content labels based on the principle of mass conservation
[0039] Time series data with impurity rate {y1,y2,...,y T} and image feature vector f cnn Image features and time-series data on clutter content are aligned using a sliding window and then combined to form an enhanced input x. t =[y t ;f cnn The data is input into an LSTM neural network. Assuming h LSTM units are selected, the LSTM units update the structure of each part of the LSTM unit according to the step size of time step t, and update the forget gate, input gate, candidate cell state and cell state update, and output gate.
[0040] The LSTM unit updates the hidden state h through a gating mechanism. t =LSTM(C t ,h t-1 Finally, the predicted impurity level is output through the fully connected layer.
[0041] Where h t h represents the hidden state at the current moment. t-1 It is the hidden state from the previous moment, C t For the updated cell state, W o Let b be the weight matrix of the output gate. o This is the bias vector for the output gate;
[0042] Ant colony optimization is used to optimize network hyperparameters. The parameter search space is defined to include the number of convolutional kernels n. conv ∈[16,64], number of LSTM hidden units n hidden ∈[32,128] and learning rate η∈[10 -4 10 -3 ], ant path encoding is And initialize the pheromone matrix τ ij ;
[0043] Based on fitness function Calculate the pheromone increment Δτ i ;
[0044] in To verify the root mean square error of the set, λ is the model complexity penalty coefficient;
[0045] Update pheromone concentration through elite strategies Path selection probability according to P(θ) j )∝[τ j ] α [η j ] β The optimal parameter θ is obtained through dynamic adjustment and iterative convergence. * ;
[0046] During model training, the Huber loss function is combined with the Adam optimizer to update the weight parameters through backpropagation. In the deployment phase, the trained model is embedded into the chili harvester control system to receive real-time load data streams from the upper and lower conveyor belts and output the predicted impurity content value.
[0047] Three levels of impurity content are preset: high impurity content, medium impurity content, and low impurity content. Two-level speed regulation is performed. If the impurity content is not low, the forward speed is continuously reduced and adjusted until the predicted impurity content is maintained at low impurity content.
[0048] After the speed adjustment is completed, the predicted load value is monitored. If the predicted load value changes, the speed adjustment scheme based on the predicted load value is executed first.
[0049] When the predicted load value is in the high load range, the forward speed is reduced; when it is in the low load range, the forward speed is increased, until the forward speed stops adjusting when the predicted load value is within the normal load range.
[0050] This invention discloses a two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model. It establishes an ARIMA torque prediction model improved using image recognition and a CNN-LSTM impurity prediction model improved using ant colony algorithm. After obtaining the predicted torque value, it is converted into a predicted drum load value through a mechanical model. The forward speed is then initially adjusted based on the predicted drum load value to maintain the drum load at a normal level. Simultaneously, an impurity prediction model is established to monitor the level of impurity at harvest. The forward speed of the chili harvester is further adjusted according to the predicted load value and the predicted impurity rate using a preset control method. This model improvement overcomes the limitations of traditional single-source data source models, such as limited information representation capabilities, insufficient generalization ability, and low robustness, which lead to significant prediction accuracy and control lag. This allows the chili harvester to maintain the drum load at a normal level even in complex working environments, avoiding drum overload and maintaining a low impurity rate at harvest, thereby improving the harvesting efficiency and harvesting effect, and enhancing the intelligence level of the chili harvester. Attached Figure Description
[0051] To more clearly illustrate the examples of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art are briefly introduced below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort and still fall within the scope of the present invention.
[0052] Figure 1 This is a schematic diagram illustrating the implementation process of the two-level control method for the forward speed of a chili harvester based on a multi-source prediction model provided in an embodiment of the present invention.
[0053] Figure 2 This is a schematic diagram of the assembly positions of a high-speed camera, a torque sensor, and various components of a chili harvester provided in an embodiment of the present invention. In the diagram, 1 is the high-speed camera, 2 is the torque sensor, 3 is the drum spindle, 4 is the separation device, 5 is the material box, 6 is the weight sensor on the upper conveyor belt of the separation device, and 7 is the weight sensor on the lower conveyor belt of the separation device.
[0054] Figure 3 The ARIMA torque prediction model provided in this embodiment of the invention dynamically corrects the predicted value through image features, converts it into a roller load value by combining it with a mechanical model, and realizes preliminary control of the forward speed based on the load range determination.
[0055] Figure 4This is a schematic diagram illustrating an embodiment of an image processing technique provided by the present invention;
[0056] Figure 5 A schematic diagram illustrating the process of establishing a CNN-LSTM model with improved ant colony algorithm and predicting the clutter content, provided in an embodiment of the present invention;
[0057] Figure 6 This is a schematic diagram illustrating the process of further controlling the forward speed through a preset control method, as provided in an embodiment of the present invention. Detailed Implementation
[0058] To provide a clearer and more complete description of the technical solutions and advantages in the embodiments of the present invention, the present invention will be further described below with reference to the accompanying drawings. It should be understood that the described embodiments are only some embodiments, not all embodiments. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort still fall within the scope of protection of the present invention.
[0059] The purpose of this invention is to propose a two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model. The preset control method uses data from two multi-modal prediction models—an ARIMA torque prediction model improved by image processing technology and a CNN-LSTM chili harvest impurity rate prediction model improved by ant colony algorithm—to adjust the forward speed of the chili harvester in real time. This allows the chili harvester to maintain normal drum load and low impurity rate during operation in complex working environments with varying chili plant and fruit densities, further improving the quality and efficiency of chili harvesting. This method includes, but is not limited to, the following steps:
[0060] The steps for predicting roller torque to obtain predicted load are as follows: Figure 3 First, obtain the current torque signal of the chili harvester drum;
[0061] like Figure 2 The torque signal is collected by the torque sensor 2 in the middle of the drum spindle 3 and displayed on the screen of the host computer. It is a set of time-series randomly fluctuating torque curves.
[0062] The acquired torque signal is preprocessed, and multi-step difference is used to process the torque information at the current moment to obtain a set of stable torque curve signal waves, which greatly improves the fit between the torque signal and the ARIMA model.
[0063] The ARIMA model operates according to the following formula:
[0064]
[0065] In the formula, c is a constant, which can be 0 in the ARIMA model, and ε t For white noise, θ represents the autoregressive coefficient and the influence coefficient of the MA model in the ARIMA model, respectively. p and q are the order of the model, which control the autoregressive and moving average parts of the model, respectively. d controls the higher-order difference of the signal.
[0066] First, the parameters are determined. In the ARIMA model, the ACF autocorrelation coefficient curve and PACF partial autocorrelation coefficient curve of the torque signal are plotted. The calculation formulas for the ACF autocorrelation coefficient ρ(k) and the PACF partial autocorrelation coefficient φ(k) are as follows:
[0067] ρ(k)=cov(x t ,x t+k ) / var(x t );
[0068] φ(k)=cov(x t -E[x t |x t-1 ,...,x t-(k-1) ],x t-k -E[x t-k |x t-(k-1) ,...,x t-1 ]) / var(x t );
[0069] In the formula, cov represents covariance, var represents variance, E represents expectation, and k represents lag value;
[0070] Observe the function curves of ACF and PACF. The lag order at which both are truncated is represented by the values of p and q. p indicates how many historical values are used for prediction. d is set to 1 to perform first-order difference on the torque information after multi-step difference processing, so that the torque information can be further periodicized and better adapted to the ARIMA model. After the parameters are determined, the previously preprocessed historical time-series torque signal is used as the training dataset for the ARIMA model. The ARIMA model is trained and the residuals are checked. If there is a white noise term, the Akaike Information Criterion (AIC) is used to further evaluate the model quality.
[0071] The model quality assessment of AIC follows the following formula: AIC = 2m - 2ln(L);
[0072] m is the number of estimated parameters in the model, and L is the maximum log-likelihood of the model fit. If there is no white noise or the prediction accuracy requirement is not met, the parameters are reset.
[0073] like Figure 2A high-speed camera 1 is installed above the cab of the chili harvester to collect real-time image information in front of the harvester's drum. The captured images are of the chili plants at a certain distance in front of the harvesting head, and each image corresponds to a chili fruit density value.
[0074] The steps for correcting the predicted torque value using image processing techniques are as follows: Figure 4 First, image recognition processing technology is used to detect the density of the chili peppers in front;
[0075] The captured images are input into the machine vision processing model. After converting the RGB color chili plant images into HSV color space images, the ROI region is extracted. The HSV color space image has more saturated colors, which is more conducive to image annotation by the vision processing model. The HSV color space conversion parameters are H∈[0,30], S∈[50,255], and V∈[50,255]. The ROI region is a rectangular area with a width of 1.5 meters, with 2 meters in front of the picking head as the reference. The feeding amount index is normalized by the area occupied by the chili fruit in the ROI region and used as a substitute index for density. Morphological closing operation is used to eliminate the voids in the fruit area. The percentage of fruit pixels Q in the ROI is calculated by contour detection.
[0076] The calculation formula is as follows:
[0077] Based on the density of chili pepper fruits obtained from image recognition, a torque correction factor was designed;
[0078] The goal is to adjust the torque predicted by the ARIMA model to make it closer to the true value;
[0079] Calculate the average value of the normalized index and use it as the standard for deviation adjustment to design the correction factor. The formula for calculating the correction factor is as follows:
[0080]
[0081] The purpose of this formula is to reduce torque based on the deviation from the normalized index average if the torque is higher than the average value, and to increase torque if the torque is lower than the average value.
[0082] In the formula, μ is a correction factor; a negative result indicates that the torque needs to be reduced, while a positive result indicates that the torque needs to be increased. Q is the measured density of the chili pepper fruit. The torque prediction result is calculated by multiplying the ARIMA-predicted torque result by the correction factor μ, and then adding it to the original prediction value to obtain the final torque prediction value.
[0083] Finally, the ARIMA predicted torque signal for the next moment, after image processing correction, is obtained.
[0084] A set of time-series torque signals acquired by a torque sensor was used to define the levels of torque values using the fuzzy C-means clustering algorithm (FCM). The torque signal dataset was divided into three sample subsets: high torque, normal torque, and low torque, with three classes. This results in three class centers, each represented by a c-means clustering algorithm. i This means that the image-corrected ARIMA torque signal is used as the input sample x. j The input includes the number of classes c, the membership factor M, and the maximum number of iterations max_iter. M is usually set to 2, and max_iter is usually set to 100.
[0085] First, initialize the membership matrix, setting an initial membership matrix as U. (0) =[u ij ],u ij Indicates torque signal x i The degree of membership with the cluster center, where n represents the number of clusters x. j The number of data points in the dataset is used to calculate the cluster centers c. i The cluster centers are calculated using the following formula, where m represents the number of clusters:
[0086]
[0087] After calculating the cluster centers, the membership matrix is updated according to the following formula, and the updated membership matrix is denoted as U. (1) :
[0088]
[0089] In the lower part of the fraction, the denominator represents the sum from the current object to all cluster centers, and the numerator represents the dataset x. j Data from the cluster center c i The distance is used to update the membership degree in subsequent iterations of iter according to this formula.
[0090] Let the membership degree be updated after the number of iterations of iter. The membership degree of iter in the previous update is ε represents the error threshold;
[0091] When the formula is satisfied: When the membership degree no longer changes significantly, the clustering classification has reached its optimal effect, and the iteration stops; at this point, the torque value ranges for the three levels are obtained through FCM. Figure 3 As shown, the mechanical model establishes a system that converts the predicted torque value and the three levels of torque value intervals obtained from fuzzy clustering into the predicted load value and the three levels of load value intervals. The formula is as follows:
[0092]
[0093] Where F is the load, M is the torque on the drum spindle, C is the total number of spring teeth on the drum, R is the force arm of the load from the axis of the drum spindle, and M f denoted as , where r is the torque exerted by the spring tooth mounting plate on the main shaft of the drum, and m is the total weight of the drum.
[0094] The predicted load value is compared with three load value ranges, and speed adjustment is performed in one level. If the predicted load value is in the high load range, the forward speed is reduced, and if it is in the low load range, the forward speed is increased, until the forward speed is stopped when the predicted load value is within the normal load value range.
[0095] Furthermore, the CNN-LSTM chili pepper harvest impurity prediction model improved by the ant colony algorithm includes the following steps for predicting the harvest impurity rate: Figure 5 As shown, it specifically includes:
[0096] We construct a 5-layer CNN convolutional layer, and denote the processed ROI region as... The input is fed into the layers of a CNN convolutional neural network, and the n-layer convolutional layer passes through the convolutional kernel. After feature mapping of the image, the feature maps of each corresponding layer are output as follows: The calculation formula is
[0097] F n =MaxPool(ReLU(K) n *F n-1 +b n ));
[0098] After global average pooling, the feature map is compressed into a spatial feature vector. The formula for global average pooling, used to represent spatial features related to impurity levels in an image, such as clustered regions of chili leaves, is:
[0099]
[0100] In the above formulas, H, W, and C represent height, width, and number of channels, respectively; k and D represent kernel size and number of output channels, respectively; * represents convolution operation; ReLU activation function enhances nonlinear expressiveness; and MaxPool represents max pooling operation.
[0101] like Figure 2 The load time series data is collected in real time by weight sensors installed on the upper conveyor belt 6 and lower conveyor belt 7 of the chili harvester's separating device 4. The time series of the total mass of material measured by the upper sensor is denoted as follows: The time series of net weight of cleaned chili peppers measured by the lower sensor is denoted as follows: Calculation of impurity content labels based on the principle of mass conservation
[0102] Time series data with impurity rate {y1,y2,...,y T} and image feature vector f cnn Image features and time-series data on clutter content are aligned using a sliding window and then combined to form an enhanced input x. t =[y t ;f cnn The data is then input into an LSTM neural network. Assuming h LSTM units are selected, the update process of the LSTM units at time step t is as follows:
[0103] The formula for calculating the forgetting gate is f. t =σ(W f ·[h t-1 ,x t ]+b f Since the output value needs to be compressed to the (0,1) interval, the sigmoid function σ is used;
[0104] Among them W f This is the weight matrix of the forget gate, with dimensions (h, m×T+h), b f h is the bias vector of the forget gate. t-1 It is the hidden state from the previous moment, x t It is the input at the current moment;
[0105] The formula for calculating the input gate is i. t =σ(W i ·[h t-1 ,x t ]+b i );
[0106] Among them W i It is the weight matrix of the input gate, with dimensions (h, m×T+h), b i The bias vector for the input gate; the formula for setting the candidate cell state is: The formula for updating cell states after setting candidate cell states is as follows:
[0107] Among them W c It is the weight matrix of the candidate cell states, b c is the bias vector of the candidate cell state, where * denotes element-wise multiplication;
[0108] The formula for calculating the output gate is: t =σ(W o ·[h t-1 ,x t ]+b o );
[0109] Among them W o Let b be the weight matrix of the output gate. o This is the bias vector for the output gate;
[0110] The LSTM unit updates the hidden state h through a gating mechanism. t =LSTM(C t ,h t-1 Finally, the predicted impurity level is output through the fully connected layer.
[0111] Ant colony optimization is used to optimize network hyperparameters. The parameter search space is defined to include the number of convolutional kernels n. conv ∈[16,64], number of LSTM hidden units n hidden ∈[32,128] and learning rate η∈[10 -4 10 -3 ], ant path encoding is And initialize the pheromone matrix τ ij ;
[0112] Based on fitness function Calculate the pheromone increment Δτ i ;
[0113] in To verify the root mean square error of the set, λ is the model complexity penalty coefficient;
[0114] Update pheromone concentration through elite strategies Path selection probability according to P(θ) j )∝[τ j ] α [η j ] β The optimal parameter θ is obtained through dynamic adjustment and iterative convergence. * ;
[0115] Huber loss function During model training, the Huber loss function is combined with the Adam optimizer to update the weight parameters through backpropagation. In the deployment phase, the trained model is embedded into the chili harvester control system to receive real-time load data streams from the upper and lower conveyor belts and output the predicted impurity content value.
[0116] Three levels of impurity content are preset: high impurity, medium impurity, and low impurity. If the impurity level is not low, continuously reduce the forward speed, adjusting it until the predicted impurity level remains low; execute as follows. Figure 6The control strategy shown monitors the predicted load value after speed regulation is completed. If the predicted load value changes, the speed regulation scheme based on the predicted load value is executed first.
[0117] When the predicted load value is in the high load range, the forward speed is reduced; when it is in the low load range, the forward speed is increased, until the forward speed stops adjusting when the predicted load value is within the normal load range.
[0118] This invention discloses a two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model. By introducing image features into the ARIMA torque prediction model, it helps identify transient anomalies or complex dynamic changes in torque data, improving prediction accuracy. The mechanical model enables real-time, first-stage control of the chili harvester's forward speed based on the drum load. Establishing a CNN layer within the LSTM model to extract image spatial features enhances the model's generalization ability. The ant colony algorithm optimizes the hyperparameters of the CNN-LSTM model through a global search mechanism, improving the model's ability to fit complex nonlinear relationships in impurity data and accelerating convergence. This allows for more rapid second-stage control of the chili harvester's forward speed based on the predicted impurity level. Real-time monitoring of the load ensures normal load conditions before further second-stage speed control based on the predicted impurity level, maintaining drum load and harvest impurity levels at normal or low levels. This achieves adaptive control of the harvester's forward speed, effectively improving the harvesting efficiency and harvesting effect of the chili harvester.
Claims
1. A two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model, characterized in that, The following steps are involved: S1 collects the torque signal of the main shaft of the chili harvester in real time, performs multi-step differential preprocessing on the torque signal, and constructs a differential integrated moving average autoregressive model (ARIMA) to predict the torque value at the next moment. S2 uses a high-speed camera to capture images of the plants in front of the chili harvester. After image processing by the machine vision model, contour detection is used to calculate and extract the chili fruit density index Q. Based on Q and the average density... The deviation is calculated to obtain the torque correction factor μ, which is used to dynamically correct the torque value predicted by ARIMA. S3 uses the fuzzy C-means clustering algorithm (FCM) to perform cluster analysis on historical torque data, dividing it into three torque ranges: high, normal, and low. After obtaining the roller load status at the next moment through the mechanical model, the forward speed is initially adjusted to keep the roller load within the normal range. S4 uses the time-series data of the impurity rate calculated from the weight sensor data of the upper and lower conveyor belts of the separation device and the image spatial features extracted by the CNN layer to construct a CNN-LSTM neural network model to predict the impurity rate. After optimizing the hyperparameters of the neural network in real time using the ant colony algorithm, the model is trained and deployed in the forward speed control system. S5 further adjusts the forward speed of the chili harvester according to the preset control method.
2. The two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model according to claim 1, characterized in that: The load information is collected by the torque sensor in the middle of the drum spindle and displayed on the screen of the host computer as a set of load curves with random fluctuations over time. By using multi-step difference to process the torque information collected at the current moment, a set of stable torque curve signal waves is obtained, which greatly improves the fit between the torque signal and the ARIMA model.
3. The two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model according to claim 1, characterized in that, The ARIMA torque prediction model specifically includes the following steps: The ARIMA model operates according to the following formula: In the formula, c is a constant, which can be 0 in the ARIMA model, and ε t For white noise, θ represents the autoregressive coefficient and the influence coefficient of the MA model in the ARIMA model, respectively. p and q are the order of the model, which control the autoregressive and moving average parts of the model, respectively. d controls the higher-order difference of the signal. First, the parameters are determined. In the ARIMA model, the ACF autocorrelation coefficient curve and PACF partial autocorrelation coefficient curve of the torque signal are plotted. The calculation formulas for the ACF autocorrelation coefficient ρ(k) and the PACF partial autocorrelation coefficient φ(k) are as follows: ρ(k)=cov(x t, x t+k ) / var(x t ); φ(k)=cov(x t -E[x t |x t-1 ,...,x t-(k-1) ],x t-k -E[x t-k |x t-(k-1) ,...,x t-1 ]) / var(x t ); In the formula, cov represents covariance, var represents variance, E represents expectation, and k represents lag value; Observe the function curves of ACF and PACF. The lag order at which the two are truncated is the value of p and q. p represents the number of historical values used for prediction. d is set to 1 to perform first-order difference on the torque information after multi-step difference processing to make the torque information more periodic and better adaptable to the ARIMA model. After the parameters are determined, the previously preprocessed historical time-series torque signal is used as the training dataset for the ARIMA model. The ARIMA model is trained and the residuals are checked. If there is white noise, the Akaike Information Criterion (AIC) is used to further evaluate the model quality. The model quality assessment of AIC follows the following formula: AIC = 2m - 2ln(L); m is the number of estimated parameters in the model, and L is the maximum log-likelihood of the model fit. If there is no white noise or the prediction accuracy requirement is not met, the parameters are reset.
4. The two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model according to claim 1, characterized in that: Image recognition processing technology is used to detect the density of chili peppers in front; The captured images are input into the machine vision processing model. After converting the RGB color chili plant images into HSV color space images, the ROI region is extracted. The HSV color space image has more saturated colors, which is more conducive to image annotation by the vision processing model. The HSV color space conversion parameters are H∈[0,30], S∈[50,255], and V∈[50,255]. The ROI region is a rectangular area with a width of 1.5 meters, with 2 meters in front of the picking head as the reference. The feeding amount index is normalized by the area occupied by the chili fruit in the ROI region and used as a substitute index for density. Morphological closing operation is used to eliminate the voids in the fruit area. The percentage of fruit pixels Q in the ROI is calculated by contour detection. The calculation formula is as follows:
5. The two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model according to claim 1, characterized in that: Based on the density of chili pepper fruits obtained from image recognition, a torque correction factor was designed; The goal is to adjust the torque predicted by the ARIMA model to make it closer to the true value; Calculate the average value of the normalized index and use it as the standard for bias adjustment to design the correction factor. The formula for calculating the correction factor is as follows: The purpose of this formula is to reduce torque based on the deviation from the normalized index average if the torque is higher than the average value, and to increase torque if the torque is lower than the average value. In the formula, μ is a correction factor; a negative result indicates that the torque needs to be reduced, while a positive result indicates that the torque needs to be increased. Q is the measured density of the chili pepper fruit. The torque prediction result is calculated by multiplying the ARIMA-predicted torque result by the correction factor μ, and then adding it to the original prediction value to obtain the final torque prediction value. Finally, the ARIMA predicted torque signal for the next moment, after image processing correction, is obtained.
6. The two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model according to claim 1, characterized in that, The method of defining the levels of torque values using the fuzzy C-means clustering algorithm (FCM) specifically includes the following steps: The torque signal dataset is divided into three sample subsets: high torque, normal torque, and low torque, resulting in three classes (3 in total). This leads to three class centers, each denoted by c. i This means that the image-corrected ARIMA torque signal is used as the input sample x. j The input includes the number of classes c, the membership factor M, and the maximum number of iterations max_iter. M is usually set to 2, and max_iter is usually set to 100. First, initialize the membership matrix, setting an initial membership matrix as U. (0) =[u ij ],u ij Indicates torque signal x i The degree of membership with the cluster center, where n represents the number of clusters x. j The number of data points in the dataset is used to calculate the cluster centers c. i The cluster centers are calculated using the following formula, where m represents the number of clusters: After calculating the cluster centers, the membership matrix is updated according to the following formula, and the updated membership matrix is denoted as U. (1) : In the lower part of the fraction, the denominator represents the sum from the current object to all cluster centers, and the numerator represents the dataset x. j Data from the cluster center c i The distance is used to update the membership degree in subsequent iterations of iter according to this formula. Let the membership degree be updated after the number of iterations of iter. The membership degree of iter in the previous update is ε represents the error threshold; When the formula is satisfied: When the membership degree no longer changes significantly, the clustering classification has reached its optimal effect, and the iteration stops; at this point, the torque value ranges of the three levels are obtained through FCM.
7. The two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model according to claim 1, characterized in that: Through formula Establish a mechanical model; Where F is the load, M is the torque on the drum spindle, C is the total number of spring teeth on the drum, R is the force arm of the load from the axis of the drum spindle, and M f denoted as , where r is the torque exerted by the spring tooth mounting plate on the main shaft of the drum, and m is the total weight of the drum. After converting the predicted torque value and the three levels of torque value range obtained by fuzzy clustering into the predicted load value and the three levels of load value range, the predicted load value is compared with the three levels of load value range to perform first-level speed adjustment. If the predicted load value is in the high load range, the forward speed is reduced, and if it is in the low load range, the forward speed is increased, until the forward speed is stopped when the predicted load value is within the normal load value range.
8. The two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model according to claim 1, characterized in that, The steps for establishing the improved CNN-LSTM model based on the ant colony algorithm and predicting the impurity rate of chili peppers during harvest are as follows: Establish 3-5 CNN convolutional layers, and denote the processed ROI region as... The input is fed into the layers of a CNN convolutional neural network, and the n-layer convolutional layer passes through the convolutional kernel. After feature mapping of the image, the feature maps of each corresponding layer are output as follows: The calculation formula is F n =MaxPool(ReLU(K) n *F n-1 +b n )); After global average pooling, the feature map is compressed into a spatial feature vector. Used to represent spatial features in an image related to impurity level; In the above formulas, H, W, and C represent height, width, and number of channels, respectively; k and D represent kernel size and number of output channels, respectively; * represents convolution operation; ReLU activation function enhances nonlinear expressiveness; and MaxPool represents max pooling operation. Load time-series data is collected in real time by weight sensors deployed on the upper and lower conveyor belts of the chili harvester's separating device. The time series of the total material mass measured by the upper sensor is denoted as follows: The time series of net weight of cleaned chili peppers measured by the lower sensor is denoted as follows: The formula for calculating the impurity content label based on the principle of mass conservation is as follows: Time series data with impurity rate {y1,y2,...,y T } and image feature vector f cnn Image features and time-series data on clutter content are aligned using a sliding window and then combined to form an enhanced input x. t =[y t ;f cnn The data is input into an LSTM neural network. Assuming h LSTM units are selected, the LSTM units update the structure of each part of the LSTM unit according to the step size of time step t, and update the forget gate, input gate, candidate cell state and cell state update, and output gate. The LSTM unit updates the hidden state h through a gating mechanism. t =LSTM(C t ,h t-1 Finally, the predicted impurity level is output through the fully connected layer. Where h t h represents the hidden state at the current moment. t-1 It is the hidden state from the previous moment, C t For the updated cell state, W o Let b be the weight matrix of the output gate. o This is the bias vector for the output gate.
9. The two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model according to claim 1, characterized in that, The optimization process of the CNN-LSTM neural network chili pepper harvesting net yield prediction model improved by the ant colony algorithm specifically includes the following steps: An improved ant colony algorithm is used to optimize the network hyperparameters. The parameter search space is defined to include the convolution kernel size k and the number of LSTM hidden units n. hidden And the learning rate η, the ant path encoding is And initialize the pheromone matrix τ ij ; Based on fitness function Calculate the pheromone increment Δτ i ; in To verify the root mean square error of the set, λ is the model complexity penalty coefficient; Update pheromone concentration through elite strategies Path selection probability according to P(θ) j )∝[τ j ] α [η j ] β The optimal parameter θ is obtained through dynamic adjustment and iterative convergence. * ; During model training, the Huber loss function is combined with the Adam optimizer to update the network weights. In the deployment phase, the trained model is embedded into the chili harvester control system to receive real-time load data streams from the upper and lower conveyor belts and output the predicted impurity content.
10. The two-stage control method for the forward speed of a chili harvester based on a multi-source prediction model according to claim 1, characterized in that, The aforementioned method of further adjusting the forward speed of the chili harvester according to a preset control method specifically includes: After the predicted load value is normal, when the predicted impurity rate is not in the low range, the impurity rate speed adjustment strategy is executed. The impurity rate speed adjustment strategy is a preset impurity rate range of three levels, namely high impurity rate, medium impurity rate, and low impurity rate. If the predicted impurity rate is not low, the forward speed will be continuously reduced and adjusted until the predicted impurity rate is kept at low impurity rate. The system monitors the predicted load value in real time. When the predicted load is in an abnormal range, the load speed regulation strategy is executed first. After the load condition returns to normal, the speed regulation strategy based on the predicted impurity rate is executed. The load speed regulation strategy is to reduce the forward speed when the predicted load value is in the high load range and increase the forward speed when it is in the low load range, until the forward speed stops adjusting when the predicted load value is within the normal load range.
Citation Information
Cited By
A self-propelled pepper harvester operation efficiency monitoring method and device
CN122434375A