LTspice data import

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

LTspice data import

Dr. K. nick
Dear octave maintainers,

for my project I have created a function to load LTspice (=very popular
freeware circuit simulation package from Linear Technologies, now Analog
devices
https://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.html)
simulation results into octave. It works quite decent so far but it
needs a bit of polishing and documentation to be easily usable for
somebody other than me.

Before taking on this task I'd like to know whether people are
interested in this kind of functionality being added to octave.

Let me know what you feel about this.

regards

Marcin



Reply | Threaded
Open this post in threaded view
|

Re: LTspice data import

al davis
On Fri, 26 Jul 2019 10:09:30 +0200
"Dr. K. nick" <[hidden email]> wrote:

> for my project I have created a function to load LTspice (=very popular
> freeware circuit simulation package from Linear Technologies, now Analog
> devices
> https://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.html)
> simulation results into octave. It works quite decent so far but it
> needs a bit of polishing and documentation to be easily usable for
> somebody other than me.
>
> Before taking on this task I'd like to know whether people are
> interested in this kind of functionality being added to octave.

I see a problem in that LTspice is not free software, therefore
incompatible with GPL and against GNU policy.

Instead, look at Gnucap, Qucs, and NGspice .. all free software.
Gnucap is a GNU project.  Qucs and Gnucap are trying to share, but
starved for resources so it is going slowly.  Gnucap, at least, is
certainly interested in a decent interface to octave.

al (at gnucap)

Reply | Threaded
Open this post in threaded view
|

Re: LTspice data import

Przemek Klosowski-7
In reply to this post by Dr. K. nick
On 7/26/19 4:09 AM, Dr. K. nick wrote:

> Dear octave maintainers,
>
> for my project I have created a function to load LTspice (=very popular
> freeware circuit simulation package from Linear Technologies, now Analog
> devices
> https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.analog.com%2Fen%2Fdesign-center%2Fdesign-tools-and-calculators%2Fltspice-simulator.html&amp;data=02%7C01%7Cprzemek.klosowski%40nist.gov%7Cc7c4fdb2b0a44d4e447c08d711d0a5be%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C1%7C636997460139458090&amp;sdata=BRxzGgCS6XD0sIfgPCQqbWzfuyd8xM45Xvw1lmrlhpU%3D&amp;reserved=0)
> simulation results into octave. It works quite decent so far but it
> needs a bit of polishing and documentation to be easily usable for
> somebody other than me.
>
> Before taking on this task I'd like to know whether people are
> interested in this kind of functionality being added to octave.
>
> Let me know what you feel about this.
LTspice is quite useful, and even more so when you can postprocess data
in Octave, so your project is very interesting. I have exchanged data by
exporting CSV from LTspice and reading it into Octave, as well as
cutting and pasting, but anything better is welcome!

Reply | Threaded
Open this post in threaded view
|

Re: LTspice data import

nrjank
In reply to this post by al davis
On Fri, Jul 26, 2019 at 11:21 AM al davis <[hidden email]> wrote:
On Fri, 26 Jul 2019 10:09:30 +0200
"Dr. K. nick" <[hidden email]> wrote:
> for my project I have created a function to load LTspice (=very popular
> freeware circuit simulation package from Linear Technologies, now Analog
> devices
> https://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.html)
> simulation results into octave. It works quite decent so far but it
> needs a bit of polishing and documentation to be easily usable for
> somebody other than me.
>
> Before taking on this task I'd like to know whether people are
> interested in this kind of functionality being added to octave.

I see a problem in that LTspice is not free software, therefore
incompatible with GPL and against GNU policy.

How is a function to read/import data from LTSpice simulations incompatible with GPL? I use LTSpice regularly. (and ngspice, but certain functionality just isn't there).  LTSpice has a fairly standard output format.  As a non-open source program you will be at the mercy of future program changes, there shouldn't be any concern with making a data import script.  Hooking directly to LTSpice may be a different issue altogether, but I did not interpret the original question as implying such an interface.
Reply | Threaded
Open this post in threaded view
|

Re: LTspice data import

Przemek Klosowski-7
In reply to this post by Przemek Klosowski-7
On 7/26/19 11:25 AM, Przemek Klosowski wrote:

> On 7/26/19 4:09 AM, Dr. K. nick wrote:
>> Dear octave maintainers,
>>
>> for my project I have created a function to load LTspice (=very popular
>> freeware circuit simulation package from Linear Technologies, now Analog
>> devices
>> https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.analog.com%2Fen%2Fdesign-center%2Fdesign-tools-and-calculators%2Fltspice-simulator.html&amp;data=02%7C01%7Cprzemek.klosowski%40nist.gov%7Ceb99efed84854de84e0a08d711dd9783%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636997515738823633&amp;sdata=iA757yUl0uqWqJjT9BtT85uf0P7%2F3Cx9Jl%2FgH8yyYxQ%3D&amp;reserved=0)
>>
>> simulation results into octave. It works quite decent so far but it
>> needs a bit of polishing and documentation to be easily usable for
>> somebody other than me.
>>
>> Before taking on this task I'd like to know whether people are
>> interested in this kind of functionality being added to octave.
>>
>> Let me know what you feel about this.
> LTspice is quite useful, and even more so when you can postprocess
> data in Octave, so your project is very interesting. I have exchanged
> data by exporting CSV from LTspice and reading it into Octave, as well
> as cutting and pasting, but anything better is welcome!

Ah, and I forgot that even faster I/O is via the .wav files that both
Octave and LTspice can read and write.

Having said that, I do support gnucap/Qucs/ngspice. I personally have
been using LTspice because once Mike Engelhardt made it run well on
Linux, it worked well for me in spite of the fact that I barely know
what I'm doing; the other tools assume more domain knowledge than I had
at the time.

Nowadays, with Kicad integration, I should probably try them
again---especially since LT is no longer independent and who knows how
the LTspice project will fare in the long term, e.g. if Mike retires.
The FOSS alternatives have the community development model working for
them, so in principle they should have a better long-term outlook.



Reply | Threaded
Open this post in threaded view
|

Re: LTspice data import

nrjank
On Fri, Jul 26, 2019 at 11:37 AM Przemek Klosowski <[hidden email]> wrote:
On 7/26/19 11:25 AM, Przemek Klosowski wrote:
> On 7/26/19 4:09 AM, Dr. K. nick wrote:
>> Dear octave maintainers,
>>
...
 
Having said that, I do support gnucap/Qucs/ngspice. I personally have
been using LTspice because once Mike Engelhardt made it run well on
Linux, it worked well for me in spite of the fact that I barely know
what I'm doing; the other tools assume more domain knowledge than I had
at the time.

Nowadays, with Kicad integration, I should probably try them
again---especially since LT is no longer independent and who knows how
the LTspice project will fare in the long term, e.g. if Mike retires.
The FOSS alternatives have the community development model working for
them, so in principle they should have a better long-term outlook.

for me, it came down to the fact that in LTSpice I can specify a nonlinear capacitor via a charge definition  (Q = ...) rather than a capacitance definition (C = ...), and it has an undocumented bus feature that made convergence studies easy. I'm also lazy and like a built-in schematic entry tool. :)

I currently do a post simulation text export and then cut/paste into a spreadsheet or read into Octave depending on how involved the post processing will be.  There are (closed source & proprietary, it seems) tricks you can play within LTSpice to force it to export time-aligned data, etc, but it would be nice to work on this outside of the program from uncompressed waveform data. I've also done some Octave driven scripting of schematic & netlist files for crude parametric analysis. 

 
Reply | Threaded
Open this post in threaded view
|

Re: LTspice data import

Dr. K. nick
In reply to this post by Dr. K. nick
So I am making good progress on this.

I'm wondering now what is the proper way to state authorship and declare
license conditions for this work. I think I'm going to go with GPL but
AFAIK this has to be stated explicitly in text form in the file itself.
Somehow I didn't come across any good example.

Can anyone give me some example, probably a text snippet, that is
already proven and accepted as an unambiguous declaration of license
conditions and authorship?

Thanks in advance.

Marcin


On 26.07.19 10:09, Dr. K. nick wrote:

> Dear octave maintainers,
>
> for my project I have created a function to load LTspice (=very popular
> freeware circuit simulation package from Linear Technologies, now Analog
> devices
> https://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.html)
> simulation results into octave. It works quite decent so far but it
> needs a bit of polishing and documentation to be easily usable for
> somebody other than me.
>
> Before taking on this task I'd like to know whether people are
> interested in this kind of functionality being added to octave.
>
> Let me know what you feel about this.
>
> regards
>
> Marcin
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: LTspice data import

Dr. K. nick
In reply to this post by Przemek Klosowski-7
Here it is...

I've tested it successfully with data file sizes up to 2.4 GiB. 

Octave 5.1.0

LTspice XVII

Marcin


LTspice2Octave.m (5K) Download Attachment