Next Article in Journal
Cement Pastes with Hygroscopic Polymeric Additions for Potential Building Applications
Next Article in Special Issue
Design and Application of New Aeration Device Based on Recirculating Aquaculture System
Previous Article in Journal
Comparison of Unsteady Low- and Mid-Fidelity Propeller Aerodynamic Methods for Whirl Flutter Applications
Previous Article in Special Issue
A Simulation Method for Layered Filling of Grain Piles Based on the Discrete Element Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Temperature Prediction of a Temperature-Controlled Container with Cold Energy Storage System Based on Long Short-Term Memory Neural Network

1
College of Engineering, South China Agricultural University, Guangzhou 510642, China
2
Key Laboratory of Key Technology of Southern Agricultural Machinery and Equipment, Ministry of Education, South China Agricultural University, Guangzhou 510642, China
3
Maoming Branch Center of Lingnan Modern Agricultural Science and Technology Guangdong Laboratory, Maoming 525000, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(2), 854; https://doi.org/10.3390/app14020854
Submission received: 11 December 2023 / Revised: 12 January 2024 / Accepted: 13 January 2024 / Published: 19 January 2024
(This article belongs to the Special Issue State-of-the-Art Agricultural Science and Technology in China)

Abstract

:
Temperature prediction is important for controlling the environment in the preservation of fresh products. The phase change materials for cold storage make the heat transfer process complex, and the use of physical models for characterization and temperature prediction can be challenging. In order to predict the variation of the thermal environment in a temperature-controlled container with a cold energy storage system, we propose an LSTM model based on historical temperature data in which the trends of temperature variations of the fresh-keeping area, the phase change material (PCM), and the fresh products can be predicted immediately without considering the complex heat transfer process. An experimental platform of a temperature-controlled container with a cold energy storage system is built to obtain the experimental data for the prediction model’s construction and validation. The prediction results based on the LSTM model are compared to the results of a physical model. In order to optimize the input data for better prediction performance, the proportion of input samples from the dataset is set to 80%, 50%, 20%, and 10%. The prediction results from different input groups are compared and analyzed. The results show that the LSTM model is able to accurately predict temperature variations of the fresh-keeping area and products, and the predicted values are in agreement with the actual values. The LSTM-based prediction model has a higher accuracy compared to the physical-based prediction model; the RMSE, MAE, and MAPE are 0.105, 0.103, and 0.010, respectively, and the relative error for the prediction of effective control hours of environmental temperature is 0.92%. It is suggested to use the initial 20% of the historical temperature data as the input to predict the future temperature variation for better prediction performance. The results of this paper offer valuable insights for accurate temperature prediction in the fresh-keeping environment with a cold energy storage system.

1. Introduction

Cryogenic storage and transportation are considered the most effective methods for maintaining the freshness of fruits and vegetables through temperature control [1]. However, as energy deficiency and carbon emission regulations become increasingly stringent [2], the running cost of the cryogenic storage and transportation facility is rapidly growing [3]. Cold storage technology allows for the storage of cold in phase change material (PCM) at midnight [4,5], taking advantage of lower-priced electric power [6]. This facilitates energy shifting, helping to fill in demand valleys, reduce peak load, and lower grid costs. Thus, cold storage technology can be used to improve the temperature control of cryogenic storage and transportation facilities; it can not only reduce the running cost but also help maintain quality by reducing temperature fluctuations in the storage or transport process, effectively reducing the loss of fresh products [4].
Temperature control is crucial for maintaining the quality of fruits and vegetables during storage and transportation [7]. Accurate temperature prediction can enhance the operation of intelligent temperature control systems [8], thereby improving system efficiency. Numerous studies are addressing this issue. Laguerre et al. predicted temperature variations at different locations of a phase change refrigeration holding tank by developing a one-dimensional analytical model [9,10,11]. Choi et al. developed a packaging structure thermal resistance calculation model for predicting refrigerant mass calculations [12,13].
Temperature prediction in cold energy storage facilities is challenging because the thermal characteristics of the PCM are complex during the cold energy release process, which is also coupled with the ambient environment and the products [14]. On the other hand, describing the heat transfer process and making temperature predictions for a cold energy storage system through physical modeling can be difficult to achieve due to the phase transition and complex heat transfer process of PCM.
An intelligent prediction method can compensate for the limitations of mathematical methods, which often struggle with parameter fitting due to the complexity of the mechanisms [15]. Moreover, using neural network models to predict the temperature of complex heat transfer systems can simplify the prediction process and obtain temperature prediction results without considering the specific heat transfer behavior of complex systems.
In recent years, neural network methods have been widely used in research on temperature variation prediction. Peter et al. [16] predicted the thermal efficiency of a novel straight-through evacuated tube collector using a neural network model; several artificial neural network techniques were proposed to predict the thermal performance of an all-glass, straight-through evacuated tube solar collector. Their research shows that the relative error between the radial basis function (RBF) model and the actual value is the smallest, followed by the propagation (BP) model and support vector regression (SVR) model, with R2 values of 0.9658, 0.9059, and 0.8447, in that order, which also means that these models can match the experimental data well. Moon et al. [17] developed an artificial neural network (ANN) model to determine the required time for increasing the current indoor temperature to the setback temperature. In addition, the effect of different parameters on the prediction performance was discussed. The optimal number of hidden layers, the optimal number of hidden neurons, the learning rate, and the moments were 1, 7, 0.6, and 0.7, respectively, and the R2 of the prediction using the ANN model was more than 0.9 after parameter optimization.
Long short-term memory (LSTM) [18], proposed by Hochreiter and Schmidhuber in 1997, is a type of recurrent neural network (RNN) composed of memory cells and control units. It is designed to predict future data changes by extracting historical features from time-series data, making it well suited for time-series data processing. Chen et al. [19] constructed an LSTM-based deep learning network to predict the temperature state of the integrated RF module. They fine-tuned the parameters to analyze the error curves between the predicted and observed values. In this research, the effects of the initial learning rate and max epochs on the training time and prediction accuracy are discussed. When the initial learning rate is 0.0001 and the max epochs is 60, the training time of the model is 3 min and 7 s, but the error does not tend to converge until after 50 epochs of training, and the final predicted value differs significantly from the actual value, with an RMSE of 0.00225. When the learning rate is increased to 0.0005 and the max epochs is 120, the training time of the model exceeds the original for 6 min and 34 s. However, the error converges sufficiently, and the accuracy of the predicted value can reach up to 98.7%, which also indicates that the initial learning rate and max epochs are important elements affecting the convergence of the error, the training time, and the prediction accuracy. Lei et al. [20] built a self-supervised deep long short-term memory (SSDLSTM) network for real-time monitoring of pot temperature in electrolysis production in the aluminum processing industry with high accuracy and robustness. In addition, the prediction accuracy and training time of this model are more competitive than traditional LSTM models and other RNN models. Xu et al. [21] built a model based on an LSTM deep learning network to predict the indoor temperatures of a building. Their results show that the modified model of LSTM is able to maintain the highest accuracy in both single time-step-ahead prediction and multiple time-step-ahead prediction compared to BPNN, SVW and DT, which also means that the modified LSTM model is more capable of reducing the relative error in the prediction of indoor temperatures than the traditional neural network model. Hoang et al. [22] developed four different types of LSTM models to predict the change in the temperature demand of air and fresh products when applying the demand response in a cold room. Their study shows that using a small amount of data can also maintain a low relative error in temperature prediction as well as reduce the time needed for training if the temporal characteristics of the dataset are regular enough. Meanwhile, the convolutional LSTM model and bidirectional LSTM model are more susceptible to noise than the traditional LSTM model and stacked LSTM model, which means that the reasonable location of the data collection will be important for the improvement of their prediction accuracy. The use of LSTM models in all the above studies has relatively promising results, and it can be used to predict the temperature variation in the temperature-controlled container with a cold energy storage system [23].
In summary, LSTM neural networks have been widely used for temperature prediction in the complex thermal environment. In this paper, a temperature prediction model based on an LSTM neural network is developed to predict and analyze the temperature variation in the temperature-controlled container. The results of this paper will be helpful for temperature control in the fresh-keeping environment with a cold energy storage system.

