Grain dryer control method, device and equipment and storage medium

Through the support vector regression model and gray wolf optimization strategy, a moisture content prediction model of the grain dryer was constructed, which solved the problem of inaccurate drying process in the existing technology, realized the precise control of the grain dryer, and improved efficiency and product quality.

CN119200696APending Publication Date: 2024-12-27WUHAN POLYTECHNIC UNIVERSITY
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411122719.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing grain dryer control methods rely on empirical adjustment or simple PID control, resulting in inaccurate drying process and inability to effectively handle rapid changes in temperature and humidity, affecting drying efficiency and product quality.

Method used

The support vector regression model is used to combine the gray wolf optimization strategy, and the moisture content prediction model is constructed through training and testing data, and the dryer parameters are dynamically adjusted by using the model prediction control strategy to achieve precise control.

Benefits of technology

The efficiency and product quality of the drying process are improved, the stable drying of grain and the efficiency of production costs are ensured, and the precise control of the grain drying process is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119200696A_ABST
    Figure CN119200696A_ABST
Patent Text Reader

Abstract

The invention discloses a control method, device and equipment of a grain dryer and a storage medium, and relates to the technical field of automatic control, and the control method of the grain dryer comprises the following steps: obtaining a target data set, and dividing the target data set into a training set and a test set; using the training set to train a support vector regression model, and performing optimization through a grey wolf optimization strategy to obtain an initial moisture content prediction model; testing the initial moisture content prediction model by using the test set to obtain a target moisture content prediction model; and controlling the grain dryer by using a model prediction control strategy and the target moisture content prediction model. By predicting the change trend of the grain moisture content and adjusting the operation parameters of the grain dryer, the grain is kept within the target moisture content range, and the grain drying process is accurately controlled, so that the efficiency of the drying process and the product quality are improved, and the benefits of stable drying of the grain and the production cost are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automatic control technology, and in particular to a control method, device, equipment and storage medium for a grain dryer. Background Art

[0002] Grain usually needs to be dried after harvest to ensure that it maintains good quality and durability during storage and transportation.

[0003] At present, the control methods of grain dryers mostly rely on traditional empirical adjustments or automated systems based on simple control strategies. These methods are usually based on data collected by sensors such as temperature and humidity, and adjust the operation of the dryer by setting thresholds or basic proportional-integral-derivative (PID) controllers. Operators may adjust the parameters of the dryer based on experience or basic guidance in order to achieve the appropriate drying effect.

[0004] However, there are several problems with the existing methods. First, experience-based adjustments may cause fluctuations in the moisture content of grain during the drying process, and there is no guarantee that each batch of grain can achieve a consistent drying level. Secondly, a system based on a simple PID controller may not be able to handle the rapid changes in temperature and humidity during a complex drying process, resulting in insufficient system response speed or low control accuracy. In addition, the accuracy and reliability of the sensor may also limit the overall performance and stability of the system. Therefore, how to accurately control the grain drying process has become an urgent problem to be solved. The above content is only used to assist in understanding the technical solution of this application, and does not constitute an admission that the above content is prior art. Summary of the invention

[0005] The purpose of this application is to provide a control method, device, equipment and storage medium for a grain dryer, aiming to solve the technical problem of how to accurately control the grain drying process.

[0006] To achieve the above object, the present application proposes a control method for a grain dryer, the method comprising:

[0007] Obtain a target data set, and divide the target data set into a training set and a test set;

[0008] The support vector regression model is trained using the training set, and optimized using the grey wolf optimization strategy to obtain an initial water content prediction model;

[0009] Using the test set to test the initial moisture content prediction model to obtain a target moisture content prediction model;

[0010] The grain dryer is controlled using a model predictive control strategy and the target moisture content prediction model.

[0011] In one embodiment, the step of controlling the grain dryer using the model predictive control strategy and the target moisture content prediction model includes:

[0012] The moisture content of grain is predicted by the target moisture content prediction model to obtain the predicted moisture content out of the machine;

[0013] Establishing a cost function according to the control input parameters, the predicted water content out of the machine and the preset expected water content out of the machine;

[0014] Minimize the cost function using a gradient descent method to obtain an optimal control input sequence;

[0015] The grain dryer is controlled according to the optimal control input sequence.

[0016] In one embodiment, the step of minimizing the cost function using the gradient descent method to obtain the optimal control input sequence includes:

[0017] Calculating the gradient of the cost function in the direction of the control input using a gradient descent method;

[0018] The control input parameters are iteratively updated along the reverse direction of the gradient until the cost function is less than or equal to a preset cost threshold, thereby obtaining an optimal control input sequence.

[0019] In one embodiment, the target data set includes the moisture content of grain entering the machine, the temperature of grain entering the machine, the hot air temperature, the hot air speed, the hot air humidity, the drying time, and the moisture content of grain leaving the machine;

[0020] The step of using the training set to train the support vector regression model and optimizing it through the grey wolf optimization strategy to obtain the initial water content prediction model comprises:

[0021] The input characteristics are obtained according to the moisture content of the grain entering the machine, the temperature of the grain entering the machine, the hot air temperature, the hot air speed, the hot air humidity and the drying time;

[0022] Obtaining a deviation function between the predicted moisture content out of the machine and the moisture content of the grain out of the machine according to a support vector regression model, the input features, a radial basis function and the moisture content of the grain out of the machine;

[0023] Minimize the deviation function by using the duality principle and the Lagrange multiplication operator until the value of the deviation function is less than or equal to a preset deviation value, thereby obtaining an optimal weight vector and an optimal bias term;

[0024] The support vector regression model is trained using the training set, and the penalty factor and the kernel parameter in the support vector regression model are iteratively optimized by the gray wolf optimization strategy to obtain the optimal penalty factor and the optimal kernel parameter;

[0025] An initial water content prediction model is obtained according to the optimal weight vector, the optimal bias term, the optimal penalty factor and the optimal kernel parameter.

[0026] In one embodiment, the step of iteratively optimizing the penalty factor and the kernel parameter in the support vector regression model by the gray wolf optimization strategy to obtain the optimal penalty factor and the optimal kernel parameter comprises:

[0027] Setting the maximum number of iterations and population size of the gray wolf optimization strategy according to the training set;

[0028] Initialize the position of each gray wolf in the gray wolf group according to the population size, wherein the position is represented as a vector composed of a penalty factor and a kernel parameter in the support vector regression model;

[0029] Calculating a first fitness value of each gray wolf according to a fitness function;

[0030] According to the first fitness value, the gray wolf group is divided into first gray wolves, second gray wolves, third gray wolves and common gray wolves;

[0031] Calculate a first distance, a second distance, and a third distance between the common gray wolf and the first gray wolf, the second gray wolf, and the third gray wolf according to a randomly generated coefficient vector;

[0032] updating the position of the common gray wolf according to the first distance, the second distance, and the third distance;

[0033] Calculating a second fitness value of each gray wolf after the updated position, comparing the second fitness value with the first fitness value, and taking the smaller one as the latest fitness value of each gray wolf;

[0034] Returning to the step of dividing the gray wolf group into first gray wolves, second gray wolves, third gray wolves and common gray wolves according to the first fitness value, until the number of returns is greater than or equal to the maximum number of iterations;

[0035] Obtaining the position of the gray wolf with the smallest latest fitness value;

[0036] The penalty factor and the kernel parameter in the position are taken as an optimal penalty factor and an optimal kernel parameter.

[0037] In one embodiment, the step of using the test set to test the initial moisture content prediction model to obtain a target moisture content prediction model includes:

[0038] Using the test set to test the initial water content prediction model, to obtain a test result, wherein the test result includes a mean square error and a determination coefficient;

[0039] When the mean square error and the determination coefficient do not meet the preset requirements, return to the step of training the support vector regression model using the training set and optimizing it through the gray wolf optimization strategy to obtain the initial moisture content prediction model, until the test results meet the preset requirements and obtain the target moisture content prediction model.

[0040] In one embodiment, the step of obtaining the target data set includes:

[0041] Get the initial data set;

[0042] Processing missing values ​​and outliers of the initial data set using a deletion method, a mean filling method, or an interpolation method to obtain an intermediate data set;

[0043] The intermediate data set is standardized to obtain a target data set.

[0044] In addition, to achieve the above-mentioned purpose, the present application also proposes a control device for a grain dryer, the device comprising:

[0045] A data acquisition module is used to acquire a target data set and divide the target data set into a training set and a test set;

[0046] A training module, used to train the support vector regression model using the training set and optimize it through the gray wolf optimization strategy to obtain an initial moisture content prediction model;

[0047] A testing module, used to test the initial moisture content prediction model using the test set to obtain a target moisture content prediction model;

[0048] A control module is used to control the grain dryer using a model predictive control strategy and the target moisture content prediction model.

[0049] In addition, to achieve the above-mentioned purpose, the present application also proposes a control device for a grain dryer, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the control method for the grain dryer as described above.

[0050] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the control method of the grain dryer as described above are implemented.

[0051] One or more technical solutions proposed in this application have at least the following technical effects:

[0052] Obtain a target data set, and divide the target data set into a training set and a test set; use the training set to train a support vector regression model, and optimize it through the gray wolf optimization strategy to obtain an initial moisture content prediction model; use the test set to test the initial moisture content prediction model to obtain a target moisture content prediction model; use the model prediction control strategy and the target moisture content prediction model to control the grain dryer. First, obtain a target data set including data such as grain inlet moisture content, grain inlet temperature, hot air temperature, hot air speed, hot air humidity, drying time, and grain outlet moisture content from the grain drying process, and divide it into a training set and a test set. Use the training set to train the model, and optimize the parameters of the support vector regression model, such as the penalty factor and the kernel parameter, through the gray wolf optimization strategy to improve the prediction accuracy and generalization ability of the model, and effectively use the information in the data set to establish an initial moisture content prediction model. Next, the model is verified and evaluated using the test set. The prediction accuracy is tested by calculating indicators such as mean square error and determination coefficient to ensure the effectiveness of the model on actual data. If the evaluation results do not meet the preset requirements, the model parameters or strategies will be readjusted until a satisfactory prediction effect is achieved. Finally, based on the final target moisture content prediction model, the model prediction control strategy is implemented. This application achieves precise control of the grain drying process by predicting the changing trend of grain moisture content in real time and adjusting the operating parameters of the grain dryer, such as adjusting the hot air temperature and wind speed, to maintain the grain within the target moisture content range, thereby improving the efficiency of the drying process and product quality, and ensuring the stable drying of grain and the benefits of production costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0054] In order to clearly explain the technical solution, the following briefly introduces the drawings required in the embodiments or the prior art. For those skilled in the art, other drawings can be derived from these drawings without involving creative work.

[0055] Figure 1 A flow chart of a control method for a grain dryer according to the present application;

[0056] Figure 2 A schematic diagram of the support vector regression principle provided in Example 1 of the control method for a grain dryer of the present application;

[0057] Figure 3 A model prediction control flow chart provided for the first embodiment of the control method for a grain dryer of the present application;

[0058] Figure 4 A comparison chart of predicted moisture content provided in Example 1 of the control method for a grain dryer of the present application;

[0059] Figure 5 A structural schematic diagram of a grain dryer provided in Example 1 of the control method for a grain dryer of the present application;

[0060] Figure 6 A flow chart of a second embodiment of the control method for a grain dryer of the present application;

[0061] Figure 7 A brief flow chart of a control method for a grain dryer provided in Example 2 of the present application;

[0062] Figure 8 This is a schematic diagram of the module structure of the control device of the grain dryer in the embodiment of the present application;

[0063] Fig. 9 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the control method of the grain dryer in the embodiment of the present application. DETAILED DESCRIPTION

[0064] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0065] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0066] Grain drying is a key step to ensure food safety and competitiveness, preventing spoilage due to excessive moisture. Existing dryer control mostly relies on experience or PID system, which is adjusted according to temperature and humidity data, but the accuracy and stability need to be improved, and more sophisticated control strategies are needed to optimize drying efficiency.

[0067] The main solution of the embodiment of the present application is: first, create and divide the target data set into training and test sets. Then, use the training set to train the support vector regression model and use the gray wolf optimization strategy to optimize the parameters, build a moisture content prediction model, improve the prediction accuracy, and evaluate it through the test set. Adjust the model according to indicators such as mean square error and determination coefficient until it meets the requirements. Finally, apply the optimized model to implement the control strategy, dynamically adjust the dryer parameters, ensure the precise control of grain moisture content, improve drying efficiency, ensure product quality, reduce costs, and achieve an economically stable grain drying process.

[0068] The embodiments of the present application can be executed by a device with data processing, network communication and program running capabilities, such as a computer, a mobile phone and other electronic devices, or a specific control system, such as a grain dryer and its control system. The following description will take the control system of a grain dryer as an example.

[0069] Based on this, the present application embodiment provides a control method for a grain dryer, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the control method of the grain dryer of the present application.

[0070] In this embodiment, the control method of the grain dryer includes steps S10 to S40:

[0071] Step S10, obtaining a target data set, and dividing the target data set into a training set and a test set;

[0072] It should be noted that the target dataset refers to the main dataset used to build and evaluate machine learning models. These data contain the features that need to be analyzed and predicted as well as the related target variables. In the scenario of grain drying control, the target dataset includes measurement data such as the moisture content of each batch of grain entering the machine, the grain entering the machine temperature, the hot air temperature, the hot air speed, the hot air humidity, the drying time, and the related drying effect evaluation indicators. The training set is a subset divided from the target dataset and used to train the machine learning model. The training set is the data source for the model to "learn". The model adjusts its own parameters by analyzing the samples in the training set so that it can predict or classify new data. The training set usually accounts for the majority of the target dataset because the model needs sufficient data to learn various patterns and features. The training set contains input features (such as humidity, temperature, etc.) and corresponding target variables (such as drying effect evaluation indicators, etc.). Assume that the given training set where x i is the input feature vector, y i is the output vector, and n is the number of samples in all training sets. The test set is a subset divided from the target data set to evaluate the performance of the trained model. The data samples in the test set are not used to adjust the model parameters when training the model, so they can be used to simulate the performance of the model in real scenarios. Through the test set, it is possible to evaluate whether the model can accurately predict unknown situations in the grain drying process, thereby verifying the reliability and practicality of the model.

[0073] It is understandable that sensor equipment, such as temperature and humidity sensors and data loggers, are first installed and configured to monitor key parameters in the grain drying process in real time. The data collected by these sensors constitute the target data set, including information such as temperature, humidity, and grain processing time. Then, this data is collected and stored in a database or data warehouse for subsequent analysis and model development. Next, in order to train and evaluate the performance of the model, the entire target data set needs to be divided into two parts: a training set and a test set. The training set is used to train the machine learning model to learn the patterns and relationships in the data; the test set is used to verify the generalization ability of the model and ensure that the model can accurately predict the performance of unseen data. Through this step, it can be ensured that the grain drying control system is optimized and improved based on reliable data and effective models.

[0074] As an example, the step of obtaining the target data set includes: obtaining an initial data set; processing missing values ​​and outliers of the initial data set using a deletion method, a mean filling method, or an interpolation method to obtain an intermediate data set; and standardizing the intermediate data set to obtain a target data set.

