Can LTSpice's .ac statement sweep secondary values?

  • Thread starter Landru
  • Start date
In summary, there is a way to have a second variable scale in tandem with frequency in a circuit analysis. This can be achieved through the use of Laplace equations, as demonstrated in the example file provided by Helmut from the LTspice group. The attached file can be used to create a frequency dependent resistor for .AC-simulations.
  • #1
Landru
107
1
If you have a simple circuit with an AC voltage, you can do a frequency domain analysis with a statement like ".ac lin 500 10 10000" and it will run the gamut from 10Hz to 10000Hz, but is there a way to have a second variable also scale in tandem, say the value of a resistor?

I'm aware that the step command exists, and it allows you to test multiple values, but that's one full sweep for each of those values, one at a time, and what I desperately need to is to have a second, or maybe even a third component value change along with the frequency.

Can this be done?
 
  • #3
I asked on the LTspice yahoo group; how could I make a sweep frequency dependent resistor and received the following file from the Guru helmutsennewald.
helmutsennewald said:
May 6 6:26 PM Hello, I have uploaded an example of a frequency dependent resistor for .AC-simulations.

Frequency_dependent resistor.asc
https://groups.yahoo.com/neo/groups/LTspice/files/ Temp/

I have used Laplace equations.

G-source
Laplace=1/abs(s/(2*pi))

Gpoly
LAPLACE {V(3)*V(2)} {1/abs(s/(2*pi))}Helmut

Attached is the file.
Remove the .txt extension to make it back into a .asc file.
 

Attachments

  • Frequency_dependent resistor(1).asc.txt
    1.6 KB · Views: 441
  • Like
Likes berkeman

FAQ: Can LTSpice's .ac statement sweep secondary values?

Can I use a .ac statement to sweep secondary values in LTSpice?

Yes, you can use a .ac statement to sweep secondary values in LTSpice. This allows you to perform frequency domain analysis on your circuit.

What values can be swept using the .ac statement in LTSpice?

The .ac statement in LTSpice can sweep any secondary values such as voltage, current, or resistance. It can also sweep parameters like capacitance or inductance.

How do I specify the range and step size in the .ac statement?

You can specify the range and step size in the .ac statement by using the start, stop, and number of points keywords. For example, .ac V1 10 100 1000 will sweep the voltage source V1 from 10 to 100 with 1000 points.

Can I plot multiple secondary values in the same .ac analysis?

Yes, you can plot multiple secondary values in the same .ac analysis by using the plot command. For example, .plot ac V(V1) V(V2) will plot the voltage across V1 and V2 in the frequency domain.

Is it possible to include a .ac sweep in a transient analysis in LTSpice?

Yes, it is possible to include a .ac sweep in a transient analysis in LTSpice. You can use the .control and .endc commands to specify the sweep parameters and then run a transient analysis within the .ac analysis.

Back
Top