2. Materials and Methods

The temperature-controlled container with a cold energy storage system developed by South China Agricultural University (Guangzhou, China) is shown in Figure 1, and the specific dimensions of the container are shown in Table 1. The container is mainly composed of a cold storage area, fresh-keeping area, circulating duct, and fan. The construction material of the container is mainly glass fiber reinforced plastic (GFRP). The insulation layer consists of vacuum insulation board (VIP) and polyurethane (PU), and the properties of the materials are shown in Table 2. The airflow in the container is driven by the fans (0.13 m × 0.13 m, DC, 24 V, 0.7 A), and for the adjustment of the control system, the airflow speed when the fan is activated is standardized to 4.4 m/s. Due to the airflow circuit between the cold storage area and the freshness preservation area, the cold energy released from the PCM is continuously transported to the fresh-keeping area in order to maintain a low-temperature environment of 2–8 °C.
A prototype based on the temperature-controlled container with a cold energy storage system was built and is shown in Figure 2 with a basket of fresh products, a paperless recorder, and 14 PT100 sensors.
The temperatures of the air inlet and outlet, the center and the surface of the cold storage plate, the fresh-keeping area, the external environment, and the fresh products were collected using PT100 sensors (adhesive-type Class A, accuracy ± 0.15, temperature range −60~180 °C), which were connected to a paperless recorder (SIN-R9600, accuracy 2%, Hangzhou Lianmei Automation Technology Co., Ltd., Hangzhou, China). The air inlet velocity was measured at five different points using an anemometer (model Testo410i, range 0.4~30 m/s, accuracy ± (0.2 m/s + 2% of the measured value)), and the average value was taken.
The cold storage plates were made of 2 mm thick aluminum alloy (outer dimensions: 1 m × 0.04 m × 0.2 m) and are shown in Figure 3 with a 3 cm filling port on the top, which is used for the water injection (5 kg of water per plate), and a PT100 sensor was placed in the center of the cold storage plates to measure the PCM temperature.
To effectively utilize the results, the temperature at a representative point is often adopted to represent the overall temperature of the cold storage area. Therefore, only the temperatures of two pieces of the cold storage plates shown using the red points in Figure 2 were selected and averaged, and this value was used as the temperature representative point for the real-time status of all the cold storage plates. One and two PT100 sensors were arranged in the center and outer surface of each plate to measure its center and surface temperatures, respectively. The material physical parameters of the PCM (water) and the cold storage plates are shown in Table 3.
The temperature-controlled container with a cold energy storage system was placed in an open and unobstructed outdoor environment for the test, and the air velocity of the fan was 4.4 m/s. Before the test, the cold storage plates were placed in a freezer (−20 °C) to be frozen. Sixteen cold storage plates (containing a total of 80 kg of PCM) were moved to the cold storage area, and a basket (mesh structure with an outer dimension of 0.59 m × 0.415 m × 0.34 m) of 40 kg fresh navel oranges was placed in the fresh-keeping area. The test was started after the door of the container was closed, and the initial temperature at the center of the cold storage plates was −8 °C. The temperature control range of the outlet temperature from the cold storage area was set at 5~10 °C, which was reported as the best fresh-keeping temperature for navel oranges [24], and the fan was turned off when the outlet temperature from the cold storage area dropped to 5 °C and was turned on when it rose to 10 °C. The test was completed when the value of the temperature at the center of the cold storage plates (PCM) rose to 10 °C.
The temperature at the air inlet and outlet: 2 PT100 sensors were placed at the air inlet and outlet (one near the outlet fan and one near the inlet fan) to measure the air temperature at the air inlet and outlet.
Ambient temperature in the fresh-keeping area: 2 PT100 sensors were placed in the fresh-keeping area to measure the ambient air temperature.
Fresh products temperature: 2 PT100 sensors were placed at the center of the navel oranges to measure their temperature.
Surface temperature of cold storage plates: 2 PT100 sensors were placed on the outer surface of the cold storage plates.
Center temperature of cold storage plates: 2 PT100 sensors were placed at the center of the cold storage plates.
The distribution of each temperature monitoring point is shown in Figure 4, and the average of the above sensors was taken as the final value.

