## 2 Materials and Methods
### PINN Architecture  
The proposed Physics-Informed Neural Network (PINN) architecture for distribution system state estimation is designed to predict the complex bus voltages--comprising both magnitudes and angles--based on complex power injections at each bus. Although the physical quantities involved are complex-valued, the network operates entirely on real-valued tensors by decomposing all complex inputs and outputs into their real and imaginary parts. The architecture comprises the following key components, schematically presented in Figure 1:  
* Input Layer: The input to the network consists of the complex power injections \(S\ =\ P\ +\ jQ\) at each bus. These are decomposed into their real and imaginary parts and concatenated to form a real-valued input vector of size \(2N\), where \(N\) is the number of buses in the network. * Hidden Layers: The core of the model consists of two fully connected hidden layers, each with 256 neurons and hyperbolic tangent (Tanh) activation functions. This configuration was selected based on preliminary hyperparameter tuning, which showed that 256 neurons per layer provided a favorable trade-off between model capacity and computational efficiency. The use of Tanh activations further supports the network's ability to capture complex nonlinear mappings while ensuring smooth gradients for optimization. * Output Layer: The network outputs a real-valued vector of size \(2N\), which is interpreted as the real and imaginary parts of the estimated complex bus voltages. Specifically, the first \(N\) entries correspond to \(Re(V)\) and the next \(N\) entries to \(Im(V)\). By representing complex variables as concatenated real-valued vectors, this architecture enables efficient training using standard real-valued deep learning frameworks while preserving the underlying structure of complex-valued power system quantities. The key innovation in the PINN approach is the physics-informed loss function that combines data-fitting terms with physics-based constraints. The total loss is formulated as:  
\[L_{total}=L_{voltage}+\lambda L_{current} \tag{3}\]  
where \(L_{voltage}\) measures how well the estimated voltages match the available measurements, \(L_{current}\) encodes the physics constraints by evaluating consistency with current injections, and \(\lambda\) is a regularization parameter (or weighting coefficient) that controls the trade-off between data fidelity and physics consistency. This approach falls under the broader category of physics-based regularization [19; 25], where physical knowledge is integrated as a soft constraint into the learning process. It enables the neural network to generalize better by leveraging both measurements and domain knowledge, making it particularly effective in power system applications. The voltage loss \(L_{voltage}\) quantifies the discrepancy between estimated and measured voltage states using the Mean Squared Error (MSE):  
\[L_{voltage}=\frac{1}{m}\sum_{i=1}^{m}\big{[}V_{i}-\hat{V_{i}}\big{]}^{2} \tag{4}\]  
where \(m\) is the number of measurements, \(V_{i}\) is the measured voltage, and \(\hat{V_{i}}\) is the predicted voltage phasor at node \(i\). The physics-based current loss \(L_{current}\) enforces adherence to power flow equations by ensuring that the predicted voltages lead to consistent current injections. More specifically, the predicted voltages based on the power injections are utilized to calculate the currents that emerge using the equation:  
\[\hat{\mathbf{I}}=\mathbf{Y}\cdot\hat{\mathbf{V}} \tag{5}\]  
where \(\hat{\mathbf{I}}\) is the estimated current injection vector and \(\mathbf{Y}\) is the network admittance matrix encapsulating the specific topology and impedance of each node. These estimated currents  
Figure 1: Implemented architecture for the state estimation neural network.