DeSautyDeSauty Icon

DeSauty

AC bridge circuit for comparing capacitances

This component models a De Sauty bridge, an electrical circuit configuration used for measuring capacitances. The bridge consists of four arms: Arm 1: capacitor1 (with capacitance C₁) Arm 2: resistor1 (with resistance R1 = 5.0 Ohm) Arm 3: capacitor2 (with capacitance C₂) Arm 4: resistor2 (with resistance R2 = 2.0 Ohm) An AC voltage, generated by input_signal and applied through source, is connected across the overall bridge structure. Specifically, one terminal of the source (source.p) connects to the common point of capacitor1.n and capacitor2.n. The other terminal of the source (source.n) connects to the common point of resistor1.p and resistor2.p, which is also connected to ground. A current_sensor acts as a detector, connected between the junction of capacitor1.p/resistor1.n and the junction of capacitor2.p/resistor2.n. The bridge is said to be balanced when no current flows through the current_sensor. This occurs when the potentials at its connection points are equal. The condition for balance in this De Sauty bridge configuration is given by the equation:

\[R_1 C_1 = R_2 C_2\]

where R₁ is the resistance of resistor1 and C₁ is the capacitance of capacitor1, and R₂ is the resistance of resistor2 and C₂ is the capacitance of capacitor2. This model allows for the simulation of the bridge's behavior under AC excitation, including observing whether it is balanced for the given parameter values C₁ and C₂, and fixed resistances resistor1.R = 5.0 and resistor2.R = 2.0. The initial voltage across capacitor2 is set to 0.0V by the statement initial capacitor2.v = 0.0 in the relations section.

Usage

ElectricalComponents.DeSauty(C₁=30μ, C₂=45μ)

Parameters:

NameDescriptionUnitsDefault value
C₁Capacitance of the first capacitor (capacitor1).F0.000029999999999999997
C₂Capacitance of the second capacitor (capacitor2).F0.000044999999999999996

Behavior

\[ \begin{equation} \left[ \begin{array}{c} \mathrm{connect}\left( input_{signal_{+}y(t)}, source_{+}V(t) \right) \\ \mathrm{connect}\left( source_{+}p, capacitor1_{+}n, capacitor2_{+}n \right) \\ \mathrm{connect}\left( source_{+}n, resistor1_{+}p, resistor2_{+}p \right) \\ \mathrm{connect}\left( source_{+}n, ground_{+}g \right) \\ \mathrm{connect}\left( resistor1_{+}n, current_{sensor_{+}n}, capacitor1_{+}p \right) \\ \mathrm{connect}\left( resistor2_{+}n, current_{sensor_{+}p}, capacitor2_{+}p \right) \\ \mathtt{resistor1.v}\left( t \right) = - \mathtt{resistor1.n.v}\left( t \right) + \mathtt{resistor1.p.v}\left( t \right) \\ \mathtt{resistor1.i}\left( t \right) = \mathtt{resistor1.p.i}\left( t \right) \\ \mathtt{resistor1.n.i}\left( t \right) + \mathtt{resistor1.p.i}\left( t \right) = 0 \\ \mathtt{resistor1.v}\left( t \right) = \mathtt{resistor1.R} \mathtt{resistor1.i}\left( t \right) \\ \mathtt{resistor2.v}\left( t \right) = - \mathtt{resistor2.n.v}\left( t \right) + \mathtt{resistor2.p.v}\left( t \right) \\ \mathtt{resistor2.i}\left( t \right) = \mathtt{resistor2.p.i}\left( t \right) \\ \mathtt{resistor2.p.i}\left( t \right) + \mathtt{resistor2.n.i}\left( t \right) = 0 \\ \mathtt{resistor2.v}\left( t \right) = \mathtt{resistor2.R} \mathtt{resistor2.i}\left( t \right) \\ \mathtt{capacitor1.v}\left( t \right) = - \mathtt{capacitor1.n.v}\left( t \right) + \mathtt{capacitor1.p.v}\left( t \right) \\ \mathtt{capacitor1.i}\left( t \right) = \mathtt{capacitor1.p.i}\left( t \right) \\ \mathtt{capacitor1.n.i}\left( t \right) + \mathtt{capacitor1.p.i}\left( t \right) = 0 \\ \mathtt{capacitor1.C} \frac{\mathrm{d} \mathtt{capacitor1.v}\left( t \right)}{\mathrm{d}t} = \mathtt{capacitor1.i}\left( t \right) \\ \mathtt{capacitor2.v}\left( t \right) = \mathtt{capacitor2.p.v}\left( t \right) - \mathtt{capacitor2.n.v}\left( t \right) \\ \mathtt{capacitor2.i}\left( t \right) = \mathtt{capacitor2.p.i}\left( t \right) \\ \mathtt{capacitor2.n.i}\left( t \right) + \mathtt{capacitor2.p.i}\left( t \right) = 0 \\ \mathtt{capacitor2.C} \frac{\mathrm{d} \mathtt{capacitor2.v}\left( t \right)}{\mathrm{d}t} = \mathtt{capacitor2.i}\left( t \right) \\ \mathtt{current\_sensor.p.v}\left( t \right) = \mathtt{current\_sensor.n.v}\left( t \right) \\ \mathtt{current\_sensor.p.i}\left( t \right) = \mathtt{current\_sensor.i}\left( t \right) \\ \mathtt{current\_sensor.n.i}\left( t \right) = - \mathtt{current\_sensor.i}\left( t \right) \\ \mathtt{source.v}\left( t \right) = - \mathtt{source.n.v}\left( t \right) + \mathtt{source.p.v}\left( t \right) \\ \mathtt{source.i}\left( t \right) = \mathtt{source.p.i}\left( t \right) \\ \mathtt{source.p.i}\left( t \right) + \mathtt{source.n.i}\left( t \right) = 0 \\ \mathtt{source.v}\left( t \right) = \mathtt{source.uV} \mathtt{source.V}\left( t \right) \\ \mathtt{input\_signal.y}\left( t \right) = ifelse\left( \mathtt{input\_signal.start\_time} < t, \mathtt{input\_signal.offset} + \mathtt{input\_signal.amplitude} \sin\left( \mathtt{input\_signal.phase} + 6.2832 \mathtt{input\_signal.frequency} \left( - \mathtt{input\_signal.start\_time} + t \right) \right), \mathtt{input\_signal.offset} \right) \\ \mathtt{ground.g.v}\left( t \right) = 0 \\ \end{array} \right] \end{equation} \]

