For a transient simulation I want to specify the input signal as, e.g., a modulated Gaussian pulse. How can I do that? I'm using MacSpice.
Background: My aim is to simulate a lumped element circuit that models 'free space' and then visualize wave propagation. So space is discretized into cubes, each modelled e.g. by
formatting link
and then 100*100*100 cells create the simulation volume. I've created the respective netlist using a script which works nicely.
So now I want to impress between two nodes an input signal that is a modulated gaussian pulse and 'measure' the voltages across the circuit in order to get the data for visualizing wave propagation.
(?? previous attempt at a reply didn't show up...sorry if this ends up being a duplicate.)
I assume by "modulated gaussian pulse" you mean something of the form A*sin(2*pi*f*t)*exp(-k*(t-t0)^2)). If that's the case, you can do it in SPICE3-based simulators with the B nonlinear dependent source component. Dunno if your MacSpice has that or not. It's easy to generate a variable that's proportional to time: the current through an inductor connected to a constant voltage source, or the voltage across a capacitor connected to a constant current source. Start the inductor current or capacitor voltage with zero initial condition.
Many thanks, MacSpice supports the 'B' source type. As I'm a complete neophyte to text-based spice (used ADS/Spectre with a GUI before), is the following input file ok?
--
Another question, for the real simulation which has some 24 million
nodes, I want to write the transient voltages of some 1 million nodes to
text files for then postprocessing them with perl/awk and then matlab.
What is the best way to write out the data, so that a node with name
'name' is written to 'name.transient'? '.print' and '.save' don't seem
to take an argument specifying where to write to ;-/
Best,
Michael
Yeah, that seems to work for me in LTSpice. I think you got it. As you can see, the B component lets you do a really wide range of stuff. LTSpice adds some other functions, too, that can be useful, like random. And I see you found out how to write a file.
Thanks for your help. Moving from the trivial first test case slowly to my real problem I encounter two problems: 1) singular matrix errors (that I hopefully correctly cured by inserting 1TOhm resistors to ground) 2) an instability that leads to an aborting TRAN simulation. Well, theory says that the circuit simulation must be stable as only passive components are used... but, hey, we're in numerical approaches ;-) Any idea what to do in this case?
Ahhmm.. Just off the cuff inspection, those 1 femto ohm resisters are going to cause you big trouble indeed. Well on the way to creating a singular matrix.
Spice wont handle the numerical precision of even 1 f ohm (1e-15) to 1 ohm, let alone to 1 Tohm. You need to make sure that component values don't span more than about 12-13 decimal digits in range.
--
Kevin Aylward
ka@anasoftEXTRACT.co.uk
www.anasoft.co.uk
SuperSpice
Hm... Can you suggest a better approach? In case you mean that I'd have to use some commercial Spice - no problem, I'd be able to let another department run the job. Or do you mean that *in general* a transient simulation with 24e6 nodes (but containing only passive elements) is impossible?
I'll do intermediate size problems before the full 3D one, anyway. I'll see when MacSpice chokes ;-)
Not impossible, but expensive. Standard commercial spices just are not designed for matrixes that large. Thee are fast out there that quote 1B transistor handling, but they cost two arms and a leg.
--
Kevin Aylward
ka@anasoftEXTRACT.co.uk
www.anasoft.co.uk
SuperSpice
Yes, use a piece of software designed for modelling e/m propagation in free space, not one designed for modelling integrated circuits. Ansoft is probably your best starting point.
I would expect it to be impossible unless your Spice has a memory address space of more than 32bits which, AFAIK, few do. If it does you will find that it is extremely difficult to run the simulation because the solution/integration method used by a traditional Spice doesn't work well for inductances (they are not common elements in ic design)
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.