**4. DE-MOMI tuning method**

In order to improve the disturbance rejection response, while retaining the tracking response obtained by the MOMI method, a disturbance estimator has been added to the PID controller *GC*(*s*) (2), as depicted in **Figure 3**.

The disturbance estimator consists of the process model *GM*, the inverse process model *GMI* and the filter *GFD*. In hypothetical case, when the process model is ideal representation of the bi-proper process without time-delay, and the filter *GFD* = 1:

**Figure 3.** *The PID controller with disturbance estimator.*

$$\mathbf{G}\_{M} = \mathbf{G}\_{P}, \mathbf{G}\_{M} = \mathbf{G}\_{M}^{-1}, \mathbf{G}\_{FD} = \mathbf{1},\tag{11}$$

the estimated disturbance *df* equals to the actual disturbance *d*:

$$d\_f = d.\tag{12}$$

*<sup>a</sup>*1*<sup>m</sup>* <sup>¼</sup> *<sup>A</sup>*<sup>1</sup> *A*<sup>0</sup>

> *A*<sup>0</sup> þ

The process model delay *Tdelm* is calculated from the third-order equation in

Derivation of disturbance filter parameters depends mainly on desired disturbance rejection performance. It is natural that the disturbance signal reconstruction (*df*) is faster if the filter time constant *TFD* is smaller. In hypothetical case, if

> *e*�*sTdelm* ð Þ 1 þ *sTFD*

With sufficiently small time constant (*TFD* ! 0), where the disturbance filter gain

One remaining parameter of the disturbance filter *GFD* (13) is the gain *KFD*. One would, naturally, expect that the most optimal value should be *KFD* = 1, since only in this case, after some time, *df* becomes the same to *d* (15). Therefore, the process input disturbance *d* is eliminated by the reconstructed disturbance *df*. However, as will be shown below, the optimal disturbance response is obtained with lower values of the gain *KFD*. Namely, due to the disturbance compensator, the external process input signal *d* generates the delayed reconstructed disturbance signal *df* (15). Combined together, the actual process input *u*, due to disturbance *d*, is *d*-*df*. The step-like signal *d*, therefore, generates pulse-like actual process input disturbance signal *d*-*df*. Since the PID controller is present in the loop, and it contains the integrating term, the process output (*y*) deviation in one direction (e.g. above the reference) should be compensated by the process output deviation in the opposite direction (e.g. below the reference). Namely, when using *KFD* = 1, the integral of the control error must be:

*KFD* = 1, and there is no process time delay, *df* ≈ *d*. In this case the reconstructed disturbance signal *df* perfectly compensates the disturbance *d*. On the other hand, smaller disturbance filter time constant significantly increases the process output noise present in the measurements and forwards it to the controller output. Therefore, the *TFD* should be selected according to the tolerated noise gain of the distur-

Now, all the model parameters are known and the disturbance filter *GFD* parameters should be derived. Before continuing the derivation we should be aware of the fact that *GMI*(s) is not proper, so it cannot be realised in practice without the accompanied filter *GFD*(s). Multiplication of both is strictly proper, so the entire

*<sup>a</sup>*2*<sup>m</sup>* ¼ � *<sup>A</sup>*<sup>2</sup>

(14). The solution is the smallest real positive result [23].

*Improving Disturbance-Rejection by Using Disturbance Estimator*

*DOI: http://dx.doi.org/10.5772/intechopen.95615*

block can be easily implemented inside the controller.

*GM* = *GP*, the reconstructed disturbance signal *df* becomes:

*d <sup>f</sup>* ¼ *KFD*

bance estimator, as will be discussed in detail in the next sub-chapter.

ð<sup>∞</sup> *t*¼0

initial process overshoot due to the disturbance *d*, is inevitable.

the disturbance rejection response is improved (lower figure).

**49**

It means that, by applying *KFD* = 1, the additional process undershoot, after the

**Figure 4** shows an example on delayed second-order process, when applying the

step-wise external process input disturbance signal *d*, and when using *KFD* = 1 (upper figure) and *KFD* = 0.44 (lower figure). The process output undershoot in the upper figure is clearly seen. By appropriately reducing the filter gain to *KFD* = 0.44,

