Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsElectronicsBasicsRepairDesignCADComponentsEquipmentElectrical Engineering
ElectronicsKB.com
Contact UsLink To UsSearch & Site Map

Electronics Forum / CAD / February 2006



Tip: Looking for answers? Try searching our database.

simple ngSPICE simulation headache

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pstrang_nospam@gmail_nospam.com - 12 Feb 2006 22:36 GMT
Arrrggghhh....I'm at a loss as to the source of these errors.  I get
them with the most basic circuit.
My tools: gEDA suite version from Jan 2006: gschem -> gnetlist ->
ngspice.

Here's my netlist:

=============================================================
* gnetlist -v -g spice-sdb ammeter.sch
*********************************************************
* Spice file generated by gnetlist                      *
* spice-sdb version 12.27.2005 by SDB --                *
* provides advanced spice netlisting capability.        *
* Documentation at http://www.brorson.com/gEDA/SPICE/   *
*********************************************************
*==============  Begin SPICE netlist of main design ============
V1 2 0 sin(12 1 1kHz)
Rload 1 0 1.2
Rshunt 2 1 .001
.END
=============================================================

I'm new to SPICE, and am just trying to simulate a sinusoidal signal
through a resister divider network.  Easy right?  Blaahhhh.

=============================================================
******
** ngspice-17 : Circuit level simulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Please submit bug-reports to: ngspice-bugs@lists.sourceforge.net
** Creation Date: Sat Feb 11 20:30:26 MST 2006
******

Circuit: * gnetlist -v -g spice-sdb ammeter.sch

ngspice 201 -> tran .00001 .002
Doing analysis at TEMP = 300.150000 and TNOM = 300.150000
Fatal error: tran: transmission line z0 must be given
doAnalyses: no such parameter on this device

tran simulation(s) aborted
================================================================

What the #@^%? I don't have ANY transmission lines!  I've tried
numerous different sources.  It actually worked once, but I can't
reproduce it. :(  darn it!

Any help would be very much appreciated.
Thanks!
Helmut Sennewald - 12 Feb 2006 22:44 GMT
> Arrrggghhh....I'm at a loss as to the source of these errors.  I get
> them with the most basic circuit.
[quoted text clipped - 46 lines]
> Any help would be very much appreciated.
> Thanks!

Hello,

you forgot the '.' in front of "tran".

.tran ...

All SPICE commands start with '.'.

Txxx ... means indeed a transmission line.

Best regards,
Helmut
Jim Thompson - 12 Feb 2006 22:48 GMT
>Arrrggghhh....I'm at a loss as to the source of these errors.  I get
>them with the most basic circuit.
[quoted text clipped - 13 lines]
>*==============  Begin SPICE netlist of main design ============
>V1 2 0 sin(12 1 1kHz)
OFFSET ----^  ^----AMPLITUDE

Is that what you really want?

>Rload 1 0 1.2
>Rshunt 2 1 .001
[quoted text clipped - 29 lines]
>Any help would be very much appreciated.
>Thanks!

Well?  It is FREE after all ;-)

                                       ...Jim Thompson
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
           
Freedom of the Press? We Have a New Definition of Yellow Journalism
pstrang_nospam@gmail_nospam.com - 12 Feb 2006 22:52 GMT
Thanks guys.  Yea, I'm simulating a small sinusoidal signal ontop of a
DC source (just playing around).

In ngspice, the commands don't start with a '.'.  But yea, now I see
the source of the confusion.  Hummm...still a mystery.
Jim Thompson - 12 Feb 2006 22:59 GMT
>Thanks guys.  Yea, I'm simulating a small sinusoidal signal ontop of a
>DC source (just playing around).
>
>In ngspice, the commands don't start with a '.'.  

Are you sure?  Then how do you differentiate between a transient
COMMAND and a T-line?

>But yea, now I see
>the source of the confusion.  Hummm...still a mystery.

Leave it to the Eunuchs crowd to obfuscate the simple...

From....

http://ngspice.sourceforge.net/octavespice.html

* simulation de RC2
.control
tran 10n 10000n
write
.endc

Looks like the analysis command has to be "wrapped" in a
.control/.endc statement.

                                       ...Jim Thompson
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
           
Freedom of the Press? We Have a New Definition of Yellow Journalism
pstrang_nospam@gmail_nospam.com - 12 Feb 2006 23:18 GMT
Thank you!
Jim Thompson - 12 Feb 2006 23:19 GMT
>Thank you!

You are quite welcome!

                                       ...Jim Thompson
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
           
Freedom of the Press? We Have a New Definition of Yellow Journalism
Stuart Brorson - 13 Feb 2006 01:21 GMT
: Looks like the analysis command has to be "wrapped" in a
: .control/.endc statement.

This should not be the case.   Moreover, I tried running the OP's
circuit using my copy of ngspice.  I had no problem entering the
tran command & getting good results without the dot (.tran) or without
using .control/.endc.

Note to Helumt:  The OP was issuing tran at the command line.  You
don't need the dot notation when the SPICE directive is issued at the
command line.  YOu only need it when you embedd the command in the
SPICE netlist.  Of course, you never touch the SPICE command line when
you use LTSpice, so you use the dot notation all the time.  ;-)

Questions for the OP:

1.  Did following Jim's suggestion (use .control/.endc) really work
for you?

2.  If so, when you built ngspice, which configure flags did you set?
Can you please post (or e-mail me) the config.log file?  Of particular
interest are the first half-dozen or so lines of the log file which
output what the configure parameters were.  I'd like to see if because
I wonder if the control stuff (newly added) has some bugs in it.

Stuart
Fred Bartoli - 16 Feb 2006 10:40 GMT
> >Thanks guys.  Yea, I'm simulating a small sinusoidal signal ontop of a
> >DC source (just playing around).
[quoted text clipped - 21 lines]
> Looks like the analysis command has to be "wrapped" in a
> .control/.endc statement.

Don't know ngspice, but the .control .endc is the XSPICE standard control
block that allow lots of nice scripting.
Inside the block, no dot prefixing.

You can still use dotted commands with no control block.

IOW, either write:

.control
tran 10n 10000n
write
.endc

or:
.tran 10n 10000n

Signature

Thanks,
Fred.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.