# POWER-BALANCED DYNAMIC MODELING OF VACTROLS: APPLICATION TO A VTL5C3/2

Judy Najnudel and Rémy Müller

UVI

Paris, France

j.najnudel@uvi.net | r.muller@uvi.net

Thomas Hélie and David Roze

IRCAM-CNRS-SU

Paris, France

thomas.helie@ircam.fr | david.roze@ircam.fr

## ABSTRACT

Vactrols, which consist of a photoresistor and a light-emitting element that are optically coupled, are key components in optical dynamic compressors. Indeed, the photoresistor's program-dependent dynamic characteristics make it advantageous for automatic gain control in audio applications. Vactrols are becoming more and more difficult to find, while the interest for optical compression in the audio community does not diminish. They are thus good candidates for virtual analog modeling. In this paper, a model of vactrols that is entirely physical, passive, with a program-dependent dynamic behavior, is proposed. The model is based on first principles that govern semi-conductors, as well as the port-Hamiltonian systems formalism, which allows the modeling of nonlinear, multiphysical behaviors. The proposed model is identified with a real vactrol, then connected to other components in order to simulate a simple optical compressor.

## 1. INTRODUCTION

A vactrol (or resistive opto-isolator) consists of a photoresistor (labeled LDR for Light-Dependent Resistor in the following) and a light-emitting element (usually a LED) that are optically coupled: the photoresistor's resistance decreases (nonlinearly) with the light it receives from the LED.

Vactrols were widely used from the 1960s to the early 2000s due to their low fabrication costs, important dynamic range, and low noise distortion (below - 80 dB). They could be found in cameras (in exposure meters and autofocus) and security systems (for object detection) to name a few applications.

Apart from their nonlinear response to light, a remarkable feature of photoresistors is their relatively long response times (compared to e.g. transistors in transistor opto-isolators). Indeed, these response times vary from a few tens of microseconds (for the *turn-on*, or attack, when light is switched on) to a few hundreds of milliseconds (for the *turn-off*, or release, when light is switched off). Moreover, the attack time decreases with the received light. These characteristics made vactrols much appreciated for automatic gain control in audio applications, in which adaptive treatment and transient preservation are essential. An emblematic example of optical dynamic compressors from the late 1960s is the LA-2A built by Teletronix [1], which was used in prominent broadcast studios such as CBS and RCA. A more recent example is the Langevin ELOP built by Manley [2].

Vactrols were manufactured by Perkin Elmer [3] among others, until 2010. They are still manufactured by Advanced Photonix, but their availability has severely diminished since the 2000s due to a EU ban on cadmium sulfide, which is one of the main components of photoresistors. As vintage optical dynamic compressors are priced at tens of thousands of dollars, an accurate simulation is a convenient and much cheaper way to access optical dynamic compression.

Models of vactrols for audio applications have been proposed in the literature [4, 5]. Based on a signal representation, they associate static characteristics obtained from measurements, and a combination of low-pass filters to account for the photoresistor's dynamic behavior. More recent models based on Recurrent Neural Networks [6, 7] allow the joint inference of static and dynamic characteristics from data.

Although these models demonstrate interesting features from both qualitative and computational points of view, they are tailored to a specific circuit; therefore, they offer much less modularity than purely physical models. In particular, they are difficult to connect to other components modeled as port-Hamiltonian systems, which provide a unified formalism for the modeling of multiphysical systems with passivity guarantees, and has proven relevant for audio applications [8, 9]. Moreover, a key specificity of vactrols, namely, the inherent *program-dependence* of the attack and release times, remains elusive in signal-based models.

In this paper, which is a condensed version of the work presented in [19], we propose a nonlinear model of vactrols that is entirely physical, passive, with a program-dependent dynamic behavior by construction. To this end, we rely on first principles that govern semi-conductors, and the port-Hamiltonian systems (PHS) formalism.

This paper is structured as follows. In Section 2, we give a brief reminder on PHS. In Section 3, we recall the main doping mechanisms in photoresistors and derive a model for their internal dynamics. Then in Section 4, we propose a law for the optical coupling between the LED and the photoresistor, and obtain a complete PHS model for the vactrol by connecting all subcomponents through multiphysical ports. Finally, the model's parameters are estimated from measurements of a real vactrol, and then used to simulate a simplified optical compressor in Section 5.

## 2. REMINDER ON PORT-HAMILTONIAN SYSTEMS

Any physical system can be divided into parts that interact with each other via energy exchanges. Detailed presentations of PHS are available in [10, 11, 12]. In this paper, we rely on a differential-algebraic formulation adapted to multiphysical systems [13, 14]. This formulation allows the representation of a dynamical system as a network of