� *Tdelm*

<sup>2</sup> (14)

<sup>3</sup> *d* (15)

*e t*ð Þ*dt* ¼ 0*:* (16)

*a*1*mA*<sup>1</sup> *A*<sup>0</sup> þ *T*2 *delm*

In this case the ideal disturbance compensation is achieved. However, in practice, model mismatch may occur (due to changing process characteristics in time or working point, lower-order process model or the process non-linearity), and the inverse of the process usually cannot be obtained, since majority of the actual processes are either strictly proper or they have time delays. Therefore, another strategy is required.

For practical applications, the solution has to be as simple as possible. In this manner we decided to use the following process model, the inverse process model and the disturbance estimator filter:

$$G\_M = \frac{K\_{PRM}e^{-sT\_{ddm}}}{1 + a\_{1m}s + a\_{2m}s^2}$$

$$G\_{MI} = \frac{1 + a\_{1m}s + a\_{2m}s^2}{K\_{PRM}}$$

$$G\_{FD} = \frac{K\_{FD}}{(1 + sT\_{FD})^3} \tag{13}$$

where *KPRM* and *Tdelm* are the process model gain and time delay and *a1m* and *a2m* are the process model dynamic parameters. Parameters *KFD* and *TFD* are the disturbance filter gain and time constant, respectively.

The remaining question is how to obtain the process model if the actual process is of the higher order or if the actual process is not known (e.g. the areas (moments) were calculated directly from the process time-response)? Fortunately, the process model can be calculated directly from the obtained areas (5), as derived in [23]:

$$\frac{T\_{delm}^3}{6} - \frac{A\_1}{2A\_0} T\_{delm}^2 + \left(\frac{A\_1^2}{A\_0^2} - \frac{A\_2}{A\_0}\right) T\_{delm} + \frac{2A\_1 A\_2}{A\_0^2} - \frac{A\_3}{A\_0} - \frac{A\_1^3}{A\_0^3} = \mathbf{0}$$

$$K\_{PRM} = A\_0$$

*Improving Disturbance-Rejection by Using Disturbance Estimator DOI: http://dx.doi.org/10.5772/intechopen.95615*

$$a\_{1m} = \frac{A\_1}{A\_0} - T\_{delm}$$

$$a\_{2m} = -\frac{A\_2}{A\_0} + \frac{a\_{1m}A\_1}{A\_0} + \frac{T\_{delm}^2}{2} \tag{14}$$

The process model delay *Tdelm* is calculated from the third-order equation in (14). The solution is the smallest real positive result [23].

Now, all the model parameters are known and the disturbance filter *GFD* parameters should be derived. Before continuing the derivation we should be aware of the fact that *GMI*(s) is not proper, so it cannot be realised in practice without the accompanied filter *GFD*(s). Multiplication of both is strictly proper, so the entire block can be easily implemented inside the controller.

Derivation of disturbance filter parameters depends mainly on desired disturbance rejection performance. It is natural that the disturbance signal reconstruction (*df*) is faster if the filter time constant *TFD* is smaller. In hypothetical case, if *GM* = *GP*, the reconstructed disturbance signal *df* becomes:

$$d\_f = K\_{FD} \frac{e^{-sT\_{delm}}}{\left(1 + sT\_{FD}\right)^3} d\tag{15}$$

With sufficiently small time constant (*TFD* ! 0), where the disturbance filter gain *KFD* = 1, and there is no process time delay, *df* ≈ *d*. In this case the reconstructed disturbance signal *df* perfectly compensates the disturbance *d*. On the other hand, smaller disturbance filter time constant significantly increases the process output noise present in the measurements and forwards it to the controller output. Therefore, the *TFD* should be selected according to the tolerated noise gain of the disturbance estimator, as will be discussed in detail in the next sub-chapter.

