Algebraic loop

Hello,

I am new in PLECS and I am doing some tests with opamps. My question is about the equivalent implementation of opamp by means of Voltage Controlled Voltage Source, since it leads me to “Algebraic loop error”.

For example, I can easily simulate the attached “Opamp.plecs” , a simple non inverting configuration, and the expected output voltage of 2V is displayed in the scope.

But if I try to use the attached equivalent form “Opamp_equivalent.plecs”, I get the algerbraic loop error.

How can I fix it? I read somewhere that I should introduce a delay in the feedback loop but I have not a clear idea about it and how this should be related to simulation settings.

Thank you ,

Massimo

OpAmp.plecs (6.72 KB)

OpAmp_equivalent.plecs (6.94 KB)

In this particular case, the reason the reason the “OpAmp_equivalent” shows the algebraic loop warning is because the “Allow state-space inlining” option of the controlled voltage source differs between the two models. Setting this parameter to “on” removes the warning.