Differentiator

The Differentiator block is a simple derivative stage that approximates the time derivative of an input signal by calculating the incremental slope of that signal since the previous timepoint. The block also includes gain and output 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. 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 radian frequency of analysis multiplied by the gain.

Note that since truncation error checking is not included in the d_dt block, it is not recommended that the model be used to provide an integration function through the use of a feedback loop. Such an arrangement could produce erroneous results. Instead, you should make use of the "integrate" model, which does include truncation error checking for enhanced accuracy.

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
out_offset output 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

Example

al2 7 12 slope_gen
  
.model slope.gen d_dt(out_offset=0.0 gain=1.0 out_lower_limit=le-12 out_upper_limit=lel2 limit_range=le-9)

See also

XSPICE Devices
XSPICE Code Models