<footnote>Copyright: © 2023 Judy Najnudel et al. This is an open-access article distributed under the terms of the Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, adaptation, and reproduction in any medium, provided the original author and source are credited.</footnote>
1. storage components of state $x$ and energy $E(x)$;

2. passive memoryless components described by an effort law $z: w \mapsto z(w)$, such that the dissipated power $P_{diss} = z(w)^{\top}w$ is non-negative for all flows $w$;

3. connection ports conveying the outgoing power $P_{ext} = u^{\top}y$ where $u$ are inputs and $y$ are outputs.

The system flows $f$ and efforts $e$ are coupled through a (possibly dependent on $x$) skew-symmetric interconnection matrix $S = -S^{\top}$, so that

$$ \underbrace{\begin{bmatrix} \dot{x} \\ w \\ y \end{bmatrix}}_{f} = S \underbrace{\begin{bmatrix} \nabla E(x) \\ z(w) \\ u \end{bmatrix}}_{e}. \quad (1) $$

In the context of electronic circuits, flows can either be currents (e.g. for capacitors) or voltages (e.g. for inductors), and vice versa for efforts.

Such systems satisfy the power balance

$$ P_{\text{stored}} + P_{\text{diss}} + P_{\text{ext}} = 0 \quad (2) $$

where $P_{stored} = \nabla E(x)^{\top}\dot{x}$ denotes the stored power.

*Proof* By skew-symmetry of $S$ (which we recall diagonal is zero),

$$ P_{\text{stored}} + P_{\text{diss}} + P_{\text{ext}} = e^{\top}f = e^{\top}Se = 0. \quad \square $$

Note that throughout this paper, we adopt the receiver convention for all components, including external sources. This means that the current is defined positive when entering the component through the positive voltage terminal [15].

### 3. PHOTORESISTOR

A photoresistor consists of a thin layer of photoconductive material (typically, cadmium sulfide) deposited on a ceramic substrate. In the following, we assume that the photoconductive material is spatially homogeneous, so that no pn-junction can be formed and that diffusion of free carriers is negligible. As a consequence, the photoresistor internal dynamics can be modeled by ODEs.

A photoresistor is in fact a 2-port component. The first port is electrical, and allows connections to other electronic components like any other resistor. The second port is optical, and allows interactions with light. It is responsible for internal dynamics in the micro-electrical domain. In the next sections, the (hidden) flow and effort that result from optical interactions are explicitly referred to as $f_{opt}$ and $e_{opt}$, to avoid confusion with the (directly observable) electrical flow $i_{LDR}$ (current), and electrical effort $v_{LDR}$ (voltage). Note that both flows are in Amperes, and both efforts are in Volts.

#### 3.1. Photoconductivity and doping

Photoconductive materials are semiconductors, that is, they become conductive under certain conditions. Indeed, the photoabsorption of a small amount of additional energy (denoted $e_g$) generates a pair of free carriers: an electron in the conduction band (of energy $E_C$), and a hole in the valence band (of energy $E_V$). The presence of free carriers increases the photoresistor conductivity. Note that the overall conductivity depends on the quantity of electrons, but also on the quantity of holes (which, as we shall see, do not necessarily remain equal).

<figure><img src="image_1.png" /><figcaption>Figure 1: Energy levels and free carriers before and after photoabsorption for an n-doped semi-conductor.</figcaption></figure>

The conductivity of a photoconductive material can be artificially increased (or “doped”) through the inclusion of defects, which lower the amount of energy needed to generate free carriers via ionization [16]. Here, we consider n-doped materials only, as cadmium sulfide (which is present in Vactrols) is most generally n-doped [17]. For efficient n-doping, the bound defect energy (denoted $E_B$) must lie between the valence band and the conduction band, and the ionized defect energy (denoted $E_I$) must lie in the conduction band, so that the ionization energy $e_i$ is smaller than $e_g$ and electrons reach the conduction band more easily (Fig. 1).

#### 3.2. Internal dynamics

The internal dynamics of the photoresistor is due to carrier recombination processes. The most important recombination process in doped materials is the Shockley-Read-Hall recombination [16], in which free carriers recombine with defects. Therefore, other kinds of recombination (e.g., radiative and Auger) are neglected.

The Shockley-Read-Hall recombination can be summed up as follows (Fig. 2). Assume an initial state with no free carriers, denoted $s_0$. Photoabsorption can lead either to ionization (state $s_i$), or to electron-hole pair generation (state $s_g$). The ionized defect can then return to state $s_0$, followed by the dissipation of excess energy $e_i$. In this case, the ionized defect acts as a “trap” for electrons. Likewise, an electron-hole pair can recombine to state $s_0$, followed by the dissipation of excess energy $e_g$.

