LTSpice initial conditions

Apr 25, 2016 8 Replies

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.


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 http://www.wescottdesign.com

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

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

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 | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | The touchstone of liberalism is intolerance

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 | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | The touchstone of liberalism is intolerance

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

www.wescottdesign.com

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 Website:

formatting link

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

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required