Set new Ki or Kp#

void uz_CurrentControl_set_Kp_id(uz_CurrentControl_t *self, float Kp_id)#

Function to change the Kp-value of the id-PI-Controller during runtime.

Parameters:
  • self – uz_CurrentControl_t instance

  • Kp_id – new Kp_id value. Must be greater or equal than 0.0f

void uz_CurrentControl_set_Kp_iq(uz_CurrentControl_t *self, float Kp_iq)#

Function to change the Kp-value of the iq-PI-Controller during runtime.

Parameters:
  • self – uz_CurrentControl_t instance

  • Kp_iq – new Kp_iq value. Must be greater or equal than 0.0f

void uz_CurrentControl_set_Ki_id(uz_CurrentControl_t *self, float Ki_id)#

Function to change the Ki-value of the id-PI-Controller during runtime.

Parameters:
  • self – uz_CurrentControl_t instance

  • Ki_id – new Ki_id value. Must be greater or equal than 0.0f

void uz_CurrentControl_set_Ki_iq(uz_CurrentControl_t *self, float Ki_iq)#

Function to change the Ki-value of the iq-PI-Controller during runtime.

Parameters:
  • self – uz_CurrentControl_t instance

  • Ki_iq – new Ki_iq value. Must be greater or equal than 0.0f

Example#

Listing 86 Example function call to change the Kp or Ki parameters. CurrentControl-Instance via init-function#
 1int main(void) {
 2   float Kp_id = 4.0f;
 3   uz_CurrentControl_set_Kp_id(CC_instance, Kp_id);
 4   float Kp_iq = 4.0f;
 5   uz_CurrentControl_set_Kp_iq(CC_instance, Kp_iq);
 6   float Ki_id = 20.0f;
 7   uz_CurrentControl_set_Ki_id(CC_instance, Ki_id);
 8   float Ki_iq = 20.0f;
 9   uz_CurrentControl_set_Ki_iq(CC_instance, Ki_iq);
10}

Description#

Gives the option to change the controller parameters during runtime. Each Ki and Kp of the two PI-Controllers have their own function. The new values will be asserted again.