Next Article in Journal
Design and Optimization of Magnetic Circuits in Electric Scooter Motors
Previous Article in Journal
Sustainable Wearable Health Monitoring Using Energy-Harvesting and Biodegradable Electronics
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

IoT-Based Anomaly Detection for Long-Term Care Using Principal Component Analysis and Isolation Forest †

1
Department of Information Management, Chia-Nan University of Pharmacy and Science, Tainan 717301, Taiwan
2
Department of Multimedia and Game Development, Chia-Nan University of Pharmacy and Science, Tainan 717301, Taiwan
*
Authors to whom correspondence should be addressed.
Presented at the 7th Eurasia Conference on Biomedical Engineering, Healthcare and Sustainability 2025 (ECBIOS 2025), Kaohsiung, Taiwan, 23–25 October 2025.
Eng. Proc. 2026, 129(1), 11; https://doi.org/10.3390/engproc2026129011
Published: 27 February 2026

Abstract

Taiwan’s rapid demographic shift toward a super-aged society has heightened demand for long-term care, yet limited staffing creates safety risks from fires; heating, ventilation, and air conditioning failures; and health incidents. To address this, we propose an IoT-based intelligent environmental monitoring and early-warning system designed for care facilities. The three-layer architecture integrates sensors for temperature, humidity, light, air quality, and noise; employs ESP-NOW and wireless fidelity mesh for reliable networking; and supports user interfaces with real-time anomaly alerts. Using PCA and Isolation Forest for efficient anomaly detection, the modular, node-based design enhances safety, reduces manpower burden, and enables scalable smart services.

1. Introduction

Taiwan’s population is aging rapidly, having entered an aged society in 2018 and projected to become a super-aged society within eight years, faster than many other countries [1]. This is driven by declining birth and death rates, reducing the number of adult children available to support elderly family members and decreasing co-residence with children [1,2]. Consequently, elderly individuals in poor health increasingly rely on long-term care facilities, while these institutions face severe manpower shortages—by the end of 2023, 29,205 staff were responsible for 50,446 residents. To address rising care demand and limited staffing, this study proposes an intelligent environmental monitoring and early-warning system integrating IoT and AI. The system collects data via multiple sensors and uses low-power ESP-NOW communication and scalable wireless fidelity (Wi-Fi) Mesh networks for real-time data transmission and control. Principal component analysis (PCA) reduces data dimensionality while preserving major variance, enhancing computational efficiency. Upon detecting anomalies, the system automatically alerts caregivers, improving monitoring accuracy, response timeliness, and the safety and quality of life of elderly residents.

2. Environmental Factors in Long-Term Care Facilities

Older adults in long-term care facilities often exhibit reduced adaptability to environmental conditions, making them particularly vulnerable to risks associated with temperature, humidity, air quality, lighting, and noise. Extreme temperatures can increase the likelihood of cardiovascular events and frostbite, and pose heightened risks for individuals with dementia [3,4,5]. Inappropriate humidity levels may contribute to respiratory and dermatological problems [6]. Poor air quality, characterized by elevated levels of CO2, CO, formaldehyde, total volatile organic compounds (TVOCs), particulate matter (PM10, PM2.5), and ozone, exacerbates respiratory and cardiovascular diseases [7]. Insufficient lighting negatively affects mobility, mood, and fall risk [8], while excessive noise may lead to hearing loss, cardiovascular complications, and nervous system disorders [9].
Traditional manual inspections of environmental conditions are labor-intensive, slow to address individual needs, and prone to monitoring gaps, thereby compromising resident safety. To overcome these limitations, IoT and AI technologies are integrated. Such systems enable real-time monitoring, automated adjustments, and abnormal event detection, creating an intelligent, resident-centered environmental management framework that enhances both safety and quality of care.

3. Methodology

We adopted IoT to improve operational efficiency in long-term care facilities by combining low-power wireless communication (ESP-NOW, Wi-Fi Mesh) with anomaly detection using PCA and Isolation Forest. IoT consists of perception, network, and application layers, enabling real-time sensing, transmission, and intelligent applications [10]. Wired networks offer high stability but are costly and inflexible, while wireless networks are more flexible but face interference and security issues [11]. ESP-NOW enables secure, low-power, connectionless communication between devices [12], while Wi-Fi Mesh with edge computing enhances coverage, stability, and low-latency data processing [13,14]. PCA reduces dimensionality and handles multicollinearity by transforming correlated variables into principal components [15], and Isolation Forest detects anomalies by isolating sparse data points through random partitioning [16]. To strengthen information security, the system adopts a closed network with ESP-NOW and Wi-Fi Mesh, authorizing only trusted devices and verifying data integrity to reduce attack risks and ensure secure, efficient operation.

4. System Structure

We designed an environmental parameters management system for long-term care facilities, covering network connectivity as well as data analysis and anomaly detection applications, to achieve automatic monitoring and intelligent control of environmental parameters, as presented in Figure 1.

4.1. Network and Connectivity

The system was designed based on a three-layer IoT architecture consisting of sensing nodes, security nodes, and control nodes. The sensing nodes collect environmental parameters in real time and transmit them to the security nodes. The security nodes handle data relaying, transmission verification, and pairing authentication to ensure data security. The control nodes manage controllable devices and automatically adjust the indoor environment.

4.2. Workflow of Nodes

The intelligent long-term care environment management system integrates sensing, security, and control nodes within a Wi-Fi mesh network to ensure reliable multi-node cooperation. Sensing nodes collect environmental data and employ multi-level self-checks, including hardware diagnostics, data validity verification, and transmission connectivity confirmation, to maintain stability and respond to anomalies in real time (Figure 2). Security nodes parse and validate incoming JavaScript Object Notation data, reset anomaly counters for valid data, log and count errors, and issue alerts if thresholds are exceeded, distinguishing temporary errors from systemic faults (Figure 3). Control commands are transmitted through Hypertext Transfer Protocol Secure with hierarchical anomaly handling, including limited retries and administrator notifications to enhance stability and reduce manual monitoring (Figure 4). Fault-tolerant mechanisms at control nodes combine hardware and transmission anomaly counters to identify temporary interference versus permanent failures, ensuring timely fault handling and system safety (Figure 5). Additionally, a data processing mechanism within the Mesh network checks for duplicates, verifies data integrity, processes actionable information, and forwards it efficiently, supporting stable and secure network operation (Figure 6).

4.3. Workflow of Machine Learning

The system’s machine learning workflow consists of model training and anomaly detection. During training, labeled normal sensor data are integrated, preprocessed, and standardized to normalize feature scales, then subjected to PCA for dimensionality reduction. If the retained variance meets a threshold, the reduced data train the Isolation Forest model; otherwise, the original standardized data are used. The trained model and parameters are stored for deployment and management (Figure 7). For anomaly detection, incoming data are preprocessed and standardized before being evaluated by the stored model. Normal data are labeled and stored, while anomalies trigger administrator verification. False positives are relabeled as normal, confirmed anomalies are stored, and subsequent mechanisms are activated. If cumulative false positives exceed a threshold, the system recommends model retraining and data cleaning to prevent bias-related misjudgments [17] (Figure 8).

5. Interface Design

