Problem with LTspice: Time stop too small

Firenze02

Joined Sep 1, 2018
47
Hi,

I'm trying to create a variable resistor dependign from the value of current.

Please find attached the .asc file.

It doesn't work, when I run the simulation the following messages is presented:

Analysis: Time step too small; initial timepoint: trouble with node "n002".

Do you know how to fix this problem?

Thank you.

Attachments

• 613 bytes Views: 4

Bordodynov

Joined May 20, 2015
3,012
See

Attachments

• 742 bytes Views: 5

Firenze02

Joined Sep 1, 2018
47
Dear @Bordodynov, I would like to simulate the following variable resistor, but I have the same problem.

Can you solve it?

Really thank you.

Attachments

• 947 bytes Views: 5
Last edited by a moderator:

Bordodynov

Joined May 20, 2015
3,012
See

Attachments

• 950 bytes Views: 6

Firenze02

Joined Sep 1, 2018
47

What does it mean .opt gshunt?

Anyway, I think it doesn't work. The voltage across V1 is 0V, while it should be 10V.

ericgibbs

Joined Jan 29, 2010
16,357
hi,
LTSpicd Help option.

Firenze02

Joined Sep 1, 2018
47
hi F02,
Look at this link for 'extra LTS features, they may suggest alternatives.
E
http://ltwiki.org/index.php?title=Undocumented_LTspice#Behavioral_Resistors
Dear ericgibbs, thank you for sharing me this information.

Being "gshunt" the optional conductance I set that to a very lowe value G=1/R (high Resistance).

Please find attached the last version of the .asc file.

As you can see, I set an "if" statement in the R value, following the sintax:

R=if(condition,valueiftrue,valueiffalse)

How can I do if I have three interval?

I<1mA a=a1=10.2576
1mA ≤ I < 10 A a=a2=14.6851
I > 10A a=a3=0.5415

Do you know the correct sintax?

Really thank you.

Attachments

• 1 KB Views: 2

eetech00

Joined Jun 8, 2013
3,418
Try using “Limit”.

In the example below:
MIN=the minimum value for R
MAX=the maximum value for R

R=Limit(MIN,MAX,equation)

eT

Bordodynov

Joined May 20, 2015
3,012
I am sorry. .opt gshunt=1n.
Perhaps you specified an unreal function and therefore there is no solution. When I asked the inverse function, the solution was found.