Yanming Huo*, Luyuan Jia, Guo Zhang, Jiajing Ma, Congkang Zhang, Xv Guo, Yongdong Song and Shenu2019ao Hao
Volume6-Issue9
Dates: Received: 2025-09-04 | Accepted: 2025-09-13 | Published: 2025-09-16
Pages: 1244-1264
Abstract
This paper proposes a respiratory pattern recognition method for anxiety disorders based on an SVM-XGBoost-LR stacked ensemble model, enabling objective screening and early monitoring of anxiety disorders through the analysis of respiratory signals. A portable respiratory monitoring system was designed and implemented based on the ESP32 microcontroller and SM9541 high-precision pressure sensor, capable of real-time acquisition of oral-nasal airflow signals and data transmission via WiFi. In the algorithmic processing, Kalman filtering was employed for signal denoising, combined with a three-stage feature selection strategy (VIF-ANOVA-RF) to extract key respiratory features, along with the introduction of a Transformer self-attention mechanism for feature enhancement. The proposed SVM-XGBoost-LR stacked ensemble model achieved an overall classification accuracy of 96% on a dataset containing 600 samples, and improved the F1-score for the minority class (simulated breath-holding) from 60% to 87%, effectively alleviating the issue of missed diagnoses of abnormal patterns caused by class imbalance. Experimental results indicate that this method demonstrates superior performance in identifying anxiety-related respiratory abnormalities, providing a reliable algorithmic foundation and technical pathway for the development of portable mental health monitoring devices.
FullText HTML
FullText PDF
DOI: 10.37871/jbres2181
Certificate of Publication

