**4. Conclusions**

Various SG information as the experimental foundation is used in the present study, and property making for the original data is applied. The layout for identifying faults and cyber-attack in the electrical system is proposed. The present study uses various DML assessment indexes for evaluating the suggested model and conventional DML methods in the experiment. According to the outcomes, the information analyzing process improves the model's accuracy, and the AWV layout detects 37 types of behavior in electrical systems efficiently. As a result, machine learning can be used in the power grid to assist operators in making decisions. In other words, the smart grid operator can always check the health level of the data gathering by the PMUs all around the grid. In the case that any abnormality is detected, the possibility of an intentional cyber-attack exists, and thus, some cautious preoperation strategies shall be considered to keep the power and demand balance. Moreover, if the data readings from any PMU are unusual, the system operator can decide to estimate the system status without this PMU and rely more on the data coming from the other healthy PMUs.

**Author Contributions:** Conceptualization, A.A., S.A. and M.A.M.; methodology, A.A., S.A. and M.A.M.; software, A.A., S.A. and M.A.M.; validation, A.A., S.A. and M.A.M.; formal analysis, A.A., S.A. and M.A.M.; investigation, A.A., S.A. and M.A.M.; data curation, A.A., S.A. and M.A.M.; writing—original draft preparation, A.A., S.A. and M.A.M.; writing—review and editing, A.A., S.A. and M.A.M.; visualization, A.A., S.A. and M.A.M.; supervision, A.A., S.A. and M.A.M.; project administration, A.A. and S.A.; funding acquisition, A.A. and S.A. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research has been funded by the Scientific Research Deanship at the University of Ha'il—Saudi Arabia through project number RG-21079.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable. **Conflicts of Interest:** The authors declare no conflict of interest.
