# LTSpice: Find settling time using .meas

I want to find the settling time (i.e. the voltage at C1 not leaving a band of 1% anymore) of a step response in a circuit like this:

The step response looks like this:

As I have a more complicated case and a lot of variables I want to determine the settling time efficiently using the .meas command. The trigger would be the rising edge of V1, but how can I find the point in time, where the response won't leave my 1% band anymore? The number of oscillations is not known.

• Will the circuit always be the same (with varying component values)? Mar 20, 2020 at 13:10
• yes. I'll have several nested .step commands to permutate my configurations. The netlist will stay the same, only values change.
– DPF
Mar 20, 2020 at 14:32
• Why don't you simple use the mathematical approach: calculate the damping $\alpha$, determine the applicable solution and find when the exponential term decays such that the result is 1%. Mar 20, 2020 at 21:35
• Because my real network is much more complex, including transmission lines and real operational amplifiers.
– DPF
Mar 21, 2020 at 22:03
• @Huisman I think he meant that his complex network will stay the same and only the .stepped parameters change, while you probably referred to the 1st picture. Mar 22, 2020 at 12:20

You can use this command:

.meas tmp find V(o) when abs(v(o)-1)=0.01 fall=last


Alternatively, you can concoct something like this for a more "dynamical" approach:

I commented out the .step card so that the results are a bit more visible. This is just one approach. Note that this implies knowing the I/O step value(s). I suppose you can do that by simple subtraction, but you know what cases you have for that.

• This is great! Is there any possibility to specify a maximum time for the search for the "last" fall?
– DPF
Mar 23, 2020 at 7:51
• @DPF I don't think you can, but there is an option to specify the delay from which the count starts, td=<...>[seconds], which can be appended to the command line. Though, I tried recreating the circuit now, and with or without td, the same results appeared, both in IV and XVII. Also, instead of [...] find V(o) [...], you can use [...] find time [...] to find the time, directly, but the way I wrote it allows you to also see the value of V(o). Mar 23, 2020 at 9:14