-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf3fd10
commit c9fb87b
Showing
262 changed files
with
24,851 additions
and
2,159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+7.21 KB
docs/_downloads/00ce5ef02240b822805b4a4f82a08d6d/plot_signal_inj_pmsm_2kw.zip
Binary file not shown.
Binary file added
BIN
+7.63 KB
docs/_downloads/0452fa2cb56eaad7e24ef4f943a1eca4/plot_gfl_dc_bus_10kva.zip
Binary file not shown.
Binary file added
BIN
+8.28 KB
docs/_downloads/06fde73e02e710b86c3ebe1784ccd990/plot_vhz_ctrl_im_2kw.zip
Binary file not shown.
Binary file modified
BIN
+13.6 KB
(120%)
docs/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
docs/_downloads/1f2e230a5b2e1a8d76335febf2031498/plot_gfl_dc_bus_10kva.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
""" | ||
10-kVA converter, DC-bus voltage | ||
================================ | ||
This example simulates a grid-following-controlled converter connected to a | ||
strong grid and regulating the DC-bus voltage. The control system includes a | ||
DC-bus voltage controller, a phase-locked loop (PLL) to synchronize with the | ||
grid, a current reference generator, and a PI-type current controller. | ||
""" | ||
|
||
# %% | ||
from motulator.common.model import VoltageSourceConverter, Simulation | ||
from motulator.common.utils import BaseValues, NominalValues | ||
from motulator.grid import model | ||
import motulator.grid.control.grid_following as control | ||
from motulator.grid.control import DCBusVoltageController | ||
from motulator.grid.utils import FilterPars, GridPars, plot_grid | ||
|
||
# %% | ||
# Compute base values based on the nominal values. | ||
|
||
nom = NominalValues(U=400, I=14.5, f=50, P=10e3) | ||
base = BaseValues.from_nominal(nom) | ||
|
||
# %% | ||
# Configure the system model. | ||
|
||
# Grid parameters | ||
grid_par = GridPars(u_gN=base.u, w_gN=base.w) | ||
|
||
# Filter parameters | ||
filter_par = FilterPars(L_fc=.2*base.L) | ||
|
||
# Create AC filter with given parameters | ||
ac_filter = model.ACFilter(filter_par, grid_par) | ||
|
||
# AC-voltage magnitude (to simulate voltage dips or short-circuits) | ||
abs_e_g_var = lambda t: base.u | ||
|
||
# AC grid model with constant voltage magnitude and frequency | ||
grid_model = model.ThreePhaseVoltageSource( | ||
w_g=grid_par.w_gN, abs_e_g=abs_e_g_var) | ||
|
||
# Inverter model with DC-bus dynamics included | ||
converter = VoltageSourceConverter(u_dc=600, C_dc=1e-3) | ||
|
||
# Create system model | ||
mdl = model.GridConverterSystem(converter, ac_filter, grid_model) | ||
|
||
# %% | ||
# Configure the control system. | ||
|
||
# Control parameters | ||
cfg = control.GFLControlCfg( | ||
grid_par=grid_par, | ||
C_dc=1e-3, | ||
filter_par=filter_par, | ||
max_i=1.5*base.i, | ||
) | ||
# Create the control system | ||
ctrl = control.GFLControl(cfg) | ||
|
||
# Add the DC-bus voltage controller to the control system | ||
ctrl.dc_bus_volt_ctrl = DCBusVoltageController(p_max=base.p) | ||
|
||
# %% | ||
# Set the time-dependent reference and disturbance signals. | ||
|
||
# Set the references for DC-bus voltage and reactive power | ||
ctrl.ref.u_dc = lambda t: 600 + (t > .02)*50 | ||
ctrl.ref.q_g = lambda t: (t > .04)*4e3 | ||
|
||
# Set the external DC-bus current | ||
mdl.converter.i_ext = lambda t: (t > .06)*10 | ||
|
||
# %% | ||
# Create the simulation object and simulate it. | ||
|
||
sim = Simulation(mdl, ctrl) | ||
sim.simulate(t_stop=.1) | ||
|
||
# %% | ||
# Plot the results. | ||
|
||
# By default results are plotted in per-unit values. By omitting the argument | ||
# `base` you can plot the results in SI units. | ||
|
||
plot_grid(sim=sim, base=base, plot_pcc_voltage=True) |
89 changes: 89 additions & 0 deletions
89
docs/_downloads/21731b590e0867945f65a12bf576eef4/plot_gfl_10kva.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
""" | ||
10-kVA converter | ||
================ | ||
This example simulates a grid-following-controlled converter connected to a | ||
strong grid. The control system includes a phase-locked loop (PLL) to | ||
synchronize with the grid, a current reference generator, and a PI-based | ||
current controller. | ||
""" | ||
|
||
# %% | ||
from motulator.common.model import VoltageSourceConverter, Simulation | ||
from motulator.common.utils import BaseValues, NominalValues | ||
from motulator.grid import model | ||
import motulator.grid.control.grid_following as control | ||
from motulator.grid.utils import FilterPars, GridPars, plot_grid | ||
# from motulator.grid.utils import plot_voltage_vector | ||
# from motulator.common.model import CarrierComparison | ||
# import numpy as np | ||
|
||
# %% | ||
# Compute base values based on the nominal values. | ||
|
||
nom = NominalValues(U=400, I=14.5, f=50, P=10e3) | ||
base = BaseValues.from_nominal(nom) | ||
|
||
# %% | ||
# Configure the system model. | ||
|
||
# Grid parameters | ||
grid_par = GridPars(u_gN=base.u, w_gN=base.w) | ||
|
||
# Filter parameters | ||
filter_par = FilterPars(L_fc=.2*base.L) | ||
|
||
# Create AC filter with given parameters | ||
ac_filter = model.ACFilter(filter_par, grid_par) | ||
|
||
# AC grid model with constant voltage magnitude and frequency | ||
grid_model = model.ThreePhaseVoltageSource( | ||
w_g=grid_par.w_gN, abs_e_g=grid_par.u_gN) | ||
|
||
# Inverter with constant DC voltage | ||
converter = VoltageSourceConverter(u_dc=650) | ||
|
||
# Create system model | ||
mdl = model.GridConverterSystem(converter, ac_filter, grid_model) | ||
|
||
# Uncomment line below to enable the PWM model | ||
# mdl.pwm = CarrierComparison() | ||
|
||
# %% | ||
# Configure the control system. | ||
|
||
# Control configuration parameters | ||
cfg = control.GFLControlCfg( | ||
grid_par=grid_par, filter_par=filter_par, max_i=1.5*base.i) | ||
|
||
# Create the control system | ||
ctrl = control.GFLControl(cfg) | ||
|
||
# %% | ||
# Set the time-dependent reference and disturbance signals. | ||
|
||
# Set the active and reactive power references | ||
ctrl.ref.p_g = lambda t: (t > .02)*5e3 | ||
ctrl.ref.q_g = lambda t: (t > .04)*4e3 | ||
|
||
# Uncomment lines below to simulate a unbalanced fault (add negative sequence) | ||
# mdl.grid_model.par.abs_e_g = 0.75*base.u | ||
# mdl.grid_model.par.abs_e_g_neg = 0.25*base.u | ||
# mdl.grid_model.par.phi_neg = -np.pi/3 | ||
|
||
# %% | ||
# Create the simulation object and simulate it. | ||
|
||
sim = Simulation(mdl, ctrl) | ||
sim.simulate(t_stop=.1) | ||
|
||
# %% | ||
# Plot the results. | ||
|
||
# By default results are plotted in per-unit values. By omitting the argument | ||
# `base` you can plot the results in SI units. | ||
|
||
# Uncomment line below to plot locus of the grid voltage space vector | ||
# plot_voltage_vector(sim, base) | ||
plot_grid(sim, base, plot_pcc_voltage=True) |
Binary file added
BIN
+6.87 KB
docs/_downloads/23af66cedf83c5004a940613e0b70932/plot_obs_vhz_ctrl_im_2kw.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+9.16 KB
docs/_downloads/279a53cc2b2b6dd2286de611336b520c/plot_vhz_ctrl_im_2kw_lc.zip
Binary file not shown.
Binary file added
BIN
+7.22 KB
docs/_downloads/27f21978dfbc8f20961ee7d8606d8710/plot_vhz_ctrl_6step_im_2kw.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+5.53 KB
docs/_downloads/383bd1b3ec15408f243d9760d924540f/plot_vector_ctrl_pmsm_2kw.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+9.41 KB
docs/_downloads/41fb71634442e55b25bd81f7055e7dd4/plot_vector_ctrl_im_2kw.zip
Binary file not shown.
Binary file added
BIN
+7.11 KB
docs/_downloads/4254a3674ab13fd68485860752780c1b/plot_vector_ctrl_pmsyrm_thor.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file added
BIN
+10.8 KB
docs/_downloads/554ef795f5cc7ba0a336719a5f673db0/plot_obs_vhz_ctrl_pmsm_2kw_two_mass.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+25.8 KB
(120%)
docs/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip
Binary file not shown.
Oops, something went wrong.