One remaining parameter of the disturbance filter *GFD* (13) is the gain *KFD*. One would, naturally, expect that the most optimal value should be *KFD* = 1, since only in this case, after some time, *df* becomes the same to *d* (15). Therefore, the process input disturbance *d* is eliminated by the reconstructed disturbance *df*. However, as will be shown below, the optimal disturbance response is obtained with lower values of the gain *KFD*. Namely, due to the disturbance compensator, the external process input signal *d* generates the delayed reconstructed disturbance signal *df* (15). Combined together, the actual process input *u*, due to disturbance *d*, is *d*-*df*. The step-like signal *d*, therefore, generates pulse-like actual process input disturbance signal *d*-*df*. Since the PID controller is present in the loop, and it contains the integrating term, the process output (*y*) deviation in one direction (e.g. above the reference) should be compensated by the process output deviation in the opposite direction (e.g. below the reference). Namely, when using *KFD* = 1, the integral of the control error must be:

$$\int\_{t=0}^{\infty} e(t)dt = 0.\tag{16}$$

It means that, by applying *KFD* = 1, the additional process undershoot, after the initial process overshoot due to the disturbance *d*, is inevitable.

**Figure 4** shows an example on delayed second-order process, when applying the step-wise external process input disturbance signal *d*, and when using *KFD* = 1 (upper figure) and *KFD* = 0.44 (lower figure). The process output undershoot in the upper figure is clearly seen. By appropriately reducing the filter gain to *KFD* = 0.44, the disturbance rejection response is improved (lower figure).

*GM* <sup>¼</sup> *GP*, *GMI* <sup>¼</sup> *<sup>G</sup>*�<sup>1</sup>

*Control Based on PID Framework - The Mutual Promotion of Control and Identification…*

In this case the ideal disturbance compensation is achieved. However, in practice, model mismatch may occur (due to changing process characteristics in time or working point, lower-order process model or the process non-linearity), and the inverse of the process usually cannot be obtained, since majority of the actual processes are either strictly proper or they have time delays. Therefore, another strategy is required. For practical applications, the solution has to be as simple as possible. In this manner we decided to use the following process model, the inverse process model

*GM* <sup>¼</sup> *KPRMe*�*sTdelm*

*GMI* <sup>¼</sup> <sup>1</sup> <sup>þ</sup> *<sup>a</sup>*1*ms* <sup>þ</sup> *<sup>a</sup>*2*ms*

*GFD* <sup>¼</sup> *KFD*

*A*2 1 *A*2 0

� *<sup>A</sup>*<sup>2</sup> *A*<sup>0</sup>

*KPRM* ¼ *A*<sup>0</sup>

!

1 þ *a*1*ms* þ *a*2*ms*<sup>2</sup>

*KPRM*

ð Þ 1 þ *sTFD*

where *KPRM* and *Tdelm* are the process model gain and time delay and *a1m* and *a2m* are the process model dynamic parameters. Parameters *KFD* and *TFD* are the distur-

The remaining question is how to obtain the process model if the actual process is of the higher order or if the actual process is not known (e.g. the areas (moments) were calculated directly from the process time-response)? Fortunately, the process model can be calculated directly from the obtained areas (5), as derived in [23]:

*Tdelm* þ

2*A*1*A*<sup>2</sup> *A*2 0

� *<sup>A</sup>*<sup>3</sup> *A*<sup>0</sup> � *A*3 1 *A*3 0 ¼ 0

2

the estimated disturbance *df* equals to the actual disturbance *d*:

and the disturbance estimator filter:

*The PID controller with disturbance estimator.*

**Figure 3.**

bance filter gain and time constant, respectively.

*T*3 *delm* <sup>6</sup> � *<sup>A</sup>*<sup>1</sup> 2*A*<sup>0</sup> *T*2 *delm* þ

**48**

*<sup>M</sup>* , *GFD* ¼ 1, (11)

<sup>3</sup> (13)

*d <sup>f</sup>* ¼ *d:* (12)

*KIP* ¼ *KIKPRM KPP* ¼ *KPKPRM KDP* ¼ *KDKPRM d*<sup>0</sup> ¼ ð Þ 1 þ *KPP*

*Improving Disturbance-Rejection by Using Disturbance Estimator*

*DOI: http://dx.doi.org/10.5772/intechopen.95615*

