## 4 Case Study
### Result and Analysis  
To demonstrate the advantages of the proposed method, we selected four methods for comparison: Without RPO (without any reactive power control), DDPG without GCN (basic reinforcement learning without topology modeling), TD3 (an enhanced DDPG with twin critics and delayed updates), and the proposed SG-DDPG (which incorporates both safety constraints and graph-based feature extraction). Without RPO serves as a reference point to highlight the necessity of applying reactive power optimization techniques, especially under fluctuating load and generation conditions. TD3 and DDPG represent general reinforcement learning approaches that help assess the effectiveness of DRL in RPO strategies, but they do not account for spatial features. After 1000 training episodes, the training rewards of the three reinforcement learning algorithms were as shown in Figure 8.  
As shown in Figure 8, the Safe Graph DDPG (SG-DDPG) algorithm proposed in this study exhibited a consistent training trend with the two comparative algorithms. As the number of training episodes increased, the agent continuously learned control strategies satisfying the voltage security constraints, leading to a gradual convergence of rewards. The proposed method achieved higher cumulative rewards and demonstrated improved convergence stability compared to the DDPG and TD3 algorithms. To quantitatively evaluate the training effectiveness, three comparison metrics were defined: voltage deviation, network loss, and voltage violation rate. Voltage deviation measures the absolute value of the deviation of node voltages from the reference voltage at each time step during the control period, whereby a smaller value indicates greater voltage stability. Network loss quantifies the total active power loss across the network during the control period. The voltage violation rate is defined as the proportion of time steps in which any node voltage exceeds the safety threshold over the total number of time steps in each episode. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Hyperparameters**} & \multirow{2}{*}{**Actor Network**} & **Reward Critic** & **Cost Critic** \\  & & **Network** & **Network** \\ \hline Layer number & 3 & 3 & 3 \\ Learning rate & \(1\times 10^{-5}\) & \(1\times 10^{-4}\) & \(1\times 10^{-4}\) \\ Discount factor & 0.9 & 0.9 & 0.9 \\ Safe update factor & 0.002 & 0.002 & 0.002 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Hyperparameter values. Figure 7: Real-time load profiles over three consecutive days. Figures 9 and 10 illustrate the voltage magnitudes at all 33 buses over a typical day under the four different control strategies. Without effective voltage regulation, the system experienced widespread voltage violations. Although the application of the DDPG and TD3 algorithms mitigated some of these violations, a number of limit breaches still persisted. In contrast, the proposed safety-aware graph-based DDPG algorithm effectively regulated the control devices, maintaining all bus voltages within the secure range of [0.95, 1.05] p.u. This highlights the reliability of the proposed method in ensuring voltage safety. Detailed evaluation results are provided in Table 2.  
Figure 11 presents the total active power losses of the 33-bus system over a daily scheduling horizon under four different control strategies. The results indicate that all three reinforcement learning-based reactive power control methods significantly reduced network losses compared to the conventional approach. Notably, the proposed method achieved the lowest active power loss, while effectively maintaining voltage security, demonstrating its superior efficiency and constraint-awareness.