PyAMS  (the software under revision)

PyAMS.Analog.SPICE.Resistor


Model SPICE-compatible resistor

Information

The linear resistor connects the branch voltage Vr with the branch current Ir by Ir=Vr/R. The Resistance R is allowed to be positive.

Temperature dependence

The block adjusts the specified or calculated resistance value for temperature "T" using the following equation:

R(T)=R*(1+TC1*(T-Tnom)+TC2*(T-Tnom)^2)

for Tnom is the nominal temperature. TNOM defaults to 27 °C

Parameters

NameDefaultDescription
R100Resistance [Ohm]
TC10.0Linear temperature coefficient [°C^-1]
TC20.0Quadratic temperature coefficient [°C^-1]

PyAMS definition

from PyAMS import Signal,Qtemp

#SPICE-compatible resistor
class SCResistor:
     def __init__(self, a, b):  
         self.Vr = Signal('in','potential',a,b)
         self.Ir = Signal('out','flow',a,b)
         self.R=1000.0  # R Resistor Value
         self.TC1=0.0   #Linear temperature coefficient
         self.TC2=0.0   #Quadratic temperature coefficient
     def start(self):
         self.R=self.R*Qtemp(self.TC1,self.TC2) 
     def analog(self): 
         self.Ir+=self.Vr/self.R

Documentation generated by PyAMS