2020-03-10 01:30 AM
Hello colleagues! In the process of working in FOK SDK 4.3 with the controller STM32F302RE, I had several questions:
1) When using the HFI mode, I can not configure the control settings. Perhaps you have some kind of guide to configure each parameter.
2) When I start the engine with an encoder, the shaft cannot rotate at a speed lower than 6 revolutions per minute, that is, 5, 4, and so on, the motor just holds the moment. I also noticed that in fact the speed changes stepwise at 6 revolutions per minute. How can I make the speed change in steps of 1 revolution per minute?
3) Tell me how to properly configure the PID controller for Iq and Id? By changing these values, the engine begins to behave differently.
Thank you in advance for all those who responded.
2020-03-23 01:04 AM
Hello,
1: For HFI please refer to section 8.2 of UM1052 for the FOC SDK v4.3 found at https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32-standard-peripheral-library-expansion/stsw-stm32100.html#resource
2: The default resolution in case of FOC SDK v4.3 is 0.1 Hz which corresponds to 6 RPM. So anything lower than 6RPM will be interpreted as zero. Similarly above 6RPM, speed changes in steps of 0.1Hz due to this. Not sure if it can be changed in v4.3 but with MCSDK v5.x it is possible to change the speed sensor resolution.
3: Torque (Iq) and Flux (Id) PI regulators are calculated automatically using motor electrical parameters like Rs, Ls or Ld and Lq in case on Internal-PMSM motor. It is better to use accurate motor parameters and fine tune the PI controllers by setting the cutoff frequency in rad/sec. PWM frequency and execution rate also affects performance. PWM frequency needs to be chosen to optimize between switching losses (less for lower frequency) and torque ripple (less for higher frequency).
You can find PI regulator theory and implementation details in section 4.9 and 4.10 of UM0152.
Regards
2020-03-23 01:27 AM
correction: *UM1052 for HFI in point 1. Edited and corrected in original post.
2021-06-15 12:52 AM
The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards