Emergency Operation Scheme Generation for Urban Rail Transit Train Door Systems Using Retrieval-Augmented Large Language Models
Abstract
1. Introduction
- (1)
- First, we formulate EOS generation for URT train-door failures as a safety-critical, retrieval-augmented conditional generation task, rather than a general question-answering or recommendation problem.
- (2)
- Second, we construct a domain-specific evidence pipeline that jointly uses structured operational fields, unstructured maintenance/dispatch narratives, regulations, standard operating procedures, canonicalized historical cases, and a maintenance knowledge-graph channel to support context-aware generation.
- (3)
- Third, we introduce structure-aware generation controls, including schema-constrained serialization, explicit role assignment, citation grounding, and compliance-aware decoding, so that the generated EOS is executable and traceable rather than merely fluent.
- (4)
- Fourth, we validate the framework on 776 real train-door incidents using both retrieval-oriented and operational-usability-oriented metrics, together with expert evaluation, to assess whether the generated schemes are practically usable in URT operations.
2. Literature Review
2.1. Emergency Operation Schemes (EOSs) in Urban Rail Transit Systems
2.2. LLM and RAG Techniques in EOS Generation
2.3. Research Gap
3. Methodology
3.1. Research Framework
3.2. Fine-Tuning of the LLM for EOS Generation
3.3. Retrieval-Augmented Generation Modules and Implementation
3.4. Evaluation Protocol and Metrics
4. Data and Experimental Settings
4.1. Data
4.2. Experiment Settings
5. Results
5.1. Retrieval Performance
5.2. EOS Generation Quality
5.3. Samples of EOS Generation
6. Discussion
7. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
| API | Application programming interface |
| BM25 | Best Matching 25 (Okapi BM25) |
| BN | Bayesian network |
| DCU | Door control unit |
| DFMIS | Dispatching Fault Management and Analysis Database System |
| DDU | Door display unit |
| EDCU | Electronic door control unit |
| EOS | Emergency operation scheme |
| FTA | Fault tree analysis |
| HMI | Human–machine interface |
| KG | Knowledge graph |
| LLM | Large language model |
| LoRA | Low-rank adaptation |
| LSTM | Long short-term memory |
| MMR | Maximum marginal relevance |
| MOID | Metro operation incident database |
| MOS | Maintenance operation scheme |
| OCC | Operations Control Center |
| RAG | Retrieval-augmented generation |
| SOP | Standard operating procedure |
| URT | Urban rail transit |
References
- Lu, K.; Zhang, L.; Li, S.; Huang, Y.; Ding, X.; Hao, J.; Huang, S.; Li, X.; Lu, F.; Zhang, H. Urban Rail Transit in China: Progress Report and Analysis (2015–2023). Urban Rail Transit 2025, 11, 1–27. [Google Scholar] [CrossRef]
- Yang, R.; Song, M.; Guo, X.; Hu, X. Decoupling Relationship Analysis Between Carbon Emissions and Industry Development of Urban Rail Transit in China. Urban Rail Transit 2025, 11, 53–66. [Google Scholar] [CrossRef]
- Shiao, Y.; Gadde, P.; Liu, C.-Y. Wavelet-Based Analysis of Motor Current Signals for Detecting Obstacles in Train Doors. Appl. Sci. 2025, 15, 25. [Google Scholar]
- Yuan, W. Study and Optimal Design of the Integrated 37° Unidirectional SV-EMAT for Rapid Rail Flaw Detection. Sensors 2025, 25, 7424. [Google Scholar] [CrossRef]
- Mandal, T.; Rao, K.R.; Tiwari, G. Evacuation of metro stations: A review. Tunn. Undergr. Space Technol. 2023, 140, 105304. [Google Scholar] [CrossRef]
- Qu, L.; Chow, W.K. Platform screen doors on emergency evacuation in underground railway stations. Tunn. Undergr. Space Technol. 2012, 30, 1–9. [Google Scholar] [CrossRef]
- Hang, T.; Wen, J.; Zheng, S. Cumulative Failure Rate Prediction of EDCU in Subway Vehicles Based on RF–CNN–LSTM Model. Appl. Sci. 2025, 15, 7188. [Google Scholar]
- Cui, J.; Allan, A.; Lin, D. SWOT analysis and development strategies for underground pedestrian systems. Tunn. Undergr. Space Technol. 2019, 87, 127–133. [Google Scholar] [CrossRef]
- Zhou, M.; Dong, H.; Ning, B.; Wang, F.-Y. Parallel urban rail transit stations for passenger emergency management. IEEE Intell. Syst. 2019, 35, 16–27. [Google Scholar] [CrossRef]
- Ji, H.; Huang, Y.; Wang, F.; Zhu, L.; Liu, Z. Emergency Takeover Performance Evaluation of Train Operators in Semi-Automated Train Operation. Appl. Sci. 2026, 16, 1820. [Google Scholar] [CrossRef]
- Wei, Y.; Yang, X.; Xiao, X.; Ma, Z.; Zhu, T.; Dou, F.; Wu, J.; Chen, A.; Gao, Z. Understanding the Resilience of Urban Rail Transit: Concepts, Reviews, and Trends. Engineering 2024, 41, 7–18. [Google Scholar] [CrossRef]
- Khongsomchit, L.; Kaewunruen, S. Advancing circular economy implementation for high-speed train rolling stocks by the integration of digital twins and artificial intelligence. Sensors 2025, 25, 6473. [Google Scholar] [CrossRef] [PubMed]
- Cuconasu, F.; Trappolini, G.; Siciliano, F.; Filice, S.; Campagnano, C.; Maarek, Y.; Tonellotto, N.; Silvestri, F. The power of noise: Redefining retrieval for rag systems. In Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval, Washington, DC, USA, 14–18 July 2024; pp. 719–729. [Google Scholar]
- Jeong, C. Generative AI service implementation using LLM application architecture: Based on RAG model and LangChain framework. J. Intell. Inf. Syst. 2023, 29, 129–164. [Google Scholar]
- Yu, C.; Lin, H.; Dong, W.; Fang, S.; Yuan, Q.; Yang, C. TripChain2RecDeepSurv: A novel framework to predict transit users’ lifecycle behavior status transitions for user management. Transp. Res. Part C Emerg. Technol. 2024, 167, 104818. [Google Scholar] [CrossRef]
- Ding, X.; Yang, X.; Hu, H.; Liu, Z. The safety management of urban rail transit based on operation fault log. Saf. Sci. 2017, 94, 10–16. [Google Scholar] [CrossRef]
- Dong, H.; Ning, B.; Chen, Y.; Sun, X.; Wen, D.; Hu, Y.; Ouyang, R. Emergency management of urban rail transportation based on parallel systems. IEEE Trans. Intell. Transp. Syst. 2012, 14, 627–636. [Google Scholar] [CrossRef]
- Lin, S.; Jia, L.; Qin, Y.; Yu, B.; Wang, Y. Research on urban rail train passenger door system fault diagnosis using PCA and rough set. Open Mech. Eng. J. 2014, 8, 340–348. [Google Scholar] [CrossRef]
- Ge, S.; Shan, M.; Zhai, Z. Emergency Preparedness in China’s Urban Rail Transit System: A Systematic Review. Sustainability 2025, 17, 524. [Google Scholar] [CrossRef]
- Hegde, J.; Rokseth, B. Applications of machine learning methods for engineering risk assessment—A review. Saf. Sci. 2020, 122, 104492. [Google Scholar] [CrossRef]
- Zhang, X.; Deng, Y.; Li, Q.; Skitmore, M.; Zhou, Z. An incident database for improving metro safety: The case of shanghai. Saf. Sci. 2016, 84, 88–96. [Google Scholar] [CrossRef]
- Hu, G.; Feng, W.; Fan, Y.; Lv, X.; Wang, Y. Exploring the typical fault analysis of platform door system of electromechanical equipment in urban rail transit and insulation maintenance. In Proceedings of the International Conference on Smart Transportation and City Engineering (STCE 2022), Chongqing, China, 12–14 August 2022; pp. 768–772. [Google Scholar]
- Nguyen, T.H.A.; Trinckauf, J.; Luong, T.A.; Truong, T.T. Risk Analysis for Train Collisions Using Fault Tree Analysis: Case Study of the Hanoi Urban Mass Rapid Transit. Urban Rail Transit 2022, 8, 246–266. [Google Scholar] [CrossRef]
- Chen, R.; Zhu, S.; Hao, F.; Zhu, B.; Zhao, Z.; Xu, Y. Railway vehicle door fault diagnosis method with Bayesian network. In Proceedings of the 2019 4th International Conference on Control and Robotics Engineering (ICCRE), Nanjing, China, 20–23 April 2019; pp. 70–74. [Google Scholar]
- Louadah, H.; Mistry, P.; Tucker, G. A Fault Tree for Reliability Analysis of an Intercity Train Door. In Proceedings of the UNIfied Conference of DAMAS, IncoME and TEPEN Conferences (UNIfied 2023); Ball, A.D., Ouyang, H., Sinha, J.K., Wang, Z., Eds.; Springer Nature: Cham, Switzerland, 2024; pp. 1131–1141. [Google Scholar]
- Zhang, Y.; Liang, K.; Loo, B.P.Y. Measuring dynamic accessibility by metro system under travel time uncertainty based on smart card data. J. Transp. Geogr. 2025, 127, 104294. [Google Scholar] [CrossRef]
- Liu, T.; Ma, Z.; Koutsopoulos, H.N. Unplanned Disruption Analysis in Urban Railway Systems Using Smart Card Data. Urban Rail Transit 2021, 7, 177–190. [Google Scholar] [CrossRef]
- Mo, B.; Koutsopoulos, H.N.; Zhao, J. Inferring passenger responses to urban rail disruptions using smart card data: A probabilistic framework. Transp. Res. Part E Logist. Transp. Rev. 2022, 159, 102628. [Google Scholar] [CrossRef]
- Liu, T.; Koutsopoulos, H.N.; Ma, Z. Modeling the Duration of the Impact of Unplanned Disruptions on Passenger Trips Using Smartcard Data in Urban Rail Systems. Urban Rail Transit 2023, 9, 266–279. [Google Scholar] [CrossRef]
- Yang, J.; Dai, X.; Lv, Y.; KovÁCS, L.; Wang, F.-Y. TransRAG for parallel transportation: Toward reliable and trustworthy transportation systems via retrieval-augmented generation. Front. Inf. Technol. Electron. Eng. 2025, 26, 20–26. [Google Scholar] [CrossRef]
- Otal, H.T.; Stern, E.; Canbaz, M.A. LLM-Assisted Crisis Management: Building Advanced LLM Platforms for Effective Emergency Response and Public Collaboration. In Proceedings of the 2024 IEEE Conference on Artificial Intelligence (CAI), Singapore, 25–27 June 2024; pp. 851–859. [Google Scholar]
- Chen, C.; He, Y.; Wang, H.; Chen, J.; Luo, Q. DelayPTC-LLM: Metro Passenger Travel Choice Prediction under Train Delays with Large Language Models. arXiv 2024, arXiv:2410.00052. [Google Scholar]
- Geng, S.; Josifoski, M.; Peyrard, M.; West, R. Grammar-Constrained Decoding for Structured NLP Tasks without Finetuning. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing; Association for Computational Linguistics: Stroudsburg, PA, USA, 2023; pp. 10932–10952. [Google Scholar]
- Willard, B.T.; Louf, R. Efficient Guided Generation for Large Language Models. arXiv 2023, arXiv:2307.09702. [Google Scholar] [CrossRef]
- Beurer-Kellner, L.; Fischer, M.; Vechev, M. Prompting Is Programming: A Query Language for Large Language Models. Proc. ACM Program. Lang. 2023, 7, 1946–1969. [Google Scholar] [CrossRef]
- Beurer-Kellner, L.; Fischer, M.; Vechev, M. Guiding LLMs The Right Way: Fast, Non-Invasive Constrained Generation. In Proceedings of the 41st International Conference on Machine Learning, Vienna, Austria, 21–27 July 2024; pp. 3658–3673. [Google Scholar]
- Geng, S.; Döner, B.; Wendler, C.; Josifoski, M.; West, R. Sketch-Guided Constrained Decoding for Boosting Blackbox Large Language Models without Logit Access. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers); Association for Computational Linguistics: Stroudsburg, PA, USA, 2024; pp. 234–245. [Google Scholar]
- Lu, Y.; Li, H.; Cong, X.; Zhang, Z.; Wu, Y.; Lin, Y.; Liu, Z.; Liu, F.; Sun, M. Learning to Generate Structured Output with Schema Reinforcement Learning. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers); Association for Computational Linguistics: Stroudsburg, PA, USA, 2025; pp. 4905–4918. [Google Scholar]




