---
url: /dyad/dev/stdlib/ElectricalComponents/examples/Analog.Examples.DeSauty.md
description: >-
  Dyad Analog.Examples.DeSauty docs.  AC bridge circuit for comparing
  capacitances
---

# `Analog.Examples.DeSauty` {#Analog.Examples.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 {#Usage}

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

## Parameters: {#Parameters:}

| Name |                                         Description | Units | Default value |
| ----:| ---------------------------------------------------:| -----:| -------------:|
| `C₁` |  Capacitance of the first capacitor (`capacitor1`). |     F |           30μ |
| `C₂` | Capacitance of the second capacitor (`capacitor2`). |     F |           45μ |

## Behavior {#Behavior}

## Source {#Source}

````dyad
"""
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
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.
"""
example component DeSauty
  "First resistor in one arm of the De Sauty bridge."
  resistor1 = ElectricalComponents.Analog.Basic.Resistor(R = 5.0) {
    "Dyad": {
      "placement": {"icon": {"x1": 400, "y1": 350, "x2": 500, "y2": 450, "rot": 180}}
    }
  }
  "Second resistor in the other arm of the De Sauty bridge."
  resistor2 = ElectricalComponents.Analog.Basic.Resistor(R = 2.0) {
    "Dyad": {
      "placement": {"icon": {"x1": 400, "y1": 650, "x2": 500, "y2": 750, "rot": 180}}
    }
  }
  "First capacitor in one arm of the De Sauty bridge, with capacitance C₁."
  capacitor1 = ElectricalComponents.Analog.Basic.Capacitor(C = C₁) {
    "Dyad": {
      "placement": {"icon": {"x1": 100, "y1": 350, "x2": 200, "y2": 450, "rot": 180}}
    }
  }
  "Second capacitor in the other arm of the De Sauty bridge, with capacitance C₂."
  capacitor2 = ElectricalComponents.Analog.Basic.Capacitor(C = C₂) {
    "Dyad": {
      "placement": {"icon": {"x1": 100, "y1": 650, "x2": 200, "y2": 750, "rot": 180}}
    }
  }
  "Measures the current between the two branches of the bridge, acting as the detector."
  current_sensor = ElectricalComponents.Analog.Sensors.CurrentSensor() {
    "Dyad": {"placement": {"icon": {"x1": 350, "y1": 500, "x2": 250, "y2": 600, "rot": 90}}}
  }
  "AC voltage source supplying the bridge."
  source = ElectricalComponents.Analog.Sources.VoltageSource() {"Dyad": {"placement": {"icon": {"x1": 250, "y1": 200, "x2": 350, "y2": 300}}}}
  "Generates the sinusoidal input voltage for the AC source."
  input_signal = BlockComponents.Sources.Sine(frequency = 100.0, amplitude = 1, phase = 0) {
    "Dyad": {"placement": {"icon": {"x1": 250, "y1": 50, "x2": 350, "y2": 150, "rot": 90}}}
  }
  "Reference ground for the circuit."
  ground = ElectricalComponents.Analog.Basic.Ground() {"Dyad": {"placement": {"icon": {"x1": 575, "y1": 575, "x2": 675, "y2": 675}}}}
  "Capacitance of the first capacitor (`capacitor1`)."
  parameter C₁::Capacitance = 30μ
  "Capacitance of the second capacitor (`capacitor2`)."
  parameter C₂::Capacitance = 45μ
relations
  initial current_sensor.i = 0.0
  connect(input_signal.y, source.V) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
  connect(source.p, capacitor1.n, capacitor2.n) {
    "Dyad": {
      "edges": [
        {"S": 1, "M": [{"x": 50, "y": 250}, {"x": 50, "y": 550}], "E": -1},
        {"S": 2, "M": [{"x": 75, "y": 400}], "E": -1},
        {"S": 3, "M": [{"x": 75, "y": 700}], "E": -1}
      ],
      "junctions": [{"x": 75, "y": 550}]
    }
  }
  connect(source.n, resistor1.p, resistor2.p) {
    "Dyad": {
      "edges": [
        {"S": 1, "M": [{"x": 550, "y": 250}, {"x": 550, "y": 550}], "E": -1},
        {"S": 2, "M": [{"x": 525, "y": 400}], "E": -1},
        {"S": 3, "M": [{"x": 525, "y": 700}], "E": -1}
      ],
      "junctions": [{"x": 525, "y": 550}]
    }
  }
  connect(source.n, ground.g) {
    "Dyad": {
      "edges": [{"S": 2, "M": [{"x": 625, "y": 550}], "E": -1}],
      "junctions": [{"x": 550, "y": 550}]
    }
  }
  connect(resistor1.n, current_sensor.n, capacitor1.p) {
    "Dyad": {
      "edges": [{"S": 1, "E": -1}, {"S": 2, "E": -1}, {"S": 3, "E": -1}],
      "junctions": [{"x": 300, "y": 400}]
    }
  }
  connect(resistor2.n, current_sensor.p, capacitor2.p) {
    "Dyad": {
      "edges": [{"S": 1, "E": -1}, {"S": 2, "E": -1}, {"S": 3, "E": -1}],
      "junctions": [{"x": 300, "y": 700}]
    }
  }
