I want to measure the magnitude (in dB) of the bode plot of a specific frequency after an AC analysis.
In my configuration:
1) I have a circuit (a simple low pass or an high pass filter)
2) I change with the command STEP the value of a resistor
3) For the resistor values where (X)Hz is higher than (Y)dB save the resistor value in the Error Log
It's possible to do with MEAS command combined with STEP param and automate LTspice?
Yes I know the IF statement but I don't know the syntax for the specific case. How to first of all, (Y)dB at (X)Hz? Then how to save the resistor with MEAS?
Have a voltage source named vRfilter. The voltage source should have its positive terminal connected to a net label named "Rfilter". The net should be of type output. The negative terminal of the voltage source should be connected to GND. The value of the resistor in the value should be "R=V(Rfilter)". Now step this voltage instead of the resistor you stepped before.
Let your measurement command be as follows:
.meas R_cross find V(Rfilter) when Mag(v/v(x))=5.
NOTE: Replace 5 with the dB value the you want to measure. With this error log report, you should be able to know intuitively which values of Rfilter yield higher magnitude and which yield lower. They mustn't be in the error log. Or must they?
It would be better to show your schematic so we see where you are placing your small-signal source and guide accordingly.