I've been trying to learn about resonance circuits and filters and so forth, intending to try to build some kind of tunable filter or something.

I'm running some simulations in KiCAD to help confirm/solidify/expand my understanding. I'm getting some behavior that seems backwards to me, though.

I have an AC voltage source running through an inductor, then a capacitor system, then to ground. (I'm not sure what the voltage amplitude actually is; KiCAD's a little opaque on how it does its AC sweep stuff. It might be 1V, but changing the sine voltage source I have to 5V didn't seem to change anything, even in the varicap setup, which I would have thought it would.)

Anyway, decreasing the capacitor's capacitance increases the resonance frequency, as I'd expect. In the varicap setup, if I increase the bias voltage on the varicaps, this should decrease their effective capacitance, presumably increasing the resonance frequency - but the resonance frequency decreases instead. Here's some screencaps.

Capacitor, higher capacitance, lower resonance:

capacitor, higher capacitance, lower resonance

Capacitor, lower capacitance, higher resonance:

capacitor, lower capacitance, higher resonance

Varicaps, 0V bias, higher capacitance, but higher resonance:

varicaps, 0V bias, higher capacitance?, but higher resonance?

Varicaps, 1V bias, lower capacitance, but lower resonance:

varicaps, 1V bias, lower capacitance?, but lower resonance?

  • Is the simulation wrong?
  • Does KiCAD's AC mode not deal well with something about this?
  • Am I measuring from the wrong place?

I think I'm measuring voltage just below the inductor, as well as measuring the AC line directly, for a point of reference.

Do I have the system connected wrong? Something else, maybe like this?

Edit: There were some broken lines in the spice library file I was using. Fixes found here.

  • 1
    \$\begingroup\$ Could you please indicate where D_Capacitance comes from? I don't see a .LIB statement or anything, and there are hundreds (thousands?) of files to sift through in the linked repo. || Did you verify that the DC conditions are as expected? (what are the .OP results?) \$\endgroup\$ Commented Mar 31 at 5:53
  • \$\begingroup\$ @TimWilliams Ah, sorry; it's in the kicad files - the model file is KiCad-Spice-Library/Models/uncategorized/Bordodynovs Electronics Lib/cmp/standard.dio, specifically model BB910. I'm not sure what ".OP" results are, nor how to verify the DC conditions. \$\endgroup\$
    – Erhannis
    Commented Mar 31 at 6:21
  • \$\begingroup\$ .OP is the operating point command, which is run by default; you just need to add some outputs to show them (DC operating point). Or run it as its own analysis, same thing. Can you show the complete netlist you ran? \$\endgroup\$ Commented Mar 31 at 7:40

2 Answers 2


It's not clear what is connected to what, but in your 3 and 4 picture, the upper diode is probably forward biased (I don't know what VBIAS is).

A forward biased diode doesn't act like a good varactor, and its C depends on the DC current flowing through it.

Second, AC analysis linearizes the circuit -- the varactor takes on the value it has at the bias point, but then becomes a linear (constant) capacitance. Therefore the AC amplitude has no impact on the measurements.

  • \$\begingroup\$ Ah, I see. Unfortunately, increasing the bias voltage to 10V or 100V (which I'd think would get rid of the forward biasing?) only pushes the resonance frequency a little further left, rather than fundamentally changing the outcome. Similarly, if it's calculating the diodes' capacitance given the bias voltage, then using those capacitances in subsequent analysis, I'd only expect that to remove weird side effects, and for the varactors to more closely mimic the single capacitor, not flip the correlation. \$\endgroup\$
    – Erhannis
    Commented Mar 31 at 6:27

Made with microcap v12
Here is how you should polarize the system ...

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.