For the given controller filter (*TF*) and the disturbance filter (*TFD*) time constants (note that the calculation of both time constants, according to the desired level of noise, will be derived in the next sub-chapter), the calculation of remaining controller, model and disturbance filter parameters proceeds as given in **Figure 5**.

To illustrate the proposed design of DE-MOMI method, according to control structure in **Figure 5**, let us calculate the controller, model and disturbance filter

> *GP*<sup>1</sup> <sup>¼</sup> *<sup>e</sup>*�0*:*5*<sup>s</sup>* ð Þ 1 þ *s* 2

*GP*<sup>2</sup> <sup>¼</sup> *<sup>e</sup>*�0*:*2*<sup>s</sup>*

The characteristic areas, calculated from (5) and (7), are given in **Table 1**. Next, the PID controller parameters are calculated from (6) and from (9), since we are going to compare the proposed DE-MOMI method with MOMI and DRMO

The process models *GM* and inverse process models *GMI* are then calculated from

1. Calculate the characteristic areas or moments from the process time-response [9,12]

Areas *GP1* 1 2.50 4.13 5.77 7.42 9.07 Areas *GP1* with controller filter 1 2.60 4.39 6.21 8.04 9.87 Areas *GP2* 1 3.20 6.62 11.26 17.12 24.21 Areas *GP2* with controller filter 1 3.30 6.95 11.96 18.32 26.04

methods. The calculated controller parameters are given in **Table 2**.

 or from (5) if the process transfer function is known in advance. 2. Calculate modified areas according to the chosen T*F* from (7).

*The calculated areas for the processes (20) without and with the controller filter.*

(14), where *GMI* is the inverse of *GM* without time-delay:

3. Calculate PID controller parameters from (6). 4. Calculate process model parameters from (14). 5. Calculate the disturbance filter gain K*FD* from (18).

*Calculation of the controller, model and filter parameters.*

**Figure 5.**

**Table 1.**

**51**

Illustrative example 1

parameters for the following processes:

The a-priori chosen filter time constants were:

2

*f* <sup>0</sup> ¼ *a*1*<sup>m</sup>* þ *KDP* þ *TF* þ *Tdelm* (19)

ð Þ <sup>1</sup> <sup>þ</sup> *<sup>s</sup>* <sup>3</sup> (20)

*TF* ¼ *TFD* ¼ 0*:*1 (21)

*A0 A1 A2 A3 A4 A5*

**Figure 4.** *The closed-loop signals when applying step-wise external process input disturbance signal with disturbance filter gains* KFD *= 1 (upper figure) and* KFD *= 0.44 (lower figure).*

The remaining question is how to find the most appropriate filter gain *KFD*. Certainly, the *KFD* should be chosen so as that the disturbance rejection is optimised. Here we can use the same optimisation criteria as in the DRMO tuning method. Therefore, the transfer function *GCLD*(s) between the external disturbance (*d*) and the process output (*y*):

$$G\_{\rm CLD}(\mathbf{s}) = \frac{Y(\mathbf{s})}{D(\mathbf{s})} = \frac{G\_M(\mathbf{1} - G\_{FD}\mathbf{e}^{-sT\_{\rm ddm}})}{\mathbf{1} + G\_M G\_P} \tag{17}$$

should be optimised according to the modified MO criterion [9, 16]. Note that expression (17) holds when the process and the model transfer functions are equivalent. Since the disturbance filter time constant is defined, and all of the controller and the model parameters are calculated, the only optimisation parameter is the gain *KFD*. By using similar derivation as in [9, 16], the optimal filter gain *KFD* is calculated as:

$$K\_{FD} = \frac{-b\_0 + \sqrt{b\_0^2 - 4a\_0c\_0}}{2a\_0} \tag{18}$$

where

$$a\_0 = -d\_0 + 2f\_0 K\_{IP} + K\_{IP}^2 \left(T\_F^2 - 3T\_{FD}^2\right)$$

$$b\_0 = 2d\_0 - 4f\_0 K\_{IP} + K\_{IP}^2 \left(-2T\_F^2 + 12T\_{FD}^2 + 6T\_{FD}T\_{delm} + T\_{delm}^2\right)$$

