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

Re: gEDA-user: File instead of SPICE voltage source?



Yes,
The file exists before. a large one. near 30,000 samples each 1ms apart, produced by a data acquisition system.
like this:


  0.0000    14.65
  0.0010   -10.99
  0.0020   -26.86
  .
  .
  .
  29.9920   -73.24
  29.9930   -105.0
  29.9940   -78.13

The original file was comma separated, I removed them with a SED script.

my experiment with PWL and spice ( my last email ) was successful, but it was slow.
I am new to splines, but the idea is interesting, since it shows the behavior of the original analog signal better than a PWL.


How is this possible with GNU-CAP?

in the case of a quadratic or cubic spline, what value should I choose for transient analysis step size?

regards,
Shahab.


al davis wrote:
On Sunday 01 May 2005 04:55 pm, Shahab Sanjari wrote:

This one is somehow off topic, actually a general question
about SPICE simulation, but I thought I'd better ask it here.

Is it possible to tell the SPICE, that a voltage source
doesn't generate according to a fix function, but rather
reads a file from hard disk which has data in it? For example
an ASCII file that has two columns separated with tabs or
space, one for time and the other for amplitude. I could then
feed this into my custom made filter to check the output.


Gnucap will do it the same way another poster said to do it with Spice, and some other ways too.

With gnucap, you can also do it through a .model statement. When you do it this way, you can pick the order of interpolation up to 3. 1 is PWL, 2 is quadratic splines, 3 is cubic splines. You can also set the boundary conditions. There is no limit on the number of points.

It will take about 5 lines of code to add exactly the feature you are looking for. If you want to try it I can do it this weekend.

Does the file exist completely before running the simulation? Or is the file being created as the simulation runs?



--

Shahab Sanjari (sanjariathrzdottu-darmstadtdotde)