The Current Limiter models the behavior of an operational amplifier or comparator device at a high level of abstraction. All of its pins act as inputs; three of the four (pos_pwr, neg_pwr and out) also act as outputs.

The model takes as input a
voltage value from the in pin. It then
applies an offset and a gain, and derives from it an equivalent internal
voltage V_{eq}, which it limits to
fall between pos_pwr and neg_pwr
pins. If V_{eq} is greater than the output voltage
seen on the out pin, a sourcing current will flow from the
output pin. Conversely, if the voltage is less than the output voltage seen on the
out pin, a sinking current will
flow into the output pin.

Depending on the polarity of the current flow, either a sourcing or a sinking resistance value (r_out_source, r_out_sink) is applied to govern the vout/i_out relationship. The chosen resistance will continue to control the output current until it reaches a maximum value specified by either i_limit_source or i_limit_sink. The latter mimics the current limiting behavior of many operational amplifier output stages.

During all operation, the output current is reflected either in the
pos_pwr pin current or the neg_pwr pin current, depending on the polarity of
*i_out*. Thus, realistic power consumption as seen in the supply rails is
included in the model.

The user-specified smoothing parameters relate to model operation as follows:

v_pwr_range controls the voltage below
pos_pwr and above neg_pwr
inputs beyond which V_{eq} [= gain * (vin + voffset)] is smoothed;

i_source_range specifies the current below i_limit_source at which smoothing
begins, as well as specifying the current increment above i_out=0.0 at which
*i_pos_pwr* begins to transition to zero;

i_sink_range serves the same purpose
with respect to i_limit_sink and *i_neg_pwr* that
i_source range serves for
i_limit_source and *i_pos_pwr*;

r_out_domain specifies the incremental value
above and below (veq-vout)=0.0 at which* r_out* will be set to
r_out_source
and r_out_sink, respectively. For values of (veq-vout) less than
r_out_domain and greater than -r_out_domain,
*r_out* is interpolated smoothly
between r_out_source and r_out_sink.

# Parameters

Parameter | Description | Default | Limits |
---|---|---|---|

in_offset | Input offset. | 0 | |

gain | Gain. | 1 | |

r_out_source | Sourcing resistance. | 1 | min=1.0e-9 max=1.0e9 |

r_out_sink | Sinking resistance. | 1 | min=1.0e-9 max=1.0e9 |

i_limit_source | Current sourcing limit. | 1.0e-2 | min=1.0e-12 |

i_limit_sink | Current sinking limit. | 1.0e-2 | min=1.0e-12 |

v_pwr_range | Upper and lower power supply smoothing range. | 1.0e-6 | min=1.0e-15 |

i_source_range | Sourcing current smoothing range. | 1.0e-9 | min=1.0e-15 |

i_sink_range | Sinking current smoothing range. | 1.0e-9 | min=1.0e-15 |

r_out_domain | Output resistance smoothing domain. | 1.0e-9 | min=1.0e-15 |