Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LTSpice initial conditions

235 views
Skip to first unread message

bitrex

unread,
Apr 25, 2016, 3:36:46 PM4/25/16
to
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.

Tim Wescott

unread,
Apr 25, 2016, 3:40:35 PM4/25/16
to
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

bitrex

unread,
Apr 25, 2016, 3:49:17 PM4/25/16
to
On 04/25/2016 03:40 PM, Tim Wescott wrote:
> On Mon, 25 Apr 2016 15:36:41 -0400, bitrex wrote:
>
>> 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.
>

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

Tim Wescott

unread,
Apr 25, 2016, 4:30:21 PM4/25/16
to
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

Jim Thompson

unread,
Apr 25, 2016, 7:55:37 PM4/25/16
to
On Mon, 25 Apr 2016 15:36:41 -0400, bitrex
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

Jim Thompson

unread,
Apr 25, 2016, 9:30:51 PM4/25/16
to
On Mon, 25 Apr 2016 16:55:32 -0700, Jim Thompson
<To-Email-Use-Th...@On-My-Web-Site.com> wrote:

>On Mon, 25 Apr 2016 15:36:41 -0400, bitrex
><bit...@de.lete.earthlink.net> wrote:
>
>>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.
>
>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

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

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

The @IC just means the number you supplied.

Tim Wescott

unread,
Apr 25, 2016, 10:28:49 PM4/25/16
to
On Mon, 25 Apr 2016 18:30:47 -0700, Jim Thompson wrote:

> On Mon, 25 Apr 2016 16:55:32 -0700, Jim Thompson
> <To-Email-Use-Th...@On-My-Web-Site.com> wrote:
>
>>On Mon, 25 Apr 2016 15:36:41 -0400, bitrex
>><bit...@de.lete.earthlink.net> wrote:
>>
>>>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.
>>
>>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
>
> 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

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

--
www.wescottdesign.com

Tim Williams

unread,
Apr 26, 2016, 4:05:18 AM4/26/16
to
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: http://seventransistorlabs.com

"bitrex" <bit...@de.lete.earthlink.net> wrote in message
news:dluTy.17962$5J4....@fx26.iad...

Phil Hobbs

unread,
Apr 26, 2016, 12:07:50 PM4/26/16
to
On 04/26/2016 04:05 AM, Tim Williams wrote:
> 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
>
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
0 new messages