6. discrete systems - ttu.ee · 6. discrete systems under discrete systems, those systems are...

25
6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous. To distinguish between continuous and not-continuous time, the continuous time could be considered as a video shot, whereas the non-continuous could describe a photo-snap, or the values of the system state variables which are changing step-wise after certain interval. Figure 6.1. Transfer processes of the signal of a discrete process Usually, with those “snap-shots”, the analogue-digital converters are engaged; which, closing for a moment the contacts in their inputs take the instantaneous value of the state variable. Therefore, as the conversion process takes time, the instantaneous value has to be kept unchanged during the quantification process. Therefore, after taking the instantaneous value, the contact in the input switches off and the instant value will be directed to a memory block, which provides its preservation during the quantifying process. [10]. Most critical in this process is the selection of the right quantification period. T 0 .. In case if the quantification period is too long relative to process. Then the image that will be got about the system does not match the real one. Short quantification process, however, gives the right image about the system, but with it the amount of the processed in calculations information increases, an extreme result of which could be a situation where the computer is not able to process the instantaneous information, so as the information of the previous moment is not processed yet and this situation s progressing. The proper quantification frequency could found by formula f 0min = 2 f protsess , (6.1) y(k) y(t) T 0 y(k) y*(t)

Upload: doannga

Post on 11-Apr-2019

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

6. DISCRETE SYSTEMS

Under discrete systems, those systems are meant, which are considered in discrete

time or those that are not considered continuous. To distinguish between continuous

and not-continuous time, the continuous time could be considered as a video shot,

whereas the non-continuous could describe a photo-snap, or the values of the system

state variables which are changing step-wise after certain interval.

Figure 6.1. Transfer processes of the signal of a discrete process

Usually, with those “snap-shots”, the analogue-digital converters are engaged; which,

closing for a moment the contacts in their inputs take the instantaneous value of the

state variable. Therefore, as the conversion process takes time, the instantaneous value

has to be kept unchanged during the quantification process. Therefore, after taking the

instantaneous value, the contact in the input switches off and the instant value will be

directed to a memory block, which provides its preservation during the quantifying

process. [10].

Most critical in this process is the selection of the right quantification period. T0.. In

case if the quantification period is too long relative to process. Then the image that

will be got about the system does not match the real one. Short quantification process,

however, gives the right image about the system, but with it the amount of the

processed in calculations information increases, an extreme result of which could be a

situation where the computer is not able to process the instantaneous information, so

as the information of the previous moment is not processed yet and this situation s

progressing.

The proper quantification frequency could found by formula

f 0min=2⋅ f protsess , (6.1)

y(k)y(t)

T0

y(k) y*(t)

Page 2: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

However, the industrial recommendation is

f 0=10⋅ f protsess . (6.2)

In last case one could speak about real-time models, so as filtering the quantification

frequency out of the signal the signal converts to an analogous signal again, the

differing of which from the original signal doe not have any significance.

6.1. Mathematical transformations

6.1.1. Transition from differential equations to the difference equations

In case of real-time models, the systems could be described by difference equations,

which do not differ from the differential equations by their essence [10].

Example 6.1.

Function changing in time

y t ≈ y k

Example 6.2.

First order derivative

d y t dt

=limT 0

y t − y t−T 0T 0

≈y k − y k−1

T 0.

Example 6.3.

Second order derivative

d 2 y t dt 2 =lim

T 0

dy t dt

−dy t−T 0

dtT 0

≈y k −2⋅y k−1 y k−2

T 02

.

Example 6.4.

Integral by the trapezoid formula, without the error calculation

∫a

b

y t dt=b−an⋅[ 12⋅ y 0 y k⋅n∑

i=1

n−1

y k⋅i ] ,

where n – number of data points in-between

Page 3: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

Example 6.5.

Let it be given a differential equation

0⋅y t 1⋅y t y t =0⋅s t ,

Which represents as difference equation in the form

a0⋅y k a1⋅y k−1a2⋅y k−2=b0⋅s k .

The objective is to find the coefficients of the difference equation. therefore, in

Examples 6.1...6.3 determined transfer functions are used.

0⋅y k −2⋅y k−1 y k−2

T 02 1⋅

y k − y k−1 T 0

y k =0⋅s k

After rearrangement, it is possible

to represent the last equation in the form

2

T 021

T 01⋅y k − 2⋅2

T 02

1

T 0⋅y k−12

