Modelling of operational amplifier with noise consideration
This example demonstrates one method of modelling noise in electrical circuits. The circuit is an amplifier with a cut-off frequency of 10 MHz, where noise effects are generated by a Band-Limited Operational Amplifier. The voltage source Vn specifies an equivalent noise spectral density of 20 .
Schematic of the model:

Define the function to load and run the model:
In [ ]:
function start_model_engee()
try
engee.close("op_amp_with_noise", force=true) # закрытие модели
catch err # в случае, если нет модели, которую нужно закрыть и engee.close() не выполняется, то будет выполнена её загрузка после catch
m = engee.load("$(@__DIR__)/op_amp_with_noise.engee") # загрузка модели
end;
try
engee.run(m, verbose=true) # запуск модели
catch err # в случае, если модель не загружена и engee.run() не выполняется, то будут выполнены две нижние строки после catch
m = engee.load("$(@__DIR__)/op_amp_with_noise.engee") # загрузка модели
engee.run(m, verbose=true) # запуск модели
end
end
Out[0]:
Running the simulation
In [ ]:
start_model_engee();
Write simulation data to variables:
In [ ]:
t = simout["op_amp_with_noise/SysOutput_1"].time[:]
amp_voltage = simout["op_amp_with_noise/SysOutput_1"].value[:]
Out[0]:
Data visualisation
In [ ]:
using Plots
Graph of the voltage across the amplifier:
In [ ]:
plot(t, amp_voltage, linewidth=2, title="Напряжение на усилителе", xlabel="Время, с", ylabel="Напряжение, В", lc=2)
Out[0]:
Frequency response of the amplifier:
.png)