Operational amplifier with finite gain¶
Introduction¶
This example presents the operation of a finite gain operational amplifier.
Model description¶
The operational amplifier block in the Engee basic physical modelling library simulates the ideal case in which the gain is infinite, the input impedance is infinite and the output impedance is zero. The finite gain operational amplifier block in this example has an open loop gain of 1e5, an input impedance of 100 Com, and an output impedance of 10 ohms.
As a result, the gain for this amplifier circuit is slightly lower than the gain that can be calculated analytically, assuming that the gain of the operational amplifier is infinite.
Modelling¶
Let's load and run the assembled model.
Путь_примера = "$(@__DIR__)";
Имя_модели = "finite_gain_op_amp";
Путь_модели = joinpath(Путь_примера, Имя_модели*".engee")
if Имя_модели ∉ getfield.(engee.get_all_models(), :name)
engee.load(Путь_модели);
end
модель = engee.run(Имя_модели);
Modelling results¶
Let's get the required values from the simulation results.
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)];
Draw the graphs of input and output voltages:
using Plots
gr()
plot(t, [Vin, Vout]; ylabel = "Напряжение, В", label = ["V вх" "V вых"])
Evaluate the values of the amplification factors:
print("Коэффициент усиления идеального ОУ: ", k_inf, "\n")
print("Коэффициент усиления идеального ОУ: ", round(k_fin; digits = 2))
As can be seen, for the finite gain DUT, its value is found to be lower than the gain of the ideal DUT.
Conclusion¶
In the example discussed, a finite gain operational amplifier circuit has been assembled and modelled.