Analog Switch

The Analog Switch is a resistor that varies either logarithmically or linearly between specified values of a controlling input voltage or current. Note that if the input is not internally limited and if the controlling signal exceeds the specified OFF state or ON state value, the resistance may become excessively large or excessively small (in the case of logarithmic dependence), or may become negative (in the case of linear dependence). For the experienced user, these excursions may prove valuable for modeling certain devices, but in most cases you are advised to add limiting of the controlling input if the possibility of excessive control value variation exists.

Port Table

Description Direction Default Type Allowed Types Vector Vector Bounds Null Allowed
Input IN v v,vd,i,id,vnam NO   NO
resistive output INOUT gd gd NO   NO

Parameter Table

Name Description Data Type Default Value Limits Vector Vector Bounds Null Allowed
cntl_off Control off val Real 0.0   NO   YES
cntl_on Control on val Real 1.0   NO   YES
log Log/linear switch Boolean TRUE   NO   YES
r_off Off resistance Real 1.0e12   NO   YES
r_on On resistance Real 1.0   NO   YES
limit Limit input value Boolean TRUE   NO   YES

Error Messages

ASWITCH: CONTROL voltage delta less than 1.0e-12.

This message occurs as a result of the cntl_off and cntl_on values being less than 1.0e-12 volts/amperes apart.

Examples

a8 3 (6 7) switch3

.model switch3 aswitch(cntl_off=0.0 cntl_on=5.0 r_off=le6 r_on=10.0 log=TRUE)

See also

XSPICE Devices
XSPICE Code Models