How to Create Custom .MDF Analog Simulation Model in Proteus

This is a note on how to create your own analog schematic models for simulation with Proteus VSM (Virtual System Modelling). Here you can learn how to build a custom analog schematic model using Proteus VSM. You can learn step by step, to build sub-circuits, compile and create .MDF simulation model file, and use and test the custom created .mdf model with circuit simulation. 

The following video shows how I used Proteus Propilot AI to build the sub-circuit:

There are broadly speaking two types of models in Proteus VSM:

A. Electrical Models

  • Schematic Models (Primitives)
  • Spice based Models
  • VSM API based Models(analog SPICE,digital DSIM) aka DLL models
B. Graphical Models
  • Uses DLL models that supports Analog, Digital and Mixed Mode with support of Graphical Animation
For using spice model in proteus see the following tutorials:
- and the easier but temporal way is demonstrated in Import spice model in Proteus and draw JFET drain curve
If you are interested in creating custom component using VSM API then see the following tutorial:
Note that for using VSM API you need the vsm.hpp header file which you can find in the previous mentioned tutorial.

Analog Schematic Model

Creating analog schematic models involves creating sub-circuit with primitive components from the ASIM library and other libraries. 

The steps create custom analog schematic model for simulation are as follows: 

1. Drawing the component body and use one or more pins (pins are mandatory otherwise during Make Device you will get error)

component body and use one or more pins

2. Selecting all the component parts and right click to use the Make Device option (which is also on the toolbar), Assigning Name, Footprint if required, and saving it in some library.

Make Device

Make Device
Analog Simulation Model in Proteus

Create Custom Analog Simulation Model in Proteus

3. Then the same component is picked up from library and placed on the schematic.

Analog Simulation Model in Proteus

4. Then we Attach Hierarchy Module to the component by right clicking on it and opening its edit properties window where there is an option to check mark for Attach Hierarchy Module.

Attach Hierarchy Module

5 We create the analog circuit for our analog component in the child sheet. Right click the component and select Goto Child Sheet as shown.

child sheet

The Child Sheet(or Sub Sheet) schematic will be blank.

Child Sheet schematic will be blank

Note:

  • To exit the Sub-Sheet or the Child Sheet press CTRL+X (for eXit)
  • To enter the Sub-Sheet or the Child Sheet press CTRL+Z (for Zoom)
6. The next step is to create the component internal circuit.

Here as an example, I have built a filter schematic model that mimics 2nd order Unity Gain Sallen-Key filter. So, the sub-circuit in the child shield contains the circuit of 2nd order Unity Gain Sallen-Key filter as shown below.

2nd order Unity Gain Sallen-Key filter

The input and output terminals are picked up from the terminal mode. And they should have the same pin names as that of the main component which is in and out. 

7. The next step is to compile the model into MDF format.

While inside the child sheet, at the top toolbar under Tools, there is model compiler option Click on the model compiler and save the model with some name like sallenkeyfilter.mdf.
model compiler MDF

creating mdf file in proteus

8. The next is to compile the filter as component using the Make Device command.

For this, exit the child sheet or sub sheet using shortcut key CTRL+X. Then from the parent sheet, right click the filter schematic part and click on Make Device. Then give it some name, some perfix and in the properties window add MODFILE and point it to the sellenkeyfilter.mdf that we created in the earlier step.

Make Device

How to Create Custom Analog Simulation Model in Proteus

Creating MDF model in Proteus

8.Running and Testing the custom part with Simulation is the next step. If everything is ok, the filter should work as expected.
Create .mdf analog custom model in proteus

Frequency analysis in proteus

So in this way you can design and create your own analog simulation model in Proteus Professional 9.

The following video shows how I used Proteus Propilot AI to build the sub-circuit:

Other related tutorials and downloads for free links:

Post a Comment

Previous Post Next Post