T 02⋅y k−2=0⋅s k .

As a result of coefficients comparison it could be explained

a 0=2

T 021

T 01 , a1=−

2⋅2

T 02 −

1

T 0, a 2=

2

T 02 , b0=0 .

6.1.2. z-transformation

Z-transformation has by the description of discrete system the same significance like the Laplace transformation has by the description of contnuous systems, reducing the amount of mathematical calculations. The transformation itseltis labor-consuming, therefore for most widepread functions coversion tabels are used in practice. [see Appendix 2). For other functions the help of sofware packages is used orthe transformation are made by the following equations:[10]:

The expression of the Laplace transformation

y s=ℒ { y t }=∫0

y t ⋅e−p⋅t dt . (6.3)

Implementing the transformation t=k⋅T 0 , the equation (6.3) becomes the form

Page 4: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

y∗ s=ℒ { y∗t }=∑k=0

y k⋅T 0⋅e− p⋅k⋅T 0⋅1 s (6.4)

and denoting e p⋅T 0= z

z { y k⋅T 0}=∑k=0

y k⋅T 0⋅z−k⋅1 s . (6.5)

The equation (6.5) reveals itself as an infinite series, which is possible to contract

Example 6.5.

The step function could be expressed as 1t =1k⋅T 0 , which, after z-

transformation appears as a series

y z =1 z−1z−2 z−3... ,

which contracts itself to the form

y z = 11−z−1=

zz−1 .

6.1.2.1. Description of a discrete system without delay block.

The general form of the differential equation of an analogous system without delay

block is the following

01⋅dydt2⋅

d 2 ydt 2 ...m⋅

d m ydt m =01⋅

d ydt2⋅

d 2 ydt 2 ...m⋅

d m ydt m . (6.6)

General form of this equation, presented by differences, is

y k a1⋅y k−1...am⋅y k−m =b0⋅sk b1⋅s k−1...bm⋅s k−m . (6.7)

z-transfer function could be expressed correspondingly

W z = y z s z

=b 0b1⋅z−1...bm⋅z−m

1a 1⋅z−1...a m⋅z−m . (6.8)

For a system with small quantification period the coefficients could be calculated

using the method described in the Example 6.5. In case of systems with long

quantification period, the z-transformation should be applied for the determination of

the coefficients. In this case the memory block of the analogue-digital conversion

Page 5: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

process has to be considered as a separate block and for this also has to be supplied

wit a transfer function. The representation of the signal y∗t in the figure 6.1 could

be calculated in the form

y∗t =∑k=0

y k⋅T 0⋅1 t , (6.9)

which, after Laplace transformation represents as transfer function

M p = 1p⋅1−e−p⋅T 0 . (6.10)

Thus, the z-transfer function of a process can be calculated by the equation (6.11)

MW z =z {M p ⋅W p}=z {1−e−p⋅T 0⋅W p

p }=1− z−1⋅z {W p p } . (6.11)

Example 6.6.

Let it be given a PT2-block, the transfer function of which is:

W p = K1 p⋅T 1⋅1p⋅T 2

=

KT 1⋅T 2

1T 1 p⋅ 1

T 2 p

.

Following, the function to be transformed, will be divided into simpler parts, to enable

the use of conversion tables presented in the Appendix.

W pp=

KT 1⋅T 2

p⋅ 1T 1p⋅ 1

T 2 p

=C 1

p

C 2

1T 1p

C 3

1T 2 p

The coefficients are calculated as follows:

C 1∣s=0=p⋅ K

T 1⋅T 2

p⋅ 1T 1 p⋅ 1

T 2 p

−p⋅C 2

1T 1 p

−p⋅C 3

1T 2 p

=K ,

C 2∣s=− 1T 1

= 1T 1 p⋅ K

T 1⋅T 2

p⋅ 1T 1 p⋅ 1

T 2p

− 1

T 1p ⋅C 1

p− 1

T 1p ⋅C 3

1T 2 p

=K⋅T 1

T 2−T 1,

Page 6: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

C 3∣s=− 1T 2

= 1

T 2 p⋅ K

T 1⋅T 2

p⋅ 1T 1p ⋅ 1

T 2p

− 1

T 2 p⋅C 1

p− 1T 2 p⋅C 2

1T 1 p

=K⋅T 2

T 1−T 2.

As the following step, the z- transformation from the function

MW z =1−z−1⋅z{C 1

p

C 2

1T 1p

C 3

1T 2 p} ,

