I'm using Ltspice, and when I have a bode diagram, I have a cursor.
I'm able to move the cursor over whatever value I'm using. However, sometime I need a precise frequency. When I try to enter it in the box, it appears to be locked.
As a side question, would it be possible to make the cursor go to the maximum peak?
Best Answer
I'm not aware of a way to do so. It might be noteworthy, that the lines you see are actually an interpolated view of the datapoints, so you only have a limited collection of data points available.
You can view the available data points via right click and
Mark Data Points
You can navigate your cursor to the next data point using the left and right arrow key on your keyboard.
If you just want to determine a maximum value, you can use a
.MEASURE
directive. (Use the.op
button to place a custom directive on the schematic)For example:
.measure AC res1 MAX mag(V(out))
Where:
AC
is the type of the simulation on which the result has to be takenres1
is the name of the resultMAX
indicates to find the maximummag()
is for looking for the magnitude (in AC we have complex results)V(out)
is the expression on which it should find the maximumThe results are available (oddly) in the Spice Error Log (View -> Spice Error Log or CTRL+L).
You'll find a line like:
Now that doesn't give you the frequency at which this maximum is reached.
To do that, you need another
.measure
:.measure AC res2 when mag(V(out))=res1
What's happening here? It measures the time (or frequency) when the condition is true. So basically you ask "at what point is the magnitude of the output voltage equal to the
res1
",res1
contains the maximum of the magnitude, so you ask for the point where it reaches the maximum.And you will get:
It's not possible to do it with just one
.measure
statement.