Skip to content

LTspice netlist to MATLAB state-space model.

License

Notifications You must be signed in to change notification settings

maiwending/netlist2linss

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netlist2linss

A MATLAB function to convert a netlist taken from LTspice (and hopefully other SPICE programmes) and converting it to a symbolic state-space model. Designed for the creation of an archive of tone-stack models.

Requirements

For netlist2linss.m:

  • MATLAB
  • Symbolic Toolbox

Additionally for test_script.m:

  • Control Systems Toolbox

Usage

The netlist must consist of only linear components, but has currently only been tested for resistors, capacitors and voltage sources.

Values of components are ignored during the creation of the state-space matrices, and must be added using

subs(matrix,component_symbol,component_value)

A typical usage is shown in the script test_script.m.

Theory

The technique is based from Martin Holter's paper 'Physical Modelling of a Wah-Wah Pedal as a Case Study for Application of the Nodal DK Method to Circuits with Variable Parts' in which a method of automatically deriving state-space matrices from a Modified Nodal Analysis (MNA) format. Both the nonlinear aspects and decomposed inversion are ignored as the idea of this project is to create a tool to accurately capture tone circuits.

MNA is a long used standard of perhaps inefficient but dependable circuit analysis. For this project, Erik Cheever's MATLAB script SCAM.

The discretisation scheme used is Trapezoidal.

To do

  • Add continuous domain option
  • Add ability to parse values of components from netlist

About

LTspice netlist to MATLAB state-space model.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 100.0%