For convenience, and since this is transparent energy-wise, we choose to model a unique source of photoabsorption (that leads to electron-hole pair generation), and replace a transition from state $s_g$ to state $s_0$, followed by a transition from state $s_0$ to state $s_i$, with a direct transition from state $s_g$ to state $s_i$, that dissipates the energy $e_g - e_i$. In this case, the bounded defect acts as a “trap” for holes.

**Free carriers dynamics modeling** To model the free carriers dynamics in the micro-electrical domain, we rely on the homogeneous Iverson model [18]. Denote $f_{opt}$ the optical flow responsible for the generation of free carriers (in receiver convention), $q^-$ the absolute charge of electrons and $\dot{q}^-$ its time variation, $q^+$ the absolute charge of holes and $\dot{q}^+$ its time variation, $q^0$ the absolute charge of defects in ionized state, $q^0$ the absolute charge of defects in bound state<fnref n="1" />, and $q_\tau$ the absolute charge of defects. The photoresistor internal dynamics are governed by the following

<footnote n="1">¹Here, the absolute charge of a species is to be understood as the number of instances multiplied with the elementary charge for homogeneity. Therefore, it can be non-zero even for bound defects.</footnote>
<figure><img src="image_2.png" /><figcaption>Figure 2: Possible states and transitions for a n-doped photoresistor with Shockley-Read-Hall recombination. For convenience, a transition from state s<sub>g</sub> to state s<sub>0</sub> followed by a transition from state s<sub>0</sub> to state s<sub>i</sub> (gray, dashed), is replaced by a transition from state s<sub>g</sub> to state s<sub>i</sub> (black, dashed).</figcaption></figure>

equations [16]:

Electron charge variation $\dot{q}^- = -f_{opt} - \nu_0 q_\tau^+ q^-$, (3a)

Hole charge variation $\dot{q}^+ = -f_{opt} - \nu_0 q_\tau^0 q^+$, (3b)

Constant quantity of defects $q_\tau = q_\tau^+ + q_\tau^0$, $\dot{q}_\tau = 0$, (3c)

Charge neutrality $q_\tau^+ + q^- - q^- = 0$, (3d)

where the electron (resp. hole) absolute charge time variation corresponds to the free carriers generation rate minus the de-ionization (resp. ionization) rate. The constants $\nu_0^-$ and $\nu_0^+$ (in C<sup>-1</sup>·s<sup>-1</sup>) relate to the electron and hole velocity, respectively. The constraints expressed by Eqs. (3c)-(3d) allow the reduction of Eqs. (3a)-(3b) to

$$ \dot{q}^- = -f_{opt} - \nu_0 (q^- - q^+) q^-, \quad (4a) $$

$$ \dot{q}^+ = -f_{opt} - \nu_0 (q_\tau + q^+ - q^-) q^+. \quad (4b) $$

**PHS formulation and equivalent circuit** The system described by Eq. (4) admits a PHS formulation. To give this system a physical interpretation in terms of currents and voltages, we introduce capacities $C^+$ and $C^-$, as well as conductances $G_\tau^-(q^+, q^-) := \nu_0^- C^-(q^- - q^+)$ and $G_\tau^+(q^+, q^-) := \nu_0^+ C^+(q_\tau + q^+ - q^-)$. The internal dynamics of the photoresistor can thus be described by two equivalent capacitors $C^-$ and $C^+$ that model the storage of electrons and holes respectively, with flow $\dot{x}$ (in Amperes) and effort $\nabla E(x)$ (in Volts)

$$ \begin{aligned} \dot{x} &= [\dot{q}^+, \dot{q}^-]^T :=: [f_{C^+}, f_{C^-}]^T, \\ \nabla E(x) &= \begin{bmatrix} \frac{q^+}{C^+}, \frac{q^-}{C^-} \end{bmatrix}^T :=: [e_{C^+}, e_{C^-}]^T, \end{aligned} \quad (5) $$

and two conductors $G_\tau^-$ and $G_\tau^+$ that model the dissipation caused by de-ionization and ionization respectively, with flow $w$ (in Volts) and (state-modulated) effort $z(w)$ (in Amperes)

$$ w = [e_{G_\tau^+}, e_{G_\tau^-}]^T, \quad z(w) = [G_\tau^+ e_{G_\tau^+}, G_\tau^- e_{G_\tau^-}]^T :=: [f_{G_\tau^+}, f_{G_\tau^-}]^T. \quad (6) $$

The schematics of the corresponding equivalent circuit is shown on Fig. 3a, with corresponding PHS equations in Fig. 3b.

**Remark 1.** The dynamics described by Eq. (4) depends on $C^\pm$ through the reduced parameters $\nu_0^\pm = \nu_0^\pm C^\pm \cdot \frac{1}{C^\pm}$. As only $\nu_0^\pm$ have to be identified and $\nu_0^\pm C^\pm$ and $C^\pm$ are unknown, we arbitrarily set $C^+ = C^- = 1$ F.

