Sie sind auf Seite 1von 119

and 2 Control and Prediction of Dead-Time Systems

Diploma Thesis Engineering Cybernetics Prof. Dr.-Ing. Dr. h.c. M. Zeitz Institute of System Dynamics and Control Engineering (ISR) Universitt Stuttgart, Germany

supervisors: Dr. Ir. G. Meinsma & Dr. H.J. Zwart Department of Systems, Signals and Control Universiteit Twente, The Netherlands

Institut fr Systemdynamik und Regelungstechnik (ISR) Prof. Dr.-Ing. Dr. h.c. mult. E.D. Gilles Universitt Stuttgart 2002

Frank J. Christophersen

Abstract
Dead-time control systems considered in this paper are comprising a generalized nite-dimensional plant and a time delay in the measurement signal. In this work a general and 2 state-space solution for this class of control problems is presented, proved, and implemented in M ATLAB. Several test examples are solved in order to show the capability of these algorithms. Subsequently a prediction problem for the vertical movement of a ship on the open sea is presented. It is shown that the prediction problem can be rewritten into an and 2 dead-time control problem and furthermore into an and 2 dead-time ltering problem which is solved with the above mentioned algorithms. Simulated tests show that the computed and 2 predictors are consistent with the theory.

Kurzfassung
Die in dieser Arbeit betrachteten Totzeitsysteme bestehen aus einer verallgemeinerten endlichdimensionalen Regelstrecke und einer Totzeit im Mesignal. Es wird ein allgemeiner - und 2 -Lsungansatz fr diese Regelungsproblemklasse vorgestellt, bewiesen und in M ATLAB implementiert. Einige Testbeispiele werden gelst, um die Leistungsfhigkeit dieser Algorithmen zu zeigen. Als Beispiel wird ein Vorhersageproblem fr die Vertikalbewegung eines Schiffes auf offener See vorgestellt. Es wird gezeigt, da dieses Vorhersageproblem in ein und 2 -Totzeit-Regelungsproblem und -Filterungsproblem umgeschrieben werden kann. Mit den genannten Algorithmen wird das Totzeit-Filterungsproblem gelst. Simulierte Tests zeigen, da die ermittelten - und 2 -Prdiktoren mit der Theorie konsistent sind.

Preface
Supported by an Erasmus/Socrates exchange programm and DAAD scholarship, I wrote this thesis while being a guest at the Systems, Signals and Control department at the Universiteit Twente in Enschede, the Netherlands. I would like to take this opportunity to thank Prof. Dr.-Ing. Dr. h.c. Michael Zeitz from the Universitt Stuttgart, Germany, who offered me the possibility to participate in this exchange program. In particular I would like to express my gratitude to my two supervisors, Dr. Hans Zwart and Dr. Ir. Gjerrit Meinsma, for sharing their vast knowledge of control theory with me as well as for their outstanding supervision throughout the whole research project. Furthermore, I would like to thank Charl P. Stemmet and Sophie Hollins for correcting my English, and my ofce-mate Anak Agung Julius for the nice working atmosphere.

Frank J. Christophersen Enschede, November 2001

iii

Deutsche Zusammenfassung
Das Erasmus/Socrates-Austauschprogramm zwischen dem Institut fr Systemdynamik und Regelungstechnik (ISR) der Universitt Stuttgart und dem Department for Systems, Signals and Control (SSC) an der Fakultt fr Angewandte Mathematik der Universiteit Twente in Enschede in den Niederlanden besteht schon seit mehreren Jahren. Das SSC wird von von Prof. Dr. A.J. van der Schaft und Prof. Dr. A. Bagchi geleitet. In diesem Programm wird es Studierenden der Universitt Stuttgart ermglicht, Gebiete der Regelungstechnik bzw. Regelungstheorie von einem mathematisch orientierten Standpunkt am SSC in den Niederlanden kennenzulernen und zu betrachten. In diesem Rahmen wurde auch diese Arbeit durch das Erasmus/Socrates-Austauschprogramm 2000/2001 und einem DAAD-Jahresstipendium organisatorisch und nanziell ermglicht. In Enschede wurde die Arbeit von Dr. Ir. Gjerrit Meinsma und Dr. Hans Zwart betreut. Gjerrit Meinsma beschftigt sich auf dem Gebiet robuster Regelsysteme im Besonderen mit der -Regelungstheorie, der Robustheit fr Abtastsysteme mit verallgemeinerten Haltezeiten und der Robustheit von Totzeitsystemen. Hans Zwart hat sich auf dem Gebiet der unendlichdimensionalen System- und Regelungstheorie spezialisiert. Im Besonderen arbeitet er auf dem Gebiet der Reglersynthese fr Systeme mit verteilten Parametern und Totzeitsystemen.

Problembeschreibung und Ergebnisse


Das Hauptziel dieser Arbeit war es, den Zustandsraum-Algorithmus von Leonid Mirkin [16, 15, 14, 13] zur Lsung verallgemeinerter -Totzeit-Regelungsprobleme bestehend aus einer verallgemeinerten endlichdimensionalen Regelstrecke mit einer Totzeit in der Rckfhrschleife (siehe Abb. 1) zu verstehen, in M ATLAB zu implementieren und an Beispielen zu testen. Dieser erste Teil der Arbeit ist Inhalt der Kapitel 2 und 3. Im einzelnen wurden folgende Punkte bearbeitet:

iv

PSfrag replacements

Zusammenfassung

v
exogener Ausgang verallg. Strecke Totzeit Mesignal Steuersignal exogener Eingang

Regler

Abb. 1: Regelkreis mit verallgemeinerter Regelstrecke und Totzeit-Glied.

Die Theorie zur Lsung dieser Problemklasse ist in Kapitel 2 mit Beweis dargestellt. Die Lsung besteht aus einem endlichdimensionalem Regleranteil und einem FIR-Block1 . Die Implementierung des -Totzeit-Algorithmuses in M ATLAB wird in Kapitel 3 diskutiert und die verschiedenen M ATLAB-Routinen sind im Anhang B aufgelistet.

Drei Testbeispiele, fr die die Lsungen aus der Literatur bekannt sind, wurden mit dem implementierten -Totzeit-Algorithmus in Abschnitt 3.5 problemlos bewltigt.

Im zweiten Teil der Arbeit wird der -Totzeit-Algorithmus genutzt, um das in Zwart et al. [29] vorgestellte Vorhersageproblem zu lsen, vgl. Kapitel 4. Hierbei handelt es sich um folgende Aufgabe: ein Hubschrauber versucht auf offener See auf einem sich bewegenden Schiff zu landen. Das Problem dabei ist, da das Schiff kurz vor Kontakt des Hubschraubers mit der Landeche eine unerwartete Aufwrtsbewegung durchfhrt und somit eine mgliche Beschdigung des Hubschraubers auftreten kann. Es ist deshalb fr den Hubschrauberpiloten wnschenswert, ein Warnsignal etwa 3 Sekunden im Voraus zu erhalten, um auf eine Aufwrtsbewegung des Schiffes reagieren zu knnen. Zwart et al. lsen dieses Vorhersageproblem, indem sie die Aufgabenstellung in einer Totzeit-Regelkreisstruktur formulieren und dann FrequenzbereichMethoden darauf anwenden. Aufgrund numerischer Probleme bei der Berechnung konnte jedoch kein zufriedenstellendes Ergebnis erzielt werden. In dieser Arbeit wird gezeigt, da das Vorhersageproblem der vertikalen Schiffbewegung im Grunde ein Filterproblem ist, worauf der -Totzeit-Algorithmus von Mirkin angewendet werden kann. Der -Prdiktor ist in vollem Einklang mit der Theorie und zeigt auch ein befriedigendes Verhalten. Fr ein simuliertes weies
1 nite

impulse resonse Block (FIR-Block): bertragungselement mit endlicher Impulsantwort.

Zusammenfassung

vi

Rauschen als Eingangssignal, welches bei der Modellierung des Problems vorausgesetzt wird, zeigt der Prdiktor kein hinreichend gutes Ergebnis. Dies folgt aus der Tatsache, da kontinuierliches weies Rauschen ein Signal mit unendlicher Leistung ist. Dies wiederum bedeutet, da fr dieses Modell (mit stochastischem Eingang) die -Optimierungsmethode, die in Zwart et al. [29] vorgeschlagen wird, nicht geeignet ist. Die ursprngliche Zielsetzung der Arbeit war die Berechnung eines Prdiktors fr das Vorhersageproblems der vertikalen Schiffbewegung. Es stellte sich jedoch whrend der Arbeit aufgrund der Natur des Eingangssignals (weies Rauschen) heraus, da es natrlicher ist, das Vorhersageproblem als 2 Optimierungsproblem zu formulieren und zu lsen. Um dies zu bewltigen, wird in Kapitel 5 die verallgemeinerte 2 -Totzeit-Regelungstheorie vorgestellt, bewiesen und in M ATLAB implementiert. Auch hier besteht die Lsung aus einem endlichdimensionalen Regleranteil und einem FIR-Block. Dabei werden die gleichen Daten wie fr das -Filterproblem verwendet, um den 2 -Totzeit-Algorithmus zu testen und einen 2 -Prdiktor fr das Vorhersageproblem der vertikalen Schiffbewegung zu bestimmen. Die Berechnung verlief ohne weitere Probleme. Der entworfene Prdiktor ist in voller bereinstimmung mit der Theorie, zeigt jedoch kein befriedigendes Verhalten, da die Gewichtungs-Optimierung entworfen wurden. Ein weifunktionen noch auf der Basis der terer Grund fr das schlechte Verhalten des 2 -Prdiktors liegt wahrscheinlich in der Tatsache, da es problematisch ist, kontinuierliches weies Rauschen zu simulieren. Ein kompletter Beweis dafr konnte allerdings nicht gegeben werden, jedoch war es mglich, einige Hinweise darauf zu nden. Sowohl der - als auch der 2 -Totzeit-Regelalgorithmus liefern wertvolle Ergebnisse fr verallgemeinerte Totzeit-Probleme, seien es Mehr- oder Eingrensysteme. Ein alternativer -Totzeit-Regelalgorithmus wird in Kapitel 2 vorgestellt und in M ATLAB implementiert, um Totzeit-Regelstrecken mit schneller Dynamik zu lsen. Die M ATLAB-Routinen lsen alle getesteten Totzeit-Regelungsprobleme off-line und sehr schnell. Deshalb sind diese Routinen ein wertvolles Entwurfswerkzeug fr entsprechende Aufgabenstellungen.

Contents

Preface Deutsche Zusammenfassung Notation 1 2 Introduction

iii iv ix 1 3

Implementational Aspects

3.1 3.2 3.3 3.4 3.5


4

Loop shifting . . . . . . . . . . . . . . . . . . . . . . . . . The 2 0, h induced norm . . . . . . . . . . . . . . . . . The mirkinHinf1.m and mirkinHinf2.m algorithm FIR block discretization . . . . . . . . . . . . . . . . . . . Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . Motivation . . . . . . . . . . . . . . . . . . Control loop setup . . . . . . . . . . . . . Filtering problem . . . . . . . . . . . . . . Behavior of the optimal and lower bound Conclusions . . . . . . . . . . . . . . . . .
Control for Dead-Time Systems

The Ship Movement Prediction Problem

4.1 4.2 4.3 4.4 4.5


5

5.1 5.2 5.3 5.4

Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solution of the 2 control problem for dead-time systems Proof of the Theorem 5.2.1 . . . . . . . . . . . . . . . . . . . Special case: the 2 dead-time ltering problem . . . . . .

2.1 2.2 2.3 2.4 2.5

Control for Dead-Time Systems

Closed-loop stability . . . . . . . . . . . . . . . . . . . . . . Problem formulation . . . . . . . . . . . . . . . . . . . . . . Solution of the control problem for dead-time systems Basic layout of the proof of Theorem 2.3.3 . . . . . . . . . . Special case: the dead-time ltering problem . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

3 5 7 13 22
26

26 30 31 32 33
43

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

43 45 48 59 60
61

61 63 66 73

vii

Contents

viii

Conclusions, Remarks and Perspective

6.1 6.2 A.1 A.2 A.3 A.4 B.1 B.2 B.3 B.4

Conclusions and Remarks . . . . . . . . . . . . . . . . . . . . . . . . Perspective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Signals and spaces . . . . . . Operators . . . . . . . . . . . Systems and control problems Matrix properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A Denitions and Theorems

B Implementations

Loop shifting: p_norm.m, k_scale.m . . . . . . . . . . . . . . . . . 95 The 2 0, h induced norm: L2norm_0h.m . . . . . . . . . . . . . . 97 The dead-time controller: mirkinHinf1.m, mirkinHinf2.m 98 The 2 dead-time controller: mirkinH2.m . . . . . . . . . . . . . . 104

Bibliography

5.5 5.6 5.7

The ship movement prediction problem . . . . . . . . . . . . . . . . Behavior of the optimal bound . . . . . . . . . . . . . . . . . . . . . Comparison of the and 2 lter . . . . . . . . . . . . . . . . . .

76 82 83
84

84 85
88

88 90 90 94
95

106

Notation

Symbols
   
p
2

P, K P, K
s

h opt h

ix

$ 

 

