soft4pes.model.grid.rl_grid#
Model of a grid with a voltage source and an RL impedance in alpha-beta frame. The magnitude of the grid voltage is configurable as a function of time.
Classes#
Model of a grid with a voltage source and an RL impedance in alpha-beta frame. The state of the |
Module Contents#
- class soft4pes.model.grid.rl_grid.RLGrid(par, conv, base, ig_ref_init=None)[source]#
Bases:
soft4pes.model.common.system_model.SystemModel
Model of a grid with a voltage source and an RL impedance in alpha-beta frame. The state of the system is the grid current (same as the converter current). The system input is the converter three-phase switch position or modulating signal. The grid voltage is considered to be a disturbance and the magnitude of the grid voltage is configurable as a function of time using a Sequence object.
This class can be used as a base class for other grid models.
- Parameters:
par (RLGridParameters) – Grid parameters in p.u.
conv (converter object) – Converter object.
base (base value object) – Base values.
ig_ref_init (1 x 2 ndarray of floats, optional) – Reference at discrete time instant kTs = 0 for starting simulation from steady state.
- x#
Current state of the grid [p.u.].
- Type:
1 x 2 ndarray of floats
- cont_state_space[source]#
The continuous-time state-space model of the system.
- Type:
SimpleNamespace
- set_initial_state(**kwargs)[source]#
Set the initial state of the system based on the grid current reference, if provided.
- Parameters:
ig_ref_init (1 x 2 ndarray of floats, optional) – Reference at discrete time instant kTs = 0 for starting simulation from steady state.
- get_continuous_state_space()[source]#
Calculate the continuous-time state-space model of the system.
- Returns:
A SimpleNamespace object containing matrices F, G1 and G2 of the continuous-time state-space model.
- Return type:
SimpleNamespace
- get_grid_voltage(kTs)[source]#
Get the grid voltage at a specific discrete time instant.
- Parameters:
kTs (float) – Current discrete time instant [s].
- Returns:
Grid voltage in alpha-beta frame [p.u.].
- Return type:
1 x 2 ndarray of floats
- get_next_state(matrices, u_abc, kTs)[source]#
Calculate the next state of the system.
- Parameters:
u_abc (1 x 3 ndarray of floats) – Converter three-phase switch position or modulating signal.
matrices (SimpleNamespace) – A SimpleNamespace object containing the state-space model matrices.
kTs (float) – Current discrete time instant [s].
- Returns:
The next state of the system.
- Return type:
ndarray of floats