**Photoresistor electrical flow and effort** The resistance of the photoresistor is given by [16]

$$ R(q^+, q^-) = \frac{1}{\mu_0^+ q^+ + \mu_0^- q^-}, \quad (7) $$

where $\mu_0^+$ (resp. $\mu_0^-$) is the surface mobility (in V<sup>-1</sup>·s<sup>-1</sup>) of holes (resp. electrons) and relates to the dimensions of the photoresistor and the mobility of holes.

In practice, the photoresistor exhibits a large but finite positive resistance $R_d$ when it is not exposed to light (d for dark), and a small but non-zero positive resistance $R_\ell$ when it is exposed to maximal light (l for light). The total resistance $R_{LDR}(q^+, q^-)$ is thus modeled as a parallel/series interconnection governed by

$$ R_{LDR}(q^+, q^-) = \frac{R_d (R(q^+, q^-) + R_\ell)}{R_d + R(q^+, q^-) + R_\ell}. \quad (8) $$

As $R_d$ is several orders of magnitude larger than $R_\ell$, it is immediately verified that $\lim_{R \to +\infty} R_{LDR} = R_d$ and $\lim_{R \to 0} R_{LDR} = R_\ell$. We deduce the electrical flow $w$ and (state-modulated) effort $z(w)$ of the photoresistor:

$$ w = i_{LDR}, \quad z(w) = R_{LDR} (q^+, q^-) i_{LDR} := v_{LDR}. \quad (9) $$

# 4. OPTICAL COUPLING

## 4.1. Power conversion between the LED and the photoresistor

Two types of power conversion take place between the LED and the photoresistor. The first one is a conversion from electrical to optical and occurs during photoemission by the LED. The second one is a conversion from optical to micro-electrical and occurs during photoabsorption by the photoresistor.

However, as the photoresistor spectral sensitivity does not match exactly with the LED spectral output, some of the power emitted by the LED is not transmitted to the photoresistor. Since the LED and photoresistor are enclosed in opaque resin, we assume that the difference of power is absorbed by the resin and converted into heat. Therefore, for convenience, the conversion from electrical to optical to micro-electrical domain is modeled as a dissipative quadripole (Fig.4). Denote $v_D$ the LED voltage, $i_D$ the LED current, and $P_D := i_D v_D$ the LED electrical power. Assume that the LED dissipative law $\mathcal{I} : v_D \mapsto i_D$ is known (e.g. from measurements or datasheets). Denote $P_{opt} := f_{opt} e_{opt}$ the optical power outgoing from the photoresistor. The power conversion must be passive, that is, the incoming optical power cannot be greater than the power delivered by the LED. Therefore, we choose to model the power conversion with a function $f$ such that

$$ f(P_D) + P_{opt} = 0, \quad \text{with } 0 \le f(P_D) \le P_D. \quad (10) $$

Assuming that $e_{opt} \ne 0$, the quadripole flow $w$ and effort $z(w)$
<figure><img src="image_3.png" /><figcaption>(a) Photoresistor internal dynamics equivalent circuit schematics.</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>(b) Corresponding PHS. Dots represent zeros.</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Figure 4: Multiphysical power conversion between the LED and the photoresistor.</figcaption></figure>

can then be defined as

$$w = [v_D, e_{opt}]^T, \quad z(w) = \Gamma(w) w =: [i_D, f_{opt}]^T,$$

$$\text{with } \Gamma(w) := \underbrace{\begin{bmatrix} 0 & \frac{\mathcal{I}(v_D)}{e_{\text{opt}}} \\ -\frac{\mathcal{I}(v_D)}{e_{\text{opt}}} & 0 \end{bmatrix}}_{\Gamma_{\text{antisym}}(w)} + \underbrace{\begin{bmatrix} 0 & 0 \\ 0 & \frac{\mathcal{I}(v_D) v_D - f(\mathcal{I}(v_D) v_D)}{e_{\text{opt}}^2} \end{bmatrix}}_{\Gamma_{\text{sym}}(w)}. \quad (11)$$

The matrix $\Gamma_{\text{antisym}}(w)$ encodes the (modulated) gyration from electrical to micro-electrical domain, while the (non-negative) matrix $\Gamma_{\text{sym}}(w)$ encodes the actual power loss during the conversion. With Eq. (10), such a formulation guarantees the passivity of the quadripole, since it verifies $z(w)^{\top}w \ge 0$ for all $w$.

In practice, we have neither access to photoemission (from the LED), nor photoabsorption (into the photoresistor) characteristics. However, “ground truth” for the optical power $P_{\text{opt}}$ can be obtained from measurements of the photoresistor’s resistance, as will be shown in Section 5. Regarding the function $f$, we propose an empirical model of the form

