# Create circuit from current–voltage characteristic

I'm trying to create a circuit from a given current–voltage characteristic like this:

I want to use ideal diodes/ideal voltage source/ideal current source

So my idea was for the dotted graph the left circuit and for the solid graph the right circuit

(in case you wonder I created it with https://www.circuitlab.com)

Is that the right track - and if not what do I need to do then?

• There's a serious problem with the right side circuit. The series current source means that there can only be 1A of current clockwise. The series diode means that there can only be no current clockwise. That's a contradiction. Where is the graphed voltage in either of these circuits? Commented Jul 4, 2012 at 22:35

You can use arbitrary behavioral sources (also see #1 #2 for more info) to model this piecewise-linear device for simulation.

For example, by defining a current source with current expression "MAX(0, V()/0.1)", we've effectively modeled a diode that is open-circuit with reverse bias, and looks like a 0.1 ohm resistor with forward bias: (open and run simulation here)

You can now use this source I1 in more complicated circuit simulations (to simulate a switching power supply with an ideal diode, for example). And you can adjust the expression slightly in order to put the knee exactly where you'd like it.

• Is it possible to do this for an arbitrary IV curve, assuming it's mathematically allowed (no vertical lines, always single-valued)? For instance, I want a circuit which has a an IV trace like a sigmoidal function. How would I go about this? I consider Sam's question a special case of a more general problem, but didn't want to ask a separate question since they seem to be asking similar things. Commented Dec 30, 2015 at 0:07

Typically, an I-V characteristic is of a two-terminal device. The plot is of the current through the device against the voltage across the device.

It's standard to model a two-terminal device with ideal circuit elements connected in some way but I think that what's missing from your circuit diagrams are the two terminals that the plotted voltage is measured across and the plotted current is measured through.

For example, in the left side circuit, if you broke the connection between the diode anode and the positive terminal of the voltage source, and then labelled the diode anode as the positive terminal, you'd have a model for the two-terminal circuit element with the dotted I-V characteristic.

If you then connect an appropriately directed 1A current source in parallel with this model, you get the model for the solid characteristic.