could be made, using in Appendix 2 given conversion table for this, after what the last

equation represents in the form:

MW z =1−z−1⋅{ C 1

1−z−1C 2⋅z

z−e−

T0

T1

C 3⋅z

z−e−

T 0

T 2 } .

After introducing simplifications, the z-transfer function represents as

MW z=C1⋅[1−e

−T0

T1e−

T0

T2⋅z−1e−

T0

T1⋅e−

T0

T2⋅z−2]C 2⋅[1−1e−

T0

T2⋅z−1e−

T0

T2⋅z−2]C3⋅[1−1e−

T 0

T 1 ⋅z−1e−

T 0

T 1⋅z−2]

1−e−

T 0

T 1e−

T 0

T 2 ⋅z−1e−

T 0

T 1⋅e−

T0

T2⋅z−2

.

After some transformations, in process of which all member are arranged by the z-

order, the equations for the calculation of parameters could be explained, proceed

from the equation (6.8)

b0=C 1C 2C 3

b1=−C 1⋅e−T 0

T 1e−T 0

T 2−C 2⋅1e−T 0

T 2 −C 3⋅1e−T 0

T 1

b 2=C 1⋅e−T 0

T1−T 0

T 2C 2⋅e−T 0

T 2C 3⋅e−T0

T1

a 2=e−T 0

T 1−T0

T2

a 1=−e−T 0

T 1−e−T 0

T 2 .

To substantiate the correctness of calculated parameters the following relation is

valid:

Page 7: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

K= ∑ b1∑ a

.

NB! The test calculation is effective only if sufficient number of decimal places is

considered in calculations. Usually it is sufficient to consider three-four decimal

places.

NB! All parameters are depending on the quantification period, therefore large

quantification period could turn the system unstable.

6.1.2.2. Description of a discrete system with delay block

In case, if the system has a pure delay block, the delay time of which could be

expressed by the relation

T h=v⋅T 0 , (6.12)

where v=1, 2... , then the z-transfer function could be expressed in the form:

MW z =M z ⋅W z ⋅z−v (6.13)

and the difference equation in the form

y k a1⋅y k−1...am⋅y k−m=b0⋅sk−v b1⋅sk−v−1...bm⋅sk−v−m .

(6.14)

6.1.3. Relation between z-transformation and difference equation

In the difference equation, the values of signals at different time moments are

considered, or, shifting or delay blocks could describe the system, what is represented

graphically in figure 6.2.

Figure 6.2. Concept of a shifting block

Example 6.7.

Let it be given a 2. -order z-transfer function

z-1

T0

y(z) y(z) z-1

y(k) y[(k-1)T0]

Page 8: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

MW z = y z s z

=b 0b1⋅z−1b 2⋅z−2

1a 1⋅z−1a 2⋅z−2 ,

which could be represented in form

y z a1⋅y z ⋅z−1a2⋅y z ⋅z−2=b0⋅s z b1⋅s z ⋅z−1b2⋅s z ⋅z−2 .

Proceeding from the relation presented in figure 6.2., the 2. order z-transfer function

represents as difference equation in form:

y k a1⋅y k−1a2⋅y k−2=b0⋅s k b1⋅sk−1b2⋅s k−2 .

6.2. Stability of discrete system

Stabiliy criterion of a discrete system is based on the maximums of the transfer

function or on the solution of the characteristic equation and it is formulaed as

follows: [3], [6], [10].

Discrete system is stable, if the solutions of the characteristic equation of its transfer

function locate inside of the circle on the complex plane, the centre of which is the

zero-point of the plane and the radius is 1.

Example 6.8.

Let t be given a z-transfer function

MW z = 1z2−0.3⋅z0.5 ,

the solutions of the characteristic equation of which are

z1=0.15 j⋅0.691z2=0.15− j⋅0.691 .

Presented graphically

Figure 6.3. Pole-zero diagram on the z-plane

Page 9: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

Similar to the frequency-space diagram it is possible to read from this diagram the

natural frequency of oscillations and damping factor an in accordance with defined

above one could conclude, that one has to do with a stable oscillating system, the

damping rate of which is about 0.25. The transient characteristic of the above

mentioned system is given in figure 6.4.

Figure 6.4. Transient characteristic of a discrete system

6.3. State equations

In the first divisions the state equations were considered, which suited well for the

description of MIMO-systems, however, for the application with he considered up to