$$c\_0 = -d\_0 + 2f\_0 K\_{IP} + K\_{IP}^2 T\_F^2$$

*Improving Disturbance-Rejection by Using Disturbance Estimator DOI: http://dx.doi.org/10.5772/intechopen.95615*

$$K\_{IP} = K\_I K\_{PRM}$$

$$K\_{PP} = K\_P K\_{PRM}$$

$$K\_{DP} = K\_D K\_{PRM}$$

$$d\_0 = \left(\mathbf{1} + K\_{PP}\right)^2$$

$$f\_0 = a\_{1m} + K\_{DP} + T\_F + T\_{delm} \tag{19}$$

For the given controller filter (*TF*) and the disturbance filter (*TFD*) time constants (note that the calculation of both time constants, according to the desired level of noise, will be derived in the next sub-chapter), the calculation of remaining controller, model and disturbance filter parameters proceeds as given in **Figure 5**.

Illustrative example 1

To illustrate the proposed design of DE-MOMI method, according to control structure in **Figure 5**, let us calculate the controller, model and disturbance filter parameters for the following processes:

$$\mathbf{G}\_{P1} = \frac{\mathbf{e}^{-0.5\mathbf{s}}}{\left(\mathbf{1} + \mathbf{s}\right)^{2}}$$

$$\mathbf{G}\_{P2} = \frac{\mathbf{e}^{-0.2\mathbf{s}}}{\left(\mathbf{1} + \mathbf{s}\right)^{3}}\tag{20}$$

The a-priori chosen filter time constants were:

$$T\_F = T\_{FD} = \mathbf{0.1} \tag{21}$$

The characteristic areas, calculated from (5) and (7), are given in **Table 1**.

Next, the PID controller parameters are calculated from (6) and from (9), since we are going to compare the proposed DE-MOMI method with MOMI and DRMO methods. The calculated controller parameters are given in **Table 2**.

The process models *GM* and inverse process models *GMI* are then calculated from (14), where *GMI* is the inverse of *GM* without time-delay:


#### **Figure 5.**

The remaining question is how to find the most appropriate filter gain *KFD*. Certainly, the *KFD* should be chosen so as that the disturbance rejection is optimised. Here we can use the same optimisation criteria as in the DRMO tuning method. Therefore, the transfer function *GCLD*(s) between the external disturbance (*d*) and

*The closed-loop signals when applying step-wise external process input disturbance signal with disturbance*

*Control Based on PID Framework - The Mutual Promotion of Control and Identification…*

*D s*ð Þ <sup>¼</sup> *GM* <sup>1</sup> � *GFDe*�*sTdelm*

should be optimised according to the modified MO criterion [9, 16]. Note that expression (17) holds when the process and the model transfer functions are equivalent. Since the disturbance filter time constant is defined, and all of the controller and the model parameters are calculated, the only optimisation parameter is the gain *KFD*. By using similar derivation as in [9, 16], the optimal filter gain *KFD* is

q

2*a*<sup>0</sup>

*<sup>F</sup>* <sup>þ</sup> <sup>12</sup>*T*<sup>2</sup>

� � 1 þ *GMGP*

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi *b*2

*IP T*<sup>2</sup>

*<sup>F</sup>* � <sup>3</sup>*T*<sup>2</sup> *FD* � �

� �

*IPT*<sup>2</sup> *F*

*FD* <sup>þ</sup> <sup>6</sup>*TFDTdelm* <sup>þ</sup> *<sup>T</sup>*<sup>2</sup>

*delm*

<sup>0</sup> � 4*a*0*c*<sup>0</sup>

(17)

(18)

*GCLD*ðÞ¼ *s*

*filter gains* KFD *= 1 (upper figure) and* KFD *= 0.44 (lower figure).*

*Y s*ð Þ

*KFD* <sup>¼</sup> �*b*<sup>0</sup> <sup>þ</sup>

*<sup>a</sup>*<sup>0</sup> ¼ �*d*<sup>0</sup> <sup>þ</sup> <sup>2</sup> *<sup>f</sup>* <sup>0</sup>*KIP* <sup>þ</sup> *<sup>K</sup>*<sup>2</sup>

