Power Electronic Converters

The converters are divided into two classes: The discretely controlled and continuously controlled converters. The PowerElectronicConverter class is the base class for all converters. From that, the DiscreteConverter and the ContinuousDynamicallyAveragedConverter derive to be the base class for all continuous and discrete converters.

Converter Base Class

class gym_electric_motor.physical_systems.converters.PowerElectronicConverter(tau, interlocking_time=0.0)[source]

Base class for all converters in a SCMLSystem.

Properties:
voltages(tuple(float, float)): Determines which output voltage polarities the converter can generate.
E.g. (0, 1) - Only positive voltages / (-1, 1) Positive and negative voltages
currents(tuple(float, float)): Determines which output current polarities the converter can generate.
E.g. (0, 1) - Only positive currents / (-1, 1) Positive and negative currents
Parameters:
  • tau – Discrete time step of the system in seconds

  • interlocking_time – Interlocking time of the transistors in seconds

action_space = None

gymnasium.Space that defines the set of all possible actions for the converter

convert(i_out, t)[source]

The conversion function that converts the previously set action to an input voltage for the motor. This function has to be called at least at every previously defined switching time, because the input voltage for the motor might change at these times.

Parameters:
  • i_out (list(float)) – All currents that flow out of the converter into the motor.

  • t (float) – Current time of the system.

Returns:

List of all input voltages at the motor.

Return type:

list(float)

currents = None

gymnasium.Space that defines Minimum, Maximum and Dimension of possible output current of the converter

i_sup(i_out)[source]

Calculate the current, the converter takes from the supply for the given output currents and the current switching state.

Parameters:

i_out (list(float)) – All currents flowing out of the converter and into the motor.

Returns:

The current drawn from the supply.

Return type:

float

reset()[source]

Reset all converter states to a default.

Returns:

A default output voltage after reset(=0V).

Return type:

list(float)

set_action(action, t)[source]

Set the next action of the converter at the beginning of a simulation step in the system.

Parameters:
  • action (element of action_space) – The control action on the converter.

  • t (float) – Time at the beginning of the simulation step in seconds.

Returns:

Times when a switching action occurs and the conversion function must be called by the system.

Return type:

list(float)

property tau

Time of one simulation step in seconds.

Type:

Float

voltages = None

gymnasium.Space that defines Minimum, Maximum and Dimension of possible output voltage of the converter

Finite Control Set Converter

class gym_electric_motor.physical_systems.converters.FiniteConverter(tau=1e-05, **kwargs)[source]

Base class for all finite converters.

Parameters:
  • tau – Discrete time step of the system in seconds

  • interlocking_time – Interlocking time of the transistors in seconds

action_space = None

gymnasium.Space that defines the set of all possible actions for the converter

convert(i_out, t)[source]

The conversion function that converts the previously set action to an input voltage for the motor. This function has to be called at least at every previously defined switching time, because the input voltage for the motor might change at these times.

Parameters:
  • i_out (list(float)) – All currents that flow out of the converter into the motor.

  • t (float) – Current time of the system.

Returns:

List of all input voltages at the motor.

Return type:

list(float)

currents = None

gymnasium.Space that defines Minimum, Maximum and Dimension of possible output current of the converter

i_sup(i_out)[source]

Calculate the current, the converter takes from the supply for the given output currents and the current switching state.

Parameters:

i_out (list(float)) – All currents flowing out of the converter and into the motor.

Returns:

The current drawn from the supply.

Return type:

float

reset()

Reset all converter states to a default.

Returns:

A default output voltage after reset(=0V).

Return type:

list(float)

set_action(action, t)[source]

Set the next action of the converter at the beginning of a simulation step in the system.

Parameters:
  • action (element of action_space) – The control action on the converter.

  • t (float) – Time at the beginning of the simulation step in seconds.

Returns:

Times when a switching action occurs and the conversion function must be called by the system.

Return type:

list(float)

property tau

Time of one simulation step in seconds.

Type:

Float

voltages = None

gymnasium.Space that defines Minimum, Maximum and Dimension of possible output voltage of the converter

Continuous Control Set Dynamically Averaged Converter

class gym_electric_motor.physical_systems.converters.ContDynamicallyAveragedConverter(tau=0.0001, **kwargs)[source]

Base class for all continuously controlled converters that calculate the input voltages to the motor with a dynamically averaged model over one time step.

This class also implements the interlocking time of the transistors as a discount on the output voltage.

Parameters:
  • tau – Discrete time step of the system in seconds

  • interlocking_time – Interlocking time of the transistors in seconds

action_space = None

gymnasium.Space that defines the set of all possible actions for the converter

convert(i_out, t)[source]

The conversion function that converts the previously set action to an input voltage for the motor. This function has to be called at least at every previously defined switching time, because the input voltage for the motor might change at these times.

Parameters:
  • i_out (list(float)) – All currents that flow out of the converter into the motor.

  • t (float) – Current time of the system.

Returns:

List of all input voltages at the motor.

Return type:

list(float)

currents = None

gymnasium.Space that defines Minimum, Maximum and Dimension of possible output current of the converter

i_sup(i_out)[source]

Calculate the current, the converter takes from the supply for the given output currents and the current switching state.

Parameters:

i_out (list(float)) – All currents flowing out of the converter and into the motor.

Returns:

The current drawn from the supply.

Return type:

float

reset()

Reset all converter states to a default.

Returns:

A default output voltage after reset(=0V).

Return type:

list(float)

set_action(action, t)[source]

Set the next action of the converter at the beginning of a simulation step in the system.

Parameters:
  • action (element of action_space) – The control action on the converter.

  • t (float) – Time at the beginning of the simulation step in seconds.

Returns:

Times when a switching action occurs and the conversion function must be called by the system.

Return type:

list(float)

property tau

Time of one simulation step in seconds.

Type:

Float

voltages = None

gymnasium.Space that defines Minimum, Maximum and Dimension of possible output voltage of the converter