$$f(P_D) = P_0 P_D^{\alpha_0} + P_1 P_D^{\alpha_1}, \quad (12)$$

with $\alpha_0, \alpha_1$ positive, to account for the dual-slope of the optical power as a function of the LED power observed in the logarithmic domain.

## 4.2. Vactrol complete model

By connecting the power converter between the LED and the photoresistor with the equivalent circuit that models the internal dynamics of the photoresistor, the vactrol (Fig. 5a) can be modeled as the equivalent circuit in Fig. 5b. The corresponding PHS equations are given in Fig. 5c.

# 5. IDENTIFICATION OF A VACTROL FROM MEASUREMENTS AND SIMULATION OF A SIMPLE OPTICAL COMPRESSOR

The characteristics of a VTL5C3/2 are measured to obtain the LED dissipative law, the photoresistor static resistance as a function of LED power, as well as the photoresistor’s turn-on and turn-off (see [19] for a schematic of the experimental setup).

The parameters $R_{\ell}$ and $R_{\text{D}}$ are taken from the VTL5C3/2 datasheet, and the parameters $\mu_0^+$ and $\mu_0^-$ are set according to [20]. The remaining vactrol parameters are then estimated from measurements, in three steps.

## 5.1. Parameter identification for the LED

The Shockley model [21] does not capture the behavior of LEDs that are present in Vactrols accurately. Indeed, once it has reached its threshold, the LED behaves more closely as a linear resistance. Therefore, we propose a more suitable model, passive by construction, in which the LED threshold appears explicitly as a parameter. Denote $v_D$ the LED voltage and $i_D$ the LED current. The LED is a dissipative component of flow $w$ and effort $z(w)$ given by

$$w = v_D,$$

$$z(w) = I_s \left( \text{sp} \left( \frac{v_D - V_t}{V_s} \right) - \text{sp} \left( -\frac{V_t}{V_s} \right) \right) =: \mathcal{I}(v_D) = i_D, \quad (13)$$

where $\text{sp}: x \mapsto \ln(1 + \exp x)$ denotes the softplus function, and $V_t, V_s$, and $I_s$ are positive model parameters. The voltage $V_t$ is the LED threshold (from which it starts emitting light), and the ratio $I_s/V_s$ corresponds to the LED conductance. Due to the fact that the sp function is increasing, and that $z(0) = 0$, this model is passive since $z(w)^{\top}w \ge 0$ for all $w$.

The set of parameters $\theta_D = [V_t, V_s, I_s]$ is estimated through a least-squares optimization. The estimated parameters are shown in Table 1. Figure 6 shows the results of the estimation compared with measurements.

## 5.2. Parameter identification for the photoresistor internal dynamics

To decouple the identification process, the set of parameters $\theta_{\text{LDR}} = [\nu_0^+, \nu_0^-, q_{\tau}]$ is estimated in isolation during turn-off, which avoids
<figure><img src="image_6.png" /><figcaption>Figure 5: Voltage-controlled vactrol schematics and corresponding PHS.</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>Figure 6: LED dissipative law measurements and model.</figcaption></figure>

dependencies to the optical flow $f_{\text{opt}}$. Denote $R_{\text{sim}}(\theta)$ the photoresistor resistance simulated for a given set $\theta$, using Eq. (4) with $f_{\text{opt}} = 0$ and Eq. (8). The set $\theta_{\text{LDR}}$ is obtained by fitting $R_{\text{sim}}(\theta)$ to the measured resistance through a least-squares optimization. The estimated parameters are shown in Table 1. Figure 7a shows that the resistance simulated with these parameters matches closely with the measured resistance.

### 5.3. Parameter identification for the power conversion law in steady state

The estimated set $\theta_{\text{LDR}}$ as well as the measured static resistance $R_{\text{LDR}}$ as a function of LED power $P_D$ can be used to provide experimental data for the optical power $P_{\text{opt}}$. The complete method is detailed in [19]. In this subsection, we recall the main steps but do not provide complete expressions and proofs, for brevity.

The first step is to reinject $\theta_{\text{LDR}}$ in Eq. (4) and solve for steady state $\dot{q}^+ = \dot{q}^- = 0$. This yields the relation

$$q_{st} = Q^{-}(q_{st}^{+}), \qquad (14)$$

where $q_{st}^{-}$ and $q_{st}^{+}$ are the electron charge and hole charge in steady state, and $Q^{-}$ is a function parametrized by $\theta_{\text{LDR}}$. The second step is to substitute Eq. (14) in Eq. (8) and invert Eq. (8). We obtain the relation

$$q_{st}^{+} = Q^{+}(R_{\text{LDR}}), \qquad (15)$$

where $Q^{+}$ is a function parametrized by $\theta_{\text{LDR}}$, $\mu_{0}^{+}$, $\mu_{0}^{-}$, $R_d$ and $R_l$. Finally, from Fig. 3b, we have in steady state (for the choice $C^{\pm} = 1$ F, see Remark 1)

