2023-12-13 09:49 AM
Hi,
In the document UM1052 page 37, it indicates that K_P/K_I = Ls/Rs for pole-zero cancellation in Figure 28.
The question is whether this is the value to use for the ratio K_P/K_I , or should the motor control workbench be used to determine the value for K_P/K_I ?
Also, would the motor control workbench generate values for K_P/K_I that would be different from that in Figure 28 and if so, what would be the reason behind that? Why would pole-zero cancellation not be used?
Thank-you and Best Regards,
Jocelyn
2023-12-15 07:32 AM
Hello,
Please, refer to "Motor Control Firmware Reference Documentation" available through Workbench tool (About->Documentations->Documentation). In "User Manual->A priori determination of flux and torque current PI gains" chapter, you can find the full PI parameter computation taken into account sampling time parameter that gives K_P/K_I=(Ls/(Rs*T)) that is used by Workbench to provide Torque/Flux PI parameters.
On the other hand, disabling "Auto Calculate Torque/Flux Kp & Ki" option in WB Drive Settings, you will be able to modify these parameters.
2023-12-18 01:57 AM
Dear GMA,
Thank-you very much! ... for your response and pointing out the sampling time T .
Regarding the value for the sampling time for the Torque PI controller, is the value of T given by:
T = 1 / (PWM_FREQUENCY) = 2e-5 seconds ?
Also, how is V_BusDC calculated?
Thank-you in advance!
Best wishes,
Jocelyn
2023-12-18 02:31 AM
Hello,
1- It is 1/(PWM FREQUENCY)
2- It is the Nominal Voltage on Motor characteristics:
2023-12-18 05:29 AM
Dear GMA,
Thank-you very much for your response and the confirmation of the sampling time T.
Regarding the V_BusDC, I understand that it is calculated. Please note that in our setup, we are not able to use the MC Workbench to determine the V_BusDC. Also, we are using MCSDK_v5.Y.4 software.
Hence, we would very much appreciate you providing us with the information regarding how V_BusDC is calculated, or what function in the MCSDK_v5.Y.4 software is used to calculate the V_BusDC voltage. Is the V_BusDC voltage calculated using the function:
/**
* @brief It actually performes the Vbus ADC conversion and updates average
* value
* @PAram pHandle related RDivider_Handle_t
* @retval uint16_t Fault code error
*/
__weak uint16_t RVBS_CalcAvVbus(RDivider_Handle_t *pHandle)
{ ... }
or the function
/**
* @brief It actually performes the Vbus ADC conversion and updates average
* value
* @PAram pHandle related RDivider_Handle_t
* @retval uint16_t Fault code error
*/
__weak uint16_t RVBS_CalcAvVbusFilt(RDivider_Handle_t *pHandle)
{ ... }
Thank-you very much in advance!
Best wishes,
Jocelyn
2024-01-10 11:51 PM
Dear GMA,
Regarding the documentation above:
"Please, refer to "Motor Control Firmware Reference Documentation" available through Workbench tool (About->Documentations->Documentation). In "User Manual->A priori determination of flux and torque current PI gains" chapter, you can find the full PI parameter computation taken into account sampling time parameter that gives K_P/K_I=(Ls/(Rs*T)) that is used by Workbench to provide Torque/Flux PI parameters."
it informs that the KI term needs to be multiplied by the sampling period T.
For the discrete differentiation when derivative feedback is used in PID control, would the Derivative Feedback parameter K_D need to be divided by the sampling period T?
Please let us know since we are not able to use the motor pilot in our setup.
Thanks and Best wishes for the New Year!
Jocelyn
2024-01-11 01:23 AM
Dear GMA,
On the same topic as the question above, and in reference to the ST User Manual : "PID regulator theoretical background", it mentions that the sampling time, Tsampling, needs to be included with the integral coeefficient KI as a multiplicative factor due to discrete time calculation.
Questions:
1. Does the ST code assumes that derivative coefficient KD also includes the (1/Tsampling) as a factor?
2. The document also discusses changing Tsampling. Given that the Medium Frequency Task is 1 kHz, is the document suggesting that we need to change the frequency of the Medium Frequency Task as well?
Thanks and Best Regards,
Jocelyn