Engee documentation
Notebook

Power system model with simplified synchronous generator

In this example we consider a synchronous generator (model power_ssm.engee) P=20kW U= 24kV, with a base load (P=10kW and Q=100VAR) and a switched load (P=10kW and Q=100VAR) connected to the busbars at time 0.1 (model power_ssm.engee).

Realisation of the model run using software control:

In [ ]:
Pkg.add(["Statistics"])
In [ ]:
using Plots
using DataFrames
using Statistics
gr();

Loading the model:

In [ ]:
model_name = "power_ssm"
model_name in [m.name for m in engee.get_all_models()] ? engee.open(model_name) : engee.load( "$(@__DIR__)/$(model_name).engee");

Running a loaded model:

In [ ]:
results = engee.run(model_name)
Out[0]:
Dict{String, DataFrame} with 8 entries:
  "Q"   => 4001×2 DataFrame…
  "i_b" => 4001×2 DataFrame…
  "i_c" => 4001×2 DataFrame…
  "P"   => 4001×2 DataFrame…
  "v_b" => 4001×2 DataFrame…
  "v_a" => 4001×2 DataFrame…
  "i_a" => 4001×2 DataFrame…
  "v_c" => 4001×2 DataFrame

Reading instantaneous current and voltage data:

In [ ]:
t = results["i_a"].time;
i_a = results["i_a"].value;
i_b = results["i_b"].value;
i_c = results["i_c"].value;
v_a = results["v_a"].value;
v_b = results["v_b"].value;
v_c = results["v_c"].value;

Loading and visualisation of simulation data

Output of the graph of dependence of instantaneous current values on time:

In [ ]:
plot(t, [i_a i_b i_c], label=["Ток фазы А" "Ток фазы В" "Ток фазы С"])
plot!(title = "Результаты моделирования в Engee", ylabel = "Мгновенное значение тока, А", xlabel="Время, c")
Out[0]:

Output of the graph of dependence of instantaneous values of voltage on time:

In [ ]:
plot(t, [v_a v_b v_c], label=["Напряжение фазы А" "Напряжение фазы В" "Напряжение фазы С"])
plot!(title = "Результаты моделирования в Engee", ylabel = "Мгновенное значение напряжения, В", xlabel="Время, c")
Out[0]:

Conclusions:

In this example, tools for command control of the Engee model were used. The model demonstrates the operation of a synchronous generator on a load varying surge. The simulation results were imported into an interactive script, visualised, using interactive Plots library plots, and analysed.