Interfaces to SPICE / PSPICE

Schematics Import

Analog Insydes provides functions for importing circuit schematics into your Mathematica notebooks for better documentation of your circuit analysis tasks. The Analog Insydes function DXFGraphics displays a DXF file as a native Mathematica graphics object. Consider the following example where the file Buffer.dxf was produced by the DXF export function of MicroSim's Schematics editor.

<< AnalogInsydes`

\(DXFGraphics["AnalogInsydes/DemoFiles/Buffer.dxf", \ 
	
      TextStyle\  -> \ 
        {\ FontSize\  -> \ 70. , \ 
          FontColor\  -> \ RGBColor[1, 0, 0], 
	
          FontWeight\  -> \ Bold}, 
      PolylineWidthScale\  -> \ 0.001, 
	
      ColorList\  -> \ {RGBColor[0, 0, 0]}]\)

Netlist Reader

For circuit analysis and design tasks which combine symbolic and numerical calculations Analog Insydes, features interfaces to the circuit simulator SPICE. Instead of time-consuming manual netlist input, SPICE circuit descriptions can be converted automatically to the Analog Insydes format by applying the external binary executable spice2ai. Additionally, operating-point information can be extracted from the simulator output file. The example below illustrates the import of the SPICE netlist file Buffer.net.

SetDirectory[
      "D:/MATHEMATICA/AddOns/Applications/AnalogInsydes/Binaries"]; 
    Buffer = RunThrough[
        "spice2ai.exe \
D:/MATHEM~1/AddOns/Applic~1/Analog~1/DemoFi~1/Buffer.net", Null];

TableForm[List  @@  Buffer,  TableDepth -> 2]

Simulation Data Import

Analog Insydes supports import of simulation data generated by PSPICE or HSPICE, thus allowing us to use Mathematica's graphical visualization facilities for postprocessing and displaying simulation results. The example below demonstrates the import of the PSPICEsimulation output file Buffer.csd using the Analog Insydes function CSDFRead. In addition, an example for further postprocessing of the simulation results is shown.

BufferDatTran  =  
        CSDFRead["AnalogInsydes/DemoFiles/Buffer.csd"];

NodeNames  /.  ("Transient Analysis"  /.  BufferDatTran)  
      //  InputForm

VOUT[x_] = 
        CSDFInterpolatingFunctionList[BufferDatTran,  
            "Transient Analysis",  "V(VOUT)",  x][[1]];
IIN[x_] =  
        CSDFInterpolatingFunctionList[BufferDatTran,  
            "Transient Analysis",  "I(VIN)",  x][[1]];
IVDD[x_] =  
        CSDFInterpolatingFunctionList[BufferDatTran,  
            "Transient Analysis",  "I(VDD)",  x][[1]];

TransientPlot[{VOUT[t]}, {t, 0. , 1.*^-5}]

\(ParametricPlot3D[{IIN[t], VOUT[t], IVDD[t], Hue[t/\((1.*^-5)\)]}, 
      {t, 1.*^-6, 1.*^-5}\ , BoxRatios\  -> \ {1.0, \ 1.0, \ 1.0}, 
      PlotPoints -> 1000, 
      ViewPoint -> {3, \(-3\), 2. }, 
	\ \ \ AxesLabel\  -> \ 
        {\ \*""\!\(I\_IN\)"", \*""\!\(V\_OUT\)"", 
          \*""\!\(I\_VDD\)""}, PlotRange -> All, Ticks -> None]\)

Copyright © 1998 by ITWM e.V.

Written by Thomas Halfmann

Analog Insydes
ITWM - Institut für Techno- und Wirtschaftsmathematik e.V.
Erwin-Schrödinger-Str.
D-67663 Kaiserslautern, Germany

Analog Insydes is a trademark of ITWM.
Mathematica is a registered trademark of Wolfram Research, Inc.
All other product names are trademarks of their respective owners.

Copying and redistribution of this notebook is welcomed and encouraged, provided that the entire contents of the document, in particular the above copyright notice, is left unchanged and that the file is redistributed free of charge.