[0075] The initial data set is the raw data obtained from real-time monitoring, including parameters such as temperature, humidity, and processing time collected during the grain drying process. Deletion is a data preprocessing method used to deal with outliers in the initial data set. Outliers refer to data points that are significantly different from other observations or deviate from the normal range, which may be caused by measurement errors or special circumstances. Mean filling is a method for dealing with missing values ​​in the initial data set. Missing values ​​refer to data points that have not been collected or recorded for some reason. The mean filling method replaces the missing values ​​with the mean of the feature to maintain the integrity and consistency of the data set. Interpolation is a method of inferring unknown data points through known data points. It is used to deal with missing values ​​in the initial data set. It estimates missing values ​​based on the relationship and trend between known data points, making the data set more complete and continuous. The intermediate data set is the intermediate result obtained after processing, including the data set obtained after applying deletion, mean filling or interpolation to the initial data set. These processes ensure the integrity and quality of the data set and prepare for further analysis and modeling. Standardization is a data conversion method for intermediate data sets, which aims to eliminate the dimensional differences between different data features so that all features have similar numerical ranges. This helps improve the training effect of machine learning models and avoids excessive influence of certain features on model training. The standardization formula is as follows:

[0076]

[0077] Among them, x is the original data, μ is the sample mean, and σ is the standard deviation of the sample.

[0078] The target dataset is the final dataset after outliers are deleted, missing values ​​are filled, interpolation processing and standardization processing are performed. This is the dataset used to train and evaluate the grain drying control model to ensure the integrity and consistency of the data in order to improve the predictive ability and stability of the model.

[0079] First, the initial data set collected during the grain drying process is obtained, including parameters such as temperature and humidity. Then, the deletion method is applied to the initial data set to deal with outliers, that is, to identify and remove abnormal data points that are obviously inconsistent with other data or deviate from the normal range. Next, the missing values ​​in the initial data set are processed using the mean filling method or interpolation method. The former replaces the missing values ​​with the mean of the features, and the latter infers the missing values ​​based on the relationship between known data points to ensure data integrity. The intermediate data set obtained after processing is then standardized. This step aims to eliminate the dimensional differences between different features so that all features have similar numerical ranges. The target data set finally obtained is the final data after processing and standardization, which is used for subsequent data analysis, modeling, and prediction.

[0080] Step S20, using the training set to train the support vector regression model, and optimizing it through the gray wolf optimization strategy to obtain an initial moisture content prediction model;

[0081] It should be noted that the gray wolf optimization strategy is used to optimize the parameters of the support vector regression model to achieve the goal of minimizing the prediction error on the training set. This strategy imitates the behavior of the gray wolf group and gradually optimizes the model parameters by simulating the process of survival of the fittest. The support vector regression model is a machine learning model used to predict continuous output variables. Its basic principle is to find an optimal hyperplane that minimizes the prediction error. Its training process uses the data in the training set to adjust the model parameters so that it can perform well on unseen data. The initial moisture content prediction model refers to the model obtained after optimizing the parameters on the training set using the gray wolf optimization strategy. This model can be used to predict the moisture content of grain and is the first version obtained in the training stage.

[0082] It can be understood that the support vector regression (SVR) model is first trained using the training set, which contains a large amount of input data and corresponding target values. Through these data, the SVR model can learn how to predict the moisture content of grain based on the input features. During the training process, the model adjusts its parameters by fitting the data so that the prediction results are as close to the actual values ​​as possible. Then, in order to improve the performance and prediction accuracy of the model, the gray wolf optimization (GWO) strategy is applied to further optimize the parameters of the SVR model. The gray wolf optimization algorithm is an optimization technique that simulates the hunting behavior of gray wolves. Through continuous iteration, the algorithm adjusts the penalty factor and kernel parameters in the SVR model to reduce the prediction error and enhance the generalization ability of the model. After this series of operations, the initial moisture content prediction model obtained can show good prediction performance on the training data, laying the foundation for subsequent model evaluation and application. Assuming that the number of gray wolf populations is N, each gray wolf is represented as X, that is, the current parameter combination, the process of gray wolves surrounding prey can be expressed as:

[0083] S=|C·X p (t)-X(t)|

[0084] X(t+1)=X p (t)-A·S

[0085] Where S is the distance between the wolf and the prey, t is the number of iterations, and X p Indicates the position of the prey, that is, the position of the current optimal solution. A and C are coefficients, and the calculation formula is:

[0086] A=2a·rand1-a

[0087] C=2·rand2

[0088] Where rand1 and rand2 are random numbers in the interval [0, 1], a is the convergence factor, and the calculation formula is

[0089]

[0090] Here t max is the maximum number of iterations. Each gray wolf is based on the position X of the α wolf, β wolf, and δ wolf with the best fitness in the current iteration. α , X β , X δ To update its own position, the process is expressed as:

[0091] X1=X α -A1·|C1X α (t)-X(t)|

[0092] X2=X β -A2·|C2X β(t)-X(t)|

[0093] X3=X δ -A3·|C3X δ (t)-X(t)|

[0094]

[0095] Where X1, X2, and X3 are the steps of a single gray wolf moving to the position of wolf α, wolf β, and wolf δ, and X(t+1) is the final position of the gray wolf in this cycle.

[0096] As an example, the target data set includes the moisture content of grain entering the machine, the grain entering the machine temperature, the hot air temperature, the hot air speed, the hot air humidity, the drying time and the moisture content of grain leaving the machine; the steps of using the training set to train the support vector regression model and optimizing it through the gray wolf optimization strategy to obtain the initial moisture content prediction model include: obtaining input features according to the moisture content of grain entering the machine, the grain entering the machine temperature, the hot air temperature, the hot air speed, the hot air humidity and the drying time; obtaining the initial moisture content prediction model according to the support vector regression model, the input features, the radial basis function and the moisture content of grain leaving the machine. Obtain a deviation function between the predicted moisture content out of the machine and the moisture content of the grain out of the machine; minimize the deviation function through the duality principle and the Lagrange multiplication operator until the value of the deviation function is less than or equal to the preset deviation value, and obtain the optimal weight vector and the optimal bias term; use the training set to train the support vector regression model, and iteratively optimize the penalty factor and the kernel parameter in the support vector regression model through the gray wolf optimization strategy to obtain the optimal penalty factor and the optimal kernel parameter; obtain an initial moisture content prediction model according to the optimal weight vector, the optimal bias term, the optimal penalty factor and the optimal kernel parameter.

[0097] The moisture content of grain entering the dryer refers to the moisture content of grain when it enters the dryer. This parameter affects the initial state of the drying process. High moisture content may require longer drying time. The temperature of grain entering the dryer refers to the temperature of grain when it enters the dryer. This temperature affects the heating efficiency of hot air and the rate of moisture migration inside the grain. The hot air temperature refers to the temperature of hot air in the grain dryer. High temperature hot air can accelerate the volatilization rate of grain moisture. The hot air speed refers to the flow rate of hot air in the grain dryer during the drying process. This parameter affects the transmission speed of hot air and the contact time of air with grain in the drying chamber. Hot air humidity refers to the humidity level in hot air. Low humidity hot air helps to remove moisture from the surface of grain faster. Drying time refers to the length of time that grain is exposed to hot air in the dryer. The longer the drying time, the more thoroughly the moisture content of grain may be reduced, but too long drying time may reduce the quality of grain. The moisture content of grain leaving the dryer refers to the final moisture content of grain after drying. This is the main output and key indicator of the grain drying process. Input features refer to the data features used to train the model, including the moisture content of grain entering the machine, the temperature of grain entering the machine, the temperature of hot air entering the machine, the speed of hot air, the humidity of hot air and the drying time. The radial basis function (RBF) refers to the kernel function used in the support vector regression model to handle nonlinear relationships. The predicted moisture content out of the machine refers to the moisture content of grain out of the machine predicted by the support vector regression model, which is calculated based on the input features and model parameters. The deviation function refers to the difference function between the predicted moisture content out of the machine and the actual moisture content of grain out of the machine, including the error loss term and the regularization term (model complexity term), which is used to evaluate the prediction accuracy of the model. The prediction function of support vector regression can be expressed as:

[0098] f(x)=ω·φ(x)+b

[0099] In the formula, x is the input feature vector, φ(x) is the nonlinear mapping function, ω is the weight vector corresponding to the weight of each input feature, and b is the bias term used to adjust the output value of the model.

