Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Error in .step simulation in LTSpiceIV

Status
Not open for further replies.

milkoni

Member
Hi all,
I've decided to use LTSpiceIV for my small projects. I like it very much. But I have a problem to step a resistor value. I do everything as is described in tutorial, but it don't work. I'm adding some screenshots. Just to say - I've downloaded a program three days ago from official site. No problems and error messages during installation. Yesterday I've downloaded two files from LTWiki - LargeCollection.zip and LtSpiceIV_Plus_12_2009.exe and installed them. Is my problem related with these files?

P.S. I've fully uninstalled the program. Then I've installed it again. The error still remains...:banghead:

Thank you in advance!
 

Attachments

  • LT_1.jpg
    LT_1.jpg
    31 KB · Views: 381
  • LT_2.jpg
    LT_2.jpg
    47.3 KB · Views: 373
  • LT_3.jpg
    LT_3.jpg
    33.6 KB · Views: 410
Last edited:
All variants of Spice derived from Berkely Spice, including LTSpice, have always had the restriction that the value of any Resistor in the netlist cannot be zero Ω. Think about what happens when LTSpice tries to evaluate this: I=E/R.

When stepping a resistor value, just start with a minimum value of 1uΩ or 1mΩ. Change your command to

.step param pot 1m 25K 5K


and it will work as you intended. During the first step, the value of the resistor will be 1mΩ, which is so close to zero that you will still see how the circuit works with the pot diddled to it's min. value...

The error message told you exactly what was wrong... There was nothing wrong with the installation.
 
Last edited:
Hi m,
The problem is the 0 value in the pot Step, it will not allow a zero value, try .step param pot 0.01 25k 5k

Post your asc file.

E

Damn: Mike's beaten me too it.!:woot: I must be slowing down.
 
All variants of Spice derived from Berkely Spice, including LTSpice, have always had the restriction that the value of any Resistor in the netlist cannot be zero Ω. Think about what happens when LTSpice tries to evaluate this: I=E/R.

When stepping a resistor value, just start with a minimum value of 1uΩ or 1mΩ. Change your command to

.step param pot 1m 25K 5K


and it will work as you intended. During the first step, the value of the resistor will be 1mΩ, which is so close to zero that you will still see how the circuit works with the pot diddled to it's min. value...

The error message told you exactly what was wrong... There was nothing wrong with the installation.

Oh yeah divide by zero and the math blows up. That explains why my last attempt of using the .step command did not work. I was trying to step a 50 ohm load going from short to open, and it would not work. Hey Mike, awhile back you posted a simulation file using the step, It looked like a rainbow and skittles. I wanted to DL that sim file but I can't remember where it was. Would you mind re-posting that one?

Mucho Gracias
 
Post #4 here. .TRANsient simulation with a step amplitude of the source. It is so simple, you can just recreate the ckt.

Parameter substitution is one of the most powerful features of Spice! In this example, the stepped parameter can take on the value of zero, or become negative.

I set the plot trace colors to follow the resistor color code (Red is always the first step, cant use Brown on my background), to make it easier to figure out which trace goes with which stepped value... That setting is sticky, so works for all plots on this computer. My other computer still has the default LTSpice colors...
 
Last edited:
Thanks Mike, actually I liked your choice of colors, I was just making joke.:joyful: The resistor color code idea is very clever, I like it. Thanks for posting the link.
 
Your LT_3.jpg attachment plainly shows the Error that we are talking about: [R2: Resistance must not be zero].
Did you not understand that? :confused:
 
Last edited:
Your LT_3.jpg attachment plainly shows the Error that we are talking about: [R2: Resistance must not be zero].
Did you not understand that? :confused:
Yes, I see this now :confused: and I read messages very carefully already . When I've posted this thread, I've just began to use LTSpice.
 
Milkoni: Welcome to LTspice. If you need to know more, please see my tutorials. they will get you going. there are also quite a few video tutorials on www.linear.com. I also recommend you look at the Yahoo user group for third party spice models etc. Fairchild and Diodes.com have some good models too if you are going to get into dc/dc converter design in a big way.

Welcome to the club

Simon
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top