Maker Pro
Maker Pro

LTSpice: Step multiple parameters simultanious

U

Uwe Bonnes

Jan 1, 1970
0
Is it possible to define the step function so that it influences multiple
parameters at once?

I would for example like to increase some capacitor and decrease the
stimulus volrtage source simultaniously. Something like

..step param X list 1 2.2 10
and a Capacitor with a value 10p*{X}
and the voltage source with V(on) = 1/{X}
would come to mind.

That way, output would for the different steps could be scaled to same
height.

Thanks
 
J

Jim Thompson

Jan 1, 1970
0
Is it possible to define the step function so that it influences multiple
parameters at once?

I would for example like to increase some capacitor and decrease the
stimulus volrtage source simultaniously. Something like

.step param X list 1 2.2 10
and a Capacitor with a value 10p*{X}
and the voltage source with V(on) = 1/{X}
would come to mind.

That way, output would for the different steps could be scaled to same
height.

Thanks

Uwe, I believe that Mike has made LTSpice essentially compatible with
PSpice, so the expressions would be...

..step param X list 1 2.2 10
and a Capacitor with a value {10p*X}
and the voltage source with value {1/X}

Note the curly bracket placement.

In PSpice you need to "declare" X...

..param X = 1

I don't know if LTSpice requires that or not.

...Jim Thompson
 
H

Helmut Sennewald

Jan 1, 1970
0
Jim Thompson said:
Uwe, I believe that Mike has made LTSpice essentially compatible with
PSpice, so the expressions would be...

.step param X list 1 2.2 10
and a Capacitor with a value {10p*X}
and the voltage source with value {1/X}

Note the curly bracket placement.


Hello Uwe,

this is exactly how to use it in LTspice too.

In PSpice you need to "declare" X...

.param X = 1

I don't know if LTSpice requires that or not.

...Jim Thompson

This is isn't necessary in LTspice.

I have attached an example. Just copy the attached text into
a file with extension ".asc", e.g. test.asc .

Best regards,
Helmut



Version 4
SHEET 1 880 680
WIRE 128 160 64 160
WIRE 240 160 208 160
WIRE 64 192 64 160
WIRE 240 208 240 160
WIRE 64 304 64 272
WIRE 240 304 240 272
WIRE 240 304 64 304
WIRE 64 336 64 304
FLAG 64 336 0
SYMBOL voltage 64 176 R0
SYMATTR InstName V1
SYMATTR Value {1/X}
SYMBOL cap 224 208 R0
SYMATTR InstName C1
SYMATTR Value {10p*X}
SYMBOL res 112 176 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R1
SYMATTR Value 1k
TEXT 16 40 Left 0 !.step param X list 1 2.2. 10
TEXT 16 80 Left 0 !.tran 1u uic
 
U

Uwe Bonnes

Jan 1, 1970
0
Helmut Sennewald said:
Hello Uwe,
this is exactly how to use it in LTspice too.

Ah,

I have to place the braces in another way I tried. A hint in scad3.pdf would
be fine.

But now another problem. Scad3.exe running under a recent version of Wine
under Linux, when I reopen my .app file I get the the message
"Previous analysis already found: .tran 150n"
and I can't run the simulation.

Any idea of what's going wrong? I short look a wine relay log doesn't give
me any hint.
 
H

Helmut Sennewald

Jan 1, 1970
0
Uwe Bonnes said:
Ah,

I have to place the braces in another way I tried. A hint in scad3.pdf would
be fine.

But now another problem. Scad3.exe running under a recent version of Wine
under Linux, when I reopen my .app file I get the the message
"Previous analysis already found: .tran 150n"
and I can't run the simulation.

Any idea of what's going wrong? I short look a wine relay log doesn't give
me any hint.
Uwe Bonnes [email protected]-darmstadt.de


Hello Uwe,

Don't use .app files.

Save your schematic as a .asc file.
File -> Save As
Change the end of the file name to .asc instead of .app .

Close LTspice.

Restart LTspice

Open your previously saved .asc-file
File -> Open

Change the "..tran 1 steady" according to your need.
Example: .tran 10m

Now run your simulation.

The .app-files are more intended for demos and for
people who don't have knowledge of SPICE.

Best regards,
Helmut
 

Similar threads

Top