Journal of Researches in Mechanics of Agricultural Machinery

Journal of Researches in Mechanics of Agricultural Machinery

Development of a Soft Sensor Based on Supervised Feature Selection for Temperature Monitoring of Fruit Pallets in Cold Storage

Document Type : Original Article

Authors
Department of Mechanical Engineering of Biosystems, Faculty of Agriculture, Tarbiat Modares University, Tehran, Iran
Abstract
    Abstract
Changes in agricultural land use resulting from human or natural factors and their monitoring constitute one of the most important challenges in the northern provinces of the country. Different machine learning algorithms exhibit varying performance in regions with specific spatial characteristics. The objective of the present study was to use Sentinel-2 satellite imagery to classify land use in Masal County and to compare the maximum likelihood, minimum distance, Mahalanobis distance, and support vector machine classifiers with linear, polynomial, sigmoid, and radial basis function kernels. To provide training and testing data for the algorithms, in addition to ground truth points collected using a global positioning system and Google Earth maps, spectral indices—including the normalized difference vegetation index (NDVI), the normalized difference built-up index (NDBI), and the modified normalized difference water index (MNDWI)—were used to more accurately determine ground truth data. Model validation was performed using a confusion matrix and by calculating the kappa coefficient and overall accuracy. The results showed that the maximum likelihood algorithm achieved the most accurate classification performance, with an overall accuracy of 97.29% and a kappa coefficient of 0.96, followed by the support vector machine with a linear kernel, which ranked next with kappa coefficient and overall accuracy values of 0.89 and 92.46%, respectively. The weakest performance was observed for the minimum distance algorithm, with an overall accuracy of 72.97% and a kappa coefficient of 0.66. Based on the results of this study, the maximum likelihood classifier provided superior performance in discriminating land use classes in Masal County. The findings of this research are important for policymakers and provincial managers in increasing awareness of changes in agricultural and forest land use in the region.
EXTENDED ABSTRACT
Introduction 
Temperature is a critical factor affecting the quality and shelf life of perishable food products, making the precise and cost-effective monitoring of its levels essential throughout the cold chain. Due to practical limitations in deploying physical sensors at every point of interest, the development of soft (virtual) sensors for temperature estimation has attracted considerable research attention. Soft sensors are generally categorised into model-based and data-driven approaches, with the latter offering superior capability in capturing system dynamics without requiring detailed physical modelling. Among various data-driven methods, artificial neural networks (ANNs) have demonstrated superior performance compared to alternative techniques.
The first step in designing a data-driven soft sensor is to collect and prepare training data, which can be either experimental or synthetic. Studies indicate that experimental data lead to more accurate estimations, although they are harder to obtain. A crucial subsequent step involves selecting appropriate input variables corresponding to potential sensor locations. While most previous studies have relied on subjective or heuristic input selection, supervised feature selection methods offer a structured and potentially more optimal alternative; however, such methods have rarely been applied in the context of temperature soft sensors for cold chains.
Once inputs and outputs are defined, the modelling process typically employs ANNs, which have shown superior estimation performance over classical models. The present study implements supervised feature selection to optimise both the number and placement of physical sensors and to statistically investigate the effects of key hyperparameters in the time-delay neural network (TDNN) serving as the system's soft sensor estimator.
Material and Methods 
A cost-effective, Arduino-based data logger was developed to collect real temperature data for training the soft sensor. Temperature distribution data were collected from two peach pallets stored in a 2000-ton cold storage room maintained at 1 °C. The logger simultaneously recorded data from up to 20 DS18B20 sensors at 1-minute intervals. A novel supervised feature selection approach (wrapper method) was applied to identify the most informative sensor positions, thereby minimizing the required number of physical sensors. A time-delay neural network (TDNN) with one hidden layer was employed for temperature estimation. The influence of four key hyperparameters—time delay, number of hidden neurons, activation function, and training algorithm—on model performance metrics (RMSE, R², MAE, BIC) was evaluated. Additionally, a metaheuristic algorithm was used to assess the effectiveness of the feature selection method in reducing the sensor count. Model generalisability was verified using an out-of-sample test set collected under varying temperature scenarios and pallet placements.
Results and Discussion 
Data acquisition for the first pallet lasted five hours, during which the cold storage refrigeration system operated under standard conditions. Table 1 ranks the five most informative sensor locations identified using the FIRE method. Table 3 presents the best model fits obtained with the SIG and ReLU activation functions. These models share a common structure: Levenberg–Marquardt (LM) training and a 20-minute time delay. Comparing activation functions reveals that ReLU yields superior performance metrics (R²mean and RMSEmean), while SIG achieves a lower BIC. Figure 4 illustrates how R²mean and RMSEmean vary as the number of physical sensors is reduced based on FIRE rankings under the optimal estimator configuration (LM2010-ReLU), showing no consistent trend and indicating the robustness of FIRE's variable selection.
For the second pallet, data acquisition also spanned five hours; however, the refrigeration system was inactive for defrosting during the first three hours and resumed operation in the final two. Table 2 shows the FIRE-derived variable ranking, and Table 4 lists the best model fits for this dataset. All models for the second pallet employed LM training, a 20-minute delay, and five hidden neurons. In this case, performance metrics (R²mean and RMSEmean) progressively deteriorated as the number of sensors used decreased (Figure 4), indicating a greater sensitivity to sensor reduction under dynamic thermal conditions.
Correlation analysis revealed strong relationships between RMSEmean and MAEmean, as well as among MSEtrain, MSEvalidation, and MSEtest; however, R²mean showed little correlation with these variables. BIC exhibited a significant correlation with several metrics. Consequently, MSEtrain, R²mean, and RMSEmean were deemed sufficient for performance evaluation.
The influence of estimator hyperparameters (Table 5) indicated that the training method significantly affected performance, favouring LM. Hidden layer size and time delay primarily influenced BIC, while activation function showed no significant effect, consistent with Loisel et al. (2022). Ant Colony Optimisation (ACO) was applied to validate FIRE rankings (Figure 5). ACO results revealed alternative sensor combinations yielding lower RMSEmean than FIRE, suggesting that heuristic methods may offer superior configurations for "one-sensor-per-pallet" setups. Table 6 compares FIRE and ACO outcomes, confirming ACO's advantage in reducing the mean RMSE.
Cross-pallet validation demonstrated that the soft sensor trained on one pallet and tested on the other under different thermal scenarios achieved RMSEmean values of 0.8 K and 1.0 K—13–15 times higher than the training RMSEmean, but acceptable given the scenario differences. However, R²mean (~0.4) indicated limited generalisation, implying that future training with diverse scenarios would enhance robustness (Figure 6).

