Cursor in ac plot displays zero values

Here’s a simple AC bench I use for the evaluation of capacitors.
I plot the current versus frequency.
The cursurs display zero magnitude and zero angle, which is wrong.

  1. Could you easily fix this bug?
  2. Is it possible to add a button “No angle plot”?
  3. Is it possible to make an AC reslut not a complexe value, using imag() or abs() for example?
  1. Number of Points in .ac should not be 1, change it to .ac dec 10 1e6 1e7, this will assign 10 data points per decade. Cursor will get back to normal. If you need one frequency point simulation, use this format : .ac list 1e6.
  2. Right click in phase axis, select “No Phase Plot”

Thanks a lot @KSKelvin.
My ignorance.

By the way, not sure if following input address your question of #3

.ac result is a complex number (if you use text editor to open .qraw, you can see “Flags: complex” to indicate output is complex number)

In Qspice, complex number is stored as Real,Imag , and in waveform viewer, default to display as Mag,Phase in Polar Representation, or change to Cartesian Representation as Real,Imag.

You can use imag() or abs() for calculation, but it is still a complex number format with imag=0.
I think you will not get a real number format like .tran when using .ac no matter how you post process the data within Qspice. Not 100% sure, but seems like this.

Ok. got it (.ac will always dispaly in complex format)!

The final goal would be to add a .step to sweep a parameter while displaying in a graph the value of cap evaluated at a given frequency of the .ac.
Do you think it’s possible within Q-Spice?

I do it using this method. In this case, V(x) is set to 1, which is a common practice where people simply input a value of 1. However, I prefer to approach it in a more general formula as an example, allowing you to measure impedance from any desired point as long as you probe the voltage and current. This calculation can be performed without post-processing (i.e., using .meas) but by utilizing .step to sweep a single frequency in .ac analysis. I hope this helps.
This assume your measurement is Rs-Cs equivalent model.

.ac - capacitance.qsch (2.3 KB)

1 Like

Oh! I completely forgot “freq” in .ac … well, I cannot recall why I always do this analysis with .step + .ac list in very beginning, thanks for the reminder.

Update with @bordodynov remind.
.ac - capacitance - freq.qsch (2.2 KB)

Ok. Thanks a lot @KSKelvin.
Here’s what I wanted to do:


Could not do it without your hints.

1 Like

I advise you to turn on the varicap instead of the capacitor. Then the goal of the effort will be justified.

Thanks guys @bordodynov @KSKelvin for all the hints!
That’s exactly what I wanted to do.