Photovoltaic (PV) systems are increasingly integrated into smart grids with clean
energy production, but also with new cyber-physical threats. There is a need to identify
cyberattacks such as False Data Injection (FDI), Data Integrity Attacks (DIA), and Replay
Attacks (RA) to ensure grid stability and security. Traditional machine learning algorithms
assume access to large, balanced, and well-labeled datasets—a fact that does not apply for
operational PV systems where attack data is rare, heterogeneous, and constantly evolving.
This thesis addresses these challenges by suggesting a few-shot learning model for
the detection of cyberattacks in PV systems. Realistic attack instances were designed and
simulated to augment the dataset, and baseline machine learning classifiers like Random
Forest and XGBoost were evaluated. While a typical 1D-CNN model achieved high overall
accuracy ( 96%), it relies on adequate labeled attack data as well as retraining for novel
attacks.
For tackling such limitations, this study employs a Prototypical Network-based few-shot
learning architecture with a 1D-CNN encoder. The architecture learns to encode time-series
PV readings into a discriminative representation space in which class prototypes represent
different operating modes and types of attacks. Classification is obtained by calculating
distances to prototypes, enabling robust detection even from limited labeled samples.
Through intensive episodic training and refinement, the proposed method improved
few-shot classification from approximately 40% to significantly more than 97.5%. Compared
with baseline methods, it offers improved novel attack adaptability, data efficiency, and
interpretability. The results indicate that few-shot learning is a very promising way to build cyberattack detection systems resilient, scalable, and future-proof for distributed renewable
energy networks.
Keywords: Cyber-Physical System(CPS), Photovoltaic Systems (PV), Few-Shot Learning,
Prototypical Networks, Smart Grids, Anomaly Detection, 1D-CNN Encoder |