Set Ki or Kp according to optimisation criteria#
-
void uz_CurrentControl_tune_magnitude_optimum(uz_CurrentControl_t *self, float tau_sigma_sec)#
Function to change the Ki- and Kp-values of the iq- and id-PI-Controllers according to the magnitude optimum.
- Parameters:
self – uz_CurrentControl_t instance
tau_sigma_sec – Dead time due to measurement, calculation and the actuator
-
void uz_CurrentControl_tune_symmetric_optimum(uz_CurrentControl_t *self, float tau_sigma_sec)#
Function to change the Ki- and Kp-values of the iq- and id-PI-Controllers according to the symmetric optimum.
- Parameters:
self – uz_CurrentControl_t instance
tau_sigma_sec – Dead time due to measurement, calculation and the actuator
-
void uz_CurrentControl_tune_bandwidth(uz_CurrentControl_t *self, float bandwidth_rad_per_sec)#
Function to change the Ki- and Kp-values of the iq- and id-PI-Controllers according to a desired bandwidth.
- Parameters:
self – uz_CurrentControl_t instance
bandwidth_rad_per_sec – Desired bandwidth of current controller
Example#
1int main(void) {
2 struct uz_PMSM_t config_PMSM = {
3 .Ld_Henry = 0.0001f,
4 .Lq_Henry = 0.0002f,
5 .R_ph_Ohm = 0.008f
6 };
7 float tau_sigma_sec = 0.0001;
8 float bandwidth_rad_per_sec = 2500;
9 uz_CurrentControl_tune_magnitude_optimum(uz_CurrentControl_t *self, float tau_sigma_sec);
10 uz_CurrentControl_tune_symmetric_optimum(uz_CurrentControl_t *self, float tau_sigma_sec);
11 uz_CurrentControl_tune_bandwidth(uz_CurrentControl_t *self, float bandwidth_rad_per_sec);
12}
Description#
This only works for a UZ_PI_PARALLEL
PI-controller configuration.
Calculates the values of Kp
and Ki
according to different optimization criteria and the parameters of the PMSM.
The magnitude optimum provides a good compromise between a fast response to a step change in the reference variable with low overshoot and good disturbance behaviour [[3]] (p.94).
The controlled system is simplified to a PT2 system consisting of the respective current control loop (PT1 system) and an additional PT1 system representing the dead time due to the measuring process and actuator:
With the respective time constants:
\(T_{ISR}\) represents the selected period of the ISR. This time must be multiplied by a factor between 1 and 2 to obtain the real dead time. [[3]] (p.98), for example, selects a factor of 1.5. The transfer function of the current controller can be expressed as follows:
According to the magnitude optimum, the controller settings for a controlled system of the form
have to be selected as follows:
Where \(T_1\) is the larger time constant. Comparing this to the real transfer function \(G_S\) from above and noting that \(\tau_{d/q}\) is the larger time constant, the following tuning rules are obtained:
With this, the controller parameters of a parallel PI-controller can be determined:
For controlled systems with an integrating component or when optimisation by the magnitude optimum is difficult due to unfavourable time constants, the symmetrical optimum can be used [[1]] (p.81). In this case, the controller settings must be selected differently:
For the parallel PI controller, the following formulas result accordingly:
As a third option, the current controllers can be adjusted according to a desired bandwidth. The corresponding formulas are based on pole placement:
For a detailed explanation of how these formulae are derived, please refer to [[2]] (p.406).
Example calculation#
Consider a PMSM with the maschine data from above:
In this case a ISR frequency of \(f_{ISR} = 10kHz\) is chosen. See also Mux Axi / ISR Trigger Control to determine the value of \(f_{ISR}\). The controller settings are calculated according to the magnitude optimum as follows:
For the symmetric optimum:
Note that here the ISR time has been multiplied by 1.5. As mentioned above, this factor can be chosen by the user. For optimisation based on a desired bandwidth of \(2500 rad/s\), the controller parameters are calculated as follows: