Maker Pro
ako: A Kind Of (aliasing components)

ako: A Kind Of (aliasing components)

A component model is referenced in LTSPICE by either referencing an element from a library or by adding an explicit .model statement into the schematic. When a circuit needs to be simulated with different devices or different device parameters the reference or the .model statement needs to be changed every time.
When using library models the library may need to be edited to change device parameters.

Enter the (undocumented) directive ako: (A Kind Of):

  1. Change a model parameter:
    .model MyBZX84C8V2L ako:BZX84C8V2L bv=Mybv
    This statement defines an alias component named MyBZX84C8V2L (a zener diode) as being derived from the library component BZX84C8V2L where the parameter bv (breakdown voltage) is modified to bv=Mybv.
    The modifier Mybv can then be used in another directive to step the model through different values of bv using a .step statement:
    .step param Mybv list 6 8 10 - this will step Mybv through 6 V, 8 V and 10 V
    bv could be set to a fixed value by e.g. bv=6 V if no stepping is required.
  2. Step a component through different models:
    Assume a circuit shall be evaluated for different components for a transistor, e.g. 2N2222, 2N3904 and BC817-40.
    The obvious idea of using a .step command like .step param MyNPN list 2N2222 2N3904 BC817-40 will fail as the .step statement accepts only numerical values.
    Using the ako: aliasing modifier numerical equivalents for the library models can be created which in turn can then be stepped:
    .model 2222 ako:2N2222
    .model 3904 ako:2N3904
    .model 81740 ako:BC817-40
    .step param MyNPN list 2222 3904 81740
    The first three lines define the aliases, e.g. 2222 as an alias for 2N2222.
    The last line steps through the 3 different transistor types, which is now possible as the aliases are numerical.

Example: a (meaningless) circuit exemplifying both usages of the ako: modifier:

StepModel.png
figure 3‑21 Example circuit for the ako: modifier

Source: undocumented LTSPICE


SPICE help topics to look at: .model, .step
Author
Harald Kapp
Views
2,627
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Harald Kapp

Top