Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Table of Contents
1 Introduction......................................................................................................... 4
1.1 1.2 1.3 System requirements ................................................................................................................ 4 Installation ................................................................................................................................. 4 Contact ...................................................................................................................................... 4
2 3
How to use the library ........................................................................................ 5 Common controllers parts and parameters ..................................................... 6
3.1 3.2 3.3 On-line identification methods................................................................................................... 6 Computation of ultimate gain and period .................................................................................. 8 List of common controllers parameters..................................................................................... 9
Controllers reference........................................................................................ 10
4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14 4.15 4.16 4.17 4.18 4.19 4.20 4.21 4.22 4.23 4.24 4.25 4.26 4.27 4.28 zn2fr ........................................................................................................................................ 15 zn2br ....................................................................................................................................... 16 zn2tr ........................................................................................................................................ 17 zn2pd....................................................................................................................................... 18 zn2pi........................................................................................................................................ 19 zn2fd........................................................................................................................................ 20 zn2tak...................................................................................................................................... 22 zn2ast...................................................................................................................................... 23 zn2fpd...................................................................................................................................... 24 ba2 .......................................................................................................................................... 25 da2 .......................................................................................................................................... 26 pp2a_1 .................................................................................................................................... 27 pp2a_2 .................................................................................................................................... 29 pp2b_1 .................................................................................................................................... 31 pp2b_2 .................................................................................................................................... 33 db2w........................................................................................................................................ 35 db2s......................................................................................................................................... 36 mv2.......................................................................................................................................... 37 pp2chp..................................................................................................................................... 38 pp2lq........................................................................................................................................ 40 pp2c2dof.................................................................................................................................. 42 zn3fr ........................................................................................................................................ 44 zn3br ....................................................................................................................................... 45 zn3tr ........................................................................................................................................ 46 zn3pd....................................................................................................................................... 47 zn3pi........................................................................................................................................ 48 zn3fd........................................................................................................................................ 49 zn3tak...................................................................................................................................... 51
Self-tuning Controller Simulink Library 4.29 4.30 4.31 4.32 4.33 4.34
1.1
System requirements
The library has been designed under Matlab Release 12.1 (version 6.1) and Simulink version 4.1. For minimum and recommended system configuration see installation guide for Matlab. It is also possible to port the library to be used in previous versions of Simulink and Matlab, but in this case some functional limitations can occur. Dialog boxes used in library requires screen resolution at least 800x600 pixels.
1.2
Installation
Self-tuning controllers Simulink library is available in two versions: stcsl_std.zip the standard version using the Matlab programming language (m-files) stcsl_rtw.zip the version to be used with Real Time Workshop, using C language functions To install the library simply unzip the appropriate file to an empty folder (for example using Winzip or pkunzip) and than add this folder to the matlab path. There are several possible approaches of adding a folder to the Matlab path (for example you can use path command), but the simplest way is to use the Set Path dialog, which can be accessed through the File menu.
1.3
Contact
Prof. Ing. Vladimir Bobal CSc. (bobal@ft.utb.cz) Ing. Petr Chalupa (chalupa@ft.utb.cz) Department of Control Theory Institute of Information Technologies Tomas Bata University in Zlin Mostni 5139 760 01 Zlin Czech Republic
Reference value w The controller outputs are: Current action value u Vector of current parameter estimations of controlled process Input u_in should be as close as possible to actual control value (input to control process) to get the most appropriate results of the process identification. In simplest case this input is directly connected to controller output u. This situation is shows in following model:
figure 1 Usually there are some limitations of action value in industrial applications and thus computed action value is not the same as input to the process. This situation is shown in sample model circuit.mdl in figure 2.
figure 2 To use blocks in your own Simulink models just copy the block from library into your model (for example using drag and drop operation), connect appropriate input and output signals, set block parameters (for example by double-clicking on block) and than you can start simulation. It is also possible to start with sample model circuit.mdl and modify it to represent process you want to simulate. Controller parameters can be divided into two groups: the parameters common to all blocks and the controller-specific parameters. These two groups will be discussed in following two chapters.
3.1
This section describes methods used in the library for an on-line process identification. You can select one of three offered methods: Least squares method (LSM), LSM with exponential forgetting and LSM with adaptive directional forgetting. All these methods can be used for the discrete on-line identification of processes that are described by the following transfer function:
G (z) =
B ( z 1 ) A ( z 1 )
b1 z 1 + b2 z 2 + ... + bm z m d z 1 + a1 z 1 + a2 z 2 + ... + an z n
(1)
The estimated output of the process in step k ( y k ) is computed on base of the previous process inputs u
and outputs y according to the equation (2):
y k = a1 y k 1 ... an y k n +b u + ... + b u
1 k d 1 m
(2)
k d m
where a1 , ..., an , b1 , ..., bm are the current estimations of process parameters. This equation can be also
written in vector form, which is more suitable for further work - see equation (3).
T y k = k 1 k
k 1 = a1 ,..., a n , b1 ,..., bm
k = [ y k 1 ,..., y k n , u k d 1 ,..., u k d m ]
T T
(3)
The vector k 1 contains the process parameter estimations computed in previous step and the vector
contains output and input values for computation of current output yk. This vectors record is used in description of individual identification methods in further sections. Recursive least square method (LSM) Least square methods are based on minimisation of the sum of prediction errors squares:
T J k = y i k i i =1 k
(4)
this equation leads to the recursive version of least square method where vector of parameters estimations is updated in each step according to equation (5):
k = k 1 +
C k 1 k T y k k 1 k T 1 + k C k 1 k
(5)
The covariance matrix C is then updated in each step as defined by the equation (6):
C k = C k 1
T C k 1 k k C k 1 T 1 + k C k 1 k
(6)
Initial value of matrix C determines influence of initial parameter estimations to the identification process.
LSM with exponential forgetting The main disadvantage of this pure recursive least square method is an absence of signal weighting. Each input and output affect result by the same weight, but actual process parameters can change in time. Thus newer inputs and outputs should affect output more than older values. This problem can be solved by exponential forgetting method, which uses forgetting coefficient and decreases the weights of the data in previous steps. Weights k-i are assigned to values ui and yi. Parameter estimations are computed according to following equations:
k = k 1 +
C k 1 k T y k k 1 k T + k C k 1 k
(7)
Ck =
C T C k 1 1 C k 1 k 1 Tk k + k C k 1 k
(8)
LSM with adaptive directional forgetting The exponential forgetting method can be further improved by adaptive directional forgetting which changes forgetting coefficient with respect to changes of input and output signal. Process parameters are updated using recursive equation:
k = k 1 +
where
C k 1 k T y k k 1 k 1+
(9)
T = k C k 1 k
(10)
(11)
where
= k 1
Forgetting coefficient is updated as follows:
1 k 1
(12)
k =
( + 1) 1 + (1 + )ln (1 + ) + k 1 1 + + 1 +
(13)
where
k = k 1 ( k 1 + 1)
(14) (15)
(y =
T k 1 k )
T y k 1 k = k 1 k 1 + k k 1+
(16)
All described on-line identification methods are realized in s-function sid where further details can be found. See help text for this function (type help sid in Matlab command prompt) or study the code of sid.m or sid.c.
3.2
Self-tuning controllers based on Ziegler-Nichols method needs to know process ultimate gain and period in each step and these parameters must be calculated in each step. The basic idea of this calculation is to find feedback gain to reach stability border of closed loop. For process transfer function defined by equation (1), the characteristic equation of closed loop is:
A( z) + Kp B ( z) = 0
(17)
where
K p is feedback gain.
When the closed system is on the stability border, one or more roots of its characteristic equation are on stability border and the other roots are stable. In complex variable z, the stable region is the inner of unit circle, the stability border is unit circle and rest is unstable region. The ultimate root z=1 must be omitted in calculation because this is asymptotic stability border and thus ultimate period cannot be calculated. The are two possible types of roots positions when calculating ultimate gain and ultimate period: Two complex conjugated roots on unit circle and other roots are not unstable Root z = -1 and other roots are not unstable The algorithm of computation ultimate gain and ultimate period is placed in file ultim.m or ultim.c. For further details see help of this file (type help ultim in Matlab command prompt) or study the code.
3.3
Following controller parameters are common to all self-tuning controllers in the library. The common parameters are: Sample time T0, Identification type, ID Initial parameters estimations, ID Initial covariance matrix C, ID Initial phi (forgetting coefficient), ID Initial lambda, ID Initial rho and ID Initial nu The table bellow contains a short description of each of these parameters. Group Parameter Sample time T0 Description Defines sample time of self-tuning controller. This value is used for both parts of controller: process identification and calculation of action value You can select from following on-line identification methods: Least squares method (LSM) The simplest method where all process input-output pairs affect identified parameters with the same weight. Identification type LSM with exponential forgetting The newest process input-output pairs affect identified parameters more than older pairs. This method can be used for systems with time varying parameters. LSM with adaptive directional forgetting The most sophisticated method, the weight of current process input-output pair is determined with respect to changes of input and output signal. This method is useful for systems with time varying parameters. Initial process parameter estimation used by on-line identification. This is a ID Initial column vector of parameters in the form [a1; a2; b1; b2] for most second order parameters controllers, [a1; a2; b1] for Dahlins controller and [a1; a2; a3; b1; b2; b3] for third estimations order systems. Details are given in description of individual controller in next chapter. On-line Recursive Identification Initial value of the covariance matrix used in on-line identification process. This must be a square positive definite matrix with dimension the same as number of ID Initial identified parameters. covariance Usually a diagonal matrix is used in the form G*I, where I is identity matrix and G matrix C is gain. The gain than determines the influence of initial parameter estimations to the identification process: the greater gain, the smaller influence of initial estimations. Initial value of forgetting coefficient used in on-line identification of controlled process. This parameter is used only if Identification type is LSM with exponential forgetting or LSM with adaptive directional forgetting and phi should be in range 0 < 1 When LSM with exponential forgetting is used, this parameter determines the forgetting rate of older process input-output pairs: the smaller , the smaller influence of older pairs to the current parameter estimations. When LSM with adaptive directional forgetting is used, then is changing during identification process according to process of input (u) and output (y) values Initial value of parameter used in on-line identification of controlled process. This parameter is used only if Identification type is LSM with adaptive directional forgetting. Initial value of parameter used in on-line identification of controlled process. This parameter is used only if Identification type is LSM with adaptive directional forgetting. Initial value of parameter used in on-line identification of controlled process. This parameter is used only if Identification type is LSM with adaptive directional forgetting.
ID Initial lambda
ID Initial rho
ID Initial nu
10
4 Controllers reference
This chapter describes individual self-tuning controllers included in the library and their parameters. The library contains 29 self-tuning controllers: 18 of them are designed to control second order processes and remaining 11 are designed to control third order processes. Each self-tuning controller can be divided into three parts: On-line identification Recursive identification using least squares method on base of parameters described in previous chapter. This block is realized by Simulink s-function sid and to get more detailed help type help sid in matlab command prompt. Calculation of controller parameters The main function of each controller used to compute coefficients of control law on base of identified process parameters and controller-specific parameters. This function is specific to each controller. The function name is the same as controller name thus to get detailed help of each function use Matlab help command (e.g. help ba2). Calculation of output (action value) This block computes controller output (action value) on base of reference value, process output and coefficients computed by previous block. There are 4 sfunctions which realizes the computation for different controllers: scqp used for feed-back controllers ba2, da2, pp2a_1, pp2a_2, zn2br, zn2fd, zn2fr, zn2pi, zn2tr, zn3br, zn3fd, zn3fr, zn3pi and zn3tr; scrqp used for feed-back feed-forward controllers db2s, db2w, mv2, pp2b_1, pp2b_2, zn2pd, zn2tak, db3s, db3w, zn3pd and zn3tak; scast used for Astroms controllers zn2ast and zn3ast scfpd used for four point difference controllers zn2fpd and zn3fpd. scfbfw used for 2DOF controllers pp2chp, pp3chp and pp2lq To get detailed help of these s-functions use help command in Matlab command prompt (e.g. help scqp) The structure of all controller names is as follows: xxnyyyy, where xx - controller type, n = 2 or 3 process model order and yyyy - controller further details. The library consists of following self-tuning controllers (their parameters are described in following sections): Contr. No. 1 zn2fr zn3fr Controller algorithm
u ( k ) = q0 e ( k ) + q1 e ( k 1) + q2 e ( k 2 ) + u ( k 1)
Input parameters Controller type KPu; Tu; T0 PID controller using forward rectangular method KPu; Tu; T0
T q0 = K P 1 + D T0
T T T q = KP D q1 = K P 1 0 + 2 D ; 2 T0 T0 TI
2 zn2br zn3br
u ( k ) = q0 e ( k ) + q1e ( k 1) + q2 e ( k 2 ) + u ( k 1) T T q0 = K P 1 + 0 + D ; TI T0 T q1 = K P 1 + 2 D ; T0 q2 = K P TD T0
3 zn2tr zn3tr
u ( k ) = q0 e ( k ) + q1e ( k 1) + q2 e ( k 2 ) + u ( k 1)
T T q0 = K P 1 + 0 + D ; 2TI T0
T 2T q1 = K P 1 0 + D ; T0 2TI
q2 = K P
TD T0
T TD = U 20
KPu;
Tu;
T0
u ( k ) = p1u ( k 1) + p2 u ( k 2 ) + q0 e ( k ) + q1e ( k 1) + q2 e ( k 2 )
4 p1 =
Tf T0 +1
2T f
6 zn2fd zn3fd
2T f T0
T p2 = 0 2T f T0
K P + 2K P
T f + TD T0 2T f T0
;
+1
q0 =
+1
T f + TD K PT0 4K P T0 2TI q1 = ; 2T f +1 T0 Tf = TD
Tf q2 = T0
(2 K P
K PT0 K T K T ) + 2 P D + P 0 KP TI T0 2TI ; 2T f +1 T0
3; 20
KPu; Tu; T0 PID - Takahashi's controller KPu; Tu; T0 PID - strm's controller
7 zn2tak zn3tak
u (k ) = K R [ y (k 1) y (k )] + K I [ w(k ) y (k )] + K D [2 y (k 1) y (k 2) y (k )] + + u (k 1)
K R = 0.6 K Pu K I; 2 1.2 K Pu T0 KI = ; Tu 3K Pu Tu KD = 40T0
u ( k ) = u PI ( k ) + uD ( k )
8 zn2ast zn3ast
uPI ( k ) = K P y ( k 1) y ( k ) + K T + P 0 e ( k ) + e ( k 1) + K P w ( k ) w ( k 1) + u PI ( k 1) 2TI uD ( k ) = K P TD TD y ( k 1) y ( k ) + T + T uD ( k 1) TD + T0 D 0
9 zn2fpd zn3fpd
T u ( k ) = K P e ( k ) e ( k 1) + 0 e ( k ) + TI T + D e ( k ) + 2e ( k 1) 6e ( k 2 ) + 2e ( k 3) + e ( k 4 ) + u ( k 1) 6T0
KPu; Tu; T0 PID controller using backward rectangular method, replacing derivation by a fourpoint difference d - time delay
q2 = q0 a2 = kI a2 b0
10 ba2
q0 =
kI ; b0
q1 = q0 a1 =
kI a1 ; b0 1
kI =
1 2d 1
( = 0);
kI =
2d (1 + )(1 )
( > 0);
b1 b0
11 da2
KP =
(a1 + 2a2 )Q ; b1
T0 a2 Q ; K P b1
TI =
T0 T 1 +1+ D a1 + 2a2 T0
TD =
Q = 1 e
T0 B
12 pp2a_1
q0 =
1 (d1 + 1 a1 ) ; b1
q1 =
a2 b a q2 ( 1 1 + 1) ; b2 b2 a2
q2 =
s1 ; r1
= q2
b2 a2
n natural frequency
factor
damping
pole
13 pp2a_2
q0 =
r2 r3 ; r1
q1 =
r4 + r5 ; r1
q2 =
r x4 + a2 ; = 6 b2 r1
- real and imaginary component of the pole PID A-2 placement controller pole
r2 = x1 (b1 + b2 )(a1b2 a2 b1 )
2 r4 = a1 b12 x4 + b2 x1 b1b2 ( x2 + x3 )
2 3 r6 = b1 (b12 x4 b1 b2 x3 + b2 x2 ) b2 x1
r3 = b12 x4 b2 [b1 x3 b2 ( x1 + x2 ) ] ;
r5 = (b1 + b2 ) [ a2 (b1 x2 b2 x1 ) b1 x4 + b2 x3 ] ;
a - natural frequency
- damping factor
PID B-1 placement controller pole
14 pp2b_1
b a a q0 = q2 ( 1 1 ) 2 ; b2 a2 b2
s b q2 = 1 ; = q2 2 ; r1 a2
1 = (d1 + 1 a1 b1q0 ) b1
15 pp2b_2
r2 = a1b2 [b1 ( x2 + x3 + x4 ) b2 x1 ]
r4 = (b1 + b2 ) [b1 x4 + b2 ( x3 x4 ) ]
r3 = a2 b1 [b2 x1 b1 ( x2 x3 + x4 ) ] ;
2 3 r5 = b1 (b12 x4 b1 b2 x3 + b2 x2 ) b2 x1 ;
r6 = b12 ( a2 x3 + a1 x4 a2 x4 )
r7 = b2 b1 ( a1 x4 + a2 x2 x4 ) b2 ( a2 x1 + x4 )
16 db2w db3w 17 db2s db3s
u ( k ) = r0 w ( k ) q0 y ( k ) q1 y ( k 1) q2 y ( k 2 ) p1u ( k 1) p2 u ( k 2 ) u ( k ) = r0 w ( k ) q0 y ( k ) q1 y ( k 1) q2 y ( k 2 ) p1u ( k 1) p2 u ( k 2 )
18 mv2
u ( k ) = r0 w ( k ) + r1 w ( k 1) + r2 w ( k 2 ) q0 y ( k ) q1 y ( k 1) q2 y ( k 2 ) p1u ( k 1) p2 u ( k 2 )
19 pp2chp pp3chp
u ( k ) = r0 w ( k ) + r1 w ( k 1) + r2 w ( k 2 ) q0 y ( k ) q1 y ( k 1) q2 y ( k 2 ) p1u ( k 1) p2 u ( k 2 )
20 pp2lq
weight of controller output signal in LQ criterion Reference signal type T0 Controller based on minimisation of LQ criterion
d1 =
m1 + m2
d2 =
m2
+ 2 4m2 2
2
m0 m m2 + 0 + m2 m12 2 2 m2 = a2
n natural frequency
factor
damping
21 pp2c2dof pp3c2dof
( ) ( ) ( ) ( ) ( ) D ( z ) = 1+ d z + d z
1 1 2
1 2
A z 1 P z 1 K z 1 + B z 1 Q z 1 = D z 1
( )
r0 =
1 + d1 + d 2 + ... + d 2 n b1 + b2 + ... + bn
Notes: m-file name: xx(x)a(yyyy).m: xx(x) - controller type, n = 2 or 3 - process model order, (yyyy) - controller further details Controllers number 1, 2, 3, 4, 5, 6, 7, 8 and 9:
K P = 0.6 K Pu ; TI = 0.5Tu ; TD = 0.125Tu
1, 1,
14
15
4.1
zn2fr
Ziegler-Nichols PID controller for processes of second order. Controller is based on forward rectangular method of discretization. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
T T uk = K P ek ek 1 + 0 ek 1 + D ( ek 2ek 1 + ek 2 ) + uk 1 TI T0
where ek is control error ( ek
uk = q0 ek + q1ek 1 + q2 ek 2 + uk 1
Controller parameters are calculated using following equations:
T q0 = K P 1 + D T0
T T q1 = K P 1 0 + 2 D T0 TI
q2 = K P
TD T0
K P = 0.6 K Pu
Variables
TI = 0.5Tu
TD = 0.125Tu
Source code: sid zn2fr scqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
16
4.2
zn2br
Ziegler-Nichols PID controller for processes of second order. The controller is based on backward rectangular method of discretization. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
T T uk = K P ek ek 1 + 0 ek + D ( ek 2ek 1 + ek 2 ) + uk 1 TI T0
where ek is control error ( ek
uk = q0 ek + q1ek 1 + q2 ek 2 + uk 1
Controller parameters are calculated using following equations:
T T q0 = K P 1 + 0 + D TI T0
T q1 = K P 1 + 2 D T0
q2 = K P
TD T0
K P = 0.6 K Pu
Variables
TI = 0.5Tu
TD = 0.125Tu
Source code: sid zn2br scqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
17
4.3
zn2tr
Ziegler-Nichols PID controller for processes of second order. Controller is based on trapezoidal method of discretization. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
T e e T uk = K P ek ek 1 + 0 k k 1 + D ( ek 2ek 1 + ek 2 ) + uk 1 TI T0 2
where ek is control error ( ek
uk = q0 ek + q1ek 1 + q2 ek 2 + uk 1
Controller parameters are calculated using following equations:
T T q0 = K P 1 + 0 + D 2TI T0
T 2T q1 = K P 1 0 + D T0 2TI
q2 = K P
TD T0
K P = 0.6 K Pu
Variables
TI = 0.5Tu
TD = 0.125Tu
Source code: sid zn2tr scqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
18
4.4
zn2pd
Ziegler-Nichols PD controller for processes of second order. Controller uses reference variable (w) just in proportional component. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
T uk = K P wK yk + D ( yk 1 yk ) T0
This form of control law can be transformed to feedback feedforward form:
uk = r0 wk q0 yk q1 yk 1
where controller parameters
r0 = K P
K P = 0.4 K Pu
Variables
q1 = K P
TD T0
TD =
Tu 20
Source code: sid zn2pd scrqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
19
4.5
zn2pi
Ziegler-Nichols PI controller for processes of second order. Controller is based on trapezoidal method of discretization. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
T e e uk = K P ek ek 1 + 0 k k 1 + uk 1 TI 2
where ek is control error ( ek
T q0 = K P 1 + 0 2TI
T q1 = K P 1 0 2TI
K P = 0.6 K Pu
Variables
TI = 0.5Tu
Source code: sid zn2pi scqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
20
4.6
zn2fd
Ziegler-Nichols controller for second order processes with filtration of D-component using Tustin approximation. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
Controller specific parameters: Parameter Description Filtration coefficient used by filter of process output signal. The time constant of alfa filtration T coefficient the filter is: Td = D where usually 3 < < 20
Control law:
q0 = K P
1 + 2 ( c f + cd ) +
1 + 2c f
ci (1 + 2c f 2 ci 1 2
ci 4 ( c f + cd ) q1 = K P 2 1 + 2c f
q2 = K P p1 =
c f ( 2 ci ) + 2cd + 1 + 2c f
4c f 1 + 2c f
p2 =
2c f 1 1 + 2c f
cf =
Tf T0
ci =
T0 Ti
cd =
TD T0 TD = 0.125Tu Tf = TD
K P = 0.6 K Pu
TI = 0.5Tu
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn2fd Scqp on-line identification s-function function for computation of controller parameters controller s-function
Self-tuning Controller Simulink Library Computation of ultimate gain and period List of common controllers parameters
21
22
4.7
zn2tak
Takahashi's controller for processes of second order. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
T T uk = K P yk + yk 1 + 0 ( wk yk ) + D ( 2 yk 1 yk yk 2 ) + uk 1 TI T0
This form of control law can be transformed to feedback feedforward form:
uk = r0 wk q0 yk q1 yk 1 q2 yk 2 + uk 1
where controller parameters r0 , q0 , q1 and q2 are calculated using following equation:
r0 = K P
T0 TI
T T q0 = K P 1 + 0 + D TI T0
T q1 = K P 1 + 2 D T0 T K P = 0.6 K Pu 1 0 Tu
q2 = K P TI = K PTu 1.2 K Pu
TD T0 TD =
3K PuTu 40 K p
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn2tak scrqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
23
4.8
zn2ast
Astrom's controller for second order processes. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
Controller specific parameters: Parameter alfa - filter constant Description Filtration coefficient used by filter of process output signal. The time constant of the filter is: Td =
TD
The weight of reference signal in proportional component of controller. The weight should be 0 < 1
uk = uPI ,k + u D ,k
where:
T u PI ,k = K P yk 1 yk + 0 ( wk yk + wk 1 yk 1 ) + ( wk wk 1 ) + u PI ,k 1 2TI
uD ,k =
TD K P ( yk 4 yk ) + u D ,k 1 TD + T0
K P = 0.6 K Pu
TI = 0.5Tu
TD = 0.125Tu
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn2ast scast on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
24
4.9
zn2fpd
Ziegler-Nichols controller for second order processes. The controller is based on forward rectangular method of discretization replacing derivation by a four-point difference. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
uk = q0 ek + q1ek 1 + q2 ek 2 + q3ek 3 + q4 ek 4 + uk 1
Controller parameters are then calculated using following equations:
T T q0 = K P 1 + 0 + D TI 6T0
T q1 = K P 1 + D 3T0
q2 = K P
TD T0
q3 = K P
TD 3T0
q4 = K P
TD 6T0 TD = 0.125Tu
K P = 0.6 K Pu
TI = 0.5Tu
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn2fpd scfpd on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
25
4.10 ba2
Banyasz-Keviczky's controller for second order processes with dead time. Transfer function of the controlled system
G ( z) =
b1 z 1 + b2 z 2 z d 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
Controller specific parameters: Parameter ID Dead time Control law: Description Dead time d of controlled process in sample times. Value of this parameter must be integer d 0.
=
and where:
b2 b
1
q0 =
kI b
q1 = q0 a1
q2 = q0 a2
If
or
1 : 1 + z 1
p2 =
kI =
1 2 ( d + 1) 1
1 2 ( d + 1)(1 + )(1 )
p1 = 1 +
kI =
p1 = 1
p2 = 0
Source code: sid ba2 scqp on-line identification s-function function for computation of controller parameters controller s-function
26
4.11 da2
Dahlin's controller for the processes of the second order. Transfer function of the controlled system:
G ( z) =
b1 z 1 1 + a1 z 1 + a2 z 2
a1 , a2 , b1
adjustment Adjustment factor B that specifies dominant time constant of step response of closed control circuit: the smaller B, the quicker step response of closed circuit.
Control law:
T T uk = K P ek ek 1 + 0 ek + D ( ek 2ek 1 + ek 2 ) + uk 1 TI T0
where ek is control error ( ek = wk yk ) and controller parameters are calculated using following equations:
Q = 1 e
T0 B
KP =
(a1 + 2a2 )Q b
1
TD =
T0 a2Q K b
P 1
TI =
T0 T 1 +1+ D a1 + 2a2 T0
Source code: sid da2 scqp on-line identification s-function function for computation of controller parameters controller s-function
27
4.12 pp2a_1
PID A-1 pole placement controller for second order processes. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
Controller specific parameters: Parameter xi damping factor Description Dumping factor specifying dynamic behaviour of closed loop. The dynamic behaviour of the closed-loop is similar to second order continuous system with characteristic polynomial s + 2 s + .
2 2
omega frequency
Natural frequency specifying dynamic behaviour of closed loop. The dynamic natural behaviour of the closed-loop is similar to second order continuous system with characteristic polynomial s + 2 s + .
2 2
Control law:
uk = q0 ek + q1ek 1 + q2 ek 2 + (1 )uk 1 + uk 2
where ek is control error ( ek = wk yk ) and controller parameters q0 , q1 , q2 and solving following diophantine equation:
are calculated by
A z 1 P z 1 + B z 1 Q z 1 = D z 1
where polynomials are as follows:
( ) ( )
( ) ( )
( )
( ) P ( z ) = (1 z )(1 + z )
A z 1 = 1 + a1 z 1 + a2 z 2
1 1 1
( ) Q(z ) = q
1
B z 1 = b1 z 1 + b2 z 2
0
+ q1 z 1 + q2 z 2
D z 1 = 1 + d1 z 1 + d 2 z 2
( )
d1 = 2 exp ( T0 ) cos T0 1 2
) )
for for
1 >1
d1 = 2 exp ( T0 ) cosh T0 2 1
d 2 = exp ( 2 T0 )
Solving the diophantine equation leads to following relations for controller parameters:
= q2
where:
b2 a2
q2 =
s1 r1
q1 =
b a a2 q2 1 1 + 1 b a b2 2 2
q0 =
1 ( d + 1 a1 ) 1 b
1
)(
)(
) (
Self-tuning Controller Simulink Library Source code: sid pp2a_1 scqp on-line identification s-function function for computation of controller parameters controller s-function
28
29
4.13 pp2a_2
PID A-2 pole placement controller for second order processes. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
Controller specific parameters: Parameter Description Imaginary component of the poles of the closed control loop. The dynamic behaviour of the closed-loop is defined by its poles: omega imaginary component of the pole
z1 = + j z2 = j z3 , z4 =
Real component of the poles of the closed control loop. The dynamic behaviour of the closed-loop is defined by its poles:
z1 = + j z2 = j z3 , z4 =
Control law:
uk = q0 ek + q1ek 1 + q2 ek 2 + (1 )uk 1 + uk 2
where ek is control error ( ek = wk yk ) and controller parameters q0 , q1 , q2 and solving following diophantine equation:
are calculated by
A z 1 P z 1 + B z 1 Q z 1 = D z 1
where polynomials are as follows:
( ) ( )
( ) ( )
( )
( ) P ( z ) = (1 z )(1 + z )
A z 1 = 1 + a1 z 1 + a2 z 2
1 1 1
( ) Q(z ) = q
1
B z 1 = b1 z 1 + b2 z 2
0
+ q1 z 1 + q2 z 2
D z 1 = 1 ( + j ) z 1 1 ( j ) z 1 1 z 1
( )
Solving the diophantine equation leads to following relations for controller parameters:
=
where:
r6 r1
q0 =
r2 r3 r1
q1 =
r4 + r5 r1
q2 =
x4 + a2 b2
)(
r2 = x1 b1 + b2 a1b2 a2b1
)(
30
r3 = b12 x4 b2 b1 x3 b2 ( x1 + x2 )
r5 = b1 + b2 a2 b1 x2 b2 x1 b1 x4 + b2 x3
) (
x1 = c + 1 a1
c = 4
Source code: sid pp2a_2 scqp
x2 = d + a1 a2 d = 6 2 + 2
g = 2 2 +2
on-line identification s-function function for computation of controller parameters controller s-function
31
4.14 pp2b_1
PID B-1 pole placement controller for second order processes. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
Controller specific parameters: Parameter xi - damping factor Description Dumping factor specifying dynamic behaviour of closed loop. The dynamic behaviour of the closed-loop is similar to second order continuous system with characteristic polynomial s + 2 s + .
2 2
omega frequency
Natural frequency specifying dynamic behaviour of closed loop. The dynamic natural behaviour of the closed-loop is similar to second order continuous system with characteristic polynomial s + 2 s + .
2 2
Control law:
uk = ( q0 + ) yk ( q0 + q2 ) yk 1 + q2 yk 2 ( 1)uk 1 + uk 2 + wk
This form of control law can be transformed to feedback feedforward form:
uk = r0 wk q0 yk q1 yk 1 q2 yk 2 p1uk 1 p2uk 2
where controller parameters are calculated by solving following diophantine equation:
A z 1 P z 1 + B z 1 Q z 1 + r0 = D z 1
where polynomials are as follows:
( ) ( )
( ) ( )
( )
( ) P ( z ) = (1 z )(1 + z )
A z 1 = 1 + a1 z 1 + a2 z 2
1 1 1
( ) Q ( z ) = (1 z )( q + q z )
B z 1 = b1 z 1 + b2 z 2
1 1 1
D z 1 = 1 + d1 z 1 + d 2 z 2
( )
d1 = 2 exp ( T0 ) cos T0 1 2
)
)
for for
1
>1
d1 = 2 exp ( T0 ) cosh T0 2 1
d 2 = exp ( 2 T0 )
Solving the diophantine equation leads to following relations for controller parameters:
r0 =
d1 + 1 a1 b1q2 b
1
p1 = 1
q1 = ( qo + q2 )
p2 =
q0 = r0 + q0
where:
q2 = q2
32
q2 =
s1 r1
b a a q0 = q2 1 1 2 b a b 2 2 2
= q2
b2 a2
)(
s1 = a2 b2 a1 b1 + b2 + b1 ( d 2 a2 ) b2 ( d1 + 1) a2b12
on-line identification s-function function for computation of controller parameters controller s-function
33
4.15 pp2b_2
PID B-2 pole placement controller for second order processes. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
Controller specific parameters: Parameter Description Imaginary component of the poles of the closed control loop. The dynamic behaviour of the closed-loop is defined by its poles: omega imaginary component of the pole
z1 = + j z 2 = j z3 , z4 =
Real component of the poles of the closed control loop. The dynamic behaviour of the closed-loop is defined by its poles:
z1 = + j z 2 = j z3 , z4 =
Control law:
uk = ( q0 + ) yk ( q0 + q2 ) yk 1 + q2 yk 2 ( 1)uk 1 + uk 2 + wk
This form of control law can be transformed to feedback feedforward form:
uk = r0 wk q0 yk q1 yk 1 q2 yk 2 p1uk 1 p2uk 2
where controller parameters are calculated by solving following diophantine equation:
A z 1 P z 1 + B z 1 Q z 1 + r0 = D z 1
where polynomials are as follows:
( ) ( )
( ) ( )
( )
( ) P ( z ) = (1 z )(1 + z )
A z 1 = 1 + a1 z 1 + a2 z 2
1 1 1
( ) Q ( z ) = (1 z )( q + q z )
B z 1 = b1 z 1 + b2 z 2
1 1 1
D z 1 = 1 ( + j ) z 1 1 ( j ) z 1 1 z 1 x1 + x2 x3 + x4 b +b
1 2
( )
Solving the diophantine equation leads to following relations for controller parameters:
r0 =
p1 = 1
q1 = ( qo + q2 )
p2 =
q0 = r0 + q0
q2 = q2
34
r5 r1
q0 =
r2 + r3 + r4 r1
q2 =
r6 + r7 r1
)(
r2 = a1b2 b1 ( x2 x3 + x4 ) b2 x1 r4 = b1 + b2 b1 x4 + b2 ( x3 - x4 ) r6 = b12 ( a2 x3 + a1 x4 - a2 x4 )
x2 = d + a1 a2
d = 6 2 + 2
x3 = f a2
f = 2 2 2 + 2
x4 = g
g = 2 2 +2
35
4.16 db2w
Deadbeat controller for processes of second order (weak version). Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
uk = r0 wk q0 yk q1 yk 1 p1uk 1
where controller parameters r0 , q0 , q1 and p1 are calculated using following equation:
r0 =
1 b
q0 =
a1 b
1
q1 =
a2 b
1
p1 =
b2 b
1
Source code: sid db2w scrqp on-line identification s-function function for computation of controller parameters controller s-function
36
4.17 db2s
Deadbeat controller for processes of second order and step changes of reference variable (strong version). Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
uk = r0 wk q0 yk q1 yk 1 p1uk 1
where controller parameters r0 , q0 , q1 and p1 are calculated by solving following diophantine equation:
( ) ( ) ( ) ( ) 1 B ( z ) R ( z ) = (1 z ) S ( z )
A z 1 P z 1 + B z 1 Q z 1 = 1
1 1 1 1
( ) P ( z ) = 1+ p z R(z ) = r
1
A z 1 = 1 + a1 z 1 + a2 z 2
1
( ) Q(z ) = q + q z S (z ) = s + s z
1
B z 1 = b1 z 1 + b2 z 2
1
Solving the diophantine equations leads to following relations for controller parameters:
q0 =
q1 = r0 =
a2 a1b2 a2b1
2 2
b + a1b1b2 a2b12 1 +b b1 2
p1 =
b2 a1b2 a2b1
2 b2 + a1b1b2 a2b12
Source code: sid db2s scrqp on-line identification s-function function for computation of controller parameters controller s-function
37
4.18 mv2
Minimum variance controller for processes of second order. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
Penalisation factor q used by computation of control law parameters. This penalisation parameter specifies the measure of change of current controller output with respect to previous controller output: the smaller penalisation, the greater possible change of controller output.
Control law:
uk =
1 a1 yk 1 + a2 yk 2 b1uk 1 b2uk 2 + wk + uk 1 q
uk = r0 wk q1 yk 1 q2 yk 2 p1uk 1 p2uk 2
where controller parameters r0 , q1 , q2 , p1 , and p2 are calculated using following equation:
r0 =
1 q
q1 =
a1 q
q2 =
a2 q
p1 =
b1 1 q
p2 =
b2 q
Source code: sid mv2 scrqp on-line identification s-function function for computation of controller parameters controller s-function
38
4.19 pp2chp
Generic pole placement controller for second order processes. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
Controller specific parameters: Parameter Reference signal type Frequency Coefficients of characteristic polynomial Control law: Description Its possible to choose one of the following signal types: steps ramps sin waves Frequency f of reference signal - valid only when reference signal is 'sin waves' Vector determining characteristic polynomial D(z-1) and thus the positions of the poles of the closed loop. If vector is [d0, d1, d2, d3], then characteristic polynomial will be D(z-1) = d0 + d1z-1 + d2z-2 + d3z-3. The length of the vector can vary but at lest d0 must be specified.
uk =
1 ( r0 wk + r1wk 1 q0 yk q1 yk 1 p1uk 1 ) p0
where controller parameters r0, r1, q0, q1, p0 and p1 are calculated by solving following diophantine equation:
( ) P(z ) = p + p z R(z ) = r + r z
1
0 1
1
A z 1 = 1 + a1 z 1 + a2 z 2
1
F(z-1) depends on reference signal type: Reference signal type steps ramps sin waves Source code: F(z-1)
1 z 1 1 2 z 1 + z 2 1 2 cos z 1 + z 2 where = 2 f T0
Self-tuning Controller Simulink Library sid pp2chp scast on-line identification s-function function for computation of controller parameters controller s-function
39
40
4.20 pp2lq
LQ controller for second order processes. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
Controller specific parameters: Parameter Reference signal type Frequency Penalization of controller output fi Description Its possible to choose one of the following signal types: steps ramps sin waves Frequency f of reference signal - valid only when reference signal is 'sin waves' Penalization of controller output in LQ criterion:
J = [ w(k ) y (k ) ] + [u (k ) ]
2
k =0
Control law:
uk =
1 ( r0 wk + r1wk 1 q0 yk q1 yk 1 p1uk 1 ) p0
where controller parameters r0, r1, q0, q1, p0 and p1 are calculated by solving following diophantine equation:
A z 1 = 1 + a1 z 1 + a2 z 2
1 1
) )= p + pz )=r +rz ) = 1+ d z + d z
0 1
where:
+ 2 4m2 2 m m1 m m d1 = , d2 = 2 , = , = 0 m2 + 0 + m2 m12 , + m2 2 2 2
2
Self-tuning Controller Simulink Library Reference signal type steps ramps sin waves Source code: sid pp2lq scast on-line identification s-function function for computation of controller parameters controller s-function F(z-1)
41
1 z 1 1 2 z 1 + z 2 1 2 cos z 1 + z 2 where = 2 f T0
42
4.21 pp2c2dof
Pole placement 2 degree-of-freedom (2DOF) controller with compensator for second order processes. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 1 + a1 z 1 + a2 z 2
a1 , a2 , b1 , b2
Controller specific parameters: Parameter xi damping factor Description Dumping factor specifying dynamic behaviour of closed loop. The dynamic behaviour of the closed-loop is similar to second order continuous system with characteristic polynomial s + 2 s + .
2 2
omega frequency
Natural frequency specifying dynamic behaviour of closed loop. The dynamic natural behaviour of the closed-loop is similar to second order continuous system with characteristic polynomial s + 2 s + .
2 2
R PK
Q PK
B A
Feedback controller:
GR ( z ) =
( ) = q +q z +q z P ( z ) K ( z ) (1 + p z )(1 z )
Q z 1
1 1 2 0 1 2 1 1 1 1
GF ( z ) =
( ) = r P ( z ) K ( z ) (1 + p z )(1 z )
R z 1
1 1 0 1 1 1
A z 1 P z 1 K z 1 + B z 1 Q z 1 = D z 1
where polynomials are as follows:
( ) ( ) ( )
( ) ( )
( )
( ) P ( z ) = 1+ p z
1
A z 1 = 1 + a1 z 1 + a2 z 2
1
( ) Q(z ) = q
1
B z 1 = b1 z 1 + b2 z 2
0
+ q1 z 1 + q2 z 2
43
K z 1 = 1 z 1 D z 1 = 1 + d1 z 1 + ... + d 4 z 4
( )
( )
d1 = 2 exp ( T0 ) cos T0 1 2
) )
for for
1 >1
d1 = 2 exp ( T0 ) cosh T0 2 1
d 2 = exp ( 2 T0 )
d3 = d 4 = 0
Matrix equation:
b1 b2 0 0
Control law:
0 b
0 0 b
b2 0
b2
q d + 1 a1 0 1 q d + a a a1 1 1 2 1 2 = a2 a1 q2 d3 + a2 d4 a2 p1 1
P ( z 1 ) K ( z 1 )uk = R ( z 1 ) wk Q( z 1 ) yk uk = r0 wk q0 yk q1 yk 1 q2 yk 2 + (1 p1 ) uk 1 + p1uk 2 r0 = 1 + d1 + d 2 + d3 + d 4 b +b
1 2
44
4.22 zn3fr
Ziegler-Nichols PID controller for processes of third order. The controller is based on forward rectangular method of discretization. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
T T uk = K P ek ek 1 + 0 ek 1 + D ( ek 2ek 1 + ek 2 ) + uk 1 TI T0
where ek is control error ( ek = wk yk ). This form of control law can be transformed to feedback form:
uk = q0 ek + q1ek 1 + q2ek 2 + uk 1
Controller parameters are calculated using following equations:
T q0 = K P 1 + D T0
T T q1 = K P 1 0 + 2 D T0 TI
q2 = K P
TD T0
K P = 0.6 K Pu
TI = 0.5Tu
TD = 0.125Tu
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn3fr scqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
45
4.23 zn3br
Ziegler-Nichols PID controller for processes of third order. The controller is based on backward rectangular method of discretization. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
T T uk = K P ek ek 1 + 0 ek + D ( ek 2ek 1 + ek 2 ) + uk 1 TI T0
where ek is control error ( ek = wk yk ). This form of control law can be transformed to feedback form:
uk = q0 ek + q1ek 1 + q2ek 2 + uk 1
Controller parameters are calculated using following equations:
T T q0 = K P 1 + 0 + D TI T0
T q1 = K P 1 + 2 D T0
q2 = K P
TD T0
K P = 0.6 K Pu
TI = 0.5Tu
TD = 0.125Tu
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn3br scqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
46
4.24 zn3tr
Ziegler-Nichols PID controller for processes of third order. The controller is based on trapezoidal method of discretization. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
T e e T uk = K P ek ek 1 + 0 k k 1 + D ( ek 2ek 1 + ek 2 ) + uk 1 2 TI T0
where ek is control error ( ek = wk yk ). This form of control law can be transformed to feedback form:
uk = q0 ek + q1ek 1 + q2ek 2 + uk 1
Controller parameters are calculated using following equations:
T T q0 = K P 1 + 0 + D 2TI T0
T 2T q1 = K P 1 0 + D T0 2TI
q2 = K P
TD T0
K P = 0.6 K Pu
TI = 0.5Tu
TD = 0.125Tu
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn3tr scqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
47
4.25 zn3pd
Ziegler-Nichols PD controller for processes of third order. The controller uses reference variable (w) just in proportional component. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
T uk = K P wK yk + D ( yk 1 yk ) T0
This form of control law can be transformed to feedback feedforward form:
uk = r0 wk q0 yk q1 yk 1
where controller parameters r0 , q0 and q1 are calculated using following equation:
r0 = K P K P = 0.4 K Pu
T q0 = K P 1 + D T0
q1 = K P
TD T0
TD =
Tu 20
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn3pd scrqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
48
4.26 zn3pi
Ziegler-Nichols PI controller for processes of third order. The controller is based on trapezoidal method of discretization. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
T e e uk = K P ek ek 1 + 0 k k 1 + uk 1 2 TI
where ek is control error ( ek = wk yk ). This form of control law can be transformed to feedback form:
uk = q0 ek + q1ek 1 + uk 1
Controller parameters are calculated using following equations:
T q0 = K P 1 + 0 2TI
T q1 = K P 1 0 2TI
K P = 0.6 K Pu
TI = 0.5Tu
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn3pi scqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
49
4.27 zn3fd
Controller for third order processes with filtration of D-component using Tustin approximation. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
Controller specific parameters: Parameter Description Filtration coefficient used by filter of process output signal. The time constant of alfa filtration T coefficient the filter is: Td = D where usually 3 < < 20
Control law:
q0 = K P
1 + 2 ( c f + cd ) +
1 + 2c f
ci (1 + 2c f 2 ci 1 2
ci 4 ( c f + cd ) 2 q1 = K P 1 + 2c f
q2 = K P p1 =
c f ( 2 ci ) + 2cd + 1 + 2c f
4c f 1 + 2c f
p2 =
2c f 1 1 + 2c f
cf =
Tf T0
ci =
T0 Ti
cd =
TD T0 TD = 0.125Tu Tf = TD
K P = 0.6 K Pu
TI = 0.5Tu
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn3fd scqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period
50
51
4.28 zn3tak
Takahashi's controller for processes of third order. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
T T uk = K P yk + yk 1 + 0 ( wk yk ) + D ( 2 yk 1 yk yk 2 ) + uk 1 TI T0
This form of control law can be transformed to feedback feedforward form:
uk = r0 wk q0 yk q1 yk 1 q2 yk 2 + uk 1
where controller parameters r0 , q0 , q1 and q2 are calculated using following equation:
r0 = K P
T0 TI
T T q0 = K P 1 + 0 + D TI T0
T q1 = K P 1 + 2 D T0 T K P = 0.6 K Pu 1 0 Tu
q2 = K P TI = K PTu 1.2 K Pu
TD T0 TD =
3K PuTu 40 K p
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn3tak scrqp on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
52
4.29 zn3ast
Astrom's controller for third order processes. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
Controller specific parameters: Parameter alfa - filter constant Description Filtration coefficient used by filter of process output signal. The time constant of the filter is: Td =
TD
The weight of reference signal in proportional component of controller. The weight should be 0 < 1
uk = uPI ,k + uD ,k
where:
T u PI ,k = K P yk 1 yk + 0 ( wk yk + wk 1 yk 1 ) + ( wk wk 1 ) + u PI ,k 1 2TI
uD ,k =
TD K P ( yk 4 yk ) + u D ,k 1 TD + T0
K P = 0.6 K Pu
TI = 0.5Tu
TD = 0.125Tu
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn3ast scast on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
53
4.30 zn3fpd
Ziegler-Nichols controller for third order processes. The controller is based on forward rectangular method of discretization replacing derivation by a four-point difference. Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
T T q0 = K P 1 + 0 + D TI 6T0
T q1 = K P 1 + D 3T0
q2 = K P
TD T0
q3 = K P
TD 3T0
q4 = K P
TD 6T0 TD = 0.125Tu
K P = 0.6 K Pu
TI = 0.5Tu
Variables K Pu and Tu are ultimate gain and ultimate period respectively. Source code: sid zn3fpd scfpd on-line identification s-function function for computation of controller parameters controller s-function
See also: On-line identification methods Computation of ultimate gain and period List of common controllers parameters
54
4.31 db3w
Deadbeat controller for processes of third order (weak version). Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
uk = r0 wk q0 yk q1 yk 1 q2 yk 2 p1uk 1 p2 yk 2
where controller parameters r0 , q0 , q1 , q2 , p1 and p2 are calculated using following equation:
r0 =
1 b
q0 =
a1 b
1
q1 =
a2 b
1
q2 =
a3 b
1
p1 =
b2 b
1
p2 =
b3 b
1
Source code: sid db3w scrqp on-line identification s-function function for computation of controller parameters controller s-function
55
4.32 db3s
Deadbeat controller for processes of third order and step changes of reference variable (strong version). Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
uk = r0 wk q0 yk q1 yk 1 q2 yk 2 p1uk 1 p2 yk 2
where controller parameters r0 , q0 , q1 , q2 , p1 and p2 are calculated by solving following diophantine equation:
( ) ( ) ( ) ( ) 1 B ( z ) R ( z ) = (1 z ) S ( z )
A z 1 P z 1 + B z 1 Q z 1 = 1
1 1 1 1
( ) P ( z ) = 1+ p z R(z ) = r
1
A z 1 = 1 + a1 z 1 + a2 z 2 + a3 z 3
1
+ p2 z 2
( ) Q(z ) = q + q z S (z ) = s + s z
1
B z 1 = b1 z 1 + b2 z 2 + b3 z 3
1
+ q2 z 2
+ s2 z 2
Source code: sid db3s scrqp on-line identification s-function function for computation of controller parameters controller s-function
56
4.33 pp3chp
Generic pole placement controller for processes of third order Transfer function of the controlled system:
G ( z) =
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
Controller specific parameters: Parameter Reference signal type Frequency Coefficients of characteristic polynomial Control law: Description Its possible to choose one of the following signal types: steps ramps sin waves Frequency f of reference signal - valid only when reference signal is 'sin waves' Vector determining characteristic polynomial D(z-1) and thus the positions of the poles of the closed loop. If vector is [d0, d1, d2, d3, d4. d5], then characteristic polynomial will be D(z-1) = d0 + d1z-1 + d2z-2 + d3z-3 + d4z-4 + d5z-5. The length of the vector can vary but at lest d0 must be specified.
uk =
1 ( r0 wk + r1wk 1 q0 yk q1 yk 1 q2 yk 2 p1uk 1 p2 yk 2 ) p0
where controller parameters r0, r1, q0, q1, q2, p0, p1 and p2 are calculated by solving following diophantine equation:
( ) P(z ) = p + p z R(z ) = r + r z
1
A z 1 = 1 + a1 z 1 + a2 z 2 + a3 z 3
1
+ p2 z 2
F(z-1) depends on reference signal type: Reference signal type steps ramps sin waves F(z-1)
1 z 1 1 2 z 1 + z 2
1 2 cos z 1 + z 2 where = 2 f T0
Self-tuning Controller Simulink Library Source code: sid pp3chp scast on-line identification s-function function for computation of controller parameters controller s-function
57
58
4.34 pp3c2dof
Pole placement 2 degree-of-freedom (2DOF) controller with compensator for third order processes. Transfer function of the controlled system:
G ( z) =
Vector of parameter estimations:
b1 z 1 + b2 z 2 + b3 z 3 1 + a1 z 1 + a2 z 2 + a3 z 3
a1 , a2 , a3 , b1 , b2 , b3
Controller specific parameters: Parameter xi damping factor Description Dumping factor specifying dynamic behaviour of closed loop. The dynamic behaviour of the closed-loop is similar to second order continuous system with characteristic polynomial s + 2 s + .
2 2
Natural frequency specifying dynamic behaviour of closed loop. The dynamic behaviour of the closed-loop is similar to second order continuous system with characteristic polynomial s + 2 s + .
2 2
R PK
Q PK
B A
Feedback controller:
GR ( z ) =
( ) = q +q z +q z +q z P ( z ) K ( z ) (1 + p z + p z )(1 z )
Q z 1
1 1 2 3 0 1 2 3 1 1 2 1 1 2
GF ( z ) =
( ) = P ( z ) K ( z ) (1 + p z
R z 1
1 1 1
r0
1
+ p2 z 2 1 z 1
)(
A z 1 P z 1 K z 1 + B z 1 Q z 1 = D z 1
where polynomials are as follows:
( ) ( ) ( )
( ) ( )
( )
A z 1 = 1 + a1 z 1 + a2 z 2 + a3 z 3 B z 1 = b1 z 1 + b2 z 2 + b3 z 3
P z 1 = 1 + p1 z 1 + p2 z 2
( )
( )
( )
Q z 1 = q0 + q1 z 1 + q2 z 2 + q3 z 3
( )
59
K z 1 = 1 z 1 D z 1 = 1 + d1 z 1 + ... + d 6 z 6
( )
( )
d1 = 2 exp ( T0 ) cos T0 1 2
) )
for for
1 >1
d1 = 2 exp ( T0 ) cosh T0 2 1
d 2 = exp ( 2 T0 )
d3 = d 4 = d5 = d 6 = 0
Matrix equation: 3rd order
b1 b2 b3 0 0 0 0 b 0 0 b 0 0 0 b 1 a1 1 a2 a1 a3 a2 a3 0 q0 d1 + 1 a1 1 q d 2 + a1 a2 1 a1 1 q2 d3 + a2 a3 = a2 a1 q3 d 4 + a3 d5 a3 a2 p1 p d6 a3 2 0
b1 0 b1 b2 b2 b3 bn 1 bn 2 bn bn1 bn 0 0 0 0 0 0 0 0 0 0 0 0 0 b 0 0 0 b1 b 0 0 0 0 b1 b 0 0 0 0 0 b 1 a1 1 a2 a1 an 2 an3 an1 an 2 an an 1 an 0 0 0 0
nth order
0 1 a1 1 an 3 an 4 an 2 an 3 an 1 an 2 an an 1 an 0 0 0 0 0 1 an 4 an 5 an 3 an 4 an 2 an 3 an 1 an 2 an an 1 0 0 0 0 0 0 a1 1 a2 a1 a3 a2 a4 a3 a5 a4 0 0 0 1 a1 1 a2 a1 a3 a2 a4 a3 q 0 d +1 a 1 1 q1 d 2 + a1 a2 q2 d + a a 3 2 3 qn 2 q d n1 + an 2 an1 n 1 d n + an1 an q n = d n +1 + an p 1 dn+2 p2 d n+3 p3 d2n2 pn 3 d 2 n1 p n2 d 2n pn 1
b2 b 0 0
bn3 b bn 1 b
n
n2
b2 b 0
b3 b
4
b2 b
0 0 0 0
b5 bn 0 0
b3 b
4
b2 b
3
bn 1 bn 2 bn bn1 0 b
n
n an an 1 an 1 an 2 an 0 an an 1 an
P ( z 1 ) K ( z 1 )uk = R( z 1 ) wk Q( z 1 ) yk
uk = r0 wk q0 yk q1 yk 1 q2 yk 2 q3 yk 3 +
uk = r0 wk q0 yk q1 yk 1 ... qn yk n + +( pn 2 pn 1 )uk n+1 + pn 1uk n + (1 p1 ) uk 1 + ( p1 p2 ) uk 2 + ... +
+ (1 p1 ) uk 1 + ( p1 p2 ) uk 2 + p2uk 3
r0 =
1 + d1 + d 2 + d3 + d 4 + d5 + d 6 b1 + b2 + b3
r0 =
1 + d1 + d 2 + ... + d 2 n b1 + b2 + ... + bn