# Simulating varicap diode in LTSpice

I have been looking into making a voltage controlled oscillator using varicap diodes, however I have had hard time simulating the diodes in spice.

Would anyone here have an idea how this would be done?

The equation governing the charge and voltage of a capacitor is $$$$Q = CV$$$$ In LTSpice, you cannot change the capacitance value. Rather you specify the charge of the capacitor. Hence, you specify your capacitor value as: $$$$q = V{(\text{your capacitance node})} \cdot x$$$$ where x is the voltage over the capacitor in question. This is covered in the LTSpice Help file under C. Capacitor