[0100] Please refer to Figure 2 , Figure 2The schematic diagram of the support vector regression principle provided in the first embodiment of the control method of the grain dryer of the present application shows the basic principle of support vector regression (SVR), and illustrates the working principle of the SVR model in predicting the moisture content of grain in a graphical way. The figure intuitively shows the strategy of SVR in dealing with data prediction problems with error tolerance through several key mathematical expressions and geometric figures. The core concepts include: finding a suitable hyperplane ωx+b, which can not only fit the data in a way that minimizes the error, but also maximize the interval with the data points. The ωx+b+∈ and ωx+b-∈ in the figure represent this ε-insensitive band, that is, the predicted value will not affect the loss function of the model within the range of ±ε of the actual value. In addition, the figure also shows how the SVR model solves the optimal solution through the Lagrange multiplier method, and how to map the data to a high-dimensional space through a kernel function to handle nonlinear relationships. In this way, the SVR model can effectively predict different moisture contents after grain drying, providing an accurate prediction tool for the intelligent control method of the grain dryer, ensuring the quality and efficiency of the grain drying process.

[0101] The SVR optimization goal is to minimize the following deviation function so that the model can find the optimal parameter combination during training, which can be obtained:

[0102]

[0103] The following constraints must also be met during this optimization process:

[0104]

[0105] Where ω is the weight vector, b is the bias value, ξ i and It is a slack variable that allows a certain error, C is the penalty coefficient, and ε is a defined parameter that represents the tolerance parameter for the error.

[0106] In order to solve the problem of minimizing the deviation function, the duality principle is used to introduce the Lagrange multiplication operator and transform it into:

[0107]

[0108] And the following conditions must be met:

[0109]

[0110] In the formula, α i , is the Lagrange multiplication operator, and the expression of ω can be derived as follows:

[0111]

[0112] Finally, the prediction function of support vector regression can be expressed as:

[0113]

[0114] In this formula, x i is the sample feature quantity input in the training set, corresponding to all input features of each sample, α i , K(x) is the Lagrange multiplication operator, which represents the weight of each sample in the prediction function, b is the bias term, f(x) is the prediction function, and after a given input feature vector x, it outputs the predicted moisture content of the grain after drying. i ,x) is the kernel function. Since there are complex nonlinear relationships between the variables in the grain drying process, the RBF kernel function is selected here. It can handle nonlinear relationships well. By mapping the input features to high-dimensional space, linear models can be used for prediction in high-dimensional space, thereby improving the prediction accuracy and generalization ability of the model. The mathematical expression of the RBF kernel function is:

[0115] In the formula, x i is the sample feature vector in the training set, x is the input data for prediction, σ is the width coefficient of RBF, is the kernel parameter.

[0116] The preset deviation value refers to the maximum allowable prediction error value set during the optimization process, which is used to control the accuracy and stability of the model. The optimal weight vector and the optimal bias term refer to the optimization parameters in the support vector regression model, which are obtained by minimizing the deviation function and are used to build and evaluate the final prediction model. The penalty factor and kernel parameter refer to the adjustment parameters in the support vector regression model, which are iteratively optimized through the gray wolf optimization strategy to improve the prediction and generalization capabilities of the model. Iterative optimization refers to repeatedly adjusting the parameters of the support vector regression model using the gray wolf optimization strategy until the optimal combination of penalty factor and kernel parameter is found to optimize the overall performance and accuracy of the model. The optimal penalty factor and the optimal kernel parameter refer to the optimal parameter values ​​of the support vector regression model determined by the gray wolf optimization strategy, which are used to establish and optimize the final moisture content prediction model.

[0117] In this embodiment, key data are first collected from the grain drying process, including the moisture content of grain entering the machine, the temperature of grain entering the machine, the hot air temperature, the hot air speed, the hot air humidity and the drying time, which constitute the target data set. Then, using these data as input features, the support vector regression (SVR) model and the radial basis function are used to predict the deviation between the moisture content of grain leaving the machine and the actual moisture content leaving the machine. Through the duality principle and the Lagrange multiplication operator, the SVR model is optimized by minimizing the deviation function to ensure that the accuracy of the prediction reaches the preset deviation threshold. Further, the support vector regression model is trained using the training set, and the gray wolf optimization strategy is introduced to adjust the penalty factor and kernel parameters in the SVR model. The gray wolf optimization strategy iteratively finds the best combination of penalty factor and kernel parameters to further optimize the prediction ability and generalization performance of the model. Finally, according to the optimized best weight vector, bias term, penalty factor and kernel parameter, the initial moisture content prediction model is obtained. This model can accurately predict the moisture content of grain leaving the machine during grain drying, thereby effectively controlling the drying process and improving grain quality and production efficiency.

[0118] As an example, the penalty factor and kernel parameters in the support vector regression model are iteratively optimized through the gray wolf optimization strategy to obtain the optimal penalty factor and the optimal kernel parameter. The steps include: setting the maximum number of iterations and the population size of the gray wolf optimization strategy according to the training set; initializing the position of each gray wolf in the gray wolf group according to the population size, and the position is represented as a vector composed of the penalty factor and the kernel parameter in the support vector regression model; calculating the first fitness value of each gray wolf according to the fitness function; dividing the gray wolf group into a first gray wolf, a second gray wolf, a third gray wolf and an ordinary gray wolf according to the first fitness value; calculating the relationship between the ordinary gray wolf and the first gray wolf, the second gray wolf and the third gray wolf according to the randomly generated coefficient vector. The first distance, the second distance and the third distance of the third gray wolf; updating the position of the common gray wolf according to the first distance, the second distance and the third distance; calculating the second fitness value of each gray wolf after the updated position, comparing the second fitness value with the first fitness value, and taking the smaller one as the latest fitness value of each gray wolf; returning to the step of dividing the gray wolf group into the first gray wolf, the second gray wolf, the third gray wolf and the common gray wolf according to the first fitness value, until the number of returns is greater than or equal to the maximum number of iterations; obtaining the position of the gray wolf with the smallest latest fitness value; taking the penalty factor and the kernel parameter in the position as the optimal penalty factor and the optimal kernel parameter.

[0119] The maximum number of iterations refers to the maximum number of iterations set in the gray wolf optimization strategy, which controls the total number of times the strategy is executed. By increasing the number of iterations, the probability of finding the global optimal solution can be increased, but the computational cost is also increased. In the gray wolf optimization strategy, the population size refers to the number of gray wolves contained in the initialized gray wolf group. Each gray wolf represents a possible solution, and its position consists of the penalty factor and kernel parameter in the support vector regression model. The position of each gray wolf is a vector containing the values ​​of the penalty factor and kernel parameter in the support vector regression model. For example, if the penalty factor is C and the kernel parameter is γ, then the position of a gray wolf can be expressed as (C, γ). In the support vector regression model, the penalty factor is used to balance the trade-off between the complexity of the model and the training error. A larger penalty factor value will cause the model to pay more attention to reducing the training error, but may cause overfitting; a smaller penalty factor value will cause the model to be smoother, but may increase the training error. The kernel parameter in the support vector regression model determines the influence range of the kernel function, the nonlinear mapping ability of the kernel function when mapping data from the input space to the feature space, and the choice of the kernel function will affect the complexity and generalization ability of the model. In the gray wolf optimization strategy, the fitness function is used to evaluate the quality of each gray wolf's solution. In support vector regression, the fitness function can usually be the mean square error of the model on the training set or the value of other loss functions. The first fitness value refers to the fitness value calculated for each gray wolf at the initial position, that is, the quality of the initial solution calculated by the fitness function. The first gray wolf, the second gray wolf, and the third gray wolf refer to the top three gray wolves after the entire gray wolf group is sorted according to the first fitness value. They are generally considered to be the individuals with the highest fitness in the current group. Ordinary gray wolves refer to other gray wolves except the top three gray wolves. When updating their positions, ordinary gray wolves will adjust their solutions according to the distance from the top three gray wolves. The coefficient vector is a randomly generated vector used to calculate the distance between ordinary gray wolves and the top three gray wolves. The closer the distance, the more likely it is that ordinary gray wolves will be affected by the positions of the top three gray wolves. The first distance, the second distance, and the third distance refer to the distance between ordinary gray wolves and the first, second, and third gray wolves, respectively. These distances are used to adjust the position of ordinary gray wolves and help optimize the fitness value. The second fitness value refers to the fitness value of each gray wolf recalculated after the position is updated. These values ​​are used to compare with the initial fitness value to decide whether to update to the latest fitness value. The latest fitness value refers to the latest fitness value calculated by each gray wolf in the current iteration, which is usually the smaller of the second fitness value and the first fitness value.

