## 3 Generation of Equations
### Realizability Analysis
#### 3.2.2 Algorithm
In order to exhibit the behavior of each method in the worst case, simulations are performed with an especially low sample rate of \(f_{s}=10\) Hz. The results for each method are given in Figure 4, with comparison in Figure 4d. We see that the error of the proposed method is low (close to machine precision \(\simeq\)10\({}^{-16}\)) compared to standard methods. ## 5 Applications

This section is devoted to the simulation of three analog audio circuits by the application of Algorithms 1 and 2. Those circuits are a diode clipper, a common-emitter BJT audio amplifier, and a wah-pedal as a full device. Results obtained with (i) the method in Section 4 and (ii) with the offline circuit simulator LT-Spice [32] are compared. ### Diode Clipper

Diode clipper circuits can be found in several audio-distortion devices. They are made of one resistor and two diodes (\(n_{S}=0,\ n_{D}=3\)) connected to the ground in reversed bias (see Figure 5a). The external ports are the input/output and the ground (\(n_{P}=3\)). The resistor is current-controlled and the ground is removed. The vectors \((\mathbf{a},\mathbf{b})\) and the structure \(\mathbf{J}\) returned by Algorithm 1 are:

\[\underbrace{ \begin{pmatrix}i_{\text{R}}\\ v_{\text{D1}}\\ v_{\text{D2}}\\ \hline i_{\text{IN}}\\ v_{\text{OUT}}\end{pmatrix} }_{\mathbf{a}}=\underbrace{ \begin{pmatrix}0&-1&1&0&-1 \\ 1&0&0&1&0\\ -1&0&0&-1&0\\ \hline 0&-1&1&0&-1\\ 1&0&0&1&0\end{pmatrix} }_{\mathbf{J}}\cdot\underbrace{ \begin{pmatrix}v_{\text{R} }\\ i_{\text{D1}}\\ i_{\text{D2}}\\ \hline v_{\text{IN}}\\ i_{\text{OUT}}\end{pmatrix} }_{\mathbf{b}}.\]

The simulation is performed according to Algorithm 2 at the sample rate \(f_{s}=96\) kHz, with three Newton-Raphson iterations (shown to be enough to converge in practice). We apply a linearly increasing 1 kHz sinusoidal excitation \(u_{\text{IN}}=-v_{\text{IN}}\) during 10 ms with maximum amplitude 2 V (\(i_{\text{OUT}}=0\) A, \(v_{\text{GRP}}=0\) V). The output \(y_{\text{OUT}}=-v_{\text{OUT}}\) is given in Figure 5b. We see the signal is clamped between \(\pm 0.6\) V, in accordance with LT-Spice results. ### Common-Emitter BJT Audio Amplifier

Common-emitter bipolar-junction transistor (BJT) amplifiers are widely used as amplification stages in analog audio processing. They are made of two capacitors (\(n_{S}=2\)), two resistors, and one NPN transistor which is made of two nonlinear dissipative branches (\(n_{D}=4\), see Figure 6a and the dictionary in Table B1). The external ports are the input/output signals, the 9 V supply, and the ground (\(n_{P}=4\)). Note that the ground is removed. The resistor Rc is current-controlled, and the resistor Rf is voltage-controlled. The vectors (\(\mathbf{a},\mathbf{b}\)) and the structure \(\mathbf{J}\) returned by Algorithm 1 are given in Equations (31) and (32). \[ \begin{array}{rcl}\mathbf{a}&=&(i_{\text{Ci}},\,i_{\text{Co}}|v_{\text{Rf} },\,i_{\text{Rc}},\,v_{\text{Bc}},\,v_{\text{Be}}|i_{\text{IN}},\,v_{\text{OUT }},\,i_{\text{VCC}})\\ \mathbf{b}&=&(v_{\text{Ci}},\,v_{\text{Co}}|i_{\text{Rf}},\,v_{\text{Rc}},\,i_ {\text{Be}}|v_{\text{IN}},\,i_{\text{OUT}},\,v_{\text{VCC}})\end{array}  \tag{31}\]

\[ \begin{array}{rcl}\mathbf{J}&=&\left(\begin{array}{cccc|cccc}0&0&1&0&-1&1&0&0 &0\\ 0&0&0&0&0&0&-1&0\\ \hline-1&0&0&-1&0&0&-1&0&1\\ 0&0&1&0&-1&0&0&1&0\\ 1&0&0&1&0&0&1&0&-1\\ -1&0&0&0&0&0&-1&0&0\\ \hline 0&0&1&0&-1&1&0&0&0\\ 0&1&0&-1&0&0&0&0&1\\ 0&0&-1&0&1&0&0&-1&0\end{array}\right)\end{array}  \tag{32}\]

The system is reduced according to Appendix A, and the simulation is performed according to Algorithm 2 at the sample rate \(f_{s}=384\) kHz, with 10 Newton-Raphson iterations. The reason for increasing the sample-rate and the number of Newton-Raphson iterations is twofold. Firstly, it attenuates the effect of aliasing for input signals limited to the audio range (see [39] for details). Secondly, it ensures that the iterative solver converges, which is difficult due to the _numerical stiffness_ of the problem; that is, the Lipschitz constant associated to the initial Cauchy problem is very high, see [40].