## 2 Fundamentals  
### Real-Time Simulation Solution Procedure  
In real-time simulation, a common solution procedure to calculate the power system behaviour is modified nodal analysis (MNA), e.g., as employed by the commercial simulators _Hypersim_, _RTDS_[19] and the open-source simulator _DPsim_[18]. MNA provides a formalism to derive an equation system for the simulation of a given power system [20]:  
\[ \begin{bmatrix}\mathbf{Y}&\mathbf{B}\\ \mathbf{C}&\mathbf{0}\end{bmatrix}\begin{bmatrix}\mathbf{V}\\ \mathbf{I}\end{bmatrix} = \begin{bmatrix}\mathbf{J}\\ \mathbf{F}\end{bmatrix} . \tag{1}\]  
According to MNA, the shown LES incorporates the Kirchhoff current laws of all network nodes by means of the node admittance matrix \(\mathbf{Y}\), the node potentials \(\mathbf{V}\) and the vector \(\mathbf{J}\) of independent current sources. Independent voltage sources as well as either the current- or voltage-controlled ideal voltage and current sources are represented by means of matrices \(\mathbf{B}\) and \(\mathbf{C}\) together with vectors \(\mathbf{I}\) and \(\mathbf{F}\). To represent the behaviour of dynamic components, the equation system can incorporate previous states to calculate a new system state by including equivalent admittances and sources that embed information on the past [21]. The formulation in Equation (1) is compatible with linear network and ideal source models. However, in simulations with a high level of detail, more complex nonlinear models of dynamic power system components, such as high-order synchronous generator models or models of power electronics devices, are included. In general, the dynamic behaviour of such components can be described by a first-order nonlinear ordinary differential equation (ODE) system:  
\[\dot{\mathbf{x}}=f(\mathbf{x},\mathbf{u},t), \tag{2}\]  
where \(\mathbf{x}\) is the vector of the component's state variables, and \(\mathbf{u}\) is the vector of the component's input signals [22]. The literature contains several approaches to incorporate a nonlinear power system component described by an ODE system, as in Equation (2), into the MNA system representation of Equation (1). A traditional approach referred to as delayed-current injection method (DCIM) [23] calculates the nonlinear component behaviour based on the input from the previous time step, i.e., with a delay of one time step in the input, and incorporates the solution as a current source injection into the MNA system formulation [24]. However, this approach, which solves the nonlinear component equations separately from the system equations, may lead to significant inaccuracies and instabilities for larger time steps [19]. Other approaches partially or fully integrate the corresponding nonlinear ODE system into the MNA system formulation [19; 20; 25; 26]. Depending on the type of approach, this can lead to a variation in the entries in the MNA system matrix in two ways:  
1. _Time-varying matrix entries_, e.g., time-varying conductance entries that correspond to a high-order nonlinear voltage-behind-reactance (VBR) synchronous machine model [25];
2. _Iteratively varying matrix entries_ to run fixed-point algorithms, e.g., the NR method, to solve the nonlinearity by iterating multiple times within one time step. The matrix entries incorporate partial derivatives into the MNA system matrix [19; 20; 26]. Overall, depending on the considered power system components, the corresponding models and the chosen solution approach, a linear equation system (LES) is derived that can be written in generic matrix form as  
\[\mathbf{A}\mathbf{x}=\mathbf{b}, \tag{3}\]  
where \(\mathbf{A}\) is the MNA based system matrix, \(\mathbf{x}\) the solution vector of unknown current and voltage state variables, and \(\mathbf{b}\) is the right-hand side (RHS) vector of known current and voltage quantities. Based on the MNA, this LES is built in a systematic manner for a given power system.