Repository navigation
Description
With PR #4643 we merged an enhanced OpAmp (and with PR #4653 we just renamed the model without other changes) to the master branch “4.2.0 dev” May 2025 after long discussions. Note this solution still is only in the master branch 4.2.0 dev, not in the latest release 4.1.0.
I checked the solution again and see that this is a cure for some numerical problems (because it introduces an additional state) but without physical meaning. It could be problematic to find a good estimate for the time constant of the first order, too.
Now I've tested a much better solution: Similarly as the solution before using an additional state defined by a first order, but with limited slew rate. Additionally an anti-windup measure is included, i.e. stopping the integrator when the voltage reaches the upper limit and the slope is positive or when the voltage reaches the lower limit and the slope is negative.
The parameters can be easily defined by parameters taken from the manufacturer's datasheet. Here defaults near realistic values are shown:
Open loop amplification V0 = 15E3
Gain-Bandwith-product G_BW = 0.15 MHz
Cut-off frequency fc = G_BW / V0
First order time-constant T = 1/(2*pi*fc)
Slew rate slewRate = 0.1 V/µs
My suggestion: I create a PR #4869 and we replace the solution (#4643 and #4653) by the new solution before it has been released.
Activity