here control methods they have not been rational, so as belongig to the PID-family

regulators of relay action were able to control simultaneously one outout value only.

Therefore, for the control of MIMO-systems would it be necessary to add one

regulator for each output value, wherewith large systems became complicated. As

modern control method the state regulator is used, witch represents itself a micro-

controller (computer, provisionally), which is able to control (conditionally) several

outputs simultaneously (Figure 1.22). For the determination of suitable for the state

regulator algorithm the describing the system state equation should be presented first,

however, here we are limiting ourselves with the synthesis of PID-regulators. [10].

6.3.1. State equation from the differential equations

Abstract form of the differential equation decribing a real system is the following0⋅y t 1⋅y t ...n⋅y n t =0⋅s t . (6.15)

Denoting state variables as x and making replacements in equation (6.15)

Page 10: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

y t =x1

y t =x2

...y n−1t =xn

(6.16)

and, based on the relations following (6.16)

x1= x2

x2= x3

...

xn=−0

n⋅x1−

1

n⋅x2−...−

n−1

n⋅xn

0

n⋅s

(6.17)

the equation (6.15) could be expressed in matrix form

[ x1

x2

⋮xn]

x

=[0 1 0 0 0 1 ⋮ ⋮ ⋮ ⋱

−0

n−1

n−2

n]

A

⋅[ x1

x2

⋮xn]

x

[0 0 0 0 0 0 ⋮ ⋮ ⋮ ⋱0

n0 0 ]

B

⋅[ s0⋮0]u

. (6.18)

This equation is called system equation, and the second state equation – the output

equation is expressed as follows:

y=C⋅xD⋅u . (6.19)

To obtain from the system equation (6.18) the system equation of a discrete system

the transformation formula are used, deduction process of which is here not described

The discrete system matrix expresses [10]

A=eA⋅T 0=EA⋅T 0A2⋅T 0

2

2!A3⋅

T 03

3!...An⋅

T 0n

n!(6.20)

and input matrix as

B=E⋅B⋅T 0A⋅B⋅T 0

2

2!A2⋅B⋅

T 03

3!...An⋅B⋅

T 0n1

n1 !. (6.21)

In the practice it is noticed, that the series could be limited by 8 members [10].

6.3.2. State equations from the difference equations

If the system is described by difference equation

Page 11: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

y kna1⋅y kn−1...an⋅y k =b0⋅s kn...bn⋅s k , (6.22)

the, similar to the equation system (6.16) replacements are possible

y k =x1k y k1= x2k =x1k1 ...y kn−1=xnk =xn−1k1 y kn =xn k1

. (6.23)

Placing equation (6.23) into equation (6.22) and taking bn=1 and bin=0 one could

express

xn k1=−a1⋅xnk −a2⋅xn−1k −...−an⋅x1k s k . (6.24)

Presenting the equations (6.23) and (6.24) in matrix form

[ x1k1x2k1⋮

xnk1]xk1

=[ 0 1 0 0 0 1 ⋮ ⋮ ⋮ ⋱−an −an−1 −a n−2 ]

A

⋅[ x1k x2k ⋮

xnk ]

xk

[0 0 0 0 0 0 ⋮ ⋮ ⋮ ⋱1 0 0

]

B

⋅[ s k 0⋮0 ]

uk

. (6.25)

The presumption of the deduction process of the output equation is the fact, that

bin≠0 and, considering only the variable y (k) as output variable, the equation could

be expressed as follows: [10]

y k = [bn−b0⋅an bn−1−b0⋅an−1 ... b1−b0⋅a1]C

⋅[ x1k x2k ⋮

xnk ]b0

D

⋅s k . (6.26)

The equations (6.25) and (6.26) could be represented graphically with the block

diagram of general state equations (figure 6.5), or as structure diagram (figure 6.6)

A

yCB

D

s

xx'

Page 12: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

Figure 6.5. Block diagram of state equations

Figure 6.6. Presentation of state equation as structure diagram

6.3.3. State matrixes of a system with delay block

If to consider a system from the output side, the, mathematically it does not matter, in which stage the delay occurs in the system, therefore in sake of explicit description the delay block or stage is represented in the input of the structure diagram. In other words – the input variable starts to affect the system after passing delay block. They must be reflected in state equations as well [10].

Example 6.9.

Le it be given a structure diagram of a 3.order system with delay block

