A method and system for monitoring temperature of frozen food
By adaptively adjusting the process and measurement noise covariance of the Kalman filter algorithm, the problem of noise influence during the storage of frozen foods is solved, and accurate monitoring of the frozen food temperature and quality assurance are achieved.
Patent Information
- Application Number
- CN202510975874.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-07-16
AI Technical Summary
The existing Kalman filter algorithm uses a fixed process noise covariance during the storage of frozen food, resulting in poor denoising effect and inability to adapt to complex storage environments.
The Kalman filter algorithm with adaptive process noise covariance and adaptive measurement noise covariance is used to calculate the optimal volatility and optimal noise level by adaptively adjusting the initial temperature data, thereby improving the denoising effect of the filter.
The denoising accuracy and response speed of the filter are improved, and the precise monitoring of the temperature of frozen food is achieved to ensure food quality.
Smart Images

Figure CN120491716B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of temperature monitoring, and in particular to a method and system for monitoring the temperature of frozen food. Background Art
[0002] Frozen food refers to food processed and preserved through freezing technology, typically stored at temperatures below -18°C to extend its shelf life and preserve its nutrients and taste. Temperature instability during transportation and storage can lead to thawing and refreezing, affecting the food's taste, appearance, and even nutritional content. Furthermore, temperature fluctuations in frozen foods can lead to bacterial growth, increasing the risk of food poisoning. Therefore, frozen foods require temperature monitoring during production, processing, transportation, and storage to ensure they remain within a relatively low temperature range.
[0003] A Chinese patent document with publication number CN119538165B discloses a temperature monitoring system and method for a water-jacketed heating furnace. The method includes: obtaining historical and real-time temperature data for the water-jacketed heating furnace, randomly generating multiple binary trees using the historical temperature data, and evaluating the structural stability and root node selection reliability of each binary tree. The Gini index is calculated using the binary tree's temperature data and the inverse is taken to obtain the node purity of the binary tree. The product of the node purity and the reliability of the root node selection is used as the segmentation capability value to determine the weight of each binary tree. The real-time temperature data is inserted into the binary tree, the change in the complexity of the binary tree is obtained, and the weighted sum is used to obtain the degree of abnormality. This is used to determine whether the real-time temperature data is abnormal, thereby achieving the purpose of temperature monitoring.
[0004] During the storage of frozen foods, the collected temperature data is affected by thermal noise and electronic interference, resulting in noisy data in the acquired temperature data source. In order to improve the temperature control effect, the acquired initial temperature data needs to be denoised. When denoising the temperature data, the Kalman filter algorithm is usually used to denoise the temperature data. The existing Kalman filter algorithm uses a fixed process noise covariance, but the storage environment of frozen foods is relatively complex. The use of a fixed process noise covariance results in a poor denoising effect of the Kalman filter, which cannot meet the needs of frozen food storage. Summary of the Invention
[0005] In order to solve the problem that the fixed process noise covariance leads to poor denoising effect of Kalman filtering, the present invention provides a method and system for monitoring the temperature of frozen food.
[0006] In a first aspect, the present invention provides a method for monitoring the temperature of frozen food, which adopts the following technical solution:
[0007] A method for monitoring the temperature of frozen food, comprising the steps of:
[0008] Obtain the initial temperature data in the frozen food warehouse, calculate the adaptive process noise covariance in the Kalman filter algorithm, and use the Kalman filter algorithm to denoise the initial temperature sequence to obtain the optimal temperature sequence for controlling the temperature in the frozen food warehouse;
[0009] The adaptive process noise covariance is calculated as follows: the initial temperature sequence is divided into multiple subsequences; the initial volatility of the subsequences is calculated, and the initial volatility is corrected to obtain the optimal volatility; the preset process noise covariance is corrected using the optimal volatility to obtain the adaptive process noise covariance.
[0010] This scheme can adaptively adjust the process noise covariance according to the fluctuation characteristics of the initial temperature data, so that the filter can respond and track the real changes more quickly, improve the denoising effect of the filter, and facilitate the monitoring of the temperature of frozen food.
[0011] Preferably, the temperature monitoring method also includes: calculating the adaptive measurement noise covariance in the Kalman filter algorithm, and the method for calculating the adaptive measurement noise covariance is: calculating the initial noise level of the subsequence, correcting the initial noise level to obtain the optimal noise level; using the optimal noise level to correct the preset measurement noise covariance to obtain the adaptive measurement noise covariance.
[0012] According to the initial noise level of the calculation subsequence, the measurement noise covariance is adjusted so that the filter can make an objective judgment between the measured value and the predicted value, thereby achieving the purpose of accurately suppressing noise and improving the accuracy of filtering denoising.
[0013] Preferably, the initial noise level is calculated by performing first-order differences on adjacent data in the subsequence to obtain a plurality of difference values, wherein the plurality of difference values constitute a difference value set. The initial noise level is expressed as follows:
[0014]
[0015] Where, represents the initial noise level of the subsequence, represents the median, and {d} represents the difference set.
[0016] By quantifying the initial noise level of the subsequence, we can understand the content of subsequence noise data and the impact of noise data on real data, providing a theoretical basis for calculating adaptive measurement noise covariance.
[0017] Preferably, the variance of the subsequence is taken as the initial volatility of the subsequence.
[0018] Preferably, the temperature monitoring method further includes: for each initial temperature data in the subsequence, extending a certain unit length in the left and right directions to construct a window, taking the mean of the data points in the window as the reference data of the corresponding initial temperature data, taking the difference between the initial temperature data and the reference data as the residual of the initial temperature data, and using the obtained multiple residuals to construct a residual sequence {R}.
[0019] Preferably, the method for correcting the initial volatility and initial noise level is: and Perform an iterative loop, in the kth iterative loop:
[0020] , Where, represents the initial volatility at the kth iteration cycle, 、 They represent the initial noise levels at the kth and k-1th iteration cycles, respectively. represents the median, {R} represents the residual sequence, Indicated by The sequence of components; constructing feature vectors, , Represents the eigenvector of the k-th iteration loop; calculate the eigenvector and When the difference is less than the preset threshold or the number of iterations is greater than the maximum number, the iterative loop is stopped, and the initial volatility when the iterative loop is stopped is taken as the optimal volatility, and the initial noise level when the iterative loop is stopped is taken as the optimal noise level.
[0021] By correcting the initial volatility and initial noise level, the influence of noise data on the true volatility of initial temperature data and the influence of the volatility of initial temperature data on noise data are reduced, thereby improving the accuracy of the calculation results of the optimal noise level and optimal volatility.
[0022] Preferably, the expression of the adaptive process noise covariance is:
[0023]
[0024] Where, represents the adaptive process noise covariance when denoising the mth subsequence, Q represents the preset process noise covariance, α represents the preset first scaling factor, represents the optimal volatility of the mth subsequence.
[0025] Preferably, the expression of the adaptive measurement noise covariance is:
[0026]
[0027] Where, represents the adaptive measurement noise covariance when denoising the mth subsequence, R represents the preset measurement noise covariance, β represents the preset second scaling factor, represents the optimal noise level of the mth subsequence.
[0028] Preferably, the method for dividing the initial temperature sequence into multiple subsequences is: using the PELT algorithm to perform change point detection on the initial temperature sequence to obtain multiple change points, and using the obtained multiple change points to divide the initial temperature sequence into multiple subsequences.
[0029] The initial temperature sequence is divided into multiple subsequences to achieve classification of the initial temperature sequence, thereby adaptively filtering each subsequence in a targeted manner and improving the filtering effect.
[0030] In a second aspect, the present invention provides a temperature monitoring system for frozen food, which adopts the following technical solution:
[0031] A system for monitoring the temperature of frozen food comprises a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for monitoring the temperature of frozen food is implemented.
[0032] The above-mentioned method for monitoring the temperature of frozen food is generated into a computer program and stored in a memory so as to be loaded and executed by a processor. Thus, a system is made based on the memory and the processor for easy use.
[0033] The present invention has the following technical effects:
[0034] 1. This scheme can adaptively adjust the process noise covariance according to the fluctuation characteristics of the initial temperature data, so that the filter can respond and track the real changes more quickly, improve the denoising effect of the filter, and facilitate the monitoring of the temperature of frozen food.
[0035] 2. According to the initial noise level of the calculation subsequence, the measurement noise covariance is adjusted so that the filter can make an objective judgment between the measured value and the predicted value, thereby achieving the purpose of accurately suppressing noise and improving the accuracy of the filtering and denoising results of the initial temperature data. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 The present invention is a flow chart of a method for monitoring the temperature of frozen food. DETAILED DESCRIPTION
[0037] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0038] The embodiment of the present invention discloses a method for monitoring the temperature of frozen food. Figure 1 , including the following steps, as follows:
[0039] S1: Get initial temperature data.
[0040] Temperature sensors are installed at multiple locations in the frozen food warehouse to collect initial temperature data at different locations in the warehouse. The temperature sensors are located below the upper surface of the frozen food so that the temperature data collected by the temperature sensors can reflect the ambient temperature of the frozen food. The sensor collection frequency is 2 seconds per time. Each sensor corresponds to an initial temperature sequence. The initial temperature sequence is the initial temperature data at different times in the current time period, and the initial temperature data is arranged in chronological order. The accuracy of the initial temperature data is one decimal place.
[0041] S2: Divide the initial temperature sequence into multiple subsequences.
[0042] The PELT algorithm is used to detect the change points of the initial temperature sequence to obtain multiple change points. The initial temperature sequence is divided into multiple subsequences using the obtained multiple change points. When dividing the subsequences, the change point is used as the first data point of the subsequence.
[0043] S3: Calculate the initial volatility and initial noise level of the subsequence.
[0044] S31: Calculate the initial noise level of the subsequence.
[0045] Perform first-order differences on adjacent data in a subsequence to obtain multiple differences, which constitute a difference set. The difference expression is:
[0046]
[0047] Where, represents the i-th difference, represents the i-th initial temperature data in the subsequence, Indicates the i-1th initial temperature data in the subsequence, and the obtained 、 、 、…… The difference value set {d} is formed. It can be understood that the difference value reflects the change of two adjacent initial temperature data in the subsequence.
[0048] The expression of the initial noise level is:
[0049]
[0050] Where, represents the initial noise level of the subsequence, represents the median, and {d} represents the difference set. It can represent the overall changes in the data points in the difference set. If the value of MNL is larger, it means that the change of the initial temperature data in the corresponding subsequence is more drastic. In practice, the change of the initial temperature data should be stable. Drastic changes indicate that the subsequence contains more noise data, which leads to drastic changes in the initial temperature data.
[0051] S32: Calculate the initial volatility of the subsequence.
[0052] In each subsequence, the variance of the subsequence is calculated. A higher variance indicates that the initial volatility of the data points in the subsequence is greater. Therefore, the variance is taken as the initial volatility of the subsequence. , It consists of the true process variance and the measurement noise variance, that is, , represents the initial volatility of the subsequence, represents the true process variance, represents the measurement noise variance.
[0053] S4: Modify the initial volatility and initial noise level to obtain the optimal volatility and optimal noise level.
[0054] When a subsequence contains more noise data, the presence of noise data will also increase the initial volatility of the subsequence, so the initial volatility and initial noise level need to be corrected.
[0055] For each initial temperature data in the subsequence, a window is constructed by extending a certain unit length in both the left and right directions, and the mean of the data points in the window is used as the reference data of the corresponding initial temperature data. For example, the length of the window is 5. For the 10th initial temperature data in the subsequence, , extending 2 lengths in both the left and right directions, that is, the data in the window is 、 、 、 、 ,Will 、 、 、 、 The mean of the initial temperature data Reference data It should be noted that, for the initial temperature data at both ends of the subsequence, if the number of initial temperature data in the window is less than 5, the mean of the initial temperature data actually contained in the window is calculated.
[0056] The difference between the initial temperature data and the reference data is taken as the residual of the initial temperature data. It can be understood that each initial temperature data corresponds to a residual, and the obtained multiple residuals are used to construct a residual sequence {R}.
[0057] The initial volatility obtained in step S3 Record , the initial noise level Record ,right and Perform an iterative loop, in the kth iterative loop , , Where, represents the initial volatility at the kth iteration cycle, represents the initial noise level at the kth iteration cycle, represents the median, Indicates greater than The residual, { } indicates that The constructed sequence. It represents the process of stripping the noise component from the total initial volatility to purify the volatility of the real process, where the initial noise level is regarded as matching the dimension of the variance in the form of square. Indicates that after removing normal fluctuations (reflected in the constraints ) The true initial noise level.
[0058] Constructing feature vectors , ;
[0059] Calculate eigenvectors The modulus and eigenvector of When the difference is less than the preset threshold, or the number of iterations is greater than the maximum number, the iteration loop is stopped, and the initial volatility when the iteration loop is stopped is The initial noise level at which the iteration loop will be stopped as the optimal volatility As the optimal noise level, the maximum number of iterations is set manually according to actual conditions. For example, the maximum number of iterations is 50.
[0060] right and The process of performing iterative cycles is the process of purifying the initial volatility and initial noise level, reducing the impact of noise data on the volatility of initial temperature data, and reducing the impact of the volatility of real data on the calculated initial noise level.
[0061] S5: Calculate the adaptive process noise covariance and the adaptive measurement noise covariance in the Kalman filter algorithm, and use the Kalman filter algorithm to denoise the initial temperature sequence to obtain the optimal temperature sequence.
[0062] The expressions of adaptive process noise covariance and adaptive measurement noise covariance are:
[0063]
[0064]
[0065] Where, represents the adaptive process noise covariance when denoising the mth subsequence, Q represents the preset process noise covariance, α represents the preset first scaling factor, represents the optimal volatility of the mth subsequence; represents the adaptive measurement noise covariance when denoising the mth subsequence, R represents the preset measurement noise covariance, β represents the preset second scaling factor, represents the optimal noise level of the mth subsequence. For example, the values of α and β are 1.
[0066] When using the Kalman filter model to denoise the subsequence, if the external disturbance is large, the volatility of the subsequence is large, the true initial temperature data changes dramatically, and the calculated optimal volatility is large, then the process noise covariance should be increased so that the filter can respond and track the true changes faster.
[0067] If the initial noise level of the subsequence is large, the larger the calculated optimal noise level is, the less credible the current measurement value is. The measurement noise covariance should be increased to make the filter more trustworthy in the predicted value, thereby suppressing the noise.
[0068] The Kalman filter model is used to denoise each subsequence in the initial temperature sequence, and the denoised optimal temperature sequence is further obtained. Based on the optimal temperature sequence, the fuzzy PID control algorithm is used to regulate the temperature in the frozen food warehouse for the next time period to ensure the quality of the frozen food. The fuzzy PID control algorithm is an existing technology, and the specific steps are not repeated here.
[0069] An embodiment of the present invention further discloses a frozen food temperature monitoring system, comprising a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a frozen food temperature monitoring method according to the present invention is implemented.
[0070] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.
Claims
1. A method for monitoring the temperature of frozen food, characterized in that: Including steps: Obtain initial temperature data in the frozen food warehouse; Calculating the adaptive process noise covariance and the adaptive measurement noise covariance in the Kalman filter algorithm includes: dividing the initial temperature sequence into a plurality of subsequences; calculating the initial volatility and initial noise level of the subsequences, and correcting the initial volatility and initial noise level to obtain an optimal volatility and an optimal noise level; correcting a preset process noise covariance using the optimal volatility to obtain an adaptive process noise covariance, and correcting a preset measurement noise covariance using the optimal noise level to obtain an adaptive measurement noise covariance; The Kalman filter algorithm is used to denoise the initial temperature sequence to obtain the optimal temperature sequence for controlling the temperature in the frozen food warehouse; The method to correct the initial volatility and initial noise level is: and Perform an iterative loop. In the kth iterative loop, , , Where, is the initial volatility, is the initial noise level, represents the initial volatility at the kth iteration cycle, 、 They represent the initial noise levels at the kth and k-1th iteration cycles, respectively. represents the median, Indicates greater than The residual of {R} represents the residual sequence, { } indicates that The sequence of components; constructing feature vectors, , Represents the eigenvector of the k-th iteration loop; calculate the eigenvector and When the difference is less than the preset threshold or the number of iterations is greater than the maximum number, the iterative loop is stopped, and the initial volatility when the iterative loop is stopped is taken as the optimal volatility, and the initial noise level when the iterative loop is stopped is taken as the optimal noise level.
2. A method for monitoring the temperature of frozen food according to claim 1, characterized in that: The calculation method of the initial noise level is: perform first-order differences on adjacent data in the subsequence to obtain multiple differences, and the multiple differences constitute a difference set. The expression of the initial noise level is: Where, represents the initial noise level of the subsequence, represents the median, and {d} represents the difference set.
3. The method for monitoring the temperature of frozen food according to claim 1, wherein: The variance of the subsequence is taken as the initial volatility of the subsequence.
4. The method for monitoring the temperature of frozen food according to claim 1, wherein: The temperature monitoring method also includes: for each initial temperature data in the subsequence, extending a certain unit length in the left and right directions to construct a window, using the mean of the data points in the window as the reference data of the corresponding initial temperature data, using the difference between the initial temperature data and the reference data as the residual of the initial temperature data, and using the obtained multiple residuals to construct a residual sequence {R}.
5. The method for monitoring the temperature of frozen food according to claim 1, wherein: The expression of adaptive process noise covariance is: Where, represents the adaptive process noise covariance when denoising the mth subsequence, Q represents the preset process noise covariance, α represents the preset first scaling factor, represents the optimal volatility of the mth subsequence.
6. The method for monitoring the temperature of frozen food according to claim 1, wherein: The expression of adaptive measurement noise covariance is: Where, represents the adaptive measurement noise covariance when denoising the mth subsequence, R represents the preset measurement noise covariance, β represents the preset second scaling factor, represents the optimal noise level of the mth subsequence.
7. The method for monitoring the temperature of frozen food according to claim 1, wherein: The method for dividing the initial temperature sequence into multiple subsequences is: using the PELT algorithm to perform change point detection on the initial temperature sequence to obtain multiple change points, and using the obtained multiple change points to divide the initial temperature sequence into multiple subsequences.
8. A temperature monitoring system for frozen food, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a method for monitoring the temperature of frozen food according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Temperature monitoring system and temperature monitoring method for water jacket heating furnace
CN119538165B
Self-adaptive online filtering method
CN107169478A
Bank storehouse intelligent monitoring system
CN116629746A