7
\$\begingroup\$

I want to plot a Bode diagram. LTSpice automatically plots the results as a function of frequency. I would like to multiply the frequency by 2*π, in order to obtain the angular frequency.

How can I modify the x-axis quantities?

\$\endgroup\$
1
  • \$\begingroup\$ Can't you just put 2*pi*F instead of F in the x expression box (I'm a microcap user and I know this works). \$\endgroup\$
    – Andy aka
    Dec 7, 2021 at 16:26

2 Answers 2

13
\$\begingroup\$

Maybe this is ugly, but it seems to provide the results you want:

enter image description here

The default ac sweep, which gives the result in Hz is commented at the bottom. Also note that the number of steps (100) appears in different places for the two commands.

enter image description here

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Unfortunately the X-axis for .AC simulations is fixed and cannot be changed. I think this has to do with avoiding the confusion of parametric plots with log axes, and whatnot, but a checkbox to select frequency or pulsation wouldn't have hurt. So @devnull's answer is one way to do it. It will be a tad slower, since it has to calculate the .OP for every iteration. You could also divide the value of C (in this case) by \$2\pi\$, but if you have many states, or delays, you're out of luck. \$\endgroup\$ Dec 7, 2021 at 17:50
5
\$\begingroup\$

As a complement to devnull's answer above:

It is also possible to add R and C to the .param f calculation to always obtain the transfer values as a function of multiples of \$\omega_{\,\mathrm3dB}\$ for any RC combination.

Example: Schematic Plot

Read-back

To allow for an easy read-back of the actual \$f_{\,\mathrm3dB}\$ frequency a behavioural voltage source can be added to the schematic. For details on how to do this, please see this: Printing the results of calculated .params.

Don't be fooled by the dimension! I.e. kV should be understood as kHz, and V as Hz more generally. But as far as LTspice is concerned you've created a behavioural VOLTAGE source, so its dimension will be V.

Readback

To get rid of the dimension

If you're bothered about the .op label displaying Volts, you can add /1V (i.e. divide by 1 Volt) to the end of your .op expression to arrive at a dimensionless label.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.