**4. Frequency Domain Identification and Design**

**4.4 PID control**

0.2 0.25 0.3 0.35 0.4 0.45 0.5

−8

−6

−4

−2 0 2

**Figure 4.19** *The function h*(ω) forσ = 0 (full),σ = 0.1(dashed), andσ = 0.01
*(dotted) after low-pass filtering of ˆG*^{P}*N**(e*^{i}^{ω}).

high enough in order to capture the variations of the true frequency re-sponse. It turns out that low-pass filtering is the most efficient way of reducing the uncertainties in the control design.

The identification and design procedure outlined here works very well
for PI design of all test processes in Panagopoulos(1998), as soon as good
values for ε*min* and ε*max* are found. The test batch has been evaluated
for the noise levels σ = 0.01 and 0.1 using h = 0.1 and Nε = 20 as
*default parameters. In most cases a lower N*_{ε} may be used, and some
*faster processes require lower h.*

−2 −1.5 −1 −0.5 0 0.5 1

−2

−1.5

−1

−0.5 0 0.5 1

**Figure 4.20** *The loop transfer function for the PID design which maximizes k**i*

*with G**= 1/(s + 1)*^{7}*, M**s*= 1.4.

*it is possible to obtain a higher k**i* compared to the PI design without
violating the sensitivity constraint. However, too much phase lead may
cause undesired shapes of the Nyquist curve of the loop gain. There may
*for example be more than one point of tangency of the M**s*circle, see
Fig-ure 4.20. This leads to worse robustness properties. In order to avoid too
much phase lead, some additional constraint must be used. In
Panagopou-los*(1998) the following constraints are used close to the M**s*circle:

• The loop transfer function should have decreasing phase curve.

• The curvature of the loop transfer should be negative.

These constraints give a nice shape of the loop gain without being overly conservative. One drawback with is that the computation of the curvature involves two differentiations of the frequency response of the process.

*Since G(i*ω*) is not known exactly, the variance in ˆG**N**(e** ^{iω}*) is amplified
dramatically by the differentiations. These variations may be reduced by
windowing and low-pass filtering. It is however still difficult to obtain a
smooth and accurate estimation of the curvature for high noise levels.

Another way of putting limits on the phase lead is to use a fixed
*ra-tio between T**i* *and T**d*. For example, Ziegler-Nichols tuning methods use

*different ratios depending on the process and the chosen value of M** _{s}*. For
the test batch in Panagopoulos(1998), the ratio lies in the range 1.2–2.6.

*This indicates that T*_{i}*/T**d*= 4 may be overly conservative, and there is no
fundamental reason for sticking to this ratio. However, the optimization
*problem will have an elegant solution in this case. With T*_{i}*/T**d* = 4 the
controller may be written as

*G*_{c}*= k*

1+ 1

*sT** _{i}* +

*sT*

*i*

4

*= k*

*T**i*

2*s*+ 12

*T*_{i}*s* *= k*^{L}*(T*_{i}^{L}*s*+ 1)^{2}

*T*_{i}^{L}*s* (4.26)
*where k*^{L} *= k/2 and T*_{i}^{L} *= T**i*/2. Thus, the PID design can be solved by
doing a PI design for the modified plant

*G*^{L}*(s) = (Ts + 1) G(s)* (4.27)
*where T should be chosen as the integral time T*_{i}^{L}. Since the modified
*plant contains the unknown variable T*_{i}^{L}, the problem needs to be solved
iteratively. A straightforward algorithm is defined by:

*G*_{0}^{L}*(s) = G(s)* *−→ T*_{i1}^{L}
*G*_{1}^{L}*(s) = (T*_{i1}^{L}*s+ 1) G(s) −→ T*_{i2}^{L}
*G*_{2}^{L}*(s) = (T*_{i2}^{L}*s+ 1) G(s) −→ T*_{i3}^{L}

. . .

