3
\$\begingroup\$

Another quirky LTSpice question. I am measuring input impedance and using a .meas directive to get the impedance at specific frequencies:

.MEAS AC Zi_freq1 FIND V(in)/I(v1) AT=10k

When I right click on the y-axis and change the axis from decibel to linear, the impedance in kOhms shows up. However, when I run the .meas directive the impedance is in dB again. How do I use the .meas directive to get impedance in a linear scale rather than in dB?

\$\endgroup\$
1

3 Answers 3

1
\$\begingroup\$

In case the range is too narrow (limited to about 3082.55), to avoid #INF infinity overflow, pow(10,gbw/20k) or pow(10,tmp/20meg) can be used and then treat printed db numbers as in K or Meg.

One can also look into raw log file (eg. schem.log.raw) with any text editor where all unconverted measured values are printed!

Or set .option meascplxfmt=polar to change from the default bode (magdb,ph) dB to polar (mag,ph) linear format for all measurements.

\$\endgroup\$
0
\$\begingroup\$

I've been looking for that feature as well for a long time and came across the site linked below. There are quite some more interesting explanations, features and documentation on it (e.g. Undocumented LTspice).

Save Plot Configurations
The menu commands Plot Settings=>Save Plot Settings/Open Plot Settings files allow you to read and write plot configurations to disk. Plot setting files are ASCII files that have a file extension of .plt. The default filename is computed from the name of the data file by replacing the data file's ".raw" extension with ".plt" If such a file name exists when a data file is first opened, that plot settings file is read for initial plot configuration.

Each analysis type; .tran, .ac, .noise, etc.; has its own entry in the plot settings file. It isn't possible to load the settings from one analysis type to another. But you can use the plot settings file from another simulation of the same analysis type.

Source

\$\endgroup\$
0
\$\begingroup\$

If you're just trying to get a number you can look at and know what it means, then you can do the conversion from dB to linear in your measure statement. It will still be reported as dB, but the number will be the linear answer. For example:

.MEAS AC Zi_freq1 FIND V(in)/I(v1) AT=10k

.MEAS AC Zi_freq1_linear PARAM pow(10,Zi_freq1/20)

When you do this, a value of 1KOhms would be reported as 60dB for Zi_freq1 and 1000dB for Zi_freq1_linear.

\$\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.