Comparator Implementation with VCVS

Thread Starter

RedKing

Joined Nov 5, 2009
4
Hello,

I am currently trying to simulate an oscillator circuit using PSpice. I have been recommended to use a Voltage Controlled Voltage Source in lieu of a comparator, due to its more ideal characteristics (since I can't find a model for the one I need). I need to implement this as part of a bigger circuit, however. Ultimately, this is supposed to be an Inverting Comparator with Hysteresis. It is modeled by a piecewise linear VCVS:

Compar.sp Inverting Comparator with Hysteresis
.OPTIONS POST PROBE
.PARAM vohigh=5v volow=-2.5v rbval=1k rfval=9k
Ecomp out 0 PWL(1) a b -2u,vohigh 1u, volow
Rb b 0 rbval
Rf b out rfval
Cb b 0 1ff
Vin a 0 PWL(0,-4 1u,4 2u,-4)
.TRAN .1n 2u
.PROBE Vin=V(a) Vab=V(a,b) Vout=V(out)
.END

Where: Vreference_low = (Vo_low*Rb)/(Rb + Rf)
Vreference_high = (Vo_high*Rb)/(Rb + Rf)

When Vin exceeds Vrefhigh, the output Vout goes to Volow. For Vin less than Vreflow, the output goes to Vohigh.

I'll admit; I'm quite inexperienced with using PSpice and have only implemented designs using the OrCad GUI. I would really appreciate some help on this problem.

Pretty please?
 
Top