<<

Systems

Lecture 7 - Quality of and PID Controller Tuning

Jakub Mozaryn

Institute of Automatic Control and Robotics, Department of Mechatronics, WUT

Warszawa, 2019

Jakub Mozaryn Automation Systems Quality of the control system

Apart from the most important requirement of asymptotic stability, there are imposed additional requirements on control systems, concer- ning the transient (dynamic) response and steady states. They are generally referred to as quality requirements of the control system.

The requirements related to the steady state are formulated by determining the so-called static accuracy of the control system - permissible values of deviations of the system output from the set point in steady states (steady state errors) in the case of disturbances or setpoint changes.

Requirements related to the transient response in the control systems are determined by a number of indices, generally called dynamic quality in- dices of the control system.

Jakub Mozaryn Automation Systems Quality of the control system

The task of the control system is to minimize the deviation from the setpoint (when the time approaches infinity) described as an error in steady state: e(t) = ez (t) + ew (t), (1) where

ez (t) - error caused by disturbance,

ew (t) - error caused by change of the set point.

Jakub Mozaryn Automation Systems Quality of the control system

When rating the quality of the control LTI system, because of the superposition property, both components of the steady state error e(t) = ez (t) + ew (t), can be analyzed separately.

Jakub Mozaryn Automation Systems Steady state error caused by disturbance

Transfer function

∆ym(s) ez (s) ±Gz (s)Gob(s) Gz (s) = = = (2) z(s) z(s) 1 + Gob(s)Gr (s)

±Gz (s)Gob(s) ez (s) = ∆ym(s) = · z(s) (3) 1 + Gob(s)Gr (s) Steady state error caused by disturbance

ezst. = lim ez (t) = lim s · ez (s) (4) t→∞ s→0

±Gz (s)Gob(s) ezst. = lim s · · z(s) (5) s→0 1 + Gob(s)Gr (s)

Jakub Mozaryn Automation Systems Steady state error caused by change of the set point

Jakub Mozaryn Automation Systems Steady state error caused by change of the set point

Jakub Mozaryn Automation Systems Steady state error caused by change of the set point

Transfer function

ew (s) −1 Gew (s) = = (6) ∆w(s) 1 + Gob(s)Gr (s) −1 ew (s) = ∆w(s) (7) 1 + Gob(s)Gr (s) Steady state error caused by change of the set point

ewst. = lim ew (t) = lim s · ew (s) (8) t→∞ s→0 −1 ewst. = lim s · ∆w(s) (9) s→0 1 + Gob(s)Gr (s)

Jakub Mozaryn Automation Systems Steady state error - example

Determine the steady state error of the control system shown in the figure, caused by a step change of disturbances z(t) = 2 and a step change of the setpoint ∆w(t) = 5. Assume, that in the control system there is used: P controller, PD controller, PI controller.

Jakub Mozaryn Automation Systems Steady state error - example

Transfer function k G (s) = ob (10) ob (Ts + 1)4 P controller Gr (s) = kp (11) PD controller Gr (s) = kp(1 + Td s) (12) PI controller  1  Gr (s) = kp 1 + (13) Ti s Disturbance 2 z(t) = 2 → z(s) = (14) s Change of the set point 5 ∆w(t) = 5 → ∆w(s) = (15) s

Jakub Mozaryn Automation Systems Steady state error caused by the disturbance - example, P controller

Gob(s) ezst. = lim ez (t) = lim s z(s) (16) t→∞ s→0 1 + Gob(s)Gr (s) P controller

Gob(s) 2 ezst.P = lims→0 s = 1 + Gob(s)Gr (s) s kob 4 (17) (Ts + 1) · 2 kob · 2 lims→0 = lims→0 kob (Ts + 1)4 + k · k 1 + k ob p (Ts + 1)4 p

Steady state error caused by the disturbance - P controller

kob · 2 ezst.P = (18) 1 + kobkp

Jakub Mozaryn Automation Systems Steady state error caused by the disturbance - example, PD controller

Gob(s) ezst. = lim ez (t) = lim s z(s) (19) t→∞ s→0 1 + Gob(s)Gr (s) PD controller

kob (Ts + 1)4 · 2 e = lim = zst.PD s→0 k 1 + ob k (1 + T s) (20) (Ts + 1)4 p d kob · 2 = lims→0 4 (Ts + 1) + kob · kp(1 + Td s)

Steady state error caused by the disturbance - PD controller

kob · 2 ezst.PD = (21) 1 + kobkp

Jakub Mozaryn Automation Systems Steady state error caused by the disturbance - example, PI controller

Gob(s) ezst. = lim ez (t) = lim s z(s) (22) t→∞ s→0 1 + Gob(s)Gr (s) PI controller

kob (Ts + 1)4 · 2 ezst.PI = lims→0 = kob 1 1 + 4 kp(1 + ) (Ts + 1) Ti s (23) kob · 2 = lims→0 = 0 4 1 (Ts + 1) + kob · kp(1 + ) Ti s

