A stirring and crushing control method and system based on image processing
By extracting the grid texture features and spatial distribution of feed using image processing technology, and dynamically adjusting the speed of the grinder, the problems of uneven mixing and unreasonable grinding time in traditional methods are solved, achieving precise control and efficient production.
Patent Information
- Application Number
- CN202510313396.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-03-17
AI Technical Summary
Traditional feed mixing and grinding methods suffer from uneven mixing and unreasonable grinding time, resulting in uneven distribution of nutrients and waste of resources.
An image processing-based approach is used to capture feed images using a high-resolution industrial camera. The gray-level co-occurrence matrix and convolutional neural network are then combined to extract grid texture features, similarity matrix, and distance matrix. The mixing features and grinder speed are calculated, and the grinding time and speed are dynamically adjusted.
It achieves precise control over the feed mixing state, avoiding over-mixing or under-mixing, improving feed production efficiency and quality, and reducing energy consumption and costs.
Smart Images

Figure CN120411449B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of feed production, and in particular to a stirring and pulverizing control method and system based on image processing. Background Technology
[0002] Feed mixing and grinding control is a crucial part of animal husbandry. It involves mixing and grinding different types of feed with different particle sizes and moisture levels to achieve the nutritional uniformity and digestibility required for animal feeding.
[0003] Traditional feed mixing and grinding methods rely primarily on manual experience and mechanical timed control. In this process, operators pre-determine the proportions of various feed ingredients based on the animal's nutritional needs and pour these ingredients into the mixer in a specific order and quantity. The mixer then mixes the feed according to a set time and speed to achieve uniform mixing. After mixing, the feed is sent to a grinder to achieve a suitable particle size. However, this method has several drawbacks. For example, when dry and wet feeds of various particle sizes are poured into the mixer together, differences in density and particle size can easily lead to stratification or agglomeration. This causes finer feed to settle at the bottom of the mixer, while coarser feed is distributed on top, resulting in uneven distribution of components in the mixed feed. Furthermore, traditional mixing methods typically use timed mixing, making it difficult to accurately determine the actual mixing state of the feed. If the mixing and grinding time is too short, the feed may not be evenly mixed before it is output, resulting in uneven distribution of nutrients. If the mixing and grinding time is too long, it will not only waste time and energy, but may also lead to over-grinding or spoilage of the feed, affecting its quality and palatability. Summary of the Invention
[0004] In view of this, the present invention aims to provide a stirring and grinding control method and system based on image processing, to solve the problems of uneven feed stirring and unreasonable grinding time encountered by traditional feed stirring and grinding control methods.
[0005] A stirring and pulverizing control method based on image processing includes the following steps:
[0006] S1: Collect feed image data and preprocess it to obtain preprocessed feed image data;
[0007] S2: Based on the preprocessed feed image data, extract the grid texture features, similarity matrix, distance matrix, and binarization features, and calculate the stirring features;
[0008] S3: Calculate the remaining stirring time based on the stirring characteristics and record it to form a remaining stirring time sequence, and calculate the remaining stirring time characteristics and the stirring completion status;
[0009] S31: Calculate the remaining stirring time based on the stirring characteristics, using the following method:
[0010] T k =W1·sigmoid(W2·F stir +b);
[0011] Among them, T k Let W1 be the remaining stirring time at time k, where k is the time index, W2 be the stirring feature mapping matrix, and F be the remaining stirring time mapping matrix. stir b is the stirring feature, and b is the stirring feature bias vector;
[0012] S32: Continuously record the remaining stirring time to form the remaining stirring time sequence [T1, T2, ... T]. m The remaining stirring time sequence is then input into a gated loop unit to calculate the remaining stirring time characteristics. The calculation method is as follows:
[0013] F T =GRU([T1,T2,…T) m ]);
[0014] Among them, F T For the remaining mixing time characteristics, GRU() is a gated loop unit operation; T1, T2, ... T m These represent the remaining stirring times for the 1st, 2nd, ..., mth time, respectively, where m is the number of times the record has been made.
[0015] S33: Based on the characteristics of the remaining stirring time, calculate the updated remaining stirring time sequence. The calculation method is as follows:
[0016] [T′1,T′2,…T′ m ] = MLP(F T );
[0017] Where, [T′1,T′2,…T′ m [T′1, T′2, ..., T′] represents the updated remaining stirring time series. m These represent the updated remaining stirring times for the 1st, 2nd, ..., mth time units, respectively; MLP() is a multilayer perceptron.
[0018] Based on the updated remaining stirring time sequence, the stirring completion status is calculated. The calculation process is as follows:
[0019] If the difference between two consecutive remaining mixing times in the updated remaining mixing time sequence is greater than 2 seconds, it is determined that "mixing needs to continue". In this case, mixing continues and the remaining mixing time sequence is updated.
[0020] If, in the updated remaining mixing time sequence, the difference between two consecutive remaining mixing times is less than or equal to 2 seconds, and both consecutive remaining mixing times are less than 10 seconds, then it is determined that "mixing is nearing completion". In this case, the average of the differences between the two remaining mixing times is taken as the final remaining mixing time.
[0021] S4: Combining stirring features, grid texture features, similarity matrix, distance matrix, and binarization features, calculate the reference speed and grinding time of the crusher; then update the reference speed of the crusher to obtain the updated crusher speed;
[0022] S5: Based on the updated pulverizer speed, control the pulverizer to perform feed pulverization operations.
[0023] Specifically, step S3 of this invention first uses the stirring features to perform a preliminary calculation of the remaining stirring time. The sigmoid function can introduce nonlinear relationships and improve the expressive power of the model, while the setting of the mapping matrix and bias vector can ensure that the model makes full use of the stirring features. Then, by continuously recording the remaining stirring time, a remaining stirring time sequence is formed and input into the GRU to introduce the remaining stirring time feature and express the changing trend of the remaining stirring time. Finally, by setting a threshold for the difference between two adjacent remaining stirring times, it automatically determines whether stirring needs to continue or whether stirring is close to completion, providing a reliable basis for the control of the stirring process.
[0024] Furthermore, step S1 also includes:
[0025] S11: A high-resolution industrial camera is used to continuously photograph the feed during the mixing process to obtain raw feed image data. The resolution of the high-resolution industrial camera is not less than 1920×1080 pixels, and the shooting frequency is set to 10 frames per second.
[0026] S12: The original feed image data is denoised using Gaussian filtering to obtain denoised feed image data.
[0027] S13: Using a weighted average method, the denoised feed image data is converted into grayscale image data; and the grayscale image data is superimposed with the denoised feed image data to obtain preprocessed feed image data.
[0028] Furthermore, step S2 also includes:
[0029] First, the preprocessed feed image data is cut into 5×5 equal-sized squares to obtain square image data and extract square texture features. Then, the similarity between the square texture features of each square image data and the square texture features of other square image data is calculated to form a similarity matrix.
[0030] Secondly, for the preprocessed feed image data, large pieces of feed are identified and the Euclidean distance between the center points of the large pieces of feed is calculated to form a distance matrix;
[0031] Next, binarized image data is calculated based on the preprocessed feed image data, and binarized features are extracted;
[0032] Finally, by combining the grid texture features, similarity matrix, distance matrix, and binarization features, stirring features are extracted.
[0033] Furthermore, step S2 also includes:
[0034] S21: For each grid image data, a gray-level co-occurrence matrix and a convolutional neural network are used to extract grid texture features. Then, the similarity between the grid texture features of each grid image data and the grid texture features of other grid image data is calculated to form the similarity matrix. The calculation method is as follows:
[0035]
[0036]
[0037] in, Let i be the image data of the i-th square, where i is the horizontal index of the square. Cut 5×5 () represents a 5×5 image cropping operation, and P represents the preprocessed feed image data. The gray-level co-occurrence matrix (GLCM) features are defined by GLCM(), which performs operations on the GLCM. These are VGGNet features, and VGGNet() represents the VGGNet convolutional neural network operation. For the grid texture features of the i-th grid image data, Concat() is the concatenation operation, sim i,j Let represent the similarity between the texture features of the i-th and j-th squares in the image data, where j is the vertical index of the square, CosSim() is the cosine similarity operation, and Sim is the similarity matrix. To obtain sim from i=1,j=1 to i=5,j=5 i,j As elements of the similarity matrix Sim;
[0038] S22: For the preprocessed feed image data, a YOLOv5 network is used to identify large pieces of feed, and the Euclidean distance between the center points of the large pieces of feed is calculated to form the distance matrix. The calculation method is as follows:
[0039] targets = YOLOv5(P);
[0040]
[0041] Where YOLOv5() is the YOLOv5 object detection network, targets is the set of detected large pieces of feed, and the set of large pieces of feed includes the center point coordinates and bounding boxes of the large pieces of feed. u,v Let x be the Euclidean distance between the center points of the u-th and v-th large feed blocks, where u and v are the indices of the first and second large feed blocks, respectively. u ,y u Let x and y be the x and y coordinates of the center point of the u-th large piece of feed, respectively. v ,y v Let x and y be the x and y coordinates of the center point of the v-th large piece of feed, respectively, and = is the distance matrix. To take d from u=1,v=1 to u=n,v=n u,v As elements of the distance matrix D, n is the number of large pieces of feed, and the diagonal elements of the distance matrix are 0;
[0042] S23: For the preprocessed feed image data, set the pixel values of the identified large feed areas to 1 and the pixel values of the remaining areas to 0 to obtain binarized image data; then, use a convolutional neural network to extract features from the binarized image data to obtain the binarized features, calculated as follows:
[0043] B = Binary(targets) bounds ,P);
[0044] F B =VGGNet(B);
[0045] Where B represents the binarized image data, Binary() is the binarization operation, and targets bounds F represents the bounding box of large pieces of feed. B Binarization features;
[0046] S24: Perform feature fusion on the grid texture features and binarized features, and combine the similarity matrix and distance matrix to calculate the stirring features. The calculation method is as follows:
[0047]
[0048] F stir =MLP(MLP(Concat(F texture ,F B ),CNN(Sim),CNN(D));
[0049] Among them, F texture The general characteristics of the checkered texture, F represents the grid texture features of the 1st, 2nd, ..., 25th grid images, respectively.stir This is a stirring characteristic.
[0050] Specifically, compared to traditional single feature extraction techniques, step S21 of this invention combines a gray-level co-occurrence matrix (GLCM) with a VGGNet convolutional neural network to extract texture features from each square of the image data after segmentation. The GLCM can capture the spatial relationship between pixels in the image, reflecting the texture coarseness, directionality, and other characteristics of the feed. VGGNet, as a deep learning model, can automatically learn and extract deep, non-linear features in the image. Then, a similarity matrix is constructed by calculating the cosine similarity between the texture features of each square, which not only reflects the texture similarity of the feed in different squares but also reflects the mixing state of the feed in more detail. In addition, the mixing features can provide a reliable basis for calculating the remaining mixing time in step S3 and the grinder speed and grinding time in step S4.
[0051] In step S22 of this invention, YOLOv5 is first used to identify large pieces of feed, and then the Euclidean distance between the coordinates of the center points of the large pieces of feed is calculated to form a distance matrix, which realizes the quantification of the spatial distribution relationship of feed in the image. The distance matrix not only reflects the relative positional relationship between feed pieces, but also provides an important basis for subsequent analysis of the uniformity of feed mixing.
[0052] In step S23 of this invention, the distribution of feed blocks is highlighted using a binarized image. In step S24, the grid texture features and binarized features are fused together. At the same time, the similarity matrix and the distance matrix are combined to comprehensively consider the similarity of the feed block texture and the spatial distribution relationship between large feed blocks. This helps to optimize the stirring control strategy in subsequent steps, reduce the problems of uneven stirring and unreasonable crushing time, and improve the production efficiency and quality of feed.
[0053] Furthermore, step S4 also includes:
[0054] By combining stirring features, grid texture features, similarity matrix, distance matrix and binarization features, a weighted average method is used to perform feature fusion to calculate the pulverizer's base speed and pulverization time. Then, based on the pulverization time, the speed correction coefficient is calculated, and the pulverizer's base speed is updated to obtain the updated pulverizer speed.
[0055] Furthermore, step S4 also includes:
[0056] S41: Combining stirring features, grid texture features, similarity matrix, distance matrix, and binarization features, the base speed of the pulverizer is calculated. The calculation method is as follows:
[0057] F′=w1·F stir +w2·F texture +w3·FB ;
[0058] R base =MLP(Concat(F′,CNN(Sim),CNN(D)));
[0059] Where F′ is the feature fusion vector, w1, w2, and w3 are the stirring feature weights, grid texture weights, and binarization weights, respectively, all calculated using a genetic algorithm; R base This is the reference speed for the crusher;
[0060] S42: Combining stirring features, grid texture features, similarity matrix, distance matrix, and binarization features, the pulverization time is calculated as follows:
[0061] time = MLP(Concat(F) stir ,F texture ,F B ),CNN(Sim),CNN(D)));
[0062] Where time represents the pulverizing time;
[0063] S43: Calculate the rotation speed correction coefficient based on the crushing time. The calculation method is as follows:
[0064] K = 1 + α·e -β·time ;
[0065] Where K is the speed correction coefficient, α is the correction intensity, e is the natural constant, and β is the decay rate;
[0066] S44: Update the pulverizer's base speed based on the speed correction coefficient to obtain the updated pulverizer speed. The calculation method is as follows:
[0067] R final =R base ·K;
[0068] Among them, R final This refers to the updated shredder speed.
[0069] In step S4 of this invention, the mixing features, grid texture features, and binarized features are fused using a weighted average method. A multilayer perceptron (MLP) combined with convolutional neural network (CNN) features of similarity and distance matrices is then used to calculate the grinder's base speed and grinding time. This fully considers the uniformity of feed mixing, feed texture, and distribution, making the calculation of the grinder's base speed and grinding time more accurate. Furthermore, sub-steps S43 and S44 calculate the speed correction coefficient based on the predicted grinding time and dynamically adjust the grinder's base speed. This allows for flexible adjustment of the grinder speed according to actual conditions, ensuring grinding effectiveness while also improving the equipment's adaptability.
[0070] Furthermore, step S5 also includes:
[0071] S51: Input the updated pulverizer speed into the pulverizer's PID control system;
[0072] S52: The PID control system of the pulverizer controls the pulverizer to perform feed pulverizing operation through the PID control algorithm according to the updated pulverizer speed until the pulverizing time is reached.
[0073] The present invention also discloses an image processing-based stirring and pulverizing control system, comprising:
[0074] Feed image data collection and preprocessing module: collects feed image data and preprocesses it to obtain preprocessed feed image data;
[0075] Mixing feature calculation module: Based on the preprocessed feed image data, extract grid texture features, similarity matrix, distance matrix, and binarization features, and calculate mixing features;
[0076] Mixing completion status calculation module: Calculates the remaining mixing time based on the mixing characteristics and records it to form a remaining mixing time sequence, and calculates the remaining mixing time characteristics and mixing completion status;
[0077] The pulverizer speed and pulverization time calculation module combines stirring features, grid texture features, similarity matrix, distance matrix, and binarization features to calculate the pulverizer's base speed and pulverization time; then, it updates the pulverizer's base speed to obtain the updated pulverizer speed.
[0078] Crushing Operation Module: Combined with the updated crusher speed, the crusher is controlled to perform feed crushing operations.
[0079] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0080] (1) Based on feed image data, this invention extracts various features such as grid texture features, similarity matrix, distance matrix, and binarization features to reflect the uniformity of feed mixing, texture distribution, and spatial position relationship from different perspectives, thus achieving a comprehensive description of the feed mixing state. Secondly, by using the mixing features to calculate the remaining mixing time, the mixing process is precisely controlled, avoiding over-mixing or under-mixing. Finally, this invention also uses a deep learning model to calculate the reference speed and grinding time of the grinder, and dynamically adjusts the speed correction coefficient according to the grinding time to update the reference speed of the grinder, thereby improving the adaptability and grinding efficiency of the equipment.
[0081] (2) This invention combines gray-level co-occurrence matrix and convolutional neural network to calculate similarity matrix, distance matrix, grid texture features and binarization features, which comprehensively reflect the texture similarity of feed in different grids and the uniformity of large feed pieces; secondly, this invention uses a weighted average method to fuse stirring features, grid texture features and binarization features, which fully considers the importance between different features, and the calculated stirring feature vector can more accurately reflect the stirring state of feed.
[0082] (3) This invention combines the stirring characteristics to realize the prediction and dynamic correction of the remaining stirring time; then, this invention proposes a method for calculating the speed correction coefficient based on the crushing time, and dynamically adjusts the reference speed of the crusher according to the correction coefficient, which ensures the crushing effect while reducing energy consumption and cost. Attached Figure Description
[0083] Figure 1 A schematic flowchart of the image processing-based stirring and pulverizing control method provided by the present invention;
[0084] Figure 2 A schematic diagram of the similarity matrix calculation algorithm provided by this invention;
[0085] Figure 3 This is a schematic diagram of the algorithm flow for calculating the completion state of stirring provided by the present invention. Detailed Implementation
[0086] The present invention will be further described below with reference to the accompanying drawings, but this is not intended to limit the present invention in any way. Any modifications or substitutions made based on the teachings of the present invention shall fall within the protection scope of the present invention.
[0087] Example 1: A stirring and pulverizing control method based on image processing, such as Figure 1 As shown, it includes the following steps:
[0088] S1: Collect feed image data and preprocess it to obtain preprocessed feed image data;
[0089] S11: A high-resolution industrial camera is used to continuously photograph the feed during the mixing process to obtain raw feed image data. The resolution of the high-resolution industrial camera is not less than 1920×1080 pixels, and the shooting frequency is set to 10 frames per second.
[0090] S12: Use Gaussian filtering to denoise the original feed image data to obtain denoised feed image data; the kernel size of Gaussian filtering can be set to 5×5, and the standard deviation σ can be set to 1.0;
[0091] S13: The weighted average method is used to convert the denoised feed image data into grayscale image data; and the grayscale image data and the denoised feed image data are superimposed on each channel to obtain the preprocessed feed image data.
[0092] S2: Based on the preprocessed feed image data, extract the grid texture features, similarity matrix, distance matrix, and binarization features, and calculate the stirring features;
[0093] S21: The preprocessed feed image data is divided into 5×5 equal-sized squares to obtain square image data; then, for each square image data, gray-level co-occurrence matrix and convolutional neural network are used to extract square texture features, and then the similarity between the square texture features of each square image data and the square texture features of other square image data is calculated to form a similarity matrix, such as... Figure 2 As shown, it includes the following steps:
[0094]
[0095] in, Let i be the image data of the i-th square, where i is the horizontal index of the square. Cut 5×5 () represents a 5×5 image cropping operation, and P represents the preprocessed feed image data. The gray-level co-occurrence matrix (GLCM) features are defined by GLCM(), which performs operations on the GLCM. These are VGGNet features, and VGGNet() represents the VGGNet convolutional neural network operation. For the grid texture features of the i-th grid image data, Concat() is the concatenation operation, sim i,j Let represent the similarity between the texture features of the i-th and j-th squares in the image data, where j is the vertical index of the square, CosSim() is the cosine similarity operation, and Sim is the similarity matrix. To obtain sim from i=1,j=1 to i=5,j=5 i,j As elements of the similarity matrix Sim;
[0096] S22: For the preprocessed feed image data, a YOLOv5 network is used to identify large pieces of feed, and the Euclidean distance between the center points of the large pieces of feed is calculated to form a distance matrix. The calculation method is as follows:
[0097] tar gets = YOLOv5(P);
[0098]
[0099] Where YOLOv5() is the YOLOv5 object detection network, targets is the set of detected large pieces of feed, and the set of large pieces of feed includes the center point coordinates and bounding boxes of the large pieces of feed. u,v Let x be the Euclidean distance between the center points of the u-th and v-th large feed blocks, where u and v are the indices of the first and second large feed blocks, respectively. u ,y u Let x and y be the x and y coordinates of the center point of the u-th large piece of feed, respectively. v ,y v Let x and y be the x and y coordinates of the center point of the v-th large piece of feed, respectively, and D be the distance matrix. To take d from u=1,v=1 to u=n,v=n u,v As elements of the distance matrix D, n is the number of large pieces of feed, and the diagonal elements of the distance matrix are 0;
[0100] S23: For the preprocessed feed image data, set the pixel values of the identified large feed areas to 1 and the pixel values of the remaining areas to 0 to obtain binarized image data; then, use a convolutional neural network to extract features from the binarized image data to obtain binarized features, calculated as follows:
[0101] B = Binary(targets) bounds ,P);
[0102] F B =VGGNet(B);
[0103] Where B represents the binarized image data, Binary() is the binarization operation, and targets bounds F represents the bounding box of large pieces of feed. B Binarization features;
[0104] S24: Perform feature fusion on the grid texture features and binarized features, and combine the similarity matrix and distance matrix to calculate the stirring features. The calculation method is as follows:
[0105]
[0106] F stir=MLP(MLP(Concat(F texture ,F B ),CNN(Sim),CNN(D));
[0107] Among them, F texture The general characteristics of the checkered texture, F represents the grid texture features of the 1st, 2nd, ..., 25th grid images, respectively. stir This is a stirring characteristic.
[0108] Compared to traditional methods that rely on single feature extraction techniques, step S21 of this invention combines a gray-level co-occurrence matrix (GLCM) with a VGGNet convolutional neural network to extract texture features from each square of the image data after segmentation. The GLCM can capture the spatial relationships between pixels in the image, reflecting the texture coarseness, directionality, and other characteristics of the feed. VGGNet, as a deep learning model, can automatically learn and extract deep, non-linear features from the image. Then, a similarity matrix is constructed by calculating the cosine similarity between the texture features of each square, which not only reflects the texture similarity of the feed in different squares but also reflects the mixing state of the feed in more detail. In addition, the mixing features can provide a reliable basis for calculating the remaining mixing time in step S3 and the grinder speed and grinding time in step S4.
[0109] In step S22 of this invention, YOLOv5 is first used to identify large pieces of feed, and then the Euclidean distance between the coordinates of the center points of the large pieces of feed is calculated to form a distance matrix, which realizes the quantification of the spatial distribution relationship of feed in the image; the distance matrix not only reflects the relative positional relationship between feed pieces, but also provides an important basis for subsequent analysis of the uniformity of feed mixing;
[0110] In step S23 of this invention, the distribution of feed blocks is highlighted using a binarized image. In step S24, the grid texture features and binarized features are fused together. At the same time, the similarity matrix and the distance matrix are combined to comprehensively consider the similarity of the feed block texture and the spatial distribution relationship between large feed blocks. This helps to optimize the stirring control strategy in subsequent steps, reduce the problems of uneven stirring and unreasonable crushing time, and improve the production efficiency and quality of feed.
[0111] S3: Calculate the remaining mixing time based on the mixing characteristics and record it to form a remaining mixing time sequence. Also, calculate the remaining mixing time characteristics and the mixing completion status, such as... Figure 3 As shown, it includes the following steps:
[0112] S31: Calculate the remaining mixing time based on the mixing characteristics. The calculation method is as follows:
[0113] T k=W1·sigmoid(W2·F stir +b);
[0114] Among them, T k Let W1 be the remaining stirring time at time k, where k is the time index, W2 be the stirring feature mapping matrix, and F be the remaining stirring time mapping matrix. stir b is the stirring feature, and b is the stirring feature bias vector;
[0115] S32: Continuously record the remaining stirring time to form a remaining stirring time sequence [T1, T2, ... T m The remaining stirring time sequence is then input into a gated loop unit to calculate the remaining stirring time characteristics. The calculation method is as follows:
[0116] F T =GRU([T1,T2,…T) m ]);
[0117] Among them, F T For the remaining mixing time characteristic, GRU() is a gated loop unit operation;
[0118] S33: Based on the characteristics of the remaining stirring time, calculate the updated remaining stirring time sequence. The calculation method is as follows:
[0119] [T′1,T′2,…T′ m ] = MLP(F T );
[0120] Where, [T′1,T′2,…T′ m [T′1, T′2, ..., T′] represents the updated remaining stirring time series. m These represent the updated remaining stirring times for the 1st, 2nd, ..., mth time units, respectively; MLP() is a multilayer perceptron.
[0121] Based on the updated remaining stirring time sequence, the stirring completion status is calculated. The calculation process is as follows:
[0122] If, in the updated remaining mixing time sequence, the difference between two consecutive remaining mixing times is less than or equal to 2 seconds, and both consecutive remaining mixing times are less than 10 seconds, then it is determined that "mixing is nearing completion". In this case, the average of the differences between the two remaining mixing times is taken as the final remaining mixing time.
[0123] Specifically, if a higher degree of mixing is required, step S33 can be replaced by the following steps, the specific calculation method of which is as follows:
[0124] s = sign(sigmoid(MLP(F) T)));
[0125] Where s represents the mixing completion status, and sign() is a binary classification function. When the value in the parentheses is greater than or equal to 0.5, it returns 1, which means "mixing needs to continue". At this time, mixing continues and the remaining mixing time series is updated; otherwise, it returns 0, which means "mixing is close to completion". At this time, the average of the difference between the two remaining mixing times is taken as the final remaining mixing time.
[0126] Step S3 of this invention first uses the stirring characteristics to perform a preliminary calculation of the remaining stirring time. The sigmoid function can introduce a nonlinear relationship and improve the expressive power of the model, while the setting of the mapping matrix and bias vector can ensure that the model makes full use of the stirring characteristics. Then, by continuously recording the remaining stirring time, a remaining stirring time sequence is formed and input into the GRU to introduce the remaining stirring time characteristics and express the changing trend of the remaining stirring time. Finally, by setting a threshold for the difference between two adjacent remaining stirring times, it automatically determines whether stirring needs to continue or whether stirring is close to completion, providing a reliable basis for the control of the stirring process.
[0127] For example, the updated remaining stirring time series is [T1, T2, ... T 12 If the sequence is [30 seconds, 33 seconds, 27 seconds, ..., 11 seconds, 8 seconds, 6 seconds], then when the sequence [8 seconds, 6 seconds] appears, the system will determine that "stirring is nearing completion" and take "7 seconds" as the final remaining stirring time.
[0128] S4: Combining stirring features, grid texture features, similarity matrix, distance matrix, and binarization features, calculate the reference speed and grinding time of the crusher; then update the reference speed of the crusher to obtain the updated crusher speed.
[0129] S41: Combining stirring features, grid texture features, similarity matrix, distance matrix, and binarization features, the base speed of the pulverizer is calculated. The calculation method is as follows:
[0130] F′=w1·F stir +w2·F texture +w3·F B ;
[0131] R base =MLP(Concat(F′,CNN(Sim),CNN(D)));
[0132] Where F′ is the feature fusion vector, w1, w2, and w3 are the stirring feature weights, grid texture weights, and binarization weights, respectively, all calculated using a genetic algorithm; R base This is the reference speed for the crusher;
[0133] S42: Combining stirring features, grid texture features, similarity matrix, distance matrix, and binarization features, the pulverization time is calculated as follows:
[0134] time = MLP(Concat(F) stir ,F texture ,F B ),CNN(Sim),CNN(D)));
[0135] Where time represents the pulverizing time;
[0136] S43: Calculate the rotation speed correction coefficient based on the crushing time. The calculation method is as follows:
[0137] K = 1 + α·e -β·time ;
[0138] Where K is the speed correction coefficient, α is the correction intensity, e is the natural constant, and β is the decay rate;
[0139] S44: Update the pulverizer's base speed based on the speed correction coefficient to obtain the updated pulverizer speed. The calculation method is as follows:
[0140] R final =R base ·K;
[0141] Among them, R final This refers to the updated shredder speed.
[0142] In step S4 of this invention, the mixing features, grid texture features, and binarized features are fused using a weighted average method. A multilayer perceptron (MLP) combined with convolutional neural network (CNN) features of similarity and distance matrices is then used to calculate the grinder's base speed and grinding time. This fully considers the uniformity of feed mixing, feed texture, and distribution, making the calculation of the grinder's base speed and grinding time more accurate. Furthermore, sub-steps S43 and S44 calculate the speed correction coefficient based on the predicted grinding time and dynamically adjust the grinder's base speed. This allows for flexible adjustment of the grinder speed according to actual conditions, ensuring grinding effectiveness while also improving the equipment's adaptability.
[0143] For example, [w1,w2,w3]=[0.5,0.3,0.2], the number of hidden layer neurons in the multilayer perceptron (MLP) is 20, the activation function is the ReLU function, the number of output layer neurons is 1, and the convolutional neural network (CNN) adopts a design of 2 layers of "convolutional layer + pooling layer", with correction intensity α=0.1 and decay rate β=0.05;
[0144] The base speed of the pulverizer is calculated to be 1500 rpm, and the speed correction coefficient K = 1.05. Therefore, the updated speed of the pulverizer is 1575 rpm.
[0145] S5: Combines the updated grinder speed to control the grinder to perform feed grinding operations;
[0146] S51: Input the updated pulverizer speed into the pulverizer's PID control system;
[0147] S52: The PID control system of the crusher controls the crusher to perform feed crushing operation through the PID control algorithm according to the updated crusher speed until the crushing time is reached.
[0148] Example 2: The present invention also discloses an image processing-based stirring and pulverizing control system, comprising:
[0149] Feed image data collection and preprocessing module: collects feed image data and preprocesses it to obtain preprocessed feed image data;
[0150] Mixing feature calculation module: Based on the preprocessed feed image data, extract grid texture features, similarity matrix, distance matrix, and binarization features, and calculate mixing features;
[0151] Mixing completion status calculation module: Calculates the remaining mixing time based on the mixing characteristics and records it to form a remaining mixing time sequence, and calculates the remaining mixing time characteristics and mixing completion status;
[0152] The pulverizer speed and pulverization time calculation module combines stirring features, grid texture features, similarity matrix, distance matrix, and binarization features to calculate the pulverizer's base speed and pulverization time; then, it updates the pulverizer's base speed to obtain the updated pulverizer speed.
[0153] Crushing Operation Module: Combines the updated crusher speed to control the crusher to perform feed crushing operations.
[0154] It should be noted that the sequence numbers of the above embodiments of the present invention are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0155] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0156] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. An image processing-based stirring pulverization control method, characterized by, The method comprises the following steps: S1: collecting feed image data and preprocessing to obtain preprocessed feed image data; S2: extracting square texture features, similarity matrix, distance matrix, and binary features from the preprocessed feed image data, and calculating the stirring features; S3: calculating the remaining stirring time according to the stirring features and recording the remaining stirring time sequence, and calculating the remaining stirring time features and the stirring completion state; S31: calculating the remaining stirring time according to the stirring features, the calculation method is: wherein, is the remaining mixing time at the kth time instant, k is the time instant index, is the remaining mixing time mapping matrix, is the sigmoid function, is the mixing feature mapping matrix, is the mixing feature, is the mixing feature bias vector; S32: Continuously record the remaining stirring time to form a remaining stirring time sequence and input the remaining stirring time sequence into the gating cycle unit to calculate the remaining stirring time feature in the following manner: wherein, is a remaining stirring time characteristic, is a gating loop unit operation; is a first, second, …, mth remaining stirring time, respectively, m being the number of records. S33: calculating the updated remaining stirring time sequence according to the remaining stirring time features, the calculation method is: wherein, is the updated residual stirring time sequence, is the updated 1st, 2nd, …, mth residual stirring time, respectively; is a multi-layer perception machine; According to the updated remaining stirring time sequence, the stirring completion state is calculated, and the calculation process is: If the difference between the adjacent two remaining stirring times in the updated remaining stirring time sequence is greater than 2 seconds, it is determined that "stirring needs to continue", at this time, the stirring is continued and the remaining stirring time sequence is updated; If the difference between the adjacent two remaining stirring times in the updated remaining stirring time sequence is less than or equal to 2 seconds, and the adjacent two remaining stirring times are both less than 10 seconds, it is determined that "stirring is close to completion", at this time, the average value of the difference between the two remaining stirring times is taken as the final remaining stirring time; S4: combining the stirring features, square texture features, similarity matrix, distance matrix, and binary features to calculate the reference speed of the pulverizer and the pulverizing time; then updating the reference speed of the pulverizer to obtain the updated speed of the pulverizer; S5: combining the updated speed of the pulverizer to control the pulverizer to perform feed pulverizing operation.
2. The image processing-based stirring pulverization control method according to claim 1, characterized by, The S1 step comprises: S11: using a high-resolution industrial camera to continuously shoot the feed during stirring to obtain original feed image data, the resolution of the high-resolution industrial camera is not less than 1920*1080 pixels, and the shooting frequency is set to 10 frames per second; S12: using Gaussian filtering to denoise the original feed image data to obtain denoised feed image data; S13: using weighted average method to convert the denoised feed image data into gray image data; and superimposing the gray image data and the denoised feed image data to obtain the preprocessed feed image data.
3. The image processing-based stirring pulverization control method according to claim 2, characterized by, The S2 step comprises: Firstly, the preprocessed feed image data is cut into 5*5 square images of equal size to obtain square image data and extract square texture features, and then the similarity between the square texture features of each square image data and the square texture features of other square image data is calculated to form a similarity matrix; Secondly, the preprocessed feed image data is identified to calculate the Euclidean distance between the center point coordinates of the large pieces of feed to form a distance matrix; Thirdly, the preprocessed feed image data is calculated to obtain binary image data and extract binary features; Finally, the stirring features are calculated by combining the square texture features, similarity matrix, distance matrix, and binary features.
4. The image processing-based stirring pulverization control method according to claim 3, characterized by, The S2 step comprises: S21: For each grid image data, the gray level co-occurrence matrix and the convolutional neural network are used to extract the grid texture features, and then the similarity between the grid texture features of each grid image data and the grid texture features of other grid image data is calculated to form the similarity matrix, and the calculation method is: in, For the image data of the i-th square, for Image cropping operation, This is the preprocessed feed image data. Features of the gray-level co-occurrence matrix This is an operation on the gray-level co-occurrence matrix. for feature, This is an operation for the VGGNet convolutional neural network. Let i be the grid texture feature of the i-th grid image data. For splicing operations, Let represent the similarity between the texture features of the i-th and j-th squares in the image data, where i is the horizontal index of the square and j is the vertical index of the square. For cosine similarity operation, This is a similarity matrix. To take from to of As a similarity matrix Element; S22: For the pre-processed feed image data, the YOLOv5 network is used to identify large pieces of feed, and the Euclidean distance between the center point coordinates of the large pieces of feed is calculated to form the distance matrix, and the calculation method is: wherein, is a YOLOv5 target detection network, is a set of detected large block feed targets, the set of large block feed targets containing center point coordinates and a bounding box of the large block feed, is the Euclidean distance between the u, vth large block feed center point coordinates, are respectively the first large block feed index and the second large block feed index, are respectively the horizontal and vertical coordinates of the uth large block feed center point, are respectively the horizontal and vertical coordinates of the vth large block feed center point, is a distance matrix, is an element of the distance matrix, as an element of the distance matrix, n is the number of large block feeds, and the diagonal elements of the distance matrix are 0. S23: For the pre-processed feed image data, the pixel value of the identified large piece of feed region is set to 1, and the pixel value of the remaining region is set to 0 to obtain binary image data; then the binary image data is extracted using the convolutional neural network to obtain the binary feature, and the calculation method is: wherein, is binary image data, is a binarization operation, is a bounding box of the bulk feed, is a binarization feature; S24: The grid texture features and the binary features are fused, and the mixing features are calculated in combination with the similarity matrix and the distance matrix, and the calculation method is: wherein, is a total feature of the grid texture, is a grid texture feature of the 1st, 2nd, …, 25th grid image data, respectively, is a stirring feature, is a multi-layer perceptron, is a vector concatenation operation, is a convolutional neural network operation.
5. The image processing-based stirring pulverization control method according to claim 4, characterized by, The S4 step includes: In combination with the mixing features, the grid texture features, the similarity matrix, the distance matrix, and the binary features, the weighted average method is used for feature fusion to calculate the reference speed of the pulverizer and the crushing time; then according to the crushing time, the speed correction coefficient is calculated, and the reference speed of the pulverizer is updated to obtain the updated speed of the pulverizer.
6. The image processing-based stirring pulverization control method according to claim 5, characterized by, The S4 step includes: S41: In combination with the mixing features, the grid texture features, the similarity matrix, the distance matrix, and the binary features, the reference speed of the pulverizer is calculated, and the calculation method is: wherein, is a feature fusion vector, are respectively stirring feature weight, square texture weight, binary weight, all of which are calculated by genetic algorithm; is a reference speed of the pulverizer; S42: The crushing time is calculated, and the calculation method is: wherein, is the milling time; S43: According to the crushing time, the speed correction coefficient is calculated, and the calculation method is: wherein, is a rotational speed correction factor, is a correction strength, is a natural constant, is a decay speed; S44: According to the speed correction coefficient, the reference speed of the pulverizer is updated to obtain the updated speed of the pulverizer, and the calculation method is: wherein, is the updated mill speed.
7. The image processing-based stirring pulverization control method according to claim 6, characterized by, The S5 step includes: S51: The updated speed of the pulverizer is input into the PID control system of the pulverizer; S52: The PID control system of the pulverizer controls the pulverizer to perform feed crushing operation according to the updated speed of the pulverizer through the PID control algorithm until the crushing time is reached.
8. An image processing-based mixing and crushing control system, comprising: a feed image data collection and preprocessing module: collecting feed image data and preprocessing to obtain pre-processed feed image data; a mixing feature calculation module: extracting grid texture features, similarity matrix, distance matrix, and binary features from the pre-processed feed image data, and calculating mixing features; a mixing completion state calculation module: calculating the remaining mixing time based on the mixing features and recording to form a remaining mixing time sequence, and calculating the remaining mixing time features and the mixing completion state; a pulverizer speed and crushing time calculation module: combining the mixing features, the grid texture features, the similarity matrix, the distance matrix, and the binary features to calculate the reference speed of the pulverizer and the crushing time; then updating the reference speed of the pulverizer to obtain the updated speed of the pulverizer; a crushing operation module: controlling the pulverizer to perform feed crushing operation in combination with the updated speed of the pulverizer; To achieve the image processing-based stirring and crushing control method as claimed in any one of claims 1-7.
Citation Information
Patent Citations
AIOT and big data analysis-based oat stirrer control method
CN114225814A
Calibration modeling and crystal length and width angular point three-dimensional reconstruction method for binocular telecentric camera in crystallization detection process
CN116977441A