Contact our corporate or local offices directly.
A circuit is a set of components connected together to deliver the functionality and performance that your product requires. The parameters of the components you need in the circuit can be determined by:
The most efficient and cost-effective option is the use of modern methods of mathematical simulation, using Computer-Aided Design (CAD) systems.
Modern electrical circuit CAD systems combine the ability to simulate circuits that include both analog and digital devices. The use of computer simulation makes it possible to experiment, obtain real circuit characteristics, evaluate possible risks in the device, and also achieve the implementation that best delivers the product's intended operational range and characteristics.
This guide covers the basic principles of SPICE simulation, how to avoid mistakes, as well as lots of information on learning how to use the tool.
The main purpose of simulating the function of an electronic device is to represent and analyze the performance of the design. The jump from experimental methods to computer software simulation happened quite a long time ago. However, it is impossible to imagine the design of even the simplest device without the capabilities that simulation offers.
The use of a simulation program makes it possible to analyze all modes of the device being designed without possible damage, to determine parameters and characteristics that are difficult to measure in real conditions, and to perform measurements that might otherwise require the use of expensive measurement equipment. And the results of these simulations can conveniently be grouped on one plot, they can use several axes, you can change the display color, take measurements directly from the plots, share the results with colleagues, and much more.
SPICE (Simulation Program with Integrated Circuit Emphasis) was developed as an open-source software package, which has led to its broad popularity and continued development. Altium's Mixed Simulation (MixedSim) technology uses an improved core based on SPICE algorithms and is designed to simulate analog, digital or mixed analog-to-digital device electrical circuits.
This guide will cover not only the mechanisms for obtaining basic circuit characteristics, but also the features of circuit design for simulation, the process of adding models to circuit elements, and the description of the Netlist document and its application.
Altium's simulation technology is under active development, including the variety of supported models and model types (including Pspice & LTSpice), the underlying algorithms, and the available types of circuit analyses.
The simulator supports the following types of analyses:
To simulate the performance of the devices in a design each component is represented in the form of a mathematical model, which is attached to the component as a SPICE model. The models do not fully represent the characteristics of the real components, they reflect their basic properties. Component models are the most important elements in the simulation process, since the data in the model determines the validity of the characteristics and reliability of the analysis.
The simulator supports popular SPICE-model formats, including the Altium MixedSim format (SPICE), as well as the widely used PSPICE and LTSPICE formats. Model files with the extensions
.cir can be used.
The model (or macro model) is attached to the schematic symbol, either in the schematic library editor, or to the component once it has been placed on the schematic sheet. You can use the simulation-ready components in the installed Altium Designer libraries, or source models from many component manufacturers.
The software includes the following libraries that contain simulation-ready components (as shown in the image below):
In order to simulate a circuit, a signal source is normally required to stimulate the circuit. The Simulation Generic Components and the Simulation Sources libraries include a large set of DC and AC current and voltage sources, controlled current and voltage sources, and signal sources of various types.
The Simulation Sources library includes the following elements:
As well as placing a source from a library, you can also use the Simulate » Place Sources menu in the schematic editor to place voltage and current sources on the schematic sheet.
Sources can also be placed from the Active Bar, click and hold on the button to display the menu of special circuit elements. The last-used element will become the default for that button.
Once the source has been placed on the schematic, double-click on it to open the Properties panel. Note that you can change the Stimulus Type in the drop-down menu, when you do the set of parameters available to configure that source will automatically change.
Notes about working with sources:
The following parameters are set for DC voltage and current sources (as shown below):
The set of parameters for sinusoidal voltage and current sources includes similar parameters for the DC and AC components, as well as the following elements (shown in the image below):
The Properties panel includes a preview window that shows the signal, based on the specified parameters. This allows you to track the changes you have made and verify their correctness. You can hide and display the preview window by clicking the Hide Preview / Show Preview link.
Each type of source has its own set of parameters that must be configured, for example, the VPULSE is shown below:
It is often necessary to create a complex piecewise linear signal when the waveform is specified by the user. In this situation, interpolated VPWL and IPWL voltage and current sources can be used. The signal parameters of these sources are set by creating suitable Time-Value Pairs. This row contains the coordinate values of the axes as a numerical sequence, as shown below.
The circuit simulator also supports using a CSV file to specify the Time-Value Pairs for the interpolated VPWL and IPWL voltage and current sources.
Set the Source Stimulus Type to File in the Properties panel, then specify the path+filename in the File parameter (e.g.,
C:\Designs\Circuit Simulation\Analog Amplifier\PWL_test.csv), as shown below.
MixedSim can be used to obtain a number of different characteristics of the electrical circuit in the form of tables and plots. The Simulation Dashboard is used to control the analysis, define the view and adjust parameters. You can open the Dashboard from the Simulate menu, or the Panels menu.
Before you start the simulation, you must choose which documents are to be included in the simulation. It can be just the active schematic sheet (Document), or the whole project (Project), consisting of several sheets. The selection is made at the top of the Simulation Dashboard from the Affect drop-down menu.
As previously stated, the first step after creating a schematic is to verify the schematic and the component models. The verification process, along with examples of possible errors are described in more detail below, in the Schematic Design for Simulation section.
The next step is Preparation, where you confirm the Simulation Sources are correctly configured, and you can add Probes to measure voltage, current or power, at specific locations within the circuit.
The image above shows the Preparation section of the Simulation Dashboard, displaying the Simulation Sources and Probes detected on the schematic. To demonstrate the different modes of calculation, the example above uses two constant voltage power sources (VSRC) and the simulation-ready pulse voltage source (VPULSE).
Each Source and Probe includes a checkbox, this can be used to temporarily disable that Source or Probe. This feature allows you to add multiple sources with different characteristics to the same point in the circuit, and then enable / disable them as you need when running different simulations.
Each Source and Probe also includes an button, when this is clicked that Source/Probe is deleted from the design - note that this action cannot be undone. Probes also include a color selector, as shown in the image below.
Probes are used to take measurements at the location they are placed on the circuit. Probes can be used to track current, voltage, or power values and to display them on a plot. The display of the Probe name and value is configured in the Properties panel, each of these can be hidden or shown.
If the Probe is correctly connected, the designation is automatically assigned to the Probe. If the connection is incorrect, the text Empty Probe will be displayed instead of the designation, as shown below.
The next step is to select the type of calculation, set the parameters, and Run the simulation.
The list of available calculation types includes:
The Operating Point analysis calculates the values of current and voltage balance points in a steady-state circuit operation, the transfer coefficients in DC mode, as well as calculating the poles and zeros of the AC transfer characteristic that is required in other types of calculations.
Click Run to the right of the Operating Point text to perform an Operating Point analysis. A new document tab will automatically open, displaying the <ProjectName>.sdf file. The SDF document will include a single Operating Point tab (shown at the bottom of the workspace) that displays the calculations of all previously configured Probe points. Values are automatically calculated for all nodes in the circuit, these can be added to the results table by double-clicking on the Wave Name in the Sim Data panel when the SDF document is active.
You can also use the Display on schematic group of buttons to display the calculated values directly on the schematic. The values of voltages, power and currents can be displayed simultaneously and independently of each other, as shown below.
The parameters of the additional Advanced calculations in this section are hidden. To enable the calculations and set the parameters, tick the appropriate checkboxes: Transfer Function and Pole-Zero Analysis, as shown in the image below.
Once the settings have been configured, click the button to perform the analysis.
Calculations performed in the DC mode allow you to see what happens in the circuit as you change the values of sources and resistors.
You set the parameters and output expressions and start the calculation in the DC Sweep section. Click the +Add Parameter link to add the source(s) to be analyzed. In the From / To / Step fields you must specify the initial value of the source range, the final value, and the step size.
Additional output expressions (except active probes) can be added in the Output Expression section by clicking the +Add link. When an empty row appears, specify the output expression. This can be done manually, or you can click the button and select from the list of available Waveforms in the Add Output Expression dialog. Here you can not only select the desired signal from the list, but also define a mathematical expression using the menu of functions.
You also configure how those results should be plotted in the Add Output Expression dialog. In the Name and Units fields, you can specify the name of the output expression and the unit of measurement. Configure the Plot Number and Axis Number dropdowns to add the expression to an existing Plot / Axis, or create new ones.
Once the settings have been configured, click the button to perform the analysis.
When the DC Sweep analysis is run, the results will display on a tab in the SDF document labeled DC Sweep. The upper Plot in the image below shows the DC Sweep results, displaying the current characteristics on the pins of the resistor R7 (shown in the previous schematic example image). The lower Plot shows the voltage source values V3 before and after passing through the circuit.
The Transient analysis calculates the signal as a function of time. The time period can be defined as an Interval of time or as a number of cycles (Periods), by clicking the required mode button .
Additional output expressions (except active probes) can be added in the Output Expression section by clicking the +Add link. An empty row appears under the currently selected output expression row (the output expression rows can also be arranged using the drag-and-drop technique). Specify the output expression and set the plot number and color. This can be done using the added row right in the panel, or you can click the button and select from the list of available Waveforms in the Add Output Expression dialog. Here you can not only select the desired signal from the list but also define a mathematical expression using the menu of functions.
Once the settings have been configured, click the button to perform the analysis.
The Fourier analysis, i.e. spectral analysis, is a method of analyzing periodic waveforms. It can be performed as an additional option when performing a transient analysis. To perform a Fourier analysis, enable this option and set the Fundamental Frequency and the Number of Harmonics.
The Use Initial Conditions checkbox allows you to use initial conditions to calculate the transient process.
Once the settings have been configured, click the button to perform the analysis.
The results of the calculation are shown in a separate Transient Analysis tab in the SDF document, with a representation in the time domain of the output signal from the source (at the point in) and the output signal (at the point out.
The AC Sweep calculation is used to determine the frequency response of the system, that is, the dependence of the output signal amplitude on the input signal frequency.
Before performing the calculation, specify the values of the Start Frequency / End Frequency, and the number of points (No. Points, Points/Decade, or Points/Octave) for the distribution type selected in the Type dropdown. The method of selecting the output expressions is similar to the previous types of analysis.
The AC Sweep includes an optional Noise Analysis. Noise calculation parameters are hidden by default, they become visible once a Noise Analysis has been enabled.
The result of the calculation is the graphical display of the dependence of the output signal amplitude on the input signal frequency in a separate AC Sweep tab.
At the bottom of the Analysis Setup & Run section are options for varying the parameters of the different calculation types. The principle of additional calculations is based on going through the values of the parameters within the selected range and executing a series of calculations for each value of the parameters. You can enable each of the additional calculations by ticking the required checkbox.
The settings for the additional calculations are configured in the Advanced Analysis Settings dialog, click the button to open the dialog.
For the Temperature Sweep mode, the variable parameter is temperature. To simulate the behavior of the circuit at different temperatures, enable the Temperature checkbox and define (in degrees Celcius), the From (initial temperature), To (final temperature) values of the range, and the temperature Step size.
As an example, we can use the temperature sweep to calculate the current values on the R7 resistor pins using the Operating Point mode (first image below) and DC Sweep (second image below).
The parameter that is enumerated in Sweep Parameter mode is the basic parameter that the component has; for example, the resistance value for resistors, capacitance value for capacitors, and so on.
After the section is activated, you must select from the drop-down menu the component that parameter you want to change, as well as the order of change. It is necessary to specify the initial, final values of the range and the step. You can add an additional component using the +Add Parameter link.
The image below demonstrates sweeping a capacitor value during a transient analysis.
Monte Carlo mode analyses the effect of random changes of the parameters of the selected components, according to the selected distribution type. A Monte Carlo analysis requires the following parameters:
For example, you can use the Monte Carlo method with even distribution when calculating the amplitude-frequency characteristic.
The Spice advanced analysis settings are configured in the Advanced tab of the Advanced Analysis Settings dialog. Click in the Simulation Dashboard to open the dialog.
To run all of the analysis types and display them in the same SDF result file, use the Run Simulation command from the schematic editor Simulate menu, or press the F9 hotkey. Each analysis type will display on a separate tab in the SDF file.
An important part of the simulation process is analyzing the results. A common approach to doing this is to perform measurements on the output results. These measurements can reveal complex characteristics of the circuit, providing invaluable insights into the circuit behavior.
Measurements are a collection of quantities that characterize the behavior and quality of the circuit. The values of the measurements are calculated according to the specified rules by evaluating the characteristics of the waveforms in the circuit. Examples of measurements include bandwidth, gain, rise time, fall time, pulse width, frequency, and period. There are no limits to the number of measurements you can define.
Measurements are configured in the Measurements tab of the Add Output Expression dialog, with the results data being displayed in the Sim Data panel.
There are a number of features to help analyze the simulation measurement results.
These measurement features include:
Sensitivity Analysis provides a way of determining which circuit components or factors have the most influence on the output characteristics of a circuit. With this information, you can reduce the influence of negative characteristics, or alternatively, enhance the circuit performance based on positive characteristics. Sensitivity Analysis calculates sensitivities as numeric values of given measurements related to components/model parameters of circuit components, as well as sensitivity to temperature/global parameters. The result of the analysis is a table of the ranged values of sensitivities for each measurement type.
To perform a sensitivity analysis there must be a suitable measurement configured. In the image below, the AC Sweep analysis has an Output Expression set up;
dB(v(OUT)), and this output has two measurements configured; BW (short for Bandwidth) and MAX (maximum amplitude). The sensitivity can be calculated for either of these measurements.
To analyze the sensitivity, enable the Sensitivity option in the Simulation Dashboard as shown below, then click the Settings icon to open the Advanced Analysis Settings dialog, where the sensitivity options can be enabled on the Sensitivity tab of the dialog.
Configure the Sensitivity settings as required, close the Advanced Analysis Settings dialog and Run the analysis (AC Sweep in this example). When the waveforms appear, the Sim Data panel will also open. Switch to the Measurements tab of the panel, select the required set of measurement results and click the Sensitivity button (as shown below), to switch to the Sensitivity tab of the SDF results window. The sensitivity results are displayed in a table so you can quickly identify the component that has the greatest sensitivity to variations in its value.
There are several mandatory steps that must be followed in order for the simulation to be successful. It is also essential to perform an electrical rules check of the circuit before running the simulation.
If all design rules and required conditions are met, the Simulation Dashboard will display green tick icons to notify you verification has been successful. When the schematic sheet is active use the Simulate » Simulation Dashboard command to open the Simulation Dashboard.
The necessary conditions for the design of the electrical circuit are as follows:
The schematic used in the simulation must be part of a project (
*.PrjPcb). If the schematic sheet has been created without being linked to a project, the simulation command in the Simulate menu will be inactive. The ability to work with the Simulation Dashboard is also restricted, as shown below.
There should be at least one voltage or current source, or signal source, as part of the schematic design. If there is no source, the simulation can still be performed and you will be warned by the message Need to add source in the Preparation section of the Simulation Dashboard. For a detailed description of the sources and how to place them, refer to the Signal Sources section.
The schematic must include a GND net, that is, it must contain a node with a potential of zero that the simulation engine can use as a reference node. The simulation will not continue without this condition. The Verification section of the Simulation Dashboard displays a warning if this error is present. The Details link redirects you to the Messages panel for more information.
In the Active Bar there are commands to place a GND node, along with other power ports of different values, style and purpose.
If a component is missing a model, a warning will appear in the Verification region of the Simulation Dashboard. A similar warning will also appear when there is an error in the model.
Each component that is missing a model will be listed in the Simulation Dashboard, as shown in the image above. Click the +Add Model link to add the model manually. This will redirect you to the Sim Model dialog, where you can manually select and add a model to the chosen component. The process of adding a simulation model to a component is described in detail in the Adding models to the schematic components section. Alternatively, click the Assign Automatically link to add the missing models automatically from available sources.
While working on the schematic structure and the parameters of the components, there is a need to repeatedly check the design. Changes made to the schematics automatically trigger repeated checks, if errors are detected you will be notified with a corresponding message. If the verification is successful, this procedure is invisible to the user and so does not distract you from your work.
When simulating an electrical circuit, assigning a net name is not a mandatory condition but we recommend it for convenience. Assigning a net name makes the selection of points for displaying characteristics clearer, especially when working with complex schematics. In the Simulation Dashboard, for some types of calculations it is possible to select the desired points to display the characteristics on the plots in the Output Expression sections, if you have identified those points with a net label.
You can place a Net Label from the Active Bar, or via the Place » Net Label menu command. Before placing the Net Label on the schematic press the Tab keyboard shortcut to open the Properties panel, where you can define the Net Name.
Components and models can be stored as discrete files, or they can be stored in an Altium Workspace, such as Altium 365. Let's review how you do that with file-based components and models first.
In order to use file-based libraries and model files, they must be installed. To do this, open the Operations menu in the Components panel and select the File-based Libraries Preferences command to open the Available File-based Libraries dialog, here you add local libraries and models to the Components panel for access.
Use the Add Library button on the Installed tab to select the desired local files, as shown below. As with any installed library, the order the libraries and models are listed dictates the order they are used by the software. Use the Move Up and Move Down buttons to change the order.
To place a component on a schematic from any local or cloud library, you can:
If you are working with a library that has some components with simulation models and some without, enable the Simulation column in the Components panel to make it easy to locate the simulation-ready components. To do this, right-click on one of the current column headings in the Components panel and choose Select Columns from the context menu, then enable the Simulation column in the Select columns dialog.
If a library component has a simulation model attached, you can examine the model in the Component Details section of the Components panel, as shown in the image above.
A number of frequently used generic simulation components (resistor, capacitor, transistors, etc.,) can also be placed on the schematic using the commands of the Simulate » Place Models sub-menu.
If you have a simulation model but do not have a component to add it to, you can actually place the model file from the Components panel instead. When you do this, the software analyzes the model and locates a suitable symbol in the Simulation Generic Components library. Discrete components will have a symbol that suits that type of component, and components that are modeled by a subcircuit will have a simple rectangular symbol.
The table below lists the supported model-kinds and the Simulation Generic Components library component symbol that is placed.
(SIM Library Design Item ID)
|Resistor||.MODEL <model name> RES||Resistor|
|Capacitor||.MODEL <model name> CAP||Capacitor|
|Inductor||.MODEL <model name> IND||Inductor|
|Diode||.MODEL <model name> D||Diode|
|Bipolar transistor||.MODEL <model name> NPN||BJT NPN 4 MGP|
|Bipolar transistor||.MODEL <model name> PNP||BJT PNP 4 MGP|
|Junction FET||.MODEL <model name> NJF||JFET N-ch Level2|
|Junction FET||.MODEL <model name> PJF||JFET P-ch Level2|
|MOSFET||.MODEL <model name> NMOS||MOSFET N-ch Level1|
|MOSFET||.MODEL <model name> PMOS||MOSFET P-ch Level1|
The Manufacturing Part Search Panel gives designers access to millions of components from thousands of component manufacturers. The panel includes power parametric filtering, including a filter to only display components that include a simulation model. When this filter is applied, only components that include a simulation model, will be displayed.
At the moment, the simulation models do not have the model pin definitions mapped to the physical component pins. Because this mapping is not defined, the software will apply default 1 to 1 mapping (model pin 1 maps to physical pin 1). Because of this the mapping may be incorrect, if you use one of these components you simulation will either fail or not function correctly.
To help with this, the simulator includes an option that, when enabled, automatically replaces the existing component symbol with a generic component symbol. This generic component symbol is a simple rectangle that is created during placement, whose pins that are automatically mapped to the correct model pins. To use this feature, enable the the Always Generate Model Symbol for Manufacturer Part Search Panel Using Simulation Model Description option to the Simulation - General page of the Preferences dialog.
To view the models that have been attached to a placed component, use the Properties panel. The existing models are specified in the Parameters section of the panel, when the option has been enabled.
To add a simulation model to the component, click the Add button at the bottom of the Parameters section, and choose Simulation from the menu that appears.
The Sim Model dialog will open. Model selection and schematic symbol pin to model pin mappings are performed in this dialog.
Before clicking the Browse button to choose the model, click to set the required Source mode. The Source button that you enable determines what will happen when the Browse button is clicked:
Once you have selected the Source, click the Browse button to choose the model file. The dialogs that appear and the approach that you use to locate the model, depends on which Source option you enabled. The slides below show the different dialog that opens for each of the four Source modes:
After selecting the model file, an indication of compatibility and operability of the model is the display of the text, parameters and information that is included in the model file. This information appears in the Model Description region of the Sim Model dialog. Switch to the Model File tab to examine the content of the model.
It is also important to confirm that the model Format Type option is correctly set. The software will attempt to detect and assign this automatically, confirm that it is correct.
For correct model operation it is necessary to check the association between the component pins and the model pins, because they may not map one-to-one. Most model files include a description of the model pin numbers in the text of the model file, as shown in the image below, use this to map each model pin to the correct symbol pin.
Some models are provided by manufacturers and suppliers as downloadable text files. Sometimes the model detail is presented as text on a web page instead of a download file, in this situation you can create a new model file in Altium Designer and copy/paste the content from the web page into your new model file. Use the relevant command in the File » New » Mixed Simulation sub-menu, as shown below.
You can then Copy / Paste the model file information into the model editor.
As well as attaching a model to the component symbol that has been placed on the schematic, you can also attach the model to the component in the schematic library editor.
This is performed in the schematic library editor. The models that are attached to the component are listed below the graphical editing section, for the selected component. Click the Add Simulation button to add a simulation model.
The Sim Model dialog will open, select the Source location of the model to add to the component and click the Browse button.
Note that the model must be installed in the Components panel or be a part of the active project in order to be displayed in the list of available models.
The Model Name and Location of the model file will be specified in the relevant fields, and the model detail will display in the Model File tab on the right side of the dialog. Click the OK button to add the model to the library component.
The new simulation model will be displayed in the section below the graphical editing window after attaching it to the symbol. Save the changes you have made.
You can use all of your existing libraries when working with the circuit simulator, including Workspace libraries, which can also have simulation models attached. You can view the availability of the model in a particular component in the Components panel in the Details section. To learn more about Workspace components, refer to the Quick Guide to Component Management with a Workspace.
Workspace components differ from file-based components. In a file-based component the symbol is the core element; it holds the parameters, with the footprint and simulation model being attached to it.
In a Workspace component, the component item holds the parameters and brings the other elements together; including the symbol, the footprint, and the simulation model. Each of the elements is stored as a separate item in the Workspace. When you add a simulation model to an existing Workspace component, you must first upload the model to the Workspace, and then attach it to the Workspace component. The simulation model can be uploaded separately, or it can uploaded as part of the process of attaching it to the component.
This difference between file-based and Workspace components means there is a slightly different approach to editing a Workspace component.
The easiest way to edit an existing Workspace component and add a simulation model to it, is to locate the component in the Components panel, then right-click and select Edit from the context menu, as shown below. The component will open for editing in the Component Editor.
To add a simulation model to the component, visually locate the Add Simulation controls and click the drop-down.
The Existing command opens a list of models already available in the Workspace. The New command creates a new, empty model item which opens in a new document tab, from where you can select the file-based simulation model that you want to add.
To add a new simulation model, click the Browse button. The Browse Libraries dialog will open, where you can select from the list of currently installed libraries/models. If the model has not been installed in the software, click the ellipsis () button in the Browse Libraries dialog to open the Available File-based Libraries dialog, where you can Install additional libraries and models. To learn more about installing libraries and models, refer to the Working with File-based Libraries and Models section earlier in this guide.
Once you have chosen the model in the Browse Libraries dialog, click OK. Save the simulation model item, then close it (right-click on its document tab to close it). Your view will return to the Workspace Component Editor.
The component now has a simulation model attached, as shown below. The last step is to save the updated component back into the Workspace - this action is referred to as Save to Server. Select the Save to Server command in the File menu. When you select the command the component is validated, and then the Edit Revision dialog opens where you can enter optional release notes about the changes made in this new revision of the component. When the process of saving the new revision of the component is complete, the component is automatically closed.
The Workspace component is now ready to be used for simulation in your design.
If the Workspace component has already been placed on the schematic, it can be updated to the latest revision by clicking the Update to the Latest Revsion button, as shown below.
If the component has not yet been placed from the Components panel, confirm that the new simulation model is displayed in the Models section of the panel before placing it. If the simulation model is not displayed, right-click in the component list section of the Components panel and select Refresh to update the local cache.
An important part of the simulation setup is setting the correct values for the ranges used for the simulation.
For example, the defaults may not match the required simulation time needed, based on the circuit’s characteristics. As an example, consider a transient characteristic configured with a From - To time interval from 0 to 1u, as shown below.
In this circuit, the source has been configured to have a Period of 1uS, as shown below.
This Transient range will not allow the circuit to properly simulate given the characteristics of the circuit’s operation, as shown below.
The Transient time range is too short for the Period configured in the source.
Similarly, when the range is wide (for example 0 - 100u), it will also be difficult to analyze the plot, and the time required for the analysis also increases.
Instead, choose a range value greater than the signal period value, for example, 5 periods (0 - 5u). This should be sufficient for the circuit to become stable, but not excessive for this type of calculation.
It is also important to consider selecting a proportional step of values for the calculation or the number of points displayed on the plot. If you select an excessive number of points, the calculation will be slower, and an insufficient number of points will result in inaccurate calculations.
For example, consider the amplitude-frequency characteristics shown below, the first configured to use 10 points, the second configured to use 1000 points. The difference in the number of points used does not make a considerable difference in the calculation time, but significantly increases the accuracy of characteristics.
The results of each type of calculation display on a named tab in the SDF window that opens whenever a simulation is performed. When all the calculations are run together (press F9, or select the Simulate » Run Simulation command), you can switch between plots by clicking the tab at the bottom of the open SDF document.
Simulation results can be saved if you wish to view and edit them later. Right-click on the document tab at the top of the Workspace and select the Save command. If you plan to run different types of analyses and save each SDF file, use the File » Save As command instead so that each SDF file can be given a unique name.
All saved simulation results are displayed in the Simulation Dashboard in the Results section. To reopen a specific plot, click the ellipsis and select Show Results from the menu, or double-click on the analysis name. The menu can also be used to Edit the chart Title and Description, restore the settings of the plot in the Analysis Setup & Run area (Load Profile), and Delete those results.
You can also lock the results of a particular simulation. If you do, the next simulation of the same type will be saved as a new Result with a sequential numerical suffix appended to the name.
The image below shows the names of the various elements in the result waveforms.
Quick tips for working in the waveform window:
New Plotin the Plot Number dropdown (show image). After doing this you may need to change the number of visible plots, this is done in the Document Options dialog (Tools menu).
We will use the early characteristic of the transient process and the image of the signal at the source output to demonstrate how to work with plots.
Left-click in the legend to select one of the signals on the plot, click a second time to de-select it.
Right mouse click on a signal name to open a menu with a set of commands for editing the selected signal, as shown below.
It is possible to set two cursors simultaneously and move them along the X-axis. The coordinates of the intersection of the cursor and the plot are displayed in the lower part of the window. Measurement details can also be displayed below the plot, right-click on the plot and select Chart Options to configure this.
Use the right-click Cursor Off command to remove a cursor.
The cursors can also be used to perform various measurements on the waveforms, open the Sim Data panel to display the measurements calculated from the current locations of the two cursors.
You can edit an already displayed signal by selecting the Edit Wave command from the right-click menu (or double-click on the signal name). This will open the Edit Waveform dialog.
As well as allowing you to select the Waveform to be observed, the Edit Waveform dialog can be used to define a mathematical Expression.
Build an Expression by selecting the Waveform (it will be included in the Expression field when you click on it in the Waveforms list), apply the required Function, then continue to select Waveforms to build up the required Expression. Use the Name field to give your Expression a meaningful name. In addition, you can change Units and the Color of the displayed waveform.
If you right-click anywhere on the plots (other than on a waveform name), a menu of commands appears, where you can: add a waveform to an existing plot (Add Wave to Plot); add an additional plot (Add Plot); delete a plot (Delete Plot); configure various options; and restore the view of the plots (Fit Document). Use this command if you have zoomed in to a small area of a plot to examine it in detail.
New plots are added via the Plot Wizard. The sequence of steps and the result is shown in the images below.
The SPICE netlist is a textual representation of the circuit. It must include all necessary components with parameters, component models, connections, and types of analysis. It is the SPICE netlist that is processed by the simulation engine. The graphical representation of the schematic is used to simplify the creation of the netlist from the user's work when simulating. Because the netlist is created automatically when designing the schematic there is no need to manually create it, simplifying the process and reducing potential errors.
The specification of components and connections requires a special syntax to describe the circuit. Despite the complexity of the method it has its advantages, it allows you to work directly with and simulate from a netlist, as well as from a schematic.
To generate the simulation netlist from your current schematic, select Simulate » Generate Netlist from the menus. To create a new, empty netlist, select the File » New » Mixed-Signal Simulation » AdvancedSim Netlist command from the menus.
To understand the content consider the example netlist shown below, that matches the schematic shown beneath it:
CC11 0 NetC11_2 100nFis the component description, where:
0 NetC11_2- nets that the component's pins are connected to, in this example the first pin of the capacitor is connected to the
GND (0)circuit, the second to
100nF- component value
VV6 NetC14_2 0 DC 0 PULSE(0 5 100n 10n 10n 400n 1u) AC 1mV 0- signal source description:
VV6- component designation
NetC14_2 0- component connection pins
DC 0 / AC 1mV / 0- signal source parameters: DC, AC, phase
PULSE(0 5 100n 10n 10n 400n 1u)- output signal parameters: Initial Value, Pulsed Value, Time Delay, Rise Time, Fall Time, Pulse Width, Period
.PRINT =1 NetC13_1 NetC14_2- command to show signals in the form of a plot
.TRAN 1 10u 0 1- selected type of calculation (transient calculation) and calculation parameters (start time, end time, step)
.model PMOSFET_Level1 pmos (Level=1)- link to the transistor model used
To run a simulation directly from an open netlist, select Simulate » Run (or press the F9 hotkey).
The simulation result is the same as the one obtained earlier using the schematic and the Simulation Dashboard panel.
When a circuit will not simulate you must identify if the problem is in the circuit, or the process of simulation. Follow the information contained in this section of the reference and work through the suggested points, trying one at a time.
Sometimes during a simulation, a message will be displayed reporting errors or warnings. These messages are listed in the Messages panel.
Warning Messages - Warning messages are not fatal to the simulation. They generally provide information about changes that SPICE had to make to the circuit in order to complete the simulation. These include invalid or missing parameters, and so on.
Error Messages - Error messages provide information about problems that the Mixed Simulator could not resolve and were fatal to the simulation process. Error messages indicate that simulation results could not be generated, so they must be corrected before you will be able to analyze the circuit.
One of the challenges of all Simulators is convergence. What exactly is meant by the term, convergence? Like most Simulators, the Mixed Simulator's SPICE engine uses an iterative process of repeatedly solving the equations that represent your circuit, to find the quiescent circuit voltages and currents. If it fails to find these voltages and current (fails to converge) then it will not be able to perform an analysis of the circuit.
SPICE uses simultaneous linear equations, expressed in matrix form, to determine the operating point (DC voltages and currents) of a circuit at each step of the simulation. The circuit is reduced to an array of conductances which are placed in the matrix to form the equations (
G * V = I). When a circuit includes nonlinear elements, SPICE uses multiple iterations of the linear equations to account for the non-linearities. SPICE makes an initial guess at the node voltages then calculates the branch currents based on the conductances in the circuit. SPICE then uses the branch currents to recalculate the node voltages, and the cycle is repeated. This cycle continues until all of the node voltages and branch currents fall within specified tolerances (converge).
However, if the voltages or currents do not converge within a specified number of iterations, SPICE produces error messages (such as
Gmin stepping failed,
source stepping failed or
iteration limit reached) and aborts the simulation. SPICE uses the results of each simulation step as the initial guesses for the next step. If you are performing a Transient analysis (that is, time is being stepped) and SPICE cannot converge on a solution using the specified timestep, the timestep is automatically reduced, and the cycle is repeated. If the timestep is reduced too far, SPICE displays a
Timestep too small message and aborts the simulation.
When a simulation analysis fails, the most common problem is failure of the circuit to converge to a sensible operating point. Use the following techniques to solve convergence problems.
300. This will allow the Operating Point analysis to go through more iterations before giving up.
RSHUNT1. This value of resistance is added between each circuit node and the ground helps to correct problems such as "singular matrix" errors. As a rule, the RSHUNT value must be set to a very high resistance, such as 1e12.
GMINoption (Advanced tab of the Advanced Analysis Settings dialog) by a factor of
OFF. This can help solve numerical convergence problems by skipping the diode (or semiconductor device) for the first iteration, helping improve convergence.
When you have a problem with a DC Sweep analysis, first try the steps listed above in the Convergence troubleshooting steps. If you still encounter problems, try the following:
When you have a problem with a Transient analysis, first try the steps listed above in the Convergence troubleshooting steps. If you still encounter problems, try the following.
On the Advanced tab of the Advanced Analysis Settings dialog (click in the Analysis Setup & Run section of the Simulation Dashboard):
0.01. By increasing the tolerance from its default of
0.001(0.1% accuracy), fewer iterations will be required to converge on a solution and the simulation will complete much more quickly.
100. This will allow the Transient analysis to go through more iterations for each timestep before giving up. Raising this value may help to eliminate
timestep too smallerrors improving both convergence and simulation speed.
VNTOL, if current/voltage levels allow. Your particular circuit may not require resolutions down to 1uV or 1pA. You should, however, allow at least an order of magnitude below the lowest expected voltage or current levels of your circuit.
Additional things to try:
Contact our corporate or local offices directly.