soft4pes.model.machine#
Machine models.
Submodules#
Classes#
Base values for a machine. |
|
Induction machine model operating at a constant electrical angular rotor speed. |
|
Parameters for the InductionMachine. |
Package Contents#
- class soft4pes.model.machine.BaseMachine(Vm_R_SI, Im_R_SI, fm_R_SI, npp, pf)[source]#
Base values for a machine.
The class computes the base values for a machine based on the rated values.
- Parameters:
Vm_R_SI (float) – Rated voltage of the machine [V] (line-to-line rms voltage).
Im_R_SI (float) – Rated current of the machine [A] (line rms current).
fm_R_SI (float) – Rated frequency [Hz].
npp (int) – Number of pole pairs.
pf (float) – Power factor.
- V#
Base voltage [V].
- Type:
float
- I#
Base current [A].
- Type:
float
- w#
Base angular frequency [rad/s].
- Type:
float
- S#
Base apparent power [VA].
- Type:
float
- Z#
Base impedance [Ohm].
- Type:
float
- L#
Base inductance [H].
- Type:
float
- T#
Base torque [Nm].
- Type:
float
- class soft4pes.model.machine.InductionMachine(par, conv, base, psiS_mag_ref, T_ref_init)[source]#
Bases:
soft4pes.model.common.system_model.SystemModel
Induction machine model operating at a constant electrical angular rotor speed. The state of the system is the stator current and rotor flux in the alpha-beta frame, i.e., [iS_alpha, iS_beta, psiR_alpha, psiR_beta]^T. The machine is modelled with rotor flux alignment. The system input is the converter three-phase switch position or modulating signal. The initial state of the model is based on the stator flux magnitude reference and torque reference.
- Parameters:
par (InductionMachineParameters) – Induction machine parameters in p.u.
conv (converter object) – Converter object.
base (base value object) – Base values.
psiS_mag_ref (float) – Stator flux magnitude reference [p.u.].
T_ref_init (float) – Initial torque reference [p.u.].
- data#
Namespace for storing simulation data.
- Type:
SimpleNamespace
- par#
Induction machine parameters in p.u.
- conv#
Converter object.
- Type:
converter object
- base#
Base values.
- Type:
base value object
- x#
Current state of the machine [p.u.].
- Type:
1 x 4 ndarray of floats
- psiR_mag_ref#
Rotor flux magnitude reference [p.u.].
- Type:
float
- wr#
Electrical angular rotor speed [p.u.].
- Type:
float
- cont_state_space#
The continuous-time state-space model of the system.
- Type:
SimpleNamespace
- state_map#
A dictionary mapping states to elements of the state vector.
- Type:
dict
- set_initial_state(**kwargs)[source]#
Calculates the initial state of the machine based on the torque reference and stator flux magnitude reference.
- Parameters:
psiS_mag_ref (float) – The stator flux magnitude reference [p.u.].
T_ref_init (float) – The initial torque reference [p.u.].
- get_steady_state_psir(psiS_mag_ref, T_ref)[source]#
Calculates the steady-state rotor flux and rotor speed.
- Parameters:
psiS_mag_ref (float) – The stator flux magnitude reference [p.u.].
T_ref (float) – The torque reference [p.u.].
- Returns:
psiR_dq (1 x 2 ndarray) – The steady-state rotor flux in the dq frame [p.u.].
wr (float) – The steady-state (electrical angular) rotor speed [p.u.].
- calc_stator_current(psiR_dq, T_ref)[source]#
Calculate the steady-state stator current.
- Parameters:
psiR_dq (1 x 2 ndarray) – The rotor flux in the dq frame [p.u.].
T_ref (float) – The torque reference [p.u.].
- Returns:
The stator current in the dq frame [p.u.].
- Return type:
1 x 2 ndarray
- get_continuous_state_space()[source]#
Calculate the continuous-time state-space model of the system.
- Returns:
A SimpleNamespace object containing matrices F and G of the continuous-time state-space model.
- Return type:
SimpleNamespace
- 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:
1 x 4 ndarray of floats
- class soft4pes.model.machine.InductionMachineParameters(fs_SI, pf, Rs_SI, Rr_SI, Lls_SI, Llr_SI, Lm_SI, base)[source]#
Parameters for the InductionMachine.
- Parameters:
fs_SI (float) – Synchronous (stator) electrical frequency [Hz].
pf_SI (float) – Power factor.
Rs_SI (float) – Stator resistance [Ohm].
Rr_SI (float) – Rotor resistance [Ohm].
Lls_SI (float) – Stator leakage inductance [H].
Llr_SI (float) – Rotor leakage inductance [H].
Lm_SI (float) – Mutual inductance [H].
base (base value object) – Base values.
- ws#
Synchronous (stator) electrical angular frequency [p.u.].
- Type:
float
- pf#
Power factor.
- Type:
float
- Rs#
Stator resistance [p.u.].
- Type:
float
- Rr#
Rotor resistance [p.u.].
- Type:
float
- Lls#
Stator leakage inductance [p.u.].
- Type:
float
- Llr#
Rotor leakage inductance [p.u.].
- Type:
float
- Lm#
Mutual inductance [p.u.].
- Type:
float