Hello everyone.
I am a master student of Nanotechnology. I found this forum in my search on info on how to implement a non linear capacitor in LTspice. Specificaly, I am trying to simulate the eigenfrequency shift of a physical oscillatory system versus the change of one of its parameters. For that reason I have realised an LT spice simulation including an electrical circuit which provides the initial stimulus, a transformer that forwards the signal to the "mechanical domain equivalent" cirquit and at the same time feeds it back into the original electrical system which at the same time acts as the measuring device. The measured output should be the current on the capacitor of my circuit ( which I include below ). The problem lies in the fact that if you define a linear model for a capacitor in your electrical domain, the oscillation effect gets dampened for the reason that the linear model is no more able to take into account the fringing time-dependent electric field created if you force one of the plates of a real parallel plate capacitor in motion.
The trick I first used is to define a voltage driven current source instead of the capacitor Cload which seems to solve the problem but which I am not sure is the best solution from the point of view of the corresponding physics. So, I am trying to implement the following refinement:
I would like to define a non linear capacitor whose capacitance is preferably dependent on the gate voltage. My idea is to exploit the depletion region of a MOS device ( not a transistor JUST a MOS capacitor) because the capacitance at any operating point within the depletion region is a function of the bias gate voltage. e.g. Cload=C(Vgate)
Implementing the proper equations in spice I get an error message stating that Spice is not able to resolve the values on that particular element. Keep in mind I am trying to do an AC analysis and to consequently reconstruct a Bose diagram. In my opinion the problem lies in the fact that V(in) which is the voltage on the transformer in my equation used to define the capacitor model has no value for the first run of the analysis. I tried using
.ic V(in)=1
just to set an initial value but .ic is a function used for transient analysis. Is there any way to circumvent that problem ?
Circuit topology below:
My ultimate goal is to be able to measure the current maxima on the capacitor itself (or the Resistor ) in the primary RC circuit in the frequency domain. ( .ac analysis ) The expected result should be a shift of the maxima around a certain central tuning frequency.
Also another implementation issue. As I described already if you replace the Cload with a voltage driven current source controlled by some other secondary circuit the problem is partially solved. Now in that scenario I am trying to use the .meas command to pick up values of a randomly changing trigger parameter k doing a Monte Carlo analysis and the eigenfrequency which corresponds to that certain value of k. The analogy of my varying physical parameter in that scenario is a change in the control Voltage of the secondary circuit.
The problem is that since .meas is a post-processing command and as my analysis is in the frequency domain I cannot pick the real values of my trigger because .meas records the values in dB and as the perturbation is very small the corresponding dB scaled value is practically zero. Is there a trick to log the real value of Vsignal ( see control circuit below ) on in db but in a linear scale ?
Circuit 2 topology:
Thanks for your time and help!
I am a master student of Nanotechnology. I found this forum in my search on info on how to implement a non linear capacitor in LTspice. Specificaly, I am trying to simulate the eigenfrequency shift of a physical oscillatory system versus the change of one of its parameters. For that reason I have realised an LT spice simulation including an electrical circuit which provides the initial stimulus, a transformer that forwards the signal to the "mechanical domain equivalent" cirquit and at the same time feeds it back into the original electrical system which at the same time acts as the measuring device. The measured output should be the current on the capacitor of my circuit ( which I include below ). The problem lies in the fact that if you define a linear model for a capacitor in your electrical domain, the oscillation effect gets dampened for the reason that the linear model is no more able to take into account the fringing time-dependent electric field created if you force one of the plates of a real parallel plate capacitor in motion.
The trick I first used is to define a voltage driven current source instead of the capacitor Cload which seems to solve the problem but which I am not sure is the best solution from the point of view of the corresponding physics. So, I am trying to implement the following refinement:
I would like to define a non linear capacitor whose capacitance is preferably dependent on the gate voltage. My idea is to exploit the depletion region of a MOS device ( not a transistor JUST a MOS capacitor) because the capacitance at any operating point within the depletion region is a function of the bias gate voltage. e.g. Cload=C(Vgate)
Implementing the proper equations in spice I get an error message stating that Spice is not able to resolve the values on that particular element. Keep in mind I am trying to do an AC analysis and to consequently reconstruct a Bose diagram. In my opinion the problem lies in the fact that V(in) which is the voltage on the transformer in my equation used to define the capacitor model has no value for the first run of the analysis. I tried using
.ic V(in)=1
just to set an initial value but .ic is a function used for transient analysis. Is there any way to circumvent that problem ?
Circuit topology below:

My ultimate goal is to be able to measure the current maxima on the capacitor itself (or the Resistor ) in the primary RC circuit in the frequency domain. ( .ac analysis ) The expected result should be a shift of the maxima around a certain central tuning frequency.
Also another implementation issue. As I described already if you replace the Cload with a voltage driven current source controlled by some other secondary circuit the problem is partially solved. Now in that scenario I am trying to use the .meas command to pick up values of a randomly changing trigger parameter k doing a Monte Carlo analysis and the eigenfrequency which corresponds to that certain value of k. The analogy of my varying physical parameter in that scenario is a change in the control Voltage of the secondary circuit.
The problem is that since .meas is a post-processing command and as my analysis is in the frequency domain I cannot pick the real values of my trigger because .meas records the values in dB and as the perturbation is very small the corresponding dB scaled value is practically zero. Is there a trick to log the real value of Vsignal ( see control circuit below ) on in db but in a linear scale ?
Circuit 2 topology:

Thanks for your time and help!
Last edited: