Computer Science ›› 2026, Vol. 53 ›› Issue (11): 376-386.doi: 10.11896/jsjkx.251000131

• High Performance Computing • Previous Articles     Next Articles

Intelligent Monitoring and Control Algorithm for Classroom Air Quality Based on Edge Computing

WANG Yiheng1, ZHANG Qixian2, MIAO Duoqian2   

  1. 1 School of Engineering,The University of Western Australia,Perth WA 6009,Australia
    2 School of Computer Science and Technology,Tongji University,Shanghai 201804,China
  • Received:2025-10-27 Revised:2026-02-08 Online:2026-11-15 Published:2026-11-10
  • About author:WANG Yiheng,born in 2003,postgra-duate.His main research interests include automation technology and computer technology.
    MIAO Duoqian,Ph.D supervisor.His main research interests include artificial intelligence,machine learning,granular computing and rough sets.
  • Supported by:
    National Science Foundation of China(62376198).

Abstract: To address the problems of high response delay,high cost,and dependence on cloud computing in traditional classroom indoor air quality(IAQ) monitoring systems,this paper proposes an edge-intelligent monitoring and hybrid control system based on the STM32F103C8T6 micro-controller.The system integrates multi-sensor data acquisition,air quality evaluation,and closed-loop control on the edge side,achieving coordinated operation between local decision-making and remote visualization.The hardware design incorporates an MQ-135 air quality sensor,DHT22 temperature-humidity sensor,BH1750 illumination sensor,and a PWM(Pulse Width Modulation) controlled fan module.On the software side,data acquisition and control logic are implemented in C language under the Keil5 environment,and a multi-sample averaging and hysteresis determination mechanism is applied to improve data stability.In terms of control strategy,a hybrid control scheme is adopted:the fan section uses a PID(Proportional-Integral-Derivative) based PWM regulation for smooth cooling,while the heating section employs a dual-threshold hysteresis strategy to achieve stable heating and suppress frequent on-off switching,thereby enhancing system stability and control precision while maintaining comfort and effectively suppressing overshoot.Experimental results show that the designed system performs well in response speed and control accuracy.With its low-cost hardware and rapid local decision-making capability,the system provides a low-cost alternative or complement to traditional programmable logic controller(PLC) schemes in small-scale classroom IAQ control scenarios,demonstrating the feasibility and potential of edge computing in low-power embedded IAQ intelligent monitoring applications.

Key words: STM32F103C8T6 micro-controller, Edge computing, Indoor air quality(IAQ), PID control, Dual-threshold hysteresis strategy

CLC Number: 

  • TP274
