LTspice designs, tips, and stuff

I have see many posts on the web asking how to make a current limited voltage source. One easy way to do this is to use a arbitrary behavioral current source and a little math.  What you want is this:

I=MIN( gain*error , <current limit> )


I=MIN( gain*(Vtarget - V(Vout)) , <current limit> )

Mike has provided a simulator friendly version of MIN with a third parameter:

I=UpLim( gain*(Vtarget - V(Vout)) , <current limit> )

So, for a 1000 volt 0.1 amp current limited voltage source:

I=UpLim(1000000*(1000-V(Vout)), .1, .001)

I have not found much documentation on the third parameter other than:

“defines a zone with quadratic soft limiting” from this page:

A reference for the behavioral sources can be found at:

Current Limited Voltage Source

Current limited voltage source driving fixed load R3 & RC load R2 & C1.

Valley Fill for Power Factor Correction

A relatively simple way to improve power factor is to use a valley fill circuit. Several more passives than a capacitor hung on the output of a bridge, if you load isn’t too large you can achieve an acceptable power factor. More optimizations can be found here:

Below is the result, red is V(Neutral)-V(Hot) and green is the current through V110VAC

Visit my other pages:

Electronic Design ToolsElectronics.html
Embedded ProgramingMacEmbeddedLinks.html
PCB design linksPCBLinks.html
Osmond PCBOsmond1.html
Home > Robert_Rau.html
Links >Links.html
Circuit Simulation & Design Aids >CircuitSimulationLinks.html


Home > Robert_Rau.html
Links >Links.html
Circuit Simulation & Design Aids >CircuitSimulationLinks.html