Ideal diode
electrical.ideal_diode
Diode that conducts with resistance Ron when the voltage of p over n is positive and leaks with conductance Goff otherwise.
Ports
| Name | Domain |
|---|---|
p | electrical |
n | electrical |
Parameters
| Name | Unit | Default | Range | Description |
|---|---|---|---|---|
Ron | Ohm | 0.00001 | 1e-12 to ∞ | Resistance when conducting |
Goff | S | 0.00001 | 0 to ∞ | Conductance when blocking |
Variables
| Name | Unit |
|---|---|
v | V |
i | A |
Equations
v = p.v - n.v 0 = p.i + n.i i = p.i i = if v > 0 then v / Ron else Goff * v