$$P_{\text{opt}} := f_{\text{opt}} e_{\text{opt}} = -\nu_{0}^{-} (q_{st}^{-} - q_{st}^{+}) q_{st}^{-} (q_{st}^{+} + q_{st}^{-}). \quad (16)$$

By reinjecting Eqs. (14)-(15) in Eq. (16), we obtain the measured optical power $P_{\text{opt}}$ as a function of static resistance $R_{\text{LDR}}$, which is itself a function of LED power $P_D$.

The set of parameters $\theta_f = [P_0, P_1, \alpha_0, \alpha_1]$ is then estimated by fitting Eq. (12) through a least-squares optimization. The estimated parameters are shown in Table 1, and Fig. 7b shows the estimation results. The simplified model matches well with the original model within the range of LED powers observed under normal use. Moreover, the passivity of the model expressed by Eq. (10) is indeed verified since $0 \le f(P_D) \le P_D$.

### 5.4. Model validation

To confirm the parameter estimation results, the photoresistor's resistance is simulated again with a non-zero optical flow, for several
<figure><img src="image_8.png" /><figcaption>Figure 7: Photoresistor characteristics: turn-off (top left), power conversion (top right), turn-on (bottom left) and resistance vs LED power after 800 ms (bottom right).</figcaption></figure>

<table><caption>Table 1: Parameters for the vactrol VTL5C3/2.</caption><thead><tr><th></th><th>Parameter</th><th>Value</th><th>Unit</th></tr></thead><tbody><tr><td rowspan="4">Given</td><td>μ<sub>0</sub><sup>+</sup></td><td>4</td><td>V<sup>-1</sup>·s<sup>-1</sup></td></tr><tr><td>μ<sub>0</sub><sup>-</sup></td><td>35</td><td>V<sup>-1</sup>·s<sup>-1</sup></td></tr><tr><td>R<sub>ℓ</sub></td><td>2</td><td>Ω</td></tr><tr><td>R<sub>d</sub></td><td>10 × 10<sup>6</sup></td><td>Ω</td></tr><tr><td rowspan="8">Estimated</td><td>q<sub>τ</sub></td><td>9.77 × 10<sup>-1</sup></td><td>C</td></tr><tr><td>ν<sub>0</sub>+</td><td>1.35 × 10<sup>2</sup></td><td>C<sup>-1</sup>·s<sup>-1</sup></td></tr><tr><td>ν<sub>0</sub><sup>-</sup></td><td>1.79 × 10<sup>8</sup></td><td>C<sup>-1</sup>·s<sup>-1</sup></td></tr><tr><td>P<sub>0</sub></td><td>-5.47 × 10<sup>-5</sup></td><td>W</td></tr><tr><td>P<sub>1</sub></td><td>5.63 × 10<sup>-5</sup></td><td>W</td></tr><tr><td>α<sub>0</sub></td><td>0.54</td><td>dimensionless</td></tr><tr><td>α<sub>1</sub></td><td>0.55</td><td>dimensionless</td></tr><tr><td>V<sub>t</sub></td><td>1.52</td><td>V</td></tr><tr><td>V<sub>s</sub></td><td>23.16 × 10<sup>-3</sup></td><td>V</td></tr><tr><td>I<sub>s</sub></td><td>5.65 × 10<sup>-3</sup></td><td>A</td></tr></tbody></table>

values of LED powers. The turn-on time response matches with measurements (Fig. 7c, here for $P_D$ = 70 mW). After 800 ms of simulation (the theoretical turn-on time being 3 ms), the simulated resistance matches very closely with the measured static resistance (Fig. 7d).

## 5.5. Simulation of an optical compressor

The estimated parameters for the VTL5C3/2 are used to simulate a minimal optical compressor, shown in Fig. 8a. This compressor consists in a voltage divider, in which the output resistor is the

photoresistor. If the output voltage is greater than the LED threshold, the LED emits light, and the photoresistor resistance drops, decreasing the output voltage in a feedback control loop [24]. The operational amplifier-based voltage follower removes the electrical coupling between the photoresistor and the LED.

For this application, we treat the voltage follower power supplies as infinite constants, so that the operational amplifier never reaches saturation. Denote $v^+$ the input voltage, $i^+$ the input current, $v_o$ the output voltage, and $i_o$ the output current. The voltage follower has flow $w$ and effort $z(w)$ given by (see [22] for a complete derivation)

$$ w = [v^+, i_o]^T, \quad z(w) = \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} w =: [i^+, v_o]^T. \quad (17) $$

Kirchhoff's laws yield the (reduced) PHS equations in Fig. 8b.

