Electronic – Beginner’s LTSpice Question: Why does the sine wave look so bad and how can I fix it

behavioral-sourcecapacitorltspicesine

I'm planning on building a Spice circuit with variable-gap capacitors. The capacitance in general will be something like C = eps*A/(g0+g'), where g' is the oscillation that occurs on top of the nominal gap position, g0. My first thought was to make a behavioral voltage source that would ultimately be the g' variable.

Prior to making the real circuit, I wanted to mess around with this concept in a beginner's fashion. Below is the general idea, where I have some frequency input and an amplitude called "disp," representing the gap change.

CircuitSchematic

Here is where the problem comes in. When the disp variable is 1e-4, everything seems fine (sine wave with the correct amplitude). But when I go to 1e-5, I get the following picture. I imagine this is some sort of resolution issue? But I wanted to ask and see if there is a solution or if my initial plan is not the smartest way of going about things. I also tried using a normal voltage source with the parameters inputted as the frequency/amplitude of a sine wave. Thanks in advance.

Results

Best Answer

That voltage is rather low.

Simulate->Control Panel and set Absolute Voltage tolerance to something smaller like 1E-7 or 1E-8.