3. Physical Modelling of Heat Transfer

In order to verify the accuracy of the LSTM model, the prediction results of the LSTM model were compared with the physical model. This physical model is a differential format based on mathematical derivation with heat balance theory [25], and the accuracy of this model depends on the variation of heat flow inside and outside the container, as shown in Figure 5.
The amount of instant cold released from the cold storage plates is represented by the following equation:
Q g = A K   ( T a T s )
where Qg is the instant cold released from the cold storage plates, W; A is the heat transfer area on the cold storage plates, m2; K is the surface convection heat transfer coefficient of the cold storage plates, W/(m2·°C); Ta is the average temperature in the cold storage area, °C, and is equal to the average of the inlet and outlet temperatures; and TS is the surface temperature of the cold storage plates, °C.
The heat transfer is driven by the temperature difference between the inside and outside of the insulation surface and can be represented by the following equations [26,27]:
Q 2 = A w k w   ( T w T n )
k w = 1 R w
R w = 1 a 1 + 1 a 2 + x i λ i
a = 1.1634   ( 4 + 12 v )
A w = A 1 A 2 .
In the formula, Q2 is the heat transferred due to the temperature difference between the inside and outside of the insulation surface, W; kw is the equivalent transfer coefficient for the whole container, W/(m2·°C); Tw is the temperature outside the container, °C; Tn is the temperature inside the container, °C; Aw is the heat transfer area of the container, m2; Rw is the thermal resistance of the container, (m2·°C)/W; a1 is the heat transfer coefficient of the outside surface of the container, W/(m2·°C); a2 is the heat transfer coefficient of the inner surface of the container, W/(m2·°C); xi is the thickness of each layer of insulation material, m; λi is the thermal conductivity of each layer of insulation material, W/(m2·°C); a is the coefficient of convective heat transfer between the insulation surface and the air, W/(m2·°C); v is the speed of air flow in the container, m/s; A1 is the total external surface area of the temperature-controlled container, m2; and A2 is the total internal surface area of the container, m2.
Q 3 = f Q 2
Q 4 = A 3 k w   ( T r T w ) τ r 24
Q 5 = p ψ ε 24
In the formula, Q3 is the thermal load from the gap leakage, W; f is the air leakage coefficient of the container and can be between 0.1 and 0.2 based on the airtightness of the container [28], 0.1; Q4 is the thermal load for solar radiation, W; A3 is the area exposed to solar radiation (generally, between 30% and 50% of the total area is chosen; we chose 50%), m2; Tr is the temperature of the surface exposed to solar radiation (Tr = Tw + 20), ℃; τf is the time of solar radiation per day and night, h; Q5 is the heat from the fan operation, W; p is the rated power of the fan, W; ψ is the coefficient of thermal conversion, 1; and ε is the coefficient of fan operation time [29], 19 h.
Q 6 = m i q i τ i 24
Q 7 = c c m c   ( T c T d ) / t 1
where Q6 is the respiratory heat of the navel oranges in the container, W; mii is the mass of the navel oranges in the container, kg; qi is the respiratory heat flux of the navel oranges in the container [30], 0.15 W/kg; τi is the time for the navel oranges to emit respiratory heat in the container [31], 24 h; Q7 is the thermal consumption of the navel oranges in the container, W; cc is the specific heat capacity of the navel oranges, 3.24 kJ/(kg·°C); mc is the mass of the navel oranges, kg; Tc is the initial temperature of the oranges, °C; Td is the temperature of the navel oranges at the end of the test, °C; and t1 is the time in whole tests.
Q 8 = n   ( Q 2 + Q 3 + Q 4 )
where Q8 is the thermal load of the opening and closing of the container door, W; n is the frequency coefficient of the opening of the door, 0.5 (open the door 0 times for 0.25; open the door 1 to 5 times for 0.5; open the door 6 to 10 times for 0.75; and open the door 11 to 15 times for 1).
The heat balance dynamic equation for the air-cooling process in the holding tank is shown below:
c a m a d T n d t = K A   ( T a T s ) Q 2 Q 3 Q 4 Q 5 Q 6 Q 8 K 2 A 4   ( T n T c )
where ca is the specific heat capacity of air, J/(kg·°C); ma is the mass of air, kg; t is the time, s; K2 is the heat transfer coefficient between the navel oranges and the air, W/(m2·°C); and A4 is the heat transfer area between the navel oranges and the air [32], m2.
The backward difference method, which specifies a 1 s time interval, was adopted [25] and then solved to show the temperature variation in the fresh-keeping area.
T n = c a m a T n   ( t 1 ) + K A T s   ( t 1 ) + ( 1 + f ) A w k w T w   ( t 1 ) + Q 4 + Q 5 + Q 6 + Q 8 + K 2 A 4 T c   ( t 1 ) c a m a + K A + ( 1 + f ) A w k w + K 2 A 4

4. LSTM Neural Network Model

4.1. Principle of LSTM Model

A typical LSTM cell is shown in Figure 6, where and denote multiplication and addition, respectively, by bits, xt is the input parameter at moment t, ct is the output parameter from the memory cell at moment t, ht is the output parameter of the control cell at moment t, ct−1 is the memorized information of the previous moment, ft is the probability that ct− is forgotten, it is the probability that the candidate valuegenerated from the activation function tanh xenters the memory cell, c ^ t is the memory candidate value after the current data were transformed, and ot is the probability that the current data become the output data. The output parameter ht is not only related to the input xt but also to the previously remembered information ct−1, and the new input xt will also prompt the memory cells to generate updates that are carried forward [20]. The output of the implicit layer is mapped using the function of the output layer to obtain the predicted value of the temperature.
The calculation formulas for the LSTM model are shown as follows:
f t = σ W f h t 1 , x t + b f   i t = σ W i h t 1 , x t + b i   o t = σ W o h t 1 , x t + b o   h t = o t tanh c t   c t = F t c t 1 + i t c t   c t = tanh W c h t 1 , x t + b c  
where Wf, Wi, Wo, and Wc are the parameter matrices to be trained and bf, bi, bo and bc are the bias terms to be trained.

4.2. Predictive Model Construction and Parameter Settings

On the basis of the historical temperature data, the LSTM was used to predict the temperature inside the temperature-controlled container with a cold energy storage system. Initially, 62.95 h (226,604 s) was used as the sample for the dataset, the initial 80% of the dataset was used as the training set for training and model optimization, and the spare 20% of the data were used as the test set to evaluate the generalization and prediction accuracy of the LSTM model; the normalization process was carried out before inputting the data into the model to achieve a better prediction by continuously fine-tuning the parameters and decreasing the error [33].
The input layer contained 181,267 neurons, the output layer contained 45,317 neurons, and the hidden layer contained 2 LSTM layers with 32 neurons in each layer. The Adam optimization algorithm with a mean square error loss function (MSE) was adopted, the learning rate was set to 0.01, the sample was trained 100 times, the batch size (the number of samples selected for one training) was 19, and the temperature data from the initial 19 s were used in each step to predict the temperature data for the next 1 s [34].

4.3. Model Assessment

In order to evaluate the prediction accuracy of the model and facilitate the comparison and optimization of the model, the root mean square error (RMSE), mean absolute error (MAE), mean percentage error (MAPE) [35], and the coefficient of determination (R2) were selected as the evaluation indexes to evaluate the accuracy of the model prediction [36]. The smaller the values of the RMSE, MAE, and MAPE, the smaller the deviation of the model prediction value compared to the real value; the closer R2 is to 1, the greater the goodness-of-fit, which corresponds to a better model prediction performance. The specific calculation formulas are as follows:
R M S E = 1 N i = 1 N     ( y ^ i y i ) 2
M A E = 1 N i = 1 N | y i y ¯ i |
M A P E = 1 N i = 1 N   | y i y ¯ i | y i
R 2 = 1 i = 1 N   | y i y ¯ i | 2 i = 1 N   | y i ¯ y ¯ i | 2
where N is the number of data points in the dataset, y i is the actual value of temperature, y ^ i is the predicted value of temperature, and y ¯ i is the mean of the true values.

5. Results and Analyses

5.1. Experimental Results

The average outdoor ambient temperature during the test was 24.5 °C. The temperature variation with time at each monitoring point is shown in Figure 7. The test was conducted for 62.95 h. At the beginning, due to the large temperature difference between the initial ambient environment and the cold storage plate, the temperature of the inlet, outlet, fresh-keeping area, and fresh products dropped rapidly under the work of the cold storage system, and it took 12.51 h for the navel oranges to be cooled down from the initial temperature to the target temperature of 10 °C. This also means that the fresh product was maintained at a lower temperature for the majority of the experiment. The temperature-controlled interval of the outlet temperature (5~10 °C) lasted 50.44 h. The average temperature of the fresh-keeping area within the temperature-controlled interval was 8.5 °C, and the average temperature of the products was 8.3 °C, which suggests that the retention and release rates of cold energy from the PCM allowed the temperature of the holding area to be maintained in a suitable range for a long period. The center temperature of the cold storage plates was maintained near the theoretical temperature of 0 °C (−2~2 °C interval) for 46.07 h, which accounted for 73.2% of the total test duration, reflecting the fact that the cold energy is mainly stored as the latent heat of the phase change material [37]. After 46.07 h, the temperature at the center of the plate rose faster because the PCM had ended the phase transition process, and the value of the difference between its temperature and the ambient temperature was greater than 8 °C, which formed a higher heat transfer rate. The temperature curves of the other monitoring points changed smoothly because the temperature difference between them and the environment was relatively small, and there was not a high rate of heat exchange. The fan was activated 88 times (9.06–45.71 h) during the test. The slight discrepancy observed between the center and surface temperatures of the cold storage plates during the test could be attributed to the uniform temperature distribution of the phase change material (PCM) during the phase transition, resulting in a surface temperature measurement that closely approximates the center temperature.

5.2. LSTM-Based Benchmark Model Results

The LSTM neural network model was built and trained on the PyTorch 1.3 platform to predict the temperature in the fresh-keeping area. The prediction results and training results of the LSTM-based temperature prediction model are shown in Figure 8 and Figure 9, respectively. The training results show that the LSTM model was able to accurately track the changes between the upper and lower limits of the temperature and predict the future temperature; on the other hand, the predicted values were in agreement with the actual values.

5.3. Comparison of Predicted Results

