Skip to content
ChuaCircuit.md

ChuaCircuit ​

Chua's circuit, an electronic circuit known for its chaotic dynamics.

This component represents Chua's circuit, a relatively simple electronic system capable of exhibiting complex nonlinear dynamics, including bifurcations and chaos. The circuit is constructed from two capacitors (capacitor1, capacitor2), one inductor (inductor), a linear resistor (resistor), a linear conductor (conductor), and a single nonlinear element known as Chua's diode (represented by nonlinear_resistor). The behavior of the circuit is typically described by a set of three first-order autonomous ordinary differential equations for the voltage across each capacitor and the current through the inductor.

The current i_NR through the nonlinear_resistor as a function of the voltage v_C1 across it is given by:

iNR(vC1)=Gb⋅vC1+12(Ga−Gb)(|vC1+Ve|−|vC1−Ve|)

The governing differential equations for the circuit are (using v_C1 for capacitor1.v, v_C2 for capacitor2.v, i_L for inductor.i):

capacitor1.C⋅d(vC1)dt=conductor.G⋅(vC2−vC1)−iNR(vC1)capacitor2.C⋅d(vC2)dt=conductor.G⋅(vC1−vC2)−iLinductor.L⋅d(iL)dt=vC2−resistor.R⋅iL

Initial conditions for capacitor1.v, capacitor2.v, and inductor.i are specified within the relations block to define the starting state of the simulation.

Usage ​

ElectricalComponents.ChuaCircuit()

Behavior ​

[connect(inductor+n,resistor+p)connect(inductor+p,capacitor2+p,conductor+p)connect(conductor+n,nonlinearresistor+p,capacitor1+p)connect(ground+g,resistor+n,capacitor2+n,capacitor1+n,nonlinearresistor+n)inductor.v(t)=−inductor.n.v(t)+inductor.p.v(t)inductor.i(t)=inductor.p.i(t)inductor.p.i(t)+inductor.n.i(t)=0inductor.Ldinductor.i(t)dt=inductor.v(t)resistor.v(t)=−resistor.n.v(t)+resistor.p.v(t)resistor.i(t)=resistor.p.i(t)resistor.p.i(t)+resistor.n.i(t)=0resistor.v(t)=resistor.Rresistor.i(t)conductor.v(t)=conductor.p.v(t)−conductor.n.v(t)conductor.i(t)=conductor.p.i(t)conductor.p.i(t)+conductor.n.i(t)=0conductor.i(t)=conductor.Gconductor.v(t)capacitor1.v(t)=−capacitor1.n.v(t)+capacitor1.p.v(t)capacitor1.i(t)=capacitor1.p.i(t)capacitor1.n.i(t)+capacitor1.p.i(t)=0capacitor1.Cdcapacitor1.v(t)dt=capacitor1.i(t)capacitor2.v(t)=capacitor2.p.v(t)−capacitor2.n.v(t)capacitor2.i(t)=capacitor2.p.i(t)capacitor2.n.i(t)+capacitor2.p.i(t)=0capacitor2.Cdcapacitor2.v(t)dt=capacitor2.i(t)nonlinear_resistor.v(t)=nonlinear_resistor.p.v(t)−nonlinear_resistor.n.v(t)nonlinear_resistor.i(t)=nonlinear_resistor.p.i(t)nonlinear_resistor.n.i(t)+nonlinear_resistor.p.i(t)=0nonlinear_resistor.i(t)=ifelse(nonlinear_resistor.v(t)<−nonlinear_resistor.Ve,−nonlinear_resistor.Ganonlinear_resistor.Ve+nonlinear_resistor.Gb(nonlinear_resistor.Ve+nonlinear_resistor.v(t)),ifelse(nonlinear_resistor.v(t)>nonlinear_resistor.Ve,nonlinear_resistor.Ganonlinear_resistor.Ve+nonlinear_resistor.Gb(−nonlinear_resistor.Ve+nonlinear_resistor.v(t)),nonlinear_resistor.Ganonlinear_resistor.v(t)))ground.g.v(t)=0]

Source ​