| Fault Code | Occurrence Time | Train No. | Sub-Function | Base Function | Door Type | Level-1 Category | Level-2 Category | Level-3 Category | Specific Failed Component |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 9 January 2019, 08:30:15 | AC01-117 | Passenger-door mechanical | Door limit switch | Pneumatic built-in door | Electrical | Mechanism subcomponent damage | Limit switch | Door close limit switch |
| 2 | 15 January 2019, 09:23:17 | AC06-145 | Passenger-door electrical | Door control unit and circuits | Electric external door | Electrical | Mechanism subcomponent damage | – | Door controller (EDCU) |
| 3 | 18 January 2019, 17:30:25 | AC01-122 | Passenger-door electrical | Auxiliary component | Pneumatic built-in door | Electrical | Mechanism subcomponent damage | Indicator lamp | Indicator lamp |
| … | |||||||||
| 774 | 5 December 2024, 19:16:45 | DC01-107 | Passenger-door mechanical | EDCU electronic controller | Electric external door | Electrical | Mechanism subcomponent damage | Door controller EDCU | Door controller (EDCU) |
| 775 | 19 December 2024, 17:20:57 | AC06-147 | Passenger-door mechanical | Locking device | Pneumatic built-in door | Mechanical | Mechanism subcomponent damage | Locking device | Door hook |
| 776 | 27 December 2024, 20:42:38 | AC06-142 | Passenger-door electrical | Door control unit and circuits | Electric external door | Electrical | Mechanism subcomponent damage | Door controller EDCU | Door controller (EDCU) |
| Fault Code | Adjacent to Escalator | Terminal Delay ≤2 min (Count) | Cancelled Trains (Count) | Extra Trains (Count) | Delay 5–15 min (Count) | Delay 15–30 min (Count) | Passenger Clearance Fault (Count) | Passenger Clearance Adjustment (Count) | Total Passenger Clearance (Count) |
|---|---|---|---|---|---|---|---|---|---|
| 1 | No | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2 | No | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 3 | Yes | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| … | |||||||||
| 774 | Yes | 3 | 1 | 2 | 0 | 0 | 1 | 0 | 1 |
| 775 | No | 4 | 2 | 2 | 0 | 0 | 1 | 0 | 1 |
| 776 | Yes | 7 | 3 | 3 | 2 | 2 | 0 | 0 | 0 |
| Vehicle Maintenance Log | Operations Incident Log |
|---|---|
| Work order: Line 6 (temporary), 1 January 2019, 08:18. At Yuanshen Sports Center Station (up direction), train 0640#, operating cab TC1, passenger door 1-1 failure; the door has been isolated (cut out). | 08:18 The driver reported a passenger-door 1-1 failure in cab TC1 of train 0640# on the up direction. The traffic controller instructed the driver to conduct on-site isolation (cut-out) and notified vehicle dispatch. |
| 08:20 The driver confirmed the door had been cut out; the traffic controller instructed the driver to restore the correct driving mode and depart under signal authority. | |
| Work order: Line 1 (temporary), 3 January 2019, 13:50. At Shanghai Railway Station (down direction), train 0135#, passenger-door failure at car 8, door 5. | 13:50 Shanghai Railway Station (down), service 15396, train 0135#. The driver reported a passenger-door failure at the last door of the last car; repeated open/close attempts did not clear the fault. The OCC traffic controller instructed the driver to carry a handheld radio and conduct on-site handling, and notified vehicle dispatch. |
| 13:55 After on-site handling, the driver isolated (cut out) the left-side car 8 door 5 and the train resumed operation. | |
| 4 January 2019, 03:05 After the train returned to depot, CCTV review indicated foreign-object intrusion at door sill of door 2 on car 01601; the driver removed the object and isolated the door. Depot inspection found no abnormalities in the door cylinder, uncoupling small cylinder, limit switches, related components, or critical dimensions; repeated door cycling tests were normal. | |
| Work order: Line 5 (temporary), 7 January 2019, 14:23. At Dongchuan Road Station (up direction), train 0508#. Car 3 door 3 displayed a yellow door status (intermittent fault indication). | 14:23 Minhang Development Zone (up), service 0581MH, train 0508#. Driver (Lu Bin-feng) reported that the DDU in cab TC1 indicated a yellow door status for car 3 door 3; all door interlock (closed/locked) indicators were illuminated. |
| 14:28 Maintenance staff reported that the fault cleared after restarting subsystem S4 and the train met the operational conditions. | |
| 14:33 The driver reported again that the DDU indicated a yellow door status for car 3 door 3; door interlock indicators were not illuminated. The traffic controller instructed isolation (cut-out) of the faulty door while continuing operation and notified vehicle dispatch. | |
| 14:35 The driver confirmed the faulty door had been cut out; door interlock indicators returned to normal and the train resumed movement. The traffic controller instructed downstream stations to implement relevant passenger-service measures. | |
| 17:16 Maintenance staff reported that the door DCU was replaced and the fault was rectified; the train met the operational conditions, with follow-up depot inspection required (not yet fully closed out). | |
| 02:30 Vehicle dispatch reported that the car 3 door 3 yellow indication was confirmed as a failed DCU (MP2 A2). The MP2 A2 passenger-door control unit (DCU) was replaced; door cycling tests were normal and the fault was cleared. |
| Variable | Description | Value/Encoding |
|---|---|---|
| Dependent variable | ||
| Delay severity | Ordinal label derived from observed delay duration and major operational interventions | 0: no impact (<2 min); 1: mild (2–15 min); 2: moderate (15–30 min); 3: severe (≥30 min or turn-back/passenger clearance triggered) |
| Independent variables | ||
| Time period | Whether the fault occurred during peak hours | 0: off-peak; 1: peak |
| Station type | Station category at which the fault occurred | 0: non-hub; 1: hub |
| Adjacent to escalator | Whether the fault location is adjacent to an escalator | 0: no; 1: yes |
| Fault component features | Three-level tree-structured taxonomy of door components/failure modes | Tree/path encoding; converted to indicator features and later rendered into text slots |
| Hyperparameter | Meaning | Source | Value |
|---|---|---|---|
| Mixing weight between dense retrieval and BM25 in hybrid scoring. | Equation (19) | 0.6 | |
| BM25 term-frequency saturation parameter. | Equation (18) | 1.2 | |
| b | BM25 length-normalization parameter. | Equation (18) | 0.75 |
| Size of the initial candidate pool before reranking. | – | 30 | |
| k | Number of top reranked chunks retained for evidence selection. | Equation (20) | 10 |
| Maximum token budget for packed evidence context. | Equation (22) | 2000 | |
| Relevance–diversity trade-off coefficient in MMR-based evidence selection. | Equation (22) | 0.7 | |
| Temperature in the InfoNCE loss for dense retriever training. | Equation (21) | ||
| r | LoRA rank for parameter-efficient supervised fine-tuning. | – | 8 |
| LoRA scaling factor. | – | 32 | |
| Weight of schema violation loss. | Equation (15) | 0.5 | |
| Weight of role prediction loss. | Equation (15) | 0.5 | |
| Weight of citation grounding loss. | Equation (15) | 1.0 | |
| Weight of regularization. | Equation (15) | ||
| Learning rate | Optimizer learning rate for AdamW. | – | |
| Batch size | Mini-batch size used in supervised fine-tuning. | – | 16 |
| Epochs | Number of fine-tuning epochs. | – | 5 |
| Penalty coefficient for compliance-aware decoding. | Equation (27) | 2.0 | |
| Threshold for step-level evidence support. | Equation (28) | 0.7 | |
| Beam width | Beam size used in beam search decoding. | – | 4 |
| Margin parameter in the KG embedding loss. | Equation (24) | 1.0 | |
| Restart probability in personalized propagation over the KG. | Equation (25) | 0.15 |
| Setting | Relevance (Recall@5 ↑) | Compactness (FirstHit/B ↓) | Verifiability (Coverage@B ↑) |
|---|---|---|---|
| LangChain | 0.68 | 0.64 | 0.57 |
| Dense-only () | 0.63 | 0.71 | 0.58 |
| BM25-only () | 0.55 | 0.62 | 0.54 |
| Hybrid () | 0.71 | 0.55 | 0.66 |
| Hybrid + rerank ( + cross-encoder) | 0.78 | 0.46 | 0.71 |
| Setting | SchemaPass | RoleAcc | CiteCov | UsableAns (95% CI) |
|---|---|---|---|---|
| B0: Pure LLM API (no RAG, no FT) | 0.28 | 0.35 | - | 0.15 [0.10, 0.21] |
| B1: Pure LLM API + RAG (prompted, no FT) | 0.47 | 0.52 | 0.40 | 0.26 [0.20, 0.33] |
| B2: SFT-NLL (FT, no structured losses) | 0.58 | 0.69 | 0.42 | 0.41 [0.34, 0.49] |
| B3: +Schema+Role (FT + ) | 0.81 | 0.83 | 0.56 | 0.66 [0.58, 0.73] |
| B4: Full (FT + ) | 0.88 | 0.91 | 0.73 | 0.83 [0.77, 0.88] |
| Structured Question (Input) | Sample Output Result (EOS) |
|---|---|
| [Instruction]: You are an expert in urban rail transit emergency response. Based on the following fault operational context and retrieved maintenance regulations, generate a standardized Emergency Operation Scheme (EOS). [Contextual Features]:
[Retrieved Evidence]:
| [Generated EOS]: Phase 1: Initial Assessment
Phase 2: Emergency Handling
Phase 3: Service Restoration
|
| Structured Question (Input) | Sample Output Result (MOS) |
|---|---|
| [Instruction]: You are an expert in urban rail transit maintenance. Based on the following fault diagnosis and retrieved technical manuals, generate a standardized Maintenance Operation Scheme (MOS). [Contextual Features]:
[Retrieved Evidence]:
| [Generated MOS]: Phase 1: Diagnosis & Preparation
Phase 2: Component Replacement
Phase 3: Verification & Closure
|
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. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Huang, L.; Liu, Z.; Yu, C.; Zhu, T.; Yan, B. Emergency Operation Scheme Generation for Urban Rail Transit Train Door Systems Using Retrieval-Augmented Large Language Models. Sensors 2026, 26, 2006. https://doi.org/10.3390/s26062006
Huang L, Liu Z, Yu C, Zhu T, Yan B. Emergency Operation Scheme Generation for Urban Rail Transit Train Door Systems Using Retrieval-Augmented Large Language Models. Sensors. 2026; 26(6):2006. https://doi.org/10.3390/s26062006
Chicago/Turabian StyleHuang, Lu, Zhigang Liu, Chengcheng Yu, Tianliang Zhu, and Bing Yan. 2026. "Emergency Operation Scheme Generation for Urban Rail Transit Train Door Systems Using Retrieval-Augmented Large Language Models" Sensors 26, no. 6: 2006. https://doi.org/10.3390/s26062006
APA StyleHuang, L., Liu, Z., Yu, C., Zhu, T., & Yan, B. (2026). Emergency Operation Scheme Generation for Urban Rail Transit Train Door Systems Using Retrieval-Augmented Large Language Models. Sensors, 26(6), 2006. https://doi.org/10.3390/s26062006