Steady state error caused by the disturbance - PI controller

ezst.PI = 0 (24)

Jakub Mozaryn Automation Systems Steady state error caused by the disturbance - summary

P controller

kob · 2 ezst.P = (25) 1 + kobkp

PD controller

kob · 2 ezst.PD = (26) 1 + kobkp

PI controller

ezst.PI = 0 (27)

Jakub Mozaryn Automation Systems Steady state error caused by change of the set point - example, P controller

−1 ewst. = lim ez (t) = lim s ∆w(s) (28) t→∞ s→0 1 + Gob(s)Gr (s) P controller −1 5 −5 −5 ewst.P = lim s = lim = s→0 1 + G (s)k s s→0 kob 1 + k k ob p 1 + k ob p (Ts + 1)4 p (29)

Steady state error caused by change of the set point - P controller −5 ewst.P = (30) 1 + kobkp

Jakub Mozaryn Automation Systems Steady state error caused by change of the set point - example, PD controller

−1 ewst. = lim ez (t) = lim s ∆w(s) (31) t→∞ s→0 1 + Gob(s)Gr (s) PD controller −1 5 ewst.PD = lims→0 s 1 + Gob(s)kp(1 + Td s) s −5 −5 (32) = lims→0 = kob 1 + k k 1 + k (1 + T s) ob p (Ts + 1)4 p d

Steady state error caused by change of the set point - PD controller −5 ewst.PD = (33) 1 + kobkp

Jakub Mozaryn Automation Systems Steady state error caused by change of the set point - example, PI controller

−1 ewst. = lim ez (t) = lim s ∆w(s) (34) t→∞ s→0 1 + Gob(s)Gr (s) PI controller −1 5 e = lim s wst.PI s→0  1  s 1 + Gob(s)kp 1 + Ti s −5 (35) = lims→0   = 0 kob 1 1 + 4 kp 1 + (Ts + 1) Ti s

Steady state error caused by change of the set point - PI controller

ewst.PI = 0 (36)

Jakub Mozaryn Automation Systems Steady state error caused by change of the set point - summary

P controller −5 ewst.P = (37) 1 + kobkp

PD controller −5 ewst.PD = (38) 1 + kobkp

PI controller

ewst.PI = 0 (39)

Jakub Mozaryn Automation Systems Conclusions about steady state errors

In a control system with a static object and P or PD control algorithm there are non-zero steady state errors in relation to the disturbances or setpoint changes respectively. Increasing the proportional gain of the P or PD controller reduces the value of static error. Reducing the static deviation by increasing the gain kp is usually limited due to the stability of the system. (The system with PD controller reaches the border of stability at a higher gain than in the case of the regulator P). action in the controller (PI, PID) provides zero steady state errors in relation to the disturbances or setpoint changes respectively.

Jakub Mozaryn Automation Systems Dynamical quality of control system

Requirements related to the transient response in the control systems are determined by a number of indices, generally called dynamic performance quality indicies of the control system. Groups of such indices are: transient response indices, indices descibing the frequency plots of the control system - magnitude and phase margins, integral indices.

Jakub Mozaryn Automation Systems Transient response indices

To evaluate the transient response following indices are used:

Maximum error (dynamical): em - the maximum value of error after the step change of disturbance or setpoint.

Settling time: tr - it is the time between the moment of change of the set point w(t), or introduction of disturbances z(t) , and the moment when the error e(t) reaches a fixed value inside a boundary ∆e(t) (eg.∆e(t) = |0.05emax |). :

e2 κ = · 100% (40) e1

where e1 and e2 are the first 2 consecutive biggest errors with opposite signs, assuming steady state value of output y(t) after transient response as the zero level (baseline).

Jakub Mozaryn Automation Systems Oscillatory transient response - disturbances

Rysunek: Oscillatory transient response of the control system to disturbances: a) with non-zero steady state error, b) with zero steady state error

Jakub Mozaryn Automation Systems Aperiodic transient response - disturbances

Rysunek: Aperiodic transient response of the control system to disturbances: a) with non-zero steady state error, b) with zero steady state error

Jakub Mozaryn Automation Systems Oscillatory transient response - setpoint

Rysunek: Oscillatory transient response of the control system to setpoint change: a) with non-zero steady state error, b) with zero steady state error

Jakub Mozaryn Automation Systems Aperiodic transient response - setpoint

Rysunek: Aperiodic transient response of the control system to setpoint change: a) with non-zero steady state error, b) with zero steady state error

Jakub Mozaryn Automation Systems Selection of controllers

The basic premise when choosing the type of controller is dynamic cha- racteristics of the controlled process.

Rysunek: Control system

Basic equations, describing the properties of the controlled processes

∆y (s) k ∆y (s) 1 m ob −T0s m −T0s Gob(s) = = e , Gob(s) = = e ∆u(s) Tz s + 1 ∆u(s) Tz s

