Popularity
4 Stars
Updated Last
1 Year Ago
Started In
July 2015

LTspice.jl

Build Status Coverage Status Build status

LTspice.jl provides a julia interface to LTspiceTM. Several interfaces are provided.

  1. A dictionary like interface to access parameters and measurements by name.
  2. An array interface, which is primarily for measurements of stepped simulations.
  3. Simulations can be called like functions.

Documentation

Installation

LTspice.jl is currently unregistered. It can be installed using Pkg.clone.

Pkg.clone("https://github.com/cstook/LTspice.jl.git")

The julia documentation section on installing unregistered packages provides more information.

LTspice.jl is compatible with julia 1.0

Example 1

Import the module.

using LTspice

Create an instance of LTspiceSimulation.

example1 = LTspiceSimulation("example1.asc",tempdir=true)

Access parameters and measurements using their name as the key.

Set a parameter to a new value.

example1["Rload"] = 20.0  # set parameter Rload to 20.0

Read the resulting measurement.

loadpower = example1["Pload"] # run simulation, return Pload

Circuit can be called like a function

loadpower = example1(100.0)  # pass Rload, return Pload

Use Optim.jl to perform an optimization on a LTspice simulation

using Optim
result = optimize(rload -> -example1(rload)[1],10.0,100.0)
rload_for_maximum_power = example1["Rload"]

Supported Platforms

LTspice.jl works on windows and linux with LTspice under wine. Osx is not supported.

Additional Information

Latest documentation is here.

Introduction to LTspice.jl

The Linear TechnologyTM website

The LTspice Yahoo Group

LTwiki