[1] ANDAMON M M,RAJAGOPALAN P,WOO J.Evaluation ofventilation in Australian school classrooms using long-term indoor CO2 concentration measurements[J].Building and Environment,2023,237:110313.
[2] FISK W J.The ventilation problem in schools:Literature review[J].Indoor Air,2017,27(6):1039-1051.
[3] SHI W,CAO J,ZHANG Q,et al.Edge computing:vision andchallenges[J].IEEE Internet of Things Journal,2016,3(5):637-646.
[4] HONAN D,GALLAGHER J,GARVEY J,et al.Indoor airquality in naturally ventilated primary schools:a systematic review of the assessment & impacts of CO2 levels[J].Buildings,2024,14(12):4003.
[5] FAN Y,CAO X,ZHANG J,et al.Short-term exposure to indoor CO2 and cognitive task performance:a systematic review and meta-analysis[J].Building and Environment,2023,237:110331.
[6] WARGOCKI P,WYON D P.The effects of moderately raised classroom temperatures and classroom ventilation rate on the performance of schoolwork by children[J].HVAC&R Research,2007,13(2):193-220.
[7] WEN C,DING X,WANG D Q,et al.Design of a ZigBee-based wireless temperature and humidity monitoring system for libra-ries [J].Journal of Qingdao University(Engineering & Techno-logy Edition),2016,31(2):26-31.
[8] MONTORI F,CONTIGIANI R,BEDOGNI L.Is WiFi suitable for energy-efficient IoT deployments? A performance study[C]//2017 IEEE 3rd International Forum on Research and Technologies for Society and Industry(RTSI).IEEE,2017:1-5.
[9] MEREMA B,DELWATI M,SOURBRON M,et al.Demandcontrolled ventilation(DCV) in school and office buildings:lessons learnt from case studies[J].Energy and Buildings,2018,172:349-360.
[10] CANDANEDO L M,FELDHEIM V.Accurate occupancy detection of an office room from light,temperature,humidity and CO2 measurements using statistical learning models[J].Energy and Buildings,2016,112:28-39.
[11] RUEDA L,AGBOSSOU K,CARDENAS A,et al.A comprehensive review of approaches to building occupancy detection[J].Building and Environment,2020,180:106966.
[12] MAO Y,YOU C,ZHANG J,et al.A survey on mobile edge computing:the communication perspective[J].IEEE Communications Surveys & Tutorials,2017,19(4):2322-2358.
[13] WU Z,HUANG H Z,FENG Y.Design of a carbon monoxide detection and indoor ventilation system based on STM32 [J].Modern Information Technology,2023,7(22):165-168.
[14] KARAGULIAN F,BARBIERE M,KOTSEV A,et al.Review of the performance of low-cost sensors for air quality monitoring[J].Atmosphere,2019,10(9):506.
[15] CONCAS F,MINERAUD J,LAGERSPETZ E,et al.Low-cost outdoor air quality monitoring and sensor calibration:a survey and critical analysis[J].ACM Transactions on Sensor Networks,2021,17(2):1-44.
[16] WANG L L,LIN B Q,CHEN Y,et al.Research on the application of PID algorithm based on Arduino in temperature measurement and control experiment[J].Physics and Engineering,2025,35(2):207-213.
[17] ZHANG A D,ZHANG Y R,LI T.Application of variable do-main fuzzy PID control in semiconductor laser temperature control system[J].Acta Optica Sinica,2021,41(12):1214003.
[18] JING X,GAO G W.Constant temperature control system based on PID regulation[J].Computer Measurement & Control,2021,29(4):110-114.
[19] DE DEAR R,BRAGER G S.Developing an adaptive model ofthermal comfort and preference[J].ASHRAE Transactions,1998,104(1):145-167.
[20] HU R,HU H P,ZHANG T H.Design and implementation of a contacts APP based on the App Inventor development platform[J].Shanxi Electronic Technology,2017(2):67-69.
[21] CLINCHARD S,HAVERINEN-SHAUGHNESSY U,SH-AUGHNESSY R.Assessing ventilation performance in schools using continuous CO2 monitoring:insights from renovation projects[J].Building and Environment,2025,269:112406.
[22] TAN H Y,OTHMAN M H D,KEK H Y,et al.Revolutionizingindoor air quality monitoring through IoT innovations:a comprehensive systematic review and bibliometric analysis[J].En-vironmental Science and Pollution Research,2024,31:44463-44488.
[23] SHAHID S,BROWN D J,WRIGHT P,et al.Innovations in air quality monitoring:sensors,IoT and future research [J].Sensors,2025,25(7):2070.
[24] HADJ SASSI M S,CHAARI FOURATI L.Comprehensive sur-vey on air quality monitoring systems based on emerging computing and communication technologies[J].Computer Networks,2022,209:108904.
[1] SHI Hongling, LI Jinhui, LI Chenghua, JIANG Xiaoping, DING Hao. Edge Load Prediction Method Based on s-TimeXer Combined Model [J]. Computer Science, 2026, 53(7): 343-353.
[2] WU Kankan, WANG Shaolin, JIANG Xiaoyong, LI Linwei, SANG Feng. Research on Edge Intelligent Computing Services for Space-based Remote Sensing [J]. Computer Science, 2026, 53(6A): 250700029-9.
[3] LIU Zixuan, TANG Xiaoyong. PID-Dynamic LSTM Generation Model for MCU Driver Code Based on Dynamically-tuned Cross-entropy Loss [J]. Computer Science, 2026, 53(6A): 250800005-9.
[4] LI Ruirui, GUO Rui, ZHANG Yinghui, LI Xuelei, LIU Guangjun. Edge Federated Learning Privacy Protection Scheme Based on Multi-key Homomorphic Encryption [J]. Computer Science, 2026, 53(6): 446-459.
[5] HUAN Haisheng, ZHAO Peng, CHEN Nuo, KA Zuming. Review of Offloading Technologies Research in Mobile Edge Computing [J]. Computer Science, 2026, 53(2): 367-378.
[6] WEI Manyi, WANG Gaocai, WEN Yihu. Game Theory-based Optimization of Flight Paths and Task Offloading in UAV-assisted MECSystems [J]. Computer Science, 2026, 53(2): 396-405.
[7] PAN Yongzhuo, WANG Tenghui, GUO Kunyin, XIA Yunni, ZHAO Han. Collaborative Optimization Framework for Dynamic Community Perception Task Offloading inMobile Edge Computing Environment [J]. Computer Science, 2026, 53(11): 363-375.
[8] CHEN Ranzhao, LI Zhexiong, GU Lin, ZHONG Liang, ZENG Deze. Joint Function Deployment Optimization Method for WebAssembly and Containers Based on Longest Latency-Weighted Bandwidth [J]. Computer Science, 2025, 52(9): 170-177.
[9] FAN Xinggang, JIANG Xinyang, GU Wenting, XU Juntao, YANG Youdong, LI Qiang. Effective Task Offloading Strategy Based on Heterogeneous Nodes [J]. Computer Science, 2025, 52(8): 354-362.
[10] WANG Xiang, HAN Qinghai, LIANG Jiarui, YU Xiaoli, WU Qi, QING Li. Research on Multi-user Task Offloading and Service Caching Strategies [J]. Computer Science, 2025, 52(7): 307-314.
[11] ZHAO Chanchan, WEI Xiaomin, SHI Bao, LYU Fei, LIU Libin, ZHANG Ziyang. Edge Computing Based Approach for Node Trust Evaluation in Blockchain Networks [J]. Computer Science, 2025, 52(6A): 240600153-8.
[12] ZHAO Chanchan, YANG Xingchen, SHI Bao, LYU Fei, LIU Libin. Optimization Strategy of Task Offloading Based on Meta Reinforcement Learning [J]. Computer Science, 2025, 52(6A): 240800050-8.
[13] CHEN Yitian, TONG Yinghua. Joint Optimization of UAV Trajectories and Computational Offloading for Space-Air-GroundIntegrated Networks [J]. Computer Science, 2025, 52(4): 74-84.
[14] WANG Dongzhi, LIU Yan, GUO Bin, YU Zhiwen. Edge-side Federated Continuous Learning Method Based on Brain-like Spiking Neural Networks [J]. Computer Science, 2025, 52(3): 326-337.
[15] DAI Mengxuan, XIA Yunni, MA Yong, MA Yuyin, DONG Yumin, LIU Hui, CHEN Peng, SUN Xiaoning, LONG Tingyan. Service Migration Path Selection Method Based on Interest and Mobility Perception in EdgeComputing Environment [J]. Computer Science, 2025, 52(11A): 250200002-8.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!