Jakub Mozaryn Automation Systems Selection of controllers

T for 0 < 0, 1 ÷ 0, 2 → - switch controllers (two- three- gain Tz controllers), T for 0, 1 ¬ 0 < 0, 7 ÷ 1 ÷ 0, 2 → continuous controllers, Tz T dla 0 > 1 → impulse controllers (impulse output signals). Tz T In the case of industrial processes common ratio of 0 is in the range of Tz 0, 2 ÷ 0, 7. Therefore, in industrial control systems the most common controllers are continuous, with typical control algorithms P, PI, PD and PID.

Jakub Mozaryn Automation Systems Selection of controllers

An analysis of the controller algorithm with the process model leads to the following conclusions concerning the selection of the control algorithm: PI algorithm provides good control only for the low frequencies of setpoint changes or disturbancs. Integral action is necessary to obtain zero error in steady state. PI algorithm provides wider bandwidth than PID algorithm, but poorer performance for the low frequencies of setpoint changes or disturbances. Derivative action is recommended for objects with higher order lag (such as thermal processes), because it allows the strong interaction of control even at small deviations. PD controller does not ensure the achievement of zero deviation in steady state . PID algorithm merges to a certain extent the advantages of PI and PD algorithms.

Jakub Mozaryn Automation Systems Selection of controllers

In practice, industrial controllers with the continuous algorithm are com- monly used. Their parameters (settings) can be changed (adjusted) within a wide range, so they can control properly processes with different dyna- mical properties.

Depending on the requirements of the stability and quality, the con- troller settings are selected using different selection procedures. There are following settings of PID controller:

proportional gain kp = 0, 1 ÷ 100

integral gain Ti = 0, 1 ÷ 3600s

derrivative gain Td = 0 ÷ 3600s

Jakub Mozaryn Automation Systems Selection of controllers

Methods of PID controllers tuning: Experimental methods - usually do not allow to achieve certain quality of the control system, eg. Ziegler – Nichols, Pessen, Hassen and Offereissen, Cohen-Coon, Astr¨ ¨om – Hagglund . Tabular methods - determining the set of controller parameters based on the parameters of a mathematical model of the controlled process and the required quality criterion of the control system (like the smallest overshoot, shortest settling time. Problem: often the minimization of different quality indices base on the contrary requirements). Autotuning, eg. relay method.

Jakub Mozaryn Automation Systems Tuning of the controllers

Ziegler-Nichols method

Type 1: controller settings are selected on the basis of the parameters of the closed-loop control system, brought to the border of stability (by experimental excitation of the system). It can be used to controller tuning in the control systems where processes are described by static and astatic, higher order lag elements. Type 2: It can be used to controller tuning in the control systems where processes are described by static higher order lag elements, controller settings are selected based on the transient response of the controlled process.

Jakub Mozaryn Automation Systems Ziegler-Nichols method

Rysunek: Functional scheme of real control system

Jakub Mozaryn Automation Systems Ziegler-Nichols method, steps 1-3 / 6

Step 1: In the manual mode (M) by changing control variable (CV), adjust the process variable ym (PV) to a state in which it is equal with the required setpoint Step 2: Set the controller to the proportional action (switch off integral and derivative actions), set the operation point control value of the controller equal to the setting obtained in Step 1 and set the initial value of the controller gain kp > 0. Step 3: Switch the system to automatic control (A) and if the system maintains equilibrium, by changing SP produce an impulse with some amplitude and pulse duration depending on the expected dynamics of the process; observe or record the change in the controlled variable. It is recommended to use a pulse with the amplitude of 10 % of the process value changes ym (PV) and the pulse duration of about 10 % of the estimated value of the time constant of the controlled process.

Jakub Mozaryn Automation Systems Ziegler-Nichols method, steps 4-5 / 6

Step 4: If the transient response is underdamped, set higher values of the proportional gain (Steps 1-3) until the system be on the border of stability (constant oscillations). Step 5: From the steady oscillations read ’critical’ proportional gain kpkryt. and oscillation period Tosc. Step 6: Set the patameters according to the table of setings developed by Ziegler-Nichols.

Rysunek: Changes of the process variable (PV) obtained during Ziegler – Nichols experiment

Jakub Mozaryn Automation Systems Ziegler-Nichols method

PID controller setting according to Ziegler-Nichols Controller type kp Ti Td P 0, 50kpkryt. - - PI 0, 45kpkryt. 0, 8Tosc • PID 0, 60kpkryt. 0, 5Tosc 0, 12Tosc

Jakub Mozaryn Automation Systems Automation Systems

Lecture 7 - Quality of Control System and PID Controller Tuning

Jakub Mozaryn

Institute of Automatic Control and Robotics, Department of Mechatronics, WUT

Warszawa, 2019

Jakub Mozaryn Automation Systems