Engee documentation
Notebook

An operational amplifier with a finite gain

Introduction

This example shows the operation of an operational amplifier with a finite gain.

Description of the model

The operational amplifier block in the basic physics modeling library Engee simulates an ideal case in which the gain is infinite, the input impedance is infinite, and the output impedance is zero. The finite gain operational amplifier unit in this example has an open-loop gain of 1e5, an input impedance of 100 kohms and an output impedance of 10 ohms.

image.png

As a result, the gain for this amplifier circuit is slightly lower than the gain that can be calculated analytically if we assume that the gain of the operational amplifier is infinite.

image.png

Simulation

Download and execute the assembled model.

In [ ]:
Путь_примера = "$(@__DIR__)";
Имя_модели = "finite_gain_op_amp";
Путь_модели = joinpath(Путь_примера, Имя_модели*".engee")

if Имя_модели  getfield.(engee.get_all_models(), :name)
    engee.load(Путь_модели);
end

модель = engee.run(Имя_модели);

Simulation results

We will get the required values from the simulation results.

In [ ]:
t = модель["Vin"].time;
Vin = модель["Vin"].value;
Vout = модель["Vout"].value;
k_fin = модель["k_fin"].value;
k_fin = k_fin[length(k_fin)];
k_inf = модель["k_inf"].value;
k_inf = k_inf[length(k_inf)];

Let's plot the input and output voltages.:

In [ ]:
using Plots
gr()

plot(t, [Vin, Vout]; ylabel = "Напряжение, В", label = ["V вх" "V вых"])
Out[0]:

Let's estimate the values of the gain coefficients:

In [ ]:
print("Коэффициент усиления идеального ОУ: ", k_inf, "\n")
print("Коэффициент усиления идеального ОУ: ", round(k_fin; digits = 2))
Коэффициент усиления идеального ОУ: 51.0
Коэффициент усиления идеального ОУ: 50.97

As can be seen, for an op-amp with a finite gain, its value turned out to be lower than the gain of an ideal op-amp.

Conclusion

In the considered example, an operational amplifier circuit with a finite gain is assembled and modeled.