[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: specifying an arbitrary function as ac source



> How do I specify an aribtrary ac source in gschem? For example,
> I want a current a source of e^(At)sin(Bt) where A and B are some constants.
> 
> I have tried searching google, but am not sure what I should
> specifically search for. I have found that I can specify an ac source
> with an amplitude and a phase, but not how to specify a source which an
> arbitrary function of time.

Ummmm, what kind of arbitrary AC source are you looking for?  I assume
SPICE.   If so, SPICE doesn't support arbitrary source
waveforms using a single device.  It gives you things like sine, PWL,
DC, and a few others which I have forgotten.  Here's the SPICE
documentation on sources: 

http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/sec3.html#3.2

If you really need a decaying sine wave, you can create one using the
nonlinear dependent source element B:

http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/sec3.html#3.2.3

Instantiate a sine wave independent source, an exponential independent
source, and then combine them together with a B source to create your
decaying exponential. 

As for whether spice-sdb supports nonlinear dependent sources, I
belive it doesn't [1].  :-(   You'll need to edit the netlist by hand
to get it in there.  :-(   :-(  Alternately, you can make an
independent source symbol, give it a
DEVICE=NONLINEAR_INDEPENDENT_SOURCE and edit  spice-sdb to spit out a
SPICE B card when it finds an NONLINEAR_DEPENDENT_SOURCE.  It's not
difficult.  If you do this, please submit the patches, and I'll
integrate them into spice-sdb.  

Stuart

[1]  I forget everything which is in there.  It wouldn't hurt to look
for the symbol before you do anything else.