Predictive Control 1785482629, 9781785482625

Predictive Control is aimed at students wishing to learn predictive control, as well as teachers, engineers and technici

636 97 16MB

English Pages 300 [290] Year 2017

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Predictive Control
 1785482629, 9781785482625

Table of contents :
Cover
Predictive Control
Copyright
Preface
1 Principle
2 Control Law
3 Process Models
4 Implementation
5 Setting of Stable Systems
6 Setting of Integrating Systems
7 Performances and Setting
8 Conclusion
Appendix
Bibliography
Index
Back Cover

Citation preview

Predictive Control

Series Editor Jean-Paul Bourrières

Predictive Control

Daniel Lequesne

First published 2017 in Great Britain and the United States by ISTE Press Ltd and Elsevier Ltd

Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced, stored or transmitted, in any form or by any means, with the prior permission in writing of the publishers, or in the case of reprographic reproduction in accordance with the terms and licenses issued by the CLA. Enquiries concerning reproduction outside these terms should be sent to the publishers at the undermentioned address: ISTE Press Ltd 27-37 St George’s Road London SW19 4EU UK

Elsevier Ltd The Boulevard, Langford Lane Kidlington, Oxford, OX5 1GB UK

www.iste.co.uk

www.elsevier.com

Notices Knowledge and best practice in this field are constantly changing. As new research and experience broaden our understanding, changes in research methods, professional practices, or medical treatment may become necessary. Practitioners and researchers must always rely on their own experience and knowledge in evaluating and using any information, methods, compounds, or experiments described herein. In using such information or methods they should be mindful of their own safety and the safety of others, including parties for whom they have a professional responsibility. To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume any liability for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions, or ideas contained in the material herein. For information on all our publications visit our website at http://store.elsevier.com/ © ISTE Press Ltd 2017 The rights of Daniel Lequesne to be identified as the author of this work have been asserted by him in accordance with the Copyright, Designs and Patents Act 1988. British Library Cataloguing-in-Publication Data A CIP record for this book is available from the British Library Library of Congress Cataloging in Publication Data A catalog record for this book is available from the Library of Congress ISBN 978-1-78548-262-5 Printed and bound in the UK and US

Preface

Predictive control is a general technique that can take on many aspects, as it can be adapted to the whole spectrum of automatic control (single or multivariable control, space state control, consideration of constraints, nonlinear systems, robotics, etc.) not to mention the variety of processes that can be controlled. This work is part of a narrower industrial context, as it relates to single-variable processes (SISO: single input single output) and proposes all the practical ingredients required for an easy implementation that leads to simple control. Chapter 1 recalls the specificity of predictive control and sets the context: the need to have a process model in order to predict future evolution. Chapter 2 focuses on the study of control laws, from the principles to obtaining the relations characterizing the controller: U = f(C,M) (U = command, C = set-point, M = measure). The study relates to stable systems, and simple and double integrating systems. Chapter 3 presents the main process models that can be employed: they are given in terms of sampling transfer function as well as in the form of implementation algorithms (pseudo-code). Chapter 4 relates to implementation, which involves obtaining a controller in two forms: – RS or RST type of controller in z–1; – overall controller algorithm (in pseudo-code) for industrial implementation. Chapters 5 and 6 relate to the setting of stable systems and integrating systems.

x

Predictive Control

Chapter 7 approaches the practical reality of control, taking into account the constraints: limitations, nonlinearities and influence of the model. Finally, in the Conclusion, the conclusion on loop control using summary synthesis tables that show the homogeneity of settings over a wide range of processes is presented. This is above all a practical guide, which proposes a simple predictive controller that can be employed in many industrial applications. It is addressed to students who wish to learn the basics of predictive control as well as to teachers, engineers and technicians active in this field. Daniel LEQUESNE April 2017

1 Principle

Predictive control is a general technique that relies essentially on the capacity to predict how processes behave in order to better correct them. The correction is provided by a controller: this is the case for a classical control loop, in which the controller receives a setpoint value C and measure M of the quantity to be controlled; it provides a command U that controls the process. The loop is represented in Figure 1.1 where the input X symbolizes the eventual external disturbances. X C

CONTROLLER

U

PROCESS

M

Figure 1.1. Control loop

The specificity of predictive control resides in the calculation of what will be measured in the future and its consideration in order to determine the command for obtaining the given desired trajectory corresponding to a setpoint value. This results in the following points: – it is not possible to know a future measurement unless a representation model of the process is available; – a future moment implies a present moment: the controller is numerical, with a sampling period Te; at each Te, the command U is recalculated; – the trajectory is defined by the user and it is a way of representing the performances to be obtained.

2

Predictive Control

1.1. Trajectory The trajectory is defined relative to the (desired) setpoint and the measure on the process as shown in Figure 1.2. Instant k is the present instant; the trajectory represents the desired evolution of the measure starting from its current value M(k) to a final value that is equal to the setpoint. The represented setpoint corresponds to the current instant, C(k), and it is supposed constant during the future period, since it is the aimed value. If the setpoint varies, it will have a new value at the next instant, and this value will be the new aim, being supposed constant during the prediction. At each Te, there is a desired trajectory of amplitude C(k) – M(k), therefore variable. S C(k) Desired trajectory

M(k)

t (tfuture)

Process measure

Figure 1.2. Desired future trajectory at instant k

If the measure is stabilized at the setpoint and a setpoint step ΔC is applied, the trajectory of amplitude ΔC represents the desired process response in tracking mode. It is characterized by its form and its response time. In practice, a first-order exponential response is often chosen due to its simple and well-known form: S(t) = ΔC [1 – exp(–t/T)] or the sampling form: S(nTe) = ΔC [1 – exp(–nTe/T)]

Principle

3

T is the desired time constant which allows us to obtain a response time (at 95%): tr = 3T.

S 0.05ΔC

C(k) 0.63 ΔC

ΔC M(k) 0

T

Te

2Te

3Te

4Te

3T

t

5Te

Figure 1.3. Exponential trajectory

Chapter 5 (Setting of Stable Systems) provides other elements on the choice and role of trajectories. 1.2. Models Most control methods use a process model. Even the Proportional Integral Derivative (PID) controllers use a process model to calculate their actions. Compared to predictive control, there is a structural difference. When using classical methods, the model is on paper; it results from identifying the process that allows its characterization and the calculations on paper that yield the control formulas. In the best-case scenario, these calculations can be computerized and lead to an automated control of the controller. In predictive control, the model is embedded in the controller and it operates in real time: the model measure (which is equal to the process measure if the model is “perfect”) at each sampling period is known and its future evolution can be calculated in order to better correct the action of the controller. It leads to the block diagram is shown in Figure 1.4. There are two types of models: realigned or independent, as shown in Figure 1.5. In the realigned model, the output is permanently reset on the process.

4

Predictive Control

X

MODEL C

U

CONTROLLER

M

PROCESS

Figure 1.4. Predictive controller

U

Measure M

Process

U

Process

Sm

Model

Measure M

Sm

Model

