Tobacco curing barn temperature and humidity regulation and control system and method based on deep learning optimization
By adopting a deep learning-based temperature and humidity control system in the tobacco cured room, and using data preprocessing and prediction models to dynamically adjust the PID parameters, the problem of inaccurate temperature and humidity control in the existing technology is solved, and the quality consistency and color uniformity in the tobacco leaf baking process is achieved.
Patent Information
- Application Number
- CN202510052883.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-01-14
AI Technical Summary
In the prior art, the temperature and humidity control of tobacco cured tobacco is inaccurate and the prediction capacity is insufficient, resulting in inconsistent quality and poor uniformity in the tobacco leaf baking process.
The temperature and humidity control system of tobacco cured room based on deep learning optimization is adopted, which includes a data acquisition module, a data processing module, a data prediction module and a device control module. By preprocessing and color analysis of tobacco leaf image and environmental data, pre-trained temperature and color prediction models are used to predict temperature and color change trends, and dynamically adjust the parameters of the PID control algorithm to accurately control the heating equipment.
It realizes precise control of the temperature and humidity in the tobacco cured tobacco room, reduces temperature fluctuations, ensures the quality consistency and color uniformity during the tobacco leaf baking process, and improves the overall tobacco leaf quality.
Smart Images

Figure CN119806261A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tobacco leaf baking, and in particular to a temperature and humidity control system and method for a tobacco-baking room based on deep learning optimization. Background Art
[0002] Flue-cured tobacco baking is a key link in tobacco production. Its purpose is to remove moisture from tobacco leaves so that they can reach a state suitable for storage, aging and cigarette processing. The control of temperature and humidity during the baking process directly affects the color, aroma and chemical composition of the tobacco leaves, and determines the final quality of the tobacco leaves.
[0003] The traditional flue-cured tobacco baking method mainly relies on manual experience and preset temperature and humidity values. The temperature and humidity in the tobacco baking room are monitored by sensors and the environment of the tobacco baking room is adjusted manually. However, this method is complicated to operate and highly dependent on manual experience. There are many uncertain factors, making it difficult to accurately control the baking process, which can easily lead to damage to the quality of tobacco leaves. At the same time, it fails to fully consider the impact of the state changes of the tobacco leaves themselves on the baking quality of the tobacco leaves.
[0004] A Chinese patent with publication number CN206292605U discloses an online image recognition control system for a flue-curing tobacco room. By online monitoring of the video signal of tobacco leaves, the curing state of the tobacco leaves is grasped according to the appearance and color of the tobacco leaves, and the flue-curing process is adjusted to achieve intelligent curing of tobacco leaves. However, this method only uses images to recognize the state of tobacco leaves and then adjusts the process parameters in the flue-curing tobacco room. It cannot predict the future trend of temperature and humidity changes in the flue-curing tobacco room, nor can it adjust the curing equipment in advance. It is difficult to accurately control the temperature and humidity during the curing process, resulting in large fluctuations in temperature and humidity, which affects the uniformity and quality consistency of tobacco leaf curing, thereby reducing the overall quality of tobacco leaves. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides a temperature and humidity control system and method for a tobacco flue-curing room based on deep learning optimization, so as to solve the problems of inaccurate temperature and humidity control and insufficient prediction ability in the prior art, thereby improving the uniformity and overall quality of tobacco leaf baking.
[0006] In order to achieve the above object, the present invention adopts the following technical scheme: In a first aspect, an embodiment of the present invention provides a temperature and humidity control system for a flue-cured tobacco house based on deep learning optimization, comprising: A data acquisition module is used to collect environmental data and tobacco leaf image data in the tobacco flue-curing room; A data processing module, connected to the data acquisition module, for performing data preprocessing on the tobacco leaf image data and environmental data, and performing color analysis on the tobacco leaf image data to obtain color feature data of the tobacco leaf image; A data prediction module, connected to the data processing module, for predicting the color change trend of tobacco leaves and the temperature change trend in the tobacco curing room according to the preprocessed environmental data and the color characteristic data; The equipment control module is connected to the data processing module and the data prediction module respectively, and is used to dynamically adjust the parameters of the PID control algorithm according to the temperature change trend and the color change trend, so as to control the heating equipment in the tobacco flue-curing room.
[0007] Optionally, the data processing module includes an image preprocessing unit, a storage unit, a color clustering unit and a color uniformity unit; The input end of the image preprocessing unit is connected to the output end of the data acquisition module, and is used to preprocess the environmental data and tobacco leaf image data in the tobacco flue-curing room, and send the preprocessed tobacco leaf image data to the color clustering unit; The input end of the color clustering unit is connected to the output end of the image preprocessing unit, and is used to perform color division on the tobacco leaf image in the preprocessed tobacco leaf image data to obtain color clustering of the tobacco leaf image; The input end of the color uniformity unit is connected to the output end of the color clustering unit, so as to evaluate the color uniformity of the tobacco leaf image according to the color clustering, so as to obtain the color uniformity of the tobacco leaf image; The input end of the storage unit is respectively connected to the output ends of the image preprocessing unit, the color clustering unit and the color uniformity unit for storing data.
[0008] Optionally, the data prediction module includes a temperature prediction unit, a temperature optimization unit, and a color prediction unit; The input end of the temperature prediction unit is connected to the output end of the storage unit, and is used to predict the preprocessed environmental data and the color feature data based on a pre-trained temperature prediction model to obtain a predicted temperature value; The input end of the temperature optimization unit is connected to the output end of the temperature prediction unit, so as to optimize the predicted temperature value by constructing a temperature objective function and constraint conditions, obtain an optimal predicted temperature value, and predict the temperature change trend in the tobacco flue-curing room; The input end of the color prediction unit is connected to the output end of the storage unit, and is used to predict the preprocessed environmental data and color feature data based on the pre-trained tobacco leaf color prediction model, obtain the tobacco leaf color prediction value, and predict the color change trend of the tobacco leaf.
[0009] Optionally, it also includes an early warning module and a data management module; The input end of the early warning module is connected to the output end of the data acquisition module, so as to evaluate the dangerous conditions in the tobacco flue-curing room through the environmental data in the tobacco flue-curing room to trigger the corresponding alarm; The input end of the data management module is connected to the output end of the data processing module and the data prediction module respectively, so as to provide an interface for data display; and also to provide an inquiry and management interface.
[0010] In a second aspect, an embodiment of the present invention provides a method for controlling temperature and humidity in a flue-cured tobacco room based on deep learning optimization, which is applied to the temperature and humidity control system in the flue-cured tobacco room as described above, comprising: S1: Collect environmental data and tobacco leaf image data in the tobacco flue-curing room; S2: performing data preprocessing on the tobacco leaf image data and the environmental data, and performing color analysis on the tobacco leaf image data to obtain color feature data of the tobacco leaf image; S3: predicting the color change trend of tobacco leaves and the temperature change trend in the tobacco-curing room according to the preprocessed environmental data and the color characteristic data; S4: dynamically adjusting the parameters of the PID control algorithm according to the temperature change trend and the color change trend to regulate the heating equipment in the tobacco flue-curing room.
[0011] Optionally, S2 specifically includes the following steps: S21: performing data preprocessing on the tobacco leaf image data and the environmental data to obtain the tobacco leaf image data and the environmental data after the data preprocessing; S22: performing color division on the tobacco leaf image in the preprocessed tobacco leaf image data to obtain color clustering of the tobacco leaf image; S23: performing color uniformity evaluation of the tobacco leaf image according to the color clustering to obtain the color uniformity of the tobacco leaf image.
[0012] Optionally, S22 specifically includes the following steps: S221: transferring the preprocessed tobacco leaf image to the HSV color space to obtain the HSV value corresponding to each pixel in the tobacco leaf image; S222: Initialize the cluster center of the K-means algorithm; S223: assigning each pixel in the tobacco leaf image to the nearest cluster center according to its HSV value; S224: Calculate the average HSV values of all pixels in each cluster, and update the cluster center according to each average value; S225: Determine whether the cluster centers before and after the update are exactly the same; if so, output the updated cluster center as the color cluster of the tobacco leaf image; if not, use the updated cluster center as the current cluster center and return to step S223; The S23 specifically includes the following steps: S231: Calculate the color difference between the color of each pixel in the tobacco leaf image and the color of its corresponding cluster center: S232: Calculate the standard deviation of the color difference to evaluate the uniformity of the tobacco leaf color.
[0013] Optionally, S3 specifically includes the following steps: S31: Based on a pre-trained temperature prediction model, predict the pre-processed environmental data and the color feature data to obtain a predicted temperature value; Among them, the environmental data includes temperature data and humidity data; The functional expression of the temperature prediction model is:
[0014] In the formula, Y is the predicted temperature value; is the current temperature data; is the current humidity data; is the color characteristic data of the current tobacco leaf; is the intercept; is the coefficient corresponding to the current temperature data; is the coefficient corresponding to the current humidity data; is the corresponding coefficient of the color characteristic data of the current tobacco leaf; is the deviation between the actual value and the predicted value; S32: optimizing the predicted temperature value by constructing a temperature objective function and constraint conditions, obtaining an optimal predicted temperature value, and predicting a temperature change trend in the tobacco flue-curing room; The expression of the temperature objective function is:
[0015] Where Z is the temperature objective function; For in time t Control input of is the cumulative error between the predicted temperature value and the target temperature value from time t to time t+N-1; N is a fixed period; For at time point k The weight factor of is the target temperature value; To predict the temperature value; The function expression of the constraint condition is:
[0016]
[0017] In the formula, and are the minimum and maximum predicted temperature values respectively; and are the minimum and maximum values of the control input respectively; S33: Based on the pre-trained tobacco leaf color prediction model, the pre-processed environmental data and color feature data are predicted to obtain a tobacco leaf color prediction value to predict the color change trend of the tobacco leaves.
[0018] Optionally, in S33, the specific steps of training the pre-trained tobacco leaf color prediction model include: Get historical baking data; The historical baking data includes historical environmental data, historical color characteristic data, actual tobacco leaf color change data and tobacco leaf final quality data; The historical environment data and the historical color feature data are merged to generate multi-channel input data; Based on the actual color change data of tobacco leaves and the final quality data of tobacco leaves, the corresponding true label is generated for each set of input data.
[0019] Based on the convolutional neural network model, a tobacco leaf color prediction model is constructed, and the tobacco leaf color prediction model is initialized; The tobacco leaf color prediction model includes a convolutional layer, a maximum pooling layer and a fully connected layer; After extracting features from the input data through the convolution layer, the most significant features are extracted from the output of the convolution layer using the maximum pooling layer, and the features are transmitted to the fully connected layer to perform regression analysis of the color change trend to obtain a color prediction value; A loss function is used to calculate a loss value to evaluate the difference between the predicted value of the tobacco leaf color prediction model and the true label, and the weights and biases of the tobacco leaf color prediction model are updated by back-propagating the loss value, and iterative training is continued until the prediction accuracy reaches a predetermined accuracy threshold or the number of iterations reaches a predetermined iteration value.
[0020] Optionally, the specific steps of S4 include: According to the optimal predicted temperature value and the predicted value of tobacco leaf color, the PID parameters of the PID control algorithm are dynamically adjusted, and the heating equipment in the tobacco flue-curing room is regulated by the PID control algorithm after the parameter adjustment; The PID parameters include proportional gain, integral gain and differential gain; The functional expression of the PID control algorithm is:
[0021] In the formula, is the proportional gain; is the error of the current time; is the integral gain; It is the cumulative value of all error times from the start time to the current time; ; is the rate of change of error.
[0022] The beneficial effects brought by the embodiments provided by the present invention include: The embodiment of the present invention uses a data acquisition module to obtain environmental data and tobacco leaf image data in a flue-curing room in real time, sends the environmental data and tobacco leaf image data to a data processing module, performs data preprocessing and color feature extraction, and then sends the processed data to a data prediction module. According to a temperature prediction model and a tobacco leaf color prediction model in the data prediction module, the changing trends of temperature and tobacco leaf color are predicted. The equipment control module dynamically adjusts PID parameters according to the changing trends of temperature and tobacco leaf color to accurately control the heating equipment in the flue-curing room, realize accurate control of temperature and humidity in the flue-curing room, reduce temperature fluctuations, and ensure quality consistency and color uniformity during tobacco leaf baking. The embodiment of the present invention constructs a temperature prediction model through a multivariate linear regression algorithm, which can accurately predict the temperature change trend in the tobacco flue-curing room based on historical environmental data and tobacco leaf image data; and constructs a tobacco leaf color prediction model through a convolutional neural network model, which can deeply analyze the color characteristics of tobacco leaf images and predict the color change trend of tobacco leaves during the baking process. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0024] Figure 1 It shows a structural block diagram of the temperature and humidity control system of the flue-cured tobacco room in the embodiment of this specification; Figure 2 The structure block diagram of the data processing module in the embodiment of this specification is shown; Figure 3 The structure block diagram of the data prediction module in the embodiment of this specification is shown; Figure 4 The flowchart of the temperature and humidity control method of the tobacco flue-curing room in the embodiment of this specification is shown. DETAILED DESCRIPTION
[0025] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In the detailed description below, many specific details are proposed to provide a comprehensive understanding of the present invention. However, it is obvious to those skilled in the art that the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0026] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0027] Example 1 like Figure 1 As shown, this embodiment provides a temperature and humidity control system for a flue-cured tobacco house based on deep learning optimization, including a data acquisition module, a data processing module, a data prediction module, an equipment control module, a data management module and an early warning model; Exemplarily, the data acquisition module is used to collect environmental data and tobacco leaf image data in the tobacco flue-curing room; wherein the environmental data includes temperature data and humidity data; The input end of the data processing module is communicatively connected to the output end of the data acquisition module, so as to perform data preprocessing on the tobacco leaf image data and the environmental data, and perform color analysis on the tobacco leaf image data to obtain color feature data of the tobacco leaf image; The input end of the data prediction module is communicatively connected to the output end of the data processing module, so as to predict the color change trend of tobacco leaves and the temperature change trend in the tobacco curing room according to the preprocessed environmental data and the color characteristic data; The input end of the equipment control module is respectively connected to the output end of the data processing module and the data prediction module for dynamically adjusting the parameters of the PID control algorithm according to the temperature change trend and the color change trend, so as to control the heating equipment in the tobacco flue-curing room; The input end of the data management module is respectively connected to the output end of the data processing module and the data prediction module to provide an interface for data display; it is also used to provide a query and management interface; The input end of the early warning module is communicatively connected with the output end of the data acquisition module, so as to evaluate the dangerous conditions in the tobacco flue-curing room through the environmental data in the tobacco flue-curing room, so as to trigger the corresponding alarm.
[0028] like Figure 2 As shown, in some embodiments, the data processing module includes an image preprocessing unit, a storage unit, a color clustering unit, and a color uniformity unit; The input end of the image preprocessing unit is communicatively connected to the output end of the data acquisition module, so as to preprocess the environmental data in the flue-cured tobacco room and the tobacco leaf image data, and send the preprocessed tobacco leaf image data to the color clustering unit; Among them, data preprocessing includes image denoising, grayscale, white balance adjustment, image enhancement and normalization processing; The input end of the color clustering unit is communicatively connected to the output end of the image preprocessing unit, and is used to perform color division on the tobacco leaf image in the preprocessed tobacco leaf image data to obtain color clustering of the tobacco leaf image; The input end of the color uniformity unit is communicatively connected to the output end of the color clustering unit, so as to evaluate the color uniformity of the tobacco leaf image according to the color clustering to obtain the color uniformity of the tobacco leaf image; The input end of the storage unit is respectively connected to the output ends of the image preprocessing unit, the color clustering unit and the color uniformity unit for storing the above data; like Figure 3 As shown, in some embodiments, the data prediction module includes a temperature prediction unit, a temperature optimization unit, and a color prediction unit; The input end of the temperature prediction unit is communicatively connected to the output end of the storage unit, and is used to predict the preprocessed environmental data and the color feature data based on a pre-trained temperature prediction model to obtain a predicted temperature value; The input end of the temperature optimization unit is communicatively connected to the output end of the temperature prediction unit, so as to optimize the predicted temperature value by constructing a temperature objective function and constraint conditions, obtain an optimal predicted temperature value, and predict the temperature change trend in the tobacco flue-curing room; The input end of the color prediction unit is communicatively connected to the output end of the storage unit to predict the preprocessed environmental data and color feature data based on a pre-trained tobacco leaf color prediction model, obtain a tobacco leaf color prediction value, and predict the color change trend of the tobacco leaf.
[0029] In some embodiments, the data acquisition module includes an image acquisition component, a plurality of temperature sensors, and a plurality of humidity sensors disposed in a tobacco curing room; Specifically, the image acquisition component includes a plurality of cameras that are communicatively connected to each other, wherein the plurality of cameras are evenly arranged in the tobacco curing room to realize image acquisition of tobacco leaves in the tobacco curing room.
[0030] In some embodiments, a smoke concentration sensor and a carbon monoxide sensor are also included; Specifically, the output ends of the smoke concentration sensor and the carbon monoxide sensor are respectively connected to the input end of the early warning module. The early warning module evaluates the dangerous conditions in the tobacco flue-curing room through the temperature and humidity data, smoke concentration data and carbon monoxide data in the tobacco flue-curing room to trigger the corresponding alarm. Among them, when one or more of the temperature and humidity data, smoke concentration data and carbon monoxide data in the tobacco flue-curing room exceeds the preset safety threshold, the early warning module determines that the environment in the tobacco flue-curing room is in a dangerous condition, triggers the sound and light alarm in the tobacco flue-curing room, and notifies the relevant personnel to take emergency measures.
[0031] In some embodiments, the heating equipment in the tobacco-curing room includes an electric heater and an infrared heater.
[0032] Example 2 like Figure 4 As shown, the present invention provides a method for controlling temperature and humidity in a flue-cured tobacco room based on deep learning optimization, comprising: S1: Collecting environmental data and tobacco leaf image data in a tobacco flue-curing room; the environmental data includes temperature data and humidity data; S2: performing data preprocessing on the tobacco leaf image data and the environmental data, and performing color analysis on the tobacco leaf image data to obtain color feature data of the tobacco leaf image; In some embodiments, S2 specifically includes the following steps: S21: performing data preprocessing on the tobacco leaf image data and the environmental data to obtain the tobacco leaf image data and the environmental data after the data preprocessing; Among them, data preprocessing includes image denoising, grayscale, white balance adjustment, image enhancement and normalization processing; S22: performing color division on the tobacco leaf image in the preprocessed tobacco leaf image data to obtain color clustering of the tobacco leaf image; S23: performing color uniformity evaluation of the tobacco leaf image according to the color clustering to obtain the color uniformity of the tobacco leaf image.
[0033] Specifically, S22 includes the following steps: S221: transferring the preprocessed tobacco leaf image to the HSV color space through a color space conversion algorithm to obtain the HSV value corresponding to each pixel in the tobacco leaf image; Among them, the function expression of the color space conversion algorithm is:
[0034]
[0035]
[0036] In the formula, R is the red component value; G is the green component value; B is the blue component value; V is the brightness value; S is saturation;H For color tone.
[0037] S222: Initialize the cluster center of the K-means algorithm; S223: assigning each pixel in the tobacco leaf image to the nearest cluster center according to its HSV value; S224: Calculate the average HSV values of all pixels in each cluster, and update the cluster center according to each average value; S225: Determine whether the cluster centers before and after the update are exactly the same; if so, output the updated cluster center as the color cluster of the tobacco leaf image; if not, use the updated cluster center as the current cluster center and return to step S223; Specifically, S23 includes the following steps: S231: Calculate the color difference between the color of each pixel in the tobacco leaf image and the color of its corresponding cluster center: S232: Calculate the standard deviation of the color difference to evaluate the uniformity of the tobacco leaf color.
[0038] S3: predicting the color change trend of tobacco leaves and the temperature change trend in the tobacco-curing room according to the preprocessed environmental data and the color characteristic data; In some embodiments, S3 specifically includes the following steps: S31: Based on a pre-trained temperature prediction model, predict the pre-processed environmental data and the color feature data to obtain a predicted temperature value; The functional expression of the temperature prediction model is:
[0039] In the formula, Y is the predicted temperature value; is the current temperature data; is the current humidity data; is the color characteristic data of the current tobacco leaf; is the intercept, which is the predicted value of the model when all input features are zero; is the coefficient corresponding to the current temperature data; is the coefficient corresponding to the current humidity data; is the corresponding coefficient of the color characteristic data of the current tobacco leaf; is the deviation between the actual value and the predicted value; S32: optimizing the predicted temperature value by constructing a temperature objective function and constraint conditions, obtaining an optimal predicted temperature value, and predicting a temperature change trend in the tobacco flue-curing room; The expression of the temperature objective function is:
[0040] Where Z is the temperature objective function; For in time t Control input of is the cumulative error between the predicted temperature value and the target temperature value from time t to time t+N-1; N is a fixed period; For at time point k The weight factor is used to reflect the importance of the deviation between the predicted temperature and the target temperature at different time points; is the target temperature value; To predict the temperature value; represents the cost function at each time point k.
[0042] The function expression of the constraint condition is:
[0043]
[0044] In the formula, and are the minimum and maximum predicted temperature values respectively; and are the minimum and maximum values of the control input respectively.
[0045] In this embodiment, by minimizing the temperature objective function Z and the constraints, the temperature and humidity in the tobacco-curing room are always within a range suitable for tobacco leaf curing, while the energy consumption in the tobacco-curing room is maintained at a low level.
[0046] S33: Based on the pre-trained tobacco leaf color prediction model, the pre-processed environmental data and color feature data are predicted to obtain a tobacco leaf color prediction value to predict the color change trend of the tobacco leaves.
[0047] In some embodiments, in S31, the specific steps of training based on the pre-trained temperature prediction model include: Based on the multivariate linear regression algorithm, a temperature prediction model is constructed; Obtain historical environmental data and historical color feature data; Inputting the historical environmental data and the historical color feature data into a temperature prediction model for training to obtain a trained temperature prediction model; Among them, the temperature prediction model in this embodiment predicts the temperature change trend according to the current environmental data by learning the influence relationship between environmental factors and color characteristics on temperature changes.
[0048] In some embodiments, in S33, the specific steps of training based on the pre-trained tobacco leaf color prediction model include: S331: Obtain historical baking data; Among them, historical baking data includes historical environmental data, historical color characteristic data, actual tobacco leaf color change data and tobacco leaf final quality data; S332: fusing the historical environment data and the historical color feature data to generate multi-channel input data; S333: Generate a corresponding true label for each set of input data based on the actual change data of tobacco leaf color and the final quality data of tobacco leaves.
[0049] In this embodiment, the real label data is used to guide the model to learn the trend of tobacco leaf color change and its relationship with environmental factors. The real label is the actual color change under specific environmental conditions and the final quality of the tobacco leaves.
[0050] S334: constructing a tobacco leaf color prediction model based on the convolutional neural network model, and initializing the tobacco leaf color prediction model; The tobacco leaf color prediction model includes a convolutional layer, a maximum pooling layer and a fully connected layer; S335: After extracting features from the input data through the convolution layer, extract the most significant features from the output of the convolution layer using the maximum pooling layer, and transmit the features to the fully connected layer to perform regression analysis of the color change trend to obtain a color prediction value; Specifically, the convolutional layer performs a convolution operation on the input data to extract the feature map:
[0051] In the formula, S After the convolution operation, i Row, No. j Column, No. k Output value on each channel; For input data in i+m-1 Row, No. j+n-1 The value at the column position; For the k The convolution kernel is m Row, No. n The weight value at the column position. bk For the k The bias term of the convolution kernel.
[0052] Specifically, the output of the convolutional layer is reduced in dimension through the maximum pooling layer, and its function expression is:
[0053] In the formula, After the pooling operation i Row, No. j Column, No. k Output value on each channel; The convolutional layer output is i+m-1 Row, No. j+n-1 Column, No. k The value at the position of the channel; To find the maximum value of the elements in the local area (pooling window). In this embodiment, the maximum pooling layer pools the features output by the convolution layer through a 2x2 pooling window; In this embodiment, the regression analysis algorithm selects one of the recursive neural network structures such as LSTM (Long Short-Term Memory Network) and GRU (Gated Recurrent Unit) as the core of the regression analysis algorithm, which can effectively capture the long-term dependencies in the input data and can more accurately predict the color change trend of tobacco leaves during the baking process, thereby significantly improving the prediction accuracy of tobacco leaf baking quality.
[0054] S336: Use the loss function to calculate the loss value to evaluate the difference between the predicted value of the tobacco leaf color prediction model and the true label, and update the weight and bias of the tobacco leaf color prediction model by back-propagating the loss value, and continue iterative training until the prediction accuracy reaches a predetermined accuracy threshold or the number of iterations reaches a predetermined iteration value.
[0055] Among them, the loss function is the mean square error loss, and its function expression is:
[0056] In the formula, L is the mean square error loss; N is the total number of samples, , For the j The true value of samples; For the j The predicted value of a sample.
[0057] S4: adjusting the parameters of the PID control algorithm according to the temperature change trend and the color change trend to regulate the heating equipment in the tobacco curing room.
[0058] In some embodiments, the specific steps of S4 include: According to the optimal predicted temperature value and the predicted value of tobacco leaf color, the PID parameters of the PID control algorithm are dynamically adjusted, and the heating equipment in the tobacco flue-curing room is regulated by the PID control algorithm after the parameter adjustment; The PID parameters include proportional gain, integral gain and differential gain; The functional expression of the PID control algorithm is:
[0059] In the formula, is the proportional gain; is the error of the current time; is the integral gain; It is the cumulative value of all error times from the start time to the current time; ; is the rate of change of error.
[0060] Among them, in this embodiment, the parameters (Kp, Ki, Kd) of the PID controller are dynamically adjusted according to the optimal predicted temperature value and the predicted value of tobacco leaf color to adapt to the control requirements under different baking stages or conditions and the temperature and humidity adjustment requirements in the smoke room.
[0061] In addition, in some embodiments, a feedforward control mechanism can be introduced on the basis of PID control. Through feedforward control, the control quantity is pre-adjusted using prediction information to reduce the delay and error of system response. For example, a rough adjustment is first made using the prediction model to set the target temperature, and then the PID controller is used for fine adjustment to ensure the stability and response speed of the system. Through this combination of multiple control strategies, the temperature and humidity control system of the tobacco curing room can more effectively respond to changes in temperature and humidity during the baking process, thereby improving the consistency and prediction accuracy of the tobacco leaf baking quality.
[0062] In summary, the present embodiment uses the data acquisition module to obtain the environmental data and tobacco leaf image data in the tobacco flue-curing room in real time, sends the environmental data and tobacco leaf image data to the data processing module for data preprocessing and color feature extraction, and then sends the processed data to the data prediction module, and predicts the temperature and tobacco leaf color change trends according to the temperature prediction model and color prediction model in the data prediction module; the data prediction module sends the temperature and tobacco leaf color change trends to the equipment control module, and the equipment control module dynamically adjusts the PID parameters according to the temperature and tobacco leaf color change trends to accurately control the tobacco flue-curing room heating equipment, so as to achieve accurate control of the temperature and humidity in the flue-curing room, reduce temperature fluctuations, and ensure the quality consistency and color uniformity of the tobacco leaf during the baking process; This embodiment can automatically collect environmental and image data in the flue-cured tobacco room, analyze and predict, and adjust the temperature according to the prediction results, reducing the need for manual monitoring and adjustment and reducing labor intensity. At the same time, the tobacco leaf color prediction model in this embodiment is constructed by a convolutional neural network, which has good generalization ability, improves the stability and reliability of the humidity control system of the flue-cured tobacco room when facing different baking conditions, and can adapt to different baking environments and tobacco leaf characteristics.
[0063] This embodiment dynamically adjusts the PID parameters of the PID control algorithm through the output of the temperature prediction model and the color prediction model to accurately adjust the heating equipment in the tobacco flue-curing room. This not only improves the automation level of the baking process in the tobacco flue-curing room, but also enables timely adjustment of the heating equipment, improves baking efficiency, shortens the baking cycle, and reduces energy waste through precise control, achieving energy conservation and emission reduction, while also improving the efficiency and quality of tobacco leaf baking.
[0064] The above description is only a preferred embodiment of the present invention. It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention.
Claims
1. A temperature and humidity control system for a flue-cured tobacco house based on deep learning optimization, characterized in that: include: A data acquisition module is used to collect environmental data and tobacco leaf image data in the tobacco flue-curing room; A data processing module, connected to the data acquisition module, for performing data preprocessing on the tobacco leaf image data and environmental data, and performing color analysis on the tobacco leaf image data to obtain color feature data of the tobacco leaf image; A data prediction module, connected to the data processing module, for predicting the color change trend of tobacco leaves and the temperature change trend in the tobacco curing room according to the preprocessed environmental data and the color characteristic data; The equipment control module is connected to the data processing module and the data prediction module respectively, and is used to dynamically adjust the parameters of the PID control algorithm according to the temperature change trend and the color change trend, so as to control the heating equipment in the tobacco flue-curing room.
2. The system according to claim 1, characterized in that The data processing module includes an image preprocessing unit, a storage unit, a color clustering unit and a color uniformity unit; The input end of the image preprocessing unit is connected to the output end of the data acquisition module, and is used to preprocess the environmental data and tobacco leaf image data in the tobacco flue-curing room, and send the preprocessed tobacco leaf image data to the color clustering unit; The input end of the color clustering unit is connected to the output end of the image preprocessing unit, and is used to perform color division on the tobacco leaf image in the preprocessed tobacco leaf image data to obtain color clustering of the tobacco leaf image; The input end of the color uniformity unit is connected to the output end of the color clustering unit, so as to evaluate the color uniformity of the tobacco leaf image according to the color clustering, so as to obtain the color uniformity of the tobacco leaf image; The input end of the storage unit is respectively connected to the output ends of the image preprocessing unit, the color clustering unit and the color uniformity unit for storing data.
3. The system according to claim 1, characterized in that The data prediction module includes a temperature prediction unit, a temperature optimization unit, and a color prediction unit; The input end of the temperature prediction unit is connected to the output end of the storage unit, and is used to predict the preprocessed environmental data and the color feature data based on a pre-trained temperature prediction model to obtain a predicted temperature value; The input end of the temperature optimization unit is connected to the output end of the temperature prediction unit, so as to optimize the predicted temperature value by constructing a temperature objective function and constraint conditions, obtain an optimal predicted temperature value, and predict the temperature change trend in the tobacco flue-curing room; The input end of the color prediction unit is connected to the output end of the storage unit, and is used to predict the preprocessed environmental data and color feature data based on the pre-trained tobacco leaf color prediction model, obtain the tobacco leaf color prediction value, and predict the color change trend of the tobacco leaf.
4. The system according to claim 1, characterized in that It also includes an early warning module and a data management module; The input end of the early warning module is connected to the output end of the data acquisition module, so as to evaluate the dangerous conditions in the tobacco flue-curing room through the environmental data in the tobacco flue-curing room to trigger the corresponding alarm; The input end of the data management module is connected to the output end of the data processing module and the data prediction module respectively, so as to provide an interface for data display; and also to provide an inquiry and management interface.
5. A method for controlling temperature and humidity in a flue-cured tobacco house based on deep learning optimization, characterized in that: The temperature and humidity control system for a flue-cured tobacco house as claimed in any one of claims 1 to 4 comprises the following steps: S1: Collect environmental data and tobacco leaf image data in the tobacco flue-curing room; S2: performing data preprocessing on the tobacco leaf image data and the environmental data, and performing color analysis on the tobacco leaf image data to obtain color feature data of the tobacco leaf image; S3: predicting the color change trend of tobacco leaves and the temperature change trend in the tobacco-curing room according to the preprocessed environmental data and the color characteristic data; S4: dynamically adjusting the parameters of the PID control algorithm according to the temperature change trend and the color change trend to regulate the heating equipment in the tobacco flue-curing room.
6. The method according to claim 5, characterized in that S2 specifically includes the following steps: S21: performing data preprocessing on the tobacco leaf image data and the environmental data to obtain the tobacco leaf image data and the environmental data after the data preprocessing; S22: performing color division on the tobacco leaf image in the preprocessed tobacco leaf image data to obtain color clustering of the tobacco leaf image; S23: performing color uniformity evaluation of the tobacco leaf image according to the color clustering to obtain the color uniformity of the tobacco leaf image.
7. The method according to claim 6, characterized in that S22 specifically includes the following steps: S221: transferring the preprocessed tobacco leaf image to the HSV color space to obtain the HSV value corresponding to each pixel in the tobacco leaf image; S222: Initialize the cluster center of the K-means algorithm; S223: assigning each pixel in the tobacco leaf image to the nearest cluster center according to its HSV value; S224: Calculate the average HSV values of all pixels in each cluster, and update the cluster center according to each average value; S225: Determine whether the cluster centers before and after the update are exactly the same; if so, output the updated cluster center as the color cluster of the tobacco leaf image; if not, use the updated cluster center as the current cluster center and return to step S223; The S23 specifically includes the following steps: S231: Calculate the color difference between the color of each pixel in the tobacco leaf image and the color of its corresponding cluster center: S232: Calculate the standard deviation of the color difference to evaluate the uniformity of the tobacco leaf color.
8. The method according to claim 5, characterized in that S3 specifically includes the following steps: S31: Based on a pre-trained temperature prediction model, predict the pre-processed environmental data and the color feature data to obtain a predicted temperature value; Among them, the environmental data includes temperature data and humidity data; The functional expression of the temperature prediction model is: ; In the formula, Y is the predicted temperature value; is the current temperature data; is the current humidity data; is the color characteristic data of the current tobacco leaf; is the intercept; is the coefficient corresponding to the current temperature data; is the coefficient corresponding to the current humidity data; is the corresponding coefficient of the color characteristic data of the current tobacco leaf; is the deviation between the actual value and the predicted value; S32: optimizing the predicted temperature value by constructing a temperature objective function and constraint conditions, obtaining an optimal predicted temperature value, and predicting a temperature change trend in the tobacco flue-curing room; The expression of the temperature objective function is: ; Where Z is the temperature objective function; For in time t Control input of is the cumulative error between the predicted temperature value and the target temperature value from time t to time t+N-1; N is a fixed period; For at time point k The weight factor of is the target temperature value; To predict the temperature value; The function expression of the constraint condition is: ; ; In the formula, and are the minimum and maximum predicted temperature values respectively; and are the minimum and maximum values of the control input respectively; S33: Based on the pre-trained tobacco leaf color prediction model, the pre-processed environmental data and color feature data are predicted to obtain a tobacco leaf color prediction value to predict the color change trend of the tobacco leaves.
9. The method according to claim 8, characterized in that In S33, the specific steps of training the pre-trained tobacco leaf color prediction model include: Get historical baking data; The historical baking data includes historical environmental data, historical color characteristic data, actual tobacco leaf color change data and tobacco leaf final quality data; The historical environment data and the historical color feature data are merged to generate multi-channel input data; Generate corresponding true labels for each set of input data based on the actual color change data of tobacco leaves and the final quality data of tobacco leaves; Based on the convolutional neural network model, a tobacco leaf color prediction model is constructed, and the tobacco leaf color prediction model is initialized; The tobacco leaf color prediction model includes a convolutional layer, a maximum pooling layer and a fully connected layer; After extracting features from the input data through the convolution layer, the most significant features are extracted from the output of the convolution layer using the maximum pooling layer, and the features are transmitted to the fully connected layer to perform regression analysis of the color change trend to obtain a color prediction value; A loss function is used to calculate a loss value to evaluate the difference between the predicted value of the tobacco leaf color prediction model and the true label, and the weights and biases of the tobacco leaf color prediction model are updated by back-propagating the loss value, and iterative training is continued until the prediction accuracy reaches a predetermined accuracy threshold or the number of iterations reaches a predetermined iteration value.
10. The method according to claim 5, characterized in that The specific steps of S4 include: According to the optimal predicted temperature value and the predicted value of tobacco leaf color, the PID parameters of the PID control algorithm are dynamically adjusted, and the heating equipment in the tobacco flue-curing room is regulated by the PID control algorithm after the parameter adjustment; The PID parameters include proportional gain, integral gain and differential gain; The functional expression of the PID control algorithm is: ; In the formula, is the proportional gain; is the error of the current time; is the integral gain; It is the cumulative value of all error times from the start time to the current time; ; is the rate of change of error.
Citation Information
Patent Citations
Online image recognition control system of tobacco flue -curing house
CN206292605U
Method for judging stage temperature control point in tobacco leaf curing process based on image recognition
CN112818827A
Tobacco storage control method and system based on Internet of Things
CN115469701A
Active heat dissipation module, electronic cigarette and active heat dissipation module design optimization method
CN115997985A
Primary flue-cured tobacco leaf drying degree quantification method based on constraint CaiT model
CN116403065A
Cited By
Method for establishing heat and humidity transfer and air flow model of uniform-temperature bulk curing barn
CN120493719A