metadata {"Dyad": {"icons": {"default": "dyad://ElectricalComponents/Example.svg"}}}
end
````

````dyad
"""
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
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.
"""
example component DeSauty
  "First resistor in one arm of the De Sauty bridge."
  resistor1 = ElectricalComponents.Analog.Basic.Resistor(R = 5.0) {
    "Dyad": {
      "placement": {"icon": {"x1": 400, "y1": 350, "x2": 500, "y2": 450, "rot": 180}}
    }
  }
  "Second resistor in the other arm of the De Sauty bridge."
  resistor2 = ElectricalComponents.Analog.Basic.Resistor(R = 2.0) {
    "Dyad": {
      "placement": {"icon": {"x1": 400, "y1": 650, "x2": 500, "y2": 750, "rot": 180}}
    }
  }
  "First capacitor in one arm of the De Sauty bridge, with capacitance C₁."
  capacitor1 = ElectricalComponents.Analog.Basic.Capacitor(C = C₁) {
    "Dyad": {
      "placement": {"icon": {"x1": 100, "y1": 350, "x2": 200, "y2": 450, "rot": 180}}
    }
  }
  "Second capacitor in the other arm of the De Sauty bridge, with capacitance C₂."
  capacitor2 = ElectricalComponents.Analog.Basic.Capacitor(C = C₂) {
    "Dyad": {
      "placement": {"icon": {"x1": 100, "y1": 650, "x2": 200, "y2": 750, "rot": 180}}
    }
  }
  "Measures the current between the two branches of the bridge, acting as the detector."
  current_sensor = ElectricalComponents.Analog.Sensors.CurrentSensor() {
    "Dyad": {"placement": {"icon": {"x1": 350, "y1": 500, "x2": 250, "y2": 600, "rot": 90}}}
  }
  "AC voltage source supplying the bridge."
  source = ElectricalComponents.Analog.Sources.VoltageSource() {"Dyad": {"placement": {"icon": {"x1": 250, "y1": 200, "x2": 350, "y2": 300}}}}
  "Generates the sinusoidal input voltage for the AC source."
  input_signal = BlockComponents.Sources.Sine(frequency = 100.0, amplitude = 1, phase = 0) {
    "Dyad": {"placement": {"icon": {"x1": 250, "y1": 50, "x2": 350, "y2": 150, "rot": 90}}}
  }
  "Reference ground for the circuit."
  ground = ElectricalComponents.Analog.Basic.Ground() {"Dyad": {"placement": {"icon": {"x1": 575, "y1": 575, "x2": 675, "y2": 675}}}}
  "Capacitance of the first capacitor (`capacitor1`)."
  parameter C₁::Capacitance = 30μ
  "Capacitance of the second capacitor (`capacitor2`)."
  parameter C₂::Capacitance = 45μ
relations
  initial current_sensor.i = 0.0
  connect(input_signal.y, source.V) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
  connect(source.p, capacitor1.n, capacitor2.n) {
    "Dyad": {
      "edges": [
        {"S": 1, "M": [{"x": 50, "y": 250}, {"x": 50, "y": 550}], "E": -1},
        {"S": 2, "M": [{"x": 75, "y": 400}], "E": -1},
        {"S": 3, "M": [{"x": 75, "y": 700}], "E": -1}
      ],
      "junctions": [{"x": 75, "y": 550}]
    }
  }
  connect(source.n, resistor1.p, resistor2.p) {
    "Dyad": {
      "edges": [
        {"S": 1, "M": [{"x": 550, "y": 250}, {"x": 550, "y": 550}], "E": -1},
        {"S": 2, "M": [{"x": 525, "y": 400}], "E": -1},
        {"S": 3, "M": [{"x": 525, "y": 700}], "E": -1}
      ],
      "junctions": [{"x": 525, "y": 550}]
    }
  }
  connect(source.n, ground.g) {
    "Dyad": {
      "edges": [{"S": 2, "M": [{"x": 625, "y": 550}], "E": -1}],
      "junctions": [{"x": 550, "y": 550}]
    }
  }
  connect(resistor1.n, current_sensor.n, capacitor1.p) {
    "Dyad": {
      "edges": [{"S": 1, "E": -1}, {"S": 2, "E": -1}, {"S": 3, "E": -1}],
      "junctions": [{"x": 300, "y": 400}]
    }
  }
  connect(resistor2.n, current_sensor.p, capacitor2.p) {
    "Dyad": {
      "edges": [{"S": 1, "E": -1}, {"S": 2, "E": -1}, {"S": 3, "E": -1}],
      "junctions": [{"x": 300, "y": 700}]
    }
  }
metadata {"Dyad": {"icons": {"default": "dyad://ElectricalComponents/Example.svg"}}}
end
````

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