[0120] First, the maximum number of iterations and the population size of the gray wolf optimization strategy are set according to the training set. The population size determines the number of gray wolves in the initial gray wolf group. The position of each gray wolf is represented as a vector, which contains the penalty factor and kernel parameter of the support vector regression model. Next, the fitness function is used to calculate the first fitness value of each gray wolf. This fitness value is usually evaluated based on the prediction performance of the support vector regression model on the training set. For example, the mean square error of the model or other related loss functions can be used. According to the calculated first fitness value, the entire gray wolf group is divided into the first gray wolf, the second gray wolf, the third gray wolf and the ordinary gray wolf. The first, second and third gray wolves are usually the gray wolves with the current optimal fitness value, and the ordinary gray wolf is the other randomly selected group members. Subsequently, the distance between the ordinary gray wolf and the first three gray wolves is calculated by the randomly generated coefficient vector, including the first, second and third distances, which can be used to adjust the position of the ordinary gray wolf so as to better approach the position of the gray wolf with a better fitness value. After the position of the common gray wolf is updated, the second fitness value of each gray wolf is recalculated, and the updated second fitness value is compared with the previous first fitness value, and the smaller fitness value is retained as the latest fitness value of each gray wolf. The above steps will be executed in a loop until the preset maximum number of iterations is reached. At the end of the iteration, the position of the gray wolf with the smallest latest fitness value is selected as the best position, and the penalty factor and kernel parameters are extracted as the best penalty factor and best kernel parameters. These parameters can optimize the performance of the prediction model in the support vector regression model, so that it can achieve the best moisture content prediction effect on the test set.

[0121] Step S30, using the test set to test the initial moisture content prediction model to obtain a target moisture content prediction model;

[0122] It should be noted that the target moisture content prediction model refers to a moisture content prediction model that has been further optimized after verification and adjustment using a test set. Specifically, this refers to the initial moisture content prediction model that has been trained with a training set and tuned by the gray wolf optimization strategy, and the final model obtained after verification using a test set and adjustment is called a gray wolf optimized support vector regression model (GWO-SVR) in this embodiment.

[0123] It can be understood that the moisture content of grain entering the machine, grain entering the machine temperature, hot air temperature, hot air speed, hot air humidity, and drying time in the test set are input as input features into the trained initial moisture content prediction model; the model combines these input features with its internally learned weights and biases to predict the moisture content of the grain leaving the machine; the predicted values ​​are compared with the actual moisture content of the grain leaving the machine in the test set to evaluate the prediction accuracy and performance of the model; based on the evaluation results, necessary adjustments and optimizations are made to ultimately obtain a target moisture content prediction model that can robustly predict the moisture content of grain leaving the machine in practical applications.

[0124] As an example, the step of using the test set to test the initial moisture content prediction model to obtain the target moisture content prediction model includes: using the test set to test the initial moisture content prediction model to obtain test results, and the test results include a mean square error and a determination coefficient; when the mean square error and the determination coefficient do not meet the preset requirements, returning to the step of using the training set to train the support vector regression model, and optimizing it through the gray wolf optimization strategy to obtain the initial moisture content prediction model, until the test results meet the preset requirements and the target moisture content prediction model is obtained.

[0125] The mean squared error (MSE) is the mean of the sum of the squares of the differences between the predicted value and the true value. It is used to measure the accuracy of the model prediction. The smaller the value, the more accurate the model prediction. The coefficient of determination (R-squared) is a measure of the proportion of the change in the dependent variable that can be explained by the independent variable. It is usually between 0 and 1. In regression analysis, it represents the model's ability to explain the variance of the observed data. The closer the value is to 1, the better the model fit. The preset requirements are pre-set model performance standards or indicators. For example, there are specific threshold requirements for the mean squared error and the coefficient of determination to determine whether the model meets the actual application requirements. This embodiment uses the mean squared error (MSE) and the coefficient of determination (R-squared). 2 ) to evaluate the performance of the model, the expression is as follows:

[0126]

[0127] In the formula, y i is the actual grain moisture content value, is the predicted value, n is the number of samples, is the mean of the actual values. When the evaluation index meets the requirements of prediction accuracy, it means that the constructed GWO-SVR model can be used, otherwise it is necessary to continue to adjust and optimize the parameters and retrain.

[0128] First, the trained initial moisture content prediction model will be used to test the pre-prepared test set. In this process, the mean square error and determination coefficient of the model will be calculated. These two indicators can evaluate the prediction performance of the model on the test data. The mean square error measures the average of the square of the difference between the predicted value and the actual observed value, while the determination coefficient indicates the model's ability to explain the variance of the observed data. If the mean square error and determination coefficient in the test results do not meet the pre-set requirements, the previous step of training the support vector regression model using the gray wolf optimization strategy will be returned. In this step, the model parameters will be adjusted and the model will be retrained until the performance of the model on the test set meets the preset performance requirements. The final model obtained in this way is the target moisture content prediction model, which can provide accurate moisture content prediction results in practical applications.

[0129] Step S40, using the model predictive control strategy and the target moisture content prediction model to control the grain dryer.

[0130] It should be noted that the model predictive control strategy is a control method whose basic idea is to use mathematical models to predict future system behavior and make control decisions based on these predictions to optimize the system's performance indicators. In the application of grain dryers, the model predictive control strategy will use the established target moisture content prediction model to predict the moisture content change trend of grains in the future, and adjust the operating parameters of the dryer based on these predictions to achieve more accurate and efficient drying control. Please refer to Figure 3 , Figure 3 The model predictive control flow chart provided for the control method embodiment 1 of the grain dryer of the present application shows the core process of the model predictive control (MPC) in the intelligent control method of the grain dryer, and elaborates on a series of steps from setting the expected moisture content to realizing precise control of the grain drying process. The prediction model constructed based on the GWO-SVR (Grey Wolf Optimization Support Vector Regression) model in the figure first receives and processes real-time data from the grain dryer, such as the moisture content, temperature, wind speed, etc. of the grain entering the machine, and then predicts the moisture content of the grain out of the machine under the current control strategy. Based on the difference between the predicted result and the expected moisture content, the MPC strategy constructs and solves the cost function through the rolling optimization method to obtain the optimal control parameters, such as hot air temperature and wind speed. These control parameters are then applied to the controlled object-the grain dryer, and the drying process is adjusted in real time through the feedback correction mechanism to ensure that the moisture content of the grain out of the machine can reach the preset safe storage standard. The whole process is a closed-loop control system, which improves the drying efficiency and grain quality through continuous iterative optimization, while reducing energy consumption and production costs.

[0131] Please refer to Figure 4 , Figure 4 A comparison chart of predicted moisture content is provided for Example 1 of the control method for a grain dryer of the present application. The chart demonstrates the accuracy of using the GWO-SVR model to predict the moisture content of grain at the outlet of the grain dryer. By comparing the actual moisture content with the moisture content predicted by the model, the effectiveness of the control method for the grain dryer is verified. The horizontal axis in the figure represents the sample number, and the vertical axis shows the percentage value of the actual moisture content to the predicted moisture content, where the line represents the moisture content of the grain. By comparing these data points, the consistency between the predicted values ​​of the GWO-SVR model and the actual measured values ​​can be intuitively observed, thereby evaluating the prediction accuracy of the model. This comparative analysis is a key step in evaluating the control accuracy of the model during the grain drying process, ensuring that the expected moisture content of the grain can be achieved after drying, meeting the standards for safe storage.

