EmbeddedEE

Electronics Design

  • Home
  • Services
    • LED Design
    • Embedded Design
    • Review
    • Diagnose
  • Portfolio
  • Blog
  • Contact
  • About

Electronic Simulation

May 23, 2019 By John Lemke

In searching for circuit simulations options I’ve learned a few things that are worthy of note.  When it comes to circuit simulation Spice as a tool commonly comes to mind.  Spice was originally developed at Berkley in the 1970s and development ended around 1990.  This version of Spice and the modeling syntax supported is what the current open source Ngspice represents.  I think this is also the level of modeling that LTSpice supports.  When searching for spice models it seems they are most commonly available for Berkley spice or PSpice.  Nearly all spice variants are compatible with the Berkley spice models. 

PSpice is from OrCAD and is a completely different modeling engine than Berkley spice.  PSpice supports modeling methods and syntax that can more closely imitate behavioral aspects of components.  In addition, PSpice models can include nodes for thermal modeling of components.  For some components only PSpice models are available.  HSpice is similar to PSice and has some compatibility with PSpice models.  HSpice is from Synopsys.  Simplis has the re–coded simulation engine that runs much faster than Berkley spice but it doesn’t seem to be compatible with PSpice models.

Since PSpice models are coded in a much different way it is not practical to modify a PSpice model to be compatible with Berkley spice.  The greater modeling accuracy of PSpice would be welcome too.

Xyce is a circuit simulation tool actively developed by Sandia National Labs and available for free.  It is only the simulations engine and so needs to be paired with another tool for visualization.  It has the advantage of a great degree of PSpice compatibility and was designed to run fast.  I’ve successfully imported a number of Berkley spice and PSpice libraries and used Python’s matplotlib to visualize the results.

Interestingly, it doesn’t require a dedicated circuit simulator to do circuit simulation.  I’ve used Python code and simple component models for simulation.  The problem is simple component models do not give a high level of signal accuracy.  The advantage is control logic can be implemented in Python.

Python can also simulate mechanical system whether done directly with code or by interfacing to a modelling engine like OpenModelica through PySimulator.  Scilab with Xcos, Simulink, and Octave are other options for general purpose modelling.

Filed Under: Uncategorized

Copyright © 2025 · Embedded EE LLC