# Detecting Jamming in Smart Grid Communications via Deep Learning
## 3 Scenario and Adversary Model  
In our reference PLC network shown in Figure 1, there are three main entities: [PERSON] (\(\mathcal{A}\)), [PERSON] (\(\mathcal{B}\)), and [PERSON] (\(\mathcal{E}\)). \(\mathcal{A}\) and \(\mathcal{B}\) are legitimate parties within either a home area network or local area network, communicating over the PLC in the presence of an adversary, \(\mathcal{E}\). \(\mathcal{E}\) aims to disrupt the communication between \(\mathcal{A}\) and \(\mathcal{B}\). At the receiver side (\(\mathcal{B}\)), the signal can be represented as  
\[Y_{\mathcal{B}}(t)=h_{\mathcal{A}-\mathcal{B}}X_{\mathcal{A}}(t)+h_{\mathcal{ E}-\mathcal{B}}J_{\mathcal{E}}(t)+n(t) \tag{1}\]  
where \(X_{\mathcal{A}}(t)\) represents \(\mathcal{A}\)'s legitimate signal with complex channel gain \(h_{\mathcal{A}-\mathcal{B}}\), \(J_{\mathcal{E}}(t)\) denotes \(\mathcal{E}\)'s jamming signal with complex channel gain \(h_{\mathcal{A}-\mathcal{B}}\), and \(n(t)\) is the external noise component.  
Detecting the presence of the jammer component (\(h_{\mathcal{E}-\mathcal{B}}J_{\mathcal{E}}(t)\)) in a link affected by noise \(n(t)\) is a challenging task. There are two assumptions we can make before going ahead with our analysis: (i) the receiver is aware of the shape of jammed signals, and, therefore, it had the opportunity to collect and analyze jammed samples before the actual detection process starts, or (ii) the receiver is not aware of the shape of jammed signals, and, therefore, it has never been exposed to jammed samples before the detection process is initiated.  
**Scenario 1: Awareness of Jammed Signals.** In the first scenario, we consider the case where both jammed and non-jammed data samples are available, enabling a supervised learning approach. The detection system utilizes labeled training data from both classes--\"jammed signal\" and \"non-jammed signal\" (see Section 5)--to develop a robust binary classification model for jamming detection. While this approach effectively identifies known attack patterns, it faces several significant challenges. First, collecting and maintaining representative jamming samples requires substantial effort, particularly as \(\mathcal{E}\)'s jamming techniques evolve over time. Second, the system must accurately differentiate between intentional jamming attacks and the noise due to the communication link. Finally, maintaining a balanced dataset between clear and jammed samples is crucial for maximizing the classification performance.  
**Scenario 2: Unawareness of Jammed Signals.** The second scenario presents a more realistic case where only clear (non-jammed) samples are available for training. This scenario employs an unsupervised learning approach, where the system builds a profile exclusively from clear (legitimate) data to detect anomalies. During the training phase, the model is exposed only to \"non-jammed\" signals, learning to characterize normal behavior patterns and identify potential attacks as deviations from these patterns. The detection mechanism relies on establishing appropriate thresholds to distinguish between normal operations and potential anomalies. This approach is characterized by the following challenges: determining the best threshold values that balance detection sensitivity with false alarm rates, discriminating between new attack patterns and legitimate signal variations, and adapting to changes in normal operating conditions.