Conclusions 
The findings of this study demonstrate the high potential of supervised feature selection as a structured and objective method for identifying the most informative locations for hardware sensor placement in the development of soft sensors. However, to further reduce the required number of hardware sensors, the use of alternative methods, such as metaheuristic algorithms or exhaustive search techniques, appears to be a more prudent approach. In this regard, future research could explore and compare different supervised feature selection techniques to assess their ranking effectiveness and robustness in similar applications.
The out-of-sample evaluation of the developed soft sensor in the "one-pallet-one-sensor" configuration yielded RMSE mean values ranging between 0.8 K and 1.0 K. This outcome is considered acceptable given the "single-scenario training" condition. Nevertheless, several factors could influence the accuracy and generalisation performance of the soft sensor, including: (1) the size of the dataset (in terms of duration or number of data points), (2) the temperature scenario or the operational state of the refrigeration system, and (3) the location of the pallets within the cold storage. Therefore, increasing the diversity of data acquisition conditions—such as varying spatial placement or thermal scenarios—is likely to yield valuable information for further improving the soft sensor's performance and predictive accuracy.
Author Contributions
Matin Mortazavi: Conceptualization,  Data curation, Formal analysis, Investigation, Software, Visualization, Writing – original draft.
Saeid Minaei: Methodology, Resources, Project administration, Funding acquisition, Writing – review and editing
Alireza Mahdavian: Methodology, Validation, Supervision.
Mohamad-Hadi Khosh-Taghaza:  Resources, Writing – review and editing.
Data Availability Statement
The datasets analysed during this study are not publicly available due to confidentiality agreements but can be provided to qualified parties upon request  from the corresponding author and approval of the department.
Acknowledgements
The authors express their gratitude to Tarbiat Modares University for providing financial, laboratory, and technical support (Research Grant No. 9730912003).Ethical Considerations 
Ethical Considerations
Authors proclaim that ethical considerations have been observed in conducting this study and confirm adherence to ethical standards, including avoidance of data fabrication, falsification, plagiarism, and misconduct.
Conflict of Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper
Funding Statement
The author(s) received no specific funding for this research
 
