Optimal PID Control in Discrete Time Using Sensitivity

0 downloads 0 Views 214KB Size Report
discrete-time PID control system, in which the reference or disturbance ... the proposed control system is optimized using a discrete- time PID ..... Tuning, 2nd ed.
23rd Mediterranean Conference on Control and Automation (MED) June 16-19, 2015. Torremolinos, Spain

Optimal PID Control in Discrete Time Using a Sensitivity Function Hiroshi Tajika, Takao Sato, Ramon Vilanova and Yasuo Konishi

Abstract— The present paper discusses the design of a discrete-time proportional-integral-derivative (PID) control system for a first-order plus dead-time model. The optimal parameters for the desired robustness of the PID control system are determined by using the maximum value of the sensitivity function. We optimized the load-disturbance or the set-point performance in order to achieve the specified robustness. Finally, the effectiveness of the proposed design method is demonstrated through a numerical simulation.

plant is assumed to be a first-order plus dead-time model, and the proposed control system is optimized using a discretetime PID control law. Since the gain and phase margins are guaranteed when using the maximum value of the sensitivity function, the proposed control system is robust to modeling errors and perturbations. II. CONTROL SYSTEM Consider the following first-order plus dead-time model:

I. INTRODUCTION Since proportional-integral-derivative (PID) control [1], [2], [3], [4] has a simple structure, the parameters are easy to understand. As such, PID control is widely used in industry. Its performance is determined by the choice of parameters, which can be tuned intuitively. However, determining the optimal parameters is difficult, and so numerous design methods have been proposed. Since stability is the most important factor in the design of control systems, it is important that performance should not be enhanced at the expense of stability. In the present study, we present a method for designing a PID control by using the maximum value of the sensitivity function [1], [5]; this approach explicitly includes robust stability. In conventional methods [5], [6], [7], the parameters are determined in continuous-time systems in such a way that the assigned robust stability is achieved, and the control performance is optimized by minimizing the integral absolute error (IAE). Most control systems are implemented using microprocessors, which operate in discrete time, and so the results are discrete-time systems. When a control law that is optimized in continuous time is implemented in a discretetime system, it must be converted into a discrete-time law. Hence, if a discrete-time controller is implemented, the converted system will no long be optimized in discrete time. In the present study, we propose a design method for a discrete-time PID control system, in which the reference or disturbance response is optimized in discrete time, and the gain and phase margins are ensured. As a result, an optimally designed control system can be implemented in a discretetime system without loss of performance due to conversion from continuous time. In the present study, the controlled H. Tajika, T. Sato and Y. Konishi are with Division of Mechanical System, Department of Mechanical Engineering, Graduate School of Engineering, University of Hyogo, 2167 Shosha, Himeji, Hyogo 671-2280, Japan {tsato,konishi} @eng.u-hyogo.ac.jp R. Vilanova is with the Department of Telecommunications and Systems Engineering, Universitat Aut`onoma de Barcelona, Edifici Q-Campus de la UAB, 08193 Bellaterra, Barcelona, Spain

[email protected]

978-1-4799-9935-4/15/$31.00 ©2015 IEEE

P (s) =

K e−Ls Ts + 1

(1)

where K is the gain, T is the time constant, and L is the dead-time. This model is often used as an approximation of the dynamics of a number of industrial processes [3]. In the present study, since the control input is determined using microprocessors, we have designed the digital control system to have a sampler and a holder. Therefore, instead of discussing (1), we will discuss a design method for a discrete-time PID control system that is based on a discretetime model, as follows: Pd (z −1 ) =

bz −1 z −d 1 − az −1

(2)

wherez −1 denotes the backward shift operator, and a, b, and d are expressed as follows: Ts

a = e− T

b = K(1 − e L d= Ts

(3) − TTs

)

(4) (5)

For simplicity, in continuous time, the dead time L is assumed to be an integer multiple of the sampling time T s . A digital velocity form of the PID control law [1] is given as follows: u(k) = Cr (z −1 )r(k) − Cy (z −1 )y(k) (6)   Ts Cr (z −1 ) = Kp 1 + (7) Ti (1 − z −1 )   Td (1 − z −1 ) Ts + (8) Cy (z −1 ) = Kp 1 + −1 Ti (1 − z ) Ts where u(k) is the control input, y(k) is the plant output, and r(k) is the reference input; K p is the proportional gain, T i is the integral time, and T d is the derivative time. In practice, a low-pass filter is often added to the derivative term, but for simplicity, this is not done here. The control system discussed in the present study is shown in Fig. 1, where d(k) denotes the disturbance.

268

r(k)

+

u(k)

-1

Cr(z )

d(k) +

normalized for the gain or the time: -1

y(k)

b Kp 1−a Ti loga τi = − Ts Td loga τd = − Ts

κp =

Pd(z )

+ -1

Cy(z )

Fig. 1: PID control system

III. EVALUATION CRITERIA As the evaluation criteria for the control system, the sum of the absolute errors (SAE) is defined as follows: Je =

∞ 

|e(k)|

(9)

k=0

e(k) = y(k) − r(k)

(10)

The stability is designed to be robust by using the maximum value of the sensitivity function, M s , which is defined as follows: Ms = max ω

1 |1 +

P (e−jω )Cy (e−jω )|

(11)

The actual robust stability is expressed in terms of the gain margin g m and the phase margin φ m ; the relationships between Ms and the terms g m and φm are as follows: gm ≥

Ms Ms − 1 

φm ≥ 2 arcsin

|Ms − Msd | = 0

Fig. 2 shows the values obtained for κ p , τi , and τd . The servo control performance was optimized with M sd = 2.0, d was set to be from 3.0 to 17 in increments of 1.0, and hence τ0 was set to be from 0.32 to 1.8. For the optimization, we used the MATLAB function fmincon 1 . In this figure, the optimal values with respect to τ 0 of κp , τi , and τd are plotted using the symbol ◦. In Fig. 2, the relationship between κ p and τ0 is approximated by (18), which is plotted as a solid line, where ai (i = 0, 1) are shown in Table I. This table shows the values of a i (i = 0, 1) optimized with respect to Msd = 1.4, 1.6, 1.8, and 2.0. Moreover, τ i and τd in Fig. 2 are also approximated by (19) and (20), respectively:

(13)

(14)

IV. DESIGN OF THE CONTROL SYSTEM The purpose of the present study is to obtain the optimal PID parameters for controlling the discrete-time system shown in Fig. 1. Although various optimal design methods for continuous time have been proposed [5], [6], [7], thus far, none of them have been optimized, due to the complexity of the problem, which requires optimization of the SAE (9) for a discrete-time plant (2), subject to constraint (14), in order to guarantee robust stability. In this section, we propose a design method for obtaining the optimal PID parameters for a discrete-time system. The optimal PID parameters are based on the normalized model associated with the dead-time and the time constant, using τ0 = −dloga. Furthermore, the PID parameters are

(17)

A. Servo control



Based on these relationships, the range of M s is recommended to be from 1.4 to 2.0 [1]. In the design of the proposed control system, M sd is assigned the desired value of M s , and the optimal PID parameters are obtained so that SAE is optimized, subject to the following constraint:

(16)

In order to obtain an optimal PID control system that achieves the assigned robustness, κ p , τi , and τd are determined for the normalized model such that (9) is numerically optimized subject to (14). In the present study, κ p , τi , and τd are optimized separately for the reference response (servo control) and the disturbance response (regulation control).

(12) 1 2Ms

(15)

κp = a0 τ0a1 τi = b0 + b1 τ0

(18) (19)

τd = c0 + c1 τ0

(20)

where bi and ci (i = 0, 1) are optimized with respect to Msd and are listed in Table I. Fig. 3 shows the relationships between the values of M s and τ0 for each assigned value of Msd . From this figure, we can obtain the optimal PID parameters calculated by using (18), (19), and (20), in which the constraint (14) is substantially satisfied. Therefore, using (15) through (20) with Table I, the PID parameters that optimize the servo control system are easily obtained without solving the constraint optimization problem. Hence, the assigned robust stability is also achieved by using the optimal PID parameters for the reference response. B. Regulation control For the case in which the disturbance rejection performance is optimized with M sd = 2.0, the optimal values of κ p , τi , and τd with respect to τ0 are plotted using the symbol ◦ in Fig. 4. Based on this figure, κ p , τi , and τd can be calculated using the following equations:

269

κp = a0 τ0a1 τi = b0 + b1 τ0 + τd = c0 + c1 τ0 1 Mathworks,

Inc.

(21) b2 τ02

(22) (23)

TABLE II: ai , bi , and ci (regulation mode) 2.5

Msd a0 a1 b0 b1 b2 c0 c1

2 1.9

2

1.8

1.6

τi

κp

1.7 1.5

1.5 1

1.4 1.3

0.5

0

0.5

1 τ0

1.5

2

0

0.5

1 τ0

1.5

2.0 1.01 −0.584 0.268 1.10 −0.221 0.0384 0.295

1.8 0.892 −0.581 0.328 0.882 −0.137 0.0586 0.282

1.6 0.746 −0.578 0.325 0.778 −0.125 0.0544 0.320

1.4 0.560 −0.578 0.417 0.496 −0.0143 0.0724 0.338

2

TABLE III: Msd and Ms (servo and regulation modes) Msd Ms (servo) Ms (regulation)

0.8 0.7 0.6

2.0 2.016 2.011

1.8 1.814 1.782

1.6 1.611 1.610

1.4 1.412 1.407

τd

0.5 0.4 0.3 0.2 0.1

0

0.5

1 τ

1.5

2

0

Fig. 2: Relationships between κ P , τi , τd , and τ0 in servo control (M sd = 2.0)

where ai , bj , and ci (i = 0, 1 and j = 0, 1, 2), optimized with respect to Msd = 1.4, 1.6, 1.8, and 2.0, are listed in Table II. From Fig. 5, we see that constraint (14) is substantially satisfied using (15), (16), (17), (21), (22), and (23) with Table II. Therefore, the optimal PID parameters for the disturbance response are easily calculated without solving the constraint optimization problem. Hence, using the obtained PID parameters, the disturbance response is optimized, and the assigned robust stability is achieved. V. NUMERICAL SIMULATION

d Ms

=1.4 2.2

2

2

1.8

1.8

Ms

2.2

M

s

d Ms

1.6

P (s) =

1 e−0.5s 0.95s + 1

1.4 0.5

1 τ0

1.5

0.5

Md =1.8

1 τ0 s

2

2

1.8

1.8

M

Ms

2.2

1.6

1.6

1.4

1.4 0.5

1 τ

1.5

0.5

0

1 τ

Pd (z −1 ) =

1.5

Md =2

s

2.2

(24)

The discrete-time model of (24) is obtained using T s = 0.1 s:

1.6

1.4

s

Consider the following continuous-time model:

=1.6

1.5

0

Fig. 3: Relationships between M s and τ0 in servo control

0.1z −1 z −5 1 − 0.9z −1

(25)

The proposed method is applied to a controlled plant, and its effectiveness is demonstrated. The obtained maximum values of the sensitivity function are shown in Section V-A. The control results obtained using the PID parameters optimized with respect to the reference and disturbance responses are compared in Section V-B. Section V-C shows that the assigned stability margin can be achieved using the proposed method. The control results obtained using the continuoustime and proposed discrete-time methods are compared in Section V-D. A. Obtained Maximum Value of the Sensitivity Function

TABLE I: ai , bi , and ci (servo mode)

Msd a0 a1 b0 b1 c0 c1

2.0 0.997 −0.642 1.154 0.430 0.0144 0.349

1.8 0.909 −0.625 1.11 0.379 0.0285 0.288

1.6 0.762 −0.623 1.01 0.349 −0.0033 0.268

1.4 0.577 −0.615 0.926 0.237 −0.0312 0.349

The desired maximum value of the sensitivity function (Msd ) and its actual value (M s ) are shown in Table III. This table shows that the obtained value of M s is close to its assigned value of M sd , and so the desired robustness can be achieved using the proposed method. B. Control Performance The reference and disturbance responses in discrete time were confirmed in both the servo and regulation modes. In the design of the proposed control system, M sd was set to 2.0, the reference input was given as a unit step function,

270

and a step-type disturbance with amplitude 0.5 was added after step 100. The output and input responses in the servo and regulation modes are shown in Fig. 6. In the servo mode (solid line), the plant output converges to the reference input more quickly than it does in the regulation mode (dashed line). However, after step 100, the plant output deteriorates due to the disturbance. On the other hand, in the regulation mode, the influence of the disturbance can be reduced to a greater degree than in the servo mode after step 100, although its reference response is inferior to that of the servo mode. Therefore, the reference response is optimized in the servo mode, and the disturbance response is optimized in the regulation mode. C. Design of Robustness In order to confirm that the proposed method is robustly stable to modeling errors, M sd was set to be 1.4 and 2.0, and two PID controllers were designed using the proposed method. Fig. 7 shows the results obtained when using PID controllers that were designed based on (25), but the actual plant expressed in continuous time is 2.0 e−0.5s (26) P˜ (s) = 0.95s + 1 In this case, the discrete time model with T s = 0.1 s is 0.2z −1 P˜d (z −1 ) = z −5 (27) 1 − 0.9z −1 Based on (12) and (13), the robustness of the controller obtained using M sd = 1.4 is superior to that obtained using Msd = 2.0. The transient responses of M sd = 2.0 and Msd = 1.4 are plotted as solid and dashed lines, respectively. From this figure, we can see that the output response of Msd = 2.0 deteriorated due to the gain perturbation. On the other hand, the output response of M sd = 1.4 converges stably to the reference input. Moreover, the input response of Msd = 1.4, shown in the lower panel, does not oscillate. As a result, the robustness of the proposed method can be adjusted by changing M sd . D. Comparison with the Continuous-time Method The proposed design method in discrete time was compared with the conventional continuous-time method based on [6]. The continuous-time controller used in this simulation was     1 1 + Td s y(s) u(s) = Kp 1 + r(s) − Kp 1 + Ti s Ti s (28) A step-type disturbance with amplitude 0.5 was added after step 75 (7.5 s). Moreover, after step 150 (15 s), the controlled plant (24) was perturbed to the following model: 1.7 e−0.5s P˜˜ (s) = (29) 0.95s + 1 In this case, the discrete-time model can be expressed as follows: −1 ˜d (z −1 ) = 0.17z P˜ z −5 (30) 1 − 0.9z −1

1) Determining the PID parameters: M sd is set to 2.0, and the conventional and proposed servo-type discrete-time PID controllers were designed based on (24) and (25), respectively. The optimal PID parameters for the continuoustime plant were determined to be K p = 1.85, Ti = 1.44, and Td = 0.19, and those of the discrete-time plant were determined to be K p = 1.50, Ti = 1.31, and Td = 0.18. 2) Continuous-time system: Fig. 8 shows that this control system results in continuous time using both the continuousand discrete-time methods. In this figure, the results when using the continuous-time controller are plotted as a solid line. This controller is optimized for the continuous-time plant. For this reason, both the reference and disturbance responses are well controlled. Moreover, the obtained value of Ms is 2.01, which is close to the assigned value. The control result in continuous time when using the discretetime controller with the zero-order hold is indicated by a dashed line, and the response was not seen to deteriorate. The obtained value of M s was 2.01. 3) Discrete-time system: The control results in discrete time when using both the continuous and discrete time methods are shown in Fig. 9. In order to utilize the conventional continuous-time method, the continuous-time PID controller based on the continuous-time model of (25) was converted to a discrete-time controller with T s = 0.1. The output response obtained using the continuous-time method is indicated by a solid line, and it is stable when the plant is not perturbed, although the overshoot is large. However, after step 150, the output response deteriorates. In the continuous-time method, the obtained value of M s is close to 2.0 in the continuoustime system, but it becomes 2.75 in the discrete-time system. Thus, the assigned stable margin cannot be achieved due to the discretization error. On the other hand, the output response obtained using the proposed discrete-time method, indicated by a dashed line, shows that the overshoot is reduced compared to the continuous-time method, and the output response stably converges to the reference input, even if the plant is perturbed after step 150. Since the value of M s in the proposed method is 2.01, the stable margin is sufficient for the perturbed model. These results confirm the effectiveness of the proposed design method in discrete time. VI. CONCLUSIONS In the present study, we presented a design method for a PID control system in which the desired level of robustness can be achieved, and the reference or disturbance response is optimized. In conventional methods, such a control system has been designed in continuous time. However, when a PID controller optimized in continuous time converges to a discrete-time system, the obtained control system deteriorates due to discretization error. In the present study, we have proposed a design method of a PID control system in discrete time because many control systems are implemented using digital computers. The desired level of performance can be guaranteed using our proposed method.

271

In the proposed method, constraints on the input were not considered, and thus, in our future work, we intend to optimize the control system subject to input constraints.

κp

2

1.8

1.8

1.6

1.6

1.4

1.4

1.2 τi

VII. ACKNOWLEDGMENTS The present study was supported by JSPS Grant-in-Aid for Young Scientists (B) Grant Number 25820186. Partially support from the Spanish Ministry of Economy and Competitiveness program under grant DPI2013-47825C3-1-R is also appreciated.

1.2

1

1

0.8

0.8

R EFERENCES

1 τ

1.5

2

0.5

τd

0.4 0.3 0.2 0.1

0

0.5

2

Fig. 4: Relationships between κ p , τi , τd , and τ0 in regulation control (M sd = 2.0)

d

d

Ms =1.4

Ms =1.6 2.2

2

2

1.8

1.8

s

2.2

M

[7]

1.5

0.5

0

1.6

1.6

1.4

1.4 0.5

1 τ

1.5

0.5

0

1 τ

1.5

0

Md =1.8

Md =2

s

s

2.2

2.2

2

2

1.8

1.8

s

[6]

1 τ0

0

M

[5]

0.4

2

0.6

s

[4]

1.5

M

[3]

1 τ

0

s

[2]

˚ om and T. H¨agglund, PID Controllers: Theory, Design and K. J. Astr¨ Tuning, 2nd ed. Research Triangle Park, USA: Instrument Society of America, 1995. M. A. Johnson and M. H. Moradi, Eds., PID Control: New Identification and Design Methods. London, UK: Springer-Verlag, 2005. ˚ om and T. H¨agglund, Advanced PID Control. InstrumentaK. J. Astr¨ tion, Systems, and Automation Society, 2006. R. Vilanova and A. Visioli, Eds., PID Control in the Third Millennium. London, UK: Springer, 2012. V. Alfaro, R. Vilanova, V. M´endez, and J. Lafuente, “Performance/robustness tradeoff analysis of PI/PID servo and regulatory control systems,” in 2010 IEEE International Conference on Industrial Technology (ICIT), March 2010, pp. 111–116. O. Arrieta and R. Vilanova, “Simple PID tuning rules with guaranteed ms robustness achievement,” in Preprints of the 18th IFAC World Congress, Milano, 2011, pp. 12 042–12 046. V. Alfaro and R. Vilanova, “Optimal robust tuning for 1DOF PI/PID control unifying fopdt/sopdt models,” in IFAC conference on Advances in PID Control, Brescia, Italy, March 2012, p. FrA2.2.

0.5

M

[1]

0.6 0

1.6

1.6

1.4

1.4 0.5

1 τ

0

1.5

0.5

1 τ

1.5

0

Fig. 5: Relationships between M s and τ0 in regulation control

272

1.5

2 servo mode regulation mode

1.5 output

output

1

1

0.5

0.5 continuous−time controller discrete−time controller 0

0

20

40

60

80

100 step

120

140

160

180

0

200

3

1

−1 −2

60

80

100 step

120

140

160

180

200

Fig. 6: Output and input responses using the proposed method in both servo and regulation modes (M sd = 2.0)

2

25

30

15 time

20

25

30

continuous−time controller discrete−time controller 0

5

10

Fig. 8: Output and input responses of the continuous-time plant using the continuous-time and discrete-time controllers

Md = 2.0

2.5

Md = 1.4

2

continuous−time controller discrete−time controller

s s

1.5

20

0

0.5

40

15 time

1

input

input

1.5

20

10

2

2

0

5

3

servo mode regulation mode

2.5

0

output

output

1.5

1

1 0.5

0.5 0

0

0

10

20

30

40

50 step

60

70

80

3

90

−0.5

100

2

50

100

150 step

200

250

300

150 step

200

250

300

3

Md = 2.0 s Md s

0

2

= 1.4

input

input

1

1 0 −1 −2

0 continuous−time controller discrete−time controller

−1 −2 −3

0

10

20

30

40

50 step

60

70

80

90

100

Fig. 7: Output and input responses using the proposed method with a modeling error

0

50

100

Fig. 9: Output and input responses of the discrete-time plant using the continuous-time and discrete-time controllers

273

Suggest Documents