[0132] A grain dryer is a device used to reduce the moisture content of grain to a safe storage level. In the fields of agriculture and food processing, grain dryers usually use hot air or other methods to remove excess moisture from grain to prevent the growth of mold and other microorganisms and extend the shelf life of grain. Figure 5 , Figure 5 The structural diagram of the grain dryer provided for the control method embodiment 1 of the grain dryer of the present application shows the structural layout and key components of the grain dryer, and elaborates in detail how the device can achieve efficient drying of grain. The various components are indicated by marking numbers in the figure, including 1-grain elevator device, which is used to transport grain to the inside of the dryer; 2-grain to be dried, indicating grain ready for drying; 3-inlet moisture detection sensor, responsible for detecting the initial moisture content of grain when entering the machine; 4-temperature sensor, monitoring temperature changes during the drying process; 5-grain storage section, temporarily storing grain and performing preliminary heating; 6-drying section, using hot air for the main drying operation; 7-hot air blower, generating hot air for drying grain; 8-air regulating valve, controlling the air volume and wind speed of hot air; 9-temperature and humidity sensor, monitoring the temperature and humidity conditions of the drying section; 10-cooling section, reducing the temperature of grain to adapt to storage; 11-grain discharge section, discharging the dried grain; 12-exit moisture detection sensor, detecting and confirming the final moisture content of the grain after drying. The design of the entire system ensures uniform heating, drying efficiency and quality control of the grain during the drying process, meets the process requirements of different drying stages, and realizes the automation and intelligence of the grain drying process.

[0133] In order to further improve the control effect of the drying process, the model predictive control (MPC) method is used to find the optimal control strategy, and the trained GWO-SVR model is combined to control the grain drying process. Model predictive control is to control the system by predicting the future system behavior and optimizing the selection of control variables. The model consists of three parts: model prediction, optimization control and execution control. Model prediction uses the dynamic mathematical model of the system to predict the future system behavior based on the current state information and external interference. MPC uses the current state and future control inputs to predict the behavior of the system in the next few moments. The GWO-SVR model is used above to predict the moisture content of the grain after drying. When the control system determines the expected moisture content of the grain, the constructed GWO-SVR model and control input are used to predict the future system state. The expression is:

[0134] x(t+k|t)=f(x(t+k-1|t),u(t+k-1|t))

[0135] In the formula, x(t+k|t) represents the system state predicted at time t+k in the future, x(t+k-1|t) represents the system state predicted at time t+k-1 in the future, u(t+k-1) is the control input predicted at time t, and f is the dynamic model of the system. x(t) represents the state of the system at the current time, which includes all relevant state variables of the grain dryer. x(t+k|t) represents the system state predicted at time t+k in the future, and the future state is estimated based on the current state and the predicted control input. In other words, the current system state x(t) is recorded at the current time t, and the GWO-SVR model and the current control input u(t) are used to predict the system state x(t+1|t) at the next time t+1, mainly the future moisture content of grain out of the machine. After determining the moisture content of grain out of the machine, the model predictive control method is used to find the optimal control parameters. Based on the predicted future state, the optimization strategy is used to calculate the optimal control input to minimize the error between the predicted moisture content of grain out of the machine and the target value.

[0136] It can be understood that, first, the established target moisture content prediction model is used to predict the moisture content change trend of grains in the future. Then, based on these prediction results and the model prediction control strategy, the operating parameters of the grain dryer, such as hot air temperature, wind speed, etc., are adjusted to ensure that the grain reaches the desired moisture content target during the drying process. This process is continuous, and through real-time monitoring and feedback control, the operation of the dryer is continuously optimized to meet the quality and efficiency requirements of grain drying.

[0137] The present embodiment provides a control method for a grain dryer, which obtains a target data set and divides the target data set into a training set and a test set; uses the training set to train a support vector regression model and optimizes it through the gray wolf optimization strategy to obtain an initial moisture content prediction model; uses the test set to test the initial moisture content prediction model to obtain a target moisture content prediction model; and uses the model prediction control strategy and the target moisture content prediction model to control the grain dryer. First, a target data set including data such as grain inlet moisture content, grain inlet temperature, hot air temperature, hot air speed, hot air humidity, drying time, and grain outlet moisture content is obtained from the grain drying process, and is divided into a training set and a test set. The model is trained using the training set, and the parameters of the support vector regression model, such as the penalty factor and the kernel parameter, are optimized through the gray wolf optimization strategy to improve the prediction accuracy and generalization ability of the model, and effectively use the information in the data set to establish an initial moisture content prediction model. Next, the model is verified and evaluated using the test set. The prediction accuracy is checked by calculating indicators such as mean square error and determination coefficient to ensure the effectiveness of the model on actual data. If the evaluation result does not meet the preset requirements, the model parameters or strategies will be readjusted until a satisfactory prediction effect is achieved. Finally, based on the final target moisture content prediction model, the model prediction control strategy is implemented. This embodiment achieves precise control of the grain drying process by predicting the changing trend of grain moisture content in real time and adjusting the operating parameters of the grain dryer, such as adjusting the hot air temperature and wind speed, to maintain the grain within the target moisture content range, thereby improving the efficiency of the drying process and product quality, and ensuring the stable drying of grain and the benefits of production costs.

[0138] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 6 , Figure 6 This is a flow chart of a second embodiment of the control method for a grain dryer of the present application. Step S40 of the control method for a grain dryer includes steps S41 to S44:

[0139] Step S41, predicting the moisture content of grain by using the target moisture content prediction model to obtain the predicted moisture content;

[0140] It should be noted that moisture content refers to the percentage or ratio of moisture in grain, usually expressed as the ratio of the mass of moisture in grain to the total mass. Predicting the machine moisture content means using the established target moisture content prediction model to predict the actual moisture content of grain after the grain drying process is completed. This prediction can help determine the target moisture content level that the grain should reach during the drying process.

[0141] It can be understood that using the previously established model, based on the input conditions of the grain during the drying process (such as moisture content entering the machine, temperature entering the machine, hot air temperature, wind speed, humidity and drying time, etc.), predicting the moisture content level of the grain when it leaves the machine will help decide when to end the drying process and adjust the operating parameters of the drying equipment to ensure that the grain meets the expected quality standards and production requirements.

[0142] Step S42, establishing a cost function according to the control input parameters, the predicted water content out of the machine and the preset expected water content out of the machine;

[0143] It should be noted that the control input parameters refer to various parameters used to adjust the operation of the grain dryer, such as hot air temperature, wind speed, drying time, etc. The setting of these parameters will affect the moisture content of the final grain and the energy consumption and efficiency during the drying process. The preset expected moisture content is the final moisture content level expected to be achieved during the grain drying process. This value is usually based on product requirements or market standards and determines the target and end time of the drying process. The cost function refers to a mathematical function that calculates a cost value or cost index based on the control input parameters (such as hot air temperature, wind speed, etc.) of the grain drying process, the predicted moisture content, and the preset expected moisture content. The purpose of this function is to optimize the economic benefits and operational efficiency of the drying process. The cost function will be evaluated based on the deviation between the predicted moisture content of the actual grain and the preset expected moisture content. The greater the deviation, the more likely it is to increase economic costs, such as reduced product quality or increased energy consumption. Therefore, the cost function is designed to minimize these costs by adjusting the control input parameters to make the predicted moisture content close to the preset target. The calculation formula is:

[0144]

[0145] Among them, N is the length of the prediction time domain, M p (t+k) is the predicted grain moisture content at time t+k, M t is the desired grain moisture content, u(t+k) is the control input at time t+k, such as the speed of the grain discharge motor, and λ is the weight factor of the control input.

