The general non-linear dependent (arbitrary) source is a powerful feature: in some cases a single general non-linear dependent source can replace an entire subcircuit! This feature can be used instead of the POLY command, which is prone to error because it uses a long string of position-dependent parameters.
EXXXX N+ N- value = {<expression>}
GXXXX N+ N- value = {<expression>}
Examples:
E1 0 1 value = {cos(v(1)+sin(v(2))}E1 0 1 value = {ln(cos(log(v(1)-v(2)^2)))- + v(2)^4+v(2)^v(1)}E1 1 0 value = {v(output)+5}**E1 1 0 value = {sin(2*3.1415*2meg*time)}Ecomp 0 out value = {min(max((v(in)-2.5)*1e4, 0.0) , 5.0)}EC C 0 value = {table(v(1),-1,-2,1,2)}G1 3 4 value = 17G1 3 4 value = {exp((i^i(vdd))}G133 0 out value={min(max(open_loop_gain/rout*v(1),v(2)),v(3))}E3 3 0 table {v(1,2)/ws} = (-1,0) (-.9,-1) (-.1,-1) (.1,1) (.9,1)
NOTE: When referring to a node with an alphanumeric name in the expression field, DR. SPICE requires v( ) around the name to identify it as a valid voltage node.
N+ is the positive node N- is the negative node. The value parameter determines the voltage or current across and through the device.
You can build value expressions using the built-in functions of DR. SPICE. For a detailed list of these functions, refer to the Func section.
DR. SPICE uses the partial derivatives of the functions as part of the Newton method. When the values of the circuit variables used in the expressions enter a region where the value of the expression or of any of its partial derivatives becomes undefined, an error occurs.