dyad
"""
Chua's circuit, an electronic circuit known for its chaotic dynamics.

This component represents Chua's circuit, a relatively simple electronic system
capable of exhibiting complex nonlinear dynamics, including bifurcations and
chaos. The circuit is constructed from two capacitors (`capacitor1`, `capacitor2`),
one inductor (`inductor`), a linear resistor (`resistor`), a linear conductor
(`conductor`), and a single nonlinear element known as Chua's diode (represented
by `nonlinear_resistor`). The behavior of the circuit is typically described by a
set of three first-order autonomous ordinary differential equations for the
voltage across each capacitor and the current through the inductor.

The current `i_NR` through the `nonlinear_resistor` as a function of the voltage `v_C1` across it is given by:

math i_{NR}(v_{C1}) = Gb \cdot v_{C1} + \frac{1}{2}(Ga - Gb)(|v_{C1} + Ve| - |v_{C1} - Ve|)

The governing differential equations for the circuit are (using `v_C1` for `capacitor1.v`, `v_C2` for `capacitor2.v`, `i_L` for `inductor.i`):

math capacitor1.C \cdot \frac{d(v_{C1})}{dt} = conductor.G \cdot (v_{C2} - v_{C1}) - i_{NR}(v_{C1})

math capacitor2.C \cdot \frac{d(v_{C2})}{dt} = conductor.G \cdot (v_{C1} - v_{C2}) - i_L

math inductor.L \cdot \frac{d(i_L)}{dt} = v_{C2} - resistor.R \cdot i_L

Initial conditions for `capacitor1.v`, `capacitor2.v`, and `inductor.i` are
specified within the `relations` block to define the starting state of the simulation.
"""
component ChuaCircuit
  "Inductor of the Chua's circuit."
  inductor = Inductor(L = 18) {
    "Dyad": {"placement": {"icon": {"x1": 0, "y1": 200, "x2": 200, "y2": 400, "rot": 90}}}
  }
  "Linear resistor, typically in series with the inductor."
  resistor = Resistor(R = 12.5e-3) {
    "Dyad": {"placement": {"icon": {"x1": 0, "y1": 500, "x2": 200, "y2": 700, "rot": 90}}}
  }
  "Linear conductor, connecting the two capacitors."
  conductor = Conductor(G = 0.565) {
    "Dyad": {"placement": {"icon": {"x1": 450, "y1": 50, "x2": 650, "y2": 250, "rot": 0}}}
  }
  "First capacitor in the Chua's circuit."
  capacitor1 = Capacitor(C = 10) {
    "Dyad": {"placement": {"icon": {"x1": 600, "y1": 350, "x2": 800, "y2": 550, "rot": 90}}}
  }
  "Second capacitor in the Chua's circuit."
  capacitor2 = Capacitor(C = 100) {
    "Dyad": {"placement": {"icon": {"x1": 300, "y1": 350, "x2": 500, "y2": 550, "rot": 90}}}
  }
  "Nonlinear resistor representing the Chua's diode, with parameters Ga, Gb, Ve."
  nonlinear_resistor = NonlinearResistor(Ga = -0.757576, Gb = -0.409091, Ve = 1) {
    "Dyad": {
      "placement": {"icon": {"x1": 900, "y1": 350, "x2": 1100, "y2": 550, "rot": 90}}
    }
  }
  "Ground reference for the circuit."
  ground = Ground() {
    "Dyad": {"placement": {"icon": {"x1": 450, "y1": 800, "x2": 650, "y2": 1000, "rot": 0}}}
  }
relations
  initial inductor.i = 0
  initial capacitor1.v = 4
  initial capacitor2.v = 0
  connect(inductor.n, resistor.p) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
  connect(inductor.p, capacitor2.p, conductor.p) {
    "Dyad": {
      "edges": [
        {"S": -1, "M": [{"x": 100, "y": 150}], "E": 1},
        {"S": -1, "E": 2},
        {"S": -1, "E": 3}
      ],
      "junctions": [{"x": 400, "y": 150}]
    }
  }
  connect(conductor.n, nonlinear_resistor.p, capacitor1.p) {
    "Dyad": {
      "edges": [
        {"S": -1, "E": 1},
        {"S": -1, "M": [{"x": 1000, "y": 150}], "E": 2},
        {"S": -1, "E": 3}
      ],
      "junctions": [{"x": 700, "y": 150}]
    }
  }
  connect(ground.g, resistor.n, capacitor2.n, capacitor1.n, nonlinear_resistor.n) {
    "Dyad": {
      "edges": [
        {"S": -1, "E": 1},
        {"S": -1, "M": [{"x": 100, "y": 750}], "E": 2},
        {"S": -1, "M": [{"x": 400, "y": 750}], "E": 3},
        {"S": -1, "M": [{"x": 700, "y": 750}], "E": 4},
        {"S": -1, "M": [{"x": 1000, "y": 750}], "E": 5}
      ],
      "junctions": [{"x": 550, "y": 750}]
    }
  }
