OnlineID#
Description#
This Stateflow is used to detect special transient states and to gather measuring data in these states. It is based on [[1] , [2] ] and has been modified to fit into the ParameterID library of the UltraZohm. It functions as an indefinite loop and continuously identifies its parameters. This is done to identify the parameters of the linear PMSM model. This includes the stator resistance \(R_s\), direct inductance \(L_d\), quadrature inductance \(L_q\) and permanent magnet flux \(\psi_{PM}\). The flux maps \(\psi_d\) and \(\psi_q\) can be identified as well. The relevant signals are measured with each new operating point, and the flux in the specific operating point is calculated. Up to 100 unique values will be stored in an array, which will later be cleaned up with external functions. In contrast to the FluxMapID state, this state does not actively control the machine via reference currents (except by adding an injection signal with low amplitude/frequency on top of the reference d-axis current). Thus it measures and calculates the flux in the operating points.
To assist in the identification of the flux maps, an Automatic reference current generator does exist. It is an external Stateflow purposefully designed for the OnlineID state. It returns reference currents of a circular determined current map to quickly cycle through different operating points and identify flux map values over a wide operating point.
Fig. 290 Schematic overview of the FrictionID
Necessary measurement values#
i_dq
v_dq
omega_m
omega_el
OnlineID object#
-
typedef struct uz_ParaID_OnlineID_t uz_ParaID_OnlineID_t#
Object definition for uz_ParaID_OnlineID_t.
OnlineID config#
-
struct uz_ParaID_OnlineIDConfig_t#
configuration struct for TwoMassID specific settings
Public Members
-
real32_T dev_omega#
scale factor to determine the tolerance band for the speed during steady-state detection. Default value is 0.05.
-
real32_T dev_curr#
scale factor to determine the tolerance band for the dq-currents during steady-state detection. Default value is 0.05.
-
real32_T identRAmp#
amplitude for d-current injection signal for identification of linear parameters
-
real32_T nom_factor#
eactor for rated current,to determine in which interval the linear Parameters will be identified. i.e. 0.5*I_n
-
real32_T Rs_time#
enter value in seconds. Determines, after which time the linear Parameters have to be identified again, even if the currents are outside the interval determined by nom_factor.
-
boolean_T allowPsiCalcOutside#
false: Flux maps will only be calculated, if linear parameters have been identified inside the valid range. Flux maps will only be calculated again, if the machine is in the valid range.
true:Flux maps will always be calculated, even if the linear parameters were identified outside of range.
-
real32_T min_n_ratio#
factor for rated speed to determine the lower end in which interval the linear Parameters will be identified. i.e. 0.1*n_n.
-
real32_T dev_omega#
OnlineID output#
-
struct uz_ParaID_OnlineID_output_t#
output struct for OnlineID
OnlineID functions#
-
uz_ParaID_OnlineID_t *uz_OnlineID_init(void)#
Initializes the uz_ParaID_OnlineID_t object.
- Returns:
uz_ParaID_OnlineID_t* pointer to object
-
void uz_OnlineID_step(uz_ParaID_OnlineID_t *self)#
steps the OnlineID state once
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
-
void uz_OnlineID_CleanPsiArray(uz_ParaID_OnlineID_t *self, uz_ParameterID_Data_t *Data)#
This function is cleaning the array storing the measurement values, which always consists of a d-q-current combination a winding temperature and a speed value such as a d-q-flux combination The function is searching for measuring pairs which are closer than “eta_c” to their neighbors. In this case it is averaging these similar pairs to avoid measuring values containing the same information.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
-
void uz_OnlineID_CalcFluxMaps(uz_ParaID_OnlineID_t *self, uz_ParameterID_Data_t *Data)#
This function is calculating the regular flux maps out of the irregular scatter data array. The outputs is written onto the member FluxMap_Data of the uz_ParameterID_Data_t struct.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
-
void uz_OnlineID_AutoRefCurrents_step(uz_ParaID_OnlineID_t *self, uz_ParameterID_Data_t *Data)#
Calls an stateflow which automatically generates reference currents to speed up the measurement of the OnlineID flux maps. This is more like an extra and not needed for the OnlineID to work.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
-
void uz_OnlineID_set_Config(uz_ParaID_OnlineID_t *self, uz_ParaID_OnlineIDConfig_t Config)#
Sets the config struct for the OnlineID.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
Config – configuration struct for OnlineID
-
void uz_OnlineID_set_ActualValues(uz_ParaID_OnlineID_t *self, uz_ParaID_ActualValues_t ActualValues)#
Sets the ActualValues struct for the OnlineID.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
ActualValues – struct for the measurement values
-
void uz_OnlineID_set_GlobalConfig(uz_ParaID_OnlineID_t *self, uz_ParaID_GlobalConfig_t GlobalConfig)#
Sets the GlobalConfig struct for the OnlineID.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
GlobalConfig – struct for the general settings of the ParameterID
-
void uz_OnlineID_set_ControlFlags(uz_ParaID_OnlineID_t *self, uz_ParaID_ControlFlags_t *ControlFlags)#
Sets the ControlFlags struct for the OnlineID.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
ControlFlags – pointer to the struct with the enable signals of the ParameterID
-
void uz_OnlineID_set_cleaned_psi_array(uz_ParaID_OnlineID_t *self, float *array_pointer)#
Sets the cleaned_psi_array from the CleanPsiArray state.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
array_pointer – pointer to the cleaned array
-
void uz_OnlineID_set_AutoRefCurrents_Config(uz_ParaID_OnlineID_t *self, uz_ParaID_AutoRefCurrentsConfig_t Config)#
Sets config struct of the AutoRefCurrents state embedded in the OnlineID state.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
Config – configuration struct for the AutoRefCurrents state
-
void uz_OnlineID_set_AutoRefCurrents_GlobalConfig(uz_ParaID_OnlineID_t *self, uz_ParaID_GlobalConfig_t GlobalConfig)#
Sets the GlobalConfig struct for the AutoRefCurrents state embedded in the OnlineID state.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
GlobalConfig – struct for the general settings of the ParameterID
-
void uz_OnlineID_set_AutoRefCurrents_ControlFlags(uz_ParaID_OnlineID_t *self, uz_ParaID_ControlFlags_t *ControlFlags)#
Sets the ControlFlags struct for the AutoRefCurrents state embedded in the OnlineID state.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
ControlFlags – pointer to the struct with the enable signals of the ParameterID
-
uz_ParaID_FluxMapsData_t *uz_OnlineID_get_InterpMeshGrid_FluxMapData(uz_ParaID_OnlineID_t *self)#
Gets the interpolated flux maps from the InterMeshGrid state embedded in the OnlineID state.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
- Returns:
uz_ParaID_FluxMapsData_t* interpolated flux maps
-
bool uz_OnlineID_get_enteredOnlineID(uz_ParaID_OnlineID_t *self)#
Gets the status of the enteredOnlineID flag.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
- Returns:
true state has been entered
- Returns:
false state hasn’t been entered
-
uz_ParaID_OnlineID_output_t *uz_OnlineID_get_output(uz_ParaID_OnlineID_t *self)#
Gets the pointer to the output struct of the OnlineID.
- Parameters:
self – pointer to uz_ParaID_OnlineID_t object
- Returns:
uz_ParaID_OnlineID_output_t* pointer to the output struct