Figure 6.7.Structure diagram of a 3. -order process with 2.-order delay block

z-1z-1z-1s(k)

b0

b1

bn-1

bn

an

an-1

a1

1

y(k)

x1(k)x

2(k)x

n(k)x

n(k+1)

-

z-1z-1z-1s(k)

b1

b2

b3

a3

a2

a1

z-1

y(k)

x1(k)x

2(k)x

3(k)x

4(k)

-z-1

x5(k)

x5(k+1) x

4(k+1) x

3(k+1) x

2(k+1) x

1(k+1)

Page 13: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

Based on the structure diagram it could be written,

[x1k1 x2k1 x3k1 x4k1x5k1

]=[ 0 1 0 0 00 0 1 0 0−a3 −a2 −a1 1 0

0 0 0 0 10 0 0 0 0

]⋅[x 1k x 2k x 3k x 4k x 5k

][00001]⋅s k

y k =[b3 b2 b1 0 0 ]⋅[x1k x2k x3k x4k x5k

] .

On the bases of this example, it cold be concluded, the order of the state matrixes is

determined by the sum of the orders of the process and of the delay block.

6.3.4. State equation of the MIMO-systems

A MIMO-system could also be described by a block diagram presented in figure 6.5,

but in the interests of better observability, the paths of signals between inputs-outputs

are presented as insulated [10].

Figure 6.8. Block-diagram of a MIMO-system

The state equation of this system are expressed as follows

E z-1

A11

y1C

11B

11

D11

s1

x11

(k+1)

E z-1

A21

C21

B21

D21

E z-1

A12

C12

B12

D12

E z-1

A22

y2

C22

B22

D22

s2

x21

(k+1)

x12

(k+1)

x22

(k+1) x22

(k)

x12

(k)

x21

(k)

x11

(k)

Page 14: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

[ x11k1 x12k1 x21k1 x22k1 ]=[

A11 0 0 00 A12 0 00 0 A21 00 0 0 A22

]⋅[ x11k x12k x21k x22k

][B11 00 B12

B21 00 B22

]⋅[ s1k s2k ] (6.27)

[ y1 k y 2k ]=[C11 0 C 21 0

0 C 12 0 C 22]⋅[ x11k x12k x21k x22k

][D11 D12

D21 D22]⋅[ s1k s2k ] . (6.28)

Alternatively – the state matrixes of the entire system consist of the matrixes of

subsystems

6.4. Calculation of discrete systems

Tha calcukation of the discrete system is on the finite ncremens based or all vales of state variables are determined during a given time interval

Example 6.10.

Let it be given a z-transfer function

MW z = 0.2⋅z−1

1−0.8⋅z−1⋅z−1 .

represented as difference equation it expresses as

y k −0.8⋅y k−1=0.2⋅s k−2 .

In addition, the initial conditions of the system are determined as follows:

s k =1, kui k≥0y k =0, kui k0 .

Based on this, the following table could be completed:

Page 15: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

k s(k) y(k)0 0 01 0 02 1 0.23 1 0.364 1 0.495 1 0.596 1 0.677 1 0.738 1 0.79

Joonis 6.9. Diskreetne hüppekaja

6.5. Identification of the control object

One of most important subjects of the automatic control domain is the identification of the control object or the determination of its parameters. In the 2. division the description of different possible processes by differential equation was considered,

where as parameters appeared to be the s.c. label values of the object under study. Such metod is suitable for application when these parameters are constant, what does not reflect in real systems – the resistance of the electric motor depends on the temperature and on the induced by control frequency effects. Also it presumes, that the characteristics of all parameters of the device , wih te dependances on their disturbance sources, could be found in some catalogues – this also doe not correspont to reality. Therefore for precise identification the potentialities of the mathematical analysis are applied, in the process of which the paramaters of the object are deduced on the assumption of input and output signals. This alo enables the creation of self-.adjusting systems [10]

For the identification mostly the sine signals or random signal with fixed mean are

used. By this signal the influences of the energy storages hiding in the studied object

are reflected more clearly than by step function. In the study process one has to

consider the measurement error, for the compensation of which for the object more

equations is expressed than the order of the object.

m≥2⋅n1 , (6.29)

where n – order of the control object

Page 16: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

The member in the brackets (1) of the equation (6.29) is used when the disturbances

matrix D≠0 .

Thus, about the studied object could it be written

y k =−a 1⋅y k−1−a2⋅y k−2−...b0⋅s k b 1⋅s k−1... (6.30)

