Esource to emulate OpAmp, inverting works, non-inverting gives unexpected result

Hello

I made a simple “ideal” op amp circuit:


Ugly drawing, but works charmingly when the page is embedded and used to invert and double the input signal like here:

Trying the “ideal” op amp page in a non-inverting voltage doubler:

The output stays zero :confused::

Further, the voltage on the negative terminal follows the input. My current understanding is that this should only be possible if out is in phase and double the input voltage.

I might not fully understand how an Esource works, or made a mistake to which i have become blind. Hope to get this working or understand why it will not work.

Working, inverting project:
inverting.zip (12.1 KB)

Puzzling, non-inverting project:
non_inverting.zip (9.1 KB)

As a side note: NgSpice and KiCad’s facilities to use it are awesome. It is surreal to me how easy it has become to simulate and take advantage of a technology to which I had limited access. Sincerely appreciate everybody involved, some for decades.

Just an educated guess: The op amp is missing power? It may be that all nodes are following the input which has the highest voltage.

EDUCATED GUESS

Good guess :slight_smile:. The op amp hierarchical page is the same in both circuits though. It should not work in either as i don’t have power connected in either. It does work when used in the inverting configuration.

The Esource does not need power, it is a mathematical construct (I should not have added the V+ port, it was intended for future expansion of functionality).

In the first screenshot: The voltage difference across the V circle is measured and multiplied by the number specified in model then put across the terminals of the angled square. Since the - of the angled square is 0 (zero, ground, reference), the voltage on out is zero when the difference between + and - (= voltage across V circle) is zero.

1E100 (also called a Googol) is a very large number, for my purposes close enough to infinity. In effect, the circuit takes the difference between + and - and multiplies it with (almost) infinity. This is my envisioning of an ideal op amp.

Hope that clarifies things.

I think you went a bit too high with your amplification (maybe something overruns internally).

It works if you lower the amplification a bit.

Thank you @lucas

1E13 → still works.
1E14 → waveform slightly jagged.
1E17 → out = zero.

I will use 1E12, for a margin of safety.