ElectricalID#
Description#
This state includes an automated identification process for typical parameters of a PMSM. It is based on [[1]] and has been modified to fit into the ParameterID library of the UltraZohm. This includes the identification of the theta_offset \(\theta_{offset}\) of an incremental encoder, stator resistance \(R_s\), direct inductance \(L_d\), quadrature inductance \(L_q\), permanent magnet flux \(\psi_{PM}\) and the inertia \(J\). The control parameters of a FOC will be calculated with the identified parameters and are therefore tuned for the used machine. This state requires some sort of speed control.
This state does require multiple ACCEPT flags to continue since, for the identification of \(L_q\), manual operation on the motor is required.
Necessary measurement values#
V_abc
I_abc
i_dq
v_dq
omega_m
omega_el
theta_m
ElectricalID object#
-
typedef struct uz_ParaID_ElectricalID_t uz_ParaID_ElectricalID_t#
Object definition for uz_ParaID_ElectricalID_t.
ElectricalID config#
-
struct uz_ParaID_ElectricalIDConfig_t#
configuration struct for ElectricalID specific settings
Public Members
-
real32_T dutyCyc#
manual input for DutyCycle during identification of thetaOffset, Ld and Lq. If the value is left at 0.0f, the DutyCycle will be identified automatically.
-
real32_T dutyCyc#
ElectricalID output#
-
struct uz_ParaID_ElectricalID_output_t#
output struct of ElectricalID
Public Members
-
real32_T PWM_Switch_0#
DutyCycle for PWM Switch 0 (only needed from the start of ElectricalID, until Ld and Lq have been identified)
-
real32_T PWM_Switch_2#
DutyCycle for PWM Switch 2 (only needed from the start of ElectricalID, until Ld and Lq have been identified)
-
real32_T PWM_Switch_4#
DutyCycle for PWM Switch 4 (only needed from the start of ElectricalID, until Ld and Lq have been identified)
-
real32_T PWM_Switch_a2#
DutyCycle for PWM Switch 6 (only needed from the start of ElectricalID, until Ld and Lq have been identified)
-
real32_T PWM_Switch_b2#
DutyCycle for PWM Switch 8 (only needed from the start of ElectricalID, until Ld and Lq have been identified)
-
real32_T PWM_Switch_c2#
DutyCycle for PWM Switch 10 (only needed from the start of ElectricalID, until Ld and Lq have been identified)
-
boolean_T enable_TriState[3]#
System 1: array to signal which halfbridge of the inverter should be in tristate mode. true signals, that the halfbridge should be in tristate mode. (only needed from the start of ElectricalID, until Ld and Lq have been identified)
-
boolean_T enable_TriState_set_2[3]#
System 2: array to signal which halfbridge of the inverter should be in tristate mode. true signals, that the halfbridge should be in tristate mode. (only needed from the start of ElectricalID, until Ld and Lq have been identified)
-
uz_6ph_dq_t inductances_6ph#
identified stator inductances
-
uz_6ph_dq_t resistances_6ph#
identified stator resistances
-
real32_T PWM_Switch_0#
ElectricalID additional (for 6ph ParameterID)#
-
struct uz_ParaID_ElectricalID_fft_in_t#
-
struct uz_ParaID_ElectricalID_offset_estimation_t#
ElectricalID functions#
-
uz_ParaID_ElectricalID_t *uz_ElectricalID_init(void)#
Initializes the uz_ParaID_ElectricalID_t object.
- Returns:
uz_ParaID_ElectricalID_t pointer to object
-
void uz_ElectricalID_step(uz_ParaID_ElectricalID_t *self)#
steps the ElectricalID state once
- Parameters:
self – pointer to uz_ParaID_ElectricalID_t object
-
void uz_ElectricalID_set_Config(uz_ParaID_ElectricalID_t *self, uz_ParaID_ElectricalIDConfig_t Config)#
Sets the config struct for the ElectricalID.
- Parameters:
self – pointer to uz_ParaID_ElectricalID_t object
Config – configuration struct for ElectricalID
-
void uz_ElectricalID_set_ActualValues(uz_ParaID_ElectricalID_t *self, uz_ParaID_ActualValues_t ActualValues)#
Sets the ActualValues struct for the ElectricalID.
- Parameters:
self – pointer to uz_ParaID_ElectricalID_t object
ActualValues – struct for the measurement values
-
void uz_ElectricalID_set_GlobalConfig(uz_ParaID_ElectricalID_t *self, uz_ParaID_GlobalConfig_t GlobalConfig)#
Sets the GlobalConfig struct for the ElectricalID.
- Parameters:
self – pointer to uz_ParaID_ElectricalID_t object
GlobalConfig – struct for the general settings of the ParameterID
-
void uz_ElectricalID_set_ControlFlags(uz_ParaID_ElectricalID_t *self, uz_ParaID_ControlFlags_t *ControlFlags)#
Sets the ControlFlags struct for the ElectricalID.
- Parameters:
self – pointer to uz_ParaID_ElectricalID_t object
ControlFlags – pointer to the struct with the enable signals of the ParameterID
-
bool uz_ElectricalID_get_enteredElectricalID(uz_ParaID_ElectricalID_t *self)#
Gets the status of the enteredElectricalID flag.
- Parameters:
self – pointer to uz_ParaID_ElectricalID_t object
- Returns:
true state has been entered
- Returns:
false state hasn’t been entered
-
bool uz_ElectricalID_get_finishedElectricalID(uz_ParaID_ElectricalID_t *self)#
Gets the status of the finishedElectricalID flag.
- Parameters:
self – pointer to uz_ParaID_ElectricalID_t object
- Returns:
true state has finished
- Returns:
false state hasn’t finished
-
uz_ParaID_Controller_Parameters_output_t *uz_ElectricalID_get_FOC_output(uz_ParaID_ElectricalID_t *self)#
Gets the pointer to the output controller struct of the ElectricalID.
- Parameters:
self – pointer to uz_ParaID_ElectricalID_t object
- Returns:
uz_ParaID_Controller_Parameters_output_t* pointer to the FOC controller parameters struct
-
uz_ParaID_ElectricalID_output_t *uz_ElectricalID_get_output(uz_ParaID_ElectricalID_t *self)#
Gets the pointer to the output struct of the ElectricalID.
- Parameters:
self – pointer to uz_ParaID_ElectricalID_t object
- Returns:
uz_ParaID_ElectricalID_output_t* pointer to the output struct