As shown in Figure 10 and Table 4, the RMSM, MAE, MAPE, and R2 of the temperature prediction results based on the LSTM model were 0.105, 0.103, 0.010, and 0.988, respectively. In addition, the RMSM, MAE, MAPE, and R2 of the temperature prediction results based on the physical model were 3.857, 2.554, 0.258 and 0.346, respectively. The accuracy of the temperature prediction model based on the LSTM was significantly higher than that of the physical model; the RMSE, MAE, and MAPE were reduced by 3.752, 2.451, and 0.248, respectively, the R2 improved by 0.642, and the relative error in predicting the moment of CCB (cold chain breaking, which means the value of temperature rises to an unsuitable range for freshness) was reduced by 3.92%. The predicted temperature trend based on the LSTM model closely matched the actual temperature changes, indicating that the LSTM model is more adept at forecasting time-series ambient temperature fluctuations than the physical model of the temperature-controlled container. In addition, the physical model describes changes in heat transfer, but hardly for more in-depth explanations, such as the effect on temperature of some factors like the direction of airflow in the interior and the complex changes in the rate of cold energy release during phase transitions, which may be some of the reasons for the difference between the actual value and the predicted value.

6. Model Optimization

To maintain the model’s predictive accuracy while enhancing its practicality, the number and structure of the inputs and outputs were optimized. This not only allows for more precise future predictions of the CCB but also reduces the model’s training time and improves its generalizability [38]. The initial 80%, 50%, 20%, and 10% of the samples were configured as training sets, and the corresponding training and prediction results are shown in Figure 11 and Table 5. It can be seen that the accuracy of the prediction results of the different methods with the training set of the initial 80%, 50%, and 20% are similar, indicating that there is no need to have a training set consisting of too many samples if the characteristics of the time series are regular. The training time of the model decreases significantly with a reduction in samples in the training set, but the prediction accuracy, R2, decreases significantly only when the number of samples in the training set is the initial 10%. Using the initial 20% of the historical temperature data to predict the future 80% of the temperature data is the most practical approach; the training time and R2 are 932 s (15.5 min) and 0.997, respectively.

7. Applications of the Model

The LSTM model was employed to accurately capture the temperature fluctuations at the cold energy storage source, the surface of the cold storage plates, the fresh products, and the air inlet and outlet of the container. It predicts the temperature changes at these locations, offers valuable insights into the timely replacement of cold storage plates, monitors the status of the CCB during transport, and ensures optimal temperatures are maintained in the fresh-keeping area.
The training set of the model was set to the initial 80% of the samples, and the value of the CCB temperature of the PCM and fresh products was set to 5 °C and 10 °C, respectively. The training and prediction results are shown in Figure 12a–e and Table 6. As shown in Figure 12, the predicted temperature variations are all in agreement with the actual values. As shown in Table 6, the relative errors in predicting the status of CCB in cold energy storage sources and fresh products are 1.05% and 0.45%, respectively, indicating that the LSTM model can accurately predict the status of CCB. In addition, the RMSE and MAE of the temperatures of the fresh products, inlet, outlet, and surface of cold storage plates are all below 1.000, the MAPE is below 0.1000, and the R2 of the temperatures of the fresh products, inlet, and outlet are slightly higher, with values exceeding 0.9400, which indicates that the LSTM model accurately predicts the temperatures of the fresh products, inlet, outlet, and the surface of cold storage plates.
One of the reasons for the low R2 of the temperature prediction of the cold energy storage source and surface was that the temperature data in the training set were maintained near the phase change temperature of 0 °C for a long time, and the increasing trends were not obvious, resulting in the predicted values in the test set not rising as drastically as the actual values.

8. Conclusions

This study was based on the temperature monitoring data from a temperature-controlled container with a cold energy storage system. A long short-term memory network (LSTM) temperature prediction model was built and compared with the physical model. After that, the dataset for training was optimized to achieve a more accurate prediction of the temperature in the container, and the conclusions were drawn as follows.
Compared with the physical model, the LSTM model predicted the trend with higher accuracy, the RMSE, MAE, and MAPE were reduced by 3.752, 2.451, and 0.248, respectively, the R2 improved by 0.642, and the relative error in predicting the status of the CCB (cold chain breaking) temperature was reduced by 3.92%.
The optimization results of the model dataset for the temperature prediction in the fresh-keeping environment showed that it is recommended to use the initial 20% of the historical temperature data to predict the future 80% of the temperature data, with a training elapsed time and R2 of 15.5 min and 0.997, respectively.
The LSTM model was able to achieve accurate predictions of the status of CCB for PCM in the cold storage plates and the fresh products with a relative error of 1.05% and 0.45%, respectively.
The above shows that the temperature prediction of temperature-controlled containers with a cold storage system using an LSTM model has high accuracy. However, there are still points that need to be improved. The LSTM model is not adept at handling a long series of data; the prediction accuracy of the LSTM model is affected when the time demand for temperature prediction is long. In addition, if it is possible to select the training set separately according to the phase transition phase and the non-phase transition phase, then this will be beneficial in improving the accuracy of the temperature prediction and reduce the training time. Finally, it is worthwhile to test different neural network models for temperature prediction because more efficient neural networks perform better in applications.

Author Contributions