y k−1=−a1⋅y k−2−a2⋅y k−3−...b0⋅s k−1b1⋅s k−2... (6.31)

y k−m =−a1⋅y k−m−1 −a2⋅y k−m−2 −...b0⋅s k−m b1⋅s k−m−1 ...

(6.32)

Proceeding from the equations (6.30)...(6.32) it could be written for the entire system

in the matrix form

[ ykyk−1⋮yk−m]

y

=[−y k−1 −y k−2 − yk−n sk −y k−2 −y k−3 − yk−n−1 sk−1 ⋮ ⋮ ⋮ ⋮ ⋮ ⋮−y k−m−1 −y k−m−2 ⋯ − yk−m−n sk−m ]

⋅[a1

a2

⋮bn]

(6.33)

Based on the equation (6.33) it is valid

y=⋅ , (6.34)

from which it is possible to express

=−1⋅y . (6.35)

If more equations are expressed than the number of unknowns in the parameter vector

Θ, then these unknowns could be found by an algorithm, which is called minimal

error quadrate. For that, the comparison diagram of the process model could be

composed, which is presented in figure 6.10. On the basis of this figure it could be

found, that:

Θ

Θm

s(k) e(k)+_

ym(k)

y(k)Protsess

Mudel

Page 17: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

Figure 6.10. Identification of an object

e k =y k −⋅m (6.36)

According to the algorithm of minimal error quadrate one can express

∂∂m∑

i yk−⋅m

2=0 , (6.37)

Which, after transformation wall expressed in final form as:

m=T⋅−1⋅T⋅y . (6.38)

Given identification method is rational in case, when in the process of the

investigation of the control object the disturbances are eliminated [10].

Example 6.11.

In the table below the input and output values of a 1.order object, which contains also

a delay block T h=2⋅T 0 are presented: Find the coefficients of the transfer function,

k 0 1 2 3 4 5 6 7 8 9 10y(k) 0 0 0 1.0 1.0 1.2 1.4 1.6 1.8 2.1 2.05s(k) 1 0.5 0.7 0.8 0.9 1.0 1.2 1.0 1.7 1.3 1.1

The transfer function of the investigated object is

MW z =b1⋅z−1

1a 1⋅z−1⋅z−2

The number of equations required for the determination of parameters is

m≥2⋅11=3 .

To apply the minimal error quadrate algorithm in the solution, on the basis of 4

equations the vectors y and Ψ. are expressed:

y=[2.052.11.81.6 ] , =[−2.1 1.0

−1.8 1.2−1.6 1.0−1.4 0.9] .

The parameters sought could be found from the equation (6.38)

Page 18: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

m=[−2.1 −1.8 −1.6 −1.41.0 1.2 1.0 0.9 ]⋅[−2.1 1.0

−1.8 1.2−1.6 1.0−1.4 0.9]

−1

⋅[−2.1 −1.8 −1.6 −1.41.0 1.2 1.0 0.9 ]⋅[2.05

2.11.81.6 ]

m=[a 1

b1]=[−0.51 ] .

6.6. Digital PID-regulator

According to the description mode of time-continuous systems the discrete automatic

control system also coukd be presented as abstract structure diagram (figure 6.11).

Also arevalid mathematical relations between state variables of the system.

Figure 6.11. Discrete automatic control system

For time-continuous systems it is valid

e t =s t −y t , (6.39)

u t =K R⋅[e t 1T I⋅∫

0

e t dtT D⋅ddt

e t ] . (6.40)

For systems with short quantifying periods it holds [10]

e k =s k −y k , (6.41)

u k =K R⋅[e k T 0

T I⋅∑

i=0

k−1

e i T D

T 0⋅e k −e k−1] , (6.42)

u k−1=K R⋅[e k−1T 0

T I⋅∑

i=0

k−2

e i T D

T 0⋅e k−1−e k−2] . (6.43)

Deleting equations (6.42) and (6.43) and simplifying it is possible to eliminate the

integration, which reduces required amount of memory of the discrete control device.

Juht-seade

Juhtimis-

s(k) y(k)u(k)e(k)

-

n(k)

Page 19: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

u k =u k −u k−1 =K R⋅[1 T D

T 0 ]⋅e k K R⋅[T 0

T I−1−

2⋅T D

T 0 ]⋅e k−1 K R⋅T D

T 0⋅e k−2 . (6.44)

