ahkab.diode

This module contains a diode element and its model class.

_images/diode.svg
class diode(part_id, n1, n2, model, AREA=None, T=None, ic=None, off=False)[source]

A diode element.

Parameters:

n1, n2 : string
The diode anode and cathode.
model : model instance
The diode model providing the mathemathical modeling.
ic : float
The diode initial voltage condition for transient analysis (ie \(V_D = V(n_1) - V(n_2)\) at \(t = 0\)).
off : bool
Whether the diode should be initially assumed to be off when computing an OP.

The other are the physical parameters reported in the following table:

Parameter Default value Description
AREA 1.0 Area multiplier
T circuit temp Operating temperature
g(op_index, ports_v, port_index, time=0)[source]
get_drive_ports(op)[source]
get_netlist_elem_line(nodes_dict)[source]
get_op_info(ports_v_v)[source]

Information regarding the Operating Point (OP)

Parameters:

ports_v : list of lists
The parameter is to be set to [[v]], where v is the voltage applied to the diode terminals.

Returns:

op_keys : list of strings
The labels corresponding to the numeric values in op_info.
op_info : list of floats
The values corresponding to op_keys.
get_output_ports()[source]
gstamp(ports_v, time=0, reduced=True)[source]

Returns the differential (trans)conductance wrt the port specified by port_index when the element has the voltages specified in ports_v across its ports, at (simulation) time.

ports_v: a list in the form: [voltage_across_port0, voltage_across_port1, ...] port_index: an integer, 0 <= port_index < len(self.get_ports()) time: the simulation time at which the evaluation is performed. Set it to None during DC analysis.

i(op_index, ports_v, time=0)[source]
istamp(ports_v, time=0, reduced=True)[source]

Get the current matrix

A matrix corresponding to the current flowing in the element with the voltages applied as specified in the ports_v vector.

Parameters:

ports_v : list
A list in the form: [voltage_across_port0, voltage_across_port1, ...]
time: float
the simulation time at which the evaluation is performed. It has no effect here. Set it to None during DC analysis.
set_temperature(T)[source]

Set the operating temperature IN KELVIN degrees

class diode_model(name, IS=None, N=None, NBV=None, ISR=None, NR=None, RS=None, CJ0=None, M=None, VJ=None, FC=None, CP=None, TT=None, BV=None, IBV=None, IKF=None, KF=None, AF=None, FFE=None, TEMP=None, XTI=None, EG=None, TBV=None, TRS=None, TTT1=None, TTT2=None, TM1=None, TM2=None, material=<ahkab.constants.silicon instance>)[source]

A diode model implementing the Shockley diode equation.

Currently the capacitance modeling part is missing.

The principal parameters are:

Parameter Default value Description
IS 1e-14 A Specific current
N 1.0 Emission coefficient
ISR 0.0 A Recombination current
NR 2.0 Recombination coefficient
RS 0.0 ohm Series resistance per unit area

please refer to a textbook description of the Shockley diode equation or to the source file diode.py file for the other parameters.

get_gm(*key)[source]
get_i(*key)[source]
print_model()[source]
set_temperature(T)[source]