The compressor is driven with a sinusoidal voltage of the form $v_{in} = U(t) \sin(2\pi f_0 t)$, with $U(t)$ defined as

$$ U(t) = \begin{cases} 1 & \text{if } t \le t_0 \\ U_0 & \text{if } t_0 \le t \le 2t_0 \\ 1 & \text{if } 2t_0 \le t. \end{cases} \quad (18) $$

Here, the simulation is computed with an iterative solver, namely a Newton-Raphson method [23]. Simulation results for vactrol parameters in Table 1 and simulation parameters in Table 2, are shown in Fig. 9a to Fig. 9c. We observe that the higher the input voltage, the shorter the attack and the longer the release, in agreement with the photoresistor time responses. In all cases, the attack is much sharper than the release. The compression ratio and knee can be controlled with the resistances $R_1$ and $R_2$: the higher
<figure><img src="image_9.png" /><figcaption>(a) Schematics of a minimal optical compressor (OPA power supplies are dashed).</figcaption></figure>

<table><caption>(b) Corresponding PHS. Dots represent zeros.</caption><thead><tr><th></th><th></th><th colspan="3">∇E(x)</th><th colspan="4">z(w)</th><th colspan="2">u</th></tr><tr><th></th><th></th><th>v<sub>C</sub></th><th>e<sub>C+</sub></th><th>e<sub>C-</sub></th><th>f<sub>G<sub>τ</sub><sup>+</sup></sub></th><th>f<sub>G<sub>τ</sub><sup>-</sup></sub></th><th>i<sub>D</sub></th><th>f<sub>opt</sub></th><th>i<sup>+</sup></th><th>v<sub>o</sub></th><th>v<sub>LDR</sub></th><th>v<sub>in</sub></th></tr></thead><tbody><tr><td rowspan="3">x̂</td><td>i<sub>C</sub></td><td>-1/R<sub>2</sub></td><td>.</td><td>.</td><td>.</td><td>-1</td><td>.</td><td>.</td><td>1/R<sub>2</sub></td><td>.</td><td>.</td><td>.</td></tr><tr><td>f<sub>C+</sub></td><td>.</td><td>.</td><td>.</td><td>-1</td><td>.</td><td>-1</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td></tr><tr><td>f<sub>C-</sub></td><td>.</td><td>.</td><td>.</td><td>.</td><td>-1</td><td>.</td><td>-1</td><td>.</td><td>.</td><td>.</td><td>.</td></tr><tr><td rowspan="6">w</td><td>e<sub>G<sub>τ</sub><sup>+</sup></sub></td><td>.</td><td>1</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td></tr><tr><td>e<sub>G<sub>τ</sub><sup>-</sup></sub></td><td>.</td><td>.</td><td>1</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td></tr><tr><td>v<sub>D</sub></td><td>1</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td></tr><tr><td>e<sub>opt</sub></td><td>.</td><td>1</td><td>1</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td></tr><tr><td>v<sup>+</sup></td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>1</td><td>.</td><td>.</td></tr><tr><td>i<sub>o</sub></td><td>1/R<sub>2</sub></td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>-1/R<sub>2</sub></td><td>.</td><td>-1/R<sub>1</sub></td><td>1/R<sub>1</sub></td><td>.</td></tr><tr><td rowspan="2">y</td><td>i<sub>LDR</sub></td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>-1</td><td>.</td><td>-1/R<sub>1</sub></td><td>1/R<sub>1</sub></td><td>-1/R<sub>1</sub></td></tr><tr><td>i<sub>in</sub></td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>1/R<sub>1</sub></td><td>-1/R<sub>1</sub></td><td>-1/R<sub>1</sub></td></tr></tbody></table>

<figure><img src="image_10.png" /><figcaption>Figure 9: Simple optical compressor simulation results.</figcaption></figure>
<table><caption>Table 2: Optical compressor simulation parameters.</caption><thead><tr><th>Parameter</th><th>R<sub>1</sub> (kΩ)</th><th>R<sub>2</sub> (Ω)</th><th>C (μF)</th><th>U<sub>0</sub> (V)</th><th>f<sub>0</sub> (kHz)</th><th>t<sub>0</sub> (ms)</th><th>f<sub>s</sub> (kHz)</th></tr></thead><tbody><tr><td>Value</td><td>1</td><td>5</td><td>4.7</td><td>3-6-12</td><td>1</td><td>10</td><td>96</td></tr></tbody></table>

the ratio $R_1/R_2$, the higher the compression ratio and sharper the knee (Fig. 9d).

## 6. CONCLUSION

In this paper, we proposed a dynamic, multiphysical and power-balanced model for the vactrol, as a port-Hamiltonian system. First, we modeled the photoresistor. Its internal dynamics were obtained from the study of doping mechanisms in semiconductors. Then, we addressed the nonlinear optical coupling between the LED and the photoresistor. A law for this coupling was derived from the photoresistor's static resistance as a function of the LED's electrical power.

