Problem with LTspice: Time stop too small

Discussion in 'Power Electronics' started by Firenze02, Mar 7, 2019.

  1. Firenze02

    Thread Starter Member

    Sep 1, 2018
    32
    0
    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.
     
  2. Bordodynov

    Well-Known Member

    May 20, 2015
    2,344
    727
    See
    2019-03-07_13-14-33.png
     
    Firenze02 likes this.
  3. Firenze02

    Thread Starter Member

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

    Can you solve it?

    Really thank you.
     
    Last edited by a moderator: Mar 7, 2019
  4. Bordodynov

    Well-Known Member

    May 20, 2015
    2,344
    727
    See
    2019-03-07_14-32-45.png
     
  5. Firenze02

    Thread Starter Member

    Sep 1, 2018
    32
    0

    What does it mean .opt gshunt?

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

    Moderator

    Jan 29, 2010
    8,545
    1,719
    hi,
    LTSpicd Help option.
    AA1 07-Mar-19 12.06.gif
     
  7. ericgibbs

    Moderator

    Jan 29, 2010
    8,545
    1,719
  8. Firenze02

    Thread Starter Member

    Sep 1, 2018
    32
    0
    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.
     
  9. eetech00

    Senior Member

    Jun 8, 2013
    1,619
    333
    Try using “Limit”.

    In the example below:
    MIN=the minimum value for R
    MAX=the maximum value for R
    equation=your “if” statement

    R=Limit(MIN,MAX,equation)

    eT
     
  10. Bordodynov

    Well-Known Member

    May 20, 2015
    2,344
    727
    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.
     
Loading...