## 3 Generation of Equations
### Realizability Analysis
#### 3.2.2 Algorithm
## Appendix A Reduction

The dimension of system (5) can be reduced, considering the following decomposition of variable \(\mathbf{w}\) and function \(\mathbf{z}\):

\[\mathbf{w}\!=\!\left( \begin{array}{c}\mathbf{w_{L}}\\ \mathbf{w_{N}}\end{array} \right),\quad\mathbf{z}(\mathbf{w})\!=\!\left( \begin{array}{c}\mathbf{z_{L}}\cdot\mathbf{w_{L}}\\ \mathbf{z_{N}}(\mathbf{w_{N}})\end{array} \right),\]with \(\mathbf{z_{L}}\) a diagonal matrix whose elements are the resistance or conductance of linear dissipative components, and \(\mathbf{z_{N}}\) a collection of the nonlinear dissipative relations. Correspondingly, the structure matrices are decomposed as

\[\mathbf{K}\!=\!\left( \begin{array}{c}\mathbf{K_{L}}\\ \mathbf{K_{N}}\end{array} \right),\ \mathbf{G_{w}}\!=\!\left( \begin{array}{c} \mathbf{G_{L}}\\ \mathbf{G_{N}}\end{array} \right),\ \mathbf{J_{w}}\!=\!\left(\



## Appendix B Dictionary of Elementary Components

The dictionary is given in Table 11. We choose variables \(\mathbf{x}\) and \(\mathbf{w}\) so that matrices of the PHS (5) are canonical, that is, they do not involve any physical constants. ### Storage Components

Such components are defined by their storage function \(h\) associated with the constitutive laws of Table 11. In this paper, all storage components are linear dipoles. However, nonlinear components can also be considered if appropriate state and corresponding energy function can be found. ### Linear Dissipative Components

The characteristics of dissipative components are algebraic relations on \(\mathbf{w}\). Potentiometers are modeled as two time-varying resistors, the sum of which is \(R_{p}\). To avoid 0 value of the resistors, 1 \(\Omega\) have been added to those characteristics. The modulation parameter is \(\alpha\in[0,1]\). As an example, in Table 11, we choose a conductance between \(N_{1}\) and \(N_{2}\), and a resistance between \(N_{2}\) and \(N_{3}\), so that \(\mathbf{w}_{p}=[v_{p1},i_{p2}]^{\intercal}\). ### Nonlinear Dissipative Components

PN junctions are modeled as voltage-controlled components by the Shockley equation: \(z_{D}(w_{D})=i_{D}=l_{S}\left(e^{\frac{\pi D}{E\mathbf{w}_{0}}}-1\right)\), where \(l_{S}\) is the saturation current, \(\mu\) is an ideality factor, and \(v_{0}\) the reference voltage, specified for each diode type. Note that the passivity property is fulfilled\((\mathbf{z}_{D}(\mathbf{w}_{D})^{\intercal}.\mathbf{w}_{D}\geq 0)\). As in LT-Spice simulators, a minimal conductance \(G_{min}\) is added in Table 11. This helps convergence in the simulation process. NPN junctions are passive 3-ports, with dissipated power \(\mathtt{D}_{Q}=v_{B}\cdot i_{B}+v_{C}\cdot i_{C}+v_{E}\cdot i_{E}\geq 0\). Here we use the Ebers-Moll model, which preserves this passivity property. \(I_{S}\) is the saturation current, \(\beta_{R}\) and \(\beta_{F}\) are respectively the reverse and forward common emitter current gains, and \(v_{t}\) is the thermal voltage. The corresponding voltage-controlled dissipative characteristic \(\mathbf{z}_{Q}(\mathbf{w}_{Q})=[i_{BC},i_{BE}]^{\intercal}\) is given in Table 11, denoting \(\alpha_{R}=\frac{\beta_{B}+1}{\beta_{R}}\), \(\alpha_{F}=\frac{\beta_{F}+1}{\beta_{F}}\), and including minimal conductances. Note that \(\mathtt{D}_{Q}=\mathbf{z}_{Q}(\mathbf{w}_{Q})^{\intercal}.\mathbf{w}_{Q}\geq 0\). In our final simulations, some resistors are added to model the resistance of contacts in the nonlinear components, choosing the same values as in LT-Spice models. ### Incidence Matrices \(\Gamma\)

Incidence matrices for 2-ports, potentiometer \(\mathrm{P}\), and transistor \(\mathrm{Q}\) with conventions of Table 11.

\[\Gamma_{\text{2-port}}= \begin{pmatrix}B\\ 1\\ -1\end{pmatrix}\begin{matrix}N_{1}\\ N_{2}\end{matrix} ,\Gamma_{\mathrm{P}}= \begin{pmatrix}1&0\\ -1&1\\ 0&-1\end{pmatrix}\begin{matrix}N_{1}\\ N_{2}\end{matrix} ,\Gamma_{\mathrm{Q}}= \begin{pmatrix}1&1\\ -1&0\\ 0&-1\end{pmatrix}\begin{matrix}N_{B}\\ N_{C}\end{matrix} .