pingspice.examples.boost.Sim(object)
class documentation
Part of pingspice.examples.boost
(View In Hierarchy)
Known subclasses: pingspice.examples.boost.RampUp, pingspice.examples.boost.Startup, pingspice.examples.boost.Switching
I run a simulation for a switchmode boost converter. Construct an
instance of a subclass of me with an Args
object containing
your command-line arguments and options.
Then you can call the instance to get a Deferred
that fires
with the Vector_Ngspice
object V when I have prepared
(but not yet shown) a Matplotlib Figure
with my results.
Class Variable | Nc | The number of columns in the Matplotlib Figure that shows
results. |
Class Variable | Nr | The number of rows in the Matplotlib Figure that shows
results. |
Class Variable | timeWarp | The thermal timewarp. |
Class Variable | fastWarmup | Set True to use an initial fast warmup. |
Class Variable | N_ts | Set > 1 if convergence problems; that will increase circuit ts vs that of TRAN timestep |
Instance Variable | M | Set to a multiple of 1 to do decimation on the output, i.e., have internal Ngspice timestep be that multiple of the nominal time between samples produced. |
Instance Variable | name | The name to use for my circuit. |
Instance Variable | names | A list of Ngspice result vector names to obtain. |
Instance Variable | t0 | The time to start obtaining simulation results. |
Instance Variable | t1 | The end time for the simulation. |
Class Method | setArgs | All instances will share the same command-line args, analysis Config object
cfg, SwitchmodeTools
object smct, and CircuitBuilder
object cb. |
Method | __init__ | Sim() |
Method | dutyCycles | Property: Start and end duty cycle, as floats from 0-1. |
Method | tranArgs | Property: A list with the arguments to the TRAN instance call
that follow the reference to an NgspiceRunner
instance. |
Method | vectorsFile | Property: The name of an .npz file for saving or loading a
transient analysis with my name. |
Method | tran | Performs a transient analysis from my time t0 to time t1. |
Method | setup | You can implement this in your subclass to do setup stuff before I call my tran object. |
Method | plot | You must implement this in your subclass to plot results. |
Method | __call__ | Call an instance of a subclass of me to run a transient simulation, plot
the results as defined by your plot method,
and return the (deferred) Vectors_Ngspice
object. |
def setArgs(cls, args):
All instances will share the same command-line args, analysis Config
object
cfg, SwitchmodeTools
object smct, and CircuitBuilder
object cb.
def tranArgs(self):
Property: A list with the arguments to the TRAN
instance call
that follow the reference to an NgspiceRunner
instance.
def vectorsFile(self):
Property: The name of an .npz
file for saving or loading a
transient analysis with my name.
Performs a transient analysis from my time t0 to time t1.
Returns a Deferred
that fires with (1) the case temperature
initialization time to set aside at the beginning of your TRAN simulation,
and (2) an instance of analysis.sim.Vectors
populated with the
vector names supplied as additional arguments.
You can implement this in your subclass to do setup stuff before I call my tran object.
You must implement this in your subclass to plot results.
Call an instance of a subclass of me to run a transient simulation, plot
the results as defined by your plot
method,
and return the (deferred) Vectors_Ngspice
object.
First calls any setup
method you have defined in the subclass.