Tutorial 3 - Installing Third Party Models

In this tutorial, we will install a device model library. For this exercise, we have supplied a model library file - TUTORIAL3.MOD - with just two devices. These are:

SXN1001 - an NPN bipolar transistor SXOA1000 - an opamp.

Both are totally fictitious.

You will find this file in the tutorial folder i.e. Examples/SIMetrix/Tutorials/Tutorial3.mod. There are two aspects to installing a model. SIMetrix needs to know where within your file system, the model is located. If the model is to be listed in the model library browser system, then SIMetrix also needs to know what symbol to use for it in the schematic and what category it comes under. This is how you do it:

  1. Open windows explorer or click on My Computer or open other file manager of your choice.
  2. Locate TUTORIAL3.MOD in EXAMPLES/SIMetrix/Tutorials (see Examples and Tutorials - Where are They?). Pick the file up and drop into the SIMetrix command shell message window. That is, drop it in the window where SIMetrix messages are displayed. If the command shell is not visible, select menu View > Show Command Shell. After dropping the file, this dialog box will appear: Select Install then Ok. The message
    Model library changed. Rebuilding catalogs, please wait...
    will be displayed, followed by
    Complete
    .

At this stage, SIMetrix knows where to find our fictitious devices. You will find that it also knows about the NPN transistor as the following demonstrates:

  1. Open an empty schematic.
  2. Press ctrl-G or select menu Place > From Model Library. You should see a window displayed with the caption Select Device
  3. Select the * Recently Added Models * category from the top of list shown on the left hand side.
  4. Select SXN1001 from the listed items on the right hand side. This is what you should see:
  5. Press Place to place the device on the schematic.
Without you having to tell it, SIMetrix already knew that the SXN1001 is an NPN transistor. This is because it is a primitive device defined using a .MODEL control. Such devices are built in to the simulator and SIMetrix can determine the part type simply by reading the .MODEL control in TUTORIAL3.MOD.

This is not the case with the other device in the model library. This is an opamp and is defined as a subcircuit. This is a module made up of other parts, in this case BJTs, diodes, resistors and current sources. SIMetrix can't tell what type of device this is. It knows that it has five terminals and it knows where the electrical model is located in the file system, but it doesn't know what schematic symbol to use for this model.

SIMetrix will ask you for this information when you try and place it. Follow this procedure:

  1. Repeat the steps 1-5 above but instead select the SXOA1000 device instead of the SXN1000. Notice that when you select the device in the right hand side, you see the message SIMetrix does not know what symbol to use for this model. Press "Place" to resolve.
  2. After pressing the Place button, you should see the following box:
  3. First specify a suitable category for the device. In this case it is an operational amplifier, so select Op-amps from the drop down box labelled Choose Category for SXOA1000.
  4. Next define a symbol for this part. Under Define Symbol for SXOA1000 select Operational Amplifier - 5 terminal.
We have not quite finished yet. Our new op-amp has the wrong pin out for the schematic symbol. The pin order for the symbol is shown in the third box down on the right and is as follows:
Pin name Function
INP Non-inverting input
INN Inverting input
VSP Positive supply
VSN Negative supply
OUT Output

The text at the bottom of the dialog box shows the actual subcircuit definition. Fortunately, it has been annotated with the function of each of the sub-circuit's terminals. (This is in fact usually the case with third-party models). As you can see, the output terminal is in the wrong place. We can change the pin order using the Pin order up and down buttons:

  1. Select out in the pin order box.
  2. Click twice on the up button so that it is positioned between inn and vsp. This is what you will now have:
  3. Press OK
You will now find our op-amp listed under the Op-amps category in the model library browser.

Notes

You will not always need to execute the above procedure to associate models and symbols even for subcircuit devices. SIMetrix is supplied with a data base of over 40000 devices that are already associated. These are devices for which SPICE models are known to be available from some third party source. This database is in the file all.cat which you will find in 'support\devdb' directory. The information you enter in the associate models dialog is stored in a file called user_v2.cat which you will find in devdb/user under the application data directory - see Application Data Directory.

You will also not need to perform the above procedure for many 2 and 3 terminal semiconductor parts even if they are not listed in the all.cat database. SIMetrix runs a series of simulations on these models and attempts to determine what the device type is from their results. If successful, the 'association' step demonstrated above will be skipped.

Finally, there is a method of embedding association information within the model itself, and such models will not require manual association. The embedding method is described in Embedded Association.