The model's parameters were successfully estimated from measurements of a real vactrol. Simulations using the estimated parameters closely match with measured dynamic and static characteristics. Finally, the model was implemented in order to simulate a minimal optical compressor. The simulated attack and release times are program-dependent, as expected in such compressors.

Regarding ongoing work, the model is being implemented in complex circuits that are closer to real optical compressors, and tested against real audio signals for a more complete assessment.

## 7. REFERENCES

[1] Lynn Fuston. A history of the Teletronix LA-2A leveling amplifier.

[2] Manley. https://www.manley.com/pro/melpp.

[3] Photoconductive cells and analog optoisolators (Vactrols). Perkin Elmer Optoelectronics, 2001.

[4] Julian Parker and Stephano D'Angelo. A digital model of the Buchla lowpass-gate. In Proc. Int. Conf. Digital Audio Effects (DAFx-13), Maynooth, Ireland, pages 278–285, 2013.

[5] Felix Eichas and Udo Zölzer. Modeling of an optocoupler-based audio dynamic range control circuit. In Novel Optical Systems Design and Optimization XIX, volume 9948, page 99480W. International Society for Optics and Photonics, 2016.

[6] Alec Wright, Vesa Välimäki, et al. Grey-box modelling of dynamic range compression. In Proc. Int. Conf. Digital Audio Effects (DAFx-22), Vienna, Austria, pages 304–311, 2022.

[7] Riccardo Simionato and Stefano Fasciani. Deep learning conditioned modeling of optical compression. In Proc. Int. Conf. Digital Audio Effects (DAFx-22), Vienna, Austria, pages 288–295, 2022.

[8] Nicolas Lopes and Thomas Hélie. Energy balanced model of a jet interacting with a brass player's lip. Acta Acustica united with Acustica, 102(1):141–154, 2016.

[9] Antoine Falaize and Thomas Hélie. Passive simulation of the nonlinear port-Hamiltonian modeling of a Rhodes piano. Journal of Sound and Vibration, 390:289–309, 2017.

[10] B. M. Maschke, A. J. van der Schaft, and P. Breedveld. An intrinsic Hamiltonian formulation of network dynamics: Non-standard Poisson structures and gyrators. Journal of the Franklin institute, pages 923–966, 1992.

[11] Vincent Duindam, Alessandro Macchelli, Stefano Strami-gioli, and Herman Bruyninckx. Modeling and control of complex physical systems: The port-Hamiltonian approach. Springer Science & Business Media, 2009.

[12] A. J. van der Schaft, Dimitri Jeltsema, et al. Port-Hamiltonian systems theory: An introductory overview. Foundations and Trends in Systems and Control, 1(2-3):173–378, 2014.

[13] Antoine Falaize and Thomas Hélie. Passive guaranteed simulation of analog audio circuits: A port-Hamiltonian approach. Applied Sciences, 6(10):273, 2016.

[14] Rémy Müller. Time-continuous power-balanced simulation of nonlinear audio circuits: Realtime processing framework and aliasing rejection. PhD thesis, Sorbonne Université, 2021.

[15] Timothy A. Bigelow. Power and energy in electric circuits. In Electric Circuits, Systems, and Motors, pages 105–121. Springer, 2020.

[16] Marius Grundmann. Physics of semiconductors, volume 11. Springer, 2010.

[17] U.V. Desnica. Doping limits in II-VI compounds—Challenges, problems and solutions. Progress in crystal growth and characterization of materials, 36(4):291–357, 1998.

[18] Arthur Evan Iverson. The mathematical modeling of time-dependent photoconductive phenomena in semiconductors. PhD thesis, The University of Arizona, 1987.

[19] Judy Najnudel. Power-Balanced Modeling of Nonlinear Electronic Components and Circuits for Audio Effects. PhD thesis, Sorbonne Université, 2022.

[20] WE Spear and J Mort. Electron and hole transport in CdS crystals. Proceedings of the Physical Society (1958-1967), 81(1):130, 1963.

[21] William Shockley. The theory of p-n junctions in semiconductors and p-n junction transistors. Bell System Technical Journal, 28(3):435–489, 1949.

[22] Rémy Müller and Thomas Hélie. A minimal passive model of the operational amplifier: Application to Sallen-Key analog filters. In Proc. of the 22nd Int. Conference on Digital Audio Effects, 2019.

[23] Peter Deuflhard. Newton methods for nonlinear problems: Affine invariance and adaptive algorithms, volume 35. Springer Science & Business Media, 2011.

[24] Jonathan S Abel and David P Berners. On peak-detecting and rms feedback and feedforward compressors. In Audio Engineering Society Convention 115. Audio Engineering Society, 2003.