Copyright
© 2025 Huo Y, et al. Distributed under Creative Commons CC-BY 4.0
How to cite this article
Huo Y, Jia L, Zhang G, Ma J, Zhang C, Guo X, Song Y, Hao S. A Portable SM9541-Based Monitoring System and Stacked Ensemble Model for Recognizing Anxiety-Related Respiratory Patterns. J Biomed Res Environ Sci. 2025 Sept 16; 6(9): 1244- 1264. doi: 10.37871/jbres2181, Article ID: JBRES2181, Available at: https://www.jelsciences.com/articles/jbres2181.pdf
Subject area(s)
References
- Park SH, Park SK. An updated systematic review and meta-analysis of the predictive validity of the general anxiety disorder (GAD)-7 and GAD-2 in screening for anxiety disorders. J Affect Disord. 2025 Dec 15;391:119913. doi: 10.1016/j.jad.2025.119913. Epub 2025 Jul 14. PMID: 40669726.
- Beesdo K, Knappe S, Pine DS. Anxiety and anxiety disorders in children and adolescents: developmental issues and implications for DSM-V. Psychiatr Clin North Am. 2009 Sep;32(3):483-524. doi: 10.1016/j.psc.2009.06.002. PMID: 19716988; PMCID: PMC3018839.
- Penninx BW, Pine DS, Holmes EA, Reif A. Anxiety disorders. Lancet. 2021 Mar 6;397(10277):914-927. doi: 10.1016/S0140-6736(21)00359-7. Epub 2021 Feb 11. Erratum in: Lancet. 2021 Mar 6;397(10277):880. doi: 10.1016/S0140-6736(21)00473-6. PMID: 33581801; PMCID: PMC9248771.
- Baxter AJ, Scott KM, Vos T, Whiteford HA. Global prevalence of anxiety disorders: a systematic review and meta-regression. Psychol Med. 2013 May;43(5):897-910. doi: 10.1017/S003329171200147X. Epub 2012 Jul 10. PMID: 22781489.
- Craske MG, Stein MB, Eley TC, Milad MR, Holmes A, Rapee RM, Wittchen HU. Anxiety disorders. Nat Rev Dis Primers. 2017 May 4;3:17024. doi: 10.1038/nrdp.2017.24. Erratum in: Nat Rev Dis Primers. 2017 Dec 14;3:17100. doi: 10.1038/nrdp.2017.100. PMID: 28470168; PMCID: PMC11009418.
- Zhang XM. Pay attention to hyperventilation syndrome [in Chinese]. Kai Juan You Yi. 2024.
- Spitzer RL, Kroenke K, Williams JB, Löwe B. A brief measure for assessing generalized anxiety disorder: the GAD-7. Arch Intern Med. 2006 May 22;166(10):1092-7. doi: 10.1001/archinte.166.10.1092. PMID: 16717171.
- Kroenke K, Spitzer RL, Williams JB, Monahan PO, Löwe B. Anxiety disorders in primary care: prevalence, impairment, comorbidity, and detection. Ann Intern Med. 2007 Mar 6;146(5):317-25. doi: 10.7326/0003-4819-146-5-200703060-00004. PMID: 17339617.
- Panda R, Kumar R, Biradar O. Anxiety detection on ECG signal using fuzzy deep learning. Procedia Comput Sci. 2025;258:1823-32. doi: 10.1016/j.procs.2025.04.434.
- Lu L, Jiang Y, Li X, Wang H, Zou Q, Wang Q. Depression and anxiety detection method based on serialized facial expression imitation. Eng Appl Artif Intell. 2025;149:110354. doi: 10.1016/j.engappai.2025.110354.
- Wu XL, Yang YH. On hyperventilation syndrome and its prevention [in Chinese]. Ke Xue Sheng Huo. 2025;(1):14-5. doi: 10.20197/j.cnki.kxsh.2025.01.005.
- Hematology Oncology Committee of China Anti-Cancer Association; Lymphoid Disease Group, Chinese Society of Hematology, Chinese Medical Association; Chinese Working Group of Follicular Lymphoma; Society of Hematology, Chinese Geriatrics Society; Lymphoma Expert Committee of Chinese Anti-cancer Association; Lymphoma Expert Committee of Chinese Aging Well Association. [Chinese expert consensus on the diagnosis and management of elderly patients with follicular lymphoma (2024)]. Zhonghua Xue Ye Xue Za Zhi. 2024 Sep 14;45(9):801-808. Chinese. doi: 10.3760/cma.j.cn121090-20240701-00243. PMID: 39414601; PMCID: PMC11518910.
- Xie YG. Design and research of an intelligent assisted breathing trainer for home use [in Chinese]. Dian Zi Ji Shu Yu Ruan Jian Gong Cheng. 2022;(19):70-4. doi: 10.20109/j.cnki.etse.2022.19.016.
- Wu HF, Li SD, Zhu GY. Control system design of ankle rehabilitation robot based on ESP32 [in Chinese]. Autom Technol Appl. 2025;44(6):136-9. doi: 10.20033/j.1003-7241.2025.06.0136.
- Chen LJ, Ge XZ, Zhang Q, et al. Research on background noise test method for piezoelectric MEMS hydrophone [in Chinese]. Chuanganqi Yu Jicheng Xitong. 2025;44(9):46-9. doi: 10.13873/J.1000-9787(2025)09-0046-04.
- Zhang BY, Gao JF, Zhang Y. Design of a non-contact sleep respiration detection system based on radar sensor [in Chinese]. Xian Dai Dian Zi Ji Shu. 2024;47(22):7-11. doi: 10.16652/j.issn.1004-373x.2024.22.002.
- Reynard D, Billet JB, Barraud A, Mazzara C. Kalman filter in quality assurance in radiotherapy: a practical application for daily dose quality control. Biomed Signal Process Control. 2025;110(Pt A):108143. doi: 10.1016/j.bspc.2025.108143.
- Baigang D, Shuo H, Jun G, Tang H, Wang L, Zhou S. Interval forecasting for urban water demand using PSO optimized KDE distribution and LSTM neural networks. Appl Soft Comput J. 2022;122:108798. doi: 10.1016/j.asoc.2022.108875.
- Wang C, Tao Y. VIF-TOPSIS coupling algorithm for image quality assessment in smart construction site management. Autom Constr. 2025;176:106239. doi: 10.1016/j.autcon.2025.106239.
- Cheng X, Li X, Ma X. A method for battery fault diagnosis and early warning combining isolated forest algorithm and sliding window. Energy Sci Eng. 2023;11(12):4493-504. doi: 10.1002/ese3.1621.
- Zhu Q, Shi WJ, Yang YC. Preparation and evaluation of micro-pellets of Dianjixueteng extract [in Chinese]. Zhong Nan Yao Xue. 2025;23(4):983-9.
- Zhang G, Ma C, Yan C, Luo H, Wang J, Liang W, Luo J. MSFN: a multi-omics stacked fusion network for breast cancer survival prediction. Front Genet. 2024 Aug 2;15:1378809. doi: 10.3389/fgene.2024.1378809. PMID: 39161422; PMCID: PMC11331006.
- Tang YD, Cheng M, Liu J, et al. Research on earthquake emergency supplies demand prediction based on PSO-SVM-SST model [in Chinese]. J Geod Geodyn. 2025 Jan 10; [Epub ahead of print]. doi: 10.14075/j.jgg.2025.01.011.
- Liu XS, Zhang ZB. SVM parameter optimization based on improved grid search method [in Chinese]. Jiangxi Ligong Daxue Xuebao. 2019;40(1):5-9. doi: 10.13265/j.cnki.jxlgdxxb.2019.01.002.
- Cai KP, Ma LJ. XGBoost analysis and research based on consumer behavior [in Chinese]. Guangxi Minzu Daxue Xuebao (Ziran Kexue Ban). 2024;30(1):79-84. doi: 10.16177/j.cnki.gxmzzk.2024.01.011.
- Sun KY, Dai XL, Hai CB. Fault diagnosis research on air pump of electrical control system based on vibration sensor [in Chinese]. Qing Gong Ke Ji. 2025;41(4):83-5,104.
- Xu H, Zheng QL, Xie ZL, et al. Interpretable deep learning model based on knowledge representation vectors and its application in disease prediction [in Chinese]. Shu Ju Cai Ji Yu Chu Li. 2023;38(4):777-91. doi: 10.16337/j.1004-9037.2023.04.003.
- Dai YQ, Peng L, Xie NP. Digital empowerment: digital extraction of intangible cultural heritage Miao embroidery patterns based on Visual Transformer [in Chinese]. Si Chou. 2024;61(7):14-24. doi: 10.3969/j.issn.1001-7003.2024.07.002.
- Bandelow B, Michaelis S. Epidemiology of anxiety disorders in the 21st century. Dialogues Clin Neurosci. 2015 Sep;17(3):327-35. doi: 10.31887/DCNS.2015.17.3/bbandelow. PMID: 26487813; PMCID: PMC4610617.
- Khalaf F, Baskaran SS. Predicting acute respiratory failure using fuzzy classifier. In: Proceedings of the 2023 International Conference on IT Innovation and Knowledge Discovery (ITIKD); 2023 Mar 10-12; Manama, Bahrain. Piscataway (NJ): IEEE; 2023. p. 1-4. doi: 10.1109/ITIKD56332.2023.10099746.
- J S, Naik PP, Padukudru MA, Koolagudi SG, Rajan J. Attention-based CRNN models for identification of respiratory diseases from lung sounds. In: Proceedings of the 2023 14th International Conference on Computing Communication and Networking Technologies (ICCCNT); 2023 Jul 6-8; Delhi, India. Piscataway (NJ): IEEE; 2023. p. 1-7. doi: 10.1109/ICCCNT56998.2023.10306490.
- Zhu YM, Gu JN, Shan YZ. DSDLF-UNet: A lightweight multi-scale network structure for chip surface defect segmentation [in Chinese]. Bandao Ti Jishu. 2025.
- Guy EFS, Knopp J, Lerios T, Chase JG. Pressure, flow, and dynamic thoraco-abdominal circumferences data for adults breathing under CPAP therapy (version 1.0.0). PhysioNet. 2023. doi: 10.13026/25q9-y416.
- Goldberger AL, Amaral LA, Glass L, Hausdorff JM, Ivanov PC, Mark RG, Mietus JE, Moody GB, Peng CK, Stanley HE. PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals. Circulation. 2000 Jun 13;101(23):E215-20. doi: 10.1161/01.cir.101.23.e215. PMID: 10851218.