Simulation by analysis

The simulation of circuits in PyAMS-CAD is based by Graphical user interface in six steps:

Step a. Add Symbol in schematic

../_images/pyams_02.png
    1. Select Library

    1. Click the symbol in the components list;

    1. Click the position in the schematic;

    1. Rotation

Step b. Linking elements by wire

../_images/pyams_03.png
    1. Click on the wire icon;

    1. Connect the pins;

    1. Modified name or color of wire;

../_images/pyams_04.png

Note

You can finish drawing the wires by “end Menu”.

Step c. Modifying parameters of elements

../_images/pyams_06.png
    1. Click on parameter

    1. Change value or name

../_images/pyams_07.png
  • You can add new parameter or reference or label.

../_images/pyams_05.png
  • You can change global parameters from dialog.

../_images/pyams_08.png

Note

These parameters in the dialog are automatically exported from the Python model in the initial function.

../_images/pyams_09.png

Note

You can modified model described by python language.

Step d. Adding a analysis in the circuit with adjusting type of analysis and add outputs

../_images/pyams_10.png
    1. Click on the analysis icon

    1. Select Analysis

    1. Select the type

    1. Add outputs

Step e. run circuit

../_images/pyams_11.png
    1. Click on the analysis command icon.

    1. Click Execute in the dialog box.

    1. Exit.

Step f. results

../_images/pyams_12.png
  • The result present in plot.

../_images/pyams_13.png
  • By show plot you can get values (X,Y).

Operating-Points

The OP analysis by PyAMS is find operating points in the circuit for time=0. The simulation of circuits in OP is based by tree steps: * 1. Add Probe * 2. Get Name * 3. Run OP analysis

1. Add Probe

../_images/pyams_14.png

2. Get Name

../_images/pyams_15.png

3. Run OP analysis

../_images/pyams_16.png

Simulation using PyCode

The PyCode feature allows circuit analysis and processing using Python, with the possibility of leveraging many user-installed packages such as matplotlib, numpy, pandas, and more.

Note

You can add any Python version to PyAMS by selecting Python in the dialog and using the Python Path option to specify the interpreter you want to use.

Steps for circuit study using PyCode

  1. Add a PyCode block to the schematic.

  2. Click Show — a dialog will appear with two pages:

    • The first page displays the circuit code, which cannot be modified directly from the schematic.

    • The second page extends the first one, where you can apply circuit analysis using built-in Python packages, along with pyams-lib.

  3. Execute the analysis and obtain the results.

  4. Display the results in the graphical interface.

1. Add a PyCode block to the schematic

../_images/pyams_17.png

2. Click Show

../_images/pyams_18.png
    1. The first page displays the circuit code, which cannot be modified directly from the schematic.

../_images/pyams_19.png
    1. The second page extends the first one, where you can apply circuit analysis

../_images/pyams_20.png

3. Execute the analysis and obtain the results

../_images/pyams_21.png

Click to save

4. Display the results in the graphical interface

../_images/pyams_22.png