[0146] It can be understood that, first of all, the control input parameters include the operating parameters of the grain dryer, such as hot air temperature, wind speed, etc., which directly affect the drying process and final moisture content of the grain. Secondly, the predicted moisture content out of the machine is the moisture content of the grain after drying predicted by the target moisture content prediction model. Finally, the preset expected moisture content out of the machine is the target value set during the drying process, reflecting the product quality and market demand. The cost function is evaluated based on the difference between the actual predicted moisture content out of the machine and the preset expected moisture content out of the machine. The greater the deviation, the more likely it is that the production cost will increase or the product quality will decrease. Therefore, the design of the cost function aims to optimize the control parameters so that the predicted moisture content out of the machine is as close to the preset target as possible, so as to achieve the best balance between economic benefits and product quality.

[0147] Step S43, using the gradient descent method to minimize the cost function to obtain the optimal control input sequence;

[0148] It should be noted that the gradient descent method is an optimization strategy used to find the local minimum of a function. It adjusts the parameters in the opposite direction of the function gradient by iteratively updating the parameters, thereby gradually reducing the function value. Minimization refers to the process of adjusting the control input parameters to make the cost function reach the minimum or close to the minimum value. Here, the cost function is established by the difference between the predicted moisture content of the machine and the preset expected moisture content of the machine. The optimal control input sequence refers to the optimal control parameter sequence obtained in the optimization process using the gradient descent method. These parameter sequences can make the cost function reach the minimum value, thereby achieving the best match between the predicted moisture content of the machine and the preset target, ensuring the efficiency of the grain drying process and the product quality.

[0149] It can be understood that, first of all, the cost function is defined by comparing the difference between the predicted moisture content of the grain dryer and the preset expected moisture content of the grain dryer, which reflects the deviation between the target and the actual result in the grain drying process. The gradient descent method calculates the gradient of the cost function with respect to the control input parameters and updates the parameters along the negative gradient direction to gradually reduce the value of the cost function. During the iteration process, each update adjusts the control input parameters so that the cost function gradually approaches the minimum value or converges to the vicinity of the minimum value. Ultimately, the obtained control input parameter sequence is considered to be optimal because they enable the grain dryer to achieve the expected target moisture content during operation, thereby improving the efficiency of the drying process and the quality of the grain.

[0150] As an example, the steps of minimizing the cost function using the gradient descent method to obtain the optimal control input sequence include: using the gradient descent method to calculate the gradient of the cost function in the control input direction; iteratively updating the control input parameters along the reverse direction of the gradient until the cost function is less than or equal to a preset cost threshold, thereby obtaining the optimal control input sequence.

[0151] The control input direction refers to the direction in which the cost function responds to changes in the control input parameters. The gradient descent method determines the direction in which the cost function value decreases by calculating the gradient of the cost function with respect to the control input parameters. Gradient refers to the rate of change or slope of the cost function in the direction of the control input parameters. Specifically, it indicates the degree of response of the cost function to changes in each control input parameter, that is, the speed and direction of the cost function as the parameters change. The preset cost threshold refers to a value set in advance to determine when to stop the iterative process of gradient descent. When the value of the cost function drops to or below the preset threshold, it can be considered that a control input sequence that is close enough to the optimal solution has been found.

[0152] First, the cost function’s gradient in the direction of the control input parameters is calculated to determine the change trend and slope of the cost function. Then, the control input parameters are gradually updated in the opposite direction of this gradient, which means that the parameters are adjusted in the direction that reduces the cost function value. This iterative process continues until the cost function value is reduced to or below the preset cost threshold, at which point the control input parameters obtained are considered to be the best sequence that minimizes the system’s operating cost or optimizes performance.

[0153] Step S44, controlling the grain dryer according to the optimal control input sequence.

[0154] It can be understood that the optimal control input parameter sequence is applied to the control system of the grain dryer to adjust and optimize the operating parameters in real time, such as hot air temperature, wind speed, etc. By accurately adjusting these parameters, the system can ensure that the grain maintains the target moisture content during the drying process, thereby improving the drying efficiency and product quality. This method uses a combination of predictive models and optimization strategies to effectively manage and control the grain drying process to achieve the optimization of production costs and stable drying effects.

[0155] This embodiment predicts the moisture content of grains through the target moisture content prediction model to obtain the predicted moisture content of the machine; establishes a cost function according to the control input parameters, the predicted moisture content of the machine and the preset expected moisture content of the machine; uses the gradient descent method to minimize the cost function to obtain the optimal control input sequence; and controls the grain dryer according to the optimal control input sequence. First, the moisture content of grains at the end of drying is predicted by the target moisture content prediction model, and the calculation is performed based on input parameters such as the moisture content of grains entering the machine, temperature, wind speed, etc., to provide estimated data of grain status. Secondly, a cost function is established based on the predicted moisture content of grains, the preset target moisture content and the control input parameters of the grain dryer. The establishment of the cost function can comprehensively consider the various costs required to achieve the expected goals, such as energy consumption, production efficiency, etc., and provides a basis for subsequent optimization. Then, the cost function is minimized by the gradient descent method, which guides the adjustment of the control strategy to reduce costs by calculating the gradient of the control input parameters. Finally, according to the optimized optimal control input sequence, the grain dryer is precisely controlled, including adjusting key parameters such as hot air temperature and wind speed, to ensure that the grain can reach or approach the expected target moisture content during the drying process. The entire process improves the efficiency and quality stability of the grain drying process through mathematical modeling and optimization strategies, and achieves optimization of production costs and effective use of energy.

[0156] For example, in order to help understand the implementation process of the control method of the grain dryer obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 7 , Figure 7 A brief flow chart of a control method for a grain dryer is provided, specifically:

[0157] The figure shows the workflow of the control method of the grain dryer, detailing the key steps from system initialization to precise control of the grain drying process. First, the system is initialized and then starts data collection of the grain to be dried, including key parameters such as the initial moisture content of the grain. Next, the initial control parameters, such as the drying hot air temperature, are set to start the drying process. The motor of the moving part is then turned on to drive the operation of the entire dryer. Using the GWO-SVR prediction model, the system predicts the moisture content of the grain and can accurately predict the moisture content of the grain after drying. If the prediction results show that the moisture content of the machine does not reach the expected value, the system will adjust it through model predictive control to obtain the optimal control parameters. This control cycle will continue until the moisture content of the grain out of the machine reaches the preset expected value, at which time the drying process ends. The entire process is a closed loop, which ensures the stability and controllability of the grain drying quality, improves the drying efficiency and the storage safety of the grain.

[0158] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the control method of the grain dryer of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.

[0159] This application also provides a control device for a grain dryer, please refer to Figure 8 , the control device of the grain dryer comprises:

[0160] A data acquisition module 10 is used to acquire a target data set and divide the target data set into a training set and a test set;

[0161] A training module 20 is used to train the support vector regression model using the training set and optimize it through the gray wolf optimization strategy to obtain an initial water content prediction model;

[0162] A testing module 30, configured to test the initial moisture content prediction model using the test set to obtain a target moisture content prediction model;

[0163] The control module 40 is used to control the grain dryer using the model prediction control strategy and the target moisture content prediction model.

[0164] The control device of the grain dryer provided in the present application adopts the control method of the grain dryer in the above embodiment, which can solve the technical problem of how to accurately control the grain drying process. Compared with the prior art, the beneficial effects of the control device of the grain dryer provided in the present application are the same as the beneficial effects of the control method of the grain dryer provided in the above embodiment, and other technical features in the control device of the grain dryer are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0165] The present application provides a control device for a grain dryer, the control device for the grain dryer comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the control method for the grain dryer in the above-mentioned embodiment one.

