1. Introduction
Numerous modeling methods for proportional–integral–derivative (PID) autotuning have been developed since the original relay feedback method was proposed [
1,
2,
3,
4]. The original relay feedback method has limitations in that it shows modeling errors due to the harmonics of the relay signal and it is structurally impossible to assign a preset phase angle to the frequency response model. Moreover, it cannot manipulate the static disturbance in a systematic way, resulting in severe modeling errors or cycling failure.
Many researchers have tried to overcome the limitations of the original relay feedback method. Modified relay feedback methods using a six-level signal and a saturated relay signal were proposed to reduce the modeling error of the identified frequency response by reducing the harmonics [
5,
6]. Several relay feedback methods combined with an artificial time delay, a hysteresis, or a two-channel relay were developed to obtain the frequency response of the process corresponding to a preset phase angle [
7,
8,
9,
10,
11,
12]. Some relay feedback methods moved the reference value for switching the relay on/off to guarantee the same accuracy of the model even under static disturbance conditions [
11,
12,
13,
14,
15,
16]. Furthermore, an improved relay feedback method was developed to estimate the frequency response data of the process with better accuracy by removing the effects of measurement noises and disturbances [
17] using a disturbance estimator and a noise magnitude estimator. All the previous relay feedback methods mentioned above are modifications of the relay feedback method. All of them still failed to completely remove the harmonics. Additionally, they have shortcomings in that the user must wait until the process converges to a steady state before conducting the relay test. Otherwise, the wrong deviation variables for the relay test are assigned and, as a result, a severely asymmetric limit cycle or cycling failure is obtained.
Low-order plus time-delay models have been identified from the relay feedback method [
18,
19,
20,
21,
22]. The modeling methods using a curvature factor [
18] and an input-biased relay [
19] suffer from the effects of the harmonics, resulting in unavoidable modeling errors. The other methods based on an asymmetrical limit cycle [
20] and a shape factor [
21] have shortcomings in that they have to solve non-linear equations in an iterative manner. Moreover, all the methods [
18,
19,
20,
21,
22] are inherently sensitive to plant–model structural mismatch and uncertainties such as disturbances and noises because the frequency information included in the limit cycle of the relay feedback test mainly concentrates on the zero and ultimate frequency.
Various process identification methods have been proposed to find high-order process models from closed-loop tests of relay feedback [
12,
23,
24,
25]. Even though the process identification methods and tuning methods based on multiple frequencies can provide better performances, they require heavier data processing and their implementations are more difficult compared to previous simple PID autotuning methods.
In this study, we propose an improved continuous-cycling method for the automatic tuning of the PID controller. The proportional gain of the proportional controller is automatically updated to obtain the continuous-cycling status. To guarantee the preset phase angle of the frequency response, we place a phase shifter in the form of a time delay after the proportional controller, as was done in [
7] and [
12]. The proposed method can identify the frequency response of the process at a preset phase angle without modeling error. It theoretically provides an exact frequency response even if a static disturbance is present or the initial status is not a steady state. Therefore, the user does not need to wait until the process converges to a steady state before conducting the proposed autotuning method. Furthermore, it is straightforward to obtain the exact first-order plus time-delay model without solving non-linear equations when there are no disturbances and the initial status is a steady state. We demonstrate numerically and experimentally that the proposed method can provide an exact frequency response even under static disturbance conditions, and can be applied to real processes.
2. Proposed Autotuning Method
Figure 1 and
Figure 2 show a schematic diagram and a typical response for the proposed method. The proposed method is composed of a proportional controller, a continuous-cycler, and a phase shifter. The proportional gain of the proportional controller is automatically adjusted by the proposed continuous-cycler to derive the overall process to a continuous-cycling status.
Subsequently, the following characteristic equation for the continuous-cycling status is obtained.
Thus, the frequency response data of the process can be easily obtained as in Equation (2):
where
,
and
denote the proportional gain, the frequency, and the time delay at the continuous-cycling status, respectively.
is a preset phase angle specified by the user.
is the frequency response of the zero frequency.
and
are the peak values of the process input and process output, respectively.
and
are the valley values of the process input and process output, respectively.
The phase shifter in
Figure 1 plays a role in guaranteeing the preset phase angle of
by adjusting the time delay (
) every cycle according to Equation (3). As shown in Equation (4), the amplitude ratio of the frequency response data is
.
The proposed autotuning method with the continuous-cycler and the phase shifter goes through the following steps to obtain the continuous-cycling and the preset phase angle.
[Step 1.1] Set the lower and upper limits of the saturator, equivalently setting the limits of the control output for the sake of safety. Set the initial proportional gain (
) of the proportional controller to a very large value (e.g., 1000) to get the initial fully saturated cycle from 5 s to 14 s as in
Figure 2. Set the preset phase angle (
) of the frequency response data of the process and the setpoint of the proportional controller in accordance with the operator request. Run the proportional controller.
[Step 1.2] At the second peak of the process output, set the proportional gain (
) of the proportional controller to Equation (11) using the following equations:
where
and
represent the time length corresponding to the lower and the upper saturation limits of the initial cycle, respectively, as shown in
Figure 2.
is the frequency.
and
are the Fourier coefficients of the sine signal and the cosine signal of the fundamental frequency when the process input of the initial cycle is represented by the Fourier series. Then,
corresponds to the amplitude of process input (
).
denotes the amplitude of the process output (
) as shown in
Figure 2.
is an index of asymmetry defined by Equation (10).
is the initial value of the proportional gain for the next step.
,
, and
in the case that the process input is symmetric
). Then,
.
is the same as the ultimate gain obtained by the describing function analysis [
12] from the symmetric relay feedback signals. Therefore, roughly speaking, the initial value
is chosen by 1.6 times the ultimate gain. In the case that the process input is asymmetric, the initial value
proportional to
, as in Equation (11), is recommended to compensate for the phenomenon that
decreases as
increases.
[Step 2.1] In the case of controller output saturation, decrease the proportional gain according to the proposed continuous-cycler as in Equation (13). The continuous-cycler would derive the cycling out of the saturation region automatically by decreasing the proportional gain.
where
and
are the time lengths corresponding to the lower and upper saturation limits of the
k-th cycle, respectively, as shown in
Figure 3. Lower and upper limit saturation mean that the process input is at the lower limit and the upper limit, respectively. Therefore,
and
are determined by measuring the time length that the process input is at the lower limit and the upper limit, respectively.
is the proportional gain of the
k-th cycle.
is the period of the
k-th cycle. In the case of controller output saturation, the proposed continuous-cycler in Equation (13) reduces the proportional gain in proportion to the square of the saturation portion within one period to derive the cycling out of the saturation.
[Step 2.2] In the case of no controller output saturation, the proposed continuous-cycler in Equation (14) decreases the proportional gain if the amplitude
of the process output in the present cycle is greater than the amplitude
of the process output in the previous cycle, as shown in
Figure 4, and vice versa to derive the cycling into a continuous-cycling status automatically.
and
are obtained by measuring the difference between the valley value and the peak value of the process output.
Decreasing the constant makes the convergence pattern of the proportional gain more stable but slower via less weighting on the ratio of the present and the previous peak values. The proportional gain does not change when the present peak and the previous peak are the same. is recommended in this paper based on extensive simulation results.
[Step 3] Set the time delay as , to guarantee the preset phase angle of .
[Step 4] Repeat [Steps 2–3] at each cycle until a continuous-cycling status is obtained.
[Step 5] Estimate the frequency response data of the process corresponding to the cycling frequency using Equation (2), and the frequency response corresponding to the zero frequency using Equation (5).
[Step 6.1] If you want to use only
to tune the PID controller, calculate the tuning parameters of the PID controller using the ZN tuning rule or the gain-phase margin tuning rule [
1,
12].
[Step 6.2] If you want to use both
and
to tune the PID controller, obtain the first-order plus time-delay model using the model reduction method [
12] in Equations (15)–(17). In addition, calculate the tuning parameters of the PID controller using the IMC or ITAE tuning rules for the first-order plus time-delay model [
12].
where
,
, and
are the gain, time constant, and time delay of the first-order plus time-delay model.
The proposed autotuning method has remarkable advantages compared to previous relay feedback approaches. It guarantees the preset phase angle of the obtained frequency response data (
) of the process, as shown in Equation (3). Moreover, it theoretically provides exact frequency response data (
and
) of the process without any modeling errors because it uses a proportional controller to obtain the continuous-cycling status. The first-order plus time-delay model can be analytically obtained without solving non-linear equations, and the first-order plus time-delay model is also exact because it is based on exact frequency responses (
and
). Note that when the describing function analysis method is used to estimate the frequency response from the relay feedback test, the modeling error due to the harmonic terms of the relay feedback signal can be up to 5–18% for the first-order plus time-delay model even in ideal cases of no uncertainties and disturbances [
22]. Furthermore, the proposed method still provides exact frequency response data
of the process even under static disturbances or setpoint changes because static disturbances cannot affect the continuous-cycling. Meanwhile, static disturbances can severely distort the shape of the relay feedback signal, resulting in unacceptable modeling errors. Finally, changing the PID controller to the P controller of the proposed method is straightforward and simple. It is especially difficult to determine the deviation variables to apply the relay feedback method [
1] if the initial state of the process is not a steady state. An incorrect definition of the deviation variables can severely distort the shape of the relay feedback signal, resulting in unacceptable modeling errors.
3. Simulation Study
Several processes were simulated to demonstrate the performance of the proposed autotuning method and compare it with the relay feedback method [
1].
Figure 5,
Figure 6,
Figure 7 and
Figure 8 show typical responses of the first-order plus time-delay process of
for the proposed autotuning method and the conventional relay feedback method [
1]. A step input disturbance of 1.5 enters at the beginning of the autotuning methods in this case.
Table 1 and
Table 2 show the estimates of the proposed method and the relay feedback method [
1]. As shown in
Figure 5,
Figure 6,
Figure 7 and
Figure 8, the proposed method successfully derives the process to a continuous-cycling status in a stable manner. In addition, the relay feedback method [
1] shows significant modeling errors in estimating the frequency response data of the process. In contrast, our method provides the exact ultimate frequency (
) and the ultimate gain (
) of the process for all the cases with various process parameters and static disturbances. While the proposed method shows remarkable advantages, the only shortcoming is that the convergence rate of the proposed method is slower, as much as about two or three cycles compared with that of the relay feedback method [
1].
Figure 9,
Figure 10,
Figure 11 and
Figure 12 and
Table 3 and
Table 4 show the typical responses of the high-order plus time-delay process of
and the estimates of the proposed method and the relay feedback method [
1]. A step input disturbance of 2.0 enters at the beginning of the autotuning methods and the process output is contaminated by uniformly distributed random noise between −0.05 and +0.05. Hysteresis of 0.05 is used in finding the peak values of the process output in noisy environments. That is, it is concluded that the peak value is found if the present value is smaller than the previous maximum (peak candidate) values by as much as two times the hysteresis. The proposed method provides a stable convergence to a continuous-cycling status for the high-order plus time-delay process and an exact frequency response data of the process for all the cases, whereas the relay feedback method [
1] cannot remove modeling errors due to the static disturbance in estimating the frequency response data.
Figure 13,
Figure 14,
Figure 15 and
Figure 16 and
Table 5 and
Table 6 show the typical responses of the non-minimum phase process of
and the estimates of the proposed method and the relay feedback method [
1]. A step input disturbance of 2.0 enters at the beginning of the autotuning methods and the process output is contaminated by uniformly distributed random noise between −0.05 and +0.05. Hysteresis of 0.05 is used in finding the peak values of the process output in noisy environments. For all the cases, the proposed method provides a stable convergence to a continuous-cycling status for the non-minimum phase process and exact frequency response data of the process. The relay feedback method [
1] suffers from modeling errors in estimating the frequency response data.
Figure 17,
Figure 18,
Figure 19 and
Figure 20 and
Table 7 and
Table 8 show the typical responses of the integrating process of
and the unstable process of
, and the estimates of the proposed autotuning method and the relay feedback method [
1]. In this case, there are no disturbances or measurement noise.
The proposed method successfully provides a stable continuous-cycling and an exact ultimate frequency response, while the relay feedback method [
1] cannot remove the modeling error due to the harmonics of the relay signal.
4. Experimental Study
The performance of the proposed autotuning method for a liquid level control system is demonstrated in
Figure 21. The liquid level control system is composed of three tanks. The output (controlled variable, process variable) and input (manipulated variable, controller output) of the process are the liquid level of the third tank and the opening percent of the valve, respectively. An LS programmable logic controller (PLC) composed of XGK-CPUE for CPU, XGF-AD43 (LS ELECTRIC Co., Ltd, Anyang-si, Gyeonggi-do, South Korea) for AD converter, XGF-DC4A for DA converter, and XGL-CH2A for serial communication is used for data acquisition. The autotuning algorithms are implemented in a laptop computer using a commercial supervisory control and data acquisition (SCADA) software called PROMONICON (version: 1.0.2, TBB, PSE Laboratory, Kyungpook National University, Daegu, South Korea,
www.tbb-automation.com). The computer is connected with PLC through RS232C communication. The scan time for the autotuning algorithms is 0.1 s.
Figure 22 shows the convergence pattern of the proposed autotuning method and
Table 9 and
Table 10 show the ultimate gain and ultimate period (frequency response data) obtained by the proposed method and the relay feedback method [
1] and the tuning parameters of the PID controllers calculated by the ZN tuning method [
12] on the basis of the ultimate data. Note that defining the reference values
of the deviation variables cannot be accurate because the initial state is not a steady state. Therefore, the relay feedback method [
1] shows asymmetric behavior, as shown in
Figure 23, resulting in the wrong ultimate data.
Figure 24 shows the control performance of the PID controllers tuned by the proposed autotuning method and the relay feedback method [
1] in the case that a step input disturbance of 10 enters at 42 min. The experimental results confirm that the proposed autotuning method has no problems that prevent it from being applied to real plants.