Conceptualization, J.G. and S.L.; methodology, S.L.; software, S.L.; validation, J.L.; formal analysis, J.G.; investigation, S.L., J.L. and D.L.; resources, W.Z. and J.G.; data curation, D.L.; writing—original draft preparation, D.L.; writing—review and editing, J.G.; visualization, D.L.; supervision, J.G.; project administration, W.Z.; funding acquisition, W.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Guangdong Province 2019 Provincial Agricultural Science and Technology Innovation and Extension Project, grant number 2023KJ101; the Innovative Team for Common Key Technology Research and Development of Agricultural Product Freshness and Logistics, grant number 2023KJ145; the National Science Foundation of China, grant numbers 31901736 and 31971806; the Maoming Laboratory Autonomous Scientific Research Project, grant number 2021ZZ003; the Natural Science Foundation of Guangdong Province, grant number 2020A1515010967; and topics of R&D in Key Areas of Guangzhou Municipality, grant number 2023B01J2001.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author. The data are not publicly available due to Policy and non-disclosure agreement.

Acknowledgments

The authors would like to express their appreciation for the valuable suggestions and support of Qunyu Shen and Xiaodan Zhang.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Rinaldi, M.M.; Dianese, A.D.C.; Costa, A.M.; Assis, D.F.O.S.; Oliveira, T.A.R.; Assis, S.F.O. Post-harvest conservation of Passiflora alata fruits under ambient and refrigerated condition. Food Sci. Technol. 2019, 39, 889–896. [Google Scholar] [CrossRef]
  2. Naeem, M.A.; Appiah, M.; Taden, J.; Amoasi, R.; Gyamfi, B.A. Transitioning to clean energy: Assessing the impact of renewable energy, bio-capacity and access to clean fuel on carbon emissions in OECD economies. Energy Econ. 2023, 127, 107091. [Google Scholar] [CrossRef]
  3. Qi, T.T.; Ji, J.; Zhang, X.L.; Liu, L.; Xu, X.H.; Ma, K.L.; Gao, Y.T. Research progress of cold chain transport technology for storage fruits and vegetables. J. Energy Storage 2022, 56, 105958. [Google Scholar] [CrossRef]
  4. Li, B.; Guo, J.; Xia, J.; Wei, X.; Shen, H.; Cao, Y.; Lu, H.Z.; Lv, E.L. Temperature Distribution in Insulated Temperature-Controlled Container by Numerical Simulation. Energies 2020, 13, 4765. [Google Scholar] [CrossRef]
  5. Veerakumar, C.; Sreekumar, A. Phase change material based cold thermal energy storage: Materials, techniques and applications: A review. Int. J. Refrig. 2016, 67, 271–289. [Google Scholar] [CrossRef]
  6. Wu, Y.C.; Shi, J.J.; Wang, H.G.; Da, Z.J.; Dai, H.L. Future prospects for refining industry in the era of “carbon peak and carbon neutralization”. Pet. Process. Petrochem. 2022, 53, 1–6. [Google Scholar]
  7. Lv, E.L.; Sheng, H.; Liu, Y.H.; Li, B.; Wu, J.X.; Yang, X.T.; Guo, J.M. Modeling and validation of heat transfer for vacuum thermal insulation and cold storage in a cold storage container. Trans. Chin. Soc. Agric. Eng. 2020, 36, 300–306. [Google Scholar]
  8. Dear, D.R.J.; Akimoto, T.; Arens, E.A.; Brager, G.; Candido, C.; Cheong, K.W.D.; Li, B.; Nishihara, N.; Sekhar, S.C.; Tanabe, S. Progress in thermal comfort research over the last twenty years. Indoor Air 2013, 23, 442–461. [Google Scholar] [CrossRef]
  9. Laguerre, O.; Chaomuang, N.; Derens, E.; Flick, D. How to predict product temperature changes during transport in an insulated box equipped with an ice pack: Experimental versus 1-D and 3-D modelling approaches. Int. J. Refrig. 2019, 100, 196–207. [Google Scholar] [CrossRef]
  10. Laguerre, O.; Derens, E.; Flick, D. Modelling of fish refrigeration using flake ice. Int. J. Refrig. 2018, 85, 97–108. [Google Scholar] [CrossRef]
  11. Laguerre, O.; Ben Aissa, M.F.; Flick, D. Methodology of temperature prediction in an insulated container equipped with PCM. Int. J. Refrig. 2008, 31, 1063–1072. [Google Scholar] [CrossRef]
  12. Choi, S.J.; Burgess, G. Practical physical model to predict the performance of insulating packages. Packag. Technol. Sci. 2007, 20, 369–380. [Google Scholar] [CrossRef]
  13. Burgess, G. Practical thermal resistance and ice requirement calculations for insulating packages. Packag. Technol. Sci. 1999, 12, 75–80. [Google Scholar] [CrossRef]
  14. Du, K.; Calautit, J.; Wang, Z.H.; Wu, Y.P.; Liu, H. A review of the applications of phase change materials in cooling, heating and power generation in different temperature ranges. Appl. Energy 2018, 220, 242–273. [Google Scholar] [CrossRef]
  15. Ding, H.Y.; Song, F.Q.; Zhu, W.Y.; Wang, Y.; Sun, Y.H. Application of neural network approach to nonlinear seepage modelling in tight reservoirs. Hydrodyn. Res. Prog. 2022, 37, 845–887. [Google Scholar]
  16. Du, B.; Lund, P.D.; Wang, J.; Mohan, K.; Eric, H. Comparative study of modelling the thermal efficiency of a novel straight through evacuated tube collector with MLR, SVR, BP and RBF methods. Sustain. Energy Technol. Assess. 2021, 44, 101029. [Google Scholar] [CrossRef]
  17. Moon, J.W.; Yoon, Y.J.; Jeon, Y.H.; Kim, S.Y. Prediction models and control algorithms for predictive applications of setback temperature in cooling systems. Appl. Therm. Eng. 2017, 113, 1290–1302. [Google Scholar] [CrossRef]
  18. Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
  19. Chen, W.W.; Li, X.; Shi, L.L.; Yu, P.F. Research on Integrated RF Module Temperature Prediction Based on LSTM Network. Comput. Monit. Control 2022, 30, 84–90. [Google Scholar]
  20. Lei, Y.X.; Karimi, H.R.; Chen, X.F. A novel self-supervised deep LSTM network for industrial temperature prediction in aluminum processes application. Neurocomputing 2022, 502, 177–185. [Google Scholar] [CrossRef]
  21. Xu, C.L.; Chen, H.X.; Wang, J.Y.; Guo, Y.B.; Yuan, Y. Improving prediction performance for indoor temperature in public buildings based on a novel deep learning method. Build. Environ. 2019, 148, 128–135. [Google Scholar] [CrossRef]
  22. Hoang, H.M.; Akerma, M.; Mellouli, N.; Montagner, A.L.; Leducq, D.; Delahaye, A. Development of deep learning artificial neural networks models to predict temperature and power demand variation for demand response application in cold storage. International. J. Refrig. 2021, 131, 857–873. [Google Scholar] [CrossRef]
  23. Li, B.; Shen, H.; Guo, J.M.; Wei, X.Y.; Lv, E.L.; Yuan, J.T. Design and test of passive cold storage temperature control container. J. Agric. Mach. 2020, 51, 358–365. [Google Scholar]
  24. Wang, G.H.; Lv, E.L.; Lu, H.Z.; Xu, J.F.; Zhou, X.L. Effects of different humidification methods on the environmental regulation of air-conditioned freshness. Guangdong Agric. Sci. 2012, 39, 187–189. [Google Scholar]
  25. Yan, Z.F.; Liu, J.P. Calculation method of heat transfer in heavy building envelope. Sichuan Build. Sci. Res. 2003, 101–103. [Google Scholar]
  26. Qiao, J.; Nan, X.H. Research on the prediction model and influencing factors of temperature reduction in apple cold storage. Build. Therm. Vent. Air Cond. 2020, 39, 36–40. [Google Scholar]
  27. Li, J.; Xie, R.H.; Liu, G.H.; Lv, N.; Chen, Y.F. Establishment of physical model and analysis of influencing factors on cooling of refrigerated trucks. J. Agric. Mach. 2013, 44, 175–182. [Google Scholar]
  28. Xiao, Y.; Liu, D.J. Research on cold storage and heat preservation transport technology and equipment for agricultural products. Res. Agric. Mech. 2011, 33, 57–60. [Google Scholar]
  29. Li, J.; Xie, R.H. Sensitivity analysis of cooling influence parameters of multi-temperature refrigerated truck. J. Agric. Mach. 2016, 47, 274–281. [Google Scholar]
  30. Gu, H.; Zhang, H.; Chen, X.; Zhao, J. Research on Dynamic Energy Consumption of Front Warehouse Assembly Cold Storage and Analysis of Influencing Factors. J. Refrig. 2021, 42, 146–153. [Google Scholar]
  31. Xue, W. Design and Characterisation of Marine Refrigerated Container Refrigeration Unit; Jimei University: Xiamen, China, 2013. [Google Scholar]
  32. Guo, J.M.; Wei, X.Y.; Du, X.N.; Ren, J.J.; Li, H.; Lv, E.L. Prediction of pre-cooling fruit temperature and quality loss rate of litchi based on heat and mass transfer. J. Agric. Mach. 2019, 50, 323–329. [Google Scholar]
  33. Tan, Y.; Ma, G.; Xu, J.H.; Chen, X.; Leng, T.P. Panel seam deformation prediction based on multivariate time series and LSTM network. People’s Yangtze River 2022, 53, 198–204. [Google Scholar]
  34. Zhou, H. Scheduling prediction based on LSTM recurrent neural network. Green Build. 2022, 14, 63–65+70. [Google Scholar]
  35. Liu, H.D. Research on the Prediction Method of Soil Tillage Layer Water Temperature Based on Deep Learning; Donghua University: Shanghai, China, 2022; pp. 28–30. [Google Scholar]
  36. Zhang, K.L.; Ye, C.M.; Li, Z.H.; Wang, J.W. Pytorch-based LSTM model for stock price analysis and prediction. Comput. Technol. Dev. 2021, 31, 161–167. [Google Scholar]
  37. Prakhar, D.; Vennapusa, J.R.; Sumit, P.; Apoorv, A.; Jitendra, S.; Kanti, M.T.; Aravind, D.; Sujay, C. Salt hydrate phase change materials: Current state of art and the road ahead. J. Energy Storage 2022, 51, 104360. [Google Scholar]
  38. Han, X. Research on Crowd Density Estimation Algorithm Based on Deep Learning; Xi’an University of Science and Technology: Xi’an, China, 2018; pp. 38–40. [Google Scholar]