Figure 1.5. Realigned model (on the left) and independent model (on the right)

1.2.1. Stable systems Counterintuitively, the independent model yields better results and it will be used to simulate stable processes. In this book, the study of stable processes is limited to Strejc models, with an eventual inverse response, with and without delay. 1.2.2. Unstable systems This direct approach to modeling is not adequate for unstable processes. In a closed loop, the implementation is reflected by compensation of an unstable pole by an unstable zero, which does not work in practice [BOR 93]. The remedy is to decompose the unstable model Mi into two stable models M1 and M2 as shown in Figure 1.6. It is worth noting that the sign + of the M2 feedback is rather recommended as an indicator of the unstable aspect of the model. U

Mi

Sm



U

M1

Sm

+ +

M2 Figure 1.6. Decomposition of an unstable model into two stable models

Principle

5

The equivalence is expressed by the relation: Mi =

M1 1 − M2

This relation offers several choices, the most simple of which is to choose a firstorder M2, and then deduce M1 from the equivalence relation. The method involves replacing the input of M2 (which is the model output) with the measure M of the process as shown in Figure 1.7. This is a type of realigned model. U

M

Unstable process M2 M1

+

Sm

+

Figure 1.7. Unstable process modeling

This approach presents the advantage that it can be extended to more complex models of the type: Mi(p) = I(p). Ms(p) where I(p) is an unstable model and Ms(p) is a stable transfer function. Let us consider the example of an integrating system with Strejc model and inverse response:

Mi(p) =

T

(

T )

with I(p) =

T

and

Ms(p) =

(

T )

The integrating part I(p) will be modeled according to the method shown in Figure 1.6, by choosing a first-order M2: M2(p) =

T

⤇ M1(p) =

T T

T

A time constant Ta can be chosen (see Chapter 6). The stable part Ms(p) will be added in series on the command U. The result is presented in Figure 1.8.

6

Predictive Control

U

Ta 1 1 − θp Ti (1 + Ta p) (1 + Tp)n

+

Sm

+

1 1 + Ta p

M

Figure 1.8. Modeling an integrating system with Strejc model and inverse response

1.2.2.1. Case of a system with two unstable modes This is notably the case of two integrators in series (or of a double integrator) with the transfer function: Mi(p) =

1 Ms(p) Ti1 Ti2 p

The same decomposition according to the principle presented in Figure 1.6 can be applied here, which leads to the diagram in Figure 1.9, where Ms is the eventual stable part. U

Ms

MA1

SmA

+

MB1

Sm

+ +

+

MA2

MB2

Figure 1.9. Initial decomposition of a double integrating system

