Hi! Are there any examples of C-V characteristics of a mosfet (C-Vgs)? I tried to transfer the code from the diode example (ssac_diode), but apparently got confused( and it doesn’t work.
vgs=[]
cgs=[]
ids=[]
v=0.0
while v < 4.1:
circuit_alter(name="V1", value=v)
set_parameter(device=device, name=GetContactBiasName('gate'), value=v)
solve(type="dc", absolute_error=1.0e30, relative_error=1e-5, maximum_iterations=50)
#solve(type="dc", absolute_error=1e30, relative_error=1e-10, maximum_iterations=100)
#PrintCurrents(device, "drain")
contact_bias_name = GetContactBiasName('drain')
electron_current= get_contact_current(device=device, contact='drain', equation="ElectronContinuityEquation")
hole_current= get_contact_current(device=device, contact='drain', equation="HoleContinuityEquation")
total_current= electron_current + hole_current
solve(type="ac", frequency=1.0)
cap=get_circuit_node_value(node="V1.I", solution="ssac_imag")/ (-2*math.pi)
print("capacitance {0} {1}".format(v, cap))
vgs.append(v)
cgs.append(c)
ids.append(total_current)
v += 0.1