Passive components

Passive components do not produce or amplify signals, but only apply an impedance to their input. They have two nodes, node1 and node2. The node order does not matter. Passive components have a complex, frequency dependent impedance(); the specific component type - resistor, capacitor or inductor - governs how this impedance behaves as a function of frequency.

Resistors

>>> from zero.components import Resistor

Resistors have a real impedance, i.e. a resistance, with no frequency dependence. This resistance has units of ohm (Ω). A resistor object can be instantiated by providing the resistance and the name of two nodes:

>>> r = Resistor(value="430k", node1="n1", node2="n2")

The resistance can be changed using the resistor’s resistance() property:

>>> r.resistance = "1.1M"

In a circuit, resistor produce Johnson noise.

Capacitors

>>> from zero.components import Capacitor

Capacitors have an imaginary, frequency dependent impedance determined by its capacitance in units of farad (F). A capacitor object can be instantiated by providing the capacitance and the name of two nodes:

>>> c = Capacitor(value="47n", node1="n1", node2="n2")

The capacitance can be changed using the capacitor’s capacitance() property:

>>> c.capacitance = "100n"

Capacitors are considered ideal and do not produce noise.

Inductors

>>> from zero.components import Inductor

Inductors have an imaginary, frequency dependent impedance determined by its inductance in units of henry (H). An inductor object can be instantiated by providing the inductance and the name of two nodes:

>>> l = Inductor(value="1.6u", node1="n1", node2="n2")

The inductance can be changed using the inductor’s inductance() property:

>>> l.inductance = "2.2u"

Inductors are considered ideal and do not produce noise.

A pair of inductors can also be configured as mutual inductors, allowing for transformers to be simulated.