Structs for ParameterID_Data#
Every used struct, which is unique to the ParameterID, is declared in a separate header uz_ParameterID_data.h
. This includes the global structs and individual structs of each ID-state
.
They are all declared in the common header to ensure data integrity over each separate ID-state
.
Listed below are the global structs, which are not specific to one individual state.
-
enum uz_ParaID_Control_selection#
enum for selection of control algorithm if all OfflineID states are finished
Values:
-
enumerator No_Control#
-
enumerator Current_Control#
-
enumerator Speed_Control#
-
enumerator Torque_Control#
-
enumerator No_Control#
Global ParameterID Data struct#
This struct is used to communicate with the ParameterID object. It is therefore intended as the data-out- and -input of the ParameterID.
The ParameterID will check for updated config values during runtime and adjust itself accordingly.
During each step of the ParameterID, the members of each output struct are automatically updated to the latest values.
In order to save execution time, the output structs of the ID-states
are realized as pointers since some ID-states
have large arrays as part of their output struct.
Using memcpy
is therefore not performant enough.
-
struct uz_ParameterID_Data_t#
Data struct to share inputs and outputs to the encapsuled uz_ParameterID_t object.
Public Members
-
uz_ParaID_ActualValues_t ActualValues#
Input: measured values needed for the ParameterID
-
uz_ParaID_ControlFlags_t *ControlFlags#
Output: current values of the ControlFlags struct
-
uz_ParaID_GlobalConfig_t GlobalConfig#
Input: Global configuration struct for general settings of the ParameterID
-
uz_ParaID_ElectricalIDConfig_t ElectricalID_Config#
Input: Configuration struct for ElectricalID
-
uz_ParaID_TwoMassIDConfig_t TwoMassID_Config#
Input: Configuration struct for TwoMassID
-
uz_ParaID_FrictionIDConfig_t FrictionID_Config#
Input: Configuration struct for FrictionID
-
uz_ParaID_FluxMapIDConfig_t FluxMapID_Config#
Input:Configuration struct for FluxMapID
-
uz_ParaID_OnlineIDConfig_t OnlineID_Config#
Input: Configuration struct for OnlineID
-
uz_ParaID_AutoRefCurrentsConfig_t AutoRefCurrents_Config#
Input: Configuration struct for AutoReference current generator
-
uz_ParaID_ElectricalID_output_t *ElectricalID_Output#
Output: Pointer to output struct of ElectricalID
-
uz_ParaID_TwoMassID_output_t *TwoMassID_Output#
Output: Pointer to output struct of TwoMassID
-
uz_ParaID_FrictionID_output_t *FrictionID_Output#
Output: Pointer to output struct of FrictionID
-
uz_ParaID_FluxMapID_output_t *FluxMapID_Output#
Output: Pointer to output struct of FluxMapID
-
uz_ParaID_OnlineID_output_t *OnlineID_Output#
Output: Pointer to output struct of OnlineID
-
uz_ParaID_Controller_Parameters_output_t Controller_Parameters#
Output: output struct for control algorithm (i_dq_ref / n_ref etc.)
-
uz_ParaID_AutoRefCurrents_output_t AutoRefCurrents_Output#
Output: output struct for reference currents of the AutoReference current generator
-
uz_ParaID_FluxMapsData_t *FluxMap_Data#
Storage for calculated OnlineID FluxMaps
-
uz_ParaID_ElectricalID_fft_in_t ElectricalID_FFT#
Storage for FFT which is done in main
-
uz_ParaID_ElectricalID_offset_estimation_t ElectricalID_Offset_Estimation#
Output: Encoder offset estimation
-
bool calculate_flux_maps#
status bool to signal, that the OnlineID FluxMaps should be calculated
-
bool finished_voltage_measurement#
status bool to signal, that voltage measurement for psi pm is finished
-
bool finished_extended_offset_estimation#
status bool to signal, extended encoder offset estimation is finished
-
int FluxMap_counter#
counter to transmit FluxMaps 1by1 to the uz_GUI
-
int FluxMap_Control_counter#
control counter from the GUI to sync the FluxMaps counter
-
float Psi_D_pointer#
current value of the FluxMap array corresponding to the value of the FluxMap_counter
-
float Psi_Q_pointer#
current value of the FluxMap array corresponding to the value of the FluxMap_counter
-
int Array_counter#
counter to transmit meas arrays of FrictionID 1by1 to the uz_GUI
-
int Array_Control_counter#
control counter from the GUI to sync the array_counter
-
float MeasArraySpeed_pointer#
current value of the MeasSpeedArray corresponding to the value of the array_counter
-
float MeasArrayTorque_pointer#
current value of the MeasTorqueArray corresponding to the value of the array_counter
-
float FluxMap_MeasuringPoints#
amount of unique measuring points for the FluxMaps
-
enum uz_ParaID_Control_selection ParaID_Control_Selection#
ParaID_Control_Selection
0 = No_Control
1 = Current_Control
2 = Speed_Control
3 = Torque_Control
-
bool OnlineID_reset_was_pressed#
Signals the functions in the main.c, that the reset was pressed
-
uz_ParaID_ActualValues_t ActualValues#
Actual values struct#
This struct carries all the measurement data needed for the ParameterID. They are passed to the ParameterID object through the ParameterID_Data struct. Some states may not need every measurement value listed below. For further details on this, check the individual pages of the existing Stateflows.
-
struct uz_ParaID_ActualValues_t#
struct for the measured values which are needed for the ParameterID
Public Members
-
uz_3ph_abc_t V_abc#
measured three-phase voltages
-
uz_3ph_abc_t I_abc#
measured three-phase currents
-
uz_3ph_dq_t i_dq#
measured dq voltages
-
uz_3ph_dq_t v_dq#
measured dq currents
-
uz_6ph_abc_t v_abc_6ph#
measured six-phase voltages
-
uz_6ph_abc_t i_abc_6ph#
measured six-phase currents
-
uz_3ph_dq_t v_xy_rotating#
measured dq voltages
-
uz_3ph_dq_t i_xy_rotating#
measured dq currents
-
uz_3ph_dq_t v_zero_rotating#
measured dq voltages
-
uz_3ph_dq_t i_zero_rotating#
measured dq currents
-
uz_6ph_dq_t i_dq_6ph#
measured dq voltages
-
uz_6ph_dq_t v_dq_6ph#
measured dq currents
-
uz_3ph_abc_t V_abc#
Global config struct#
This struct carries all configuration values of the ParameterID, which affect multiple states. It consists of request flags for the individual ID-states
, initial controller configuration and motor configuration values,
ACCEPT and RESET flags, etc. Depending on the setup, some configuration values can be left at 0. For further information, check each struct member’s description.
-
struct uz_ParaID_GlobalConfig_t#
Global configuration struct for general settings of the ParameterID.
Public Members
-
real32_T Kp_id#
value for Kp_id, which is needed, if ElectricalID should not be executed. Can be left at 0, if no FOC control algorithm is used
-
real32_T Kp_iq#
value for Kp_iq, which is needed, if ElectricalID should not be executed. Can be left at 0, if no FOC control algorithm is used
-
real32_T Kp_n#
value for Kp_n, which is needed, if ElectricalID should not be executed. Can be left at 0, if no FOC control algorithm is used
-
real32_T Ki_id#
value for Ki_id, which is needed, if ElectricalID should not be executed. Can be left at 0, if no FOC control algorithm is used
-
real32_T Ki_iq#
value for Ki_iq, which is needed, if ElectricalID should not be executed. Can be left at 0, if no FOC control algorithm is used
-
real32_T Ki_n#
value for Ki_n, which is needed, if ElectricalID should not be executed. Can be left at 0, if no FOC control algorithm is used
-
real32_T sampleTimeISR#
sampleTime of the ISR. i.e. sampleTime of the function call uz_ParameterID_step. Very important parameter
-
uz_3ph_dq_t i_dq_ref#
Not needed for ID-states. Can be used to transmit reference currents to a control algorithm.
-
real32_T n_ref#
Not needed for ID-states. Can be used to transmit reference speed to a control algorithm.
-
real32_T M_ref#
Not needed for ID-states. Can be used to transmit reference speed to a control algorithm.
-
uz_3ph_dq_t i_xy_ref#
Not needed for ID-states. Can be used to transmit reference currents to a control algorithm.
-
real32_T Kp_id#
Control flags struct#
This struct carries the enable signals for the individual ID-states
.
-
struct uz_ParaID_ControlFlags_t#
struct which contains the enable state flags
Public Members
Controller parameters struct#
This struct bundles all the necessary commands and values for the external control algorithm. Some variables are geared toward a FOC-controller and, therefore, can be ignored if another control algorithm is used.
-
struct uz_ParaID_Controller_Parameters_output_t#
struct with config values for a control algorithm
Public Members
-
uz_3ph_dq_t i_dq_ref#
reference currents for current controller
-
uz_3ph_dq_t i_xy_ref#
reference currents for current controller
-
uz_3ph_dq_t i_zero_ref#
reference currents for current controller
-
uz_3ph_dq_t i_dq_ref#
FluxMap data struct#
This struct bundles all necessary information for the flux maps of the OnlineID state.
-
struct uz_ParaID_FluxMapsData_t#
struct which contains the calculated fluxmaps of the OnlineID state
Public Members
Controller objects struct#
This struct bundles all necessary controller pointers for the external controller algorithm.
-
struct uz_ParameterID_controller#
Data struct to collect all controller pointers.
Public Members
-
uz_CurrentControl_t *CC_instance_dq#
current control instance for dq system
-
uz_SpeedControl_t *SC_instance#
speed control instance
-
uz_SetPoint_t *SP_instance#
setpoint instance
-
uz_CurrentControl_t *CC_instance_dq#