Hello
I am testing a very simple circuit with a variable capacitor with a capacitance equal to its voltage. I am charging this cap using a constant current source of 1 mA. According with my calculations shown in the figure, after 1 ms the voltage should be 1.4142 mV, but the simulation shows just 1 mV. The shape of the voltage in the simulation seems OK but the values seem to be incorrect.
I have also tried defining the variable capacitor by its charge as Q=V(vc)**2 but the results are pretty much the same.
Am I doing something wrong?
Thanks!
By reading the LTspice help I got a hint about what is happening. It says that the capacitance is obtained by deriving the charge with respect to the voltage. Then, we must define the variable capacitor using the charge in such a way that the derivative of the charge with respect to the voltage is equal to the capacitance expression that we want.
If we want to use the C expression we have to take the Q expression above and divide it by the voltage.
However, defining C in this way is weird so I think it is clearer to use the charge instead.
I have tried it and it seems to work
1 Like