## 6 Conclusions  
This paper presents a novel approach to effectively coordinating the control of UPFCs and PSSs while simultaneously addressing both the security of the power system and its generation cost. This approach is versatile and suitable for real-time and online scenarios, even in the presence of sudden disruptions like cyber-physical attacks. To achieve this, the proposed method employs a modified hybrid technique that combines multi-objective optimization with the MOHH and Lexicographic optimization technique. This innovative concept is adaptable to various network models, encompassing both network-preserving and network-reduction-based applications. Furthermore, it takes into consideration the intricacies of the power system and its dynamic controller during real-time simulations. Consequently, this approach empowers power managers to strike a balance between cost-effective operation and the assurance of system safety. The method underwent testing using both the IEEE 9-bus and IEEE 39-bus test systems. The simulation results demonstrate the power manager's ability to swiftly and accurately identify a secure and cost-effective operating point for both the system and its generators in real-time scenarios, even in the presence of transient disturbances like a cyber-physical line outage. Additionally, the method exhibits the ability to continuously estimate the optimal secure operating point for the system and manage the power flow passing through the transmission line throughout the real-time simulation without compromising the assessment of transient stability details. As a result, this approach proves to be highly \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Disturbance** & **Indexes** & **Operating** & **Speed** & **Voltage** & **CPU Time for** & **Number of** \\  & & **Cost (USD)** & **Deviation (pu)** & **Deviation (pu)** & **Optimization** & **Iterations** \\ \hline \multirow{4}{*}{\
\begin{tabular}{c} Line outage \\ between \\ buses 4 and 14 \\ \end{tabular} } & \multirow{2}{*}{**PM**} & **1999.66** & **0.00054** & **0.1961** & **1119.25** & **48** \\ \cline{3-6}  & & ✓ & ✓ & ✓ & \\ \cline{2-6}  & & & 199.93 & 0.0010 & 1.015 & 2541.3 & 62 \\ \cline{2-6}  & & � & ✓ & � & \\ \cline{2-6}  & & & 1999.95 & 0.0011 & 1.018 & 2812 & 71 \\ \cline{2-6}  & & � & ✓ & � & \\ \hline \multirow{4}{*}{
\begin{tabular}{c} Line outage \\ between \\ buses 2 and 39 \\ \end{tabular} } & \multirow{2}{*}{**PM**} & **2024.31** & **0.00041** & **0.1218** & **1119.25** & **48** \\ \cline{3-6}  & & ✓ & ✓ & ✓ & \\ \cline{2-6}  & & 2042.64 & 0.00541 & 0.954 & 2541.3 & 62 \\ \cline{2-6}  & & ✗ & ✓ & ✗ & \\ \cline{2-6}  & & ✗ & ✓ & ✗ & 2812 & 71 \\ \cline{2-6}  & & ✗ & ✓ & ✗ & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison performance of the PM and Previous SOTA methods in different scenario of cyber-attack to the IEEE 39\(-\)Bus. efficient, accurate, and straightforward, with minimal computational demands, making it well-suited for online and real-time applications. M.A.M.M. : Conceptualization, Methodology, Software, Data curation, Writing--Original draft preparation, Visualization, Investigation, Writing--Reviewing and Editing. N.U. : Conceptualization, Methodology, Software, Data curation, Writing--Original draft preparation, Visualization, Investigation, Writing--Reviewing and Editing. All authors have read and agreed to the published version of the manuscript. This research received no external funding. Not applicable. All data available in the article. The authors declare no conflicts of interest.