Has anybody used ltspiceIV in a optimization process using Matlab? I need feedback because I am running my circuit in transient analysis, and when I found the optimal point of my optimization, I ran it again but alone (not in the optimization loop) and I don't get the same values. Also, in a for loop, I obtain NaN (Not a number) value in my results. Is Ltspice suitable for optimization?
I work on electrical machine modeling. It is modelling the machine using equivalent magnetic circuit (which looks like electric circuit with resistor and source). I am then using ltspice coupled with matlab to solve this circuit. I create my netlist using matlab, I solve using ltspice, I collect the results from .raw files using a matlab program and I process the results using also matlab. It works until now. (the end of the question after that)
I am doing optimization so I need to run over and over again ltspice until the algorithm find the optimal point. I want to know if this process of running of multiple time (through optimisation or "for loop") is suitable for ltspice? I found that it can give me false results or doesn't compute the results at certains time (I obtain NaN (Not an Number) values).
In my circuit, there are a lot of controlled source, subcircuit, inductance and resistors.