The system uses Microsoft Windows Forms (C# .NET Framework) to provide a graphical user interface with two main pages: the environmental monitoring dashboard, as shown in Figure 9a and the administrator notification/anomaly confirmation page, as shown in Figure 9b. As shown in the Figure 9a, the timestamps are displayed in a 12-h format, where the term “下午” represents p.m. The dashboard integrates a fault-tolerant architecture with hardware and transmission anomaly counters, checking hardware status and connectivity with security nodes, performing limited retries for anomalies, and triggering visual alerts and administrator notifications when thresholds are exceeded to ensure stability and timely fault handling. As shown in Figure 9c, the anomaly notification page alerts the administrator via communication software (e.g., Telegram) when anomalies are detected, allowing them to confirm the anomaly, mark it as caused by a temporary condition as shown in Figure 9d, or relabel it as a false positive, with data stored appropriately for subsequent processing or model optimization.

6. Conclusions

To address the challenges of caregiver shortages and environmental safety risks faced by long-term care institutions in Taiwan’s aging society, we designed an IoT-based intelligent environmental monitoring and early warning system. The system adopts a three-layer IoT architecture that integrates multiple environmental sensors and incorporates ESP-NOW and Wi-Fi Mesh technologies to achieve low-power, highly stable data transmission, while also providing self-healing capabilities to ensure reliable network operation. In data processing, the system applies PCA to the high-dimensional, multivariate data generated by multiple sensors, performing feature extraction and dimensionality reduction to reduce computational load while preserving the main variance structure. Then, the unrelated principal components are input into the Isolation Forest algorithm to identify environmental anomalies in real time without the need for labeled data. Since anomalous data are sparse and easily separable in the feature space, the system enhances the accuracy of anomaly detection. In addition, the system integrates edge computing and modular design, enabling real-time alerts and continuous optimization of the detection model. The system reduces the workload of caregivers and proactively safeguards resident safety and demonstrates strong scalability, with the potential to be applied to other intelligent indoor environments.

Author Contributions

Conceptualization, C.-P.C. and Z.-Y.S.; methodology, C.-P.C., H.-R.W. and Z.-Y.S.; software, H.-R.W. and H.-W.C.; validation, C.-P.C. and Z.-Y.S.; formal analysis, H.-R.W. and H.-W.C.; investigation, H.-R.W. and H.-W.C.; resources, H.-R.W. and H.-W.C.; data curation, H.-R.W. and H.-W.C.; writing—original draft preparation, C.-P.C. and H.-R.W.; writing—review and editing, C.-P.C. and H.-R.W.; visualization, C.-P.C. and H.-R.W.; supervision, C.-P.C. and Z.-Y.S.; project administration, C.-P.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the National Science and Technology Council (NSTC) of Taiwan under grants NSTC 113-2622-E-041-003-.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are not publicly available due to privacy/ethical restrictions.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Liu, Z.; Qi, L. Housing Conditions and Institutional Care Demand Trends of the Elderly in Taiwan. J. Natl. Land Public Gov. 2019, 7, 70–81. Available online: https://www.airitilibrary.com/Article/Detail?DocID=P20150327001-201903-201903190019-201903190019-70-81 (accessed on 3 September 2025).
  2. Wang, T.-M.; Chen, K.-C. Modern population transition and household composition: A test of social change theory. In Social Change in Taiwan; Yang, K.-S., Chiu, H.-Y., Eds.; Institute of Ethnology, Academia Sinica: Taipei, Taiwan, 1988; pp. 45–59. [Google Scholar]
  3. Health Promotion Administration; Ministry of Health and Welfare; Community Health Division. Heat Injury Prevention—Elderly Care Manual. 18 April 2024. Available online: https://health99.hpa.gov.tw/material/8329 (accessed on 3 September 2025).
  4. He, Y.; Yang, J. Numerical simulation of hand skin temperature in a low-temperature environment. China Saf. Sci. J. 2020, 30, 182–187. [Google Scholar]
  5. Peining, W. Medical Column: Sudden Cold Weather Freezes the Mind? Cognitive Confusion May Be Temperature-Related. The Age Magazine, 23 January 2025. Available online: https://www.cw.com.tw/aging/article/5133843 (accessed on 3 September 2025).
  6. Jiayue, G. Using a Hygrometer Properly Can Prevent Diseases. People’s Daily Online—Life Times, 31 December 2019. Available online: http://lxjk.people.cn/BIG5/n1/2019/1231/c404177-31530103.html (accessed on 3 September 2025).
  7. Jiayue, G. Five Reasons Why Nursing Homes Need Indoor Air Safety. Taiwan Indoor Environment Quality Management Association, 30 May 2022. Available online: https://reurl.cc/QamzQZ (accessed on 3 September 2025).
  8. Jia, Z. Make Good Use of Colors and Lighting to Create an Age-Friendly Home Environment. Jubo Care, 26 October 2023. Available online: https://www.jubo-care.com/posts/tJuw0SyOSjKqG7KNZXSmrg (accessed on 3 September 2025).
  9. Kaohsiung City Government Environmental Protection Bureau. Introduction to Noise. 28 August 2025. Available online: https://ksepb.kcg.gov.tw/StaticPage/introduction (accessed on 3 September 2025).
  10. Liu, Q.; Cui, L.; Chen, H. Key technologies and applications of the Internet of Things. In Proceedings of the 2012 Fifth International Conference on Intelligent Computation Technology and Automation, Zhangjiajie, China, 12–14 January 2012. [Google Scholar]
  11. Skøien, K.R. Wireless Network Topologies Explained. EE Times Taiwan, 15 March 2019. Available online: https://www.eettaiwan.com/20190315ta71-wireless-network-topologies/ (accessed on 3 September 2025).
  12. Lingshun Lab. Introduction to ESP32 NOW Communication and One-to-One Unidirectional Communication Application Example (One Transmitter, One Receiver). lingshunlab, 17 October 2022. Available online: https://lingshunlab.com/book/esp32/esp32-now-introduce-and-one-way-communication (accessed on 3 September 2025).
  13. Huang, B.S. A Study on Throughput Fairness in IEEE 802.11 Mesh Networks. Master’s Thesis, National Sun Yat-sen University, Kaohsiung, Taiwan, 2021. Available online: https://hdl.handle.net/11296/5sbfjg (accessed on 3 September 2025).
  14. Yen, S.-Y.; Cheng, K.-C.; Lee, S.-M.; Wang, L.-C.; Hsieh, C.-Y.; Lee, Y.-F.; Liang, Y.-C. Edge computing solutions. J. Chin. Inst. Electr. Eng. 2022, 67, 67–76. [Google Scholar] [CrossRef]
  15. Chen, H.-L.; Tsai, D.-W. Dynamic study of reservoir eutrophication using principal component analysis. J. Soil Water Conserv. 2008, 40, 137–161. [Google Scholar]
  16. Liu, F.T.; Ting, K.M.; Zhou, Z.H. Isolation-based anomaly detection. ACM Trans. Knowl. Discov. Data 2012, 6, 1–39. [Google Scholar] [CrossRef]
  17. Microsoft Azure. Best Practices for Using the Multivariate Anomaly Detector API. Microsoft Learn, 12 June 2025. Available online: https://learn.microsoft.com/en-us/azure/ai-services/anomaly-detector/concepts/best-practices-multivariate (accessed on 3 September 2025).
Figure 1. Network and connectivity architecture.
Figure 1. Network and connectivity architecture.
Engproc 129 00011 g001
Figure 2. Workflow of the sensor node.
Figure 2. Workflow of the sensor node.
Engproc 129 00011 g002
Figure 3. Workflow of the security node to server.
Figure 3. Workflow of the security node to server.
Engproc 129 00011 g003
Figure 4. Workflow of the external data transmission to the security node.
Figure 4. Workflow of the external data transmission to the security node.
Engproc 129 00011 g004
Figure 5. Workflow of the control node.
Figure 5. Workflow of the control node.
Engproc 129 00011 g005
Figure 6. Workflow of the node transmission and reception within the mesh network.
Figure 6. Workflow of the node transmission and reception within the mesh network.
Engproc 129 00011 g006
Figure 7. Model building.
Figure 7. Model building.
Engproc 129 00011 g007
Figure 8. Anomaly detection.
Figure 8. Anomaly detection.
Engproc 129 00011 g008
Figure 9. (a) Environmental monitoring dashboard; (b) anomaly alert system; (c) instant messaging (Telegram); (d) input the reason for the temporary condition.
Figure 9. (a) Environmental monitoring dashboard; (b) anomaly alert system; (c) instant messaging (Telegram); (d) input the reason for the temporary condition.
Engproc 129 00011 g009
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

Chang, C.-P.; Wei, H.-R.; Chang, H.-W.; Su, Z.-Y. IoT-Based Anomaly Detection for Long-Term Care Using Principal Component Analysis and Isolation Forest. Eng. Proc. 2026, 129, 11. https://doi.org/10.3390/engproc2026129011

AMA Style

Chang C-P, Wei H-R, Chang H-W, Su Z-Y. IoT-Based Anomaly Detection for Long-Term Care Using Principal Component Analysis and Isolation Forest. Engineering Proceedings. 2026; 129(1):11. https://doi.org/10.3390/engproc2026129011

Chicago/Turabian Style

Chang, Chun-Pin, Hong-Rui Wei, Hung-Wei Chang, and Zhi-Yuan Su. 2026. "IoT-Based Anomaly Detection for Long-Term Care Using Principal Component Analysis and Isolation Forest" Engineering Proceedings 129, no. 1: 11. https://doi.org/10.3390/engproc2026129011

APA Style

Chang, C.-P., Wei, H.-R., Chang, H.-W., & Su, Z.-Y. (2026). IoT-Based Anomaly Detection for Long-Term Care Using Principal Component Analysis and Isolation Forest. Engineering Proceedings, 129(1), 11. https://doi.org/10.3390/engproc2026129011

Article Metrics

Back to TopTop