Integrator

The Integrator block is a simple integration stage that approximates the integral with respect to time of an input signal. The block also includes gain and input offset parameters to allow for tailoring of the required signal, and output upper and lower limits to prevent convergence errors resulting from excessively large output values. Note that these limits specify integrator behavior similar to that found in an operational amplifier-based integration stage, in that once a limit is reached, additional storage does not occur. Thus, the input of a negative value to an integrator which is currently driving at the out_upper_limit level will immediately cause a drop in the output, regardless of how long the integrator was previously summing positive inputs. The incremental value of output below the output_upper_limit and above the output_lower_limit at which smoothing begins is specified via the limit_range parameter. In AC analysis, the value returned is equal to the gain divided by the radian frequency of analysis.

Note that truncation error checking is included in the "int" block. This should provide for a more accurate simulation of the time integration function, since the model will inherently request smaller time increments between simulation points if truncation errors would otherwise be excessive.

Port Table

Description Direction Default Type Allowed Types Vector Vector Bounds Null Allowed
Input 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
in_offset input offset Real 0.0   NO   YES
gain gain Real 1.0   NO   YES
out_lower_limit output lower limit Real     NO   YES
out_upper_limit output upper limit Real     NO   YES
limit_range upper & lower limit smoothing range Real 1.0e-6   NO   YES
out_ic output initial condition Real 0.0   NO   YES

Example

ai3 7 12 time_count
  
.model time_count int(in_offset=0.0 gain=1.0 out_lower_limit=-lel2 out_upper_limit=lel2 limit_range=le-9 out_ic=0.0)

See also

XSPICE Devices
XSPICE Code Models