It turns out that this simple scheme mostly converges to the desired
*so-lution. The iteration is illustrated for the plant G(s) = 1/(s + 1)*^{7} in
*Figure 4.21. The full line shows the optimal T**i* for the modified plant
*(1 + sT)G(s). The algorithm will converge if eT*_{i}^{P}*(T)e < 1 in a *
neighbor-hood of the intersection with the straight line with unit slope. This is the
case for all plants in the test batch used in Panagopoulos *(1998). T**i**(T)*
*normally is a monotonically decreasing function, since higher T gives a*
*faster plant, which mostly has a lower optimal T** _{i}*. Furthermore, the curve

*starts at the optimal T*

_{i}*for the original plant G(s) and ends at the optimal*

*T*

_{i}*for the differentiated plant sG(s).*

As mentioned in Section 4.3, PI controllers for minimum-phase plants with pole excess one can be made arbitrarily fast and the integral gain can thus be made arbitrarily large. The design problem that maximizes the integral gain is thus not well posed. Analogously, the PID design problem is not well posed for minimum-phase plants with pole excess two.

From Åströmet al.(1998) it is also known that a monotonous frequency

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0.5

1 1.5 2 2.5 3 3.5 4

*T*
*T**i*

**Figure 4.21** Iterative PI design of modified plant. The full line shows the
*integra-tion time T**i*from a PI design of the plant*(Ts + 1)/(s + 1)*^{7}.

response of the plant facilitates the PI design problem because suitable initial values for the optimization can always be found. Since the iterative scheme for PID design introduces phase lead, it is not obvious that the modified plant has a monotonous frequency response in the interesting interval. Extra care must thus be taken when solving the PI subproblems.

The different constraints will now be illustrated in an example.
Fig-ures 4.22 and 4.23 show the behavior for PID control of the process
*G(s) = 1/(s+1)*^{7}*with two different values of M**s*, and when using different
constraints:

**A. Maximum sensitivity M**_{s}*and fixed ratio T*_{i}*/T**d*= 4 (full lines),
**B. Maximum sensitivity M*** _{s}*, decreasing phase curve and negative

cur-vature(dashed lines), and

**C. Maximum sensitivity M***s*only(dotted lines).

*The I E and I AE after a step load disturbance is summarized in Table 4.1.*

*As might be expected, I E is slightly higher when a fixed ratio is used*
*and the corresponding time responses are overdamped for M**s*= 1.4. On
*the other hand, the underdamped behavior for M**s* = 2.0 with the other
*designs are avoided with the fixed ratio, so the I AE is actually lowest for*
this design.

−2 −1.5 −1 −0.5 0 0.5 1

−2

−1.5

−1

−0.5 0 0.5

0 10 20 30 40 50 60 70 80 90 100

0 0.5

y

0 10 20 30 40 50 60 70 80 90 100

0 0.5 1 1.5

u

t

**Figure 4.22** Loop transfer functions and time responses for PID designs with
*M**s*= 1.**4 using constraint combinations A.****(full), B. (dashed), and C. (dotted).**

−2 −1.5 −1 −0.5 0 0.5 1

−2

−1.5

−1

−0.5 0 0.5 1

0 10 20 30 40 50 60 70 80 90 100

0 0.5 1 1.5 2

y

0 10 20 30 40 50 60 70 80 90 100

0 0.5 1 1.5 2 2.5

u

t

**Figure 4.23** Loop transfer functions and time responses for PID designs with
*M**s*= 2.0 using constraint combinations A.**(full), B. (dashed), and C. (dotted).**

*M**s*= 1.4 *M**s*= 2.0

*k* *T**i* *T**d* *I E* *I AE* *k* *T**i* *T**d* *I E* *I AE*
**A.** 0.52 4.40 1.10 8.55 8.55 0.91 4.15 1.04 4.58 5.80
**B.** 0.55 3.55 1.69 6.45 7.21 0.98 3.14 1.73 3.19 5.87
**C.** 0.56 2.62 3.06 4.69 7.41 0.99 2.01 3.36 2.03 7.21

