## 3 Generation of Equations
### Realizability Analysis
#### 3.2.2 Algorithm
At first, we turn the supply \(v_{\text{VCC}}=-9\) V on, and we wait 0.3 s for the system to reach its steady state. Then, we apply a 10 ms sinusoidal excitation \(u_{\text{IN}}=-v_{\text{IN}}\) at 1 kHz with linearly increasing amplitude between 0 V and 0.2 V (\(i_{\text{OUT}}=0\) A). The resulting output \(y_{\text{OUT}}=-v_{\text{OUT}}\) is given in Figure 6b. We see that the signal is amplified between 0 V and 9 V, with a strong asymmetrical saturation, in accordance with LT-Spice results. Additionally, spectrograms obtained for an exponential chirp on the audio range are given in Figure 7 (see Figure 16 in [39] for comparison). Figure 5: Simulation (Figure 5b) of a dissipative diode clipper (Figure 5a) at the sample rate \(f_{s}=96\) kHz, with three Newton–Raphson iterations, for a 10 ms sinusoidal excitation at 1 kHz with linearly increasing amplitude between 0 V and 2 V. (**a**) Diode clipper schematic; (**b**) Simulation of the diode clipper of Figure 5a. ### Wah Pedal

This section addresses the simulation of a full device (namely the Dunlop Cry-Baby wah pedal) to be used in real time. The circuit is given in Figure 9. It provides a continuously varying characteristic _wah_ filtering of the input signal. This circuit has been treated with the nodal discrete K-method in [41] and with the PHS framework in [42]. It is composed of \(n_{S}=7\) storage branches (6 capacitors and 1 inductor), \(n_{D}=18\) dissipative branches (11 resistors, 1 PN diode, 2 NPN transistors and a potentiometer), and \(n_{P}=3\) ports (input/output signals and battery, discarding the 5 grounds). The _wah_ parameter is the potentiometer's coefficient \(\alpha\). Notice this circuit includes several edges that do not contribute to the device input-to-output behavior, as analyzed in [41]. In this work, we consider the complete original schematic. From Algorithm 1, the resistors \(R_{1}\), \(R_{6}\cdots R_{9}\) and \(R_{11}\) are considered as conductances, and the others as resistances. The structure \(\mathbf{J}\) is not shown here. The sets of PHS variables are:

\[\dot{\mathbf{x}} = [i_{C1},\cdots,i_{C_{6}},v_{L_{1}}]^{\intercal},\] \[\
abla\mathcal{H}(\mathbf{x}) = [v_{C1},\cdots,v_{C_{6}},i_{L_{1}}]^{\intercal},\]

Figure 6: Simulation (Figure 6b) of the common-emitter bipolar-junction transistor (BJT) amplifier with feedback (Figure 6a) at the sample rate \(f_{s}=384\) kHz, with 10 Newton–Raphson iterations, for a 10 ms sinusoidal excitation at 1 kHz with linearly increasing amplitude between 0 V and 0.2 V. (**a**) Schematic of a common-emitter BJT amplifier with feedback; (**b**) Simulation of the BJT amplifier in Figure 6a. Figure 7: Results for the common-emitter BJT amplifier with feedback (Figure 6a). The input voltage signal is a 4 s exponential chirp on the audio range (20 Hz–20 kHz) with amplitude 0.05 V (logarithmic frequency scale). Simulation starts at 0.3 s (after the switching transient). (**a**) Spectrogram of output \(\tau\)OUT obtained with the proposed method; (**b**) Spectrogram of output \(\tau\)OUT obtained with LT-Spice. \[ \begin{array}{rcl}\mathbf{w}&=&[\mathbf{w}_{R}|v_{d}|v_{BC_{t}},v_{BE_{1}}|v_{ BC_{2}},v_{BE_{2}}|v_{p1},i_{p2}]^{\intercal},\\ \mathbf{z}(\mathbf{w})&=&[\mathbf{z}_{R}|i_{d}|i_{BC_{1}},i_{BE_{1}}|i_{BC_{2} },i_{BE_{2}}|i_{p1},v_{p2}]^{\intercal},\end{array} \]

where \(\mathbf{w}_{R}\) is the set of dissipative states and \(\mathbf{z}_{R}\) the set of characteristics according to each resistor's type, and

\[ \begin{array}{rcl}\mathit{Inputs}&\mathbf{u}&=&[v_{in},i_{out},v_{cc}]^{ \intercal},\\ \mathit{Outputs}&\mathbf{y}&=&[i_{in},v_{out},i_{cc}]^{\intercal}.\end{array} \]

The system is reduced according to Appendix A (with potentiometer's time varying resistors kept in \(\mathbf{w},\mathbf{z}\)). Firstly, we realize an offline simulation (in Python) with Algorithm 2 for the sampling rate \(f_{\mathrm{s}}=96\) kHz, and three Newton-Raphson iterations. We apply a white noise normalised to 1 V on the input \(u_{\mathrm{IN}}=-v_{\mathrm{IN}}\) (\(i_{\mathrm{OUT}}=0\) A).