Denoting

q 0=K R⋅[1T D

T 0 ] , q 1=K R⋅[ T 0

T I−1−

2⋅T D

T 0 ] , q 2=K R⋅T D

T 0(6.45...6.47)

could equation (6.44) be expressed in the form

u k =q 0⋅e k q 1⋅e k−1q2⋅e k−2 (6.48)

and the actual control action could be calculated by the formula

u k =u k−1 u k . (6.49)

z-transfer function of a PID-regulator could be deduced from the equation (6.48) and

it is expressed as follows

W z =u z e z

=q 0q1⋅z−1q2⋅z−2

1−z−1 . (6.50)

Similar to the deduction process of he PID-regulator discrete P-regulator could be

expressed

u k =K R⋅[e k −e k−1 ] (6.51)

and also a PI-regulator

u k =K R⋅[e k −e k−1 T 0

T I⋅e k−1] . (6.52)

6.7. Adjustment of a regulator by the localised synthesis of the poles

The poles of the transfer function or zeros of the characteristic equation are given in case, if it is desired, that the dynamic propertieas of the system should meet the given quality requirements precisely.

Z-transfer function of the control object presented in figure 6.11. in general form is

presented as follows

MW z = y z u z

=b 0b1⋅z−1...b n⋅z−n

1a 1⋅z−1...a n⋅z−n⋅z−v=B z A z

⋅z−v (6.53)

Page 20: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

and z-transfer function of the control device

W R z =u ze z =

q 0q 1⋅z−1...q⋅z−

1p 1⋅z−1... p⋅z−=

Q z P z . (6.54)

To determine the orders of the divisor and of the dividend of the regulator’s transfer

function and the number of poles to be calculated, the following relations could be

expressed:

=n , =nv , p==2⋅nv . (6.55...6.57)

On the basis of equations (6.53) and (6.54) the transfer function of the whole systems

could be expressed related to the control:

W z =

Q zP z

⋅B z A z

⋅z−v

1Q z P z ⋅

B z A z ⋅z−v

=Q z⋅B z ⋅z−v

P z ⋅A z Q z ⋅B z ⋅z−v=B∗ z A∗ z . (6.58)

Thus, the characteristic equation is

P z ⋅A zQ z ⋅B z⋅z−v=0 . (6.59)

In case of the system without permanent error the following must be valid: P z ⋅A z=0 , (6.60)

when the following relation also is valid:

∑ pi=−1 . (6.61)

To calculate the coefficients of the polynomials P (z) and Q (z) the poles will be given

A∗ z = z− z1⋅ z− z2⋅...⋅ z−z p , (6.62)

which, after opening of the brackets could be expressed in form

A∗ z =11⋅z−12⋅z−2...p⋅z−p . (6.63)

Applying the similarity principle of the polynomial coefficients the members pi and qi.

of the characteristic equation could be found

Example 6.12.

Let it be given a 2. order transfer function with a delay block Th = T0, the transfer

function of which expresses as follows

Page 21: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

MW z =b1⋅z−1b 2⋅z−2

1a 1⋅z−1a 2⋅z−2⋅z−1 .

The order of the dividend of the regulator

=n=2 ,

the order of divisor

=2⋅nv=2⋅11=3

and the required number of poles to be given

p==23=5 .

Proceeding from the above, the transfer function of the regulator

W R z =q 0q 1⋅z−1q2⋅z−2

1p 1⋅z−1 p2⋅z−2p 3⋅z−3 .

On the bases of these transfer functions it is possible to express the characteristic

equation of the whole system, aligned by orders

A∗ z=1a1p1⋅z−1a2 p2a1⋅p1b1⋅q0⋅z−2 p 3a2⋅p1a1⋅p2b2⋅q0b1⋅q1⋅z−3a2⋅p 2a1⋅p3b2⋅q1b1⋅q2⋅z−4

a 2⋅p3b2⋅q 2⋅z−5=0

Specifying the poles characterising the desired progress of the process

A∗ z =11⋅z−12⋅z−23⋅z−34⋅z−45⋅z−5=0

it is possible to present 5 equations for 6 unknowns. The missing equation will be

found on the basis of the equation (6.61). Thereafter, on the basis of the comparison

of the polynomial coefficients one may express

[1 0 0 0 0 0a 1 1 0 b 1 0 0a 2 a 1 1 b 2 b 1 00 a 2 a1 0 b 2 b 1

0 0 a2 a 1 0 b 2

1 1 1 0 0 0]

