Divider

This function is a two-quadrant divider. It takes two inputs; num (numerator) and den (denominator). Divide offsets its inputs, multiplies them by their respective gains, divides the results, multiplies the quotient by the output gain, and offsets the result. The denominator is limited to a value above zero via a user specified lower limit. This limit is approached through a quadratic smoothing function, the domain of which may be specified as a fraction of the lower limit value, or as an absolute value. This model will operate in DC, AC and Transient analysis modes. However, in AC analysis it is important to remember that results are invalid unless only one input of the divider is connected to a node which bears an AC signal (this is exemplified by the use of the divider to perform a potentiometer function: one input is DC, the other carriers the AC signal).

Port Table

Description Direction Default Type Allowed Types Vector Vector Bounds Null Allowed
Numerator  IN v v,vd,i,id,vnam NO   NO
Denominator IN v v,vd,i,id,vnam NO   NO
Output OUT v v,vd,i,id NO   NO

Parameter Table

Name Description Data Type Default Value Limits Vector Vector Bounds Null Allowed
num_offset Numerator offset Real 0.0   NO   YES
num_gain Numerator gain Real 1.0   NO   YES
den_offset Denominator offset Real 0.0   NO   YES
den_gain Denominator gain Real 1.0   NO   YES
den_lower_limit Denominator lower limit Real 1.0e-10 1.0e-10 - NO   YES
den_domain Denominator smoothing domain Real 1.0e-16   NO   YES
fraction Smoothing fraction/absolute value switch Boolean FALSE   NO   YES
out_gain Output gain Real 1.0   NO   YES
out_offset Output offset Real 0.0   NO   YES

Example

a4 1 2 3 4 divider

.model divider divide(num_offset=0.1 num_gain=2.5 den_offset=-0.1 den_gain=5.0 den_lower_limit=1e-5 
+                     den_domain=1e-6 fraction=FALSE out_gain=1.0 out_offset=0.0)

See also

XSPICE Devices
XSPICE Code Models