Abstract
Existing cyberattack detection methods for smart grids such as Artificial Neural Networks (ANNs) and Deep Reinforcement Learning (DRL) often suffer from limited adaptability, delayed response, and inadequate coordination in distributed energy systems. These techniques may struggle to detect stealthy or coordinated attacks, especially under communication delays or system uncertainties. This paper proposes a novel Snitch Digital Twin (Snitch-DT) architecture for cyber-physical anomaly detection in grid-connected wind farms using Smart Voltage Source Converters (VSCs). Each wind generator is equipped with a local Snitch-DT that compares real-time operational data with high-fidelity digital models and generates trust scores for measured signals. These trust scores are coordinated across nodes to detect distributed or stealthy cyberattacks. The performance of the Snitch-DT system is benchmarked against previously published Artificial Neural Network (ANN)- and Deep Reinforcement Learning (DRL)-based detection frameworks. Simulation results using an IEEE 39-bus wind-integrated test system demonstrate improved attack detection accuracy, faster response time, and higher robustness under various cyberattack scenarios.
1. Introduction
To achieve the goal of 100% clean energy by 2035 [1], the deployment of Smart Voltage Source Converter (VSC)-enabled Distributed Energy Resources (DERs), such as wind generators, plays a pivotal role in enhancing the resilience, reliability, and flexibility of modern power systems. These DERs, characterized by decentralized ownership, diverse operational conditions, and dynamic control features, introduce new challenges in coordination, protection, and cybersecurity. The smart inverter (SI), a firmware-driven embedded VSC system, performs traditional grid-interfacing functions, including DC/AC and AC/DC conversion, while also supporting high-speed communication, remote control, edge/cloud computing, and advanced grid-support functions [2].
The growing adoption of smart VSCs in wind farms opens promising avenues for grid-supportive functionalities, including autonomous voltage support, Volt–Var (VV) and Volt–Watt (VW) control, dynamic reactive power regulation, and real-time control orchestration across distributed assets. Standards such as IEEE 1547-2018, IEEE 1547.2-2023, and IEEE 2800-2022 have established interconnection and interoperability requirements for DERs and inverter-based resources (IBRs), enabling them to actively participate in voltage regulation, reactive power control, ride-through, and grid-support functions [3,4,5]. Unlike legacy systems where capacitor banks, tap-changing transformers, and centralized supervisory control were dominant in voltage regulation, smart VSCs embed these control functions directly into inverter firmware and local control loops. Therefore, coordinated operation between smart VSCs, legacy voltage-control devices, and grid operators is becoming increasingly important in renewable-rich power systems [6].
However, the increasing digitization, programmability, and communication capability of smart VSCs have also expanded the cyber-physical attack surface of renewable energy systems. Cyber adversaries can exploit vulnerabilities in communication channels, measurement streams, firmware updates, and remote setpoint commands. In wind-farm applications, attacks on reactive power setpoints, terminal voltage feedback, grid-side converter control loops, or communication links can cause abnormal reactive power injection, voltage oscillations, degraded damping, converter stress, and cascading instability. False Data Injection (FDI), delay, replay, ramp, bias, denial-of-service, and coordinated multi-node attacks are particularly concerning because they can remain hidden within normal operating bounds for a short period while gradually degrading grid performance.
As reported by the Department of Energy (DOE), cyber intrusion events in the energy sector have been consistently rising, with 36 incidents recorded in early 2023 alone [7]. Several recent studies have attempted to address these security concerns through attack detection and mitigation mechanisms. Long Short-Term Memory (LSTM) and other neural network-based approaches have been employed to detect anomalies in photovoltaic systems, microgrids, and smart-grid measurement streams [8,9]. Supervised learning techniques have been used to track reactive power setpoints and mitigate false data in smart inverters [10], while Deep Reinforcement Learning (DRL) methods such as Deep Q-Networks (DQN) and Proximal Policy Optimization (PPO) have demonstrated potential in learning adaptive control and mitigation policies under cyberattack conditions [11]. Blockchain-enabled firmware verification modules [12] and Hardware Security Modules (HSMs) [13] have also been proposed to reinforce the physical security perimeter of inverter firmware and command-and-control communication.
More recently, the literature has expanded from generic smart-grid intrusion detection toward cyber-resilient smart inverters, DER-rich distribution systems, digital twin-enabled monitoring, and physics-aware anomaly detection. Recent survey and review studies on smart-inverter cybersecurity and DER cyber-resiliency emphasize that modern inverter firmware, grid-support functions, communication interfaces, remote setpoints, and over-the-air update mechanisms create new cyber-physical vulnerabilities that cannot be fully addressed through conventional IT security practices alone [14,15,16]. These works provide important taxonomies of attack surfaces, defense-in-depth strategies, and resilience frameworks, including prevention, detection, mitigation, and recovery. However, most survey-level studies do not provide a real-time distributed detection architecture for wind-farm VSCs operating under cyber-physical attack conditions.
Digital twin (DT) technologies have also gained attention for cybersecurity and resilience applications in power and energy systems. DT-based approaches maintain a synchronized virtual representation of a physical asset, allowing the expected behavior of the system to be compared with real-time measurements. Prior studies have explored DT-based self-security of smart inverters, smart-inverter twin models for anomaly detection, cyberattack detection and mitigation in DC microgrids, and cyber-physical laboratory twins for evaluating smart-grid countermeasures [17,18,19,20]. A particularly relevant concept is the Snitch Digital Twin, where a digital replica acts as a silent observer that detects abnormal behavior by comparing the physical entity with its expected virtual behavior [21]. These developments provide a strong foundation for DT-enabled security; however, existing DT-based work has primarily focused on individual inverters, DC microgrids, laboratory cyber ranges, or centralized monitoring structures. The application of a coordinated Snitch-DT architecture to smart VSC-enabled wind farms remains comparatively underexplored.
Other recent works have investigated graph-based, federated, observer-based, and physics-aware detection methods. Graph Neural Network (GNN)-based and graph autoencoder-based methods have been proposed to capture spatial correlations in power-system measurements and detect stealthy FDI attacks [22,23]. Federated learning has been applied to improve privacy-preserving FDIA detection across distributed smart-grid nodes [24]. Physics-aware watermarking and unknown-input-observer-based methods have also shown promise for detecting stealthy attacks in cyber-physical microgrids and grid-tied DER systems [25]. Although these approaches provide important advances, many require extensive offline training, labeled datasets, centralized data aggregation, topology-specific model tuning, active watermark injections, or periodic retraining to remain effective under unseen operating conditions. In addition, most existing detection and mitigation approaches treat inverter nodes either as isolated units or as components within a centralized monitoring framework, which can overlook spatially correlated cyberattacks that target multiple DERs simultaneously.
1.1. Research Motivation
Despite these advancements, three important gaps remain that form the main motivation for this work. First, many data-driven methods, including ANN, LSTM, GNN, and DRL-based approaches, depend heavily on representative training data and may experience degraded performance under unseen attack patterns, changing grid topology, or operating conditions not included in the training dataset. Second, many model-based and observer-based approaches focus on local detection but do not explicitly coordinate trust information across multiple DER nodes. Third, relatively limited attention has been given to cyber-physical anomaly detection in wind-farm VSC systems, where grid-side converter reactive power control, voltage regulation, and multi-node coordination are central to system performance. These gaps motivate a distributed, physics-informed, and real-time detection framework that can validate local inverter behavior while also recognizing coordinated attack patterns across a wind-integrated power system.
To address these limitations, this paper proposes a novel Snitch Digital Twin (Snitch-DT) framework for anomaly detection in smart VSC-enabled wind power systems. In the proposed architecture, each wind generator is equipped with a local Snitch-DT module that mirrors the real-time dynamics of the physical VSC system. The Snitch-DT continuously compares measured variables with simulated outputs from a high-fidelity virtual model and computes residuals between physical and virtual responses. These residuals are then converted into dynamic trust scores that quantify the likelihood of abnormal or compromised behavior in the monitored signal stream or control loop. Unlike centralized or node-isolated detection methods, the proposed framework enables multiple Snitch-DT modules to communicate trust scores across wind-generator nodes, allowing the system to detect not only isolated anomalies but also stealthy and coordinated attacks that span multiple DER locations. Table 1 summarizes representative recent work and highlights the remaining research gap addressed by the proposed Snitch-DT framework.
Previous smart-inverter twin studies [17,18] developed device-level models to screen incoming setpoints, while the original Snitch-DT study [21] introduced collaborative twins for detecting anomalous relationships among physical entities. Building on these foundations, this work develops and evaluates a framework for grid-side converters in a network containing multiple wind generators. Local twins generate physics-based residuals and trust scores, which the Energy Management Center (EMC) evaluates together with node-level anomaly flags to classify isolated and coordinated events. The study examines this framework under several attack types on a modified IEEE 39-bus system and compares its performance with ANN- and DQN-based detection.
The motivation of this work is to design and validate a cooperative, physics-informed, and real-time anomaly detection framework using Snitch Digital Twins across smart VSC-equipped wind generators. The detection performance of the proposed Snitch-DT architecture is benchmarked against the authors’ previously developed Artificial Neural Network (ANN)-based detection method [26] and Deep Reinforcement Learning (DRL)-based cyberattack mitigation framework [27] using the same grid structure, attack scenarios, and system performance metrics.
1.2. Key Contributions
The key contributions of this paper are summarized as follows:
- A high-fidelity Snitch-DT model is developed for each smart VSC-enabled wind-generator node, enabling local cyber-physical anomaly detection through residual generation and trust-score computation.
- A distributed trust-score coordination mechanism is introduced to aggregate anomaly evidence across multiple wind-generator nodes and improve robustness against spatially correlated and coordinated cyberattacks.
- The proposed framework is validated under multiple cyberattack scenarios, including bias FDI attacks, ramp FDI attacks, delay attacks, and coordinated cross-node attacks, using a detailed MATLAB/Simulink [R2024b] model of the IEEE 39-bus system with wind generators integrated at multiple buses.
- The performance of the proposed Snitch-DT framework is benchmarked against ANN-based and DRL-based detection methods using detection accuracy, false-positive rate, false-negative rate, detection delay, F1 score, reactive power tracking RMSE, and computation time.
- This study demonstrates that a distributed Snitch-DT architecture can provide faster, more accurate, and more explainable anomaly detection than purely data-driven or policy-learning approaches, while also supporting improved post-attack stabilization through early detection of abnormal VSC behavior.
Table 1.
Comparison of recent related works in cyber-physical anomaly detection for DERs, smart inverters, microgrids, and wind/VSC systems.
2. Cyberattack Modeling and Proposed Detection Method
Figure 1 shows the grid-connected wind farm integration scheme, where the wind generators are connected to the IEEE 39 bus system through the rotor-side converter (RSC), grid-side converter (GSC), transformer, and transmission lines [26,27]. The VSCs, local Energy Management Center (EMC), and Inverter Management System (IMS) are interconnected through the cyber network. In the control architecture of a doubly fed induction generator (DFIG)-based wind generator, the GSC is responsible for reactive power compensation to maintain voltage regulation and ensure grid stability [36]. Under normal operation, the GSC regulates the grid reactive power, Qg, according to the voltage-reactive power (Q–V) droop characteristic defined by the secondary PI controller. However, malicious False Data Injection (FDI) attacks targeting the GSC’s reactive power setpoints can cause abnormal power flows, voltage instability, and long-term damage to inverter assets. In this work, we propose a novel anomaly detection method using a Snitch-DT framework to detect such attacks in real time.
Figure 1.
Cyber-physical structure of the wind farm connected to bus 1 of the IEEE 39-bus test system. Wind farms are also connected to buses 5, 21, and 26 of the IEEE 39-bus system.
2.1. Digital Twin-Based Cyberattack Detection Framework
The Snitch-DT module is a high-fidelity digital replica [19] of the physical smart VSC controller and is co-simulated in real time with the physical system. Unlike traditional state estimators that infer internal system states based solely on real-time measurements and system models, digital twins (DTs) maintain a continuously running, physics-informed replica of the actual system, enabling the simulation of system dynamics beyond just current states. As illustrated in Figure 2, for each wind generator node, the Snitch-DT continuously receives the input signals from the physical inverter system, such as the grid voltage Vg(t), grid current Ig(t), and measured grid reactive power Qg(t). The digital twin (DT) also simulates its own estimate of these values using the same control model and known references under the assumption of no attack. Any discrepancy between the simulated and real system output forms the residual signal, and the residual vector is defined in (1):
Figure 2.
Proposed control architecture to detect the cyberattack in the voltage source converter at each wind generator node. Note: * represent reference signals.
This residual is then passed through a statistical anomaly thresholding mechanism to identify abnormal behavior. A local residual alarm is generated when any residual component exceeds its corresponding threshold:
where ϵ is a calibrated threshold based on system noise and modeling error. In addition to residual generation, each Snitch-DT computes a dynamic trust score for the monitored GSC, quantifying the residual-based trust score. The trust score τ(t) ∈ [0, 1] is updated over time using a uniformly weighted sliding window of past residuals, as expressed in (3):
Here, (N) is the number of samples in the window, and D = diag () are the residual variances estimated under healthy operating conditions. Normalization accounts for the different scales of the three residual components. Increasing normalized residual energy decreases, indicating a greater departure from nominal behavior.
The state-space model represents the converter dynamics through its state variables, control inputs, and outputs. The descriptor observer uses the model and available measurements to estimate the converter states and generate the predicted outputs used for residual calculation. The nonlinear compensation block accounts for nonlinear behavior and modeling mismatch in the prediction process. The governing model equations and converter parameters are adopted from [28].
Each Snitch-DT computes a local trust score using Equation (3) and sends the score and its anomaly flag directly to the Energy Management Center (EMC). The exponential mapping in Equation (3) produces a score that decreases as the average normalized residual energy increases. Lower values of indicate a greater departure from nominal behavior. The EMC centrally evaluates reports from the four wind-generator nodes at buses 1, 5, 21, and 26. In each evaluation interval, the EMC compares the trust score of each flagged node with the prescribed threshold and counts the distinct nodes that reported an anomaly. A single flagged node is classified as an isolated anomaly. Two or more distinct nodes flagged within the same evaluation interval are classified as a coordinated event. Figure 3 summarizes the reporting and decision process.
Figure 3.
Snitch Digital Twin-based cyber-physical anomaly detection algorithm flowchart. The proposed Snitch-DT operates as a continuous real-time monitoring module, so the detection process is repeated at every sampling instant without a terminal end condition.
Figure 3 represents the proposed Snitch Digital Twin-based cyber-physical anomaly detection algorithm for smart VSC-enabled wind generators. The local Snitch-DT receives real-time VSC measurements and controller references, runs a synchronized digital replica under the no-attack assumption, computes residuals between measured and virtual outputs, and updates a dynamic trust score. If the local residual or trust score violates the predefined threshold, the node flags a local anomaly and shares its trust score with neighboring Snitch-DT modules. The distributed trust-score aggregation layer then determines whether the event is isolated or coordinated across multiple wind-generator nodes and reports confirmed cyberattacks to the EMC/IMS for logging, validation, and mitigation.
2.2. Deep Reinforcement Learning (DLR)-Based Detection
The Deep Reinforcement Learning (DRL) method, presented in our earlier work [27], uses a Deep Q-Network (DQN) framework to detect anomalies in the control loops of Smart Voltage Source Converters (VSCs) associated with wind generators under cyberattack conditions. The detection problem is formulated as a Markov Decision Process (MDP), in which the operating condition of the VSC is represented by a set of observed states. These states consist primarily of the wind-generator terminal voltage and output current measurements, which reflect changes in the electrical response of the converter during normal and compromised operating conditions.
The observed state variables are supplied to a neural network-based Q-function that estimates the expected cumulative reward associated with each possible detection action. The DRL agent is trained offline through repeated interactions with the simulated power-system environment under both normal and cyberattack conditions. During training, the agent gradually learns an optimal detection policy by minimizing the temporal-difference (TD) loss between the predicted and target Q-values. The Q-network contains two hidden layers with Rectified Linear Unit (ReLU) activation functions, enabling it to capture the nonlinear relationships between the measured VSC variables and the corresponding system operating states.
Once the offline training process is completed, the trained DRL agent is deployed for online anomaly detection. At each sampling interval, the agent evaluates the measured terminal voltage and current signals, determines the corresponding Q-values, and identifies abnormal behavior by tracking deviations from the expected reference trajectories. When the observed system response is classified as inconsistent with normal VSC operation, the agent generates an anomaly signal and initiates the corresponding detection action.
2.3. Supervised Learning-Based Detection
As a benchmark, a supervised Artificial Neural Network (ANN) model developed in our previous work [26] is used to detect False Data Injection (FDI) attacks targeting the reactive power control loop of smart VSCs. The ANN is trained using labeled measurements collected under normal and cyberattack operating conditions. Its objective is to learn the nonlinear relationship between the grid-side voltage (Vg(t)), grid-side current (Ig(t)), and the corresponding reactive power setpoint of the converter.
The measured voltage and current signals are collected over a fixed observation window and arranged as the input features of the ANN. With (Ni = Nr × Nm) input features, where (Nr) represents the number of monitored variables and (Nm) represents the number of measurements within the observation window, the network produces an estimated reactive power setpoint (). During online operation, the estimated setpoint is continuously compared with the measured or commanded reactive power signal. The resulting deviation is expressed as in (4):
An anomaly alarm is generated when this deviation exceeds the predefined threshold (ϵ). Under normal operating conditions, the predicted and measured reactive power values remain sufficiently close, whereas an FDI attack produces a larger prediction error that causes the detection threshold to be violated.
3. Simulations and Analysis
3.1. Simulation Setup
To evaluate the performance of the proposed Snitch Digital Twin (Snitch-DT)-based anomaly detection framework, simulations are conducted on a modified IEEE 39-bus system in MATLAB/Simulink as shown in Figure 1 [26]. We used MATLAB/Simulink [R2024b] on a Windows 11 Enterprise system with an Intel Core i7-1355U and 16 GB of RAM for the simulation. Wind generator models are integrated at buses 1, 5, 21, and 26, each interfaced with the grid through smart VSCs. The wind generators and loads are scaled appropriately to conform to the IEEE 39-bus operational limits. The Snitch-DT framework is deployed locally at each wind generator, operating in parallel for distributed detection.
Each VSC is modeled to support Volt–Var (VV) and Volt–Watt (VW) control functionalities, in line with IEEE 1547 and IEEE 2800 standards [3,5]. Detection logic is implemented through user-defined function blocks that interface with Simulink through embedded MATLAB scripts. The digital twin models replicate VSC behavior based on dynamic system parameters and serve as real-time reference systems for anomaly detection via residual analysis.
Three detection strategies are implemented independently for comparison:
- Proposed Snitch-DT detection (model-based residual monitoring);
- Supervised learning-based ANN detection (data-driven statistical estimation);
- DRL-based detection using a Deep Q-Network (DQN).
To validate detection effectiveness under diverse threat conditions, four distinct cyberattack scenarios are simulated: no attack detection, which is the base scenario, False Data Injection (FDI) for bias and ramp attack, delay attack, and coordinated cross-node attack. For each attack type, 10 different unique scenarios are considered.
The plant measurements and twin predictions are evaluated at a sampling interval of 1 ms. Residual calculation pairs each measured sample with the twin prediction corresponding to the same simulation instant. Delay affecting this comparison is represented using a Simulink delay model.
The twin uses the reactive-power reference as its reference input. This establishes the signal paths available to the twin and the attack assumptions under which residual-based detection is evaluated.
The simulation data were partitioned by complete run. Thirty runs were used to train the DRL and ANN baselines, 30 separate runs were used to select the detection thresholds, and 10 runs were held out for final testing. Residual thresholds were selected by inspecting healthy residual ranges in the 30 runs reserved for threshold selection. Healthy residual data were also used to estimate the variances in Equations (1) and (2).
Each held-out run contributed 10 healthy and 10 attack time steps. The resulting test set comprised 200 evaluated time steps, with 100 healthy (50%) and 100 attack (50%). All three detection methods were evaluated on the same time steps by comparing their alarm decisions with the corresponding ground-truth labels.
For each scenario, system performance is assessed based on anomaly detection accuracy, false-positive rate (FPR), false-negative rate (FNR), detection delay, Root Mean Square Error (RMSE) in reactive power tracking, and computation time [26]. Simulation time steps are fixed to ensure deterministic evaluation across sessions.
To compare how detection timing affects the converter response in Figure 4, Figure 5, Figure 6 and Figure 7, the same corrective policy was applied to Snitch-DT, DRL, and ANN. When a detector issued an alarm, the reactive-power reference supplied to the grid-side converter’s PI controller was replaced with [identify the source of the replacement reference], following the procedure in [27]. The PI controller used the replacement reference to compute the reactive-power tracking error. Under this common policy, earlier detection activated the corrective action sooner.
3.2. Case I: False Data Injection (FDI)-Bias and Ramp Attack
In this scenario, two types of data manipulation attacks are simulated: a bias injection and a ramp attack, both targeting the reactive power setpoint of the wind generator’s grid-side voltage source converter (GSC). For the bias FDI attack, a step offset of +0.1 pu is injected at t = 0.1 s. This results in a consistent upward deviation in the reactive power reference, forcing the VSC to supply more reactive power than required. The ramp FDI attack, also triggered at t = 0.1 s, introduces a gradually increasing positive ramp over time, mimicking stealthy or progressive attacks. Figure 4 and Figure 5 represent the reactive power and voltage response of Wind Generator 1 under bias and ramp attacks, respectively, for three different detection cases. Without any detection mechanism, both bias and ramp attacks result in significant deviations in the reactive power output, destabilizing voltage regulation and potentially damaging connected equipment. With the implementation of the Snitch-DT framework, the attack-induced deviation is swiftly identified by comparing real and virtual measurements. The Snitch-DT offers superior tracking accuracy and fast stabilization compared to the other methods. Under the common corrective policy described in Section 3.1, Snitch-DT issued the alarm earlier than DRL and ANN. The earlier alarm activated the corrective action sooner, resulting in faster stabilization in the bias and ramp cases. The DRL-based detection approach, though more adaptive than the supervised ANN method, presents moderately higher overshoot and a longer settling time due to the inherent exploration–exploitation balance in policy learning. The ANN-based detection method performs the weakest among the three, showing slower detection latency and limited generalization.
Figure 4.
Reactive power response of wind generator 1 for a 0.1 pu bias attack.
Figure 5.
Voltage response of wind generator 1 for a 0.1 pu ramp attack at 0.1 s.
3.3. Case II: Delay Attack
In this scenario, a data latency cyberattack is introduced at t = 0.2 s by injecting a 20 ms time delay into the feedback path of the Smart Voltage Source Converter (VSC) controller in the Simulink environment. This results in the VSC operating based on outdated grid measurements, leading to degraded control performance. As shown in Figure 6, the terminal voltage of the wind generator experiences a noticeable deviation due to delayed control response. The voltage rises above the nominal 1 pu value and exhibits increased settling time and instability. Among the compared detection methods, the Snitch Digital Twin (Snitch-DT) framework demonstrates the fastest recognition and isolation of the latency-induced anomaly, effectively restoring voltage to nominal levels. In contrast, the DRL-based method provides moderate correction with slight delay, while the ANN-based detection lags further in response, allowing more pronounced voltage drift.
Figure 6.
Voltage response of wind generator 1 for a 20 ms delay attack at 0.2 s.
3.4. Case III: Coordinated Cross-Node Attack
In this scenario, a coordinated cross-node cyberattack is introduced by simultaneously manipulating the reactive power setpoints of multiple wind generators’ voltage source converters (VSCs). Unlike an isolated attack targeting a single converter, the coordinated attack alters several geographically distributed VSC control signals within a short time interval, producing correlated deviations across the wind-integrated power system. The combined effect of the compromised nodes can cause excessive reactive power exchange, abnormal voltage variations, increased oscillations, and degraded system-wide voltage regulation. As shown in Figure 7, the coordinated attack produces sustained deviations in the reactive power response of the affected wind generators and may propagate disturbances to neighboring buses. The Snitch Digital Twin (Snitch-DT) framework identifies the attack by comparing the measured and virtual responses at each VSC node and generating a corresponding local trust score. This detection mechanism enables the compromised nodes to be identified and isolated rapidly, resulting in faster restoration of the voltage and reactive power responses. In contrast, the DRL-based method provides moderate detection and correction but exhibits a longer response time because it evaluates the attack primarily through previously learned control policies. The ANN-based method shows the slowest detection and the largest system deviations, as its node-level predictions provide limited capability to recognize coordinated attack patterns that extend across multiple wind-generator locations.
Figure 7.
Reactive power response of wind generator 1 for a coordinated cross-node attack.
3.5. Evaluation of Anomaly Detection Performance
To evaluate and compare the anomaly detection performance of the considered methods Snitch-DT, DRL, and ANN, multiple performance metrics are analyzed: accuracy, FPR, FNR, detection delay, RMSE in reactive power tracking, computation time, and F1 score [26]. These metrics offer a holistic view of both detection efficacy and real-time feasibility.
In this context, false positives (FPs) refer to benign operational states misclassified as anomalies, while false negatives (FNs) correspond to actual attack instances failing to be detected. While both are undesirable, a high FN rate is particularly critical, as it implies missed cyberattacks. Detection accuracy, precision, and recall are calculated via Equation (5):
Based on precision and recall, we incorporate the F1 score as a comprehensive evaluation metric, which balances both precision and recall and offers a more reliable indication of detection performance under diverse attack scenarios. The F1 score is expressed via (6):
Detection performance was evaluated on the 200 held-out time steps described in Section 3.1. At the selected operating threshold for each method, the alarm decisions were compared with the ground-truth labels.
From the comparative bar chart in Figure 8, Snitch-DT exhibits superior performance with the highest accuracy of 95%, lowest FPR (2%), and lowest FNR (8%) among all methods. In terms of detection delay, Snitch-DT also achieves the fastest response (100 steps) compared to 400 steps for DRL and 600 steps for ANN. Its RMSE in tracking the reactive power reference is only 0.05 pu, confirming tight precision, whereas DRL and ANN show 0.15 pu and 0.25 pu, respectively. Here the RMSE indicates the reactive power tracking accuracy post-detection. Computation time also favors Snitch-DT, making it more viable for real-time anomaly detection applications in VSC systems. The computation times in Figure 8 are reported in milliseconds per detector update. For each method, one execution was timed per evaluated time step. The measurement covered detector operations and Energy Management Center (EMC) processing through the alarm decision. Node-to-EMC communication latency was represented separately in simulation time using a Simulink delay model. The reported execution times were 0.30 ms for Snitch-DT, 0.50 ms for DRL, and 0.70 ms for ANN.
Figure 8.
Comparison of the three detection methods in terms of different indices. Computation time is in milliseconds per detector update. The sampling interval is Ts = 1 ms.
Further, the Receiver Operating Characteristic (ROC) curves shown in Figure 9 reinforce these findings. The ROC curves in Figure 9 were generated by varying each method’s detection threshold over the same 200 held-out time steps. For Snitch-DT, the threshold was applied to the local trust score , with lower scores indicating stronger evidence of an anomaly. At each threshold, the false-positive rate and true-positive rate were calculated from the corresponding alarm decisions. The Snitch-DT curve remains consistently above those of DRL and ANN, achieving the highest Area Under the Curve (AUC) score, indicating strong discriminative power and low generalization error. While DRL follows closely with moderate AUC and slope, ANN shows more false positives across the spectrum, especially at lower detection thresholds.
Figure 9.
ROC curve comparison between three detection methods.
These observations confirm that Snitch-DT not only detects anomalies faster and more accurately but also ensures smoother system behavior during and after attacks. Its localized modeling through real-time mirrored virtual twins enables proactive inference of inconsistencies in the control layer, providing an advantage over policy-based DRL and purely data-driven ANN classifiers.
Overall, the performance analysis confirms that Snitch-DT achieves a balanced trade-off between speed, precision, and computational overhead, outperforming both DRL and ANN-based techniques across diverse cyberattack scenarios. A comprehensive comparison among all three considered cyberattack detection methods is presented in Table 2.
Table 2.
Comparison among different detection methods.
4. Conclusions
This paper proposed a novel Snitch Digital Twin framework for anomaly detection in Smart Voltage Source Converters of wind generator-integrated power grids. Unlike conventional learning-based models, Snitch-DT leverages a distributed virtual-physical system mirroring approach, enabling each VSC to locally validate its own operation while also participating in system-wide cross-verification.
Simulation results demonstrated the superior performance of the proposed method across various cyberattack scenarios. Compared to supervised ANN- and DRL-based PPO detection, the Snitch-DT consistently achieved the highest detection accuracy and F1 score with the lowest false-positive and false-negative rates. It also showed the fastest detection delay, outperforming DRL and ANN.
Interestingly, although Snitch-DT was designed for detection, its early detection capabilities, shared with corrective policy, led to improved post-attack stabilization. The reactive power tracking RMSE was lowest with Snitch-DT, followed by DRL and ANN, indicating indirect mitigation benefits due to faster response. Thus, the Snitch-DT architecture presents a robust, low-latency, and high-accuracy solution, and its ability to combine physical measurements with virtual replication makes it a promising candidate for next-generation cyber-physical grid security systems.
Future work will investigate adaptive selection of the corrective reactive-power reference based on the converter operating conditions.
Author Contributions
M.A.H.S.: Conceptualization, Methodology, Formal Analysis, Writing—Original Draft, Writing—Review and Editing, Visualization. S.G.: Conceptualization, Methodology, Formal Analysis, Writing—Original Draft, Writing—Review and Editing. S.J.P.: Data Curation, Methodology, Writing—Original Draft, Writing—Review and Editing. M.H.A.: Conceptualization, Methodology, Supervision, Writing—Original Draft, Writing—Review and Editing. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.
Conflicts of Interest
Author Soham Ghosh is employed by the company Black and Veatch. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
References
- U.S. Department of Energy. The Long Term Strategy of the United States—Pathways to Net-Zero Greenhouse Gas Emissions by 2050; U.S. Department of Energy: Washington, DC, USA, 2021.
- Li, Y.; Yan, J. Cybersecurity of Smart Inverters in the Smart Grid: A Survey. IEEE Trans. Power Electron. 2023, 38, 2364–2383. [Google Scholar] [CrossRef] [Scilit]
- IEEE 2800; Standard for Interconnection and Interoperability of Inverter-Based Resources (IBRs) Interconnecting with Associated Transmission Electric Power Systems. IEEE Standards Association: Piscataway, NJ, USA, 2022.
- IEEE 1547; Standard for Interconnection and Interoperability of Distributed Energy Resources with Associated Electric Power Systems Interfaces. IEEE Standards Association: Piscataway, NJ, USA, 2018.
- IEEE 1547.2; Standard for Interconnection and Interoperability of Distributed Energy Resources with Associated Electric Power Systems Interfaces. IEEE Standards Association: Piscataway, NJ, USA, 2023.
- Siahaan, Z.; Mallada, E.; Geng, S. Decentralized Stability Criteria for Grid-Forming Control in Inverter-Based Power Systems. In Proceedings of the IEEE Power & Energy Society General Meeting (PESGM), Seattle, WA, USA, 21–25 July 2024. [Google Scholar]
- U.S. Department of Energy. Electric Emergency Incident and Disturbance Reports; U.S. Department of Energy: Washington, DC, USA, 2023.
- Zhao, Y.; Jia, X.; An, D.; Yang, Q. LSTM-Based False Data Injection Attack Detection in Smart Grids. In Proceedings of the 35th Youth Academic Annual Conference of Chinese Association of Automation (YAC), Zhanjiang, China, 16–18 October 2020. [Google Scholar]
- Singh, R.; Gill, N.S.; Gulia, P. Attentional LSTM-ensemble architecture for intrusion detection in smart grids. Sci. Rep. 2025, 15, 41977. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Beikbabaei, M.; Montano, M.; Mehrizi-Sani, A.; Liu, C.-C. Mitigating False Data Injection Attacks on Inverter Set Points in a 100% Inverter-Based Microgrid. In Proceedings of the IEEE Power & Energy Society Innovative Smart Grid Technologies Conference (ISGT), Washington, DC, USA, 19–22 February 2024. [Google Scholar]
- Sanad, A.A.; Al-Shamery, E.S. Adaptive Intrusion Detection and Mitigation System Using Proximal Policy Optimization (PPO). In Proceedings of the 1st International Conference on Emerging Technologies and Engineering Systems (ICETES), Amaan, Jordan, 7–9 April 2026. [Google Scholar]
- Ahn, B.; Bere, G.; Ahmad, S.; Choi, J.; Kim, T.; Park, S.-W. Blockchain-Enabled Security Module for Transforming Conventional Inverters toward Firmware Security-Enhanced Smart Inverters. In Proceedings of the IEEE Energy Conversion Congress and Exposition (ECCE), Vancouver, BC, Canada, 10–14 October 2021. [Google Scholar]
- Hupp, W.; Hasandka, A.; Siqueira de Carvalho, R.; Saleem, D. Module-OT: A Hardware Security Module for Operational Technology. In Proceedings of the IEEE Texas Power and Energy Conference (TPEC), College Station, TX, USA, 6–7 February 2020. [Google Scholar]
- Ahn, B.; Kim, T.; Ahmad, S.; Mazumder, S.K.; Johnson, J.; Mantooth, H.A. An Overview of Cyber-Resilient Smart Inverters Based on Practical Attack Models. IEEE Trans. Power Electron. 2024, 39, 4657–4673. [Google Scholar] [CrossRef] [Scilit]
- Liu, M.; Teng, F.; Zhang, Z.; Ge, P.; Sun, M.; Deng, R. Enhancing Cyber-Resiliency of DER-Based Smart Grid: A Survey. IEEE Trans. Smart Grid 2024, 15, 4998–5030. [Google Scholar] [CrossRef] [Scilit]
- Chen, J.; Yan, J.; Kemmeugne, A.; Kassouf, M.; Debbabi, M. Cybersecurity of distributed energy resource systems in the smart grid: A survey. Appl. Energy 2025, 383, 125364. [Google Scholar] [CrossRef] [Scilit]
- Hossen, T.; Gursoy, M.; Mirafzal, B. Digital Twin for Self-Security of Smart Inverters. In Proceedings of the IEEE Energy Conversion Congress and Exposition (ECCE), Vancouver, BC, Canada, 10–14 October 2021. [Google Scholar]
- Hossen, T.; Sharma, D.; Mirafzal, B. Smart Inverter Twin Model for Anomaly Detection. In Proceedings of the IEEE 22nd Workshop on Control and Modelling of Power Electronics (COMPEL), Cartagena, Colombia, 2–5 November 2021. [Google Scholar]
- Lu, Y.; Zhang, M.; Nordström, L.; Xu, Q. Digital Twin-Based Cyber-Attack Detection and Mitigation for DC Microgrids. IEEE Trans. Smart Grid 2025, 16, 876–889. [Google Scholar] [CrossRef] [Scilit]
- Sen, Ö.; Bleser, N.; Ulbig, A. Digital Twin for Evaluating Detective Countermeasures in Smart Grid Cybersecurity. In Proceedings of the IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), Glasgow, UK, 31 October–3 November 2023. [Google Scholar]
- Calvo-Bascones, P.; Voisin, A.; Do, P.; Sanz-Bobi, M.A. A collaborative network of digital twins for anomaly detection applications of complex systems. Snitch Digital Twin concept. Comput. Ind. 2023, 144, 103767. [Google Scholar] [CrossRef] [Scilit]
- Su, X.; Deng, C.; Yang, J.; Li, F.; Li, C.; Fu, Y. DAMGAT-Based Interpretable Detection of False Data Injection Attacks in Smart Grids. IEEE Trans. Smart Grid 2024, 15, 4182–4195. [Google Scholar] [CrossRef] [Scilit]
- Takiddin, A.; Ismail, M.; Atat, R.; Davis, K.R.; Serpedin, E. Robust Graph Autoencoder-Based Detection of False Data Injection Attacks Against Data Poisoning in Smart Grids. IEEE Trans. Artif. Intell. 2024, 5, 1287–1301. [Google Scholar] [CrossRef] [Scilit]
- Li, Y.; Wei, X.; Li, Y.; Dong, Z.; Shahidehpour, M. Detection of False Data Injection Attacks in Smart Grid: A Secure Federated Deep Learning Approach. IEEE Trans. Smart Grid 2022, 13, 4862–4872. [Google Scholar] [CrossRef] [Scilit]
- Liu, M.; Zhang, X.; Zhu, H.; Zha, Z.; Deng, R. Physics-Aware Watermarking Embedded in Unknown Input Observers for False Data Injection Attack Detection in Cyber-Physical Microgrids. IEEE Trans. Inf. Forensics Secur. 2024, 19, 7824–7840. [Google Scholar] [CrossRef] [Scilit]
- Sadi, M.A.H.; Zhao, D.; Hong, T.; Ali, M.H. Time Sequence Machine Learning-Based Data Intrusion Detection for Smart Voltage Source Converter-Enabled Power Grid. IEEE Syst. J. 2023, 17, 2477–2488. [Google Scholar] [CrossRef] [Scilit]
- Sadi, M.A.H.; Hong, T.; Ali, M.H. Deep Reinforcement Learning-Based Cyberattack Mitigation for Smart Voltage Source Converter-Enabled Power Grid. In Proceedings of the IEEE Power & Energy Society Innovative Smart Grid Technologies Conference (ISGT), Washington, DC, USA, 19–22 February 2024. [Google Scholar]
- Masi, M.; Sellitto, G.P.; Aranha, H.; Pavleska, T. Securing Critical Infrastructures With a Cybersecurity Digital Twin. Softw. Syst. Model. 2023, 22, 689–707. [Google Scholar] [CrossRef] [Scilit]
- Murray, J.; Huang, C.; Parkinson, S.; Bolton, R.; Gledhill, D.; Parkinson, H. Unified Digital Twin Approach for Energy Grid Condition and Cybersecurity Monitoring. IEEE Access 2025, 13, 180710–180724. [Google Scholar] [CrossRef] [Scilit]
- Olivares-Rojas, J.C.; Reyes-Archundia, E.; Gutiérrez-Gnecchi, J.A.; Molina-Moreno, I.; Cerda-Jacobo, J.; Méndez-Patiño, A. Towards Cybersecurity of the Smart Grid Using Digital Twins. IEEE Internet Comput. 2022, 26, 52–57. [Google Scholar] [CrossRef] [Scilit]
- Coppolino, L.; Nardone, R.; Petruolo, A.; Romano, L.; Souvent, A. Exploiting Digital Twin technology for Cybersecurity Monitoring in Smart Grids. In ARES’23: Proceedings of the 18th International Conference on Availability, Reliability and Security, Benevento, Italy, 29 August–1 September 2023; Association for Computing Machinery: New York, NY, USA, 2023. [Google Scholar]
- Peng, S.; Liu, M.; Chai, L.; Deng, R. DST-GNN: A Dynamic Spatiotemporal Graph Neural Network for Cyberattack Detection in Grid-Tied Photovoltaic Systems. IEEE Trans. Smart Grid 2025, 16, 330–343. [Google Scholar] [CrossRef] [Scilit]
- Selim, A.; Zhao, J.; Ding, F.; Park, S.-Y. Adaptive Deep Reinforcement Learning Algorithm for Distribution System Cyber Attack Defense With High Penetration of DERs. IEEE Trans. Smart Grid 2024, 15, 4077–4089. [Google Scholar] [CrossRef] [Scilit]
- Zhao, S.; Yang, Q.; Cheng, P.; Deng, R.; Xia, J. Adaptive Resilient Control for Variable-Speed Wind Turbines Against False Data Injection Attacks. IEEE Trans. Sustain. Energy 2022, 13, 971–985. [Google Scholar] [CrossRef] [Scilit]
- Xing, Y.; Zhang, G.; Li, J.; Bamisile, O.; Cai, D.; Huang, Q. Vulnerability Analysis and Modeling False Data Injection Attack Against Voltage Source Converter in Renewable Generation Power System. ISA Trans. 2023, 143, 492–502. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wu, B.; Lang, Y.; Zargari, N.; Kouro, S. Power Conversion and Control of Wind Energy Systems; John Wiley & Sons: Hoboken, NJ, USA, 2011. [Google Scholar]
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.








