zbiq
Newbie level 1
Hello!
I have quite unusual task. I need to import long (over 1000 pints), nonuniform frequency vector from external file. I am doing some optimization algorithms with LTSPICE connected to MATLAB.
Anyway, right now (i.e. for three frequencies: 1Hz, 2Hz, 1GHz) I am doing something like this:
In .asc file I have simulation aparmeter set like this: '.AC lisr {FREQ}'. I am including file '.inc input.inc'. The file (input.inc) contains data like this: '.STEP PARAM FREQ lisr 1 2 1gig' and so on. But the simulator runs for three times in a row. So it takes time, if we spreed frequency vector to over 1000. I am of course running LTSPICE in background to speed up calculations.
So, I wanted to omit the line '.AC list' in .asc file and import '.inc input.inc'. The file (input.inc) now contains '.AC lis 1 2 1gig'. But simulator does not run and shows screen to type simulation cmd. So not this way...
I need a way to write a file (by MATLAB) with frequency vector. Then import this file to LTSPICE. Run simulation ONCE for the whole (imported) frequency vector. Can you help me?
Best regards
Mateusz
I have quite unusual task. I need to import long (over 1000 pints), nonuniform frequency vector from external file. I am doing some optimization algorithms with LTSPICE connected to MATLAB.
Anyway, right now (i.e. for three frequencies: 1Hz, 2Hz, 1GHz) I am doing something like this:
In .asc file I have simulation aparmeter set like this: '.AC lisr {FREQ}'. I am including file '.inc input.inc'. The file (input.inc) contains data like this: '.STEP PARAM FREQ lisr 1 2 1gig' and so on. But the simulator runs for three times in a row. So it takes time, if we spreed frequency vector to over 1000. I am of course running LTSPICE in background to speed up calculations.
So, I wanted to omit the line '.AC list' in .asc file and import '.inc input.inc'. The file (input.inc) now contains '.AC lis 1 2 1gig'. But simulator does not run and shows screen to type simulation cmd. So not this way...
I need a way to write a file (by MATLAB) with frequency vector. Then import this file to LTSPICE. Run simulation ONCE for the whole (imported) frequency vector. Can you help me?
Best regards
Mateusz