The system equations can be written as: = MB1.SmA+ MB2.Sm { Sm SmA = MA1.Ms.U + MA2.SmA

A relation of the following form should be obtained: Sm = Ms.MA1.MB1.U + F.Sm where F depends only on MA2 and MB2. This yields: F = MA2 + MB2 – MA2.MB2

Principle

7

The diagram in Figure 1.10 is obtained, where the input Sm of the block F is replaced by the measure M.

U

MS

MB1

MA1

Sm

+ +

M

F Figure 1.10. Modeling of a double integrating system

Similar to the simple integrator, a choice can be made between MA2 and MB2 of first order: MA2 =

MB2 =

T

T

F is a second-order function, and by analogy with the simple integrator, we should decompose F into simple elements of first order; subsequently MA1 and MB1 can be deduced: F=

K

+

T

MA1 =

K

with Ka =

T

T T

MB1 =

T

T T

T

and Kb =

T T

T

T T

T

The diagram in Figure 1.11 is obtained.

U

1 Ta Tb Ms(p) Ti1 Ti2 (1 + Ta p)(1 + Tb p) M

M

Ka 1 + Ta p Kb 1 + Tb p

+ +

Sm

+ +

Figure 1.11. Example of double integrating system modeling

8

Predictive Control

1.2.2.2. Case of pure delay Pure delay can be represented by a R(p) = e R block in series with the model: we must position it in the direct branch (input U) so that the feedback branch remains the same, with or without delay, according to Figure 1.12. It should, however, be noted that the delay is present in the feedback branch, as the measure M is then delayed. U

Mi(p).R(p)

Sm



U

M1

R(p)

Sm

+ +

M2

M

Figure 1.12. Modeling of an unstable system with delay

1.3. Prediction As the word suggests, prediction is the essential aspect of predictive control. It takes many forms, depending on the context related to the command (actuator) and to the setpoint. This work focuses on the most simple and common case in industrial control: – the command of the actuator is fitted with a zero-order locking device (command maintained during the duration Te of a sample); – the setpoint is supposed to vary in steps (as opposed to ramp setpoints, for example), which means that performances will be evaluated in terms of step response both in tracking (setpoint step) and in control (disturbance step). In these conditions, prediction involves calculating what will be the measure on the model after a certain number h of samples Te, supposing that the command remains constant during the h samples. This calculation is executed at each Te: at the next sample, the calculation will be executed with the new command supposed constant during the new h samples. For the sake of clarity, let us consider the well-known case of a first-order system with time constant T and static gain K. When the system is in a steady state (S = 0) and a step U is applied, the response is known to be exponential: S(t) = K. U(1 − exp(− ) T

Principle

9

This is known as forced response, and it generally results from lookup tables of Laplace transforms: they imply null initial conditions. In this case, the measure after h samples can be calculated: S(hTe) = K. U(1 − exp(−

T T

)

If the system undergoes an evolution from an initial value S0, the response is modified. According to the superposition theorem (for linear systems), the overall response is the sum of two terms: – a forced output: this is the previous response; – a so-called free or loose output: this is the response of the system in the absence of command U (therefore, a null command U = 0): the output decreases by S0 to zero as an exponential function: S(t) = S0. exp(− ) T

The overall response becomes (Figure 1.13): S(t) = S0. exp (− ) + K. U(1 − exp(− ) T

T

And this yields the response after h samples: S(hTe) = S0. exp (−

T T

) + K. U(1 − exp(−

T T

)

If a = exp(–Te/T), then: S(h) = S0 . a + K. U(1 − a ) This calculation is executed at each Te (which becomes the zero instant), so that S0 represents the model output at the present instant k and U represents the command at the same present instant k. The output S(hTe) thus becomes the output at the instant k + h: S(k + h) = S(k). a + K. U(k). (1 − a ) The future value (at the instant k + h) has thus been obtained based uniquely on input and output, U(k) and S(k), at the present instant k.

10

Predictive Control

For systems of second or higher order, not only does the initial value modify the forced response by adding a free response, but this free response depends on how the system has arrived to this initial value S0; it is a characteristic of the order of a system, in the sense that its evolution depends on the command and on the past outputs, the dependence being stronger for higher orders. In numerical applications, the response of a system of order n depends on the last n samples and it can be said that the order of a system represents the weight of the past on its evolution; this is why it takes a controller a longer time to correct a system of higher order: the instantaneous correction applied by the controller is not the only one involved: there is also the entire weight of the past. KU Forced response t 0 S0

Free response t

0 KU S0

Overall response t

0 Figure 1.13. Free and forced response for a system of the first order

Generally speaking, the response of a system (of static gain K) after h samples can be written as a sum of two terms corresponding to two loose and forced outputs: S(h) = SLh + K. U. SFh or still: S(k + h) = SLh + K. U(k). SFh

Principle

11

The way to calculate the two terms SLh and SFh depends on how the predictive control is implemented (see Chapter 4). The following important points are nevertheless worth noting. The forced response does not depend on the past: it only depends on the present command U(k), if U is a step, and the term SFh represents the value, after h samples, of the unit forced response (U = 1) for a model of unit static gain. Knowing the model, we can calculate SFh for a given h and the calculation needs to be done only once. Examples are as follows: – order 1 (see above):

SFh = 1 − ah

– order 2 (double time constant): SFh = 1 − 1 + h

Te T

ah

In contrast, the loose response SLh depends on the past (and not only on the initial value S(k)) and represents the output of the model after h samples, when a null command is applied: the static gain does not intervene (see Figure 1.14), and the unit model F(p) (static gain = 1) can therefore be used. This calculation is to be performed at each Te. U=0

K

F(p)

Sm



KU=0

F(p)

Sm

Figure 1.14. Unit model for loose response

Only in the specific case of a system of order 1, the loose output can be written as: SLh = S(k) a And therefore, in this case, the calculation of a is to be performed only once, while SLh has to be calculated for each sample according to S(k). Note that these elements apply to stable systems, and this fact imposes no restriction, since the unstable systems are decomposed into sums of stable systems. 1.3.1. Specific case of simulation When simulating a system’s operation, a common point of interest is its evolution from a steady-state point (U0, M0). The applied command is then U – U0.

12

Predictive Control

The forced response is then K (U – U0) SFh, where the term SFh represents the value, after h samples, of the unit forced response (U – U0 = 1) for a model of unit static gain. The loose response is the free response toward the steady point M0: to calculate it, a command M0 should be applied, and not a null command: SLh represents the output of the model after h samples, when a command equal to M0 is applied to it: the static gain does not intervene either, and therefore the unit model F(p) can be used (static gain = 1). 1.3.2. Ramp prediction In the case of integrating processes, modeling leads to introducing a transfer function of first order with a time constant Ta and unit static gain, whose entry is the measure M of the process (Figure 1.8). In the case of a double integrating system, there are two elements of first order whose input is the measure M, and static gains are not equal to 1 anymore (Figure 1.11). It may be useful to know the evolution of the output Sm0, when the input M has a ramp evolution (see Chapter 2). The static gain is supposed to be different from 1 (Figure 1.15). ka 1 + Ta p

M

Sm0

Figure 1.15. Branch M of the decomposition of an integrating system into stable systems

E(t)

E,S

ka E(t)

S(t)

ΔE Te

0

t Ta

Figure 1.16. Response to a ramp of a system of the first order

Principle

The response to a ramp (of slope E(t) =

E T

t

⟹ S(t) = ka

E T

13

) of such a system (Figure 1.16) is known:

E T

[t − Ta (1 − e

T

)]

The variation over a horizon (k, k + n) can be deduced, n being the number of samples of the prediction: S(nTe) = ka ΔE[n −

T

T T

(1 − e

T

)]

This corresponds to a forced response, if it was the only one: null initial conditions. The overall response of the system undergoing evolution from an input M(k) is the sum of three terms (superposition theorem): – an output that is the forced response to the step M(k) (starting from zero): S1(nTe) = ka [M(k)(1 − e

T T

)]

– an output that is the forced response to the ramp E(t) (starting from zero): S2(nTe) = ka ΔE[n −

T T

(1 − e

T T

)]

– a loose output starting from the initial value of the model: S3(nTe) = Sm0(k)e

T T

The overall variation of the output Sm0 after n samples can be deduced: ΔSm0(nTe) = S1 + S2 + S3 − Sm0(k) Let us consider a = e

T T

and ta =

T T

ΔSm0(n) = M(k) ka(1 − a ) + ka ΔE[n − ta(1 − a )] − Sm0(k)(1 − a ) This obviously yields the flat prediction (meaning that E = constant) if ΔE = 0.

2 Control Law

2.1. Principle of predictive control As already mentioned, a model (Figure 2.1) is used to predict the value of the measure at a future instant k + h, in order to deduce the command U to be applied at present instant k, so that the real measure coincides with a reference trajectory, at least after h Te (at instant k + h): this work focuses on a single point of coincidence. U

M

Process Model

Sm

Figure 2.1. Predictive control

The reference trajectory is initialized on the present measure M(k) and its amplitude is the error between the setpoint and the measure at instant k: C(k) – M(k) If the trajectory is exponential, it is written as: T(k + t) = M(k) + [C(k) − M(k)] 1 − e

T

where Td represents the desired response time constant and t = 0 corresponds to the present instant k. If λ = exp (–Te/Td), this leads to: T(k + h) = M(k) + [C(k) − M(k)] 1 − λ

16

Predictive Control

A more general relation (valid for an arbitrary trajectory) is: T(k + h) = M(k) + [C(k) − M(k)] Th and expressed as variation: ΔMp = [C(k) − M(k)] Th where Th is the variation of amplitude on the trajectory between instants k and k + h, as mentioned in Chapter1. Trajectory

C(k) T(k+h)

Objective

ΔMp Future measure (unknown)

M(k)

k+t k

k+h

Sm(k+h)

Model

ΔSm

Sm(k)

k+t k

k+h

Figure 2.2. Prediction for a stable system

With regard to the model, the method for calculating Sm(k + h) is known, as mentioned in Chapter 1: Sm(k + h) = K U(k) SFh + SLh or expressed as variation: ΔSm = K U(k) SFh + SLh − Sm(k) If the model is “perfect”, command U(k) will generate the same variation on the model and on the process: ΔMp = ΔSm. This leads to: K U(k) SFh + SLh − Sm(k) = [C(k) − M(k)] Th

Control Law

17

The control law is thus obtained: U(k) =

T K SF

[C(k) − M(k)] +

K SF

[Sm(k) − SLh]

[2.1]

It is the control law of a nonlinear proportional controller of the form: U = A (C – M) + B where the term B is not constant: it has to be recalculated at each Te because of the loose output term SLh of the model. The term A is constant and represents a gain for the first sample during a setpoint step. In the specific case of a system of first order with time constant T and static gain K, this yields: SFh = 1 − a and SLh = Sm(k) a with a = e ⟹ U(k) =

T K

[C(k) − M(k)] +

K

T T

Sm(k)

NOTE.– The only proportional feature of a controller is its form; but it can be shown that the integral action is implicitly present, even if the model is not “perfect”: in particular, even if the static gain of the model is not equal to the static gain of the process. 2.2. Stable system with delay A possible representation of model Sr with delay (of value R = r Te) is given in Figure 2.3, which features also the model without delay Sm: Uc

M

Process

Sm

Model without delay

e−Rp

Sr

Figure 2.3. Model of process with delay

18

Predictive Control

Sm

Sr

R=rTe Sm(k-r)

Sm(k) Sr(k+r)

Sr(k)

t/Te k-r

k

k+r

Figure 2.4. Models with and without delay

Sr(p) = Sm(p) exp(–Rp) in continuous mode. Figure 2.4 shows that all the points on the model with delay can be read on the model without delay; in particular: Sr(k) = Sm(k – r) in sampling This allows the use of a single model Sm, on which previous (stored) outputs can be read. The existence of a delay requires a shift in the reference trajectory, so that it is set at instant k + r, as shown in Figure 2.5. The coincidence point is therefore shifted and is located at r + h; h is counted from the instant k + r. The amplitude of the trajectory is therefore C(k) −M(k + r) and, as previously, the supposed variation required for coincidence is written as: ΔMp = [C(k) − M(k + r)] Th The measure at future instant k + r is not known, but it can be expressed from M(k): M(k + r) = M(k) + ΔR ⟹ ΔMp = [C(k) – M(k) – ΔR]Th ΔR can be expressed from the Sm model: ΔR = Sm(k) – Sm(k– r)

Control Law

19

Trajectory

C(k)

Sm(k+h) Model Sm without delay

ΔMp ΔSm

Sm(k-r)

Sm(k)

M(k+r)

M(k)

Δr

Future measure (not known)

k-r

k

k+r

k+t k+h

k+r+h

Figure 2.5. Prediction for a stable system with delay

With regard to the model, the variation of amplitude of the model during a time hTe is the same, with and without delay; the previous ΔSm is maintained: ΔSm = K U(k)·SFh + SLh – Sm(k) As previously, the command U has to generate a ΔMp equal to ΔSm of the model: ΔMp = ΔSm ⟹ [C(k) −M(k) − ΔR] Th = K U(k)·SFh + SLh – Sm(k) with ΔR = Sm(k) – Sm(k − r) The expression of command U is obtained: U(k) =

T KSFh

[C(k) − M(k)] +

KSFh

[Sm(k) − SLh] −

T KSFh

Sm(k) −Sm(k − r)

[2.2]

The equation without delay, with an additional term linked to delay, is obtained. 2.2.1. Example of system of first order It is typically the well-known model of Broïda: Sr(p) =

K

R

T

.

20

Predictive Control

The expressions of SFh and SLh have been previously obtained: SFh = 1 − a and SLh = Sm(k)a with a = e

T T

Equation [2.2] can then be written as: U(k) =

T )

K(

[C(k) − M(k)] +

T K(

)

Sm(k) +

T )

K(

[Sm(k − r)]

Moreover, if an exponential trajectory of desired time constant Td is chosen, this yields: U(k) = with λ = e If R0 =

T T

K(

K(

)

[C(k) − M(k)] +

and a = e )

K(

)

Sm(k) +

1−λh K(

)

Sm(k − r)

T T

and R1 =

K(

)

, this equation takes a more simple form:

U(k) = R0 [C(k) −M(k)] + B(k) with B(k) = R1 Sm(k) + R0 Sm(k − r) R0 and R1 will be calculated only once, upon initialization. The term B(k) will be calculated for each sample. For the sake of simplification, the real delay is rounded off to a whole multiple of the sampling period: R = r Te. Chapter 7 will show that Te can be adjusted at will, without modifying performances. As an illustration, Figure 2.6 shows a PID setting and the application of the above-mentioned predictive control for a Broïda model in the following context: – the PID setting uses the Haalman method [HAA 65], which results in a PI controller whose gain is a function of delay (see Figure 2.6); – the predictive controller uses a simulated process that is identical to the model, and a medium setting has been chosen (Th = 0.7 and h = 30, Te = 0.01). Without a comparison of performances, the differences are obvious: PID control depends on delay, and so do performances, with all the known limits related to delay. In contrast, predictive control is independent of delay, and the command is unique, being exclusively dependent on the chosen control. Such is the contribution of prediction with the positioning of reference trajectory at instant k + r.

Control Law

21

These properties are all the more interesting as they apply to all stable processes, provided that the method for their modeling and for calculating the two terms SFh and SLh is known. 4 1

P.I. CONTROL

R/T

0.1

0.2

0.3

Ti = T = 1 Td = 0

Gain

3.33

1.67

0.83

3 Command 2

2 3

1 1

3

2

0

2

1

F(p) =

e−R p 1 + Tp

3

4

5

Curves n°

1

2

3

R/T

0.2

0.4

0.8

3

Command

2

PREDICTIVE CONTROL Th = 0.7 h = 30 1 1

2

3

0 Figure 2.6. PID/predictive control comparison on a Broïda model in tracking

22

Predictive Control

2.3. Integrating systems The focus is here on integrating systems whose transfer function can be written as: G(p) =

T

F(p) where F(p) represents a stable system.

2.3.1. Pure integrator The necessity of decomposing an unstable system in a sum of stable systems is shown in Chapter 1 and, accordingly, the integrator diagram in given in Figure 2.7.

U

M

Ta 1 Ti (1 + Ta p) 1 1 + Ta p

+ +

Smu

Sm

Sm0

Figure 2.7. Decomposition of a pure integrator in two stable systems

The time constant Ta is arbitrary; it may serve as adjustment variable for closed loop control. In terms of process, the trajectory is initialized at M(k) and the previewed variation of measure for reaching coincidence at k + h remains unchanged (Figure 2.2): ΔMp = [C(k) − M(k)] Th As previously, Th represents the desired variation of measure on the chosen trajectory after h samples. In terms of model, the output Sm is the sum of two terms: – A term Smu that depends on command U: Smu(k + h) = Ki U(k) SFh + SLh with Ki =

T T

Control Law

where SFh and SLh represent the forced and loose outputs of unit block ⟹

23

T

SFh = 1 − a0 with a0 = exp(–Te/Ta) SLh = Smu(k) a0

which, expressed as variation, yields: ΔSmu(h) = Smu(k + h) − Smu(k) = Ki 1 − a0 U(k) − 1 − a0

Smu(k).

– A term Sm0 that depends on measure M, uncontrolled input: suppositions have to be made on M in order to calculate Sm0. The simplest approach is to consider it constant during the prediction on horizon h, which leads to: Sm0(k + h) = M(k). SFh0 + SLh0 ⟹

SFh0 = 1 − a0 = SFh SLh0 = Sm0(k) a0

(first order of unit gain)

In terms of variation, this yields: ΔSm0(h) = Sm0(k + h) − Sm0(k) = 1 − a0 M(k) − 1 − a0

Sm0(k)

The sum output Sm is expressed as variation: ΔSm(h) = ΔSmu(h) + ΔSm0(h) The sought-for command U has to generate the same variation on the process as on the model. The control law is then obtained by writing: ΔMp(h) = ΔSm(h) = ΔSmu(h) + ΔSm0(h) which yields: U(k) =

T K (

)

C(k) +

T K(

)

M(k) +

K

[Smu(k) + Sm0(k)]

24

Predictive Control

2.3.2. General case without delay The model is represented by the transfer function: Gi(p) =

T

. F(p).

F(p) is a stable transfer function. The integrator decomposition in two stable systems is the same as previously (Ki = Ta/Ti) and the stable block F(p) is added in series on the input of command U, according to the diagram shown in Figure 2.8. U

Ki

1 F(p) (1 + Ta p)

M

1 1 + Ta p

Smu

+ +

Sm

Sm0

Figure 2.8. Decomposition of an integrating system in two stable systems

The previous procedure is applied once again. The same is applicable for the prediction of measure on horizon h: ΔMp = [C(k) − M(k)] Th – For branch U of the model: Smu(k + h) = Ki U(k) SFh + SLh where SFh and SLh represent the forced and loose outputs of the unit block T

F(p) and expressed as variation: ΔSmu = Ki U(k) SFh + SLh − Smu(k).

– For branch M, the output Sm0 is unchanged: Sm0(k + h) = M(k) SFh0 + SLh0 with

SFh0 = 1 − a0 SLh0 = Sm0(k) a0

or expressed as variation: ΔSm0 = M(k) · 1 − a0 The control law is obtained by writing: ΔMp = ΔSm = ΔSmu + ΔSm0

− Sm0(k) · (1 − a0 ).

Control Law

25

from which U(k) is obtained and can be written in the following form: U(k) = T0. C(k) + R0. M(k) + B(k) T0 = with

R0 =

T K SFh T K SFh

B(k) =

K SFh

[Smu(k) − SLh ] +

K SFh

Sm0(k)

Coefficients T0 and R0 are similar to those of an RST controller, and they are constant for chosen trajectory and time constant. In contrast, the term B(k) has to be calculated at each Te. 2.3.3. Case of delay Smu U

Ki

1 F(p) (1 + Ta p) M

R(p)

1 1 + Ta p

Smur

Sm

+ + Sm0

Figure 2.9. Modeling of integrating system with delay

Chapter 1 presented how an integrating system with delay R(p) = exp(– r Te p) can be decomposed; this yields the diagram in Figure 2.9, which features the model without delay Smu. In terms of process, the trajectory is initialized on the predicted value Mp of the measure at instant k + r and the predicted variation of measure for reaching coincidence in k + r + h is written in the same manner as for the stable systems: ΔMp = [C(k) − M(k + r)] Th The measure at future instant k + r is not known, but it can be deduced from M(k) (see Figure 2.10): M(k + r) = M(k) + ΔR ⟹ ΔMp = [C(k) −M(k) – ΔR] Th

26

Predictive Control

ΔR can be expressed based on Sm model, which has two branches: ΔR = ΔRu + ΔR0 The sought-for command U must generate the same variation on process and on model; the control law is then obtained by writing: ΔMp = ΔSm = ΔSmr + ΔSm0 C(k) Trajectory

ΔMp= ΔSm

Sm M(k+r)

ΔR=ΔRu+ΔR0

(unknown)

M(k)

Smu

Smur

Smu(k+h) ΔSmu

ΔSmr

Smu(k) Smu(k-r) Sm0(k+r+h)

ΔRu Sm0 ΔSm0

Sm0(k+r)

Sm0(k)

k-r

k

k+r

ΔR0

k+h

k+r+h

t/Te

Figure 2.10. Representation of the future evolution of the integrating model with delay

Variations ΔSmr and ΔRu are the same as for the model without delay, therefore the control law can be written as: [C(k) − M(k) − ΔRu − ΔR0] Th = ΔSmu + ΔSm0

[2.3]

Control Law

27

ΔRu and ΔSmu are obtained on the Smu model without delay: ΔRu = Smu(k) − Smu(k – r) ΔSmu = Ki U(k) SFh + SLh − Smu(k) In order to simplify things: ΔSlh = Smu(k) − SLh and ΔSmu is written as: ΔSmu = Ki U(k) SFh − ΔSLh

[2.4]

This time SFh and SLh represent, respectively, the forced and loose outputs of the unit block: (

T

)

F(p)

The union of relations [2.3] and [2.4] yields the control equation: Ki U(k) SFh = Th [C(k) − M(k)] − Th ΔRu + ΔSLh − Th ΔR0 − ΔSm0

[2.5]

This is similar to the equation obtained for stable systems, with two supplementary terms related to measure M: the calculation of ΔR0 and ΔSm0 depends on the evolution of measure between instants k and k + r + h. 2.3.3.1. Prediction For the sake of simplicity, the measure has until now been supposed constant. Further suppositions can be formulated as follows: – A first possibility is to consider that measure evolves along the tangent to curve M at instant k: it can be calculated from the two last measures M(k) and M(k – 1) and it can be written (Figure 2.11) as: M(t) = M(k) +

M( ) M( T

)

t

It is therefore possible to calculate M(k + r) and M(k + r + h), and consequently ΔR0 and ΔSm0. This has the disadvantage that the previous measure at instant k – 1 is needed.

28

Predictive Control

M Δm =M(k)-M(k-1)

t/Te k-3

k-2

k-1

k

k+1

k+2

k+r

Figure 2.11. Prediction of the measure in ramp

– A further possibility is to consider that the measure evolves similarly to the model between instants k and k + r + h, or at least to equate the measure and the model at instants k + r and k + r + h, which amounts to considering that the measure evolves along the lines AB and BC (Figure 2.12). M, Sm

Predicted measure

Mp(k+r+h) C

Mp(k+r)

ΔSm(h)

Model Sm B

ΔSm(r) M(k)

A t/Te k

k+r

k+r+h

Figure 2.12. Predictions in ramp from k to k + r + h

– A third possibility is to mix the flat and ramp predictions for the intervals k to k + r and k + r to k + r + h, which for simplicity reasons will be called [r] and [h], respectively, and this leads to four cases that are elaborated below. 2.3.3.2. First case: flat predictions on [r] and [h] Mp(k + r) is first supposed constant from k + r to k + r + h.

Control Law

29

ΔSm0 is obtained from this predicted value Mp(k + r) of input M (forced response) and the initial value Sm0(k + r) for the free response: ΔSm0(h) = 1 − a0 Mp(k + r) + a0 Sm0(k + r) − Sm0(k + r) For simplicity, we take α = 1 − a0 . On the other hand, Sm0(k + r) can be expressed from ΔR0: Sm0(k + r) = Sm0(k) + ΔR0 which after replacement leads to: ΔSm0(h) = αMp(k + r) − α[ Sm0(k) + ΔR0] Furthermore, supposing the model is in conformity with the process, Mp(k + r) can be expressed from the real measure M(k) (Figure 2.10): Mp(k + r) = M(k) + ΔR with ΔR = ΔRu + ΔR0 This leads to ΔSm0(h), whose replacing in control equation [2.5] yields: Ki SFh U(k) = Th C(k) − (Th + α)M(k) +ΔSLh − (Th + α)ΔRu − Th ΔR0 + α Sm0(k) [2.6] This equation is valid for an arbitrary prediction on [r]. This is the case of flat prediction of M on [r]: ΔR0 is calculated from measure M(k) and the initial value Sm0(k): ΔR0 = M(k)(1 − a ) + a Sm0(k) − Sm0(k) For simplicity, we take β = 1 − a and replace it in [2.6] in order to obtain the control equation: Ki SFh U(k) = Th C(k) − (Th + α + Thβ) M(k) + ΔSLh − (Th + α)ΔRu + (Thβ + α) Sm0(k) U(k) is then readily deduced; the results are summarized in Table 2.1. 2.3.3.3. Second case: flat prediction on [r] and ramp prediction on [h] The starting point is, in general, equation [2.5], from which ΔSm0 is first calculated, knowing that the measure is supposed to evolve along the line BC in Figure 2.10.

30

Predictive Control

The response to a ramp is given as (see Chapter 1: instant k is to be replaced by instant k + r and the horizon is n = h): ΔSm0 = α Mp(k + r) + ΔE(h − tα) − α Sm0(k + r) with t = Ta/Te

with

ΔSm ΔSmu + ΔSm0 = h h Mp(k + r) = M(k) + ΔRu + ΔR0 Sm0(k + r) = Sm0(k) + ΔR0 ΔE =

ΔSmu has already been calculated on the model without delay (equation [2.4]): ΔSmu = Ki U(k) SFh − ΔSLh Therefore, ΔSm0 can be calculated (which is expressed as a function of ΔR0 to be calculated) and replaced in equation [2.5]. This yields: T

Ki SFh U(k) = −

C(k) − α + T

T

M(k) + ΔSLh − α +

T

ΔRu

ΔR0 + αSm0(k)

[2.7]

This equation remains valid for any prediction on [r]. Here, the measure is supposed constant; ΔR0 has already been calculated (first case): ΔR0 = β M(k) − β Sm0(k) Then, ΔR0 has to be replaced in equation [2.7] in order to obtain the control law. The results are presented in Table 2.1. 2.3.3.4. Third case: ramp predictions on [r] and flat predictions on [h] The starting point is equation [2.6], in which ΔR0 has to be calculated supposing that the measure evolves along the line AB in Figure 2.10. The response of the system of first order to a ramp of slope ΔE/Te has been provided in Chapter 1 for a prediction on n samples; here n = r: ΔR0 = βM(k) + ΔE(r − tβ) − βSm0(k) with

r = delay in number of Te t=

T T

Control Law

Here, ΔE is written as:

ΔE =

M (

) M( )

with Mp(k + r) = M(k) + ΔR = M(k) + ΔRu + ΔR0

Consequently, ΔR0 is deduced as: ΔR0 = M(k) +

ΔRu − Sm0(k) Control law for integrating systems Smu

U

Ki

Fu(p) =

1 F(p) (1 + Ta p) M

U(k) =

K SF

e

T

1 1 + Ta p

Smur

Sm

+ + Sm0

[ t0 C(k) − r0 M(k) + ΔSLh + b0 Sm0(k) − bu ΔRu]

ΔSLh = Smu(k) − SLh(k) ΔRu = Smu(k) − Smu(k − r)

on Smu model without delay

SFh = forced output of Fu(p) block starting from zero, after hTe, when U = 1 is applied SLh(k) = loose output of Smu model starting from Smu(k), after hTe, when U = 0 is applied Ta T β = 1 − a0 α = 1 − a0 Ki = a0 = e T Ti WITHOUT DELAY Predictions t0 r0 b0 flat 0-h Th t0 + b0 α α ramp 0-h Th 0-r flat flat ramp ramp

r-h flat ramp flat ramp

t0 Th α Th Th α Th

t=

bu t0 + α (unused)

WITH DELAY r0 b0 t0 + b0

β t0 + α

t0 + b0

t0 + α

Table 2.1. Control laws of integrating systems

Ta Te

bu t0 + α β

t0 + α

31

32

Predictive Control

It remains to replace ΔR0 in equation [2.6] in order to obtain the control law. The results are presented in Table 2.1. 2.3.3.5. Fourth case: ramp predictions on [r] and on [h] The ramp prediction on [h] is provided by equation [2.7]. The ramp on [r] corresponds to the evolution of measure along the line AB as shown in Figure 2.12. ΔR0 has been calculated previously (third case). The replacement of ΔR0 in [2.7] leads to the control equation based on which U(k) is expressed. The results are presented in Table 2.1. NOTE.– The relations mentioned in the table are also valid in the absence of delay (r = 0 and β = 0): the expressions highlight r/β ratios that tend to t when r tends to zero. Therefore, there is no discontinuity. However, implementation requires a condition to be imposed on r in order to obtain r/tβ = 1 and to avoid the division by zero. It is worth noting that Bu coefficient is not nullified: the term ΔRu is nullified. 2.3.3.6. Example Figure 2.13 illustrates the step response of an integrating system with time constant (Ti = 70 s, T = 35 s) for several delay values with flat prediction on [r] and [h]. It clearly shows that the first value of the command is constant whatever the delay, thanks to the trajectory positioning at instant k + r, similar to stable systems. On the other hand, given the impossibility of an exact prediction of the evolution of measure (branch M of the model), the responses obtained depend on delay and they generate an overshoot that increases with delay. 2.3.3.7. Comparison of predictions Figure 2.14 shows the four predictions applied to the same integrating system (Ti = 70 s, T = 35 s) for a delay R = Ti.

Control Law

33

2

R = 0 30 50 70 1

Flat predictions on [r] and [h] Ti=70 T=35 Th=0.45 h=50

0

Te=2 Ta=T

600

Figure 2.13. Integrating system with delay and flat prediction on [r] and [h]

The upper figure shows two different initial values for the first command sample: they correspond to two expressions of T0 coefficient (which represents the first command G0 at instant k) in Table 2.1, for cases 1 and 2, on the one hand, and for cases 3 and 4, on the other. The comparison is therefore not rigorous. This is the reason why in the lower figure, Th has been modified in order to obtain the responses with the same first command G0. Responses 1 and 2 appear to be identical, and the same is valid for responses 3 and 4. Indeed, as shown by Table 2.1, the control laws are the same for the same t0, and therefore T0, for cases 1 and 2, on the one hand, and for cases 3 and 4, on the other hand: the ramp prediction on [r-h] is reflected by a weaker command and a slower response, but the response has the same form; ramp prediction on [r-h] has therefore no contribution to performance improvement. On the other hand, ramp prediction on [0-r] provides a response without overshoot for the same initial command G0: it is therefore recommended for the control of integrating systems with delay.

34

Predictive Control

2

G0 non-constant for Th constant 1

2

3

4

1 1 2 3 4

3 0

pred[r]

pred[h]

flat flat ramp ramp

flat ramp flat ramp

G0

Th

1.727 1.234 1.727 1.234

0.45

2 4 600

1

2

G0 rendered constant by action on Th 1, 2 3, 4

1 1 2 3 4

pred[r]

pred[h]

flat flat ramp ramp

flat ramp flat ramp

G0

Th

1.727

0.45 0.63 0.45 0.63

3, 4 0

1, 2

600

Figure 2.14. Comparison of predictions on integrating system with delay

Control Law

35

Eventually, in practice there are only two types of prediction to be used, and they correspond to cases 1 and 3: – flat prediction: flat [0,r], flat [r,h]; – ramp prediction: ramp [0,r], flat [r,h]. It is worth noting that in the absence of delay, four predictions are equivalent (for the same initial command G0). Chapter 6 presents other elements for the adjustment of integrating systems depending on delay. 2.4. Double integrating systems The focus is here on systems having two cascade integrators, with the transfer function: G(p) =

T

F(p) R(p)

where F(p) represents the stable part and R(p) is the possible delay. The integration constants can obviously be different: Ti2 = Ti1·Ti2. The control law for simple integrating systems has been obtained by decomposing the model into two parts, according to Figure 2.9, which permits the calculation of ΔSm0 and ΔR0. Given the necessity of this calculation, the decomposition of double integrating systems also requires decomposition in elements of first order for the branch that depends on measure M. This decomposition has been carried out in Chapter 1 and results are shown in Figure 2.15. U

T1 T2 1 F(p) Ti1 Ti2 (1 + T1 p)(1 + T2 p) M

M

Smu

e

Smur

T

+

Sm

+

k1 1 + T1 p

Sm1

k2 1 + T2 p

Sm2

+

+

Figure 2.15. Decomposition of a double integrating system in simple elements

36

Predictive Control

This time there are two branches depending on M, with two time constants T1 and T2, to choose from, and the static gains k1 and k2 differ from 1: k1 =

T T

k2 =

T

T T

T

The structure is therefore the same as the one of the integrator, and the method for obtaining the control law remains the same if Sm0 is replaced by the sum Sm1 + Sm2; the variations corresponding to the delay are ΔR1 and ΔR2. The starting point is equation [2.5], which is then written as: Ki SFh U(k) = Th [C(k) − M(k)] – ThΔRu + ΔSLh − Th(ΔR1 + ΔR2) − ΔSm1 − ΔSm2 with Ki =

T T T

T

[2.8]

.

ΔRu and ΔSLh are obtained according to Smu model without delay: ΔRu = Smu(k) − Smu(k – r) ΔSlh = Smu(k) − SLh This time SFh and SLh represent, respectively, the forced and loose outputs of the unit block ( F(p). )( T

T

)

Similar to simple integrators, the predictions of measure M are supposed flat or in ramp: Figure 2.16 shows also the outputs Sm1 and Sm2 represented by Smj (j = 1 or 2). M, Sm

Predicted measure

Mp(k+r+h) C

Mp(k+r)

ΔSm(h)

Model Sm B

ΔSm(r)

Smj

M(k)

ΔSmj

A

ΔRj

Smj(k)

t/Te k

k+r

k+r+h

Figure 2.16. Predictions for double integrator

Most of the calculations involve expressing ΔSmj and ΔRj as a function of predictions and replacing them in equation [2.8].

Control Law

37

Details of overall calculations are provided in the Appendix for the more general case of arbitrary constants c1 and c2 and static gain of branch U equal to Ku. The results are reflected by Table 2.2, in which c1, c2 and Ku have been replaced by values (Ki, k1, k2) specific to double integrating systems, which allows simplifications. CONTROL LAW FOR DOUBLE INTEGRATING SYSTEMS U

Ki

Fu(p) =

1 F(p) (1 + T1 p)(1 + T2 p)

M M

U(k) = K

SF

Smu

e−r Te p

Smur

Sm

+ +

k1 1 + T1 p

Sm1

k2 1 + T2 p

Sm2 +

+

[t0 C(k) − r0 M(k) + ΔSLh + b1 Sm1(k) + b2 Sm2(k) − bu ΔRu]

ΔSLh = Smu(k) − SLh(k) on a Smu model without delay ΔRu = Smu(k) − Smu(k − r) SFh = forced output of Fu(p) block after the, when U = 1 is applied SLh(k) = loose output of the Smu model after hTe, when U = 0 is applied Ki =

T T

k1= T k2= T

αj = 1 − e L1= k1 +

T T T

T

L1= k2 −

T

T T

D T D T

j = 1 or 2

β1 β2

Sa=k1 α1 + k2 α2

Ej = t0 + Sa − αj Predictions flat

0-h

t0 = Th

ramp

0-h

t0 = Th Da

0-r

T T

βj = 1 − e T T D=T T

r-h

flat

flat

t0 = Th

flat

ramp

t0 = Th Da

ramp

flat

t0 = Th

ramp

ramp

t0 = Th Da

Da = E=

D

Db =

D T D T

( α2 – α1) ( β2 – β1)

( E1 L1 + E2 L2)

WITHOUT DELAY b1 = α1 b2 = α2 bu = r0 (unused: ΔRu = 0) r0 = t0 + k1 α 1 + k2 α2 WITH DELAY b1 = α1+ β1 E1 b2 = α2+ β2 E2 bu = t0 + Sa r0 = t0 + k1 b1 + k2 b2 b1 = α1+ β1 (E1 + E) b2 = α2+ β2 (E2 + E) bu = t0 + Sa + E r0 = t0 + k1 b1 + k2 b2

Table 2.2. Control laws for double integrating systems

38

Predictive Control

Responses are similar to those obtained for integrating systems: ramp prediction on [h] is reflected by a reduction of the first command G0 = t0C and a slower response; for the same t0, the response obtained is the same as for flat prediction, the formulas being the same for the same t0. On the other hand, the ramp prediction on [r] allows the efficient treatment of delay: Figure 2.17 obtained for a double integrator with time constant Ti = 50, T = 25, R = 40, adjusted with T1 = Ti, T2 = 0.8Ti, Te = 2, h = 25. Therefore, this case also makes use of only two predictions: – flat prediction: flat [0,r], flat [r,h]; – ramp prediction: ramp [0,r], flat [r,h]. G0 non-constant for constant Th 1 3

1

2 4

4

0

1 2 3 4

pred[r]

pred[h]

flat flat ramp ramp

flat ramp flat ramp

G0

Th

1.583 0.515 1.583 0515

0.2

2

3 1 0

200

300

600

G0 rendered constant by action on Th 1, 2 1 3, 4 1 2 3 4

pred[r]

pred[h]

flat flat ramp ramp

flat ramp flat ramp

G0

Th

1.583

0.2 0.614 0.2 0.614

0 3, 4 1, 2 0

200

300

600

Figure 2.17. Comparison of predictions on double integrating system with delay

3 Process Models

The previous chapters have shown the necessity of having a model for calculating the forced output SFh and the loose output SLh. These quantities are well known for systems of first order. Therefore, a first approach is to decompose the models into systems of first order. Another method consists of the direct use of the sampling transfer function of the model: this will result in deducing a realization algorithm (in pseudo-code) through which the process will be simulated and its evolution over the horizon h will be predicted. 3.1. Decomposition of a model into systems of first order The focus of this section is limited to stable unit models (static gain = 1) of the order n whose transfer function can be written as: F(p) = (

T

)(

T

)…(

T

)

Then, an equivalent sum of functions of first order is obtained, according to the relation: F(p) = (

T

)(

T

)…(

T

)

=(

K T

)

+ ⋯+ (

K T

)

Solving this involves the identification of two terms by reduction to the same denominator, which yields the following relations: T

K1 = (T

T )(T

K2 = (T

T )(T

T )…(T

T )

T )…(T

T )

T

40

Predictive Control

Kn = (T

T T )(T

T )…(T

T

)

3.1.1. Case of Strejc model It corresponds to the following transfer function: Fn(p) =

1 (1 + T p)

The choice of time constants Tj of the models of first order depends on the time constant T. Coefficients Kj are subsequently deduced. There are several possibilities, depending on the system’s order. Order 2 T1 and T2 can be chosen symmetrical relative to T and close to T: T1 = T(1 + δ) ⟹ T2 = T(1 − δ)

K1 = K2 =

In practice, δ = 0.1: practically similar to Strejc model of order 2: F2(p) =

(

T )

Order 3 Applying the same method, we obtain: T1 = T(1 + δ) T2 = T T3 = T(1 − δ)

K1 = ⟹

K2 = K3 =

Order 4 There is a far wider range of choices for time constants; for example, the following can be considered:

Process Models

T1 = T(1 + 2δ) T2 = T(1 + δ)

41

K1 = ⟹

K2 = −

T3 = T(1 − δ)

K3 =

T4 = T(1 − 2δ)

K4 = −

3.2. Sampling transfer function of systems 3.2.1. z-Transformation Let us recall the classical z-transformation of a continuous function F(p): G(z) = (1 − z ) Trz

F( )

Trz designates the z-transformation obtained from correspondence tables, and the continuous functions are considered to be featuring a zero-order hold block (command input is maintained constant between two samples). This method is well suited to simple systems of first and second order. It has the advantage of providing identical envelopes for the continuous and sampled responses. These results are well known and are presented in Table 3.1 for stable systems and in Table 3.2 for integrating systems. 3.2.2. Bilinear transformation For higher order, the calculations are too long: it is much simpler to use a relation of equivalence between p and z. In this chapter, the proposal is to use the bilinear transformation: p=T ∙ It is a simple approximate method that is largely sufficient for process simulation: the errors due to process identification are far more significant than those introduced by the transformation. It is therefore sufficient to replace p with the above equivalence in order to get the sampling transfer function. Here also, this implies continuous functions featuring a zero-order hold block (z.o.h.).

42

Predictive Control

3.2.2.1. Stable systems The transformation has been realized for the following cases: – Strejc model: F(p) = (

→ F(z) =

T )



– Strejc model with inverse response: F(p) = (



T )

F(z) = 1 −

(

T

)

– model with distributed time constants: F(p) = ( F(z) = b0

T

(

)(

T

)⋯(

T

(

)

)(

)

)⋯(



)

Tables 3.3–3.5 summarize the results with coefficients ai and bi of sampling transfer function (STF) in the form: ⋯

F(z) =



It is worth noting that the transformation introduces a non-null coefficient b0; the step response involves a leap to origin, which is all the more significant as n is small; this is how it is written for Strejc model: b0 =

with t =

T T

In practice, it is negligible for typical values of t. For example, t = 0.1 yields b0 = 2.3 × 10–3 for n = 2 and b0 = 1.1 × 10–4 for n = 3. It is equally possible to render the coefficient b0 null by dividing it among other coefficients bi, so that the sum of coefficients bi remains constant and the static gain is preserved. This may sometimes help in the simplification of STF execution algorithms.

Process Models

Quantities such as a =

can also be noted.

A should be compared with the pole a = exp −

T

the Padé approximation: e



43

T

of the z-transformation: it is

=

The validity of the transformation requires a small Te, but too small values of Te may in practice lead to precision problems, which are all the more significant as n is big. On the other hand, the higher limit is t = 2, which yields a = 0. In practice, t ≈ 0.01–0.5. 3.2.2.2. Integrating systems The previous implementation and properties remain valid. Tables 3.6–3.8 summarize the results for the following systems: – integrating Strejc model: F(p) =

T

(

T )



F(z) = b0

(

)(

)

– integrating Strejc model with inverse response: F(p) =

T

(

T )



F(z) = b0

(

)(

)

– double integrating Strejc model: F(p) =

T

(

T )

→ F(z) = b0

(

) (

)

It should be noted that the above three models are unusable in the state for a predictive command: indeed, as already mentioned (Chapter 1), integrating systems must be decomposed into stable systems; these models are, nevertheless, useful, particularly in the case of simulation, or for testing the validity of decomposition into stable systems in open loop. This decomposition is presented in Figure 3.1 for an integrating Strejc model with inverse response.

44

Predictive Control

Ta 1 1 − θp Ti (1 + Ta p) (1 + Tp)n

Uc

+

Sm

+

1 1 + Ta p

M

Figure 3.1. Modeling an integrating system with Strejc model and inverse response

The following STF is therefore of interest: F(p) = F0 Fn =

(

T

)(

T )

The static gain Ta/Ti is not taken into account here, as it is often convenient to handle it separately. Tables 3.9 and 3.10 summarize the results with and without inverse response. For a double integrating model, decomposition into stable systems is represented in Figure 3.2, where Ms(p) is the stable part of the transfer function. Uc

M

Ta Ti

2

1 Ms(p) (1 + Ta p)2

+ +

Sm

1 + 2 Ta p (1 + Ta p)2

Figure 3.2. Example of double integrating system modeling

The bilinear transformation should be, therefore, applied to the following two transfer functions: (

T

(

T

)

and T )

Ms(p)

Process Models

45

The results are summarized in Table 3.11 for the first, where Ms(p) is a Strejc model, and Table 3.12 for the second. Table 3.12 is presented as an illustration, given that this model also has to be decomposed into two systems of first order, as mentioned in Chapter 2. F(p)

CORRESPONDENCE

F(z)

st

1 ORDER

1 1 + Tp

a=e

(1 − a) z 1−az

T T

st

1 ORDER + DELAY e L 1 + Tp

L = nTe+θ θ1

b1 = 1 − α t − α t b2 = α α − α t − α t

b1 z + b2 z (1 − α1z )(1 − α2z )

a1 = −( α + α ) a2 = α α

2nd ORDER 1 (1 + Tp)

sinβ

b2= α − α cosβ − a1= −2 α cosβ a2= α

ζ=1

b1 = 1 − a(1 + t) b2 = a(a + t − 1) a1 = −2 a2 = 1

b1 z + b2 z (1 − z )

Table 3.1. STF of systems of first and second order (z-transformation)

46

Predictive Control

F(p)

CORRESPONDENCE

F(z)

INTEGRATOR Te Ti a1 = −1

1 Ti p

b1 z 1−z

b1 =

INTEGRATOR WITH DELAY L=nTe+θ θ