Why does my comparator not compare?
While a VCVS is in many ways a model of an ideal opamp (albeit with finite gain), you can't use it as a comparator unless you provide some way to limit the output voltage to stay within the supply rails. Using an opamp as a comparator relies on the fact that the output saturates -- a nonlinear effect. A VCVS is always linear -- it never saturates!

One way to do this is to add a clamping circuit to the output of a VCVS. V+ and V- represent your supply voltages. This requires the addition of a small but nonzero output resistance.







simulate this circuit &ndash; Schematic created using CircuitLab

A better model of a comparator would be a voltage-controlled switch. It has the nonlinear response that you want.

A simple model of a comparator uses just one, but requires a pullup or pulldown resistor. A more ideal version uses two switches.







simulate this circuit