The set point is the only parameter which is required for auto-tuning. The set point has to be given to input i_rSetPoint. Start auto-tuning through the pin i_xAutoTune. The oscillation starts and at the end of the third period, the three sets of PID parameters are calculated. Then auto-tuning is completed.
The PI parameters (D parameters like rTv and rTd are not determined) are calculated based on the different measured times and amplitude of the last period. The calculated PI parameters were given to the array structure element iq_stParameterSetsPID.
Also refer to chapter FB_HeatingControl.
Status messages are provided to function block outputs (q_xAutoTuneActive and q_etStatusAutoTune) to inform about auto-tuning.
The following two figures show when auto-tuning is running and in progress. Auto-tuning will be running/active after the start command and set point value, independent if the set point value is above or below the actual process value.
To prevent that one or more oscillations are skipped due to bounces of the process value, there is a hysteresis value used during auto-tuning (default value = 0.2 %).
Also refer to rAutoTuneHysteresis of ST_TemperatureControl.
Example:
At a set point of 200.0 °C (392 °F), the hysteresis is 0.4 °C (0.72 °F). The temperature distance must be greater, like 0.5 °C (0.9 °F), for example, temperature resolution is 0.1 °C (0.18 °F).
Heating switched on at 199.5 °C (391.1 °F) or less.
Heating switched off at 200.0 °C (392 °F) or greater.
After the third oscillation, the three PID parameter sets are calculated and iq_etSelectParameterSetPID is automatically set to ET_ParameterSetPID.Medium.
In parallel to the PID parameter calculation, the system is compared. This means that from the last oscillation, the undershoot value is compared with the overshoot value. Depending on the result the system is classified as system OK (balanced), oversized or undersized.