soft4pes.model.machine.pmsm#

Permanent magnet synchronous machine (PMSM) model. The machine operates at a constant electrical angular rotor speed.

Classes#

PMSM

Permanent magnet synchronous machine (PMSM) model. The system is modeled in a alpha-beta frame,

Module Contents#

class soft4pes.model.machine.pmsm.PMSM(par, conv, base, T_ref_init, mtpa_lut)[source]#

Bases: soft4pes.model.common.system_model.SystemModel

Permanent magnet synchronous machine (PMSM) model. The system is modeled in a alpha-beta frame, and the machine operates at a constant electrical angular rotor speed. The state of the system is the stator current, and the permanent-magnet flux (i.e., rotor flux) is considered as a disturbance. The system input is the converter three-phase switch position or modulating signal. The initial state of the model is based on the torque reference.

Parameters:
  • par (PMSMParameters) – Permanent magnet synchronous machine parameters in p.u.

  • conv (converter object) – Converter object.

  • base (base value object) – Base values.

  • T_ref_init (float) – Initial torque reference [p.u.].

  • mtpa_lut (MTPALookupTable) – MTPA lookup table for optimal current calculation.

data[source]#

Namespace for storing simulation data.

Type:

SimpleNamespace

par[source]#

Permanent magnet synchronous machine parameters in p.u.

Type:

PMSMParameters

conv[source]#

Converter object.

Type:

converter object

base[source]#

Base values.

Type:

base value object

x#

Current state of the machine [p.u.].

Type:

1 x 2 ndarray of floats

cont_state_space[source]#

The continuous-time state-space model of the system.

Type:

SimpleNamespace

state_map[source]#

A dictionary mapping state names to elements of the state vector.

Type:

dict

time_varying_model[source]#

Indicates if the system model is time-varying.

Type:

bool

theta_el[source]#

Electrical angle of the machine [rad].

Type:

float

set_initial_state(**kwargs)[source]#

Calculate the initial state of the machine based on the torque reference.

Parameters:

**kwargs (dict) –

Keyword arguments containing: - T_ref_init : float

The initial torque reference [p.u.].

  • mtpa_lutMTPALookupTable

    MTPA lookup table for optimal current calculation.

get_stator_current_ref_dq(T_ref)[source]#

Get the optimal steady-state stator current using MTPA.

Parameters:

T_ref (float) – The torque reference [p.u.].

Returns:

The optimal stator current in the dq frame [p.u.].

Return type:

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, Ts)[source]#

Calculate the next state of the system.

Parameters:
  • matrices (SimpleNamespace) – A SimpleNamespace object containing the state-space model matrices A and B.

  • u_abc (1 x 3 ndarray of floats) – Converter three-phase switch position or modulating signal [p.u.].

  • kTs (float) – Current discrete time instant [s].

  • Ts (float) – Sampling interval [s].

Returns:

The next state of the system.

Return type:

1 x 4 ndarray of floats

get_measurements(kTs)[source]#

Get the measurement data of the system.

Parameters:

kTs (float) – Current discrete time instant [s].

Returns:

A SimpleNamespace object containing the machine electromagnetic torque Te [p.u.].

Return type:

SimpleNamespace