🤖 AI Summary
To address the security–performance trade-off in deploying reinforcement learning (RL) policies within building energy management systems (BEMS), this paper proposes a data-driven, lightweight policy mapping framework. Unlike conventional approaches, it preserves the original RL policy intact and achieves online safety-constraint embedding and real-time regulatory compliance via local linearization of the observation space and backward mapping of safety boundaries. The framework integrates Lyapunov-guided safety verification, local affine approximation, online policy projection, and historical-data-driven boundary learning. Evaluated on a microgrid simulation and hardware-in-the-loop testbed, the method achieves 100% avoidance of safety violations, incurs an average energy-efficiency degradation of less than 1.2%, and accelerates safety response by 3.8× over baselines including CPO and Safe-DDPG. To the best of our knowledge, this is the first work to jointly optimize high safety assurance and minimal performance loss in BEMS RL deployment.