Keywords

Subjects


Badia-Melis, R., Mc Carthy, U., Ruiz-Garcia, L., Garcia-Hierro, J., & Villalba, J. R. (2018). New trends in cold chain monitoring applications-A review. Food Control, 86, 170-182. https://doi.org/10.1016/j.foodcont.2017.11.022
Benkessirat, A., & Benblidia, N. (2019, November). Fundamentals of feature selection: an overview and comparison. In 2019 IEEE/ACS 16th International Conference on Computer Systems and Applications (AICCSA) (pp. 1-6). IEEE. https://doi.org/10.1109/AICCSA47632.2019.9035281
Brunello, A., Urgolo, A., Pittino, F., Montvay, A., & Montanari, A. (2021). Virtual sensing and sensors selection for efficient temperature monitoring in indoor environments. Sensors, 21(8), 2728.https://doi.org/10.3390/s21082728
Curreri, F., Fiumara, G., & Xibilia, M. G. (2020). Input selection methods for soft sensor design: A survey. Future Internet, 12(6), 97. https://doi.org/10.3390/fi12060097
Gillespie, J., da Costa, T. P., Cama-Moncunill, X., Cadden, T., Condell, J., Cowderoy, T., Ramsey, E., Murphy, F., Kull, M., Gallagher, R., & Ramanathan, R. (2023). Real-time anomaly detection in cold chain transportation using IoT technology. Sustainability, 15(3), 2255. https://doi.org/10.3390/su15032255
Gyawali, P. K., Liu, X., Zou, J., & He, Z. (2022, December). Ensembling improves stability and power of feature selection for deep learning models. In Machine Learning in Computational Biology (pp. 33-45). PMLR. https://doi.org/10.48550/arXiv.2210.00604
Hoang, H. M., Akerma, M., Mellouli, N., Le Montagner, A., Leducq, D., & Delahaye, A. (2021). Development of deep learning artificial neural networks models to predict temperature and power demand variation for demand response application in cold storage. International Journal of Refrigeration, 131, 857-873. https://doi.org/10.1016/j.ijrefrig.2021.07.029
Kamalov, F. (2018, December). Sensitivity analysis for feature selection. In 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA) (pp. 1466-1470). IEEE. https://doi.org/10.1109/ICMLA.2018.00238
Lim, M. K., Li, Y., Wang, C., & Tseng, M. L. (2022). Prediction of cold chain logistics temperature using a novel hybrid model based on the mayfly algorithm and extreme learning machine. Industrial management & data systems, 122(3), 819-840. https://doi.org/10.1108/IMDS-10-2021-0607
Lin, B., Recke, B., Knudsen, J. K., & Jørgensen, S. B. (2007). A systematic approach for soft sensor development. Computers & chemical engineering, 31(5-6), 419-425. https://doi.org/10.1016/j.compchemeng.2006.05.030
Loisel, J., Cornuéjols, A., Laguerre, O., Tardet, M., Cagnon, D., de Lamotte, O. D., & Duret, S. (2022). Machine learning for temperature prediction in food pallet along a cold chain: Comparison between synthetic and experimental training dataset. Journal of Food Engineering, 335, 111156. https://doi.org/10.1016/j.jfoodeng.2022.111156
Loisel, J., Duret, S., Cornuéjols, A., Cagnon, D., Tardet, M., Derens-Bertheau, E., & Laguerre, O. (2021). Cold chain break detection and analysis: Can machine learning help? Trends in Food Science & Technology, 112, 391-399. https://doi.org/10.1016/j.tifs.2021.03.052
Maruthi, R., Lakshmi, I., & Devi, V. D. (2023, August). Monitoring Perishable Foods using Machine Learning and Internet of Things. In 2023 Second International Conference on Augmented Intelligence and Sustainable Systems (ICAISS) (pp. 1584-1587). IEEE. https://doi.org/10.1109/ICAISS58487.2023.10250646
Maxim Integrated. (2019). DS18B20 - Programmable Resolution 1-Wire Digital Thermometer. Retrieved from DS18B20 Datasheet. https://www.analog.com/media/en/technical-documentation/data-sheets/ds18b20.pdf
May, R., Dandy, G., & Maier, H. (2011). Review of input variable selection methods for artificial neural networks. Artificial neural networks-methodological advances and biomedical applications, 10(1), 19-45. https://doi.org/10.5772/16004
Mercier, S., & Uysal, I. (2018). Neural network models for predicting perishable food temperatures along the supply chain. Biosystems engineering, 171, 91-100. https://doi.org/10.1016/j.biosystemseng.2018.04.016
Nascimento Nunes, M. C., Nicometo, M., Emond, J. P., Melis, R. B., & Uysal, I. (2014). Improvement in fresh fruit and vegetable logistics quality: berry logistics field studies. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 372(2017), 20130307. https://doi.org/10.1098/rsta.2013.0307
Perera, Y. S., Ratnaweera, D. A. A. C., Dasanayaka, C. H., & Abeykoon, C. (2023). The role of artificial intelligence-driven soft sensors in advanced sustainable process industries: A critical review. Engineering Applications of Artificial Intelligence, 121, 105988. https://doi.org/10.1016/j.engappai.2023.105988
Pudjihartono, N., Fadason, T., Kempa-Liehr, A. W., & O'Sullivan, J. M. (2022). A review of feature selection methods for machine learning-based disease risk prediction. Frontiers in Bioinformatics, 2, 927312. https://doi.org/10.3389/fbinf.2022.927312
Souza, F. A., Araújo, R., & Mendes, J. (2016). Review of soft sensor methods for regression applications. Chemometrics and Intelligent Laboratory Systems, 152, 69-79. https://doi.org/10.1016/j.chemolab.2015.12.011
Stavropoulos, G., Violos, J., Tsanakas, S., & Leivadeas, A. (2023). Enabling artificial intelligent virtual sensors in an IoT environment. Sensors, 23(3), 1328. https://doi.org/10.3390/s23031328
Swain, S., & Jenamani, M. (2022, November). Cluster analysis for identification of temperature breaks in a reefer container from IoT data. In 2022 International Conference on Futuristic Technologies (INCOFT) (pp. 1-6). IEEE. https://doi.org/10.1109/INCOFT55651.2022.10094499
Tofallis, C. (2015). A better measure of relative prediction accuracy for model selection and model estimation. Journal of the Operational Research Society, 66(8), 1352-1362. https://doi.org/10.1057/jors.2014.103
Xu, F., Sato, Y., Sakai, Y., Sabu, S., Kanayama, H., Satou, D., & Kansha, Y. (2022). A Prediction Model for Temperature Variation and Distribution Using Soft Sensing Method. Chemical Engineering Transactions, 94, 811-816. https://doi.org/10.3303/CET2294135
Zou, Y., Wu, J., Wang, X., Morales, K., Liu, G., & Manzardo, A. (2023). An improved artificial neural network using multi-source data to estimate food temperature during multi-temperature delivery. Journal of Food Engineering, 351, 111518. https://doi.org/10.1016/j