Comparator
Behavioral model of a comparator integrated circuit
Libraries:
Simscape /
Electrical /
Integrated Circuits
Description
The Comparator block is an abstracted behavioral model of a comparator integrated circuit. It does not model an internal transistor-level implementation. Therefore, the block runs quickly during simulation but retains the correct I/O behavior. The block models differential inputs electrically as having infinite resistance and a finite or zero capacitance.
The block models the gate output as a voltage source driving a series resistor and a capacitor that connects to ground. The output pin connects to the resistor-capacitor connection node. If the difference in the inputs is greater than the input threshold voltage, then the output is equal to the High level output voltage (). Otherwise, the output is equal to the Low level output voltage ().
The output model is shown in the following illustration.
Examples
Assumptions and Limitations
Modeling of the output as a controlled voltage source is representative of a totem-pole or push-pull output stage. To model a device with an open-collector:
Connect the output pin to the base of an NPN Bipolar Transistor or PNP Bipolar Transistor block.
Set the Output resistance parameter to a suitable value.
Ports
Conserving
Parameters
Extended Capabilities
Version History
Introduced in R2009b