G

⋅[p1

p 2

p3

q 0

q1

q 2

]

d

=[1−a1

2−a2

3

4

5

−1]

e

and the parameters of the regulator could be expressed in the form:

Page 22: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

d=G−1⋅e .

6.8. Self-adjusting PID-regulator

It is known from previous divisions, that the adjustment of a regulator is always

accompanied with large amount of calculations, which, in addition, is followed by

after-optimisation, and in result of it the regulator will be adjusted to the system

parameter values, by which the possible shifts of their values or disturbances are not

taken in consider. Of course, based on CHR-method it is possible to achieve improved

reaction to the disturbances, however, even in this case the regulator was synthesised

with fixed parameters.

To reduce the labour consumption of the synthesis and to enable the reconfiguration

of the system in the operational cycle, it is possible to compose a self-adjusting

regulator, applying the mathematics of discrete systems. This, in turn, puts some

requirements to the hardware of the regulator, which should be Multitasking or

Multiprocessor system. The design of the system, independent on the hardware

structure, corresponds to the given in figure 6.12 [10]

Figure 6.12. Structure diagram of a self-adjusting automatic control system

In case of self-adjusting systems, the object will be identified first and thereafter the

synthesis according to the programmed algorithm takes place. The identification

could be made by methods considered in the division 6.5 or by some other algorithm,

but as a result, the coefficients of the polynomials of the transfer function of the

process are obtained. In addition, the synthesis could be made by the method shown in

division 6.7, but also the CHR –methods are easy to realise.

Juht-seade

Juhtimis-

s(k) y(k)e(k)

±

Süntees

Identifit-

seerim

u(k)

Kvaliteedinõuded

Page 23: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

For the adjustment by CHR-method there was required as prerequisite the presence of

the process characterising parameters [10]. These parameters were

� gain of the process KP;

� time delay of the process TH;

� time constant of the process T0.

The gain KP is determined after the stabilisation of the output by the formula

K P= y k sk . (6.64)

To determine the time constants the location of the tangency point must be found,

what for the maximal ascent of the process will be determined. In that point where the

transient characteristic has the maximal ascent, the transfer from the accelerating

growth of the process to the decelerated growth of the process occurs. At the same

point also the impulse response has the maximum value, however, mathematically it

could be expressed as:

=y k1−y k

T 0. (6.65)

At k the ascent of he transient characteristic is maximal max . Based on this point

as delay time as well as the time constant of the system could be calculated

T H=T 0⋅max−y k max

(6.66)

T 0=T 0⋅maxK P⋅s ∞− y k

max−T H (6.67)

Page 24: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

Exercises to the chapter 6.

Exercise 15.

It is given a system describing differential equation

0.1⋅y t 1.1⋅y t y t =2.25⋅st .

Find the difference equation and z-transfer function of the system

if T0 = 0.01 s, 0.1 s, 1 s.

Exercise 16.

The parameters of a DC-motor of separate excitation are

� Armature resistance of the motor 2.23 Ω;

� reactance 0.214 H;

� motor constant 1.34 Vs;

� lag of the armature 0.032 kgm².

Find the state equation of the DC-motor given in Example 2.1 and transform the state

matrix and control matrix to the discrete form, if T0 = 0.01 s. To complete the series

after third member

Exercise 17.

It is given z-transfer function of a system

MW z = 0.8⋅z−11.4⋅z−2

10.02⋅z−10.08⋅z−2⋅z−1 .

Find:

� Gain of the system KP;

� Decide about the stability of the system;

� Difference equation of the system;

� Transient characteristic for 10 first time moments, if the preconditions are

s k =2, kui k≥0y k =1, kui k0 .

Exercise 18.

Page 25: 6. DISCRETE SYSTEMS - ttu.ee · 6. DISCRETE SYSTEMS Under discrete systems, those systems are meant, which are considered in discrete time or those that are not considered continuous

In the following table the measurement results of a 2.order object are given Based on

the minimal error quadrate find the polynomial coefficients of the system a1, a2, b1 and

b2.

k 0 1 2 3 4 5 6 7 8 9 10s(k) 1 1,2 0,6 1,9 1,9 1,2 1,1 0,9 1,4 1,6 1y(k) 0 0,8 2.344 2.049 2.132 3.973 3.370 2.175 1.947 2.167 3.041