Set new motor parameters#

void uz_CurrentControl_set_PMSM_parameters(uz_CurrentControl_t *self, uz_PMSM_t pmsm_config)#

Function to change the PMSM parameters during runtime.

Parameters:
  • self – uz_CurrentControl_t instance

  • pmsm_config – PMSM_config struct with updated values

Example#

Listing 88 Example function call to change the motor parameters. CurrentControl-Instance via init-function. PMSM struct via PMSM config.#
1int main(void) {
2   struct uz_PMSM_t config = {
3    .Ld_Henry = 0.00027f,
4    .Lq_Henry = 0.00027f,
5    .Psi_PM_Vs = 0.0082f,
6   };
7   uz_CurrentControl_set_PMSM_parameters(CC_instance, config_PMSM );
8}

Description#

Gives the option to change the motor parameters, which are needed for the linear decoupling, during runtime. The changed parameters can be written into a PMSM-struct and passed to the function. The new values will be asserted again.