*IP* �2*T*<sup>2</sup>

*<sup>c</sup>*<sup>0</sup> ¼ �*d*<sup>0</sup> <sup>þ</sup> <sup>2</sup> *<sup>f</sup>* <sup>0</sup>*KIP* <sup>þ</sup> *<sup>K</sup>*<sup>2</sup>

*<sup>b</sup>*<sup>0</sup> <sup>¼</sup> <sup>2</sup>*d*<sup>0</sup> � <sup>4</sup> *<sup>f</sup>* <sup>0</sup>*KIP* <sup>þ</sup> *<sup>K</sup>*<sup>2</sup>

the process output (*y*):

**Figure 4.**

calculated as:

where

**50**

*Calculation of the controller, model and filter parameters.*


**Table 1.**

*The calculated areas for the processes (20) without and with the controller filter.*

*Control Based on PID Framework - The Mutual Promotion of Control and Identification…*


#### **Table 2.**

*The calculated controller parameters for the processes (20) for MOMI (6) and DRMO (9) method, taking into account the chosen controller filter TF = 0.1.*

$$G\_{M1} = \frac{e^{-0.5\epsilon}}{1 + 2\epsilon + \epsilon^2}$$

$$G\_{M11} = 1 + 2\epsilon + \epsilon^2$$

$$G\_{M2} = \frac{e^{-0.616\epsilon}}{1 + 2.58\epsilon + 1.84\epsilon^2} \tag{22}$$

$$G\_{M2} = 1 + 2.58\epsilon + 1.84\epsilon^2$$

Finally, the disturbance filter gain *KFD*, when taking into account the chosen *TFD* = 0.1, is then calculated from (18):

$$K\_{FD1} = 0.57$$

$$K\_{FD2} = 0.59 \tag{23}$$

**Figure 6.**

**Figure 7.**

**53**

*The closed-loop responses on the process* GP1*, when using the MOMI, DRMO and DE-MOMI method.*

*Improving Disturbance-Rejection by Using Disturbance Estimator*

*DOI: http://dx.doi.org/10.5772/intechopen.95615*

*The closed-loop responses on the process* GP2*, when using the MOMI, DRMO and DE-MOMI method.*

Therefore, the complete inverse of the models with accompanying disturbance filters (see **Figure 3**) are the following:

$$\mathbf{G}\_{\rm MI1}\mathbf{G}\_{\rm FD1} = \frac{\mathbf{0}.57(\mathbf{1} + 2\mathbf{s} + s^2)}{\left(\mathbf{1} + \mathbf{0}.\mathbf{1}\mathbf{s}\right)^3}$$

$$\mathbf{G}\_{\rm MI2}\mathbf{G}\_{\rm FD2} = \frac{\mathbf{0}.59(\mathbf{1} + 2.58\mathbf{s} + \mathbf{1}.84\mathbf{s}^2)}{\left(\mathbf{1} + \mathbf{0}.\mathbf{1}\mathbf{s}\right)^3} \tag{24}$$

The closed-loop responses, obtained with the calculated controller, model and filter parameters, for the MOMI, DRMO and the proposed DE-MOMI method, are given in **Figures 6** and **7**. At *t* = 0 s, the reference value (*r*) was changed from 0 to 1 and at half of experiment time the process input disturbance (*d*) was changed from 0 to 1. It is obvious that the disturbance rejection performance of the DE-MOMI method is the best. Note that when applying the DE-MOMI method, due to the difference between the actual process and the process model in the second example (*GP2*), the process input signal, during the reference change, is not smooth. This is expected, since the inverse process model with filter is amplifying the difference between the actual process and the process model. In this case, the response can be made smoother by increasing the disturbance filter time constant (*TFD*). Note that a possible limitation of the control signal can also help to smooth out the oscillations after the reference step [24].

The disturbance rejection performance of the DE-MOMI method can be increased by decreasing the disturbance filter time constant *TFD*. However, as already mentioned above, the process input signal can become oscillatory when the actual process and the process model differ. In this case, too small *TFD* can even render the closed-loop system unstable. Besides that, the process noise (signal *n* in