Source

"""
AC bridge circuit for comparing capacitances

This component models a De Sauty bridge, an electrical circuit configuration used for measuring capacitances.
The bridge consists of four arms:
Arm 1: `capacitor1` (with capacitance `C₁`)
Arm 2: `resistor1` (with resistance `R1 = 5.0 Ohm`)
Arm 3: `capacitor2` (with capacitance `C₂`)
Arm 4: `resistor2` (with resistance `R2 = 2.0 Ohm`)
An AC voltage, generated by `input_signal` and applied through `source`, is connected across the overall bridge structure.
Specifically, one terminal of the source (`source.p`) connects to the common point of `capacitor1.n` and `capacitor2.n`.
The other terminal of the source (`source.n`) connects to the common point of `resistor1.p` and `resistor2.p`, which is also connected to `ground`.
A `current_sensor` acts as a detector, connected between the junction of `capacitor1.p`/`resistor1.n` and the junction of `capacitor2.p`/`resistor2.n`.
The bridge is said to be balanced when no current flows through the `current_sensor`. This occurs when the potentials at its connection points are equal.
The condition for balance in this De Sauty bridge configuration is given by the equation:

math R1 C1 = R2 C2

where `R₁` is the resistance of `resistor1` and `C₁` is the capacitance of `capacitor1`, and
`R₂` is the resistance of `resistor2` and `C₂` is the capacitance of `capacitor2`.
This model allows for the simulation of the bridge's behavior under AC excitation, including observing whether it is balanced for the given parameter values `C₁` and `C₂`,
and fixed resistances `resistor1.R = 5.0` and `resistor2.R = 2.0`.
The initial voltage across `capacitor2` is set to `0.0V` by the statement `initial capacitor2.v = 0.0` in the relations section.
"""</span>
<span class="hljs-keyword">example</span> <span class="hljs-keyword">component</span> DeSauty
&nbsp;&nbsp;<span class="hljs-comment">"First resistor in one arm of the De Sauty bridge."</span>
&nbsp;&nbsp;<span class="hljs-symbol">resistor1</span> = <span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/ElectricalComponents/components/Resistor.html">Resistor</a></span>(R = 5.0) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placement": {"icon": {"x1": 800, "y1": 700, "x2": 1000, "y2": 900, "rot": 180}}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"Second resistor in the other arm of the De Sauty bridge."</span>
&nbsp;&nbsp;<span class="hljs-symbol">resistor2</span> = <span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/ElectricalComponents/components/Resistor.html">Resistor</a></span>(R = 2.0) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placement": {"icon": {"x1": 800, "y1": 1300, "x2": 1000, "y2": 1500, "rot": 180}}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"First capacitor in one arm of the De Sauty bridge, with capacitance C₁."</span>
&nbsp;&nbsp;<span class="hljs-symbol">capacitor1</span> = <span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/ElectricalComponents/components/Capacitor.html">Capacitor</a></span>(C = C₁) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placement": {"icon": {"x1": 200, "y1": 700, "x2": 400, "y2": 900, "rot": 180}}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"Second capacitor in the other arm of the De Sauty bridge, with capacitance C₂."</span>
&nbsp;&nbsp;<span class="hljs-symbol">capacitor2</span> = <span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/ElectricalComponents/components/Capacitor.html">Capacitor</a></span>(C = C₂) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placement": {"icon": {"x1": 200, "y1": 1300, "x2": 400, "y2": 1500, "rot": 180}}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"Measures the current between the two branches of the bridge, acting as the detector."</span>
&nbsp;&nbsp;<span class="hljs-symbol">current_sensor</span> = <span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/ElectricalComponents/components/CurrentSensor.html">CurrentSensor</a></span>() {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placement": {"icon": {"x1": 500, "y1": 1000, "x2": 700, "y2": 1200, "rot": 90}}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"AC voltage source supplying the bridge."</span>
&nbsp;&nbsp;<span class="hljs-symbol">source</span> = <span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/ElectricalComponents/components/VoltageSource.html">VoltageSource</a></span>() {"Dyad": {"placement": {"icon": {"x1": 500, "y1": 400, "x2": 700, "y2": 600}}}}
&nbsp;&nbsp;<span class="hljs-comment">"Generates the sinusoidal input voltage for the AC source."</span>
&nbsp;&nbsp;<span class="hljs-symbol">input_signal</span> = <span>BlockComponents.Sine</span>(frequency = 100.0, amplitude = 1, phase = 0) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {"placement": {"icon": {"x1": 500, "y1": 100, "x2": 700, "y2": 300, "rot": 90}}}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"Reference ground for the circuit."</span>
&nbsp;&nbsp;<span class="hljs-symbol">ground</span> = <span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/ElectricalComponents/components/Ground.html">Ground</a></span>() {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {"placement": {"icon": {"x1": 1150, "y1": 1150, "x2": 1350, "y2": 1350}}}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"Capacitance of the first capacitor (`capacitor1`)."</span>
&nbsp;&nbsp;<span class="hljs-keyword">parameter</span> <span class="hljs-symbol">C₁</span>::<span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/Dyad/types/Capacitance.html">Capacitance</a></span> = 30μ
&nbsp;&nbsp;<span class="hljs-comment">"Capacitance of the second capacitor (`capacitor2`)."</span>
&nbsp;&nbsp;<span class="hljs-keyword">parameter</span> <span class="hljs-symbol">C₂</span>::<span class="hljs-link"><a href="https://help.juliahub.com/dyad/dev/stdlib/Dyad/types/Capacitance.html">Capacitance</a></span> = 45μ
<span class="hljs-keyword">relations</span>
&nbsp;&nbsp;<span class="hljs-keyword">initial</span> capacitor2.v = 0.0
&nbsp;&nbsp;<span class="hljs-built_in">connect</span>(input_signal.y, source.V) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
&nbsp;&nbsp;<span class="hljs-built_in">connect</span>(source.p, capacitor1.n, capacitor2.n) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"edges": [
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"S": 1, "M": [{"x": 100, "y": 500}, {"x": 100, "y": 1100}], "E": -1},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"S": 2, "M": [{"x": 150, "y": 800}], "E": -1},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"S": 3, "M": [{"x": 150, "y": 1400}], "E": -1}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"junctions": [{"x": 150, "y": 1100}]
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-built_in">connect</span>(source.n, resistor1.p, resistor2.p) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"edges": [
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"S": 1, "M": [{"x": 1100, "y": 500}, {"x": 1100, "y": 1100}], "E": -1},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"S": 2, "M": [{"x": 1050, "y": 800}], "E": -1},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"S": 3, "M": [{"x": 1050, "y": 1400}], "E": -1}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"junctions": [{"x": 1050, "y": 1100}]
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-built_in">connect</span>(source.n, ground.g) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"edges": [{"S": 2, "M": [{"x": 1250, "y": 1100}], "E": -1}],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"junctions": [{"x": 1100, "y": 1100}]
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-built_in">connect</span>(resistor1.n, current_sensor.n, capacitor1.p) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"edges": [{"S": 1, "E": -1}, {"S": 2, "E": -1}, {"S": 3, "E": -1}],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"junctions": [{"x": 600, "y": 800}]
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-built_in">connect</span>(resistor2.n, current_sensor.p, capacitor2.p) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"edges": [{"S": 1, "E": -1}, {"S": 2, "E": -1}, {"S": 3, "E": -1}],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"junctions": [{"x": 600, "y": 1400}]
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
<span class="hljs-keyword">end</span></code></pre>
Flattened Source
"""
AC bridge circuit for comparing capacitances

This component models a De Sauty bridge, an electrical circuit configuration used for measuring capacitances.
The bridge consists of four arms:
Arm 1: `capacitor1` (with capacitance `C₁`)
Arm 2: `resistor1` (with resistance `R1 = 5.0 Ohm`)
Arm 3: `capacitor2` (with capacitance `C₂`)
Arm 4: `resistor2` (with resistance `R2 = 2.0 Ohm`)
An AC voltage, generated by `input_signal` and applied through `source`, is connected across the overall bridge structure.
Specifically, one terminal of the source (`source.p`) connects to the common point of `capacitor1.n` and `capacitor2.n`.
The other terminal of the source (`source.n`) connects to the common point of `resistor1.p` and `resistor2.p`, which is also connected to `ground`.
A `current_sensor` acts as a detector, connected between the junction of `capacitor1.p`/`resistor1.n` and the junction of `capacitor2.p`/`resistor2.n`.
The bridge is said to be balanced when no current flows through the `current_sensor`. This occurs when the potentials at its connection points are equal.
The condition for balance in this De Sauty bridge configuration is given by the equation:

math R1 C1 = R2 C2

where `R₁` is the resistance of `resistor1` and `C₁` is the capacitance of `capacitor1`, and
`R₂` is the resistance of `resistor2` and `C₂` is the capacitance of `capacitor2`.
This model allows for the simulation of the bridge's behavior under AC excitation, including observing whether it is balanced for the given parameter values `C₁` and `C₂`,
and fixed resistances `resistor1.R = 5.0` and `resistor2.R = 2.0`.
The initial voltage across `capacitor2` is set to `0.0V` by the statement `initial capacitor2.v = 0.0` in the relations section.
"""</span>
<span class="hljs-keyword">example</span> <span class="hljs-keyword">component</span> DeSauty
&nbsp;&nbsp;<span class="hljs-comment">"First resistor in one arm of the De Sauty bridge."</span>
&nbsp;&nbsp;<span class="hljs-symbol">resistor1</span> = <span>Resistor</span>(R = 5.0) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placement": {"icon": {"x1": 800, "y1": 700, "x2": 1000, "y2": 900, "rot": 180}}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"Second resistor in the other arm of the De Sauty bridge."</span>
&nbsp;&nbsp;<span class="hljs-symbol">resistor2</span> = <span>Resistor</span>(R = 2.0) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placement": {"icon": {"x1": 800, "y1": 1300, "x2": 1000, "y2": 1500, "rot": 180}}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"First capacitor in one arm of the De Sauty bridge, with capacitance C₁."</span>
&nbsp;&nbsp;<span class="hljs-symbol">capacitor1</span> = <span>Capacitor</span>(C = C₁) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placement": {"icon": {"x1": 200, "y1": 700, "x2": 400, "y2": 900, "rot": 180}}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"Second capacitor in the other arm of the De Sauty bridge, with capacitance C₂."</span>
&nbsp;&nbsp;<span class="hljs-symbol">capacitor2</span> = <span>Capacitor</span>(C = C₂) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placement": {"icon": {"x1": 200, "y1": 1300, "x2": 400, "y2": 1500, "rot": 180}}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"Measures the current between the two branches of the bridge, acting as the detector."</span>
&nbsp;&nbsp;<span class="hljs-symbol">current_sensor</span> = <span>CurrentSensor</span>() {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"placement": {"icon": {"x1": 500, "y1": 1000, "x2": 700, "y2": 1200, "rot": 90}}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"AC voltage source supplying the bridge."</span>
&nbsp;&nbsp;<span class="hljs-symbol">source</span> = <span>VoltageSource</span>() {"Dyad": {"placement": {"icon": {"x1": 500, "y1": 400, "x2": 700, "y2": 600}}}}
&nbsp;&nbsp;<span class="hljs-comment">"Generates the sinusoidal input voltage for the AC source."</span>
&nbsp;&nbsp;<span class="hljs-symbol">input_signal</span> = <span>BlockComponents.Sine</span>(frequency = 100.0, amplitude = 1, phase = 0) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {"placement": {"icon": {"x1": 500, "y1": 100, "x2": 700, "y2": 300, "rot": 90}}}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"Reference ground for the circuit."</span>
&nbsp;&nbsp;<span class="hljs-symbol">ground</span> = <span>Ground</span>() {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {"placement": {"icon": {"x1": 1150, "y1": 1150, "x2": 1350, "y2": 1350}}}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-comment">"Capacitance of the first capacitor (`capacitor1`)."</span>
&nbsp;&nbsp;<span class="hljs-keyword">parameter</span> <span class="hljs-symbol">C₁</span>::<span>Capacitance</span> = 30μ
&nbsp;&nbsp;<span class="hljs-comment">"Capacitance of the second capacitor (`capacitor2`)."</span>
&nbsp;&nbsp;<span class="hljs-keyword">parameter</span> <span class="hljs-symbol">C₂</span>::<span>Capacitance</span> = 45μ
<span class="hljs-keyword">relations</span>
&nbsp;&nbsp;<span class="hljs-keyword">initial</span> capacitor2.v = 0.0
&nbsp;&nbsp;<span class="hljs-built_in">connect</span>(input_signal.y, source.V) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
&nbsp;&nbsp;<span class="hljs-built_in">connect</span>(source.p, capacitor1.n, capacitor2.n) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"edges": [
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"S": 1, "M": [{"x": 100, "y": 500}, {"x": 100, "y": 1100}], "E": -1},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"S": 2, "M": [{"x": 150, "y": 800}], "E": -1},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"S": 3, "M": [{"x": 150, "y": 1400}], "E": -1}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"junctions": [{"x": 150, "y": 1100}]
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-built_in">connect</span>(source.n, resistor1.p, resistor2.p) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"edges": [
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"S": 1, "M": [{"x": 1100, "y": 500}, {"x": 1100, "y": 1100}], "E": -1},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"S": 2, "M": [{"x": 1050, "y": 800}], "E": -1},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"S": 3, "M": [{"x": 1050, "y": 1400}], "E": -1}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"junctions": [{"x": 1050, "y": 1100}]
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-built_in">connect</span>(source.n, ground.g) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"edges": [{"S": 2, "M": [{"x": 1250, "y": 1100}], "E": -1}],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"junctions": [{"x": 1100, "y": 1100}]
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-built_in">connect</span>(resistor1.n, current_sensor.n, capacitor1.p) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"edges": [{"S": 1, "E": -1}, {"S": 2, "E": -1}, {"S": 3, "E": -1}],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"junctions": [{"x": 600, "y": 800}]
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;<span class="hljs-built_in">connect</span>(resistor2.n, current_sensor.p, capacitor2.p) {
&nbsp;&nbsp;&nbsp;&nbsp;"Dyad": {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"edges": [{"S": 1, "E": -1}, {"S": 2, "E": -1}, {"S": 3, "E": -1}],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"junctions": [{"x": 600, "y": 1400}]
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
<span class="hljs-keyword">metadata</span> {}
<span class="hljs-keyword">end</span></code></pre>


Test Cases

No test cases defined.

  • Examples
  • Experiments
  • Analyses