A test fixture for testing diode reverse recovery in a simulation-friendly way:

                       +---+         +----+
        +-- 10 ----+-->| R |-------->| A+ |
        |          |   +---+         |    |
        |          |                 |    |
    +---------+    |        +-------<| C- |
    |   +     |   R (SCA)   |        +----+
    | V:Pulse |    |        |         DUT
    |   -     |    |        |
    +---------+    |        |
        |          |        |
        +----------+--------+

The V source starts at +V_rev, with R selected to push I_fwd amps through the forward-biased diode, assuming it has a typical voltage drop of 0.7V (much smaller than the voltage source, so doesn't have to be exact or even really accounted for).

There is a high-value resistance in parallel with the V source for SCA (SPICE convergence aid), as with many V and B sources throughout. (Usually, SCA resistors are not shown on the diagram.)

To drop the current at the specified rate of dIdt, the V source goes from full positive to zero in time I_fwd / dIdt:

   +---//--------------------------//-------------+
   |:       :         :               :           |
   |:--//---,         :               :         ,-|
   |:       :\        :               :        /  |
   |:       : \       :               :       /   |
   |:       :  \      :               :      /    |
   |:       :   \     :               :     /     |
   |.............\........................./......|
   |:       :     \   :               :   /       |
   |:       :      \  :               :  /        |
   |:       :       \ :               : /         |
   |:       :        \:   V:Pulse     :/          |
   |:       :         '---------------' <----------- V_rev
   |:       :         :               :           |
   +:--//---:---------:------------//-:-----------+
    :       :         :               :
    :       :         :               :
   +:--//---:---------:------------//-:-----------+
   |:       :         :               :           |
   |:--//---,     <--- I_fwd          :           |
   |:       :\        :               :           |
   |:       : \       :               :           |
   |:       :  \      :               :           |
   |:       :   \     :        Iac    :           |
   |:..//........\........ ,,------//-:-----------|
   |:       :     \   :   /           :           |
   |:       :      ''---''            :           |
   |0       ts        ts+tr           ts+tr+tp    |
   +:--//---:---------:------------//-:-----------+
    :       :
    :       +------- Beginning of "rise" time
    +------------Beginning of TRAN simulation
Instance Variable V_rev The cathode-anode voltage at full reverse bias.
Instance Variable I_fwd The forward current supplied at full forward bias.
Instance Variable dIdt The derivative of diode current as it transitions from forward to reverse bias.
Static Method timing Returns pulse start time ts, rise (and fall) time tr, and pulse width time tp.
Method setup Subcircuit definition.

Inherited from NodeStuff (via Subcircuit):

Instance Variable shunts A dict of current sensing V elements with the pairs of nodes they connect.
Class Variable debug A Bag that gets set True for all instances to log info about each setup call.
Class Method autoName Undocumented
Method setupResults Undocumented
Method fill Undocumented
Method nodeCheck Call with the circuit building tool f and a sequence of nodes provided to this Include or Subcircuit.
Method rawNetlist Get lines of a raw netlist from a search hierarchy of possible sources.
Method shunt Call to insert a current-measuring shunt and add an entry to my Elements baton's dict of shunts.
Method raw See Elements.raw.
Method iNode See Elements.iNode.
Method ground See Elements.ground.
Method sca See Elements.sca.
Method sca6 See Elements.sca6.
Class Method _libDir Undocumented
Method _strippedLines Undocumented
Method _call_setup Calls my setup method (almost always your override of that method, actually) and processes any return value.

Inherited from NodeStuff (via Subcircuit):

Instance Variable shunts A dict of current sensing V elements with the pairs of nodes they connect.
Class Variable debug A Bag that gets set True for all instances to log info about each setup call.
Class Method autoName Undocumented
Method setupResults Undocumented
Method fill Undocumented
Method nodeCheck Call with the circuit building tool f and a sequence of nodes provided to this Include or Subcircuit.
Method rawNetlist Get lines of a raw netlist from a search hierarchy of possible sources.
Method shunt Call to insert a current-measuring shunt and add an entry to my Elements baton's dict of shunts.
Method raw See Elements.raw.
Method iNode See Elements.iNode.
Method ground See Elements.ground.
Method sca See Elements.sca.
Method sca6 See Elements.sca6.
Class Method _libDir Undocumented
Method _strippedLines Undocumented
Method _call_setup Calls my setup method (almost always your override of that method, actually) and processes any return value.
V_rev =
The cathode-anode voltage at full reverse bias.
I_fwd =
The forward current supplied at full forward bias.
dIdt =
The derivative of diode current as it transitions from forward to reverse bias.
@staticmethod
def timing(I_fwd, dIdt):

Returns pulse start time ts, rise (and fall) time tr, and pulse width time tp.

def setup(self, f):

Subcircuit definition.

Why use f? Because it's short and a conveniently typed letter on the keyboard.

Override this if your subclass does not reference a param.ParameterFinder subclass via the Finder class attribute. As with Include.setup, your override method can return a dict of attribute names and values to set in my instance.

API Documentation for pingspice, generated by pydoctor at 2021-09-18 08:41:11.