## 3 Detection of Cyber-Attacks with Supervised Machine Learning-Artificial Neural Networks
### Cyber-Physical PV-Powered Energy Island Structure
Conversely, in the opposite case (i.e., \(tana<0\)), the reference voltage is decreased, and the voltage value corresponding to the maximum power is meant  
Figure 2: The framework of the PV-powered EI structure includes a PV converter and addresses its cyber-attack threats. An adversary launches a hijacking attack to disable the controller communication. to be sent to the controller. The cascade control mechanism is a series of voltage controllers, current controllers, and pulse width modulation (PWM) controllers. \[\left.\frac{dP}{dV}\right|_{P=P_{MQP}}=0 \tag{1}\]  
As depicted in Figure 3, we aimed to deploy PV energy with a boost converter to dispatch the energy to the DC bus. To reduce ripple in boost converters, the inductor and capacitor values should be selected correctly. Proportional-integral-derivative (PID), proportional-integral (PI), or ANN-based control circuits should be incorporated to enhance stability and dynamic response. To track the maximum power point in PV systems, integration with the MPPT algorithm is necessary. Before proceeding, it is essential to note that we employed conventional cascaded PI reference voltage-current control in the proposed system. Additionally, while high switching frequency improves efficiency, it also introduces switching losses, making optimal frequency selection a critical factor. For defining state equations, the \(I_{L}\) and \(V_{C}\) should be considered to control that simplified system with duty cycle (\(d\)) as follows:  
\[\frac{dI_{L}}{dt}=\frac{1}{L}[(V_{PV}-(V_{C})(1-d)] \tag{2}\]  
\[\frac{dV_{C}}{dt}=\frac{1}{C}\bigg{[}(I_{L}(1-d)-\frac{V_{c}}{R}\bigg{]} \tag{3}\]  
After simplifying and linearizing the system with Equations (2) and (3), the transfer function between the converter input voltage-\(V_{PV}\) and the \(d\) can be stated through the small-signal model for the unidirectional DC-DC boost converter as follows  
\[G_{P}(s)=\frac{y(s)}{u(s)}=\frac{V_{PV}(s)}{d(s)}=\frac{\frac{-V_{DC}}{LC}}{s ^{2}+\frac{1}{RC}s+\frac{1}{LC}} \tag{4}\]  
The PID controller transfer function and closed-loop transfer function can be formulated as  
\[G_{c}(s)=\frac{k_{p}s^{2}+k_{p}s+k_{i}}{s} \tag{5}\]  
Figure 3: An FDI attack launched by the adversary aims to disrupt the controller’s sensor data. \[\frac{y(s)}{y_{ref}(s)}=\frac{G_{p}(s)G_{c}(s)}{1+G_{p}(s)G_{c}(s)} \tag{6}\]  
After multiplying Equations (4) and (5) to obtain Equation (6) can be found as  
Figure 1:0  
Then,  
Figure 1:1  
According to Equation (8), it is ready to assign the controller gains for loops. Proper control of the PV converter involves a cascaded voltage and current controller as outer and inner loops, respectively. While the outer voltage control loop has gains of \(k_{p}\) = 0.05 and \(k_{i}\) = 10, the inner current loop has \(k_{p}\) = 0.03 and \(k_{i}\) = 10. The proper control of power electronic converters is the backbone of transferring smooth power. Therefore, the control process should be efficient and problem-free. On the other hand, it is essential to note that these modern systems include IoT and remote-control infrastructures. Specifically, cyber-attacks on the control layer are inevitable in this era of technological advancements. Cyber-attacks on the controller connection in cyber-physical EIs can seriously threaten the system's security and operation. These attacks can directly damage the energy management system, manipulate data, or cause service interruptions. They can generally manifest in various forms, such as DoS attacks, man-in-the-middle (MitM) attacks, hijacking attacks, FDI attacks, and malware attacks. * DoS or distributed denial of service (DDoS) attacks inundate the controller and management systems with large amounts of fake data or traffic, overloading and crashing the system. If a DoS/DDoS attack occurs in an EI, control mechanisms may be incapacitated, disrupting energy distribution. * MitM attacks target communication between the controller and the central management unit.