Post Go back to editing

LTspice 24.1.1 .meas ac gain for one frequency

Category: Software
Product Number: LTspice
Software Version: LTspice 24.1.1

Hello,

I’m testing some simulations to check their operation with the new version of LTspice.

.ac simulation with .opt meascplxfmt=Cartesian

1) With basic RC circuit, the output name is OUT : 

.meas Gain_100Hz FIND mag(V(out)) WHEN freq=100 => Simulation doesn't run : 

.meas Gain_100Hz FIND mag(V(out)) WHEN freq=100
                                                                                   ^^^^

2) This following command doesn't work : "meas Bandwidth_BF FIND frequency WHEN mag(V(out))=0.707946 FALL=1"

Measurement "Bandwidth_BF" FAIL'ed

All these measurements worked with previous LTspice.

All these measures worked with LTspice 24.0

Emilien

ac_gain_meas.asc

  • Hi  ,

    I will have to go back to 24.0 and check out why these worked before. 

    1) I'm not sure if before "freq" was allowed

    In LTspice 24.1, the syntax needs to be 

    .meas Gain_100Hz FIND mag(V(out)) WHEN frequency=100

    2) The .meas statement you have written is not applicable for finding BW, according to the help, but I will see if it worked in earlier versions. It will not currently in 24.1. What you have is for finding a single freq. value at a point along the abscissa, but you want find a range on the abscissa based on dependent values (Vout). 24.1 is more persnickity about this. In this case you would use the following variation of an example in the Help, to wit:

    .meas tmp max mag(V(out)); find the peak response and call it "tmp"
    .meas BW FROM 0 TARG mag(V(out))=tmp/sqrt(2) FALL=last

    The example in the Help is for a bandpass that has a rise and fall. As, you, and I, ran this on a basic low pass, this works. Tmp is optional.

    Basic RC.asc

    mike