% "

 %  (

  (

'

& 

 

G s

A B C D

shorthand notation for: G has the state-space realization G s C sI A 1 B D, see Denition A.3.3 conjugate system to G s , G s : G s A C s if G s is real rat.: G s GT s B D Hankel operator that maps the future to the past, see Denition 2.4.5 sub-optimal bound 2 0, h induced norm optimal bound dead-time

f v; p

Ef

 (  " #     !   !                

A t M G s deg s dom Ric E

AT

0,h

is by denition equal to p-norm norm, induced by the 2-norm 2 induced norm between 0, h convolution Heaviside function, unit step function transpose of A complex conjugate transpose of A characteristic polynomial of a system Dirac impulse McMillan degree of the transfer matrix G s degree of the polynomal s see Denition A.3.4 expectation operator energy of the nite energy signal f , see Denition A.1.1 function with variables v v 1 , . . . , vk T and parameters T p p1 , . . . , pl lower LFT, see Denition A.3.1 upper LFT, see Denition A.3.2

Notation

Pf

tr A u var w y z

h G

h h-truncation operator (FIR on 0, h ): , see Denition A.2.2 trace of A control signal, controller output variance of the time-signal t exogenous input: reference signal, disturbance, noise measurement signal, controller input exogenous output: error signal that is to be minimized

&

'

CL

&

'

 

Q t A Rww S Sww A A

& 

h e

hG

h h-completion operator (FIR on 0, h ): , see Denition A.2.1 time-domain correspondent to the transfer funct. Q s spectral radius, see Denition A.4.2 autocorrelation matrix of the (stochastic) signal w sensitivity function, S : I PK 1 power spectral density function of the (stoch.) signal w spectrum of A, see Denition A.4.3 largest/maximum singular value of A, see Def. A.4.1 standard deviation of the time-signal t closed-loop system complementary sensitivity function, T : PK I PK 1

&

A P PDT

   

j K

closed-loop transfer function, H : L P, K space, see Denition A.1.6 2 space, see Denition A.1.7 1 controller (one-sided) Laplace operator that transforms a time domain signal, f t F t , into its corresponding frequency-domain signal, F s . 1 space, see Denition A.1.3 2 space, see Denition A.1.4 space, see Denition A.1.5 eigenvalue of A generalized plant, rational part of the generalized plant generalized plant with dead-time element e h power of the nite power signal f , see Denition A.1.2

  


 

Notation

xi

Acronyms and indices


ARE CL DT DRE FIR Ham LFT LTI MIMO opt rat SISO algebraic Riccati equation closed-loop dead-time differential Riccati equation nite impulse response Hamiltonian matrix linear fractional transformation linear time invariant multi-input/multi-output at optimum rational single-input/single-output

1 Introduction
This work is focused on the theory and implementation of and 2 deadtime (DT) control systems. Dead-time control systems are nite-dimensional sysPSfrag replacements tems with time delays in the measurement signal, see Figure 1.1.
exogenous outputs generalized plant dead time measurement signals control signals exogenous inputs

controller

Fig. 1.1: General dead-time control conguration.

Such systems occur generally in transport, economical, and biological systems as well as in the modeling of communication and computational delays. Another common application of dead-time systems is the approximation of a general irrational (high-order) model by a low-order rational transfer function with a time delay. This leads to a low-order controller. On the other hand: an approximation of the model by a purely rational transfer functions would result in a high-order system and therefore a high-order controller (Zwart and Bontsema, [28]). Due to the innite-dimensionality of dead-time elements, the analysis and the design of feedback controllers are more complicated and make satisfactory control more difcult to achieve (Palmor, [18]). The well known Smith predictor or Smith dead-time compensator (Smith, [21, 22]), which tries to compensate for the dead-time in order to top down the problem to a purely nite-dimensional one, was the rst well known control structure to

Chapter 1. Introduction

overcome the dead-time control problem. However, its main goal is focused on stability and the controller is limited in the structure. Moreover the performance of the closed-loop system, as it can be done in and 2 control, is not taken into account. For the case of unstable plants, modications of the classical Smith predictor have to be considered (Palmor, [18]). Since the mid 1980s, a reasonable amount of research has been conducted in the eld of control of dead-time systems. These were mostly treated with the general innite-dimensional control theory framework, see e.g. Foias et al. [3]. Solutions were rather complicated and the mathematical formalism was mostly over-emphasized. This resulted in the loss of the problem structure and for implementation purposes approximations, like Pad-approximations, have to be calculated. A more recent frequency-domain approach that conserves the problem-structure was found by Meinsma and Zwart [10, 11]. Their solution of the dead-time controller consists of a nite-dimensional control part and a nite impulse response (FIR) block, which can be implemented without any difculties. and the 2 dead-time conIn this work the new state-space approach for the trol problem by Mirkin [13, 14, 15, 16] is used to solve a ship movement prediction problem which was posed in Zwart et al. [29]. This proposed controller has the same structure (with nite-dimensional control part and FIR block) as the Meinsma/Zwart controller [10, 11]. The advantage of the controller by Mirkin is the transparent state-space control structure and the clear indication of the cost one has to pay due to the dead-time in the control loop. control for dead-time systems by In the rst part of this thesis the theory of the Mirkin [13] is presented (Chapter 2). In Chapter 3 implementational aspects of the controller will be discussed in order to solve the ship movement prediction problem [29] in Chapter 4. In the chapter thereafter (Chapter 5) the theory of the 2 control for dead-time systems by Mirkin [13] is presented and used to solve the very same prediction problem. A comparison of these two control strategies, conclusions and suggestions for future research is given.

Control for Dead-Time Systems


In this chapter the control theory for dead-time linear time invariant (LTI) systems by L. Mirkin [13, 14, 15, 16] will be presented and discussed. In order to do that the closed-loop stability property has to be claried and dened rst.

2.1 Closed-loop stability


The control loop consist of an innite-dimensional part (the dead-time), rational parts and, as it will be shown later, a FIR (nite impulse response) block and due to this the classic closed-loop stability property1 cannot be used. A minimal goal of any controller is to stabilize the closed-loop system, i.e. any nite energy input signal (disturbance, noise or reference) must result in a nite energy output signal. (The denition of nite energy signals is given in Appendix A in Denition A.1.1.) When we talk here about closed-loop stability we always mean internal stability:
Denition 2.1.1 (Internal stability): A closed-loop system

see Figure 2.1, is said to be internally stable if after injection of nite energy internal input signals, vi , and nite energy external input signals, w, all the signals (at any location) in the closed-loop system remain to be nite energy signals. The closed-loop system CL in Figure 2.1 is internally stable if the nine transfer matrices from w, v1 , v2 to u, y, z are stable, which means that they belong to the Hardy space (Green and Limebeer, [5]). See Denition A.1.7 in the appendix for further detail on the Hardy space . A direct result of this is: any transfer matrix G s is stable if and only if it belongs to the Hardy space .
1A

rational closed-loop transfer function is stable if and only if its characteristic polynomial CL is Hurwitz and the transfer function is proper.

CL ,

Chapter 2.

PSfrag replacements

The requirement of internal stability of a closed-loop system is the basic requirement one has to consider when dealing with practical systems. In practice it can not be tolerated that small errors or non-zero initial conditions at any place in the closed-loop system lead to unbounded signals anywhere in the (interconnected) system. The reader may consult Zhou et al. [27] or Green and Limebeer [5] for further results on the internal stability property. The aforementioned FIR block will occur in the dead-time controller within the closed-loop system, the question is now: is such a FIR element stable? function, f FIR t , of a FIR block can be dened as follows:
Denition 2.1.2 (Impulse response function of a FIR block): The impulse response
N

Due to the fact that the FIR blocks which we consider are causal systems it can be assumed that a 0. The Denition of 1 functions can be found in Denition A.1.3 in the appendix.



:A s

:B s

'

 &$ # %

'

%&$

j 1

&

'

& 

f FIR t e

st

dt

je

t js

j 1

&

'

&

% 

FFIR s

f FIR t

b e

st

dt

je

t js

 

 

The Laplace transform, FFIR can then be given by

L f FIR , of the impulse response function, f FIR t ,

1 1 N

1 1 N

 

     

"   !

# !

where N

,j

, tj

a, b



j 1

and f FIR

' 

% 

f FIR t :

f FIR t

j t

 

 

 

Control for Dead-Time Systems

z v1
+ +

y
CL

v2

Fig. 2.1: Internal stability analysis setup.

tj

a, b .

Chapter 2.

PSfrag replacements

Now, as mentioned before, FFIR is stable if and only if FFIR sup


Re s 0

FFIR s

Lets rst proof that the transfer matrix A s is stable:

Re s

Re s

Re s b

0 a

Re s

0 a

Re s

Re s

This completes the proof that FFIR

A dead-time element GDT s e sh is stable as well, because it just delays the nite energy input u t to the nite energy output y t u t h .

2.2 Problem formulation


In Figure 2.2 the general setup of a closed-loop system with exogenous output z, exogenous input w, control signal u and measurement signal y as well as the generalized plant P and controller K is depicted. The general control problem, see e.g. Zhou et al. [27], can be formulated as follows:

 

&

&

 



sup

B s

sup

st

; thus the FIR block is stable.

In the last step of the proof the property of f FIR the stability of B s follows similarly:

a, b was used. The proof for

! "

sup

f FIR t

dt

f FIR t

dt

# ' &&% $

 

& 

sup

A s

sup

f FIR t e

dt

sup

f FIR t

st

  !   !

 

 

Control for Dead-Time Systems

5 w

P
u

K
Fig. 2.2: General control loop setup.

, i.e.

     

st

dt

Chapter 2.

PSfrag replacements

Fig. 2.3: General control loop setup for dead-time systems with time delay h.

control problem): Find, if possible, for a given 0 all controllers K that internally stabilize the closed-loop system3 such that , where the norm is dened in Denition A.1.7. L P, K

Denition 2.2.1 (The general sub-optimal2

This minimization of the norm is the attempt to minimize the effect of the worst-case disturbance w at the output z. Therefore

Now dead-time (DT) control systems, as stated before, are systems with a deadtime element in the feedback loop, see Figure 2.3. It can be viewed as a measurement delay for the controller, Kh . The consequence of this is a delayed reaction of the controller to the actual measurement signal. Any such system is innitedimensional. The dead-time control problem for this setup can be solved with the general theory for innite-dimensional systems, see e.g. Foias et al. [3]. However the big disadvantage is the loss of the clear control structure of the problem, the rather involved solution and for implementational purposes, the use of approximations such as Pad-approximations.

2 The

optimal controller is often both numerically and theoretically complicated and will not be treated in this framework. The focus is set on the sub-optimal solution, which can be arbitrarily close to the optimal one. 3 The lower linear fractional transformation (LFT) L P, K denotes the closed-loop transfer function from w to z L P, K w. The basic denitions of lower and upper LFTs are given in Definition A.3.1 and A.3.2, respectively. See e.g. Zhou et al. [27] or Skogestad and Postlethwaite [20] for further detail on upper and lower LFT.

K CL-stab.

K CL-stab.

w 0

% 

min

P, K

min

sup

z z

2 w w d

Control for Dead-Time Systems

6 w

P
u
h

Kh

Chapter 2.

2.3 Solution of the systems

The basis of this thesis is the recent work of Leonid Mirkin [13, 14, 15, 16] in which he solves the and 2 dead-time control problem in state-space by absorbing the dead-time element (of the plant) into the controller

This forms a constraint on the controller for the now nite-dimensional plant P. In order to talk about properness of a (non-)rational transfer matrix, and in particular of Kh which consist of a non-rational FIR block, we dene a generalization of the properness term as follows:
Denition 2.3.1 (Properness of a system, [11]): Let G s be a transfer matrix, then

Re s

r0

Remarks: G is bi-proper if and only if G and G 1 are proper. In this generalized denition of properness the term proper is equivalent to causal. An example for an 2 im-proper function is e s . The sub-optimal dead-time control problem can now be stated as follows:

Denition 2.3.2 (The general sub-optimal

dead-time control problem): Find, if possible, for a given 0 and given nite-dimensional generalized plant P the set of all controllers K of the form (2.1) that internally stabilize the closed-loop hK system, confer Figure 2.3, such that . L P, e h

The solution to this problem is given below. The basic layout of the following theorem and derivation of the solution will be given in Section 2.4.

G is im-proper if it is not proper.

&

&

&

sup

G s

and

 

G is proper if there exists an r 0

 

s Re s

, r0

such that

lim

G s

and det L

 

 

G is bi-proper if there exists an r 0

 

s Re s

lim

, r0

G s

0,

such that 0,

 

G is strictly proper if there exists an r 0

such that

 

&

K s

Kh s

with proper Kh s .

sh

Control for Dead-Time Systems

control problem for dead-time

 

(2.1)

Chapter 2.

Assumptions
Assume that the nite-dimensional generalized plant, P, is of the form

denotes that the transfer matrix Note that P11 s and P22 s are strictly proper. P has the given state-space realization, see Denition A.3.3. Without loss of generality, one can always transform the structure of a proper nite-dimensional generalized plant P of a system into the form (2.2) where the off-diagonal blocks D11 and D22 disappear. This can be achieved using the loop shifting technique presented in Zhou et al. (pp. 453457, [27]). More remarks on the loop shifting technique and especially the implementation of it for the deadtime case will be given in Section 3.1. Standard assumptions for the plant, cf. Zhou et al. [27], are: (A1) A, B2 is stabilizable and C2 , A is detectable,

The assumption (A1) is clearly the necessity for the existence of a stabilizing controller. Assumption (A1) with the assumptions (A2) and (A3) also guarantee that the two Hamiltonian matrices, which will be needed in the solution, belong to the space dom Ric , see Denition A.3.4 for dom Ric . (A4) provides that the controller, K, that achieves is proper (and therefore realizable). L P, K The (co-)inner property4 in assumption (A4) of D21 and D12 respectively, is not exactly needed (only non-singularity of the products is needed), but it simplies the derivation of the formulae. The normalized version as in (A4) can always be achieved by appropriate signal scaling of the controller and plant by usage of the aforementioned loop shifting technique, provided that D12 has full column and D21 full row rank.

4 inner:

U U

I, co-inner: UU

(A4) D12 D12

I and D21 D21

I.



"

(A3)

j I B1 C2 D21

C1

has full row rank for all



"

(A2)

j I

B2 D12

has full column rank for all

$ 

P s

 

 

P11 s P21 s

P12 s P22 s

" #  

Control for Dead-Time Systems

A B 1 B2 C1 0 D12 C2 D21 0

(2.2)

Chapter 2.

K rat Q
Fig. 2.4:

Kh
dead-time controller setup.

Solution an algorithm

The control ARE

and the ltering ARE

For the following Theorem 2.3.3 we dene the parameters/data of the rational part K rat , see Figure 2.4, of the dead-time controller as

6 See

5 See

Theorem A.3.6 for the solution of the dead-time free, i.e. h Denition A.4.2 for the spectral radius .

BY :

1 Y 2

C1 D12 B2

'

" 

'

'

1 B B X 2 1 1

B2 F

Z h L CX ,

CX :

1 D B 2 21 1

C2

% " 

Zh :

1 Y 2

&

X I

, X I , and

X and Y for their stabilizing solution X they are non-negative denite (X 0 and Y product obeys XY 2.

Y , see Denition A.3.5, such that 0) and the spectral radius6 of the

0, control problem.

 

' 

% " 

' 

' 

'

AY

YA

B1 B1

L L

0 with L

1 YC1 C1 Y 2

YC2

B1 D21 (2.4)

'

'

'

'

XA

A X

C 1 C1

F F

0 with F

1 XB1 B1 X 2

As in the delay free case5 (h equations (ARE):

0), one has to solve the two algebraic Riccati


y
+

PSfrag replacements

Control for Dead-Time Systems

B2 X

D12 C1 (2.3)

(2.5) (2.6) (2.7) (2.8)

Chapter 2.

with the symplectic7 matrix

dead-time control problem): The dead-time output feedback problem is solvable if and only if its delay-free counterpart, i.e. for h 0, is solvable and in addition Theorem 2.3.3 (The

22

If these conditions hold, then the set of all stabilizing controllers is parameterized as depicted in Figure 2.4 with

The dead-time controller structure, as depicted in Figure 2.4, was already proposed by Meinsma and Zwart [10, 11] using a frequency-domain approach. It should be mentioned that the conditions a c in Theorem 2.3.3 are caused purely by the delay h (cost of the dead-time). As h 0 the conditions a c
also ,
1

and

. 0 is not an eigenvalue of S.

7A

matrix S is symplectic if J

1S

for which J :

0 I I 0

. If is an eigenvalue of S then

and Q any stable transfer matrix such that Q h , is dened in A.2.1 on page 90.

   

C2

1 D B 2 21 1

&

sh

. The h-completion operator,

A C1 C1

B2 C1 D12



22

C2

1 D B 2 21 1

C2 12 21 1 B B 2 1 1

1 D B 2 21 1

11

0 (2.12)

 

' 

 

A C1 C1

1 B B 2 1 1

B2 C1 D12



% 

&

h e

  (

sh

rat

1 P, 2 P11

A F CX

Zh L 0 I

Zh BY I 0

22

12

21

11

&

&

 &

&

b X

1 12 22

1, where

1 22

0,h

0,h

and

2 hold.

a h,

P11

, where

denotes the

0, h induced norm,

21

22

where AHam :

11

12

e AHam h ,

"

Control for Dead-Time Systems

10

A C1 C1

1 B B 2 1 1

. (2.9)

 

 

(2.10) (2.11)

Chapter 2.

The 2 0, h induced norm of the open-loop transfer function P11 in condition a can be calculated, for example, by using the algorithm proposed by Gu et al. [6], see Section 3.2. In most cases one is only interested in the central controller, i.e. in the case where the Youla parameter Q s 0 and therefore the rational part becomes
L

Why choosing the central controller? For any choice of the Youla parameter, Q ,
h

therfore all controllers are equally good. Another reason for the central controller is the simpler structure, smaller dimension and that it is not clear in which way the Youla parameter should be chosen. The only advantage of a Q 0 is to make the equalizing property (Bosgra et al., [1]) of the controller of the suboptimal solution hold for a broader frequency-range, such that it comes closer to the optimal solution, where

Alternative formulation of the controller parameters and of the conditions

In the case of the system matrix A having large eigenvalues8 compared to the 1 eigenvalues of 2 B1 B1 and/or the eigenvalues of C1 C1 , one can expect that the Hamiltonian9 matrix AHam in equation (2.9) is close to upper/lower triangular and therefore has also large eigenvalues. This has the effect that if h 0 the matrix in Equation (2.9) will have very large eigenvalues (elarge very large ), for instance e10 22000, and eigenvalues that are very close to 0 (e large 0), for instance e 10 4.5 10 5 . This can cause numerical problems in the conditions b and c , and for the calculation of the parameter Z h due to the invertability of almost singular matrices. An alternative, and in the aforementioned case numerically more reliable, is the calculation of the parameters of the controller and checking of the conditions by using differential Riccati equations (DRE) instead of the symplectic matrix in Equation (2.9).
9 If 8 large in

the sense of the absolute value of the eigenvalues is an eigenvalue of a Hamiltonian matrix then si is .

&

&

 & 

opt

P, K j

const.

for all

&

the calculated (minimal)

norm sub :

P, e

hK

is constant and

"

K rat,0 s :

K rat , 0

A F

Zh L 0

(2.13)

degenerate to the known coupling condition XY ltering ARE.


 



 ! 

Control for Dead-Time Systems

11

2 of the controller and

Chapter 2.

The conditions a c in Theorem 2.3.3 can be reformulated as either

or

The conditions a1 and a2 respectively, correspond to the condition a of Theorem 2.3.3 and b and c together correspond to b 1 and b2 , respectively.

and
Y

we can give an alternative expression for (2.5)(2.8). The controller parameters can then be given as

and

The second method to determine the parameters of the controller is (numerically) much more cumbersome and time consuming than the method given for Theorem 2.3.3, due to the four coupled (time-varying) differential equations (2.14)(2.17), but nevertheless numerically, e.g. in the aforementioned case where A has large eigenvalues, more reliable.

10 Existence

of X t and Y t on 0, h means that they exist on this interval and hence do not have nal escape-time in 0, h .

&

&

&

Zh

0; h

h X

&  

1 Y 2

'

CX

C2

1 D B 2 21 1

 

'

0; h ,
1

BY

h; 0

B2

1 2

h C1 D12 ,

1 2

 

'

% 

t; 0

t C 1 C1

t; 0 ,

1 2

'

0; 0

t; h

t; h ,

 

1 B B 2 1 1

Using the transition matrices X 0; h and matrix time-variant differential equations

h; 0 , which are obtained from the h; h I, (2.16)

I, .

h; 0 . (2.20)

' 

YA

B1 B1

Y C1 C1

Y,

 

Y t

and

t is the solution of the time-forwards DRE


1 2

'

XA

C1 C1

X B1 B1

X,

 

X t

where

b2

h X

2,

t is the solution of the time-backwards DRE


1 2

        '  '        ' %  '            

a2

t exists10 for all t



b1 Y

a1

t exists10 for all t

Control for Dead-Time Systems

12

   

0, h , and

0, h , and

X,

(2.14)

Y.

(2.15)

(2.17)

(2.18) (2.19)

Chapter 2.

2.4 Basic layout of the proof of Theorem 2.3.3


The main idea of Mirkins solution to the dead-time control problem is to absorb the dead-time element GDT s e sh , see Figure 2.3, from the generalized plant11 PDT into the controller

After doing this the plant is assumed to be nite-dimensional and of the form (2.2) which can, as mentioned before, always be achieved by using the loop shifting technique proposed by Zhou et al. [27]. The set of all stabilizing controllers, K, for a nite-dimensional plant P of the form (2.2) is known in the literature, confer e.g. Zhou et al. [27] or Theorem A.3.6 in Appendix A. This solution set takes the form

and where the rational part is


s

G s

A B 1 B 2 C 1 0 I C 2 I 0

The attachment of the dead-time element to the controller can therefore be seen as a constraint imposed on the set of all controllers. The denotes a placeholder for either the or 2 space and is used because the rst part of the derivation of the solution (Step 1) to the dead-time control problem will be valid for the and the 2 dead-time control problem. The solution to the 2 dead-time control problem will be discussed in Chapter 5. Now the question is: does there exist a solution of the form (2.21) in the set of all stabilizing controllers (2.22)? So we try to extract the possible solutions from the whole set of controllers. The extraction problem can be stated as follows:
Denition 2.4.1 (The

of all controllers K
11 P DT 12 The

extraction problem): Determine if the parameterization

denotes the generalized plant with dead-time element e h . reader should be reminded that in this framework the term proper is equivalent to causal, see Denition 2.3.1 for properness.

G , Q ,

where

G , Q

with Q

, Q

&

K s

Kh s

sh

with proper12 Kh s .

&

 

 

Control for Dead-Time Systems

13

 

(2.21)

(2.22)

(2.23)

Chapter 2.

and with rational part


s

G s

contains dead-time controllers of the form

In the following we give the basic layout of the proof of Theorem 2.3.3 step by step.

Due to the fact that G is given and rational, the constraint imposed on the controller K means a constraint imposed on Q . Now, because the elements G 12 s and G 21 s are square and invertible for almost all s, the map (2.22) between K and Q is bijective, see Lemma 10.4 in Zhou et al. (pp. 252, [27]). It may be shown that Q can be stated as a function of K with

In the last equality, 1 , of Equation (2.24) the property

is used, cf. Lemma 10.3(i) in Zhou et al. [27]. In order to derive G one has to calculate13 G
13 inverse

of G s

: if D

exists then G

A C

B D

BD 1 C D 1C

BD D



 

  &

B 1 C 2 B 2 C 1 B 2 B 1 C 2 0 I C 1 I 0

"

A, K

B, K

where

 !

&

G 1 , K

!  

G , K .

A22 A21 A12 A11

Step 1: Q

(2.24)

(2.25)

and next characterize all such solutions K, if any exist.

&

 

Control for Dead-Time Systems

14

A B 1 B 2 C 1 0 I C 2 I 0

Kh

with proper Kh

Chapter 2.

PSfrag replacements

Fig. 2.5: Lower linear fractional transformation of Q and its related signals.

rst. Then with the use of property (2.25) one gets

K can only effect Q on the interval h, . But this, in turn, means that the impulse response of Q on the interval 0, h is identical to the one of G11 .
hK

14 For

the denition of the h-truncation operator, h

&

G , e

Kh

&

Let K

Proof. (

): h K then h G , K h ,
, see Denition A.2.2 in Appendix A.

for some Q

&

'

&

be the 0, h -truncation14 , , of G11 : that is Q h G11 . Then K belongs to the class K e L G , Q with Q (for some proper Kh ) if and only if Q satises

Proposition 2.4.2: Let Q

&

'

G11

G12 K I

G22 K

G21

The impulse response of K, (2.24)

, is zero on the interval 0, h . So due to the relation

A B1 B2 C1 0 I C2 I 0

$ 

"

G s

 

 

G11 s G21 s

G12 s G22 s

&

 

Control for Dead-Time Systems

15

hK

(2.26) A B 1 C 2 B 2 C 1 B 1 B 2 C 1 0 I C 2 I 0 .

Chapter 2.

where

confer Figure 2.5. So one can write the output signal of Q as

where by denition e h G11 has an identical impulse response function to G11 on h, and is zero on 0, h so that

From this it follows that


L

where

By construction Q is FIR and therefore stable ( ), see page 4 for FIR stability. h Q is stable due to Q Thus e and Q proper; but then it follows directly that Q . (FIR) and Q therefore Q

( Q

):

&

G11

G11 is now rational and strictly proper. Dene Q :

&

"

G11 G21

G12 e h G22

&

'

G , Kh

"

G11 s

A B1 A h C1 e 0

. G , Kh .

f w,u;G ,Q

f G ,Q ,Kh w

G ,Kh w

'

'

&$ %

 

&

&

'

Q w

:Q

G11

 &

G11 Q

G12 u

'

'

'

% & &$ %

G11

G11 w

 ' &$ # & %

G11 w

& '

&

'

'

%&$ & # %

G11 w

G11 w

G11 w

# &'

&

'

 

' %&$ #

G11 w

G12 e

u
0

"

G :

& &

Control for Dead-Time Systems

16

G11 G12 e G21 G22 e

h h

G12 u

G12 u

Chapter 2.

In order to show that L G , Kh is a bijective map between Q and Kh we can almost use Lemma 10.4(c) in Zhou et al. (p. 252f., [27]). Lemma 10.4(c) is not directly applicable because G and Kh are not rational. However, if we follow the proof of Lemma 10.4(c) line by line it also holds in our case because G and Kh are proper,

almost all s. Therefore Q L G , Kh is a bijective map between Q and Kh ; and Q is proper/causal if and only if Kh is proper/causal. This completes the proof. Proposition 2.4.2 reduces the extraction problem to a one-block distance problem: solvable if and only if there exists a Q
Corollary 2.4.3 (One-block distance problem): The

such that

Step 2: The Nehari problem


The one-block distance problem, Equation (2.27), can be restated as follows
Q Q

In equality (1) of Equation (2.28), we used the fact that for any function G , we have the equality between the and norm, see e.g. Curtain and Zwart [2]. (The denition of the and space and their norms are given in Denition A.1.7 and A.1.5, respectively.) In equality (2) the denition of the norm is used. Equation (2.28) is a modied version of the standard Nehari problem. The standard Nehari problem is: nd the minimum distance between a given stable transfer matrix G and its nearest anti-stable matrix Q. The solution to this problem is known as Neharis Theorem and can be found in e.g. Zhou et al. [27] or Curtain and Zwart [2]. The solution to Equation (2.28) is, see e.g. Zhou et al. [27],

'

min

 

&

'

&

'

h,

min

min

 

(2.28)

&

'

for some r0

, and G12

G12 and G21

s Re s

, r0

s Re s

, r0

G21 are square and invertible for

extraction problem 2.4.1 is (2.27)

lim det G s

0,

lim det G

%  

Q 0 0 0

%  

Control for Dead-Time Systems

17

0,

Chapter 2.

is known as the Hankel operator and is dened as follows:

The corresponding (induced) Hankel norm is dened as:


G

w 0

where z is computed according to z t


Gw

0,

w d , t t

In our case the application of Lemma 2.4.4 to Equation (2.28) comes down to:

z t

0,

0,

The time-shifted z is 0,

For the energy of the output signal we can nd the following equality
2

15 Q

t denotes the time-domain correspondent on 0, h to the FIR element Q

0,h

,0

s .

&

&

z t

dt

z t

dt

z t

 

& 

z t

w d , t 0, h , else.

t 0

'

w d , t h, 0 , else.

t h 0

'

'

w d , t t

The output signal z for the transfer function15 e

hQ

can be computed as 0, 0,

dt

and G t denotes the impulse response function of G.

G t

 

  

sup

,0

0,

 & 

 

 ) 

0,

,0 .

0, 0

associated with the transfer matrix G from a future input signal w the past z , 0 of z Gw, i.e. 2

Denition 2.4.5 (Hankel operator, Hankel norm): The Hankel operator, G , is the map

0,

to

and the inmum is achieved.

 

'

inf

0,

, 0 (map from the future to the past), then


G

Lemma 2.4.4 (The modied Nehari theorem, [27]): Suppose G

and let

 

Control for Dead-Time Systems

18

Chapter 2.

With this we can nally compute the Hankel norm h,

Equality (1), in Equation (2.29), holds by causality.


So one can see that h, is actually the 2 0, h induced norm of the element G11 . This norm can, for example, be computed by the method proposed by Gu et al. [6]. An intermediate lemma of the extraction problem can be stated as follows: extraction problem 2.4.1 is solvable if and only if the delay-free control problem, i.e. for h 0, is solvable and in addition the 2 0, h induced norm of G11 is less than . The derivation of the characterization of the solution to the one-block distance problem (2.27) and the parameterization of all controllers, K, is non-trivial and does not fully contribute to the understanding of the nal solution. This will therefore not be treated in this work. The reader is referred to the original papers by Mirkin [13, 14, 15, 16]. The basic steps are given.

Step 3: Characterization of the solution to (2.27)

Now, the Youla parameter Q can be characterized as follows:

&

% $

'

"

"

I 0 0 0

0 C1

1 B1

0 0 .

0 0

0 0 0 I

&

1 22 C1

& %

A C1 C1

1 B1 1 22 21 B1



$ 

21

"

22 1 B B 2 1 1

 

 

11

s s

12

s s

21

22

11

12

exp

Dene the following

A C1 C1

1 B B 2 1 1

Lemma 2.4.6 (The


extraction problem): The

"

 

 

h,

sup
w 0

  &  )

hQ

sup
w 0

,0

0,

sup
w 0

0,h

0,h

0,h

G11

Control for Dead-Time Systems

19

in Equation (2.28)
0,h

0,

0,h

(2.29)

,h

, and

Chapter 2.

Sfrag replacements
,

Fig. 2.6: Basic

dead-time controller structure.

Proposition 2.4.7 (One-block distance problem): The one-block distance problem

Step 4: Parameterization of all controllers K


After numerous (lengthy) transformations one can dene

22

This leads to the controller

&

&

KQ I

KQ

&

h e

sh

C2

1 B 2 1

A C1 C1

B2 C1

1 B B 2 1 1



22

'

C2

, and

1 B1 21

B2 C1

1B 1

B2

1 12 22 C1

&

'

&  

V1 V2

C1

U1 U2

22

&

&

B2 C1

1B 1

B2

1 12 22 C1

where Q ,

is an arbitrary contraction, i.e. Q ,

'

'

'

21

11

&

22 Q ,

12 Q ,

&

'

(2.27) is solvable if and only if h, satisfying (2.27) are given by

. If this holds, then all Q

KQ

 

Control for Dead-Time Systems

20

Kh

hQ

Chapter 2.

rat K ,

Q ,

Kh
dead-time controller setup.

Fig. 2.7:

where

which is of the desired form (2.21) with an interconnection structure as depicted in Figure 2.6 on page 20. From Lemma 10.1 of Zhou et al. [27], one can derive an alternative lower LFT formulation for KQ with

The dead-time controller has now its nal structure, cf. Figure 2.7. After substitution of the -data the solution to the can be stated as follows:

extraction problem 2.4.1 extraction problem 2.4.1 is

22

&

C 2

1 B 2 1

sh

A C 1 C 1

B 2 C 1

1 B B 2 1 1



and

'

C 2

1 B 2 1 21

 

rat K , s

C 1

0 I

I 0

22

&

& 

A ,

1B 1

B 2

1 12 22 C 1



"

solvable if and only if h,

A B 1 , where A : A C 1 0 2 0,h B 1 C 2 B 2 C 1 . In that case K solves the extraction problem if and only if it is of the form as depicted in Figure 2.7 with :

Lemma 2.4.8 (The

extraction problem): The

&

&

"

KQ

Q ,

where K ,

&

&

rat K , ,

&

'

'

 

KQ :

U1

U2 Q ,

V1

V2 Q ,

U1 V1 V1 1

PSfrag replacements

Control for Dead-Time Systems

21

U1 V1 1 V2 U2 V1 1 V2

Chapter 2.

with

and

After applying the original generalized plant data (2.2) and the delay-free solution to this last lemma, some cumbersome calculations and transformations, Theorem 2.3.3 follows directly. The reader is referred to the original papers by Mirkin [13, 14, 15, 16] for any further detail. This completes the basic layout of the proof. The alternative parameterization of the rational part of the controller via differential Riccati equations, see page 11f., can be derived by taking the solutions to the two differential Riccati equations (2.14) for X t and (2.15) for Y t , together with the solutions X t, h and Y t, 0 of the differential equations (2.16) and (2.17) of the transfer matrices16 . These solutions can be related to the elements i j t of

in an explicit way; and can then be substituted into the parameters (2.5)(2.8) of the controller, and thus form a different controller parameterization which will be free of i j and dependent on X , Y , X and Y .

2.5 Special case: the

dead-time ltering problem

It will turn out that the ship movement prediction problem in Chapter 4 is in fact not a general dead-time control problem, as discussed and solved in Section 2.3, but the simpler case of a dead-time ltering problem.

16 Differential

Riccati equations (DRE) are common in nite horizon optimal control. The derivation of (2.14)(2.17) is very technical, non-trivial and does not contribute to the understanding of the solution and is therefore omitted in this text.

Denition 2.5.1 (The

dead-time ltering problem): The dead-time ltering problem is to nd an estimate z of the exogenous output z of the plant, PFilt , in an

$ 

21

22

exp

 

11

t t

12

t t

A C1 C1

1 B B 2 1 1

and Q ,

such that Q ,

21

22

11

12

exp

A C 1 C 1

1 B B 2 1 1

'

22

22

&

   

# "

#   "

A ,

B 1 C 2

B 1 C ,2

1 B 2 1 21

 '

Control for Dead-Time Systems

22

PSfrag replacements
Chapter 2.

Kh

Fig. 2.8: Dead-time ltering problem setup.

sense, i.e. for a given if any exist, such that w

0, nd the set of all causal stable lters Kh

The plant is of the form PFilt s


s

A B C1 0 C2 D 2

The dead-time ltering setup of Figure 2.8 can be reformulated into the general dead-time control setup, see Figure 2.9. The generalized plant then becomes

Now it is clear why the ltering problem is a special case of the general control problem, except that internal stability is not required but H and Kh have to be stable.

Assumptions
For the plant (2.31) of the ltering problem and the fact that internal stability is not required (only H and Kh have to be stable) the assumption (A1)(A4) of Section 2.3 simplify to

P s

A B 0 C1 0 I C2 D 2 0

(2.31)

"

&

and

PFilt

z y

where the lter equation is z given by

Kh

 

 

0,

sup

2
2

2
y and the related signals, cf. Figure 2.8, are

w.

Control for Dead-Time Systems

23 w

PFilt

(2.30)

Chapter 2.

PSfrag replacements

Kh

Fig. 2.9: Reformulation of the dead-time ltering problem setup into the general dead-time control problem setup.

(A1) C2 , A is detectable,

Solution to the

For the ltering case only the ltering ARE

has to be solved for its stabilizing solution Y Y and it has to be non-negative denite (Y 0). This is because the unique stabilizing solution of the controller ARE (2.3) is X 0. For the following theorem we dene the parameters of the rational part of the lter as
22

21

22

where AHam :

11

12

e AHam h

with the symplectic matrix

12

BY :

1 2

11 Y

'

'

"

Zh L CX , and C1

22

 

% 

CX :

C2

&

' 

Zh :

1 Y 21 2 1 D B 2 2

21 ,

A C1 C1

1 BB 2



' 

' 

' 

'

AY

YA

BB

L L

with L

1 YC1 C1 Y 2

(A3) D2 D2

I.

C2

dead-time ltering problem



"

(A2)

j I

B D2

has full row rank for all

, and

Control for Dead-Time Systems

24 w

P
z

YC2

BD2

(2.32)

(2.33) (2.34) (2.35) (2.36)

. (2.37)

Chapter 2.

Now the result for the

dead-time ltering problem): The dead-time ltering Theorem 2.5.2 (The problem is solvable if and only if its delay-free counterpart, i.e. for h 0, is solvable and in addition

hold.

If these conditions hold, then the set of all lter solutions is parameterized as depicted in Figure 2.4 with K

The alternative calculation of the parameters of the rational part of the lter, as in Section 2.3 (p. 11f), follows clearly by applying the special form of the generalized plant, cf. (2.31), and the fact that X 0. One may be warned that in an implementation only the conditions a1 and b1 on page 12 should be used because condition b2 always holds true due to X 0 and is therefore unsuitable for a numerical check.

and any stable Q

such that Q

C2

1 D B 2 2

&

sh

C1

A C1 C1

22

 

' 

 

% 

C2

1 D B 2 2

C2 12 21 1 BB 0 2

1 D B 2 2

11

0 (2.40)

A C1 C1

1 BB 2

0 C1



&

h e

  (

sh

rat

1 P, 2 P11

A C1 CX

Zh L 0 I

1 22 21 Y

0,h

0,h

Zh BY I 0

&

P11

, where

denotes the

0, h induced norm, and

Control for Dead-Time Systems

25

dead-time ltering problem can be stated as follows:

 

(2.38) (2.39)

3 Implementational Aspects
In this chapter the implementation of Theorem 2.3.3 (the solution to the deadtime control problem) into the programming language M ATLAB R [25] will be briey discussed. Section 3.1 and 3.4 are also valid for the 2 dead-time control case which will be discussed in Chapter 5. All the main M ATLAB routines are listed in Appendix B.

3.1 Loop shifting


In order to apply Theorem 2.3.3 to the transform the original plant
s

dead-time control problem one has to

C1 D11 D12 C2 D21 D22

into a controller K and a plant P of the form (2.2), that is P s


s

A B 1 B2 C1 0 D12 C2 D21 0

such that K stabilizes P if and only if K stabilizes P and in addition that the norm1

of the closed-loop transfer function does not change and that the assumptions (A1)(A4) on page 8 are satised.

denotes a placeholder for the

and

P, K

P, K

space.

26

P s

B1

B2

and controller K

 

 

(3.1)

Chapter 3. Implementational Aspects

27

Such a plant transformation with P and K as the nal goal can always be done with the so called loop shifting technique if the matrices D12 has full column and D21 has full row rank. The reader is referred to the algorithm proposed in Zhou et al. (Section 17.2, [27]) for further mathematical detail2 . Additionally, in order to apply this algorithm one has to consider that in the 2 case the matrix D11 has to be the 0-matrix because otherwise the 2 norm of the closed-loop transfer function is not nite. For the dead-time systems considered, this is always the case if the system is set up properly. The loop shifting algorithm is implemented in two parts: p_norm.m This M ATLAB routine transforms the original plant data P into the transformed plant data P of the desired form, see Equation (3.1), without changing the -norm of the closed-loop system. In addition, not only is assumption (A4) satised, but also normalized so that D12 and D21 are of the normed form

This routine calculates transformation parameters which will be used for the back-transformation of the controller K to the original data K. Basic steps3 of p_norm.m: 1. In order to apply the algorithm proposed in Zhou et al. [27] the norm bound of the closed-loop transfer function has to be 1:

similar loop shifting algorithm can be found in Green and Limebeer [5]. reader may want to confer Zhou et al. (Section 17.2, [27]) in order to follow the basic steps. 4 The superscript 1 denotes the data after the rst intermediate step and therefore the superscript j will denote the data after the j-th intermediate step.
3 The

2A

 

and controller K

K.

C2

D21

D22

 

 

s :

1 C1

1 D11

1 D12

B1

B2

 

where the new intermediate plant4 , P

, is



P, K

P, K

   

,K

" #

D12

0 I

and D21

0 I

Chapter 3. Implementational Aspects

28
1 1 2

0 I

0. In the case of dead-time con4. Removal of D11 in order to get D11 trol problems this can be done easily. In this class the parameter D in Zhou et al. (p. 455, [27]) can always be chosen as D 0. This follows from the fact that if a controller, K, exists such that L P, K then due to the Nehari theorem, confer condition a in Theorem 2.3.3 and Step 2 on page 17f., also
2

holds. The controller becomes K 4 : K 3 Nb with return-parameter Nb : 0 for the dead-time case. (The routine was implemented in a more general way such that also dead-time free plants for control problems can be transformed. For this case see Zhou et al. (p. 455f., [27]) for the return-parameter D , which is here due to consistency called Nb ).

0 I

7. Back-transformation of the norm bound of the closed-loop transfer function to with

,K

   

   

!    

Nc :

D22 .

 

,K

1
7

 

&

 

 

becomes K

Nc

6. Removal of D22 in order to get D22

 

 

0. The intermediate controller where the return-parameter is

 

. The new controller is K return-parameters R2 and Rt,2 .


R2 K

Rt,2 with the

,K

 

5 D21

5. Normalization of D12 and D21 in order to get D12

   

 

 

 

P, K

P11

0,h

D11

0 I

 

 

 

Na :

D22 .

 

 

&

 

 

troller is K

Na

3. Removal of D22 in order to get D22

 

 

0. The new intermediate conwhere the return-parameter is

 

. This will effect the controller with K 2 : two transformation parameters R and R t are returned.

RK

Rt . The

 

 

2 D21

2. Normalization of D12 and D21 in order to get D12

 

 

 

0 I

and

and

Chapter 3. Implementational Aspects

29
7

C2

D21

0 and D 8. Normalization of D12 and D21 in order to get D12 21 I 8 is now of the nal form (3.1) therefore dene P : 8 . The 0 I .P P 8 : 7 R nal controller is K : K R3 K t,7 with return-parameters R 3 and Rt,3 .

Remark: Step 5 can be omitted in this algorithm, but was left in order to conserve the algorithmic structure in Zhou et al. [27]. k_scale.m takes the transformation parameters which were calculated by p_norm.m and transforms the controller K, that is calculated with the or 2 dead-time control algorithm (mirkinHinf1.m, mirkinHinf2.m, mirkinH2.m) proposed by Mirkin, back to the original data in order to receive K. Basic steps of the controller back-transformation:

Both M ATLAB routines, p_norm.m and k_scale.m, can be found in the appendix in Section B.1.

 

1. K

&

 

&

 

2. K

1K 2

Rt

&

 

'

 

3. K



'

 

 

4. K

Nb I Na K
3 1

&

 

&

 

5. K

R2 1 K

1 Rt,2

&

 

'

 

6. K



 

 

7. K

7 6

&

&

 

8. K

1 R3 1 KRt,3

Nc K

 

 

 

 

 

 

 

 

 

 

and K

.
7 7 8 8

 

 
s :

 

C1

D12
0

     

B1

B2

   

 



 

where the new intermediate plant, P

, is

Chapter 3. Implementational Aspects

30

One main and computationally very intensive step of Theorem 2.3.3, is the test whether or not the 2 0, h induced norm
2

in condition a of Theorem 2.3.3 is smaller than the bound . The computation of this norm is implemented into M ATLAB with the help of the algorithm proposed by Gu et al. [6]. Due to P11 being an LTI system this can be done in a straightforward way by the use of a bisection search for the desired h and an exponential function of the Hamiltonian matrix A1,Ham , see below. The basic algorithm of Gu et al. [6] is:

:A1,Ham

(3) IF h THEN goto (1) ELSE stop and dene h : . In the ner details of this algorithm the Lipschitz constant M for the property

for any t1 , t2 0, h is required, confer Gu et al. [6] on page 4050. In this constant lies the only modication used in the implementation to Gu et al.s algorithm. The Lipschitz constant, M, in the paper by Gu et al. is based on an identication procedure of Y t and is a rather rough estimate. The one used in this implementation is derived as follows:



%  

min Y t1

min Y t2

M t1

t2

(2) IF one of the eigenvalues of Y t : t 0, h THEN set : ELSE set : .

W t Z t changes its sign for some

 

 

for t

0, h .

'

"

&$ %

exp

$  

Z W

(1) Set :

2 ,

and compute A 1 C1 C1
1 B1 B1

(0) Choose an upper and lower bound of h , i.e. h accuracy, h , of the calculated h .

0,h

h :

P11

sup
w 0

3.2 The

0, h induced norm

0,h

" 

0,h

, , and choose the

0 I

(3.2)

Chapter 3. Implementational Aspects

31

One may consider the estimation


t2

where Mnew denotes our new Lipschitz constant which is going to be dened below. The rst inequality is true due to the fact that Y t is symmetric, cf. Ltkepohl [8]. The matrix Y t in turn can be stated with

cf. Gu et al. [6]. Now an upper bound/Lipschitz constant can be found as follows

: Mnew .

In Inequality (3.4) the upper bound

was used, confer also Equation (3.2). This new Lipschitz constant is smaller (or equal) than the one given by Gu et al., i.e. Mnew M. The M ATLAB implementation can be found in the appendix in Section B.2.

3.3 The mirkinHinf1.m and mirkinHinf2.m algorithm


The complete solution (loop shifting and solution) to the problem is implemented in the two routines

dead-time control

e A1,Ham t

A1,Ham t

A1,Ham h

eh

Z W

B1

, C1

e2h

1 max

max A1,Ham A1,Ham

max A1,Ham A1,Ham

"

max

B1

, C1

"

Y t

Z W

Z W

"

$ 

% "

C1 C1 0 0 B 1 B1

Z W

 

'

W Z

W Z

W B1 B1 W

Z C1 C1 Z

t1

Mnew

(3.3) (3.4)

' &$ # %

dt

Y t

Y t

 % 



%  

min Y t1

min Y t2

Y t1

Y t2

t1 t2

 

  

"

Chapter 3. Implementational Aspects

32

PSfrag replacements

Fig. 3.1: Time-domain visualization of the possible instability of the implementation of the FIR block e h 2. 1

mirkinHinf1.m and

mirkinHinf2.m.

The rst method, Theorem 2.3.3 as it is stated, is realized in the routine mirkinHinf1.m. The alternative controller parameterization via the differential Riccati equations (method 2, p. 11f.) is implemented in mirkinHinf2.m. It can be said in general that the computation with mirkinHinf1.m is much faster but might not be numerically reliable for plants with fast dynamics, due to the fact that the symplectic matrix becomes ill-conditioned, confer Section 2.3. In this case one should use the numerically more reliable routine mirkinHinf2.m. This is much slower due to the four coupled time-varying differential equations which have to be solved iteratively. In both routines the central controller with rational part K rat,0 and FIR part e h 2 , the sub-optimal bound and the 2 0, h induced norm h 1 of the open-loop transfer function P11 are calculated. The M ATLAB implementation can be found in the appendix in Section B.3.

3.4 FIR block discretization


One must be careful with the implementation and/or simulation of the FIR block . It should be implemented as one block, , and not as two element-blocks h 1 and e 2 . This is due to the possible instability of the two separate blocks because (in that case) both blocks lead to unstable internal signals, see Figure5 3.1, and secondly because of the fact that numerical subtraction of both elementblocks is not exact. One way to implement the FIR block
5

is to discretize it. For example this can


in time-domain, i.e. L
1

denotes the impulse response function of

&

&

Chapter 3. Implementational Aspects

33
h m

k 0

where y denotes the output of the FIR block. In a discrete representation with t lTs this is

k 0

The corresponding transfer function is then given by

k 0

which can be implemented without any problems.

3.5 Examples
In this section some academic (test-)examples of dead-time control problems, for which the solution is known in the literature, are treated and solved with the aforementioned method.
Example 3.5.1 (The Toker and zbay problem [26, 11]): This mixed-sensitivity

problem is stated as follows: nd a stabilizing controller Kh which minimizes the norm of the closed-loop transfer function
1

where the unstable dead-time plant, PDT , is given with s 1

and S I PDT Kh 1 and T PDT Kh I PDT Kh 1 denote the sensitivity and complementary sensitivity function, respectively. The weighting functions are

'

'

W1 s

and W2 s

0.2 s

 

s 1 10s 1

1.1 .

&

'

&

&

'

&

PDT s

Prat s

0.2s

0.2s

" #

$ &

'

"

HT O :

W1 I PDT Kh 1 W2 PDT Kh I PDT Kh

&

&

 '

Ts

&

m 1

1 k z

 

 

 

'

yl

Ts

&

m 1

1 k u l

k.

Ts

&

m 1

1 kTs u t

kTs

W1 S W2 T

(3.5)

(3.6)

(3.7)

% 

y t

u t

 

 

1 u t

be done with a zero-order hold with sampling time Ts :

in the following way: t h

&

 

PSfrag replacements

Chapter 3. Implementational Aspects

34 z2 w

HT O
+

W2

Fig. 3.2: Toker/zbay mixed-sensitivity

The corresponding control setup is depicted in Figure 3.2 where the input/output relation is given by

This problem can easily be translated into the general dead-time control setup, cf. Figure 2.3, with generalized plant

and signals

After a loop shifting procedure all the assumptions (A1)(A4) of Theorem 2.3.3 are satised and therefore this problem can be solved with the proposed method, cf. Chapter 2. The McMillan degree M of the generalized plant is

where M W2 1 because it has a pole at . And therefore the McMillan degree of the rational part of the central controller K rat,0 is at most 3, see e.g. Meinsma [9]. The close-to-optimal bound comes down to opt 0.68191148818. For the calculation of the sub-optimal central controller a slightly larger opt 10 5 is

&

'

'

'

' 

' 

M P

M W1

M W2

M Prat

&

$ "  

   

z1 z2 y

w u

where

z1 z2

HTO w.

W1 W1 Prat 0 W2 Prat 1 Prat

u:

Kh

PDT
e
h

Prat

+ +

W1

z1

dead-time control problem.

"

u.

3,

Chapter 3. Implementational Aspects 0 0.2

35 t

PSfrag replacements

Fig. 3.3: Impulse response function of

taken. The sub-optimal central controller can then be found to be

where the rational part is K

and the FIR block is given by s

In both controller parts numerical pole/zero-cancellations6 lead to

It should be noted that the uneven degree of 1 and 2 in the last representation of the FIR element, e h 2 , is due to a numerical pole/zero1 cancellation at s 1 0.1 in the element 1 .

6 The

numerical pole/zero-cancellation of M ATLAB works with a precision of the order 10 8 , i.e. all poles p i and zeros z j are cancelled that have a distance less than 10 8 ( pi z j 10 8).



'

&

'

'

'

'

'

'

&

&

 

K rat,0 s

4.697s 1 , 1.628 10 5 s2 1.441s 0.03789 10.75s2 0.245s 0.3297 12.02s3 12.02s2 s 1 131.5s3 13.15s2 1.315s e 0.2s 120.2s4 108.2s3 2.023s2

0.1315 . 9s 1

'

1075s5 1099s4 19.22s3 1202s6 4.839 10 13 s5 1114s4 43.97s2 0.08475s 0.3297 2.169 10 13 s3 88.98s2 8.343 10 15 s 1 1315s5 1315s4 26.31s3 e 0.2s 1202s6 4.839 10 13 s5 1114s4 26.31s2 0.1315s 0.1315 2.169 10 13 s3 88.98s2 8.343 10 15 s

&

'

&

'

'

'

'

'

'

&

'

'

&

&

'

&

'

'

'

'

'

'

&

 

rat,0

46.97s2 14.7s 1 0.0001628s3 14.41s2 1.82s

&

 

 

0 Kh

K rat,0

K rat,0 ,

of the Toker/zbay problem.

0.03789

PSfrag replacements

Chapter 3. Implementational Aspects

36 z2
h

z2 HMZ
+

Fig. 3.4: Meinsma/Zwart mixed-sensitivity

Exactly the same result is calculated with both implementations, mirkinHin1.m and mirkinHin2.m. This solution is in accordance with the solution in the literature [26, 11]. It can be shown (Strubbe, [24]) that if the sub-optimal bound, , converges to the optimal bound, opt , then the leading coefcient of the denominator polynomial of the rational part K rat,0 s (in this case 1.628 10 5 ) converges to 0; the other coefcients are rather insensitive to changes in . Therefore, one can obtain (if numerics can be trusted) the optimal rational part, which is of reduced order, of the controller by removing the leading coefcient of the denominator polynomial.
Example 3.5.2 (The Meinsma and Zwart problem [12]): Another mixed-sensitivity problem is stated in Meinsma and Zwart [12] as follows: nd a stabilizing controller Kh which minimizes the norm of the closed-loop transfer function
1

where the data is given as

W2 s

The setup to this mixed-sensitivity problem is depicted in Figure 3.4.

'

W1 s

10

s 1 1 . 2

, and

'

2s

&

&

PDT s

Prat s ,

hs

hs

"

$ &

'

"

HMZ :

W1 I PDT Kh 1 W2 Kh I PDT Kh

W1 S W2 Kh S

'

The impulse response function is depicted in Figure 3.3. It is visible that behaves like a straight line and therefore it might be modeled as t 1 2 t t t h for some 1 , 2 .

  

&



& 

'

 

 

 

 

% 

Kh

PDT
e
h

W2

W2 e

Prat

+ +

W1

z1

dead-time control problem.

 

Chapter 3. Implementational Aspects 0 0.5 1

37 t

PSfrag replacements
0.25

0.5

Fig. 3.5: Impulse response function of

In the general setting, cf. Figure 2.3, the generalized plant P becomes P s

W1 W1 Prat 0 W2 e sh 1 Prat

where the signals are

But this plant is not rational as it is required by Theorem 2.3.3 and the norm of the closed-loop transfer function HMZ does not exist because of the term W2 e h outside of the feedback loop. Fortunately this problem can be restated due to the fact that control is equivalent to: nding a causal controller Kh that stabilizes the closed-loop system (without weighting functions outside the loop) such that norm of the closed-loop system is nite. the Therefore we can state for the generalized setting that W1 S sh W K S 2 h W1 S W2 Kh S

Now we can solve the

dead-time control problem for the similar plant

where the signals are

&

&

$ "  

z1 z2 y

w u

W1 W1 Prat 0 W2 1 Prat

with

(3.8)

u:

u and z 2 :

z2

&

"

$ "  

z1 z2 y

w u

with

u:

of the Meinsma/Zwart problem.

  %

u.

"

Chapter 3. Implementational Aspects

38

PSfrag replacements
10

opt h

4 8 12 ) Fig. 3.6: Optimal bound, opt , as a function of the dead-time h. The dash-dotted line ( represents the upper bound 10, the dashed line ( ) represents the lower bound h (the 2 0, h induced norm of the open-loop transfer function).

which will give us exactly the same controller Kh .

where the rational part is

and the FIR block is given by s 0.0436s3 1.932s2 1.135s 0.07903 1.818s4 3.027 10 16 s3 3.546s2 4.036 10 16 s 1 0.9089s3 0.4545s2 0.9089s 0.4545 e s 1.818s4 3.027 10 16 s3 3.546s2 4.036 10 16 s

Numerical pole/zero-cancellation in the FIR block leads to s 0.0218s2 0.9768s 0.07903 0.9089s3 0.4545s2 2s 1 0.4545s2 2.573 10 15 s 0.4545 e s . 0.9089s3 0.4545s2 2s 1

The optimal bound was calculated with both methods, mirkinHinf1.m and mirkinHinf2.m, to be opt 5.58982642077. A slightly larger opt 10 5 was taken for the calculation of the sub-optimal central controller. This solution is identical to the one given in the literature (Meinsma and Zwart, [12]). Also here, a deletion of the leading (small) coefcient 8.331 10 7 in K rat,0 leads to the

&

'

&

&

&

'

'

'

'

'

&

'

'

&

'

'

'

'

'

&

'

'

'

'

&

8.331 10

7 s2

'

'

&

&

 

K rat,0 s

2s

&

 

 

0 Kh

K rat,0

K rat,0 ,

1 0.1789s

Now, for a dead-time of h

1 the sub-optimal central controller is


1

0.8898

Chapter 3. Implementational Aspects

39

reduced order optimal central controller (Strubbe, [24]). The impulse response function is depicted in Figure 3.5 on page 37. It should be noted that the numerical tool M ATLAB calculates with a precision of the order 10 16 and therefore numbers of the order 10 14 and less should be treated with care or can be taken to be 0. In Figure 3.6 (p. 38) the optimal bound opt is plotted as a function of the deadtime h. It can be seen that for very large dead-time values the optimal bound converges to the value 10. This is clear from the fact that for a very large deadtime the controller does not react for this time period and therefore the closedloop system behaves like the open-loop transfer function, confer (3.8),

and the

norm of this transfer function is

Example 3.5.3 (The Partington and Glover problem [19, 11]): This last example is

taken from Partington and Glover [19] and considers the robust stabilization of the dead-time plant s

Partington and Glover consider the stabilization of the class (co-prime factor uncertainty)

It is known, see Curtain and Zwart (Corollary 9.2.9 or Section 9.4, [2]) or Georgiou and Smith [4], that this problem nding the maximal stability radius , for the class of stabilizing controllers Kh for can be solved by the minimization of the norm

&

&

&

&

&

&

Kh I PDT Kh I PDT Kh

1P 1 DT,d 1P 1 DT,d

1 Kh SPDT,d 1 SPDT,d

of plants around the nominal plant PDT prime.

'

'

'

n d

PDT,n PDT,d ,

'

PDT,n PDT,d

&

PDT s

Prat s .

&

sh

sh

where PDT,n and PDT,d are co-

1 .

 

W1 0

"

z1 z2

W1 w 0

10.

&

&

"

"

PSfrag replacements

Chapter 3. Implementational Aspects

40 w V PDT

z2 HPG
+

Fig. 3.7: Partington/Glover robust stability problem for a dead-time plant.

In order to get stable co-prime factors for the given plant we dene (for example)

W2 : If one would dene this problem with the weighting functions W1 1 PDT,d (standard mixed-sensitivity problem), the generalized plant would not be stabilizable because of the unstable transfer functions W1 and W2 being outside of the control loop. On the other hand, this SISO problem can be seen as a modied mixed-sensitivity problem with the weighting functions W1 W2 : 1 and an input-lter V, cf. Bosgra et al. [1] or Meinsma [9]. Due to the fact that the plant has a pole on 1 the imaginary axis (j ) one should consider as pre-lter V : PDT,d to the input w, cf. Figure 3.7, because for this choice of V the pre-lter and the rational part of the plant, Prat , share the same dynamics. Therefore the input signal, w, can be thought of as being a disturbance to the plant in between the block Prat and the dead-time block, e h . Thus no unstable transfer function is outside the loop and a computation of the stabilizing controller is possible. The generalized plant can now be formulated as

This can be solved with the algorithm of Mirkin (Theorem 2.3.3). The stability radius is, in accordance with the literature (Partington and Glover [19], Meinsma and Zwart [11]), for a dead-time of h 1

2.05795762522.

The robust stabilizing central controller follows as

&

0 Kh

K rat,0

K rat,0 ,

&

1 PDT,d 0 1 PDT,d

Prat 1 Prat

(3.9)

&

'



'

&

&

PDT,n s :

and

PDT,d s :

 

sh

&

 

Kh

Prat

+ +

z1

s s 1

&

Chapter 3. Implementational Aspects 0 0.5 1

41 t

PSfrag replacements

Fig. 3.8: Impulse response function of

where the rational part is

and the FIR block is given by s 3.235s2

3.597s 1.243 1.796 10 16 s 1 4.235s 5.759 10 16 e s 3.235s2 1.796 10 16 s 1

In the last equality, (1), the fact was used that the precision of M ATLAB is of the order 10 16 and numbers of this order or less can be discarded. The impulse response function of the FIR block is depicted in Figure 3.8. The dependence of the stability radius h as a function of the dead-time h is depicted in Figure 3.9. For large dead-time values the stability radius, , tends to 0, because the controller does not react for this time period and therefore the closed-loop system behaves like the open-loop transfer function

confer Equation (3.9). We know from Theorem 2.3.3 and the Nehari theorem (Step 2 on page 17f.) that 0
2

 

 

This holds for any input signal, w as well take the step input, w t

0,h

0, that is integratable on 0, h . So we might t , and apply it to the transfer function

s 1 s

s 1 s

0,h

"

& "

"

z1 z2

1 PDT,d w 0

s 1 s

w,

'

&

'

 

3.597s 1.243 3.235s2 1

4.235s 3.235s2 1

0,h

0,h

'

&

&

'

'

&

'

'

&

'

&

 

K rat,0 s

1 8.94 10
6s

0.556

 

0.6

1.2 of the Partington/Glover problem.

&

"

Chapter 3. Implementational Aspects

42

PSfrag replacements
0.8

0.4

5 10 15 0 Fig. 3.9: The stability radius as a function of the dead-time h.

0,h

0 0

Therefore

0,h

and as h goes to

and thus

'

'

0,h

0,h

1 2 h 3
1

'

'

z t

dt

   

w t

dt

h h

and h2 1 3 h . 3

0.

'



  

1 s 1 PDT,d s in order to get the output z t can be calculated as being


0

" ! " !

t . The respective norms

&

4 The Ship Movement Prediction Problem


In this chapter the ship movement prediction problem from Zwart et al. [29] is presented, discussed and solved using the dead-time control algorithm proposed by Mirkin, see Theorem 2.3.3.

4.1 Motivation
The ship movement prediction problem is stated as follows: a helicopter tries to land on a moving ship on an open rough sea. The problem now is that just before the helicopter lands on the surface of the ship, the ship might make a sudden upward movement and therefore possible damages on the helicopter can occur. It would be desirable for the helicopter pilot to receive a warning signal h seconds (preferable 3 seconds) ahead in order to react on an upcoming sudden upward movement of the ship. The modeling of the problem, as it is stated in Zwart et al. [29], is as follows: The vertical speed, v, of the ship and therefore of the landing platform for the helicopter is measured with an accelerometer. The output signal of the accelerometer is

The transfer function of the accelerometer itself is given with 1 Ts

It is clear from the transfer function Pacc that a constant speed is, indeed not measurable with an accelerometer, but in our case a constant speed would mean that the ship is sinking and is therefore not of interest for us anyway.

'

Pacc s

where T

r s

Pacc s v s .

0.02 sec.

43

   

(4.1)

(4.2)

Chapter 4. The Ship Movement Prediction Problem

44

PSfrag replacements

in

Fig. 4.1: Amplitude of the transfer function W1 in dB.

Morris et al. [17] found out empirically that the movement of a ship caused by sea waves has a nite bandwidth with the main region lying between 0.3 rad/sec and 0.9 rad/sec. For the modeling process of the ship movement v (vertical speed) we take the signal w to be white noise and lter it

through the almost band-limited lter W1 . The pre-warning instrument (predictor) should compute the predicted speed, v p , of the ship h 3 seconds ahead, i.e. the predictor has to make the prediction error

The ship movement prediction problem can now be formulated as follows:


Denition 4.1.1 (The ship movement prediction problem): Find a predictor, E, that

maps the measurable signal r (acceleration) to the h time steps ahead predicted vertical speed vp , i.e.

This prediction problem can be thought of as being a dead-time control problem with the h seconds delayed signal v p . (This will become clear in the next section.) Then the controller corresponds with the predictor. And therefore this problem can be solved in an framework with the dead-time control method mentioned in Chapter 2.

% 

such that the prediction error t :

v t

vp t

 

vp s

E s r s

(4.5) h is minimized.

as small as possible. The ideal case would, of course, be t equals v t h .

0 so that vp t

 

% 

t :

v t

vp t

v s

W1 s w s

10


 

W1 j

0 5 10 15
1

    '   

100

rad sec

(4.3)

(4.4)

Chapter 4. The Ship Movement Prediction Problem

45

Fig. 4.2: Control loop proposed by Zwart et al. [29] in order to predict the upwards movement (speed) v of a ship h seconds ahead.

4.2 Control loop setup


In this section the control loop and the solution method, that is proposed by Zwart et al. [29], is presented. Zwart et al. [29] proposed to take the second order lter W1 s s2

m s m s 2 m

with central frequency m 0.5 rad/sec for the pre-ltering process of the white noise signal, w, in order to get the vertical speed, v W1 w, of the landing area. The amplitude of this transfer function is depicted in Figure 4.1. The signal v is not measurable and therefore the prediction error, , is not (directly) available either. We can dene the new (measurable) ltered error signal, e, as

The output signal y is herewith dened as

The minimization of now comes down to a minimization of the ltered error signal e. The ship movement prediction problem can then equivalently be formulated as:

&

y:

PDT vp

y.

&

e:

Pacc Pacc v e
h

Pacc vp

Pacc vp .

W1

Pacc

&

HZWM

1 Pacc

z1

z2

vp

W2 Kh
vp

PDT Pacc

'

'

 

(4.6)

(4.7) (4.8) (4.9)

(4.10)

Chapter 4. The Ship Movement Prediction Problem

46

controller, Kh , that maps the ltered error signal, e, to the predicted vertical speed, vp , i.e.

Denition 4.2.1 (The ship movement prediction problem): Find a feedback

such that the ltered error signal, e, is minimized. The relations of the signals and transfer functions are given in equations (4.1)(4.10) and a corresponding control loop is depicted in Figure 4.2. From this and Equation (4.5) it is immediately clear that the connection between the predictor, E, and the feedback controller, Kh , is given by

where Kh is a stabilizing controller due to the fact that Pacc and E are stable. Further: Zwart et al. [29] proposed to take the minimization technique for this process, i.e. to minimize the norm of the mapping H1 from the input signal, w, to the prediction error H1 w. This can be done because if w varies over all frequencies with power 1 then the value H1 2 is equal to the power of the prediction error in the worst case. H1 can be derived from the equations above and results in

A second consideration Zwart et al. [29] took into account is that there should not be any high frequency noise apparent in the predicted signal v p . In order to achieve this they punished the signal v p with the high-pass weighting lter W2 s 0.1 s 1 , 0.01s 1

see Figure 4.3. The cut-off frequency of W2 was chosen in such a way that the main frequency bandwidth of v is not effected. So the design prediction signal, vp , can be dened as

In the minimization setting this second consideration can be formulated as minimizing the norm of the transfer function H2 : W2 E, where H2 is given with

&

&

'

H2

W2 Kh 1

Pacc Kh

vp :

W2 vp

W2 E r.

&

'

&

'

'

 

H1

W1 1

Pacc Kh

&

&

'

Kh 1


h

vp s

Kh s e s

 

(4.11)

Pacc Kh

(4.12)

(4.13)

(4.14)

(4.15)

PSfrag Chapter 4. The Ship Movement Prediction Problem replacements

47

20

W2 j
10

20

in

Fig. 4.3: Amplitude of the weighting function W2 in dB.

These two considerations combined give the dead-time control problem as follows: minimize, over all stabilizing controllers Kh , if any exist, the norm of the transfer function

We denote the optimal bound, opt , by

Now this has to be written in the generalized control setting of Chapter 2, confer Figure 2.3, in order to apply the solution method described in Chapter 2. With the help of Example 3.5.2, which tackles the same mixed-sensitivity problem, the generalized plant is given by

One can see that the generalized plant, P, is stable because the accelerometer, Pacc , is stable by itself. Thus the controller Kh 0 is stabilizing P. For this Kh the closed-loop system, with generalized plant (4.17), becomes

Therefore :

W1

The lower bound, , of opt , as discussed in Chapter 2, is equal to the 2 0, h induced norm of W1 because the controller is only able to react after the deadtime of h seconds. For W1 as in (4.6) and h 3 this is 0.4696373935.

" #

z1 z2

W1 w. 0 1 is an upper bound for opt .

opt :

Kh stabil.

min

W1 W1 Pacc 0 W2 1 Pacc

&

W2 Kh 1

hP K acc h

"

"

H:

& ' & '

H1 H2

&

W1 1

hP K acc h

W1 S . W2 Kh S

100

100

101

102

103

rad sec



(4.16)

(4.17)

"

Chapter 4. The Ship Movement Prediction Problem

48

For this choice of the weighting functions W1 and W2 , cf. (4.6) and (4.13), one obtains for the optimal bound

opt

0.5819607312.

This was calculated with the alternative algorithm mentioned in Chapter 2, page 11f., via differential Riccati equations (mirkinHinf2.m). An actual calculation of the sub-optimal controller, Kh , was not possible due to numerical problems. For instance the matrix X 0; h became almost singular and therefore was a numerical inversion of X 0; h problematic and unreliable. The computation of the sub-optimal controller and the sub-optimal bound with the rst method via the matrix exponential , see Theorem 2.3.3, was not possible at all. A plausible explanation is in the structure of A

itself: the accelerometer has a fast pole at s P : 50 sec 1 and the weighting function W2 has one at sW2 : 100 sec 1 . Thus the system matrix A has these eigenvalues too. The spectrum, (see Denition A.4.3), of the Hamiltonian matrix AHam multiplied with the dead-time h 3 is computed as being approximately

One can see the relation of the fast poles s P and sW2 together with the dead-time h in the spectrum of AHam h. Now, due to the fact that in general

holds the matrix exponential has very large eigenvalues (in the absolute value sense) and eigenvalues very close to 0 (e 150 and e 150 0). The largest and smallest eigenvalues of can be computed with M ATLAB to be s max 1.94 10130 and smin 1 smax 5.15 10 129 , respectively. An inversion of such an ill-conditioned matrix is numerically unreliable or impossible, as it turns out for this case. A different choice for the weighting functions, W1 and W2 , does not give any signicantly better result because the fast pole s P : 50 sec 1 and the deadtime h 3 sec are inherent in the system.

4.3 Filtering problem


If one takes a closer look at the ship movement prediction problem and assumes (for design reasoning) that the vertical speed, v, of the landing area of the ship is

&

&



&

e At

A t

AHam h

150,

75

13j,

300 .

where

&

&

where

AHam :

e AHam h ,

A C1 C1

1 BB 2

(4.18)

PSfrag replacements

Chapter 4. The Ship Movement Prediction Problem

49

PFilt

HF

Fig. 4.4: Dead-time ltering setup for the ship movement prediction problem.

available, then the above mentioned problem is in fact a ltering problem. This is immediately clear after considering the corresponding Figure 4.4 and comparing it with equations (4.1)(4.5); the weighting function W2,F will be explained below. An indirect computation of E via a controller Kh , like in the previous section is no longer needed, confer Equation (4.12). The closed-loop transfer function is now given by

The generalized plant, cf. Figure 2.3 or Figure 2.9, can then be stated with

The design weighting function W2,F (together with the articial noise w 2 ) is needed so that the generalized plant P has full row rank for all s j , see assumption (A2) on page 23, because Pacc has a zero on the imaginary axis. A second reason for the need of W2,F (if we think of the norm of HF ) is to make the predictor/lter, E, (strictly) proper and therefore realizable. Without W2,F the lter, E, will try to get as close as possible to the non-proper (and unstable) trans1 fer function e h Pacc in order to make HF,1 0 on any nite interval. This would mean that E would become non-proper and (close to) unstable due to a pole in the origin, which is of course undesirable due to realizability and stability reasons. Additionally W2,F can be used for performance design. It turns out that the numerical computation of the lter, E, for different choices of W2,F did not give any signicant good result but at least (compared to the control loop strategy of the last section) the computation of a stable predictor/lter, E, was possible. The most successful result is given below.

Rewriting the problem


The main reason for the numerically difcult and unreliable computation (parameters of the lter consist of very large and small numbers that are above/below

&

"

W1 0 Pacc W1 W2,F

1 0

& %

&

HF

HF,1 HF,2

+ +

W2,F

w2

h EP acc

W1

h EW 2,F

vp

Pacc

W1

w1

(4.19)

(4.20)

Chapter 4. The Ship Movement Prediction Problem

50
1

A possible way to circumvent this problem is by norming the accelerometer to 1, i.e. s P 1 sec 1 and giving at the same time a constraint on the lter, E. Then compute an E with the new normed data and nally un-norm the data in order to get the real lter E. What is meant by this will now be explained: The only place where the fast pole in the closed-loop transfer function HF , Equation (4.19), occurs is in HF,1 in the accelerometer Pacc , or better, in the product EPacc . The trick is now to extract the fast pole s P from the accelerometer Pacc and to attach it to E without changing the product and without changing the closedloop transfer function HF , i.e.

where E Pacc denotes the product of the normed lter E and the normed accelerometer Pacc , and W2 is the normed weighting transfer function.

Then with the new lter and accelerometer the closed-loop transfer function, HF , can be stated as

where

The generalized (normed) plant becomes

Pacc W1 W2,F

This rewritten problem P, E can, as it turns out, be solved for almost any wellposed W2,F which does not have too fast poles, i.e. poles that are in the far left half plane of .

W1

W2,F s :

N s W2,F s .

& %

&

 

HF

HF,1 HF,2

'

Pacc s :

N s Pacc s

s s 1

h EP acc

W1

'

 

&

E s :

s E s ,

where

N s :

'

 

In order to get the normed pole s P

1 sec in the accelerometer we dene Ts 1 , s 1 (4.21) (4.22)

h EW 2,F

EPacc

E Pacc ,

and

EW2

EW2,F

(4.23)

(4.24)

(4.25)

&

the numerical tolerance of M ATLAB) of the lter is the fast pole s P in the accelerometer Pacc .

50 sec

&

 

 

Chapter 4. The PSfrag replacements Ship Movement Prediction Problem

51

100

101

102

103

Fig. 4.5: Amplitude of the weighting function W2,F in dB.

Choice of W2,F
From the problem statement, see Section 4.1, we know that the main frequency range of interest lies in between 0.3 rad/sec and 0.9 rad/sec; therefore the lter, E, should be active in this region as well. Another goal is that the lter should be (strictly) proper in order to be realizable, i.e. that for high frequencies E j should decay to k and k . These goals can be achieved by choosing the weight W2,F to be a high-pass lter, confer HF,2 in Equation (4.19), so that for low frequencies the lter E is not punished at all and for the high frequencies E will experience the biggest punishment. However the lter, E, should still be active enough in the main region of interest. In order to avoid fast poles in the computation, see HF,2 in Equation (4.23) and (4.21), we choose a rst order weight to be

The normed weighting function is then given by

Several weighting functions were tried out, also of higher order. After a trial-anderror process a satisfactory low-order weight was found as W2,F s 0.01 s 3 . Ts 1

The amplitude of the Bode plot is depicted in Figure 4.5.

 

'

'

'

W2,F s

N s W2,F s

k1

'

s s

k2 1

for some k1 , k2

 

 

'

W2,F s

k1

s k2 Ts 1

for some k1 , k2

(4.26)

(4.27)

(4.28)

'


30 10

 

 

 

W2,F j

10 20

rad sec

Chapter 4. The Ship Movement Prediction Problem

52

PSfrag replacements

100

Fig. 4.6: Comparison of the amplitude of the weighting function W1 in dB as proposed in Zwart ) and the band-limited third-order Butterworth lter (solid et al. [29] (dash-dotted line line ).

Choice of W1
For the choice of W1 one can use the transfer function proposed in Zwart et al. [29] which is given in Equation (4.6). The numerical calculation of the predictor/lter, E, is unproblematic. But taking a closer look at the ltering setup in Figure 4.4 it can be recognized that the transfer function W1 in Equation (4.6) is not band-limited enough because w is considered to be white noise. For frequencies larger than the input w1 m 0.5 rad/sec, W1 behaves like a rst order integrator (decay of W1 j by 20 dB/decade) and therefore smoothens the white noise signal by one order in order to get the vertical speed, v. The speed v in turn is differentiated again with order 1 by Pacc . Therefore it is expectable that the signal r has a behavior related to white noise. It is known that white noise is an unpredictable signal, so we can not expect that vp will be a good prediction of v. To overcome this problem the third-order1 band-pass Butterworth-lter, see e.g. Soliman and Srinath [23], W1 s 4.63s6 5.556s5 7.083s4 s3 4s3

with cut-off frequencies at 0.3 rad/sec and 0.9 rad/sec is used. It occurred that lters of (signicantly) higher order than 3 cause numerical problems in the computation of the lter, E. A comparison of the amplitude of the third-order Butterworth lter and the transfer function proposed by Zwart et al. [29] is depicted in Figure 4.6. It was recognized that as smaller the bandwidth of the lter W1 gets, the optimal bound opt of the dead-time problem (h 0) converges to the corresponding opti1 The

given band-pass lter W1 is, of course, a sixth-order lter but was derived on the bases of a third-order Butterworth low-pass lter.

'

'

1.913s2

0.405s

0.091

(4.29)

'

'

'

'


40 10

W1 j

 

20

rad sec

Chapter 4. The Ship Movement Prediction Problem

53

mal bound opt,h 0 of the dead-time free (h 0) problem, i.e. opt opt,h 0 0. This is clear because for the limit case (bandwidth of W1 is 0) we have that the vertical speed, v, consisting only of one sinusoid with known frequency. If we know this particular v at one time instance we know it for all time, thus a prediction of the vertical speed h seconds ahead can be done with out any difculty, but this means that opt opt,h 0 0.

The predictor E

With the above given transfer functions, equations (4.20)(4.29), and backtransformation from the normed data P, E to the original system data P, E the stable (central) lter/predictor, E, was computed to be

where the rational part is

and the FIR block is given by

The numerator and denominator parts of

'

'

0.00859s2

0.0003863s

0.0003863.

'

'

'

'

0.7757s6

0.07971s5

0.07971s4

0.00859s3

'

'

'

'

'

d s :

13

12

1.62s

11

1.62s

10

1.093s

1.093s

&

'

&

&

1.817 10

19 2

1.347 10

20

5.458 10

21

, and

0.7757s7

'

&

'

&

'

&

1.398 10

15 5

1.633 10

16 4

2.758 10

17 3

'

&

'

'

&

'

n2 s :

1.153 10

15 9

3.436 10

15 8

0.4286s7

0.002866s3

0.004838s2

0.0001279s

0.0002202, 1.148 10
15 6

0.167s7

0.43s6

0.02689s5

0.04413s4

'

'

' ' ' ' ' ' & %

'

'

n1 s :

1.17s12

0.8408s11

2.671s10

&

n1 s d s

3s n2

s . d s are 1.52s9 1.79s8

'

'

'

'

'

'

'

'

 

Erat,0 s

60.53s6 129.6s5 123.1s4 59.58s3 0.0001446s7 1.836s6 58.11s5 6.092s4 4.878s2 1.675s 1 1.091s3 5.621s2 2.012s 0.661

'

'

&

'

'

 

N 1

N E0

Erat,0

Erat,0 ,

(4.30)

Chapter 4. The Ship Movement Prediction Problem 0 1 2 3

54 t

PSfrag replacements

Fig. 4.7: Impulse response function of

With consideration of the precision of M ATLAB n 2 can be stated as

Both algorithms, mirkinHinf1.m and mirkinHinf2.m, give exactly the same result. It is a known fact, confer e.g. Zhou et al. [27] or Meinsma [9], that the McMillan degree, M , of the generalized plant, P, is always greater or equal than the McMillan degree of the rational part of the generalized (sub-)optimal controller, in our case the normed lter E. The McMillan degree of the generalized normed plant, confer Equation (4.25), is

On the other hand the McMillan degree of the sub-optimal lter, confer Equation (4.30), is

Therefore this conforms to theory. The result for the un-normed plant and lter follow equivalently. Strubbe [24] showed that as the sub-optimal bound, , converges to the optimal bound, opt , the coefcient of the highest order of the denominator polynomial in the rational part (in our case 0.0001446) of the controller (lter) converges to 0, whereas the other coefcients are rather insensitive to changes in . For SISO problems (as in our case) is the optimal lter/controller unique. But this means that we can achieve the (lower-order) optimal lter, E opt , by a simple deletion of the leading (small) coefcient. The impulse response function of the FIR block,

M E

M Erat,0

7.

, is depicted in Figure 4.7.

'

'

' 

' 

M P

M Pacc

M W1

M W2,F

8.

&

'

This lter was computed for the sub-optimal bound optimal bound is opt 0.32991578477.

n2 s :

0.4286s7 .


     

0.6

1.2

opt

10

5,

where the

Chapter 4. The Ship Movement Prediction Problem

55

The Bode plot of the sub-optimal lter, E, is depicted in Figure 4.8. It can be seen that the Bode plot of the optimal lter, E opt , and of the sub-optimal lter, E, is identical for frequencies up to about 1000 rad/sec. Our main interest however lies in the frequency range from 0.3 rad/sec to 0.9 rad/sec therefore there is no advantage to use the optimal lter instead of the sub-optimal lter. One reason to choose the sub-optimal lter instead of the optimal one is that E is strictly proper whereas Eopt is only bi-proper. In simulations, which are not included in this thesis, it could be shown that the behavior of E and E opt are almost identical and it was not possible to judge which one was the better. Therefore we give here only the results of the sub-optimal solution. It is also visible that in the main region of interest (boxed gure), from 0.3 rad/sec to 0.9 rad/sec, the amplitude of the lter behaves almost like an integrator, i.e. 1 s ( 20 dB/decade). This is clear from HF,1 in Equation (4.19): in the case where only HF,1 would be considered, the ideal (but non-proper and unstable) lter, E id , would try to invert the transfer function e h Pacc and therefore be Eid s :

Therefore the behavior of our computed lter, E, conforms with E id in the main region of interest (0.3 rad/sec0.9 rad/sec) and tries to make the norm of HF,1 as small as possible. The amplitude of the closed-loop transfer function components, HF,i , are plotted in Figure 4.9 on page 56. One can clearly see that both components, HF,1 j and HF,2 j , are below the sub-optimal bound 0.32992578 for all frequencies . In Figure 4.10, the equalizing property of HF visualized, i.e. the lter tries to make the absolute value of the closed-loop system, HF j , on the imaginary axis (j ) as constant as possible over a wide frequency range. In the optimal case this is HF j opt for all frequencies, see e.g. Bosgra et al. [1]. In conclusion, we can say that the computed lter, E, obeys all (theoretically) desired properties: it is stable (guaranteed of course by theory). This can be shown by a (modied) Nyquist plot and the Principle of the Argument which will not be included in this thesis,

it is strictly proper and therefore realizable, see Equation (4.30),

Eid j

'

'

e jh

Tj j

Tj j

1 . j

in order to make HF,1 0. It can be seen right-away that the amplitude Eid j of the ideal lter would behave like an integrator for low frequencies, i.e.

'

  &

1 esh Pacc s

esh

Ts s

&

  

Chapter 4. The Ship Movement Prediction Problem

56

PSfrag replacements20

20

90 0 90

Fig. 4.8: Bode plot of the lter E (solid line), top: amplitude E j in dB, bottom: phase E j in deg. The optimal lter E opt is plotted as dash-dotted line ( ). The 1 inverse of the weighting function, W2,F , is represented as dashed line ( ).

30 10

Fig. 4.9: Bode plot of the closed-loop transfer function components, HF,i, in dB: HF,1 is represented as solid line () and HF,2 as dashed line ( ).

100

103

HF,1 j


HF,2 j


0.33

15

HF,i j PSfrag replacements




rad sec

10

100

103

106

E j

E j

1 W2,F

Eopt

rad sec

Chapter 4. The Ship Movement Prediction Problem

57

PSfrag replacements

0.33

15

25

10

100

103

Fig. 4.10: Equalizing property of the closed-loop transfer function, H F . HF j

is plotted in dB.

it is very active (20 dB E j 0 dB) in the region of interest, see Figure 4.8, and behaves in a close-to-ideal way,

the equalizing property of HF holds for a broad frequency range, see Figure 4.10.

Simulation
The closed-loop system was simulated with the M ATLAB tool Simulink. For the test input signal w1 t sin 0.5t (which lies in the main region of interest) it is visible, confer Figure 4.11 on page 58, that the norm of the output signal (prediction error), , in (almost) steady-state is indeed smaller than the computed bound . This could also be veried for other frequencies and is therefore consistent with the theory:

The overshoot at the beginning, i.e. z w , is due to the transient behavior of the system. The uneven thickness of the plot of in Figure 4.11 is due to the . discretization of the FIR block, The prediction error, , for the input signal w 1 t w t , where w t is continuous-time white noise with unit intensity, is depicted in Figure 4.12. The reason for this behavior is that w is not a nite power signal (see Denition A.1.2) and thus the norm can not be related to this output signal. The optimization method is therefore not suited for this particular case. This shows that the

w.

the sub-optimal bound, bound 1, and

0.32992578477, is by far smaller than the upper

 

HF j

rad sec

Chapter 4. The Ship Movement Prediction Problem

58

PSfrag replacements
0.33

0.33

25

PSfrag replacements 0

1 0 25 50

Fig. 4.12: Output signal, , to the input w 1 t

Fig. 4.11: Test simulation with input signal w 1 t error, , as output.

sin 0.5t (dashed line) and prediction/lter

w t , where w t is white noise.

50

w1 t

sin 0.5t

Chapter 4. The Ship Movement Prediction Problem

59

problem setup proposed by Zwart et al. [29] for this input signal is problematic and another optimization technique should be used. In the next chapter (Chapter 5) we will introduce the more appropriate 2 dead-time control method to solve such problems with stochastic input. Another possible reason for the bad performance of the prediction error when applying a continuous-time white noise signal to the closed-loop system could be the general difculty to simulate such input signals. It is also not completely clear how good the simulated white noise signal, which is produced with the Simulink-block Band-Limited White Noise, is compared to the theoretic white noise. However, tests like the power spectral density of that produced signal have been made. The uneven thickness of the plot of in Figure 4.12 is due to the discretization of the FIR block, . But it should be stated that the controller worked in complete accordance with the theory for any tested nite power signal.

4.4 Behavior of the optimal and lower bound


The behavior of the optimal bound, opt , for different dead-time values, h, is depicted in Figure 4.13 on page 60 together with its lower bound h : P11 2 0,h (represented as dash-dotted line). It is visible that the optimal bound increases only slightly for low dead-time values (h 1.7 sec) and largely for dead-time values h 1.7 sec. That means that the prediction for low dead-time values is almost as good as in the dead-time free case. This is counter-intuitive and there is no real logical explanation for this. However it could be veried that opt as a function of h is smooth (without discontinuities) and was computed without any numerical difculties. It is also visible in Figure 4.13 (and clear from Theorem 2.3.3) that no matter how optimal one chooses the weighting function W2,F the optimal bound, opt , will always be bigger than the lower bound, h , i.e.
2

Another unusual behavior shows the lower bound h P11 2 0,h , see Figure 4.14, as a function of the dead-time, h. Also the behavior of this function could not be claried, but is depicted due to its interesting, almost periodic, shape. The optimal bound opt converges, as veried before, for large dead-time values to the upper bound 1 because

and h

opt

, confer Figure 4.14.

sup h h

opt

W1

0,h

 

PSfrag replacements Movement Prediction Problem Chapter 4. The Ship

60

0.4


0.33

0.2

PSfrag replacements 1

0.5

Fig. 4.14: Behavior of the lower bound, h : P11 2 0,h , as a function of the dead-time, h. The upper bound, : W1 1, is represented as dotted line.

4.5 Conclusions
It can be said that the computed lter, E, corresponds in full agreement with the theory and also shows a decent behavior/performance. Nevertheless the problem has been set up for an input signal which is continuous-time white noise. For this case the simulation did not show a satisfactory result. This is inherent in the fact that continuous-time white noise has innite energy and therefore it is not suitable for problems. Even though the original problem was stated as an control problem, cf. Zwart et al. [29], one might have recognized from the beginning that this problem, due to the fact that the input signal is continuous-time white noise, can be solved in the (maybe more appropriate) 2 dead-time control/ltering framework which will be discussed in the following Chapter 5.

h h

25

50

Fig. 4.13: Optimal bound, opt , as a function of the dead-time, h. The lower bound, h : P11 2 0,h , is represented as dash-dotted line ( ).

opt h

h
0 1 2 3 4

2 Control for Dead-Time Systems


In this chapter an 2 control theory for dead-time LTI systems as proposed by Mirkin [13, 15, 16] will be presented and discussed. The 2 solution to the ship movement prediction problem from Chapter 4 will be given in the end of this chapter.

5.1 Motivation
The setup of the 2 dead-time control problem is identical to the one presented case, confer Chapter 2. The dead-time control setup is depicted in for the Figure 5.1 where P represents the generalized plant, Kh the generalized controller and e h is the dead-time element. The signals in the control loop are: exogenous input w (noise, reference or disturbance),

exogenous output z (error for the minimization criterion),

controller input or delayed measurement signal y, and

control signal or controller output u.

Also here we assume (for theoretical reasoning) that the dead-time element, of the original dead-time plant, PDT , is attached to the controller

The generalized plant, P, is assumed to be of the nite-dimensional form (2.2), i.e.

$ 

"

P s

 

 

P11 s P21 s

P12 s P22 s

61

&

 

Kh

&

for some proper Kh .

(5.1)

A B 1 B2 C1 0 D12 C2 D21 0

(5.2)

Chapter 5.

PSfrag replacements

Fig. 5.1: General control loop setup for dead-time systems with time delay h.

As mentioned before (Section 3.1) this form can be achieved for any proper rational P with the so called loop shifting technique proposed by Zhou et al. [27], which is implemented in the M ATLAB routines p_norm.m and k_scale.m, see sections 3.1 and B.1. control) The big difference in the 2 framework to the one given in Chapter 2 ( is that we try to minimize the 2 norm of the closed-loop transfer function, H : h K , rather than the norm. (See Denition A.1.6 for the denition L P, e h of the 2 space and its corresponding norm.) It turns out that this norm is very practical for the case where the input signal is a stochastic process because of the following: Suppose that the exogenous input signal, w, is white noise with unit intensity, i.e.

and thus its power spectral density function is S ww spectral density function of the exogenous output becomes

assuming that H is a real transfer function. For the variance of the output (error signal) we get

 

tr

H j

H j

d (assumed that H is real)

 

tr

j H j

tr AB

tr BA

HT

tr

 

H j H T

tr S zz

&

&

&

&

 

E zT t z t

1 2 1 2 1 2 1 2 H

 

S zz

H j H T

with

d d

I t

E w t wT

I. Then the power

 

Control for Dead-Time Systems

62 w

P
u
h

Kh

&

Chapter 5.

In the aforementioned ship movement prediction problem (Chapter 4) the input signal was modeled as white noise, therefore a minimization of the variance of the error signal, z, actually means a minimization of the 2 norm of the closed-loop transfer function H. It is now clear why the 2 minimization technique is useful for our ship movement prediction problem. We can dene the general
2

dead-time control problem as follows:

Denition 5.1.1 (The general (sub-)optimal

0 and given nite-dimensional generalized plant P of if possible, for a given the form (5.2) the set of all controllers K of the form (5.1) that internally stabilize the closed-loop system, confer Figure 5.1, and such that in the sub-optimal case hK hK or in the optimal case opt . L P, e L P, e h h,opt 2 2

dead-time control problem): Find,

The state-space solution to this 2 dead-time control problem is given in the next section. The proof will be given in Section 5.3.

5.2 Solution of the systems

control problem for dead-time

In order to solve the (sub-)optimal 2 dead-time control problem we have to pose standard assumptions for the generalized plant, P. These assumptions are identical to the ones given for the case (Chapter 2) and are therefore only listed as a reminder. The reader is referred to Zhou et al. [27] or page 8 for further detail.

Assumptions
The generalized plant, P, is nite-dimensional and of the form (5.2), that is

The standard assumptions are: (A1) A, B2 is stabilizable and C2 , A is detectable,

C2



"

(A3)

j I

B1 D21

has full row rank for all



"

(A2)

j I B2 C1 D12

has full column rank for all

$ 

P s

 

 

P11 s P21 s

P12 s P22 s

A B 1 B2 C1 0 D12 C2 D21 0

, and

&

" #  

&

Control for Dead-Time Systems

63

Chapter 5.

rat K2

Q2
Fig. 5.2:

Kh
dead-time controller setup.

Now we come to the solution of the as an algorithm.

Solution an algorithm

The control ARE and the ltering ARE

The lower bound of the

norm of the closed-loop system is then given by tr F2 YF2 ,


2 dead-time output feed2 h,2 , where

which is the optimal bound for the dead-time free case, confer Theorem A.3.7.
Theorem 5.2.1 (The
0

1 See

Theorem A.3.7 for the solution of the

h,2 :

tr F2 e At L2 L2 e A t F2 dt.
dead-time free, i.e. h 0, control problem.

'

back problem is solvable if and only if 2

dead-time control problem): The


2 opt,h

'

opt,h

tr B1 XB1

for their stabilizing solution X denite (X 0 and Y 0).

X and Y

Y such that they are non-negative

 

' 

% 

' 

'

AY

YA

B1 B1

L2 L2

with

L2 :

YC2

B1 D21

'

'

'

XA

A X

C 1 C1

F2 F2

with

F2 :

  %

As in the delay free case1 (h equations (ARE):

0), one has to solve the two algebraic Riccati

(A4) D12 D12

I and D21 D21

I.
2

dead-time problem. Also here, it is given

B2 X

PSfrag replacements

Control for Dead-Time Systems

64

D12 C1

(5.3)

(5.4)

Chapter 5.

Sfrag replacements

Fig. 5.3: Structure of the optimal

dead-time controller.

If this holds, then the set of all stabilizing sub-optimal controllers is parameterized as depicted in Figure 5.2 with

In the optimal case is Q2 s given with

0 and hence the unique stabilizing optimal controller, is

It is visible that the FIR block, 2 , and bound h,2 are purely caused by the delay and are not dependent on the bound, , and can therefore be thought of as the cost of the dead-time. If one compares Theorem 2.3.3 ( dead-time control) with Theorem 5.2.1 ( 2 dead-time control) it can be seen that the 2 case is much simpler in the parameterization and an iteration, in order to get (close to) the optimal bound, is not needed (one-shot algorithm).

'

where the optimal bound is opt : Figure 5.3.

opt,h

h,2 2 and its structure is depicted in

&

&

&

"

h e

P22 s

 

sh

and

A B2 Ah C2 e 0

&

'

'

"

 

 

rat K2,opt s :

B2 F2

e Ah L2 C2 e F2

Ah

e Ah L2 0

sh

A B2 C2 0

and Q2 any stable transfer matrix such that Q 2

2 opt,h

2 h,2 .

&

&

 

&

"

h e

P22 s

 

sh

&

rat K2 s

A B2 Ah C2 e 0

sh

&

'

'

B2 F2

e Ah L2 C2 e F2 C2 e Ah

Ah

e Ah L2 B2 0 I I 0

rat K2,opt

 

Control for Dead-Time Systems

65

Kh,opt
2

, A B2 C2 0

(5.5)

(5.6)

(5.7)

(5.8)

Chapter 5.

Theorem 5.2.1 is implemented in the M ATLAB routine mirkinH2.m which can be found in Section B.4 in Appendix B.

5.3 Proof of the Theorem 5.2.1


As in the dead-time control problem, confer Chapter 2, the main idea of Mirkins solution to the dead-time control problem is to absorb the dead-time element GDT s e sh , see Figure 5.1, from the generalized plant PDT (with deadtime) into the controller

After doing this the plant is assumed to be nite-dimensional and of the form (5.2) where the set of all stabilizing controllers, K, for such a plant, P, is known in the literature, confer e.g. Zhou et al. [27] or Theorem A.3.7 in Appendix A. This solution set takes the form

where the rational part is G s


s

A B 1 B 2 C 1 0 I C 2 I 0

The attachment of the dead-time element, e h , to the controller, Kh , can be seen as a constraint imposed on the set of all controllers. Now, we can formulate the
Denition 5.3.1 (The
2

extraction problem as follows:

of all controllers K
L

extraction problem): Determine if the parameterization

G , Q ,

where

with the nite-dimensional G s


s

A B 1 B 2 C 1 0 I C 2 I 0

2 The reader should be reminded of the denition of properness in this framework, see Denition

2.3.1 on page 7.

&

and the bound is :

G , Q

with

, Q

opt,h

2.

&

K s

Kh s

sh

&

 

 

 

 

Control for Dead-Time Systems

66

with proper2 Kh s .

(5.9)

(5.10)

(5.11)

Chapter 5.

contains dead-time controllers of the form

In the following we give the proof of Theorem 5.2.1 step by step.

This step is completely identical to the one given in Section 2.4 and will therefore be omitted. The basic results are:

h G11 where
G11 s

An intermediate result of the

extraction problem 5.3.1 can then be given as: such that

Corollary 5.3.3 (One-block distance problem): The

solvable if and only if there exists a Q

extraction problem 5.3.1 is (5.12)

3 For

the denition of the h-truncation operator, h

, see Denition A.2.2 in Appendix A.

Equation (5.12) of Corollary 5.3.3 can be reformulated due to the fact that a Hilbert space and because Q and e h Q have support on 0, h and h,

&

Step 2: Q

&

'

2
2

is ,

for some Q

&

'

&

Then K L G , Q with Q proper Kh ) if and only if Q satises

belongs to the class K

"

B 1 C 2 B 2 C 1 B 1 C 1 0

. e
hK h

(for some

Proposition 5.3.2: Let Q

Step 1: Q

be the 0, h -truncation3 ,

, of G11 : that is Q

and next characterize all such solutions K, if any exist.

&

 

Control for Dead-Time Systems

67

Kh

with proper Kh

Chapter 5.

respectively. Therefore they are orthogonal to each other. This can also be shown as follows:
2

Q t

h Q t

h dt

Now we can state the intermediate lemma:


2

h,2 :

2
2

able if and only if the delay-free addition

Lemma 5.3.4 (The

extraction problem): The

extraction problem 5.3.1 is solvcontrol problem, i.e. for h 0, is solvable and in


2

'

 

tr Q j Q j

tr

tr A

&

1 2

tr Q

j Q

& !

1 2

' & &$ %

#

tr

Q j e

Q j d (Parsevals theorem)

&

1 2

&

tr

j Q

j d

1 2

 

' 

'

tr A

tr A

tr B

tr

 

Q t

h Q t

h dt

% 

&

tr

 

 

  

t Q

h dt

 %  %  %  '     ' % % %  &$  % #   %  '       &%$ % %  # %  

Q t

h Q

'

 



 

t Q t

% 

tr

 

 

 

t Q

tr

Q t Q t dt

(Parsevals theorem) t h

 

tr

Q j Q j d

tr A

 

1 2

tr

 ! &  ! & ! & !

'

&

&

'

'

'

tr Q j Q j

1 2

Control for Dead-Time Systems

68

d A

Chapter 5.

Or, otherwise stated, the

Now, we come to the characterization of all solutions to the extraction problem.

Step 3: Characterization of all solutions to (5.12)


From the proof of Proposition 5.3.2, confer page 15, we know that
L

and

By construction G11 is rational and strictly proper. The only element in G that e h G22 . We extend this element so that it is not rational is the element G22 is rational, proper, and has a support on 0, rather than on h, . Dene the natural completion
,2

which is FIR and has its support on 0, h . The property

G , Kh

G , Kh

&

The idea of the completion of G22

hG 22

is rational, proper, and has support on 0,

without changing

&

C2 e

A h

"

G22 s

&

B2

A e C2

&

% 

' 

 

&

' 

&

G22 s

,2

G22 s

G22 s

G22 s

 

sh

sh

&

h e

G22

sh

&

A h B 2

A B1 B2 C1 0 I C2 I 0

$ 

"

G s

 

 

G11 s G21 s

G12 s G22 s

B 1 C 2 B 2 C 1 B 1 B 2 C 1 0 I C 2 I 0

&

"

 

G11 G21

G , Kh ,

where Q G12 e h G22

h,2 :

and

Control for Dead-Time Systems

69

extraction problem 5.3.1 is solvable if and only if


2 2 2 h,2 .

Chapter 5.

+ +

,2

Kh

is depicted in Figure 5.4. The completed G becomes

Now, we also know from the proof of Proposition 5.3.2, confer page 15, that in this case Lemma 10.4(c) in Zhou et al. [27] holds and therefore is Q L G , Kh a bijective mapping between Q and Kh . Thus we can derive Kh with the help of

,2

"

Kh

Kh I

Kh

0 I

I
,2

and is rational, proper, and has its support on 0, Kh , becomes

A e A h B1 B2 C1 0 I A h I 0 C2 e

. The intermediate controller,

, Kh .

'

&

,2

&

% %

&

"

G s

G11 G21

G12 hG 22

Fig. 5.4: Transfer function completion of G22

G22 with

Kh

PSfrag replacements

 

Control for Dead-Time Systems

70

,2

Q
,2 .

Chapter 5.

Lemma 10.4(c) and Lemma 10.3(i) in Zhou et al. [27] as follows


L U L

and

The corresponding controller structure to


U L

is depicted in Figure 5.5.

Step 4: Original data


After a transformation from the -data to the -data and then to the original rat rat control problem data ( ,2 Q2 , K ,2 K2 ), cf. Theorem A.3.7, we 2 , Q

Kh

,2

I , 0

rat K ,2 , Q

&

e A h B1 C2 e A h C1 C2 e A h

&

"

"

 

rat K ,2 s

% $ "   &

0 I G 1 s I 0

0 I I 0

&

G 1 s

C2 e A h C1

0 I

I 0

B2 C1 e A h B1 B2 0 I I 0

&

e A h B1 C2 e

A h

B2 C1 B2 e A h B1



where G 1 and G 1

rat : K ,2 are the following

&

Kh

,2

G 1 , Q

I , 0

,2

&

"

"

Kh

G 1 , Q

! &

0 I

0 I

,2

Kh

G 1 , Q

G , Kh

&

"

&

  &

&

Control for Dead-Time Systems

71

(Lem. 10.4(c)) , Kh

(Lem. 10.4(c)) (Lem. 10.3(i))

Chapter 5.

rat K ,2

Q
Fig. 5.5:

Kh
dead-time controller setup.

get

The only thing that is left to show is h,2 : Q . In order to nd h,2 we take 2 the impulse response function, Q t , to Q (FIR):

2
2

is then
2
2

2
2

0 0 0 0

tr

F2 e At L2 L2 e A t F2

tr

dt.

F2 e At L2

F2 e At L2

dt

 

dt

tr AB

tr BA

 

tr Q

   

t Q

tr Q

t Q

dt

% 

 

 

  

tr Q

t Q

% 

 &

 

 

" !

&

! "

! "

! "

 

F2 e At L2

h .

&

 

sh

" #  

A F2

L2 0

A F2 e Ah

L2 0

(Parsevals theorem) dt

&

&

&

"

h e

P22 s

 

sh

&

 

rat K2 s

A B2 Ah C2 e 0

sh

&

'

'

B2 F2

e Ah L2 C2 e F2 C2 e Ah

Ah

e Ah L2 B2 0 I I 0

PSfrag replacements

 

Control for Dead-Time Systems

72

,2
+

, A B2 C2 0

and

PSfrag replacements
Chapter 5.

Kh

Fig. 5.6: Dead-time ltering problem setup.


2 opt,h 0 h,2 2 It turns out that the optimal controller is achieved for opt and therefore Q2 0. The parameterization of the optimal controller follows directly.

This completes the proof of Theorem 5.2.1.

5.4 Special case: the

dead-time ltering problem

It was shown in Chapter 4 that the ship movement prediction problem can be written as a dead-time ltering problem. In order to solve this problem with the 2 technique the following section is given. dead-time ltering problem is to nd an estimate z of the exogenous output z of the plant, PFilt , in an 0, nd the set of all causal stable lters Kh , 2 sense, i.e. for a given if any exist, such that the 2 norm of the closed-loop transfer function, H, from input w to output z : z z is H
2

The plant is assumed to be of the form


s

PFilt s

A B C1 0 C2 D 2

"

&

and

PFilt

z y

where the lter equation is z given by

Kh

y and the related signals, cf. Figure 5.6, are

w.

Denition 5.4.1 (The

dead-time ltering problem): The

'

 

Control for Dead-Time Systems

73 w

PFilt

(5.13)

Chapter 5.

PSfrag replacements

Kh

Fig. 5.7: Reformulation of the dead-time ltering problem setup into the general dead-time control problem setup.

As shown in Section 2.5, the dead-time ltering setup of Figure 5.6 can be reformulated into the generalized dead-time control setup, see Figure 5.7. The generalized plant becomes
s

It should also be noted here that in ltering the internal stability property is not required; only H and Kh have to be stable.

Assumptions
For the plant (5.14) of the ltering problem the assumptions (A1)(A4) of Section 5.2 simplify to (A1) C2 , A is detectable,

These assumptions follow directly from the assumptions in the 2 dead-time control problem, cf. Section 5.2, for the above given generalized ltering plant (5.14) and the fact that internal stability is not required and H and Kh are to be stable.

(A3) D2 D2

I.



"

(A2)

j I B C2 D2

P s

A B 0 C1 0 I C2 D 2 0

has full row rank for all

, and

 

Control for Dead-Time Systems

74 w

P
z

(5.14)

Chapter 5.

PSfrag replacements

rat K2

Q2
Fig. 5.8:

Kh
2

dead-time lter structure.

Solution to the

dead-time ltering problem

For the ltering case only the ltering ARE has to be solved for its stabilizing solution Y Y . Given assumptions (A1)(A3) such Y exists and in addition Y has to be non-negative denite (Y 0). The lower bound of the
2

norm of the closed-loop system is

which is the optimal bound of the dead-time free


Theorem 5.4.2 (The

If this holds, then the set of all sub-optimal lters is parameterized as depicted in Figure 5.8 with A L 2 C2 L2 0 s rat Ah K2 s (5.16) C1 e 0 I C2 I 0
2

In the optimal case is Q2 s Kh,opt s : C1

0 and hence the unique optimal lter is L2 0

'

where the optimal bound is opt :

opt,h

e Ah

'

L 2 C2

h,2 2 .

and Q2 any stable transfer matrix such that Q 2

 

'

h,2 :

tr C1 e At L2 L2 e A t C1 dt.

'

lem is solvable if and only if 2

dead-time ltering problem): The


2 opt,h 2 h,2 , where

The result for the

dead-time ltering problem can be stated as follows:


2

 

 

opt,h

tr C1 YC1

ltering problem. dead-time ltering prob-

2 opt,h



' 

 %

% 

' 

'

AY

YA

BB

L2 L2

with

L2 :

YC2

&

Control for Dead-Time Systems

75

BD2

(5.15)

2 h,2 .

(5.17)

PSfrag replacements

Chapter 5.

HF

Fig. 5.9: Dead-time ltering setup for the ship movement prediction problem.

It should be remarked that the FIR element,

2,

in the case of

Thus the

lter, Kh , is purely rational.

5.5 The ship movement prediction problem


The ship movement prediction problem was stated, discussed and solved as an dead-time ltering problem in Chapter 4. It was shown that the lter was in complete agreement with the theory but for a (simulated) continuous-time white noise input signal the result (simulation) was not satisfactory. In this section the 2 lter to the very same ltering problem will be presented but rst a short summary of the signals, their relation to each other, the transfer functions and the setup of the ltering problem. See Chapter 4, in particular Section 4.3, for further detail.

Filtering setup
The relation of the weighting functions, transfer functions and signals is depicted in Figure 5.9 where the signal are: w modeled input: white noise with unit intensity, v vertical speed of the ship, which lies in a bandwidth of 0.3 rad/sec to 0.9 rad/sec, r vertical acceleration (measurement signal) of the ship, vp predicted vertical speed of the ship,

&

"

sh

A 0 C2 0

0.

 

+ +

W2,F

w2

ltering is

Control for Dead-Time Systems

76

PFilt
+

vp

Pacc

W1

w1

Chapter 5.

w2 articial noise in order to make the generalized plant, P, full row rank for all s j and the lter/predictor, E, proper. The weighting function W1 is the sixth-order (third-order Butterworth) band-pass lter W1 s 4.63s6 5.556s5 7.083s4 s3 4s3

with cut-off frequencies at 0.3 rad/sec and 0.9 rad/sec, and it is used in order to model the vertical movement

of the ship. Its magnitude of the Bode plot is depicted in Figure 4.6 on page 52. The accelerometer, Pacc , is modeled as s

The articial weighting function was designed as a high-pass with W2,F s 0.01 s 3 . Ts 1

in order to make the generalized plant, P, full row rank for all s j and the predictor, E, (strictly) proper and therefore realizable. The magnitude of the Bode plot is depicted in Figure 4.5 on page 51. The closed-loop transfer function is then given by

where E denotes the predictor/lter which has to be found with the algorithm. As before, this has to be written in the generalized dead-time control loop setting, confer Figure 5.1, with the generalized plant

It turned out that it was possible to compute the optimal bound for this data with the algorithm mirkinH2.m as opt 0.3100211325. But like in the ltering case (Section 4.3) it was not possible to compute a lter with this data due to the

"

W1 0 Pacc W1 W2,F

1 0

& %

&

HF

HF,1 HF,2

h EP acc

W1

h EW 2,F

'

'

with time-constant T

0.02 sec.

'

 

Pacc v

where

Pacc s

 

W1 w

Ts

'

'

1.913s2

0.405s

0.091

% 

prediction error of the vertical speed of the ship, where t : h , and

v t

vp t

 

'

'

'

'

 

Control for Dead-Time Systems

77

Chapter 5.

numerical difculty to compute the exponential matrix e Ah in the parameterization of the lter because of the fast pole s P 50 sec 1 . Therefore the same norming/rewriting process as for the 49f., was undertaken:

Ts 1 1. normalization of P, E with the transfer function N s s 1 in order to get the intermediate normalized closed-loop system P, E , with

2. computation of the lter E and optimal bound opt with the algorithm mirkinH2.m, 3. back-transformation to the original data from E to E. The stable, strictly proper optimal lter, E opt , can be computed as

The bode plot of Eopt is depicted in Figure 5.10 on page 79. Also here it is visible that Eopt j behaves in the main region of interest (0.3 rad/sec0.9 rad/sec) almost like an integrator ( 20 dB/decade) and it comes close to the ideal but non-proper and unstable lter

which would make HF,1 0, confer Section 4.3. Due to the fact that E opt is purely rational it is also visible from the Bode plot that E opt is strictly proper and stable (which can of course also be veried by a computation of the poles). The amplitude of the closed-loop transfer function components, HF,i , are shown in Figure 5.11. It is visible that the main component, HF,1 , is always (far) below4 1.
4 This

is also true for HF,2 but this transfer function component is not of main interest because it was articially introduced in order to make a computation feasible (P has full row rank for all s j ) and to guarantee that the lter is (strictly) proper.

&

Eid s

'

1 esh Pacc

esh

Ts s

&

where a numerical pole/zero-cancellation at s 10 13 , i.e. s p s z 10 13 , was performed.

1 sec

with a precision of

'

'

'

0.5258s6 26.56s5 13.74s4 1.607s7 11.03s6 31.95s5 51.37s4 8.35s2 2.959s 1 , 6.388s2 1.006s 0.09475

'

'

'

'

'

'

&

'

'

 

Eopt

N Eopt

N Erat 2,opt 4.758s3 24.21s3

&

E,

Pacc

NPacc ,

and W2,F

NW2,F .

 

&

Control for Dead-Time Systems

78

lter, confer page

(5.18)

&

Chapter 5.

PSfrag replacements
80

100

Fig. 5.11: Bode plot of the closed-loop transfer function components, HF,i , in dB: HF,1 is represented as solid line () and HF,2 as dashed line ( ).

200 10

100

HF,1 j


102

HF,2 j


0 20

HF,i j

PSfrag replacements
 

Fig. 5.10: Bode plot of the optimal lter E opt , top: amplitude Eopt j Eopt j in deg.

in dB, bottom: phase

rad sec

10

100

102

Eopt j

90 0 90

Eopt j

0 40

Control for Dead-Time Systems

79

rad sec

Chapter 5.

This is a measure or indication that the 2 norm of the closed-loop transfer function is also less than 1 and in which region the main contribution of the closedloop transfer function components to the 2 norm lies. The occurring lobes in HF,1 are due to e sh which has a larger effect for higher frequencies. Concluding, we can say that the computed optimal (theoretically) desired properties:

it is (asymptotically) stable, which can be seen in the Bode plot 5.10 or by a computation of the poles, it is strictly proper and therefore realizable, see Equation (5.18) and Figure 5.10,

the lter shows a reasonable activity ( of interest, and

0 dB) in the main frequency region

the optimal 2 norm, opt 0.3100211325, of the closed-loop transfer function, HF , is smaller than the upper bound, i.e.
2

confer Chapter 4. Already from the last point, one can see that the optimal bound is not much smaller than the upper bound. Therefore it is expected that the simulations will not give a very satisfactory result. A different choice of the weighting function W2,F would most probably give a better result but due to a time-limitation a W2,F design for the 2 case was not possible and was also not the main focus of this work.

Simulation
The closed-loop system was simulated with the M ATLAB tool Simulink. For the input test signal we took w1 t w t , where w t supposed to be continuoustime white noise with unit intensity, i.e. S ww 1. The simulation of v t and vp t h is depicted in Figure 5.12. It is visible that v p t h tries to follow v t in some (unsatisfactory) sense. This is mainly due to the poor choice of W2,F . Another reason for the rather poor performance is (what we believe) the difculty to simulate continuous-time white noise signals. Also here we took the Simulinkblock Band-Limited White Noise to produce the white noise signal. Different tests, as e.g. the power spectral density test of the simulated continuous-time white noise, gave a reasonable result that the signal produced by the Simulinkblock is in fact a signal that is similar to white noise. But applying this white

 

W1 0

0.44712731880,

&

Control for Dead-Time Systems

80

lter, Eopt , obeys all

Chapter 5.

PSfrag replacements
0

1 0 50

Fig. 5.12: Test simulation with input signal w 1 t w t , where w t is white noise with unit intensity. The vertical speed, v t , of the ship is represented by the solid line (), the dashed line (- - -) represents the h seconds delayed prediction signal, vp t h .

noise signal to the given closed-loop LTI system, HF , we would expect (by theory) that the expectation of the error signal, E , for a large amount of data points would stay in the 3 -band with probability 0.997, see Figure 5.13(bottom). It is visible that this is not the case for n 2.5 10 6 simulated data points where the expectation is computed as E 0.0027958817. The result indicates that not enough data points were simulated or the signal produced by the Simulink-block is not close enough to (theoretical) white noise. We believe the latter is true due to the large number of simulated data points. But it is also visible from Figure 5.13 (top) that for a large amount of simulated data points, n, the standard deviation, var , of the error signal con verges indeed to the 2 norm of the closed-loop transfer function, HF , and therefore it is conform with the theory. For 2.5 10 6 simulated data points the standard deviation of the error signal, , is computed as being 0.30902629238 opt . Another indication of interest is the power-gain between the speed of the boat, v, and the prediction error, . This value is to be minimized. We compute it as being

W1

Also here it is visible that this value is not as small as it would be desired ( 1). If we take W2,F to be 0, it can be shown that a lower bound for the power-gain

P Pv

HF

2
2

0.47767053407.

 

 

Control for Dead-Time Systems

81

v t

vp t

100

Chapter 5.


0.31

opt

PSfrag replacements 0.2


0.1 0

0.06 0 0.06

n 2.5 106 1.25 106 Fig. 5.13: Visualization of the standard deviation var (top), and of the expectation (bottom) of the error signal, , as a function of the number of simulated data points, n. between v and is
2

This indicates that with a different choice of W2,F we could in fact make the powergain smaller, but not smaller than the given lower bound. This was expected as we mentioned before.

5.6 Behavior of the optimal bound


Like in Section 4.4 we also want to show here the rather unusual behavior of the optimal 2 bound, opt , and the lower bound, h , as a function of the deadtime h. The behavior is depicted in Figure 5.14. It is visible that this behavior is similar to the one in the case where a somewhat periodic behavior in the graph occurred, confer gures 4.13 and 4.14. Therefore we strongly believe that this behavior is inherent in the system and not due to any numerical error in the computation.

0,

W1

W1

P Pv

0,h

W1

W1

2
2

0,h
2

0.11591226904.

Control for Dead-Time Systems

82

3 -band

Chapter 5.

PSfrag replacements opt h

0.07


Fig. 5.14: Behavior of the optimal bound, opt , as a function of the dead-time, h. The upper bound, : W1 2 0.44712731880, is represented as dotted line. The dashed line (- - - ) shows the lower bound, h , as a function of the dead-time.

5.7 Comparison of the

and

Both lters, the and 2 lter, were in complete agreement with the theory. At this stage it is hard to say which lter gives a better result because the weight W2,F was tuned for the case and not for the 2 problem. As stated before, it is most likely that a different choice of W2,F for the 2 problem would give a lter due to the (much) better result and therefore also a better result than the poor behavior of the lter in case of the white noise input signal. Also from a complexity point of view it would be desirable to implement the purely rational lter where a FIR block discretization 2 lter instead of the more complex has to be conducted. Another reason to chose the 2 method would be that the ship movement prediction problem is inherently an 2 problem due to the way the input signal is modeled (white noise input signal).

0.45

Control for Dead-Time Systems

83

h
0 15 30

lter

6 Conclusions, Remarks and Perspective


In this nal chapter we summarize the main results of this thesis and give conclusions. In Section 6.2 some open questions of this thesis are addressed in order to motivate for possible future research.

6.1 Conclusions and Remarks


The main goal of this thesis was to understand, implement and test the state-space algorithm proposed by Leonid Mirkin [16, 15, 14, 13] in order to solve general dead-time control problems of generalized nite-dimensional plants with one dead-time element in the feedback loop. All of this was conducted and presented in chapters 2 and 3:

the implementation of the dead-time algorithm into M ATLAB routines were discussed in Chapter 3, and

three test examples, for which the solution is known in the literature, were easily tackled with the implemented algorithm in Section 3.5.

dead-time algorithm The second main focus of this thesis was to use this to solve the ship movement prediction problem proposed by Zwart et al. [29], cf. Chapter 4. Zwart et al. tried to solve this prediction problem by rewriting it into a control loop and the use of frequency-domain methods, however a satisfactory result could not be found due to some numerical difculties in the computation. In this work it could be shown that this ship movement prediction problem is in fact a ltering problem. After a rewriting and design procedure this problem was solved with the above mentioned dead-time control method. The computed predictor is in complete agreement with the theory and also shows some

84

the theory with basic layout of the proof was presented in Chapter 2,

Chapter 6. Conclusions, Remarks and Perspective

85

satisfactory performance. However for the input signal being (simulated) white noise, which was the nal goal, the predictor did not show an adequate result. This is because continuous-time white noise has innite power which means that optimization method, as it for this model (with stochastic input signal) the was proposed in Zwart et al. [29], is an unsuitable choice. Additionally, it is believed that the unsatisfactory result (for continuous-time white noise as input signal) is also partially owing to the fact that it is problematic to simulate perfect continuous-time white noise. The objectives of the project were originally to understand and design an predictor for the ship movement prediction problem. During the course of the project it turned out that, due to the input signal being white noise, it is more naturally to formulate and solve the ship movement prediction problem in an 2 setting. In order to do this the general 2 dead-time control theory was presented, proven and the algorithm was implemented into M ATLAB (Chapter 5). The same data as in the ltering problem was taken in order to test the 2 dead-time algorithm and to nd an 2 predictor of the ship movement prediction problem. A computation was possible without any further difculties. Also the 2 predictor is in complete accordance with the theory but showed a rather poor performance due to the fact that the weighting functions were designed for the case. Another reason for the poor performance is believed to originate in the simulated white noise signal. A full proof for this could not be given, but some indications for this were presented. The drawback of both predictors lies in the modeling procedure itself. It would be desirable to have a more complete and detailed model of the system and in particular of the wave movement of the sea. One solution for this would be to possibly avoid the use of white noise signals at all, which are known to be problematic to simulate. Another reason is that this given model is rather rough and can only serve for academic or test reasoning, as in our case. Both algorithms, the and 2 dead-time control algorithm, showed good and valuable results for general dead-time problems (MIMO or SISO). An alternative dead-time control algorithm was presented in order to solve problematic dead-time plants with fast dynamics. The M ATLAB routines solved all tested dead-time control problems off-line in a matter of seconds and therefore serve as valuable computation tools.

6.2 Perspective
This section is intended to motivate for further research on the ship movement prediction problem presented in Chapter 4. During the research project several open problems occurred which could not be

Chapter 6. Conclusions, Remarks and Perspective

86

answered in the given amount of time. In the following we present the main possible research topics that could be treated in this framework. ship movement prediction problem was treated and solved as a dead-time ltering problem in Section 5.5. All the weighting functions were designed on the basis of the ship movement prediction problem presented in Chapter 4. This was one main cause for the poor performance of the 2 predictor. Some tests showed that with a change of the weighting functions a significant improvement can be achieved. It would be interesting to see how the predictor, tuned 2 predictor, which has a simpler structure than the behaves compared to the predictor.
2 2

Weight design for the

ship movement prediction problem. The

Detailed model. The model of the ship movement prediction problem proposed

by Zwart et al. [29] and presented in Chapter 4 is rather simple and can only serve as a rst attempt to solve a more detailed ship movement prediction problem or as test example for dead-time control algorithms. It would be of interest to solve a more complex model with the above given method in order to get closer to reality. In particular it would be of interest to have a more realistic or detailed model of the wave movement, i.e. of the weighting function W1 .

White noise simulation. During several simulation processes it turned out that

the Simulink-block Band-Limited White Noise to produce a continuoustime white noise signal was problematic. It was not possible to fully verify if the produced signal is indeed close to theoretic white noise. It would be of value to design a better white noise signal for test reasons in order to give a real validation of the computed predictor. It would even be desirable to avoid the use of the input signal being white noise at all but this would mean that a different model of the wave movement has to be provided.
problem. It was not possible ship moveto clarify completely why the optimal bound, opt h , in the ment prediction problem is almost insensitive for low dead-time values but very sensitive for larger dead-time values, confer Figure 4.13. This is counter-intuitive and it would be very interesting to nd reasons for this behavior. problem. In connection with the

Behavior of the lower bound, h h , of the

previous point, it would also be of interest to nd out why the lower bound, h , as a function of the dead-time has a almost periodic behavior, see Figure 4.13. It should be remarked that it was possible to emphasize this periodic behavior for different weighting functions. The lower bound, h h , became almost discontinuous for these choices of the weighting functions.

Behavior of the optimal bound, opt h , of the

Chapter 6. Conclusions, Remarks and Perspective

87

All these open questions would serve for a more complete and detailed understanding of the presented ship movement prediction problem.

Prediction is very difcult, especially about the future. Niels Bohr

A Denitions and Theorems

In this appendix mathematical denitions and theorems are provided that are used throughout the text.

A.1 Signals and spaces


Denition A.1.1 (Finite energy signal, [7]): Let f be a signal. If

Denition A.1.2 (Finite power signal, [7, 27]): Let f t be a signal. If

where R f f and S f f denote the autocorrelation matrix and power spectral density function of f , respectively. If f is a nite power signal then S f f is strictly proper. If F is a transfer function from a white noise input signal with unit intensity to an output signal, z, then the power of the output signal is P z F 2 2.

88

&

tr R f f 0

tr

S f f j

Pf

1 2

d,

holds then the signal, f t , is called a nite power signal. Note: For stochastic signals we have that

&

lim

 

Pf :

f t

dt

1 2T

holds then the signal, f , is called a nite energy signal or 2 signal. Note: E f f 2 2 . If a signal has nite energy then it also has nite power.

f t

&

Ef :

dt

Appendix A. Denitions and Theorems

89

exists. Note: The 2 space consists of stable and unstable frequency-domain signals. Due to Parsevals theorem all nite energy signals lie in 2 .

tions F s that are analytic in Re s dened as


Re s 0

Note: It can be shown that if F then F sup F j . The space consists of all stable transfer functions. If F is real-rational and in then it is also proper. Another denition for the (induced) norm of a transfer function, F, from the input signal, w, to the output, z, is

And therefore it is clear that F

sup

Ez 0Ew

sup
w

Pz . 0Pw
2

is the maximal energy/power gain of the system.

 

sup F s .

 

Denition A.1.7 (

space, [27]):

is a (closed) subspace of j 0 (open right-half plane). The

 

 

F j

F j

1 Note: It can be shown that F 2 2 tr 2 space consists of all (causal) nite energy signals.

d. The

with funcnorm is

&

&

'

 

'

sup

tr

d .

1 2

functions F s analytic in Re s norm is dened as

Denition A.1.6 (

space, [27]):

is a (closed) subspace of 2 j with matrix 0 (open right-half plane). The corresponding

 

Note: The

space consists of stable and unstable transfer functions.

ess sup F j .

Denition A.1.5 (

space, [27]): j is a Banach space of matrix-valued functions F s that are (essentially) bounded on j , with the norm

 

 

tr

F j

F j

tions on j

Denition A.1.4 ( 2 space, [27]):

j is a Hilbert space of matrix-valued funcand consists of all complex matrix functions F such that the integral

 

f t dt

 

Denition A.1.3 ( 1 space, [27]): The space able functions f t dened on an Interval I

I consist of all Lebesgue measursuch that

 

!
 &

Appendix A. Denitions and Theorems

frag replacements

90

P K z

Fig. A.1: Lower LFT.

A.2 Operators
Denition A.2.1 (h-completion operator): Let G be a transfer function with realiza-

Note: h G is FIR on 0, h .

A.3 Systems and control problems


complex matrix partitioned as P11 P12 s and let K s . Then P21 P22 we can dene a lower linear fractional transformation (LFT) with respect to K as the map from w to z, confer Figure A.1, with
Denition A.3.1 (Lower linear fractional transformation (LFT), [27]): Let P be a

provided that the inverse I P22 K 1 exists. Note: In a control framework, where P represents the generalized plant and K the generalized controller, L P, K is the closed-loop transfer function from the exogenous input w to the exogenous output z L P, K w.

&

&

'

P, K :

P11

P12 K I

P22 K

P21

&

% $

"

h G s

A B C D

sh

'

&

ization G s as

Denition A.2.2 (h-truncation operator): Let G be a transfer function with real-

C sI

1B

 

 

& 

Note: h e

hG

is FIR on 0, h .

D, then the h-truncation operator, h , is dened A B Ah 0 Ce

"

&

&

& 

h e

sh

G s

&

 

tion G s

C sI

1 B,

then the h-completion operator, h , is dened as e


sh

A B Ah 0 Ce

P, K

Fig. A.2: Upper LFT.

A B C 0

PSfrag replacements w

P,

    

Appendix A. Denitions and Theorems

91

Denition A.3.2 (Upper linear fractional transformation (LFT), [27]): Let P be a complex matrix partitioned as P11 P12 s and let s . Then we can P21 P22 dene a upper linear fractional transformation (LFT) with respect to as the map from w to z, confer Figure A.2, with

Theorem A.3.6 (The sub-optimal

form P s
s

controller, [27]): Assume the plant, P, is of the

A B 1 B2 C1 0 D12 C2 D21 0

Additionally assume: (A1) A, B2 is stabilizable and C2 , A is detectable,

C2

"

(A3)

j I

B1 D21

C1

has full row rank for all

 

"

(A2)

j I

B2 D12

has full column rank for all

'

if A part.

RX is Hurwitz, i.e. all eigenvalues of A

'

'

'

A X

XA

XRX

  

 

'

RT , Q

QT .

A matrix X

n n

is said to be a stabilizing solution of

RX have strictly negative real

 

Denition A.3.5 (Stabilizing solution of an ARE, [1]): Let A, R, Q

n n

with

has a stabilizing solution X, see Denition A.3.5.

'

'

'

A X

XA

XRX

&

&

dom Ric denotes the set of Hamiltonian matrices H algebraic Riccati equation (ARE)

A Q

R A

 

Denition A.3.4 (dom Ric , [27]): Let A, R, Q

n n

with R

RT , Q QT . for which the

'

&

state-space realization G s A B s dened as G s C D

Denition A.3.3 ( , state-space realization): Let G s be a transfer matrix with

C sI

1B

D. Then the shorthand notation is

&

provided that the inverse I

P11

&

'

"

 

P,

P22

P21

P11

P12

exists.



! 

Appendix A. Denitions and Theorems

92

Then there exist a stabilizing controller, K, such that the following three conditions hold:

P, K

Moreover, when these conditions hold, then the set of all stabilizing controllers is

K s : and Q

such that Q
1

The controller parameters are given by

and

Theorem A.3.7 (The (sub-)optimal

form P s
s

controller, [27]): Assume the plant, P, is of the

A B 1 B2 C1 0 D12 C2 D21 0

Additionally assume: (A1) A, B2 is stabilizable and C2 , A is detectable,

'

'

'

 

1 B B X 2 1 1

B2 F

Z L C2 .

&

1 YX 2

A F C2

Z L 0 I

Z B2 I 0

K, Q

 !

 

(iii) XY

2.

with

 

' 

(ii) a stabilizing solution Y Y of the ltering ARE 1 AY YA B1 B1 2 YC1 C1 Y L L 0 with L exists and is non-negative denite (Y 0), and

YC2

B1 D21

'

(i) a stabilizing solution X X of the control ARE 1 X A A X C1 C1 2 XB1 B1 X F F 0 with F exists and is non-negative denite (X 0),

'

' 

'

' 

(A4) D12 D12

I and D21 D21

I.

'

'

if and only if

B2 X

D12 C1

Appendix A. Denitions and Theorems

93

Then there exist a stabilizing controller, K, such that in the subL P, K 2 optimal case or opt in the optimal case if and only if the following L P, Kopt 2 two conditions hold: (i) a stabilizing solution X X of the control ARE X A A X C1 C1 F2 F2 0 with F2 : B2 X exists and is non-negative denite (X 0), and (ii) a stabilizing solution Y Y of the ltering ARE AY YA B1 B1 L 2 L 2 0 with L2 : YC2 negative denite (Y 0).

B1 D21 exists and is non-

Moreover, when these conditions hold, then the unique stabilizing optimal controller is given by

Additionally, the optimal bound is

In the sub-optimal case the set of all stabilizing controllers is (if conditions (i) and (ii) hold)

K s :

and Q2

such that Q2

A2 F2 C2

K, Q2

with L 2 B2 0 I I 0

2 opt .

'

 !

 

opt :

P, Kopt

tr B1 XB1

tr F2 YF2 .

'

'

where A2 :

B2 F2

L 2 C2 .

"

Kopt s :

A2 F2

L2 0

D12 C1

 

'

' 

% 

'

' 

 

(A4) D12 D12

I and D21 D21

C2

I.

'

'

"

(A3)

j I

B1 D21

C1

has full row rank for all

 
,

"

(A2)

j I

B2 D12

has full column rank for all

Appendix A. Denitions and Theorems

94

A.4 Matrix properties


Denition A.4.1 (Largest/maximum singular value, [8]): Let A be a matrix. Then

the largest or maximum singular value, A , of A is dened as

radius of A is dened as

A is dened as

A :

: is an eigenvalue of A .

Denition A.4.3 (Spectrum, [8]): Let A be a m

m matrix. Then the spectrum of

A :

max : is an eigenvalue of A .

Denition A.4.2 (Spectral radius, [8]): Let A be a m

m matrix. Then the spectral

Ax .

where max A A denotes largest eigenvalue of A A. Note: An alternative denition [27] of A is A : max

   

A :

max A A

  

  

 

B Implementations

B.1 Loop shifting: p_norm.m, k_scale.m


Plant normalization: p_norm.m
function [Pnew,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3] = ... p_norm(P,nz,nw,gamma) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %P_NORM % normalize the D matrix of a general plant P % without changing the H_inf-norm/H_2-norm % (D11=0) of the closed loop system % z = LFT(P,K) * w % CL: ||LFT(P,K)|| = ||LFT(Pnew,Knew)|| < gamma % %%%%% % P generalized plant [z y] = P * [w u] % with P = [ A B ; C D ] % assumption: (A1) D12 has full col rank % (A2) D21 has full row rank % % nz = dim(z) % nw = dim(w) % % % Pnew normalized general plant % [z y_new] = Pnew * [w u_new] % with P = [ Anew | B1new B2new ] % [ -------------------- ] % [ C1new | 0 [0;I] ] % [ C2new | [0 I] 0 ] % % controller-(back)scalaing: % [K,Delta] = k_scale(Knew,Deltanew,h,R,Rt,... % Na,Nb,R2,Rt2,Nc,R3,Rt3) % % %%%%% nu C1 55 C2 D12 D21 D11 D22 60 = mb-nw; = = = = = = C(1:nz,:); C(nz+1:nc,:); D(1:nz,nw+1:mb); D(nz+1:nc,1:nw); D(1:nz,1:nw); D(nz+1:nc,nw+1:mb);

10

15

%% STEP 1: norm the H_inf norm to gamma=1 C1 = C1/gamma; D11 = D11/gamma; 65 D12 = D12/gamma; C = [C1;C2]; D = [D11 D12;D21 D22];

20

25

30

70 %%% STEP 2: normalize D12 and D21 => R, Rt [U_,D12_,R_] = svd(D12); U = U_*[zeros(nu,nz-nu),eye(nu);... eye(nz-nu),zeros(nz-nu,nu)]; R = D12_(1:nu,1:nu)*R_; 75 [Rt_,D21_,Ut_] = svd(D21); Rt = Rt_*D21_(1:ny,1:ny); Ut = [zeros(nw-ny,ny) eye(nw-ny);... eye(ny) zeros(ny,nw-ny)]*Ut_; 80 T1 = [U zeros(nz,ny); zeros(ny,nz) inv(Rt)]; T2 = [Ut zeros(nw,nu); zeros(nu,nw) inv(R)]; P_1 = ss(A,B*T2,T1*C,T1*D*T2); 85 clear A B C D P D12 D21 U_ D12_ R_ U Rt_ clear D21_ Ut_ Ut T1 T2

35 % algorithm based on: % Robust and Optimal Control % (1996) / K. Zhou, J.C. Doyle, K. Glover % % Frank J. Christophersen 40 % Universiteit Twente, Netherlands % 2001-08-10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% STEP 3: remove assumption D22=0 90 [A_1,B_1,C_1,D_1] = ssdata(P_1); D11_2 D12_2 D21_2 95 D22_1 D22_2 Na 100 = = = = = D_1(1:nz,1:nw); D_1(1:nz,nw+1:mb); D_1(nz+1:nc,1:nw); D_1(nz+1:nc,nw+1:mb); zeros(ny,nu);

=> Na

45 %% EXTRACT THE SUBMATRICES: [A,B,C,D] = ssdata(P); mb = size(B,2); nc = size(C,1); 50 n ny = length(A); = nc-nz;

= D22_1;

%parameter for the %controller-scaling

P_2 = ss(A_1,B_1,C_1,[D11_2,D12_2;D21_2,D22_2]); clear A_1 B_1 C_1 D_1 P_1 D22_1 D11_2

95

Appendix B. Implementations

96

clear D12_2 D21_2 D22_2 175 105 %%% STEP 4: remove assumption D11=0 [A_2,B_2,C_2,D_2] = ssdata(P_2); B1 110 B2 C1 C2 D11 D12 115 D21 D22 = = = = = = = = B_2(:,1:nw); B_2(:,nw+1:mb); C_2(1:nz,:); C_2(nz+1:nc,:); D_2(1:nz,1:nw); D_2(1:nz,nw+1:mb); D_2(nz+1:nc,1:nw); D_2(nz+1:nc,nw+1:mb); = = = = D11(1:nz-nu,1:nw-ny); D11(1:nz-nu,nw-ny+1:nw); D11(nz-nu+1:nz,1:nw-ny); D11(nz-nu+1:nz,nw-ny+1:nw); => Nb

U R2

= U_*[zeros(nu,nz-nu),eye(nu);... eye(nz-nu),zeros(nz-nu,nu)]; = D12_(1:nu,1:nu)*R_;

[Rt_,D21_,Ut_] = svd(D21); Rt2 = Rt_*D21_(1:ny,1:ny); 180 Ut = [zeros(nw-ny,ny) eye(nw-ny);... eye(ny) zeros(ny,nw-ny)]*Ut_; T1 = [U zeros(nz,ny); zeros(ny,nz) inv(Rt2)]; T2 = [Ut zeros(nw,nu); zeros(nu,nw) inv(R2)]; 185 P_1 = ss(A,B*T2,T1*C,T1*D*T2); clear A B C D M D12 D21 U_ D12_ R_ U clear Rt_ D21_ Ut_ Ut T1 T2 190 %%% STEP 6: remove assumption D22=0 % [A_1,B_1,C_1,D_1] = ssdata(P_1); 195 D11_2 D12_2 D21_2 D22_1 D22_2 200 Nc = = = = = D_1(1:nz,1:nw); D_1(1:nz,nw+1:mb); D_1(nz+1:nc,1:nw); D_1(nz+1:nc,nw+1:mb); zeros(ny,nu); %parameter for the %controller-scaling (again) => Nc

D1111 D1112 120 D1121 D1122

if (nw==ny) | (nz==nu) Dinf = -D1122; 125 else Dinf = -D1122-D1121*inv(eye(nw-ny) ... -D1111*D1111)*D1111*D1112; end 130 Nb = Dinf; %parameter for the %controller-scaling

= D22_1;

A_g B1_g 135 B2_g C1_g C2_g D11_g D12_g 140 D21_g D22_g R1 Rt1 145 A_m B1_m B2_m C1_m 150 C2_m D11_m D12_m D21_m D22_m 155 M

= = = = = = = = =

A_2+B2*Dinf*C2; B1+B2*Dinf*D21; B2; C1+D12*Dinf*C2; C2; [D1111 D1112; D1121 D1122+Dinf]; D12; D21; D22;

PnewN= ss(A_1,B_1,C_1,[D11_2,D12_2;D21_2,D22_2]); 205 clear A_1 B_1 C_1 D_1 P_1 D22_1 D11_2 clear D12_2 D21_2 D22_2

%%% STEP 7: back-norming of the H_inf-norm 210 % from 1 to gamma [A,B,C,D] = ssdata(PnewN); C1 C2 215 D12 D21 D11 D22 220 C1 D11 D12 C D 225 = = = = = = = = = = = C(1:nz,:); C(nz+1:nc,:); D(1:nz,nw+1:mb); D(nz+1:nc,1:nw); D(1:nz,1:nw); D(nz+1:nc,nw+1:mb); C1*gamma; D11*gamma; D12*gamma; [C1;C2]; [D11 D12;D21 D22];

= eye(nw)-D11_g*D11_g; = eye(nz)-D11_g*D11_g; = = = = = = = = = A_g+B1_g*inv(R1)*D11_g*C1_g; B1_g*sqrtm(inv(R1)); B2_g+B1_g*inv(R1)*D11_g*D12_g; sqrtm(inv(Rt1))*C1_g; C2_g+D21_g*inv(R1)*D11_g*C1_g; zeros(nz,nw); sqrtm(inv(Rt1))*D12_g; D21_g*sqrtm(inv(R1)); D21_g*inv(R1)*D11_g*D12_g;

= ss(A_m, [B1_m, B2_m], [C1_m;C2_m],... [D11_m,D12_m;D21_m,D22_m]); A_2 B_2 C_2 D_2 B1 B2 C1 C2 D11 D12 D21 D22 D1111 D1112 D1121 D1122 Dinf A_g B1_g B2_g C1_g C2_g D11_g D12_g D21_g D22_g R1 Rt1 A_m B1_m B2_m C1_m C2_m D11_m D12_m D21_m D22_m

clear 160 clear clear clear clear clear 165

%%% STEP 8: normalize D12 and D21 (again) % => R3, Rt3 [U_,D12_,R_] = svd(D12); 230 U = U_*[zeros(nu,nz-nu),eye(nu);... eye(nz-nu),zeros(nz-nu,nu)]; R3 = D12_(1:nu,1:nu)*R_; [Rt_,D21_,Ut_] = svd(D21); 235 Rt3 = Rt_*D21_(1:ny,1:ny); Ut = [zeros(nw-ny,ny) eye(nw-ny);... eye(ny) zeros(ny,nw-ny)]*Ut_; T1 = [U zeros(nz,ny); zeros(ny,nz) inv(Rt3)]; 240 T2 = [Ut zeros(nw,nu); zeros(nu,nw) inv(R3)]; Pnew = ss(A,B*T2,T1*C,T1*D*T2); %%% END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% STEP 5: normalize D12 and D21 (again) % => R2, Rt2 [A,B,C,D] = ssdata(M); 170 D12 = D(1:nz,nw+1:mb); D21 = D(nz+1:nc,1:nw); [U_,D12_,R_] = svd(D12);

Controller back-transformation: k_scale.m


function [K, Delta] = k_scale(Knew,Deltanew,... h,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %K_SCALE 5 % back-scaling of the controller Knew(s) % to the original controller K(s) % after using the command: % [Pnew,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3] = ... % p_norm(P,nz,nw,gamma) 10 % % the H_inf-norm of the closed loop system is % identical: % ||LFT(P,K)|| = ||LFT(Pnew,Knew)||<gamma % 15 %%%%% % controller-scaling:

Appendix B. Implementations

97

% K(s) = inv(R)* K1(s) *inv(Rt) % K1(s) = K2(s)*( I + Na*K2(s) )^(-1) % K2(s) = K3(s) + Nb 20 % K3(s) = inv(R2)* K4(s) *inv(Rt2) % K4(s) = K5(s)*( I + Nc*K5(s) )^(-1) % K5(s) = inv(R3)* Knew(s) *inv(Rt3) % % delay-free-case (h=0): Delta = Deltanew = 0 25 % % control-structure: K_gen = K*(I-Delta*K)^(-1) % % %%%%% 30 % algorithm based on: % Robust and Optimal Control % (1996) / K. Zhou, J.C. Doyle, K. Glover % 35 % Frank J. Christophersen % Universiteit Twente, Netherlands % 2001-08-10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 40 %%% DELTA PART OF THE CONTROLLER if h<1e-14 Delta = ss(tf(0)); else 45 %% Delta5(s) [A,B,C,D] = ssdata(Deltanew); Delta5 = ss(A,B*R3,Rt3*C,Rt3*D*R3); clear A B C D Deltanew 50 %% Delta4 = Delata5(s) %% Delta3(s) [A,B,C,D] = ssdata(Delta5); Delta3 = ss(A,B*R2,Rt2*C,Rt2*D*R2); clear A B C D Delta5

%%% RATIONAL PART OF THE CONTROLLER 65 % (in case of h=0 the only controller) %% K5(s) [A,B,C,D] = ssdata(Knew); K5 = ss(A, B*inv(Rt3),inv(R3)*C, ... 70 inv(R3)*D*inv(Rt3)); clear A B C D Knew %% K4(s) [A,B,C,D] 75 A4 B4 C4 D4 K4 80 clear A B

= = = = = = C

ssdata(K5); A - B*inv(Nc*D +eye(size(Nc*D)))*Nc*C; B*inv(Nc*D +eye(size(Nc*D))); C - D*inv(Nc*D +eye(size(Nc*D)))*Nc*C; D*inv(Nc*D +eye(size(Nc*D))); ss(A4,B4,C4,D4); D A4 B4 C4 D4 K5

%% K3(s) [A,B,C,D] = ssdata(K4); K3 = ss(A, B*inv(Rt2),inv(R2)*C, ... 85 inv(R2)*D*inv(Rt2)); clear A B C D K4 %% K2(s) (for h=0: Nb==0) [A,B,C,D] = ssdata(K3); 90 K2 = ss(A,B,C,D+Nb); clear A B C D K K3 %% K1(s) [A,B,C,D] 95 A1 B1 C1 D1 K1 100 clear A B

= = = = = = C

ssdata(K2); A - B*inv(Na*D +eye(size(Na*D)))*Na*C; B*inv(Na*D +eye(size(Na*D))); C - D*inv(Na*D +eye(size(Na*D)))*Na*C; D*inv(Na*D +eye(size(Na*D))); ss(A1,B1,C1,D1); D A1 B1 C1 D1 K2

55 %% Delta1(s) = Delat2(s) = Delta3(s) %% Delta(s) [A,B,C,D] = ssdata(Delta3); Delta = ss(A,B*R,Rt*C,Rt*D*R); 60 clear A B C D Delta3 end

%% K(s) [A,B,C,D] = ssdata(K1); K = ss(A, B*inv(Rt),inv(R)*C, ... 105 inv(R)*D*inv(Rt)); clear A B C D K1

%%% END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function gamma0 = L2norm_0h(A,B,C,h) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %L2NORM_0H calculate the L2-norm in [0,h] % for LTI systems. 5 % % gamma0 = L2norm_0h(A,B,C,h) % %%%%% % gamma0 L2-norm in [0,h] 10 % A,B,C strictly proper system (D=0) % h dead-time % % %%%%% 15 % algorithm based on: % Computation of L2[0,h] Induced Norms % by G. Gu, J. Chen, and O. Toker (1996) % 20 % Frank J. Christophersen % Universiteit Twente, Netherlands % 2001-07-23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 25 epsh NN = 1e-10; = 50; %accuracy of gamma0 %time-grid-max-no.

B.2 The

0, h induced norm: L2norm_0h.m


30 %%REMOVING ZERO-TF & MINREAL: %(cause numerical difficulties) GG = minreal(ss(A,B,C,zeros(size(C,1),... size(B,2)))); [A,B,C] = ssdata(GG); 35 n_z = size(C,1); n_w = size(B,2); n = length(A); k = max(eig(A))+1; hh = C*gram(ss(A-k*eye(n),B,C,zeros(n_z,... 40 n_w)),c); outp = sum(abs(hh)<sqrt(eps),2) ~= n; filt = diag(outp); filt2 = []; for ii = 1:length(outp) 45 if outp(ii)==1 filt2=[filt2; filt(ii,:)]; end end C = filt2*C; 50 clear n_z n_w k hh outp filt filt2

%%INIT. BOUNDERIES F. GAMMA: 55 if h>=1e-8 lam=eig(A); %case A hurwitz tt= sum(sign(lam)>=0);

Appendix B. Implementations

98

60

65

70

if tt==0 hh = hinfnorm(pck(A,B,C),1e-10); gamma_max = hh(1); gamma_min = 0; clear hh tt lam else gamma_max = 10; gamma_min = 0; go1 = 0; while go1 == 0 %find gamma_max t = [0 h]; go2=0; M=0; A_h = [A, B*B/gamma_max;-C*C/... gamma_max, -A]; M = gamma_max^(-1)*max(norm(B)^2,... norm(C)^2)*exp(2*norm(A_h)*h); while go2==0 %find if zero exist t1=t(1:length(t)-1); t2=t(2:length(t)); t=sort([t (t1+t2)/2]); lam=[]; tt1=0; tt2=0;a=[]; b=[]; t1=[];t2=[]; ZW=[]; Y=[];

125 %%% BISECTION SEARCH if h<1e-8 gamma=0; else while abs(gamma_max-gamma_min)>epsh, 130 gamma=(gamma_max+gamma_min)/2; go1 = while t A_h M 0; go1 == 0 %find new gamma = [0 h]; go2=0; M=0; = [A, B*B/gamma; -C*C/gamma, -A]; = gamma^(-1)*max(norm(B)^2,... norm(C)^2)*exp(2*norm(A_h)*h);

135

75

140

while go2==0 %find if zero exist t1=t(1:length(t)-1); t2=t(2:length(t)); t=sort([t (t1+t2)/2]); lam=[]; tt1=0; tt2=0;a=[]; b=[]; t1=[];t2=[]; ZW=[]; Y=[]; for ii = 1:length(t) ZW=expm(A_h*t(ii))*[zeros(n);eye(n)]; Y=ZW(n+1:2*n, :) * ZW(1:n, :); lam(ii)=min(eig(Y)); end a=lam(1:length(t)-1); b=lam(2:length(t)); tt1= sum(a.*b<=-1e-14); % # signchanges tt2=sum(abs(a)+abs(b)- ... %Lipschitz (h/(length(t)-1))*M <=-1e-14);

80

145

85

for ii=1:length(t) ZW=expm(A_h*t(ii))*[zeros(n);eye(n)]; Y=ZW(n+1:2*n, :) * ZW(1:n, :); lam(ii)=min(eig(Y)); end a=lam(1:length(t)-1); b=lam(2:length(t)); tt1= sum(a.*b<=-1e-14);

150

90

155

% # signchanges 160

95

tt2=sum(abs(a)+abs(b)- ... %Lipschitz (h/(length(t)-1))*M <=-1e-14); %there is a zero if tt1 > 0 gamma_min=gamma_max; gamma_max=gamma_max*2 go2=1; end %there is no zero if (tt2==0) & (tt1==0) go1=1; go2=1; end %there is no zero if (tt2>0)&(tt1==0) & (length(t)> NN) go1=1; go2=1; end

100

165

%there is a zero if tt1 > 0 gamma_min=gamma; go1=1; go2=1; end %there is no zero if (tt2==0) & (tt1==0) gamma_max=gamma; go1=1; go2=1; end %there is no zero if (tt2>0)&(tt1==0) & (length(t)> NN) gamma_max=gamma; go1=1; go2=1; end

105

170

110

175

115

180

end end clear ZW Y lam go1 go2 a b tt1 120 clear tt2 t1 t2 g M A_h end end

end end end 185 end gamma0=gamma; %result %%% END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

B.3 The

mirkinHinf2.m
Method 1 via : mirkinHinf1.m
function [J0,Delta,Delta2,gamma,gamma_low] = ... mirkinHinf1(P,nz,nw,h,c_flag,tf_flag,... eps_gamma,add_eps) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5 %MIRKINHINF1 calculate H_inf controller for a % generalized plant with dead-time. % % [J0,Delta,Dealta2,gamma,gamma_low] = ... % mirkinHinf1(P,nz,nw,h,c_flag,tf_flag,... 10 % eps_gamma,add_eps) % %%%%%

dead-time controller: mirkinHinf1.m,

Appendix B. Implementations

99

% P generalized plant [z y] = P * [w u] % it will internally be transformed to a 15 % "normalized" plant Pn % with Pn = [ A | B1 B2 ] % [ ------------- ] % [ C1 | 0 D12 ] % [ C2 | D21 0 ] 20 % in state-space(SS) or transfer-fcn(TF) % format with assumptions: % A1: (C2,A,B2) stabilizable and detectable % A2: [A-j*w*I B2; C1 D12] has full col rank % for all w in R 25 % A3: [A-j*w*I B1; C2 D21] has full row rank % for all w in R % A4: D12*D12 = I , D21*D12 = I % % nz dimension of z 30 % nw dimension of w % h dead-time % % u=K*y H_inf dead-time controller: % K = exp(-s*h)*Ka*(I-Delta*Ka)^(-1) 35 % % Ka rational part of the controller in SS % Ka = LFT(J,Q) % Delta irrational part of the controller in SS % only valid for t=[0,h] 40 % Delta = Delta1 - exp(-s*h)*Delta2 (h>0) % Delta = 0; (h=0) % J0 central controller (Q=0): Ka=J0 % % 45 % gamma (sub)optimal bound % gamma_low low bound L2[0,h]-induced norm % gamma_opt "opt." bound (close to singularity) % % c_flag ==1 : J0, Delta are calculated 50 % tf_flag ==1 : J0, Delta in TF-format (SISO) % (might cause problems) % eps_gamma acuracy of gamma_opt (default 1e-5) % add_eps subopt. add. to gamma_opt (def. 1e-5) % 55 %%%%% % algorithm based on: % [1] On the H_2 and H_inf Dead-Time Compensation % (2001) / L. Mirkin 60 % [2] Prediction-Based Solution to the H_inf % Control of Dead-Time Systems (2000) % / L. Mirkin % % Frank J. Christophersen 65 % Universiteit Twente, Netherlands % 2001-08-06 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% P = minreal(ss(P)); 70 %matlab adds states, %original plant

disp( ) disp(THE (SUB)OPTIMAL BOUND) 105 disp( ) %% lower bound gamma0 gamma0=L2norm_0h(A,B1,C1,h); % algor.by Mirkin: 110 %gamma0=hinfnormh(ss(A,B1,C1,0),h); gamma_min = gamma0+10*eps; go1 = 0; while go1 == 0 gamma = gamma_max;

%find gamma_max

115

120

% ARE eq (3a): [X1,X2,failX] = ric_schr([A-B2*D12*C1, ... B1*B1/(gamma^2)-B2*B2; -(C1*C1-C1... *D12*D12*C1), -(A-B2*D12*C1)]); % ARE eq (3b): [Y1,Y2,failY] = ric_schr([A-C2*D21*B1, ... C1*C1/(gamma^2)-C2*C2; -(B1*B1-B1... *D21*D21*B1), -(A-C2*D21*B1)]); if (failX==0) & (failY==0) lamX = eig(X1*X2); lamY = eig(Y1*Y2); tt = sum(lamX<-1e-14) + sum(lamY<-1e-14); if tt==0 Ah % delay-free-part solvable = [A, B1*B1/(gamma^2); -C1*C1,... -A]; = = = = = expm(Ah*h); sig(1:n,1:n); sig(1:n,n+1:2*n); sig(n+1:2*n,1:n); sig(n+1:2*n,n+1:2*n);

125

130

135 sig sig11 sig12 sig21 sig22 X Y 145

140

= X2*inv(X1); = Y2*inv(Y1);

hh1 = X*sig12*inv(sig22); cond1 = max(abs(eig( hh1 )))-1 < -1e-14; %for MSP often the case if sum(abs(lamY)>1e-14) > 0 hh2 = inv(sig22-X*sig12)*... (sig21-X*sig11)*Y; cond2 = max(abs(eig( hh2 )))-gamma^2 ... < -1e-14; else cond2 = 1; end if (cond1==1) & (cond2==1) go1=1; end end end if go1==0 gamma_max = gamma_max*2; % "norm." the plant [PN,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3] =... p_norm(P,nz,nw,gamma_max); clear R Rt Na Nb R2 Rt2 Nc R3 Rt3 %extract elements [A,B,C,D] = ssdata(PN);

150

155

%%% INITIAL VALUES, PARAMETERS if nargin<7 epsh = 1e-5; %accuracy of gamma0 75 else epsh = eps_gamma; end if nargin<8 add_eps = 1e-5; 80 end %% loop shaping: "norm." P gamma_max = 10; [PN,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3] = ... 85 p_norm(P,nz,nw,gamma_max); clear R Rt Na Nb R2 Rt2 Nc R3 Rt3 %% extract elements [A,B,C,D] = ssdata(PN); 90 mb = size(B,2); nc = size(C,1);

160

165

170

175

B1 = B(:,1:nw); B2 = B(:,nw+1:mb); C1 = C(1:nz,:); C2 = C(nz+1:nc,:); D12= D(1:nz,nw+1:mb); D21= D(nz+1:nc,1:nw); %lower bound gamma0 gamma0=L2norm_0h(A,B1,C1,h); %algorithm by Mirkin: %gamma0=hinfnormh(minreal(ss(A,B1,C1,0)),h); gamma_min = gamma0+10*eps; end %L2[0,h]-induced norm

180 B1 = B(:,1:nw); B2 = B(:,nw+1:mb); C1 = C(1:nz,:); C2 = C(nz+1:nc,:); 95 D12 = D(1:nz,nw+1:mb); D21= D(nz+1:nc,1:nw); n = length(A); ny = nc-nz; nu = mb-nw; m1a =size(B1,2); m2a =size(B2,2); m1b =size(C1,2); m2b =size(C2,2); 100

185 end gamma_low = gamma0

clear X1 X2 Y1 Y2 lamX lamY tt Ra Rb failX failY

Appendix B. Implementations

100

clear Ah sig sig11 sig12 sig21 sig22 hh1 190 clear hh2 cond1 cond2 280

clear gamma_opt failX failY clear Ah sig sig11 sig12 sig21 sig22 clear hh1 hh2 cond1 cond2

195 %%%

BISECTION SEARCH FOR GAMMA_OPT %%% THE "SUB"-OPTIMAL CONTROLLER 285 if c_flag ==1 disp( ) disp(CALCULATION OF THE CONTROLLER) disp( ) 290 gamma = gamma +add_eps;

while (abs(gamma_max-gamma_min)>epsh) |... (gamma==gamma_min), gamma=(gamma_max+gamma_min)/2; 200 nn = max(1,round(-1.7*log10(gamma_max-... gamma_min+epsh))); disp(sprintf([gamma = % num2str(5+nn) . ... num2str(nn) f],gamma)); 205 %"norm" the plant [PN,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3] = ... p_norm(P,nz,nw,gamma); clear R Rt Na Nb R2 Rt2 Nc %extract elements [A,B,C,D] = ssdata(PN);

295

210

300 B1 = B(:,1:nw); B2 = B(:,nw+1:mb); C1 = C(1:nz,:); C2 = C(nz+1:nc,:); D12= D(1:nz,nw+1:mb); D21= D(nz+1:nc,1:nw); %% Mirkin - test for the data go1 = 0; 220 % ARE eq (3a): [X1,X2,failX] = ric_schr([A-B2*D12*C1,... B1*B1/(gamma^2)-B2*B2; -(C1*C1-C1*... D12*D12*C1), -(A-B2*D12*C1)]); % ARE eq (3b): [Y1,Y2,failY] = ric_schr([A-C2*D21*B1,... C1*C1/(gamma^2)-C2*C2;-(B1*B1-B1*D21... *D21*B1), -(A-C2*D21*B1)]); if (failX==0) & (failY==0) lamX = eig(X1*X2); lamY = eig(Y1*Y2); tt = sum(lamX<-1e-14) + sum(lamY<-1e-14); if tt==0 %delay-free-part solvable Ah = [A, B1*B1/(gamma^2); -C1*C1, -A]; 325 sig sig11 sig12 sig21 sig22 X Y = = = = = expm(Ah*h); sig(1:n,1:n); sig(1:n,n+1:2*n); sig(n+1:2*n,1:n); sig(n+1:2*n,n+1:2*n); 305

%norm plant [PN,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3] = ... p_norm(P,nz,nw,gamma); [A,B,C,D] = ssdata(PN); B1 = B(:,1:nw); B2 = B(:,nw+1:mb); C1 = C(1:nz,:); C2 = C(nz+1:nc,:); D12= D(1:nz,nw+1:mb); D21= D(nz+1:nc,1:nw); %ARE eq (3a): [X1,X2] = ric_schr([A-B2*D12*C1, ... B1*B1/(gamma^2)-B2*B2; -(C1*C1-C1... *D12*D12*C1), -(A-B2*D12*C1)]); X = X2*inv(X1); %ARE eq (3b): [Y1,Y2] = ric_schr([A-C2*D21*B1, ... C1*C1/(gamma^2)-C2*C2;-(B1*B1-B1*D21... *D21*B1), -(A-C2*D21*B1)]); Y = Y2*inv(Y1); Ah sig = [A, B1*B1/(gamma^2); -C1*C1, -A]; = expm(Ah*h);

215

310

225

315

230

320

235

%finite-dim. part of the CONTROLLER (normed): By = [Y/(gamma^2) eye(n)]*sig*[C1*D12;B2]; Cx = [-D21*B1/(gamma^2) C2]*sig*[-X;eye(n)]; Zh = inv([Y/(gamma^2) eye(n)]*sig*[-X;eye(n)]); F = -(B2*X+D12*C1); L = -(Y*C2+B1*D21); Ainf Binf Cinf Dinf = = = = A + B1*B1*X/(gamma^2) + B2*F + Zh*L*Cx; Zh*[-L By]; [F; -Cx]; [zeros(nu,ny), eye(nu,size(Binf,2)-... ny); eye(size(Cx,1),ny), ... zeros(size(Cx,1),size(Binf,2)-ny)];

240

330

245

= X2*inv(X1); = Y2*inv(Y1); 335

%general controller-part %J = ss(Ainf,Binf,Cinf,Dinf);

%for Q(s)

hh1 = X*sig12*inv(sig22); cond1 = max(abs(eig( hh1 ))) - 1 < -1e-14; 250 %for MSP often the case if sum(abs(lamY)>1e-14) > 0 hh2 = inv(sig22-X*sig12)*... (sig21-X*sig11)*Y; cond2 = max(abs(eig( hh2 ))) - gamma^2 ... < -1e-14; else cond2 = 1; end %delay-part solvable? if (cond1==1) & (cond2==1) go1=1; gamma_max = gamma; end end end if go1==0 gamma_min = gamma; end end gamma_opt = gamma 275 clear X1 X2 Y1 Y2 lamX lamY tt Ra Rb %none of the conds hold

%central controller (normed) J0 = ss(Ainf,Binf(:,1:ny),Cinf(1:nu,:),... Dinf(1:nu,1:ny)); %FIR-part of the CONTROLLER (normed) Ad = [A B1*B1/(gamma^2); -C1*C1 -A]; Bd = [B2; -C1*D12]; Cd2= [C2 D21*B1/(gamma^2)]; Cd = Cd2*expm(-Ad*h); Delta = ss(Ad,Bd,Cd,0); Delta2 = ss(Ad,Bd,Cd2,0); %backscaling of the whole controller [J0, Delta] = k_scale(J0,Delta,h,R,Rt,Na,... Nb,R2,Rt2,Nc,R3,Rt3); [J0h,Delta2]= k_scale(J0,Delta2,h,R,Rt,... Na,Nb,R2,Rt2,Nc,R3,Rt3); %J0 = minreal(J0); %Delta = minreal(Delta); %Delta2 = minreal(Delta2); if tf_flag == 1 % SISO-case: standard-form if (ny==1) & (nu==1) [num,den] = tfdata(J0,v); den = den/num(length(num)); num = num/num(length(num)); J0 = tf(num,den); clear num den

340

255

345

260

350

265

355

270

360 % optimal gamma

Appendix B. Implementations

101

365

[num,den] num den Delta clear num

= tfdata(Delta,v); = num/den(length(num)); = den/den(length(num)); = tf(num,den); den

375

den Delta2 end end end

= den/den(length(num)); = tf(num,den);

370 [num,den] = tfdata(Delta2,v); num = num/den(length(num)); %%% END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Method 2 via the DRE: mirkinHinf2.m


function [J0,Delta,Delta2,gamma,gamma_low] = ... mirkinHinf2(P,nz,nw,h,c_flag,tf_flag,... eps_gamma,gamma_opt,eps_add,mr_flag) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %MIRKINHINF2 calculate H_inf controller for a % generalized plant with dead-time. % % [J0,Delta,Delta2,gamma,gamma_low] = ... % mirkinHinf2(P,nz,nw,h,c_flag,tf_flag,... % eps_gamma,gamma_opt, eps_add, mr_flag) % % % needed m-files: PIPHYx_d.m PIPHy_d.m % %%%%% % P generalized plant [z y] = P * [w u] % it will internally be transformed to a % normalized plant Pn % with Pn = [ A | B1 B2 ] % [ ------------- ] % [ C1 | 0 D12 ] % [ C2 | D21 0 ] % in state-space(SS) or transfer-fcn(TF) % format with assumptions: % A1: (C2,A,B2) stabilizable and detectable % A2: [A-j*w*I B2; C1 D12] has full col rank % for all w in R % A3: [A-j*w*I B1; C2 D21] has full row rank % for all w in R % A4: D12*D12 = I , D21*D12 = I % % nz dimension of z % nw dimension of w % h dead-time % % u=K*y H_inf dead-time controller: % K = exp(-s*h)*Ka*(I-Delta*Ka)^(-1) % % Ka rational part of the controller in SS % Ka = LFT(J,Q) % Delta irrational part of the controller in SS % only valid for t=[0,h] % Delta = Delta1 - exp(-s*h)*Delta2 (h>0) % Delta = 0; (h=0) % J0 central controller (Q=0): Ka=J0 % % % gamma (sub)opt. bound = gamma_opt+eps_add % gamma_low low bound L2[0,h]-induced norm % gamma_opt "opt." bound (close to singularity) % eps_gamma acuracy of gamma (default 1e-5) % % c_flag ==1 : J0, Delta, gamma are calculated % 2 : J0, Delta are calculated, % gamma_opt has to be provided % 3 : only gamma_opt is calculated % tf_flag ==1 : J0, Delta in TF-format (SISO) % (might cause problems) % mr_flag ==1 : J0, Delta as minimalrealization % %%%%% % 2001-08-22 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 75 P = minreal(ss(P)); %matlab adds states, %original plant

80 %%% INITIAL VALUES, PARAMETERS %% precision of integration op = odeset(RelTol,1e-13,AbsTol,1e-13); %op=[]; 85 if (nargin<7) | isempty(eps_gamma) epsh = 1e-5; %accuracy of gamma0 else epsh = eps_gamma; 90 end if nargin<5 c_flag = 1; tf_flag = 0; 95 eps_add = []; end if nargin<10 mr_flag=0; 100 end if nargin<9 eps_add=[]; end 105 %% loop shaping: "norm." P gamma_max = 10; [PN,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3] = ... p_norm(P,nz,nw,gamma_max); 110 clear R Rt Na Nb R2 Rt2 Nc R3 Rt3 %% extract elements [A,B,C,D] = ssdata(PN); 115 mb = size(B,2); nc = size(C,1); %basic

10

15

20

25

30

35

40

45

B1 = B(:,1:nw); B2 = B(:,nw+1:mb); C1 = C(1:nz,:); C2 = C(nz+1:nc,:); D12 = D(1:nz,nw+1:mb); D21= D(nz+1:nc,1:nw); 120 n m1a m1b 125 if (c_flag==1) | (c_flag==3) disp( ) disp(THE (SUB)OPTIMAL BOUND) disp( ) %%lower bound gamma0 gamma0=L2norm_0h(A,B1,C1,h); %algorithm by Mirkin: %gamma0=hinfnormh(minreal(ss(A,B1,C1,0)),h); gamma_min = gamma0+10*eps; go1 = 0; while go1 == 0 gamma = gamma_max; = length(A); ny =size(B1,2); m2a =size(C1,2); m2b = nc-nz; nu = mb-nw; =size(B2,2); =size(C2,2);

50

55

130

60

% algorithm based on: % [1] On the H_2 and H_inf Dead-Time Compensation 65 % (2001) / L. Mirkin % [2] Prediction-Based Solution to the H_inf % Control of Dead-Time Systems (2000) % / L. Mirkin % 70 % % Frank J. Christophersen % Universiteit Twente, Netherlands

135

140

%find gamma_max

% ARE eq (3a): [X1,X2,failX] = ric_schr([A-B2*D12*C1,...

Appendix B. Implementations

102

145

B1*B1/(gamma^2)-B2*B2;-(C1*C1-C1... *D12*D12*C1), -(A-B2*D12*C1)]); 235 % ARE eq (3b): [Y1,Y2,failY] = ric_schr([A-C2*D21*B1,... C1*C1/(gamma^2)-C2*C2;-(B1*B1-B1*... D21*D21*B1), -(A-C2*D21*B1)]); 240 if (failX==0) & (failY==0) lamX = eig(X1*X2); lamY = eig(Y1*Y2); tt = sum(lamX<-1e-14) + sum(lamY<-1e-14); 245 if tt==0 % delay-free-part solvable Y = Y2*inv(Y1); X = X2*inv(X1); %% filtering case X==0 if abs(sum(sum(X))) <1e-14 if h>0 [TT,PIPHIx] = ode45(PIPHIx_d,... [h 0],[X;eye(n)],[],A,B1,C1,... gamma,n); PIPHIx_0h = PIPHIx(length(TT),:); ... PIPHIx_0 = []; for ii=1:n %reconstruct matrix PIPHIx_0 =[PIPHIx_0, ... PIPHIx_0h(((ii-1)*2*n+1)... :ii*2*n)]; end PIx_0 = PIPHIx_0(1:n,:); else PIx_0=X; end cond = max(abs(eig( Y*PIx_0 ))) gamma^2 < -1e-14; ... 270 250

clear X1 X2 Y1 Y2 lamX lamY tt Ra Rb failX failY clear Ah sig sig11 sig12 sig21 sig22 hh1 clear hh2 cond1 cond2

150

%%%

BISECTION SEARCH FOR GAMMA_OPT

155

160

while (abs(gamma_max-gamma_min)>epsh) |... (gamma==gamma_min), gamma =(gamma_max+gamma_min)/2; nn = max(1,round(-1.7*log10(gamma_max-... gamma_min+epsh))); disp(sprintf([gamma = % num2str(5+nn)... . num2str(nn) f],gamma)); %"norm" the plant [PN,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3] = .... p_norm(P,nz,nw,gamma); clear R Rt Na Nb R2 Rt2 Nc %extract elements [A,B,C,D] = ssdata(PN); B1 = B(:,1:nw); B2 = B(:,nw+1:mb); C1 = C(1:nz,:); C2 = C(nz+1:nc,:); D12= D(1:nz,nw+1:mb); D21= D(nz+1:nc,1:nw);

165

255

170

260

175

%% Mirkin - test for the data go1 = 0; 265 % ARE eq (3a): [X1,X2,failX] = ric_schr([A-B2*D12*C1,... B1*B1/(gamma^2)-B2*B2;-(C1*C1-... C1*D12*D12*C1), -(A-B2*D12*C1)]); % ARE eq (3b): [Y1,Y2,failY] = ric_schr([A-C2*D21*B1,... C1*C1/(gamma^2)-C2*C2;-(B1*B1-... B1*D21*D21*B1), -(A-C2*D21*B1)]); 275 if (failX==0) & (failY==0) lamX = eig(X1*X2); lamY = eig(Y1*Y2); tt = sum(lamX<-1e-14) + sum(lamY<-1e-14); 280 if tt==0 % delay-free-part solvable Y = Y2*inv(Y1); X = X2*inv(X1); 285 %% filtering case if abs(sum(sum(X))) <1e-14 if h>0 290 [TT,PIPHIx] = ode45(PIPHIx_d,... [h 0],[X;eye(n)],op,A,B1,C1,... gamma,n); PIPHIx_0h = PIPHIx(length(TT),:); ... PIPHIx_0=[]; for ii=1:n %reconstruct matrix PIPHIx_0 =[PIPHIx_0, ... PIPHIx_0h(((ii-1)*2*n+1)... :ii*2*n)]; end PIx_0 = PIPHIx_0(1:n,:); else PIx_0=X; end cond = max(abs(eig( Y*PIx_0 ))) gamma^2 < -1e-14; 310 ...

180

185

190

195

else %% Y==0 or other if h>0 [TT,PIPHIy] = ode45(PIPHIy_d,... [0 h],[Y;eye(n)],[],A,B1,C1,... gamma,n); PIPHIy_hh = PIPHIy(length(TT),:); PIPHIy_h=[]; for ii=1:n %reconstruct matrix PIPHIy_h =[PIPHIy_h, ... PIPHIy_hh(((ii-1)*2*n+1):ii*2*n)]; end PIy_h = PIPHIy_h(1:n,:); else PIy_h=Y; end cond = max(abs(eig( PIy_h*X )))-... gamma^2 < -1e-14; end if cond ==1 go1=1; end end end %delay-part solvable

200

205

295

210

if go1==0 gamma_max = gamma_max*2; 300 %"norm." the plant [PN,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3] =... p_norm(P,nz,nw,gamma_max); clear R Rt Na Nb R2 Rt2 Nc R3 Rt3 305 %extract elements [A,B,C,D] = ssdata(PN);

215

220 B1 = B(:,1:nw); B2 = B(:,nw+1:mb); C1 = C(1:nz,:); C2 = C(nz+1:nc,:); D12= D(1:nz,nw+1:mb); D21= D(nz+1:nc,1:nw); 225 %lower bound gamma0 gamma0=L2norm_0h(A,B1,C1,h); %algorithm by Mirkin: %gamma0=hinfnormh(minreal(ss(A,B1,C1,0)),h); gamma_min = gamma0+10*eps; end end gamma_low = gamma0 %L2[0,h]-induced norm

315

230

320

else %% Y==0 or other if h>0 [TT,PIPHIy] = ode45(PIPHIy_d,... [0 h],[Y;eye(n)],op,A,B1,C1,... gamma,n); PIPHIy_hh = PIPHIy(length(TT),:); PIPHIy_h=[]; for ii=1:n %reconstruct matrix PIPHIy_h =[PIPHIy_h, ... PIPHIy_hh(((ii-1)*2*n+1):ii*2*n)]; end

Appendix B. Implementations

103

PIy_h = PIPHIy_h(1:n,:); else PIy_h=Y; end 325 cond = max(abs(eig( PIy_h*X )))-... gamma^2 < -1e-14; end

410

%DRE & transition matrix for Y if h>0 [TT,PIPHIy] = ode45(PIPHIy_d,[0 h],... [Y;eye(n)],op,A,B1,C1,gamma,n); PIPHIy_hh = PIPHIy(length(TT),:); PIPHIy_h=[]; for ii=1:n %reconstruct matrix PIPHIy_h =[PIPHIy_h, PIPHIy_hh(... ((ii-1)*2*n+1):ii*2*n)]; end PIy_h = PIPHIy_h(1:n,:); PHIy_h = PIPHIy_h((n+1):2*n,:); else PIy_h = Y; PHIy_h = eye(n); end

415 330 if cond==1 %delay-part solvable? go1=1; gamma_max = gamma; end end end if go1==0 %none of the conds hold gamma_min = gamma; end 340 end gamma_opt = gamma % optimal gamma 430 345 clear X1 X2 Y1 Y2 lamX lamY tt Ra Rb failX clear failY Ah sig sig11 sig12 sig21 sig22 hh1 clear hh2 cond1 cond2 end 435 350

420

335

425 % finite-dim. part of the CONTROLLER (normed): By = PHIy_h*(B2+PIy_h*C1*D12/(gamma^2)); Cx = (C2+D21*B1*PIx_0/(gamma^2))*PHIx_0; Zh = inv(PHIx_0)*inv(eye(n)-Y*PIx_0/(gamma^2)); F = -(B2*X+D12*C1); L = -(Y*C2+B1*D21); Ainf = A + B1*B1*X/(gamma^2) + B2*F + Zh*L*Cx; Binf = Zh*[-L By]; Cinf = [F; -Cx]; Dinf = [zeros(nu,ny), eye(nu,size(Binf,2)-... ny);eye(size(Cx,1),ny), zeros(size(Cx,... 1),size(Binf,2)-ny)]; %%general controller-part %J = ss(Ainf,Binf,Cinf,Dinf);

%% THE "SUB"-OPTIMAL CONTROLLER if (c_flag ==1) | (c_flag==2) 355 disp( ) disp(CALCULATION OF THE CONTROLLER) disp( )

440 %for Q(s)

445 360 if (c_flag==2) | (~isempty(eps_add)&(eps_add>0)) gamma = gamma_opt + eps_add else gamma = gamma_opt + 0.0001 % default end

%%central controller (normed) J0 = ss(Ainf,Binf(:,1:ny),Cinf(1:nu,:),... Dinf(1:nu,1:ny)); %%FIR-part of the CONTROLLER (normed) Ad = [A B1*B1/(gamma^2); -C1*C1 -A]; Bd = [B2; -C1*D12]; Cd2= [C2 D21*B1/(gamma^2)]; Cd = Cd2*expm(-Ad*h); Delta = ss(Ad,Bd,Cd,0); Delta2 = ss(Ad,Bd,Cd2,0); %%backscaling of the whole controller [J0, Delta] = k_scale(J0,Delta,h,R,Rt,Na,... Nb,R2,Rt2,Nc,R3,Rt3); [J0h, Delta2]= k_scale(J0,Delta2,h,R,Rt,Na,... Nb,R2,Rt2,Nc,R3,Rt3); if mr_flag==1 J0 = minreal(J0); Delta = minreal(Delta); Delta2 = minreal(Delta2); end if tf_flag == 1 %SISO-case: standard-form if (ny==1) & (nu==1) [num,den] = tfdata(J0,v); den = den/num(length(num)); num = num/num(length(num)); J0 = tf(num,den); clear num den [num,den] num den Delta clear num = tfdata(Delta,v); = num/den(length(num)); = den/den(length(num)); = tf(num,den); den = = = = tfdata(Delta2,v); num/den(length(num)); den/den(length(num)); tf(num,den);

450

365 %norm plant [PN,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3] = ... p_norm(P,nz,nw,gamma); [A,B,C,D] = ssdata(PN); B1 = B(:,1:nw); B2 = B(:,nw+1:mb); C1 = C(1:nz,:); C2 = C(nz+1:nc,:); D12= D(1:nz,nw+1:mb); D21= D(nz+1:nc,1:nw); % ARE eq (3a): [X1,X2] = ric_schr([A-B2*D12*C1,... B1*B1/(gamma^2)-B2*B2;-(C1*C1-C1... *D12*D12*C1), -(A-B2*D12*C1)]); X = X2*inv(X1); % ARE eq (3b): [Y1,Y2] = ric_schr([A-C2*D21*B1,... C1*C1/(gamma^2)-C2*C2;-(B1*B1-... B1*D21*D21*B1), -(A-C2*D21*B1)]); Y = Y2*inv(Y1);

455

370

460 375

465

380

470

385

390

%DRE & transition matrix for X if h>0 [TT,PIPHIx] = ode45(PIPHIx_d,[h 0],... [X;eye(n)],op,A,B1,C1,gamma,n); PIPHIx_0h = PIPHIx(length(TT),:); PIPHIx_0 = []; for ii=1:n %reconstruct matrix PIPHIx_0 =[PIPHIx_0, PIPHIx_0h(((ii-1)... *2*n+1):ii*2*n)]; end PIx_0 = PIPHIx_0(1:n,:); PHIx_0 = PIPHIx_0((n+1):2*n,:); else PIx_0 = X; PHIx_0 = eye(n); end

475

480

395

400

[num,den] num den 485 Delta2 end end end 490

405

%%% END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Appendix B. Implementations

104

Sub-functions
function PIPHIxD = PIPHIx_d(tt,PIPHIx,flag,... A,B,C,gamma,n) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %PIPHIx_d subfunction of MirkinHinf2.m 5 % % Frank J. Christophersen % Universiteit Twente, Netherlands % 2001-08-22 10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% hh=PIPHIx; hhPIPHIx=[]; for ii=1:n % reconstruction of the matrix hhPIPHIx =[hhPIPHIx,... 15 hh(((ii-1)*2*n+1):ii*2*n)]; end PIx = hhPIPHIx(1:n,:); PHIx = hhPIPHIx((n+1):2*n,:); 20 hh1 = -(A*PIx +PIx*A+C*C+PIx*B*B*PIx/(gamma^2)); hh2 = (A+B*B*PIx/(gamma^2))*PHIx; 5 % % Frank J. Christophersen % Universiteit Twente, Netherlands % 2001-08-22 10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% hh=PIPHIx; hhPIPHIx=[]; for ii=1:n % reconstruction of the matrix hhPIPHIx =[hhPIPHIx,... 15 hh(((ii-1)*2*n+1):ii*2*n)]; end PIx = hhPIPHIx(1:n,:); PHIx = hhPIPHIx((n+1):2*n,:); 20 hh1 = -(A*PIx +PIx*A+C*C+PIx*B*B*PIx/(gamma^2)); hh2 = (A+B*B*PIx/(gamma^2))*PHIx; function PIPHIxD = PIPHIx_d(tt,PIPHIx,flag,... A,B,C,gamma,n) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %PIPHIx_d subfunction of MirkinHinf2.m

PIPHIxD=[]; hh3=[hh1;hh2]; 25 for ii=1:n %construction of vectorformat PIPHIxD = [PIPHIxD; hh3(:,ii)]; end %%% END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

PIPHIxD=[]; hh3=[hh1;hh2]; 25 for ii=1:n %construction of vectorformat PIPHIxD = [PIPHIxD; hh3(:,ii)]; end %%% END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

B.4 The

10

15

20

25

30

35

40

function [J0,Delta,Delta2,gamma,gamma_0] = ... mirkinH2(P,nz,nw,h,c_flag,tf_flag,add_eps) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %MIRKINH2 calculate H_2 controller for a % generalized plant with dead-time. % % [J0,Delta,Dealta2,gamma,gamma_0] = ... % mirkinH2(P,nz,nw,h,c_flag,tf_flag,add_eps) %%%%% % P generalized plant [z y] = P * [w u] % it will internally be transformed to a % normalized plant Pn % with Pn = [ A | B1 B2 ] % [ ------------- ] % [ C1 | 0 D12 ] % [ C2 | D21 0 ] % in state-space(SS) or transfer-fcn(TF) % format with assumptions: % A1: (C2,A,B2) stabilizable and detectable % A2: [A-j*w*I B2; C1 D12] has full col rank % for all w in R % A3: [A-j*w*I B1; C2 D21] has full row rank % for all w in R % A4: D12*D12 = I , D21*D12 = I % % nz dimension of z % nw dimension of w % h dead-time % % u=K*y H_2 dead-time controller: % K = exp(-s*h)*Ka*(I-Delta*Ka)^(-1) % % Ka rational part of the controller in SS % Ka = LFT(J,Q) % Delta irrational part of the controller in SS % only valid for t=[0,h] % Delta = Delta1 - exp(-s*h)*Delta2 (h>0) % Delta = 0; (h=0) % J0 central controller (Q=0): Ka=J0 % % % gamma (sub)optimal bound % gamma_opt "opt." bound (close to singularity) % gamma_0 lower bound

dead-time controller: mirkinH2.m


45 % % tf_flag % % c_flag % 50 % add_eps % %%%%% ==1 : J0, Delta in TF-format (SISO) (might cause problems) ==1 : J0, Delta is calculated subopt. add. to gamma_opt (def. 1e-5)

% algorithm based on: 55 % [1] On the H_2 and H_inf Dead-Time Compensation % (2001) / L. Mirkin % % Frank J. Christophersen % Universiteit Twente, Netherlands 60 % 2001-09-20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% P = minreal(ss(P)); 65 %%% INITIAL VALUES, PARAMETERS if nargin<7 add_eps = 1e-5; end 70 %%loop shaping: "norm." P gamma_max = 100; [PN,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3] =... p_norm(P,nz,nw,gamma_max); 75 clear R Rt Na Nb R2 Rt2 Nc R3 Rt3 %matlab adds states, %original plant

%%extract elements [A,B,C,D] = ssdata(PN); 80 mb = size(B,2); nc = size(C,1);

B1 = B(:,1:nw); B2 = B(:,nw+1:mb); C1 = C(1:nz,:); C2 = C(nz+1:nc,:); 85 D12= D(1:nz,nw+1:mb); D21= D(nz+1:nc,1:nw); n = length(A); m1a =size(B1,2); ny = nc-nz; m2a =size(B2,2); nu = mb-nw;

Appendix B. Implementations

105

m1b 90

=size(C1,2); m2b

=size(C2,2);

Delta = ss(A,B2,C2*sig1,0); Delta2 = ss(A,B2,C2,0); 155 %%ARE eq (3a): [X1,X2] = ric_schr([A-B2*D12*C1, -B2*B2;... -(C1*C1-C1*D12*D12*C1),... -(A-B2*D12*C1)]); X = X2*inv(X1); %%ARE eq (3b): [Y1,Y2] = ric_schr([A-C2*D21*B1, -C2*C2;... -(B1*B1-B1*D21*D21*B1), ... -(A-C2*D21*B1)]); Y = Y2*inv(Y1); F2 L2 170 %%finite-dim. part of the CONTROLLER (normed): A2 = A + B2*F2 + sig*L2*C2*sig1; B2 = [-sig*L2 B2]; C2 = [F2; -C2*sig1]; D2 = [zeros(nu,ny), eye(nu,size(B2,2)-ny); ... eye(size(C2,1),ny), zeros(size(C2,1),... size(B2,2)-ny)]; %%general controller-part %J = ss(A2,B2,C2,D2); = -(B2*X+D12*C1); = -(Y*C2+B1*D21);

disp( ) disp(THE (SUB)OPTIMAL BOUND) 95 disp( ) %%ARE eq (2a): [X1,X2,failX] = ric_schr([A-B2*D12*C1,... -B2*B2; -(C1*C1-C1*D12*D12*C1),... 100 -(A-B2*D12*C1)]); %%ARE eq (2b): [Y1,Y2,failY] = ric_schr([A-C2*D21*B1,... -C2*C2; -(B1*B1-B1*D21*D21*B1),... 105 -(A-C2*D21*B1)]); if (failX==0) & (failY==0) X = X2*inv(X1); Y = Y2*inv(Y1); 110 end F2 L2 = -(B2*X+D12*C1); = -(Y*C2+B1*D21); 160

165

175

115 gamma_0 = sqrt(trace(B1*X*B1)+trace(F2*Y*F2)); op = odeset(RelTol,1e-12,AbsTol,1e-12); if h<1e-14 gammah = 0; 120 else [TT,gammah] = ode45(gammah_d,[0 h],... 0,op,A,F2,L2); end 125 gamma_h = sqrt(gammah(length(gammah))); gamma_opt = sqrt(gamma_0^2+gamma_h^2) %opt. gamma 190 %%% THE "SUB"-OPTIMAL CONTROLLER 130 if c_flag ==1 disp( ) disp(CALCULATION OF THE CONTROLLER) disp( ) 135 %%(sub)optimal gamma gamma = gamma_opt + add_eps; 200 195 180 %for Q(s)

%% central controller (normed) J0 = ss(A2,B2(:,1:ny),C2(1:nu,:),... D2(1:nu,1:ny)); 185 %%backscaling of the whole controller [J0, Delta] = k_scale(J0,Delta,h,R,Rt,... Na,Nb,R2,Rt2,Nc,R3,Rt3); [J0h,Delta2]= k_scale(J0,Delta2,h,R,Rt,... Na,Nb,R2,Rt2,Nc,R3,Rt3); if tf_flag == 1 % SISO-case: standard-form if (ny==1) & (nu==1) [num,den] = tfdata(J0,v); den = den/num(length(num)); num = num/num(length(num)); J0 = tf(num,den); clear num den [num,den] num den Delta clear num = tfdata(Delta,v); = num/den(length(num)); = den/den(length(num)); = tf(num,den); den = = = = tfdata(Delta2,v); num/den(length(num)); den/den(length(num)); tf(num,den);

140

145

%%normed plant [PN,R,Rt,Na,Nb,R2,Rt2,Nc,R3,Rt3] = ... p_norm(P,nz,nw,gamma); [A,B,C,D] = ssdata(PN); B1 = B(:,1:nw); B2 = B(:,nw+1:mb); C1 = C(1:nz,:); C2 = C(nz+1:nc,:); D12= D(1:nz,nw+1:mb); D21= D(nz+1:nc,1:nw); sig = expm(A*h); sig1 = expm(-A*h);

205 [num,den] num den Delta2 210 end end end

150 %%FIR-part of the CONTROLLER (normed) %%% END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Sub-function
function gammahD = gammah_d(tt,gammah,flag,A,F2,L2) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %GAMMAH_D subfunction of MirkinH2.m 5 % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 10 gammahD = trace(F2*expm(A*tt)*L2*L2... *expm(A*tt)*F2);

Frank J. Christophersen Universiteit Twente, Netherlands 2001-08-22

15 %%% END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Bibliography

[1] B OSGRA , O.H., H. K WAKERNAAK and G. M EINSMA: Design Methods for Control Systems. DISC, The Netherlands, 2001. lecture notes. [2] C URTAIN , R.F. and H.J. Z WART: An Introduction to Innite-Dimensional Linear Systems Theory. Number 21 in TAM. Springer-Verlag, New York, 1995. [3] F OIAS , C., H. ZBAY and A. TANNENBAUM: Robust Control of Innite Dimensional Systems: Frequency Domain Methods, volume 209 of Lecture Notes in Control and Information Sciences. Springer-Verlag, London, 1996. [4] G EORGIOU , T.T. and M.C. S MITH: Optimal robustness in the gap metric. In IEEE Trans. on Automatic Control, volume 356, pages 673686, June 1990. [5] G REEN , M. and D.J.N. L IMEBEER: Linear robust Control. Prentice-Hall, Englewood Cliffs, NJ, 1995. [6] G U , G., J. C HEN and O. TOKER: Computation of 2 0, h Induced Norms. In Proc. 35th IEEE Conference on Decision and Control, pages 40464051, Kobe, Japan, Dec. 1996. [7] K WAKERNAAK , H. and R. S IVAN: Modern Signals and Systems. Information and System Science Series. Prentice Hall, Englewood Cliffs, NJ, 1991. [8] L TKEPOHL , H.: Handbook of Matrices. John Wiley & Sons Ltd., 1996. [9] M EINSMA , G.: Frequency Domain Methods in Control. PhD thesis, Department of Applied Mathematics, University of Twente, The Netherlands, 1993. [10] M EINSMA , G. and H. Z WART: The standard control problem for dead-time systems. In Proc. of the Mathematical Theory of Networks and Systems 98 Symposium, pages 317320, Padova, Italy, 1998. [11] M EINSMA , G. and H. Z WART: On control for dead-time systems. In IEEE Trans. Aut. Control, volume 452, pages 272285, 2000.

106

Bibliography

107

[12] M EINSMA , G. and H.J. Z WART: On control for dead-time systems. Memorandum 1420, Universiteit Twente, Enschede, the Netherlands, 1997. [13] M IRKIN , L.: On the Extraction of Dead-Time Controllers from Delay-Free Parametrizations. draft version, to appear, Oct. 2000. [14] M IRKIN , L.: Predictor-Based Solution to the In Proc. of ROCOND, 2000.

[15] M IRKIN , L.: On the 2 and Dead-Time Compensation. In Proc. 39th IEEE Conf. on Decision and Control, volume 5, pages 45844587, 2001. [16] M IRKIN , L. and N. R ASKIN: State-Space parametrization of all Stabilizing DeadTime Controllers. In Proc. 38th IEEE Conf. on Decision and Control, volume 1, pages 221226, Phoenix, AZ, 1999. [17] M ORRIS , E.L., K.H. Z IENKIEWICZ , M.M.A. P OURZANJANI , J.O. F LOWER and M.R. B ELMONT: Techniques for sea state prediction. In W ILSON , P.A. (editor): Manoeuvring and Control of Marine Craft, Computational Mechanics Publications, Southampton, 1992. [18] PALMOR , Z.J.: Time-Delay Compensation Smith Predictor and its Modications. In L EVINE , W.S. (editor): The Control Handbook, The electrical engineering handbook series, pages 224237. CRC press, 1996. [19] PARTINGTON , J.R. and K. G LOVER: Robust stabilization of delay systems by approximation of coprime factors. In System & Control Letters, volume 14, pages 325331, 1990. [20] S KOGESTAD , S. and I. P OSTLETHWAITE : Multivariable Feedback Control. John Wiley & Sons, 1996. [21] S MITH , O.J.M.: Closer Control of Loops with Dead Time. In Chemical Engineering Progress, volume 535, pages 217219, May 1957. [22] S MITH , O.J.M.: A Controller to Overcome Dead Time. In Chemical Engineering Progress, volume 62, pages 2833, Feb. 1959. [23] S OLIMAN , S.S. and M.D. S RINATH : Continuous and discrete Signals and Systems. Information and System Science Series. Prentice Hall, 1990. [24] S TRUBBE , S.: The Optimal Mixed Sensitivity Problem for a Class of Delay Systems. Masters thesis, Universiteit Twente, Enschede, the Netherlands, Sep. 2001. [25] T HE M ATH W ORKS , I NC .: M ATLAB R The Language of Technical Computing. The MathWorks, Inc., Natwick, NA, 2000.

Control of Dead-Time Systems.

Bibliography

108

[26] TOKER , O. and H. ZBAY: Optimal and Suboptimal Controllers for Innite Dimensional SISO Plants. In IEEE Trans. on Automatic Control, volume 404, pages 751755, Apr. 1995. [27] Z HOU , K., J.C. D OYLE and K. G LOVER: Robust and Optimal Control. Prentice Hall, 1996. [28] Z WART, H. and J. B ONTSEMA: An application driven guide through innitedimensional systems theory. In B ASTIN , G. and M. G EVERS (editors): Plenary Lectures and Mini-Courses, pages 289328. European Control Conference EEC, 1997. [29] Z WART, H., G. W EISS and G. M EINSMA : Prediction of a narrow-band signal from measurement data. In C ACCETTA , L., K.L. T EO, P.F. S IEW, Y.H. L EUNG, L.S. J ENNINGS and V. R EHBOCK (editors): Optimization Techiques and Applications, pages 329336, 1998.