LTSpice initial conditions

Is there any way to use an LTSpice ".ic" command to make some node voltage equal to the supply voltage at the beginning of the simulation? Say I wanted to change the supply voltage and then have the initial condition voltage change automatically.

".ic V(my_node) = V(Vcc)" for example doesn't work.

Reply to
bitrex
Loading thread data ...

I don't know if you can do this, but you can set an initial voltage as a parameter and use it both for the VCC supply and the initial condition.

I do this quite often.

--
Tim Wescott 
Wescott Design Services 
 Click to see the full signature
Reply to
Tim Wescott

Ah, I had the suspicion I was thinking about that one backwards...

Reply to
bitrex

You can't refer to the initial condition directly -- you have to use a .parm command to set a number, and then apply that number to both the .ic command and the power supply's voltage.

--
www.wescottdesign.com
Reply to
Tim Wescott

PSpice has IC2 which is a .IC between two nodes.

But I think...

.IC V(A,B)=0 would do what you want. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
 Click to see the full signature
Reply to
Jim Thompson

Yep, that will work. I looked up "template" for IC2, it's...

.IC V(%+,%-)=@IC

The @IC just means the number you supplied. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
 Click to see the full signature
Reply to
Jim Thompson

Kewl. I knew that not, but now I do.

--
www.wescottdesign.com
Reply to
Tim Wescott

You can also put a VPULSE into a SW to join nodes under DC conditions, then open it after some nano/microseconds. You also get the softness of the switch risetime helping convergence, if it's being finnicky. (DON'T set the switch for super fast and all that, you want it as slow as tolerable so it ramps open.)

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
 Click to see the full signature
Reply to
Tim Williams

i.e. use negative hysteresis (VH) to get a smooth differentiable curve.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.