metadata {
  "Dyad": {"tests": {"case1": {"stop": 50000, "expect": {"signals": ["capacitor1.v"]}}}}
}
end
Flattened Source
dyad
"""
Chua's circuit, an electronic circuit known for its chaotic dynamics.

This component represents Chua's circuit, a relatively simple electronic system
capable of exhibiting complex nonlinear dynamics, including bifurcations and
chaos. The circuit is constructed from two capacitors (`capacitor1`, `capacitor2`),
one inductor (`inductor`), a linear resistor (`resistor`), a linear conductor
(`conductor`), and a single nonlinear element known as Chua's diode (represented
by `nonlinear_resistor`). The behavior of the circuit is typically described by a
set of three first-order autonomous ordinary differential equations for the
voltage across each capacitor and the current through the inductor.

The current `i_NR` through the `nonlinear_resistor` as a function of the voltage `v_C1` across it is given by:

math i_{NR}(v_{C1}) = Gb \cdot v_{C1} + \frac{1}{2}(Ga - Gb)(|v_{C1} + Ve| - |v_{C1} - Ve|)

The governing differential equations for the circuit are (using `v_C1` for `capacitor1.v`, `v_C2` for `capacitor2.v`, `i_L` for `inductor.i`):

math capacitor1.C \cdot \frac{d(v_{C1})}{dt} = conductor.G \cdot (v_{C2} - v_{C1}) - i_{NR}(v_{C1})

math capacitor2.C \cdot \frac{d(v_{C2})}{dt} = conductor.G \cdot (v_{C1} - v_{C2}) - i_L

math inductor.L \cdot \frac{d(i_L)}{dt} = v_{C2} - resistor.R \cdot i_L

Initial conditions for `capacitor1.v`, `capacitor2.v`, and `inductor.i` are
specified within the `relations` block to define the starting state of the simulation.
"""
component ChuaCircuit
  "Inductor of the Chua's circuit."
  inductor = Inductor(L = 18) {
    "Dyad": {"placement": {"icon": {"x1": 0, "y1": 200, "x2": 200, "y2": 400, "rot": 90}}}
  }
  "Linear resistor, typically in series with the inductor."
  resistor = Resistor(R = 12.5e-3) {
    "Dyad": {"placement": {"icon": {"x1": 0, "y1": 500, "x2": 200, "y2": 700, "rot": 90}}}
  }
  "Linear conductor, connecting the two capacitors."
  conductor = Conductor(G = 0.565) {
    "Dyad": {"placement": {"icon": {"x1": 450, "y1": 50, "x2": 650, "y2": 250, "rot": 0}}}
  }
  "First capacitor in the Chua's circuit."
  capacitor1 = Capacitor(C = 10) {
    "Dyad": {"placement": {"icon": {"x1": 600, "y1": 350, "x2": 800, "y2": 550, "rot": 90}}}
  }
  "Second capacitor in the Chua's circuit."
  capacitor2 = Capacitor(C = 100) {
    "Dyad": {"placement": {"icon": {"x1": 300, "y1": 350, "x2": 500, "y2": 550, "rot": 90}}}
  }
  "Nonlinear resistor representing the Chua's diode, with parameters Ga, Gb, Ve."
  nonlinear_resistor = NonlinearResistor(Ga = -0.757576, Gb = -0.409091, Ve = 1) {
    "Dyad": {
      "placement": {"icon": {"x1": 900, "y1": 350, "x2": 1100, "y2": 550, "rot": 90}}
    }
  }
  "Ground reference for the circuit."
  ground = Ground() {
    "Dyad": {"placement": {"icon": {"x1": 450, "y1": 800, "x2": 650, "y2": 1000, "rot": 0}}}
  }
relations
  initial inductor.i = 0
  initial capacitor1.v = 4
  initial capacitor2.v = 0
  connect(inductor.n, resistor.p) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
  connect(inductor.p, capacitor2.p, conductor.p) {
    "Dyad": {
      "edges": [
        {"S": -1, "M": [{"x": 100, "y": 150}], "E": 1},
        {"S": -1, "E": 2},
        {"S": -1, "E": 3}
      ],
      "junctions": [{"x": 400, "y": 150}]
    }
  }
  connect(conductor.n, nonlinear_resistor.p, capacitor1.p) {
    "Dyad": {
      "edges": [
        {"S": -1, "E": 1},
        {"S": -1, "M": [{"x": 1000, "y": 150}], "E": 2},
        {"S": -1, "E": 3}
      ],
      "junctions": [{"x": 700, "y": 150}]
    }
  }
  connect(ground.g, resistor.n, capacitor2.n, capacitor1.n, nonlinear_resistor.n) {
    "Dyad": {
      "edges": [
        {"S": -1, "E": 1},
        {"S": -1, "M": [{"x": 100, "y": 750}], "E": 2},
        {"S": -1, "M": [{"x": 400, "y": 750}], "E": 3},
        {"S": -1, "M": [{"x": 700, "y": 750}], "E": 4},
        {"S": -1, "M": [{"x": 1000, "y": 750}], "E": 5}
      ],
      "junctions": [{"x": 550, "y": 750}]
    }
  }
metadata {
  "Dyad": {"tests": {"case1": {"stop": 50000, "expect": {"signals": ["capacitor1.v"]}}}}
}
end


Test Cases ​

Test Case case1 ​

julia
plt

  • Examples

  • Experiments

  • Analyses