Abstract
Secondary control plays a crucial role in ensuring stable and efficient operation of microgrids, but it is also equally vulnerable to false data injection (FDI) attacks. This paper proposes a neural network-driven adaptive predictive compensation (APC) strategy for resilient distributed secondary control. The method integrates a residual fully connected neural network (RFCNN), dynamic threshold-based attack detection, and adaptive switching control. Specifically, upon detecting an attack, the affected portion is isolated via switching control and replaced with a new control loop based on the predictive compensation mechanism. This effectively mitigates the adverse impact of attacks on secondary control, ensuring stable system frequency and precise power distribution. In the tested FDI attack scenario, the attack is detected approximately 20 ms after injection, and the microgrid largely restores stable operation within about 0.25 s. The RFCNN achieves an RMSE of 0.0108, which is reduced by approximately 8.5%, 20.6%, and 50.2% compared with BPNN, LSTM and NARX, respectively. Simulation and FPGA-in-the-loop experiments further verify the effectiveness and practical feasibility of the proposed strategy for enhancing microgrid resilience against FDI attacks.