7

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?

pfabri
  • 758
  • 7
  • 18
Lisa
  • 141
  • 1
  • 6
  • 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). – Andy aka Dec 07 '21 at 16:26

2 Answers2

13

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

devnull
  • 8,447
  • 2
  • 15
  • 38
  • 3
    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. – a concerned citizen Dec 07 '21 at 17:50
3

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 this: Printing the results of calculated .params.

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

Readback

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.

pfabri
  • 758
  • 7
  • 18