[0166] Reference below Fig. 9, which shows a schematic diagram of the structure of a control device for a grain dryer suitable for implementing an embodiment of the present application. The control device for a grain dryer in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The control device of the grain dryer shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0167] like Fig. 9 As shown, the control device of the grain dryer may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the control device of the grain dryer are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the control device of the grain dryer to communicate wirelessly or wired with other devices to exchange data. Although the control device of the grain dryer with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0168] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0169] The control device of the grain dryer provided in the present application adopts the control method of the grain dryer in the above embodiment, which can solve the technical problem of how to accurately control the grain drying process. Compared with the prior art, the beneficial effects of the control device of the grain dryer provided in the present application are the same as the beneficial effects of the control method of the grain dryer provided in the above embodiment, and the other technical features in the control device of the grain dryer are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0170] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the control method of the grain dryer in the above-mentioned embodiment.

[0171] The computer-readable storage medium involved in this application may be a USB flash drive, and also includes but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor storage systems or devices, and any combination thereof. Specific examples include electrical connections, portable disks, hard disks, RAM, ROM, EPROM, flash memory, optical fibers, CD-ROMs, and other optical and magnetic storage devices.

[0172] The computer-readable storage medium may be included in the control device of the grain dryer; or may exist independently without being assembled into the control device of the grain dryer.

[0173] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the control device of the grain dryer, the control device of the grain dryer: obtains a target data set, and divides the target data set into a training set and a test set; uses the training set to train a support vector regression model, and optimizes it through the gray wolf optimization strategy to obtain an initial moisture content prediction model; uses the test set to test the initial moisture content prediction model to obtain a target moisture content prediction model; and uses the model prediction control strategy and the target moisture content prediction model to control the grain dryer.

[0174] The accompanying drawings show possible implementation architectures of the systems, methods, and products of the present application, where each box represents a module or code segment containing instructions for performing specific logical functions. Please note that the functions represented by these boxes may be executed in a different order than shown in the accompanying drawings, and may even be executed in parallel or in reverse order. In addition, these functions can be implemented with dedicated hardware or a combination of hardware and software instructions.

[0175] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0176] The present application also provides a computer program product, comprising a computer program, which implements the steps of the control method of the grain dryer as described above when executed by a processor.

[0177] The computer program product provided by this application can solve the technical problem of how to accurately control the grain drying process. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the control method of the grain dryer provided by the above embodiment, which will not be repeated here.

[0178] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A control method for a grain dryer, characterized in that: The method comprises: Obtain a target data set, and divide the target data set into a training set and a test set; The support vector regression model is trained using the training set, and optimized using the grey wolf optimization strategy to obtain an initial water content prediction model; Using the test set to test the initial moisture content prediction model to obtain a target moisture content prediction model; The grain dryer is controlled using a model predictive control strategy and the target moisture content prediction model.

2. The method according to claim 1, characterized in that The step of controlling the grain dryer using the model predictive control strategy and the target moisture content prediction model comprises: The moisture content of grain is predicted by the target moisture content prediction model to obtain the predicted moisture content out of the machine; Establishing a cost function according to the control input parameters, the predicted water content out of the machine and the preset expected water content out of the machine; Minimize the cost function using a gradient descent method to obtain an optimal control input sequence; The grain dryer is controlled according to the optimal control input sequence.

3. The method according to claim 2, characterized in that The step of minimizing the cost function using the gradient descent method to obtain the optimal control input sequence comprises: Calculating the gradient of the cost function in the direction of the control input using a gradient descent method; The control input parameters are iteratively updated along the reverse direction of the gradient until the cost function is less than or equal to a preset cost threshold, thereby obtaining an optimal control input sequence.

4. The method according to claim 1, characterized in that The target data set includes the moisture content of grain entering the machine, the temperature of grain entering the machine, the hot air temperature, the hot air speed, the hot air humidity, the drying time and the moisture content of grain leaving the machine; The step of using the training set to train the support vector regression model and optimizing it through the grey wolf optimization strategy to obtain the initial water content prediction model comprises: The input characteristics are obtained according to the moisture content of the grain entering the machine, the temperature of the grain entering the machine, the hot air temperature, the hot air speed, the hot air humidity and the drying time; Obtaining a deviation function between the predicted moisture content out of the machine and the moisture content of the grain out of the machine according to a support vector regression model, the input features, a radial basis function and the moisture content of the grain out of the machine; Minimize the deviation function by using the duality principle and the Lagrange multiplication operator until the value of the deviation function is less than or equal to a preset deviation value, thereby obtaining an optimal weight vector and an optimal bias term; The support vector regression model is trained using the training set, and the penalty factor and the kernel parameter in the support vector regression model are iteratively optimized by the gray wolf optimization strategy to obtain the optimal penalty factor and the optimal kernel parameter; An initial water content prediction model is obtained according to the optimal weight vector, the optimal bias term, the optimal penalty factor and the optimal kernel parameter.

5. The method according to claim 4, characterized in that The step of iteratively optimizing the penalty factor and the kernel parameter in the support vector regression model by the gray wolf optimization strategy to obtain the optimal penalty factor and the optimal kernel parameter comprises: Setting the maximum number of iterations and population size of the gray wolf optimization strategy according to the training set; Initialize the position of each gray wolf in the gray wolf group according to the population size, wherein the position is represented as a vector composed of a penalty factor and a kernel parameter in the support vector regression model; Calculating a first fitness value of each gray wolf according to a fitness function; According to the first fitness value, the gray wolf group is divided into first gray wolves, second gray wolves, third gray wolves and common gray wolves; Calculate a first distance, a second distance, and a third distance between the common gray wolf and the first gray wolf, the second gray wolf, and the third gray wolf according to a randomly generated coefficient vector; updating the position of the common gray wolf according to the first distance, the second distance, and the third distance; Calculating a second fitness value of each gray wolf after the updated position, comparing the second fitness value with the first fitness value, and taking the smaller one as the latest fitness value of each gray wolf; Returning to the step of dividing the gray wolf group into first gray wolves, second gray wolves, third gray wolves and common gray wolves according to the first fitness value, until the number of returns is greater than or equal to the maximum number of iterations; Obtaining the position of the gray wolf with the smallest latest fitness value; The penalty factor and the kernel parameter in the position are taken as an optimal penalty factor and an optimal kernel parameter.

6. The method according to claim 1, characterized in that The step of using the test set to test the initial moisture content prediction model to obtain a target moisture content prediction model comprises: Using the test set to test the initial water content prediction model, to obtain a test result, wherein the test result includes a mean square error and a determination coefficient; When the mean square error and the determination coefficient do not meet the preset requirements, return to the step of training the support vector regression model using the training set and optimizing it through the gray wolf optimization strategy to obtain the initial moisture content prediction model, until the test results meet the preset requirements and obtain the target moisture content prediction model.

7. The method according to claim 1, characterized in that The step of obtaining the target data set includes: Get the initial data set; Processing missing values ​​and outliers of the initial data set using a deletion method, a mean filling method, or an interpolation method to obtain an intermediate data set; The intermediate data set is standardized to obtain a target data set.

8. A control device for a grain dryer, characterized in that: The device comprises: A data acquisition module is used to acquire a target data set and divide the target data set into a training set and a test set; A training module, used to train the support vector regression model using the training set and optimize it through the gray wolf optimization strategy to obtain an initial moisture content prediction model; A testing module, used to test the initial moisture content prediction model using the test set to obtain a target moisture content prediction model; A control module is used to control the grain dryer using a model predictive control strategy and the target moisture content prediction model.

9. A control device for a grain dryer, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for controlling a grain dryer according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the control method of the grain dryer according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Fruit and vegetable drying control method based on combination of GA-SVM and fuzzy PID

    CN119717493A

  • Sludge drying treatment method, device, equipment and storage medium

    CN119781411A

  • Sludge drying treatment methods, apparatus, equipment and storage media

    CN119781411B

  • Intelligent control method and system for toilet paper roll core forming based on data driving

    CN119937434A

  • Raw material moisture content prediction and adjustment method for shaving board production

    CN120355108A