Figure 1. Schematic structure of a temperature-controlled container with a cold energy storage system: 1—fresh-keeping area; 2—fan; 3—insulation surface; 4—circulating duct; 5—cold storage area; 6—control area; 7—circulating duct; 8—cold storage plate.
Figure 1. Schematic structure of a temperature-controlled container with a cold energy storage system: 1—fresh-keeping area; 2—fan; 3—insulation surface; 4—circulating duct; 5—cold storage area; 6—control area; 7—circulating duct; 8—cold storage plate.
Applsci 14 00854 g001
Figure 2. Temperature-controlled container with a cold energy storage system: 1—circulating duct; 2—cold storage area; 3—cold storage plate; 4—paperless recorder; 5—fresh-keeping area; 6—fan (outlet); 7—fan (inlet); 8—PT100; 9—navel oranges.
Figure 2. Temperature-controlled container with a cold energy storage system: 1—circulating duct; 2—cold storage area; 3—cold storage plate; 4—paperless recorder; 5—fresh-keeping area; 6—fan (outlet); 7—fan (inlet); 8—PT100; 9—navel oranges.
Applsci 14 00854 g002
Figure 3. Cold storage plates.
Figure 3. Cold storage plates.
Applsci 14 00854 g003
Figure 4. Distribution of temperature monitoring points: Applsci 14 00854 i001—temperature monitoring points for fresh products; Applsci 14 00854 i002—temperature monitoring points for the inlet; Applsci 14 00854 i003—temperature monitoring points for the outlet; Applsci 14 00854 i004—temperature monitoring points for the surface of the cold storage plate; Applsci 14 00854 i005—temperature monitoring points for the center of the cold storage plate; Applsci 14 00854 i006—temperature monitoring points for the fresh-keeping area.
Figure 4. Distribution of temperature monitoring points: Applsci 14 00854 i001—temperature monitoring points for fresh products; Applsci 14 00854 i002—temperature monitoring points for the inlet; Applsci 14 00854 i003—temperature monitoring points for the outlet; Applsci 14 00854 i004—temperature monitoring points for the surface of the cold storage plate; Applsci 14 00854 i005—temperature monitoring points for the center of the cold storage plate; Applsci 14 00854 i006—temperature monitoring points for the fresh-keeping area.
Applsci 14 00854 g004
Figure 5. Analysis of heat transfer in a temperature-controlled container with a cold storage system.
Figure 5. Analysis of heat transfer in a temperature-controlled container with a cold storage system.
Applsci 14 00854 g005
Figure 6. Schematic diagram of LSTM.
Figure 6. Schematic diagram of LSTM.
Applsci 14 00854 g006
Figure 7. Temperature change at each monitoring point.
Figure 7. Temperature change at each monitoring point.
Applsci 14 00854 g007
Figure 8. Training set results.
Figure 8. Training set results.
Applsci 14 00854 g008
Figure 9. Test set temperature prediction result.
Figure 9. Test set temperature prediction result.
Applsci 14 00854 g009
Figure 10. Comparison of the predictions of the two models.
Figure 10. Comparison of the predictions of the two models.
Applsci 14 00854 g010
Figure 11. Comparison of prediction results for different training datasets.
Figure 11. Comparison of prediction results for different training datasets.
Applsci 14 00854 g011
Figure 12. Training and prediction results.
Figure 12. Training and prediction results.
Applsci 14 00854 g012
Table 1. Specific dimensions of the container.
Table 1. Specific dimensions of the container.
Functional ZoneLengths/mmWidths/mmHeights/mm
Outer dimensions of the container200018001720
Cold storage area15353051480
Fresh-keeping area180012001460
Dimensions within the control area3002001480
Table 2. Physical properties of materials.
Table 2. Physical properties of materials.
MaterialsHeat Conduction
/W (m·°C)−1
Thermal Resistance
/W−1 (m2·°C)
Densities/(kg·m−3)
GFRP0.46510.00862800
VIP0.0244-45
PU0.0048-280
Table 3. Material physical parameters.
Table 3. Material physical parameters.
MaterialPhase Transition Temperature/°CLatent Heat Value/(J·kg−1)Densities/(kg·m−3)Heat Conduction/(W·(m·°C)−1)Specific Heat Capacity of the Solid State/(J·(kg·°C)−1)Specific Heat Capacity of a Liquid/(J·(kg·°C)−1)
Water0335,1009982.2220504186
Aluminum--2700237--
Table 4. Comparison of the predictions of the two models.
Table 4. Comparison of the predictions of the two models.
ModelRMSEMAEMAPER2Time for Temperature to Reach 10 °C/hRelative Error/%
PredictedActual
LSTM model0.1050.1030.0100.98857.2656.740.92
Physical model3.8572.5540.2580.34653.9956.744.84
Table 5. Comparison of prediction results for different training datasets.
Table 5. Comparison of prediction results for different training datasets.
NumberTraining Sample/%Training Time/sRMSEMAEMAPER2Time for Temperature to Reach 10 °C/h Relative Error/%
PredictedActual
18024870.0730.0660.0070.99457.1156.740.66
25017400.1020.0870.0100.99357.2656.740.93
3209320.0590.0510.0060.99757.1156.740.66
4105150.6510.5800.0730.63156.6256.740.20
Table 6. Training and prediction results.
Table 6. Training and prediction results.
ElementsRMSEMAEMAPER2Time to Reach the Moment of CCB/h Relative Error in CCB prediction/%
PredictedActual
PCM1.4420.9750.1210.45052.9853.541.05
Fresh products 0.0910.0870.0100.98161.5261.240.45
Inlet 0.2230.2120.0210.944---
Outlet0.0410.0290.0030.999---
Surface of cold storage plates0.9910.6400.0790.746---
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Guo, J.; Liu, D.; Lin, S.; Lin, J.; Zhen, W. Temperature Prediction of a Temperature-Controlled Container with Cold Energy Storage System Based on Long Short-Term Memory Neural Network. Appl. Sci. 2024, 14, 854. https://doi.org/10.3390/app14020854

AMA Style

Guo J, Liu D, Lin S, Lin J, Zhen W. Temperature Prediction of a Temperature-Controlled Container with Cold Energy Storage System Based on Long Short-Term Memory Neural Network. Applied Sciences. 2024; 14(2):854. https://doi.org/10.3390/app14020854

Chicago/Turabian Style

Guo, Jiaming, Dongfeng Liu, Shitao Lin, Jicheng Lin, and Wenbin Zhen. 2024. "Temperature Prediction of a Temperature-Controlled Container with Cold Energy Storage System Based on Long Short-Term Memory Neural Network" Applied Sciences 14, no. 2: 854. https://doi.org/10.3390/app14020854

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop