Inductor
This section details the Inductor model implemented in this project, which represents an electrical inductor component within the simulation of a power system. The model supports both frequency domain analysis (using admittance parameters) and modified nodal analysis (MNA) for the time domain. It is designed to handle single-phase and multi-phase inductor configurations, allowing for precise modeling of inductive effects across various system setups.
Mathematical Modeling
Single-Phase Inductor
For a single-phase system, the Inductor models a basic inductive component.
In the frequency domain, its impedance is:
\[\begin{equation} Z_L = j\omega L \end{equation}\]
where \(j\) is the imaginary unit, \(\omega\) the angular frequency, and \(L\) the inductance.
Its admittance is:
\[\begin{equation} Y_L = \frac{1}{j\omega L} \end{equation}\]
In the time domain, the voltage across an ideal inductor is proportional to the rate of change of current:
\[\begin{equation} v(t) = L \frac{di(t)}{dt} \end{equation}\]
The MNA formulation for a single-phase inductor incorporates this relationship.
Three-Phase Inductor Model
For multi-phase systems, such as a three-phase network, the Inductor class handles each phase independently. Each phase (\(a\), \(b\), \(c\)) can have its own inductance value. The model assumes no mutual coupling between phases, simplifying the representation for both balanced and unbalanced cases.
This allows accurate simulation of inductive effects for each individual phase.
Mathematical Representation
The Inductor class supports two primary mathematical representations, depending on the selected constructor:
Frequency-Domain (Y-Parameter based) �?used for steady-state AC analysis.
For a single-phase inductor with inductance \(L\), the admittance is:
\[\begin{equation} Y = \frac{1}{j\omega L} = \frac{1}{sL} \end{equation}\]
where \(s = j\omega\) is the complex frequency.
For a three-phase uncoupled system, the admittance matrix \(Y\) is diagonal:\[\begin{equation} Y = \begin{bmatrix} \frac{1}{sL_a} & 0 & 0 & -\frac{1}{sL_a} & 0 & 0 \\ 0 & \frac{1}{sL_b} & 0 & 0 & -\frac{1}{sL_b} & 0\\ 0 & 0 & \frac{1}{sL_c} & 0 & 0 & -\frac{1}{sL_c} \\ -\frac{1}{sL_a} & 0 & 0 & \frac{1}{sL_a} & 0 & 0 \\ 0 & -\frac{1}{sL_b} & 0 & 0 & \frac{1}{sL_b} & 0\\ 0 & 0 & -\frac{1}{sL_c} & 0 & 0 & \frac{1}{sL_c} \end{bmatrix} \end{equation}\]
The constructor for this mode directly computes and stores this symbolic admittance matrix.
Time-Domain (MNA-based) �?used for transient or general MNA analyses.
For an inductor connected between two nodes, \(n_1\) and \(n_2\), carrying current \(I_L\), the fundamental relationship is:
\[ V_{n_1} - V_{n_2} = L \frac{dI_L}{dt} \]
In the MNA formulation, an auxiliary variable representing the inductor current \(I_L\) is introduced for each phase.
After discretization (e.g., implicit Euler or trapezoidal rule), this relationship becomes:\[ V_{n_1} - V_{n_2} - s L I_L = 0 \]
This equation, combined with KCL equations at \(n_1\) and \(n_2\), is stamped into the MNA matrix.
The matrix entries for an inductor branch are defined as follows:The matrix entries for an inductor branch are defined as follows:
\(A_{\text{row}, \text{row}} = 1\)
(representing \(I_L\) on the right side of the equation, or a unity coefficient for the current variable itself)If connected to node \(n_1\) with index \(r_1\),
\(A_{\text{row}, \text{r1}} = -\dfrac{1}{L}\)If connected to node \(n_2\) with index \(r_2\),
\(A_{\text{row}, \text{r2}} = \dfrac{1}{L}\)For KCL equations at nodes:
\(A_{\text{r1}, I_L} = -1\) (current leaving node \(n_1\)),
and \(A_{\text{r2}, I_L} = +1\) (current entering node \(n_2\))
Code Explanation
For detailed code information, see the Harmony manual.