TwoMassID#

Description#

This state includes an automated identification process for typical parameters of a two-mass system. This state is based on [[1]], but has been modified slightly to fit into the ParameterID library of the UltraZohm. This includes the inertia of the motor and load side, as well as the stiffness and damping of the system. This state requires some sort of speed control.

Figure made with TikZ

Fig. 291 Schematic overview of the TwoMassID

Necessary measurement values#

  • i_dq

  • omega_m

TwoMassID object#

typedef struct uz_ParaID_TwoMassID_t uz_ParaID_TwoMassID_t#

Object definition for uz_ParaID_TwoMassID_t.

TwoMassID config#

struct uz_ParaID_TwoMassIDConfig_t#

configuration struct for TwoMassID specific settings

Public Members

real32_T ScaleTorquePRBS#

current amplitude of PRBS excitation

uint16_T f_max#

reference speed for identification maximum evaluation frequency

uint16_T f_min#

minimum evaluation frequency

boolean_T UseLbMq#

flag to use Levenberg Marquardt Algorithm

real32_T d_TMS_start#

inital damping value for LM-algorithm

TwoMassID output#

struct uz_ParaID_TwoMassID_output_t#

output struct of TwoMassID

Public Members

real32_T PRBS_out#

output of excitation signal. Has to added on top of the speedcontrol q_reference_current

real32_T c_est_out#

identified TMS stiffness in Nm/rad

real32_T d_est_out#

identified TMS damping in Nms/rad

real32_T LoadInertia#

identified inertia of the load in kgm²

real32_T TrainInertia#

identified inertia of the total system in kgm²

real32_T rotorInertia#

identified inertia of the motor in kgm²

TwoMassID functions#

uz_ParaID_TwoMassID_t *uz_TwoMassID_init(void)#

Initializes the uz_ParaID_TwoMassID_t object.

Returns:

uz_ParaID_TwoMassID_t* pointer to object

void uz_TwoMassID_step(uz_ParaID_TwoMassID_t *self)#

steps the TwoMassID state once

Parameters:
  • self – pointer to uz_ParaID_TwoMassID_t object

void uz_TwoMassID_set_Config(uz_ParaID_TwoMassID_t *self, uz_ParaID_TwoMassIDConfig_t Config)#

Sets the config struct for the TwoMassID.

Parameters:
  • self – pointer to uz_ParaID_TwoMassID_t object

  • Config – configuration struct for TwoMassID

void uz_TwoMassID_set_ActualValues(uz_ParaID_TwoMassID_t *self, uz_ParaID_ActualValues_t ActualValues)#

Sets the ActualValues struct for the TwoMassID.

Parameters:
  • self – pointer to uz_ParaID_TwoMassID_t object

  • ActualValues – struct for the measurement values

void uz_TwoMassID_set_GlobalConfig(uz_ParaID_TwoMassID_t *self, uz_ParaID_GlobalConfig_t GlobalConfig)#

Sets the GlobalConfig struct for the TwoMassID.

Parameters:
  • self – pointer to uz_ParaID_TwoMassID_t object

  • GlobalConfig – struct for the general settings of the ParameterID

void uz_TwoMassID_set_ControlFlags(uz_ParaID_TwoMassID_t *self, uz_ParaID_ControlFlags_t *ControlFlags)#

Sets the ControlFlags struct for the TwoMassID.

Parameters:
  • self – pointer to uz_ParaID_TwoMassID_t object

  • ControlFlags – pointer to the struct with the enable signals of the ParameterID

bool uz_TwoMassID_get_enteredTwoMassID(uz_ParaID_TwoMassID_t *self)#

Gets the status of the enteredTwoMassID flag.

Parameters:
  • self – pointer to uz_ParaID_TwoMassID_t object

Returns:

true state has been entered

Returns:

false state hasn’t been entered

bool uz_TwoMassID_get_finishedTwoMassID(uz_ParaID_TwoMassID_t *self)#

Gets the status of the finishedTwoMassID flag.

Parameters:
  • self – pointer to uz_ParaID_TwoMassID_t object

Returns:

true state has finished

Returns:

false state hasn’t finished

uz_ParaID_Controller_Parameters_output_t *uz_TwoMassID_get_FOC_output(uz_ParaID_TwoMassID_t *self)#

Gets the pointer to the output controller struct of the TwoMassID.

Parameters:
  • self – pointer to uz_ParaID_TwoMassID_t object

Returns:

uz_ParaID_Controller_Parameters_output_t* pointer to the FOC controller parameters struct

uz_ParaID_TwoMassID_output_t *uz_TwoMassID_get_output(uz_ParaID_TwoMassID_t *self)#

Gets the pointer to the output struct of the TwoMassID.

Parameters:
  • self – pointer to uz_ParaID_TwoMassID_t object

Returns:

uz_ParaID_TwoMassID_output_t* pointer to the output struct

Sources#