**Table 4.1** **Comparison of load disturbance errors for PID control using A. T***i**= 4T**d*,
**B. curvature and phase constraints, and C. only sensitivity constraint.**

*In conclusion, the design constraint T**i* *= 4T**d* is a feasible
alterna-tive to the curvature and phase constraints in Panagopoulos(1998). Both
methods have been tested on estimated frequency response data. This is
further discussed below.

**Design based on estimated frequency response**

The PID design methods give stricter demands on the quality of the es-timated frequency response than the PI design method does. First of all, the range of interesting frequencies will be larger, since the bandwidth generally is higher for the optimal PID controller than for the optimal PI controller. Furthermore, if constraints on the curvature are going to be used, two differentiations of the frequency response estimate are required.

This operation amplifies high frequency noise dramatically.

The difficulties in estimating the curvature appear already at low noise levels. By using fast sampling, long experiments, windowing and low-pass filtering of the differentiated vectors, it is possible to obtain feasible re-sults for some plants. However, the computation of the curvature is ex-tremely sensitive to correct estimation of both the first and second deriva-tive of the frequency response. No method has been found that reproduces the true curvature in a consistent and robust way. This design method has therefore been abandoned here.

*The iterative scheme for obtaining a PID design with T*_{i}*= 4T**d* is
*possible to use even if the data is noisy. However, the function T*_{i}*(T)*
plotted in Figure 4.21 is no longer guaranteed to be a smooth function
*if the raw spectral estimates are used when calculating h(*ω). This effect
is not so severe for low noise levels, but for σ = 0.1 it becomes more
prominent. Therefore, any kind of periodic or chaotic behavior can be
expected from the iteration. One example with a 2-periodic limit cycle is
shown in Figure 4.24. The discontinuous and non-monotonic shape of the
*function T**i**(T) can be explained by looking at the function h(*ω) for the
*modified plant. Figure 4.25 shows the function h*(ω) for the modified plant
*for different values of T with the noise level* σ = 0.1. The solutions ω0,
marked with crosses in the figure, will not be spread evenly due to the
*uncertainties in h*(ω*). For T 2.55 there will even be a discontinuity in*
the solutions around ω0 = 0.4 due to a non-monotonic h(ω). The errors
inω0 *carry over to T** _{i}* through Equations(4.23) and (4.24).

*The function h*(ω) must be smoothed in order to be used iteratively.

This may for example be done by low-pass filtering of the differentiated frequency response of the process. Using this technique, the iteration will produce consistent results, see Figure 4.26. This is very close to the ex-act iteration in Figure 4.21. The parameter values vary a few percents between different simulations. Figure 4.27 shows 20 simulations of set point and load disturbance responses on top of each other. The

varia-0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0.5

1 1.5 2 2.5 3 3.5

*T*
*T**i*

**Figure 4.24** Iterative PI design based on raw spectral estimates withσ = 0.1. In
this case the iteration converges to a 2-periodic limit cycle.

0.2 0.25 0.3 0.35 0.4 0.45 0.5

−2

−1.5

−1

−0.5 0 0.5 1 1.5 2 2.5 3

**Figure 4.25** *The estimated function h*(ω*) for the modified plant G*^{L}*(s) =*
*(Ts + 1) G(s), with T = 0,*0.25,0.5, . . .4.

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0.5

1 1.5 2 2.5 3 3.5 4

*T*
*T**i*

**Figure 4.26** Iterative PI design based on low-pass filtered derivatives of the
spec-tral estimates.

0 10 20 30 40 50 60 70 80 90 100

0 0.5 1 1.5

y

0 10 20 30 40 50 60 70 80 90 100

0 0.5 1 1.5

u

t

**Figure 4.27** *Simulations of PID control using iterative PI design for M**s*= 2 using
filtered spectral estimates. 20 different noise sequences withσ = 0.1 has been used
in the relay experiments. The load disturbance response is fairly consistent.

timated frequency response. No effort has been spent on improving this, since another method for fast set point changes is presented in Chapter 5.