DISCRETETIME OPTIMAL PREVIEW CONTROL
ANDREW HAZELL
A thesis presented to The Department of Electrical and Electronic Engineering in partial fulfilment of the requirements for the degree of Doctor of Philosophy in the subject of Control Engineering
Imperial College University of London
February 2008
Abstract The field of Preview Control is concerned with using advanced knowledge of disturbances or references in order to improve tracking quality or disturbance rejection. Areas of application include guidance of autonomous vehicles, robotics and process control. This thesis studies Optimal DiscreteTime Preview Control, in which the controlled plant is assumed to be unconstrained, linear and discretetime, with a preview horizon that extends for a fixed time into the future. Controller optimality is determined using either the H2 or H∞ norms. The central objective of this thesis is to produce a generic set of tools for solving a wide class of H2 and H∞ Preview Control problems. To this end, a very general preview problem is introduced, which captures fixedlag smoothing, tracking with robust performance specifications, and also previewbased mixedsensitivity design. In principle, whilst this problem can be solved using standard generalised regulator synthesis results, such an approach is found to require the solution of unacceptably large Discrete Algebraic Riccati Equations (DAREs). A core theme of this thesis involves the efficient solution of the H2 and H∞ versions of such DAREs, and also the order reduction of the resulting controllers. It is found that the dimension of all matrix equations required for controller synthesis, and also the order of the resulting controllers, is no higher than the degree of the plant plus weighting functions. Additional results are presented concerning the norm reduction that is achievable through preview action, and a discussion of the generic properties of preview controllers is provided. Preview Control appears to be well suited for application to autonomous vehicles. However, a class of nonlinearities generically associated with vehicle models prevents its immediate use. Fortunately, this nonlinearity may be accurately represented by a parameterised set of linear systems, from which a simple controller may be derived. This control scheme is successfully demonstrated on a nonlinear bicycle model.
2
Contents Preliminaries
7
1 Introduction 12 1.1 Background and Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.2 1.3 1.4
1.5
A Simple Preview Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A General Previewable Disturbance Rejection Problem . . . . . . . . . . . . . . . Some Special Cases of the General Preview Problem . . . . . . . . . . . . . . . .
14 19 21
1.4.1 1.4.2
Nominal Preview Tracking with Integral Action . . . . . . . . . . . . . . . Disturbance Rejection with Uncertain Preview . . . . . . . . . . . . . . .
21 22
1.4.3 1.4.4
Robust Preview Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . A Mixed Sensitivity Design . . . . . . . . . . . . . . . . . . . . . . . . . .
22 23
1.4.5 1.4.6 1.4.7
Preview Preprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fixedlag smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23 24 25
Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
2 Literature Review 2.1 2.2
2.3 2.4
27
H2 Preview Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H2 Preview Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27 30
2.2.1 2.2.2
Guidance of Autonomous Vehicles . . . . . . . . . . . . . . . . . . . . . . Driver Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30 31
2.2.3 Other Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H∞ Preview Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions and Gaps in the Literature . . . . . . . . . . . . . . . . . . . . . . .
32 32 34
3 Problem formulation
36
4 Solution of the General H2 Preview Problem
38
4.1 4.2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Full Information Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38 39
4.3
4.2.1 Standard Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 Efficient Computation of the Full Information controller . . . . . . . . . . Output Feedback Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39 40 44
4.3.1 4.3.2
Standard Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Efficient Computation of the Output Feedback Controller . . . . . . . . .
44 45
4.4
4.3.3 Efficient Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . Feedforward Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
46 48
4.5 4.6
Reduction in H2 norm due to Preview . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
50 53
3
5 Additional H2 Results
57
5.1 5.2 5.3
Recursive construction of the FI DARE solution . . . . . . . . . . . . . . . . . . A Link to Receding Horizon Control . . . . . . . . . . . . . . . . . . . . . . . . . A Link to SplitOptimisationHorizon Methods . . . . . . . . . . . . . . . . . . .
57 59 60
5.4
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
61
6 Solution of the General H∞ Preview Problem
62
6.1 6.2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Full Information Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
62 64
6.3
6.2.1 Standard Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.2 Efficient solution of FI DARE . . . . . . . . . . . . . . . . . . . . . . . . . Output Feedback Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
64 66 80
6.3.1 6.3.2
Standard Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Efficient Output Feedback Controller Synthesis . . . . . . . . . . . . . . .
80 81
6.4
6.3.3 Efficient Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . Feedforward Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
84 87
6.5 6.6
Computational Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
88 88
7 Additional H∞ Analysis and Results
90
7.1
An Alternative Solution Method Based on Recursive Construction of Deflating Subspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
90
7.2 7.3
A Bound on Achievable Performance . . . . . . . . . . . . . . . . . . . . . . . . . Failure on a Point Set of γ Values . . . . . . . . . . . . . . . . . . . . . . . . . . .
93 95
7.4
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
95
8 Behaviour and Features of Preview Controllers
96
8.1
Generic Controller features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.1 H2 and H∞ controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.2 H2 only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
96 96 97
8.2 8.3
Design Insights for Preview Tracking Controllers . . . . . . . . . . . . . . . . . . 97 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
9 A Framework for the Preview Control of Vehicles 108 9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 9.2 9.3 9.4
Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 The Nonlinear Vehicle Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 The Preview Control Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
9.5 9.6
The Equilibrium Trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 A Family of Discrete Linearisations . . . . . . . . . . . . . . . . . . . . . . . . . . 116
9.7 9.8
Design of a Simple Full Information H2 Preview Controller . . . . . . . . . . . . 118 Choosing ψ¯ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
9.9
Application to a Nonlinear Bicycle Model . . . . . . . . . . . . . . . . . . . . . . 121 9.9.1 The Nonlinear Bicycle Model . . . . . . . . . . . . . . . . . . . . . . . . . 121 9.9.2 9.9.3 9.9.4
Trajectory Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Controller Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
9.10 Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 9.11 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4
10 Case Study: H2 Preview Control of a Power Steering Test Rig
131
10.1 The Test Rig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 10.1.1 Overview of Rig Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 131 10.1.2 A Model of the Rig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 10.1.3 Parameter Determination and Values . . . . . . . . . . . . . . . . . . . . . 134 10.1.4 Evaluation of Model Fidelity . . . . . . . . . . . . . . . . . . . . . . . . . 136 10.1.5 Control Deficiencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 10.1.6 Controller Coding and Implementation . . . . . . . . . . . . . . . . . . . . 137 10.2 Trackrod Force Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 10.2.1 Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 10.2.2 Design Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 10.2.3 Performance Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 10.3 Rotary Motor Position Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 10.3.1 Formulation as a Preview Preprocessing Problem . . . . . . . . . . . . . . 142 10.3.2 Design Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 10.3.3 Performance Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 10.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 11 Conclusions and Future Work 149 11.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 11.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 A Proofs A.1 The Simple H2 Example
152 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
A.2 Additional H∞ Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 A.3 Zero Preview H2 norm Decomposition . . . . . . . . . . . . . . . . . . . . . . . . 156 B Code 158 B.1 Preview Control Toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 B.2 Generation of Linear Steering Rig Model . . . . . . . . . . . . . . . . . . . . . . . 163 C Nonlinear bicycle model 166 C.1 Model Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 C.2 Autosim Bicycle Model
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
5
Acknowledgements Firstly I would like to thank my supervisor, David Limebeer, for his guidance and expertise, for his insistence on the highest standards, and especially for his invaluable input into the papers we coauthored. Throughout the course of my PhD, I benefited from many interesting discussions with Robin Sharp and Asif Farooq on the subject of applications of Preview Control. In particular, my work on Preview Control for vehicles was inspired by these discussions. The resulting algorithms were tested on a nonlinear bicycle model provided by Amrit Sharma, whom I would also like to thank. This work was funded jointly by BAe Systems and the Engineering and Physical Sciences Research Council, whose support is gratefully acknowledged. In addition, I would like to acknowledge the support of the Royal Academy of Engineering, who provided the Student Professional Development Fellowship which funded both my project at McLaren Racing and various training activities. Finally, I would like to express my deepest thanks to Penny for her love and support throughout the highs and the lows of this work.
6
Preliminaries This section details the notation used, as well as some definitions and standard results from H∞  and H2 optimal control. Readers familiar with these topics, and with the notation of the style used in Green and Limebeer (1995), may wish to skip this section.
Notation We will make use of discretetime statespace models of the form: x(k + 1) = Ax(k) + Bu(k) y(k) = Cx(k) + Du(k) where k is the time index; x(k) is a vector of state values; u(k) is a vector of input values; y(k) is a vector of output values; and A, B, C and D are appropriately dimensioned real matrices. Entire signals will be represented by omitting the time index, e.g. x = {x(k)}∞ −∞ . The 2norm of a signal x will be denoted as x2 , and is defined by: x2 =
∞ X
x(i)′ x(i)
i=0
When transfer functions are associated with statespace models, they are computed using: G(Z) = C(ZI − A)−1 B + D, in which Z is the Ztransform variable. We will also use the shorthand notation: " # A B s G(Z) = . C D
(1) "
P11 The (lower) linear fractional transformation of the transfer function matrices P = P21 and K will be written as Fl (P, K) where:
P12 P22
#
Fl (P, K) = P11 + P12 K(I − P22 K)−1 P21 ; the variable, Z, is omitted where no confusion may occur. A transfer function which maps signal a to signal b will be denoted Ta→b . An m × p dimensional zero matrix will be denoted 0m×p and an n dimensional identity matrix will written as In . The shorthand 0m = 0m×m will also be used. We will often use the
7
notation ⋆m×p to represent a matrix belonging to Rm×p ; the dimensions may be omitted when no ambiguity will result. The trace, the transpose, and the complex conjugate transpose of a matrix A will be denoted as Tr {A}, A′ and A∗ respectively. The set of eigenvalues of A will be denoted λ(A). Many variables will be dependent on the preview length. Where it is necessary to make this dependence explicit, the notation A[N ] will be used (denoting a version of the matrix A relating to the N preview step problem). Also, there are many quantities that are defined recursively, and these will be denoted with a bracketed superscript index, e.g. A(j) . Whilst each chapter is notationally consistent, due to the large number of variables, a small amount of reuse of notation is required between chapters.
The H2 and H∞ norms Many control problems can be posed in terms of minimising (in some sense) a particular closed loop transfer function. Two popular measures of the ‘size’ of a transfer function are the H2 and H∞ norms. The H2 norm of a transfer function G(Z) will be denoted by G(Z)2 , and is defined by: G(Z)2 =
1 2π
Z
π
−π
Tr G(ejθ )∗ G(ejθ ) dθ.
If G has the realisation (1), with A assumed stable, and X is a real, symmetric and nonnegative matrix which satisfies: X = A′ XA + C ′ C, then G(Z)2 = Tr {B ′ XB + D′ D} .
(2)
Alternatively, the following is a more physically meaningful interpretation of the H2 norm. Let z = Gw, for some real vector valued signals z and w, with w assumed to be a realisation of a unit power, Gaussian, whitenoise process, then G2 = γ if and only if E
(
n
1X lim z(i)′ z(i) n→∞ n i=0
)
= γ2
where E {·} denotes expectation over w. In other words, the H2 norm of a transfer function is a measure of the gain in power from input to output, assuming that the input signal is white and Gaussian. This result gives rise to the equivalence between Linear Quadratic Gaussian (LQG) and H2 controller synthesis. The H∞ norm will be denoted by ·∞ , and is defined by: G∞ = sup σ ¯ (G(Z)), Z≤1
where σ ¯ (·) denotes the largest singular value. An alternative definition is given by: G∞ = sup w
8
z2 , w2
w
z P
u
y
K
Figure 1: The generalised regulator.
where w is assumed to belong to the set of all functions for which w2 is bounded1 . The H∞ norm therefore represents the largest possible gain in energy from input to output.
The generalised regulator The generalised regulator setup is depicted in Figure 1. The signal w represents all exogenous inputs, which may include plant disturbances, sensor noise and reference signals. The signal u is the control, y is the measurements and references, and z is the controlled output. Problems of this general " # form will be referred to as Output Feedback (OF) problems. The x special case where y = , with x being the state of P , is known as the Full Information (FI) w problem.
Some useful definitions and theorems The space RH∞ The space RH∞ consists of all rational matrix functions of z that are analytic for z ≥ 1. InnerOuter factorisation A discretetime matrix function G(Z) ∈ RH∞ is said to be inner if G(Z −1 )′ G(Z) = I, and outer if it has a right inverse that is analytic outside the unit circle (Lin et al., 1996). If G(Z) ∈ RH∞ then one can always compute an innerouter factorisation such that: G(Z) = Go (Z)Gi (Z), in which Gi (Z) is an inner matrix and Go (Z) is an outer matrix (Lin et al., 1996). A contractive property of linear fractional maps "
P11 Let P and K be discretetime matrix transfer functions with P = P21 K∞ < 1/γ, then Fl (P, K)∞ < γ (Redheffer, 1960). The Discrete Algebraic Riccati Equation (DARE) The matrix equation: ¯′R ¯ −1 L, ¯ X = A′ XA + Q − L 1 More
formally: w ∈ L2 [0, ∞) (Green and Limebeer, 1995).
9
# P12 , P ∞ < γ and P22
with: ¯ = R + B ′ XB R ¯ = L + B ′ XA, L is known as the Discrete Algebraic Riccati Equation (DARE), and the solution to equations of this type will be a core theme of this thesis. Sometimes the DARE will be written as X = D(A, B, Q, R, L; X), where: ¯R ¯ −1 L. ¯ D(A, B, Q, R, L; X) = A′ XA + Q − L
10
Acronyms 3D
3Dimensional
DARE Discrete Algebraic Riccati Equation DF
Disturbance Feedforward
ESP
Extended Symplectic Pencil
FI
Full Information
FIR
Finite Impulse Response
IIR
Infinite Impulse Response
LMI
Linear Matrix Inequality
LPV
Linear Parameter Varying
LQ
Linear Quadratic
LQG
Linear Quadratic Gaussian
LQR
Linear Quadratic Regulator
MP
Minimum Phase
MPC Model Predictive Control NMP NonMinimum Phase OF
Output Feedback
PCT
Preview Control Toolbox
PID
Proportional Integral Derivative
RHC
Receding Horizon Control
RHP
Right Half Plane
RHS
Right Hand Side
RHT
Receding Horizon Tracking
SDS
Stable Deflating Subspace
SISO Single Input Single Output UAV
Unmanned Aerial Vehicle
UML
Universal Modelling Language
11
Chapter 1
Introduction 1.1
Background and Motivation
The field of Preview Control is concerned with using advanced knowledge of disturbances or references in order to improve tracking quality or disturbance rejection. The use of such information has great potential for performance improvement. Consider, for example, the control action provided by a human car driver following a road. If the driver can see a long way down the road, then changes in the direction of the road are anticipated well in advance, resulting in good road following without excessive braking or steering control action. Now consider the (possibly inadvisable) case where a driver attempts to follow the same path at the same speed, but with limited visibility. In this case, the control actions will be much more severe, as it has not been possible to anticipate road features and begin preparatory control action. Such increased control activity could lead to actuator saturation  in this case the tyre forces may saturate and the driver may lose control. Clearly the notion of anticipative control action is a very general one, with the possibility of many different controltheoretic problem formulations. The term Preview Control is usually associated with a particular class of anticipative control problems with a preview horizon that extends for a fixed time into the future. The objective of Linear Optimal Preview Control, which is the subject of this thesis, is to find a controller that minimises the power of the controlled output under certain assumptions about the reference and disturbance signals. In particular, we will be considering H2 norm optimisation, in which the disturbances are assumed to be white Gaussian processes, and also H∞ norm optimisation, in which the disturbances are assumed to be ‘worst case’. A more rigorous definition of these optimisation problems is given in the following sections. The car driving analogy alludes to one of the major application areas for Preview Control, which is the design control systems for Unmanned Vehicles: Farooq and Limebeer (2005); Cunha et al. (2006); Sharp et al. (2000). Another application area that has received significant interest is the design of active suspension systems (Prokop and Sharp, 1995; Roh and Park, 1999), where a sensor provides information regarding variations in the road profile in front of the vehicle, and this information is used to ‘prepare’ the suspension system. The operation of such an active suspension may be compared to the skier who extends their legs in advance of a bump in order to ensure maximum capacity to absorb the impact. Other application areas could include process control, robotics, or any other problem in which a reference, or disturbance, is known in advance. Given the above introduction, Preview Control may appear very similar to Model Predictive Control (MPC), in that both use a finite preview of references, or disturbances, in order to arrive 12
at an ‘optimal’ control. There are, however, a number of crucial differences. Above all, it should be emphasised that Preview Control is not a Receding Horizon Control (RHC) technique, and it does not require any online optimisation. Also, because H∞ Preview Control can be embedded within the standard generalised regulator framework, it is possible to make statements regarding robust stability using standard results, such as the Small Gain Theorem (Green and Limebeer, 1995). Such robust analysis is difficult for MPCbased controllers. On the other hand, MPC is well suited to tackling nonlinear and constrained systems, and so Preview Control is most applicable for relatively unconstrained linear systems that are too fast to be controlled by MPC. Given its capacity for robustness and high performance, H∞ Preview Control should have many applications. However, despite numerous theoretical papers tackling this problem, there are almost no examples of applied work using H∞ Preview Control. This is because existing problem formulations include a number of assumptions which prevent their use in realistic applications. For example: • the assumption that the state of the plant is perfectly known; • the absence of dynamic weighting functions (Green and Limebeer, 1995) on the exogenous inputs; and • the assumption that all disturbances are previewable. It is a central objective of this thesis to bring the theory of H∞ Preview Control to the point where it is ready for practical application. Although H2 /LQG Preview Control has received considerably more attention from applied engineers, the theoretical work is spread over numerous publications, each of which tackle different variations of the problem. A single, clear and generic framework for tackling preview control problems, which also includes guidance on controller tuning, would therefore be of significant value to practising control engineers, and so this forms a second objective of this thesis. Given our aim to provide simple, practical solutions, the development in this thesis will be restricted to the discretetime case; the reason being that causal formulations of the Preview Control task inevitably involve a timedelay (associated with the lag from when the signal is previewed until the time at which it reaches the plant). To handle such a system in continuous time requires the use of infinitedimensional systems theory, and often leads to mathematically complex, infinitedimensional controllers which cannot be discretised using standard techniques. On the other hand, a pure time delay may be represented exactly by a finitedimensional discretetime system. The disadvantage of this approach is that the timedelay may lead to a system with very high order, and hence the controllers could be computationally complex to compute or to implement. Finding efficient solutions to these highdimensional problems is the core theme of this thesis. In summary:
Thesis Objective To produce a generic set of tools for solving a wide class of discretetime H2 and H∞ Preview Control problems, with particular emphasis on applicability to the control of autonomous vehicles.
13
Φ
r
K
G
+
−
e
Figure 1.1: A simple SISO openloop preview tracking problem. The transfer function Φ = Z −N is an N step delay, G is the plant to be controlled, and K is a feedforward controller. The signal r is the future value of the reference, and e is the tracking error.
1.2
A Simple Preview Problem
Figure 1.1 illustrates a simple example that may be used to highlight the benefit of preview, the broad structure of the controller, and the effect of preview on the achievable H2 and H∞ norms of the closedloop system. In this formulation, the preview action arises because of the delay line Φ. The input to the controller is r, which is the future value of the reference, and K is chosen so as to ensure that e is ‘small’, and hence the plant output follows Φr as closely as possible. Now define the error system: E(Z) = G(Z)K(Z) − Φ(Z), and assume that G(Z) is stable; in the case that G(Z) is unstable, it could be replaced by ˆ G(Z) = G(Z)(1−G(Z)Kf (Z))−1 in which Kf (Z) is a stabilising feedback controller. Providing that G(Z) has all its zeros inside the unit circle, perfect tracking (E(Z) = 0) may be achieved by simply setting K(Z) = G(Z)−1 Φ(Z). However, if G(Z) is NonMinimum Phase (NMP), then such a K(Z) is not internally stabilising and a controller must be found that recognises the limits imposed by NMP zeros on the achievable tracking performance. Such limitations are well known for nonpreview systems (i.e. N = 0 and Φ = 1), and are investigated in some detail in Middleton et al. (2004) and Mirkin and Meinsma (2004) for the preview case. For the case where G(Z) is an arbitrary stable, rational transfer function having a single real NMP zero at cz , algebraic expressions for the H2  and H∞ optimal controllers will now be found. We will first consider the H2 case, where our objective is to find an internally stabilising K(Z) such that E(Z)2 is minimised. Note that the following innerouter factorization may be performed: G(Z) = Go (Z)Gi (Z), where: Gi (Z) =
Z − cz . 1 − Zcz
˜ ˜ We can write E(Z) = (K(Z) − Φ(Z)Gi (Z −1 ))Gi (Z) in which K(Z) = K(Z)Go (Z) and: −1 Gi (Z )Gi (Z) = 1. The optimal controller is found by setting K(Z) = (Φ(Z)Gi (Z −1 ))+ G−1 o (Z), where (·)+ denotes the stable projection (Doyle et al., 1990). It follows by direct calculation
14
(Appendix A.1) that: −N −c−1 z Z
−1
K(Z) = Go (Z)  {z } IIR
and that:
+ (1 −
c−2 z )cz
N X
(Z
i−N
i=1
{z

!
/ciz )
,
}
F IR
1 p E(Z)2 = N +1 c2z − 1. cz
Since E(Z)2 → 0 as N → ∞, we conclude that in this example preview action can overcome completely the tracking limitation imposed by the NMP zero. The optimal controller contains a highorder Finite Impulse Response (FIR) part and a loworder Infinite Impulse Response (IIR) part, where the preview action comes from the FIR part. The dynamics of the FIR block is fully specified by the Right Half Plane (RHP) zero, cz , and the preview length, N . The fact that the high order part of the controller is FIR leads to an efficient hardware implementation. Now an expression for the H∞ optimal controller will be derived. Our objective is to find an internally stabilising K(Z) such that E(Z)∞ is minimised. If we write K(Z) as: K(Z) = G(Z)−1 (E(Z) + Φ(Z)),
(1.1)
and recall that G(Z)−1 has an unstable pole at cz , then the requirement for internal stability places the following interpolation constraint on E(Z): E(cz ) + Φ(cz ) = 0,
E(cz ) = −c−N z .
and so
and hence a It follows that every internally stable error system must satisfy E(Z)∞ ≥ c−N z −N H∞ optimal choice of error system is E(Z) = −cz . Substituting this into (1.1), it follows that a stabilising K achieving H∞ optimal tracking is given by: K(Z) =
N Go (Z)−1 (1 − Zcz ) (1 − c−N z Z ) . × −1 −cz Z N 1 − cz Z
Since the second term has the form of the sum of a geometric series, we have: K(Z) = − Go (Z)−1  {z } IIR
N −1 X
. (1 − Zcz )Z i−N c−i−1 z
i=0

{z
F IR
}
The optimum performance level is given by γopt = c−N z , which closely parallels the continuous time result of Middleton et al. (2004), where γopt = e−Re(¯cz )h for a continuous time SISO plant having preview length h, and a single RHP zero at c¯z . As in the H2 case, E(Z) → 0 as N → ∞, and the preview action comes from an FIR component whose dynamics are determined by N and cz only. For the case where cz = 1.05, G(Z) = (Z − cz )/(Z − 0.5) and N = 20, polezero plots of the H2  and H∞ optimal controllers are given in Figures 1.2 and 1.3 respectively. There are several notable differences between these
15
Imaginary Component
1
0.5
0
−0.5
−1 −1.5
−1
−0.5
0
0.5
1
Real Component Figure 1.2: Polezero plot of the H2 optimal K(Z) for the case where cz = 1.05, G(Z) = (Z − cz )/(Z − 0.5) and N = 20. Crosses represent the poles and circles represent the zeros. plots. In particular, in the H2 version, the zeros associated with the preview action are not at a uniform distance from the origin, and there is an additional polezero pair on the real axis. However, as N → ∞, the arrangement of zeros appears to approach that of the H∞ case, and the additional polezero pair are observed to cancel. The convergence of continuous time H2 and H∞ fixedlag smoothers1 is discussed in some detail in Mirkin (2003). An alternative approach We have shown algebraically how preview action can negate the effects of RHP zeros. However, it is perhaps still unclear why the addition of preview action brings about such an improvement. An alternative view of the preview problem is obtained by considering a standard nonpreview tracking problem (i.e. Φ = I in Figure 1.1), but allowing K to be a noncausal function of r. We wish to choose a K(Z) such that K(ejθ ) is as ‘close’ as possible to G(ejθ )−1 , for all real θ, subject to the constraint that K(Z) must be stable. By allowing K(z) to be noncausal, it may contain more zeros than poles, which results in more degrees of freedom to shape the response of K(ejθ ) and hence to improve the matching to G(ejθ )−1 . We may form a stable, noncausal approximation to G(Z)−1 by using a Taylor series expansion of the unstable pole. First write: G(Z)−1 = −Go (Z)−1 (1 − cz Z)c−1 z
1 . 1 − Zc−1 z
For all Z on the unit circle, Zc−1 z  < 1, and so the following Taylor series approximation will be convergent: 1 + (Z/cz ) + (Z/cz )2 + ..... G(Z)−1 = −Go (Z)−1 (1 − cz Z)c−1 z
∀Z = ejθ , −π ≤ θ ≤ π,
which is a noncausal approximation to G(Z)−1 . If K(Z) is chosen to be the above series truncated after N terms, then we obtain precisely the H∞ optimal N step preview controller. The underlying reasons why this leads to the H∞ optimal controller and not, for example, the 1 The
problem in Figure 1.1 is the dual of a fixedlag smoothing problem (see Section 1.4.6).
16
Imaginary Component
1
0.5
0
−0.5
−1 −1
−0.5 0 0.5 Real Component
1
Figure 1.3: Polezero plot of the H∞ optimal K(Z) for the case where cz = 1.05, G(Z) = (Z − cz )/(Z − 0.5), and N = 20. Crosses represent the poles and circles represent the zeros. H2 optimal controller, are not immediately clear. More realistic control problems It seems that preview action has dramatic benefits when designing tracking controllers for perfectly known NMP systems. However, the setup of Figure 1.1 does not recognise the more realistic scenario in which the plant model is not perfectly known. A more practical version of the preview problem is described 1.4, which includes a multiplicative uncertainty h by Figure i represented by ∆. If a controller K1 K2 is synthesised such that: T[φ η]′ →[e u]′
∞
< γ,
(1.2)
then the closedloop will be stable for all ∆ : ∆∞ < γ −1 , and the following robust performance property will be achieved: K G ˆ 1 − Φ ˆ 1 + K2 G
< γρ−1
∀∆ : ∆∞ < γ −1 ,
∞
ˆ = (1 + ρ−1 ∆)G. This follows from a result by Redheffer (1960) on the contractive where G properties of linear fractional maps (see p9). The parameter ρ is used to tradeoff robustness against nominal performance. As ρ becomes large, the problem of Figure 1.1 is recovered (by absorbing K2 into G). As ρ becomes small then we obtain a pure robust stabilisation problem, for which the addition of reference preview will provide no benefit. For intermediate values of ρ, where it is desired to achieve a degree of robust performance, it seems that preview action will be of benefit, though not to the same extent as in the nominal case. In broad terms, the benefits of preview will decrease as the plant uncertainty increases.
17
Φ φ
∆ η
ρ
r
K1
1/ρ
+
+ −
u
+
G
+
−e
K2
Figure 1.4: A preview control problem with a stable multiplicative uncertainty, ∆, that satisfies ∆∞ < γ −1 . Conclusions from the simple SISO example We have examined a simple preview problem whose solution highlights several important features that will be carried over into the more complex problems considered later in the thesis. In particular: 1. The preview action is captured in an FIR block having order N . 2. The remainder of the controller (the IIR part) has order equal to the plant order. 3. The preview length (N) required to achieve 95% (for example) of the maximum norm reduction due to preview, is affected by the position of NMP zeros. Point 3 merits further discussion. A central tenet of this thesis is that the preview length could be sufficiently large that solution of the associated DARE is computationally intractable. However, it might be argued that it is never necessary to use a large preview length because one could simply reduce the sampling rate until N becomes sufficiently small. Typically, the sampling rate is determined by the frequency at which tracking or disturbance rejection is required, and also by the frequency of any unstable poles (Houpis and Lamont, 1991). In this example, the required preview length is entirely dependent on the position of the continuous NMP zeros (Middleton et al., 2004). Therefore, a combination of low frequency zeros and higher frequency performance specifications would lead unavoidably to a large preview length (large N ). At this stage, the reader could be left with the impression that preview is of no benefit for Minimum Phase (MP) plants. This is not the case. For example, one might design a tracking controller for an unstable, MP plant by first designing a stabilising feedback controller and then designing a feedforward controller. In this case, it is possible that the closedloop formed by the feedback controller is NMP, and so the feedforward controller design will again benefit from preview. As a second example, it can be shown that the minimum achievable H2  or H∞ norm of the transfer function: "
E(Z) ρK(Z)
#
,
is reduced by preview action, even when G(Z) is MP. By adding the additional term ρK(Z) into the optimisation, we are effectively penalising the magnitude of the control action. In this case ρ is used to tradeoff between good tracking and small control signals. Examples of this form are considered in more detail in Section 4.5. It is also interesting to note that optimisations of the type considered in (1.2) cannot be tackled by any of the efficient H∞ preview control solutions currently appearing in the litera18
η
Wr
r
z
rˆ
Φ
w
G y
u K
Figure 1.5: A generalized regulator problem with both previewable and nonpreviewable disturbances. The transfer function G is the system to be controlled, K is the controller to be synthesized and Φ is an N step delay line. The disturbance w is not previewable, the control and measurement signals are u and y respectively, rˆ is the previewable disturbance, and r is the future value of rˆ. The filter Wr is used to model the expected frequency content of r.
ture (see Chapter 2 for a detailed literature review). Problems of this class form a significant motivation for the theoretical work on H∞ preview control in Chapter 6. The above solution techniques for the H∞ and H2 SISO feedforward preview problem are based on well known results, however, such an analysis does not seem to appear in the literature (although Middleton et al. (2004) does make use of NevanlinnaPick interpolation theory for the analysis of performance bounds in continuous time).
1.3
A General Previewable Disturbance Rejection Problem
We will now introduce the core problem tackled in this thesis. Figure 1.5 represents a general disturbance rejection problem with previewable and nonpreviewable disturbances. The objective is to find an internally stabilising K that minimises: T[η′
w′ ]′ →z
2,∞
.
In other words, we wish to choose a K which minimises the 2norm of z under the assumption that the disturbances are either stochastic (H2 norm) or ‘worst case’ (H∞ norm). Notice that by defining r to be the future value of the disturbance, Figure 1.5 represents a causal formulation of the preview problem. That is, we are searching for a K which is a causal operator. It will be obvious to those familiar with standard H∞ design techniques (e.g. Green and Limebeer 1995), that the above problem may be represented as a standard generalised regulator and so the optimisation can be tackled using standard results. Whilst this is indeed the case for small preview lengths, as the preview length increases the dimension of the associated Discrete Algebraic Riccati Equations (DAREs) increases and their solution rapidly becomes computationally infeasible. As an example, consider a preview system of the class described in Figure 1.5, with a randomly generated fourth order G and a 3dimensional previewable disturbance. The MATLAB software described in Appendix B.1 was used to compute the optimal controller by direct solution of the augmented DARE for preview lengths up to N=100, and the resulting computation times are reported in Figure 1.6. It appears that the computational complexity is O(N 3 ). Now assume a preview length of 10 seconds and a sampling time of 0.01s, which leads to a preview length of N = 1000. By extrapolating the fitted curve it is estimated that the time
19
70 Measured time 3 t= 5.92e−05× N 60
Computational Time (s)
50
40
30
20
10
0
0
10
20
30
40
50 60 Preview Length
70
80
90
100
Figure 1.6: Computational time required for ‘bruteforce’ computation of a single Output Feedback H∞ suboptimal controller, for a randomly generated fourth order plant with a 3dimensional reference.
20
Φ w
− +
η
Wr
r
G
u
z1
We1
e
1 I Z−1
We2
z2
z3 y1
K
y2
Wn
w
′
Figure 1.7: A preview tracking problem with integral action. The signal z = [z1′ z2′ z3′ ] is ′ the signal whose 2norm is to be minimised, and y = [y1′ y2′ ] is the measurement signal. The transfer functions We1 , We2 and Wn are appropriate shaping filters. Other notation follows that of Figure 1.5. to compute a single H∞ suboptimal controller satisfying: T[η′
w′ ]′ →z
∞
< γ,
is 16.5 hours on a 3.2 GHz Intel Pentium 4 with 1GB RAM. Searching over γ in order to find the optimal controller might require, for example, 5 computations (conservatively). Then we should remember that the control design process is iterative, and manual tuning is required through the selection of different weighting functions (Green and Limebeer, 1995). This might account for, say, 20 design iterations, resulting in a total computational time of 69 days. Clearly this suggests that alternative, efficient solutions are required.
1.4
Some Special Cases of the General Preview Problem
To motivate our study of the general previewable disturbance rejection problem, a number of special cases will now be discussed.
1.4.1
Nominal Preview Tracking with Integral Action
Figure 1.7 describes an integral action tracking problem. By choosing a K that minimises z, we ensure that z1 is ‘small’, which implies that e is ‘small’, and hence the first output of G follows a delayed version of r. Note that w enters in two places, and that Wn is potentially nonsquare. By adjusting the relative magnitudes of We1 and We2 , the strength of the integral action may be varied. Asymptotic tracking of constant references and rejection of constant disturbances is ensured by inclusion of the discrete integrator block, I/(Z − 1). This behaviour is achieved because K will be constrained to be internally stabilising, and so the integrator output is guaranteed to be bounded for all bounded system inputs. If the integral of e(t) is bounded then e(t) → 0 in steady state.
21
w Wµ µ η
r˜
Wr
+
Φ
−
z G y
u K
Figure 1.8: An uncertain preview problem. The signal r˜ is a noise corrupted version of r, and µ is a correction signal which removes the noise from the delayed version of r˜. Other notation follows that of Figure 1.5. Gp ∆N
∆M w
r
u
ρI K
y N
M
ρI
z
Φ
Figure 1.9: A robust preview tracking problem in which the nominal plant G = M −1 N is subject to the normalised coprime perturbations ∆M and ∆N .
1.4.2
Disturbance Rejection with Uncertain Preview
A particular class of uncertainty in the previewed signal may be captured using the setup in Figure 1.8, which is a special case of Figure 1.5. The controller only has access to r˜, which is a noisecorrupted previewable disturbance. The signal µ is a ‘correction’ signal such that Φ˜ r−µ gives the ‘real’ disturbance. In a further embellishment to this problem, it may be the case that the disturbance is known approximately in advance, and then precisely known at the last moment. In other words, both r˜ and µ are inputs to K. Note that Figure 1.8 is not equivalent to the more natural problem in which a noise signal is added to r at the controller input. The differences between these problems are discussed in more detail in the literature review in Chapter 2.
1.4.3
Robust Preview Tracking
Figure 1.9 depicts a robust preview tracking problem. The transfer functions M and N are the normalised left coprime factors (Green and Limebeer, 1995) of the nominal plant G, such that G = M −1 N . The coprime factor perturbations are ∆M and ∆N , and the perturbed plant 22
is Gp = (M + ∆M )−1 (N + ∆N ), where ∆M ∆N ∞ < γ −1 . The signal w is a ‘disturbance’ that results from the plant perturbations. The signals r, u and y are the reference preview, the controls, and the measurements respectively. The signal z is the signal whose 2norm is to be minimised. If we can find a controller which satisfies: ′ T ′ r w ′ → z ′
y′
′ u ′
<γ
(1.3)
∞
then the results of Limebeer et al. (1993) may be used to state that the closed loop has: 1. Robust stability, h i in that the closed loop is stable for all ∆M , ∆N ∈ H∞ that satisfy ∆M ∆N < γ −1 ; ∞
−2 2. Robust preview tracking for all ∆M , h performance, i in the sense that Tr→z ∞ ≤ γρ −1 ∆N ∈ H∞ that satisfy ∆M ∆N < γ . ∞
The optimisation required to satisfy (1.3), may be cast in the framework of Figure 1.5.
1.4.4
A Mixed Sensitivity Design
It is often possible to pose control design specifications as a set of frequency domain constraints on the various closedloop transfer functions (Doyle et al., 1990). Consider, for example, a SISO version of the problem in Figure 1.10, which has the closedloop performance specifications: S ejθ  < Wr−1 ejθ ,
T ejθ  < Wo−1 ejθ ,
R ejθ  < Wi−1 ejθ ,
GKr Ku −Φ 1 + GKu Ke GKu Ke T = 1 + GKu Ke Kr Ku R= 1 + GKu Ke
−π < θ < π
S=
−π < θ < π −π < θ < π
where Wr , Wo and Wi are stable, MP transfer functions. The bound on S represents a nominal tracking specification, and the bound on T may be used to ensure robust stability (with respect to multiplicative uncertainty) together with rejection of sensor noise (Doyle et al., 1990). The third specification relates to the closedloop gain from the reference signal to the control signal. These specifications are satisfied if and only if the following H∞ norm bounds are satisfied: Wr S∞ < 1 Wo T ∞ < 1 Wi R∞ < 1. Satisfaction of: h Wr S
i Wi R
Wo T
∞
< 1,
(1.4)
is therefore sufficient to ensure that all the performance specifications are met. If we define K = Ku [Kr Ke ], then (1.4) represents a problem of the type described by Figure 1.5.
1.4.5
Preview Preprocessing
It is easy to envisage the scenario in which one wishes to add preview action to an existing controller design. This situation is illustrated in Figure 1.11, where G represents the closedloop 23
Φ r Kr
+
u
Ku
−
y
G
− +
e
Ke
Figure 1.10: A simple preview tracking problem where e is the tracking error, and Ku , Ke and Kr are components of the controller. Other notation follows Figure 1.5. Φ
η
Wr
r
K
r˜
−
z1
Wz
+
G
z2
Figure 1.11: A preview ‘preprocessing’ design problem. The future value of the reference is r and r˜ is the preprocessed reference. Other notation follows Figure 1.5. formed by the existing tracking controller. The purpose of K is to preprocess the reference signal, in order to ensure that G tracks Φr as accurately as possible, whilst not excessively exciting z2 (typically z2 might be a weighted version of the control signal). Such a problem setup is practically useful in that it allows the control engineer to use their favoured method for the feedback design (e.g. Proportional Integral Derivative (PID), robust loopshaping, µsynthesis), whilst still incorporating some of the benefits of preview. A case study using this technique may be found in Chapter 10. Again, this problem may be formulated as a special case of Figure 1.5.
1.4.6
Fixedlag smoothing
Figure 1.12 illustrates a fixedlag smoothing problem. The objective is to use the second output of G (the measurements) to derive an estimate of a delayed version of the first output of G. If G is partitioned as: G=
"
G1 G2
Φ w
G
#
e
−
W
z
K
Figure 1.12: A fixedlag smoothing problem, where e is the estimation error, w is a disturbance, z is the signal whose norm is to be minimised, and W is a (possibly dynamic) weighting function.
24
then the problem may be written as: min W (KG2 − ΦG1 ) , K
where · denotes either the 2norm or the infinity norm. Since G = G′  for any transfer function G, then: arg min W (KG2 − ΦG1 ) = arg min (G′2 K ′ − G′1 Φ)W ′  , K
K
and the RHS of this expression represents a problem of the type in Figure 1.5.
1.4.7
Conclusions
The general disturbance rejection problem of Figure 1.5 has been motivated by a number of practically relevant special cases. In particular, it should be noted that the inclusion of the signal w and the accommodation of a general Output Feedback control structure is crucial if these special cases are to be captured.
25
1.5
Thesis Outline
A review of Preview Control theory and applications is conducted in Chapter 2, and gaps in the current literature are identified. A detailed mathematical formulation of the general preview problem in Figure 1.5 is given in Chapter 3. Chapter 4 presents a complete solution to the H2 version of this problem, including both an efficient algorithm for synthesising the control and also an efficient reducedorder controller representation. In addition, some new results are found regarding the achievable norm reduction due to preview. Some further H2 results are collected in Chapter 5, in particular the link between receding horizon Linear Quadratic Tracking and infinite horizon H2 Preview Control is clarified. The same general preview problem is solved for the H∞ case in Chapter 6, where efficient synthesis and implementation algorithms are also derived. The outline of an alternative solution method is included in Chapter 7. Although this second method only leads to sufficient conditions, the form of the solution suggests possible links between H∞ preview control and Receding Horizon minmax control problems. A generic framework for Preview Control of autonomous vehicles is presented in Chapter 9, and this is followed by a case study in which the developed algorithms are applied to Preview Control of a nonlinear bicycle model. A further case study is reported in Chapter 10, where a H2 Preview Controller was implemented in hardware on a Power Steering test rig as part of a project for a Formula 1 racing team. Conclusions are drawn in Chapter 11. Appendices contain technical details of some of the mathematical proofs, and also an introduction to a MATLAB Preview Control Toolbox that was developed during the course of this project. Some of the research presented in this thesis also appears in the following publications: 1. Andrew Hazell and David J. N. Limebeer. An efficient algorithm for discretetime H∞ preview control. Accepted for publication in Automatica, 2008. 2. Andrew Hazell and David J. N. Limebeer. A design framework for discretetime H2 preview control. Submitted to Trans. ASME, Journal of Dynamic Systems, Measurement and Control, 2008. 3. Andrew Hazell and David J. N. Limebeer. A framework for preview control of autonomous vehicles. In preparation.
26
Chapter 2
Literature Review Chapter Objective To review the current literature on Preview Control theory and applications, and hence identify the requirements for further research. Having shown that the problem in Section 1.3 is well motivated, the purpose of this section is to show that such a problem has not previously been tackled, and also to give some additional background on applications of Preview Control. In particular, the discussion of Preview Control of autonomous vehicles provides useful background to the vehicle control framework presented in Chapter 9.
2.1
H2 Preview Theory
One of the first papers to recognise the importance of preview control is Sheridan (1966), where three preview control models are described in the context of modelling human drivers. In the third of these models openloop optimal preview controls are found using dynamic programming. In Bender (1968), Wiener filter theory is used to design an active suspension with road preview. Bender’s solution requires the transfer function from the previewed path to the vehicle’s acceleration to be unstable. However, such a solution is not implementable. Much of the subsequent work on Linear Quadratic (LQ) preview tracking has its origins in the 1973 PhD thesis of M. Tomizuka, in which the preview control task is cast in a discretetime LQ regulator framework by augmenting the plant dynamics with a delay line model. In this formulation, the number of states grows in proportion to the preview length, and so a direct solution of the corresponding Riccati equations becomes computationally infeasible for long preview lengths. Tomizuka presented an efficient recursive method for solving these large equations. A continuoustime version of a LQ preview control problem is studied in Tomizuka (1975), while a continuoustime preview control problem is given a stochastic interpretation in Lindquist (1968). In the context of the early literature, Tomizuka and Whitney (1975) provide a good overview of an outputfeedback previewtracking problem with reference noise. Over the subsequent 30 years, a variety of approaches to the H2 or LQG preview control problems appeared in the literature. Discretetime statespace augmentation procedures are described in Tomizuka (1973); Roh and Park (1999); Prokop and Sharp (1995) and Louam et al. (1992). Continuoustime calculus of variations derivations are developed in Vahidi and Eskandarian (2002) and Hac (1992). Polynomial matrix approaches are used in a discretetime setting in Mosca and Zappa (1989); Mosca and Casavola (1995); Grimble (2002). In Zattoni
27
(2006) a spectral factorisation is used, in combination with a stable/unstable decomposition that is reminiscent of the approach used in Section 1.2. In the continuoustime work of Moelja and Meinsma (2006), it is noted that the H2 optimal controller is the controller that minimises the L2 norm of z in the presence of a delta function disturbance. Therefore, assuming that the previewable signal is indeed a delta function, it is possible to view the problem as an LQR problem with a state jump at t = h, where h is the preview length. The problem may then be solved as two independent LQR problems: a nonstandard finite horizon problem for 0 < t < h and a standard infinite horizon problem for t > h. In Kojima (2004), the split optimisation approach is also used, however, the finite horizon part is solved using orthogonal projection arguments, in contrast to Moelja and Meinsma (2006) where the Pontryagin minimum principle is used. A similar split optimisation method was also used in Marro and Zattoni (2005) to derive a H2 optimal feedforward preview controller. Schemes for computing only the feedforward part of the controller are given in Zattoni (2006), Marro and Zattoni (2005) and Tomizuka and Fung (1980), although the latter does not produce the optimal solution due to an incorrect assumption about the structure of the feedforward controller. All 3 assume a white noise disturbance model. It is worth noting that the work presented in Moelja and Meinsma (2006) has the unique advantage of tackling the case where each element in the previewable disturbace vector has a different preview length. A comparison of key papers is given in Table 2.1, which highlights that none of the available solutions fully capture the problem in Figure 1.5. Uncertain preview The first 3 papers in Table 2.1 present control schemes in which the controller only has access to a noise corrupted version of the previewed signal. The problems in these papers are special cases of the general uncertain preview problem illustrated in Figure 2.1 (note that this problem is not equivalent to Figure 1.8). In Tomizuka’s scheme, it is necessary to compute the solution to the full augmented estimation DARE, and the resulting controller is of high order. In this case, the preview provides benefit by reducing cost associated with the Full Information control, and also reducing the estimation cost. In contrast, the controller described by Hac is of low order. However, this order reduction is achieved because the observer does not use the lag to generate an improved estimate of the previewable signal, preferring instead to use the noise corrupted version directly. The resulting closedloop is therefore not H2 optimal. The scheme used by Roh and Park is both of reduced order and produces a H2 optimal closed loop. The controller order reduction arises from the use of a white noise model for the previewable disturbance, together with a disturbance measurement error which is assumed to be additive white noise. These two assumptions mean that the estimate for the previewable disturbance is simply a scaled version of the measurement. In order to solve the problem of noisy preview signals, it is tempting to design an estimator for the state of Wr and obtain the estimates for the state of Φ by using timedelayed versions of the estimated output of Wr . Separation arguments could then be invoked to obtain the full Output Feedback controller. This scheme has the attractive property that the observer has the same order as Wr plus G, with the estimates of Φ being obtained using a simple shift register operation. Unfortunately, such an observer is not optimal because the estimate of the state of Φ should be updated based on the latest estimate of r. Essentially, the problem of estimating the states of Φ is a type of fixedlag smoothing problem, and consequently the corresponding observer is of the same order as the augmented plant. Low order implementations of fixedlag
28
Reference
29
Technique
Output Feedback?
Wr ?
Tomizuka and Whitney (1975)
Discrete statespace augmentation
Yes
Yes
Cost function analysis? No
Roh and Park (1999)
Discrete statespace augmentation
Yes
No
Yes
Hac (1992)
Discrete statespace augmentation Continuoustime, spectral factorisation Continuoustime, split optimisation horizon Continuoustime, split optimisation horizon
Yes
No
No
No
No
No
Feedforward controller only.
No
No
Yes
Unknown disturbances not included.
No
No
Yes
Unknown disturbances not included.
Zattoni (2006)
Moelja and Meinsma (2006)
Kojima (2004)
Restrictions
Additional Features
Applicable to tracking problems only. Restrictions on the form of the disturbance and the form of the controlled output. Measurements are assumed to be a white noise corrupted version of the controlled output. Also restrictions on the form of the cost function. No unknown disturbances (except for measurement noise). Cost associated with output feedback control is not considered. Closedloop is not H2 optimal. Unknown disturbances not included.
Noisecorrupted signal.
preview
Noisecorrupted signal.
preview
Noisecorrupted signal.
preview
Table 2.1: Comparison of key papers on H2 preview control.
Solution accommodates multiple preview lengths.
η
r
Wr
z Φ G
w
u Wµ
µ
y
K
Figure 2.1: A problem of disturbance rejection with preview, in which the controller only has access to a noise corrupted version of the preview signal, r. The signal µ is the measurement noise, and Wµ is the associated shaping filter. Other notation follows that of Figure 1.5. smoothers are given in Anderson and Moore (1979). However, such implementations are not possible here because we need an estimate for all of the states of Φ, not just the output of Φ. In summary, unless the disturbance and the noise are white noise processes, tackling uncertain preview signals appears to lead unavoidably to high order or suboptimal controllers.
2.2 2.2.1
H2 Preview Applications Guidance of Autonomous Vehicles
In guidance problems for autonomous vehicles, the reference trajectory is often known for some time into the future. Such systems may therefore benefit from the use of preview control. A number of papers tackle only longitudinal problems (height, forward position and pitch angle), and we shall discuss these first. A Full Information longitudinal missile guidance problem is posed and solved in Farooq and Limebeer (2005) using a Linear Quadratic Regulator (LQR) framework and statespace augmentation techniques similar to those first used in Tomizuka (1973). The missile uses a preview controller to track a precomputed optimal trajectory, and then switches to a ‘terminal guidance’ strategy (Manchester and Savkin, 2002) once the missile is within a predetermined distance from the target. A tracking error of just 20m is reported for a preview length of 1.6km (600 preview points) and a nominal speed of 272 m/s. This work is extended to the output feedback case in Farooq et al. (2006). Another Full Information longitudinal guidance problem is considered in Li et al. (2001), where the authors design a terrain following controller for a cruise missile. An augmented LQR formulation is employed, and the addition of preview action is found to simultaneously reduce the tracking error (largely though elimination of lag), and also to dramatically reduce the required control magnitude. Tracking of longitudinal trajectories is also considered in Paulino et al. (2006b) and Paulino et al. (2006a) for an underwater autonomous vehicle and a helicopter respectively. Here the nonlinear vehicle dynamics are described in a coordinate system attached to the reference path, and full information is assumed. The reference is constrained to be composed of segments of trimming trajectories, and the previewed signal is a disturbance associated with the transition between trajectory segments. The error dynamics are linearised to produce a Linear Parameter Varying (LPV) vehicle model, which is then augmented with the preview dynamics. The resulting synthesis problem is posed as a Linear Matrix Inequality (LMI), and an efficient solution is found in much the same vein as efficient solutions to the H2 DARE. Although these two papers tackle only the longitudinal problem, the real power of this technique lies in its applicability to a full 3Dimensional (3D) tracking problem. 30
On first inspection, it may seem that the lateral tracking problem (involving lateral position, yaw angle and roll angle), is no harder than the longitudinal problem. After all, is it not simply a case of applying the same theory to another linear model? This is true if we consider only small perturbations from the trim state. However, such an assumption restricts the vehicle to only a small range of headings which are close to the trim heading; clearly this is undesirable. Essentially, the difficulties arise because the linear transfer function, from changes in the control signal to changes in the vehicle’s horizontal position, is dependent on the yaw angle. For example, if the vehicle rotates by 180 degrees, the signs of the transfer functions are reversed. Usually this issue would be handled by describing the vehicle’s motion in bodyfixed coordinates; however, this results in the segment of previewed trajectory becoming a function of the vehicle position and orientation (because the trajectory is now expressed in bodyfixed coordinates). The preview dynamics would thus be considerably more complicated than the simple delay line which is used in the preview control literature, and we would lose all the structures that enable the efficient computation of H2  or H∞ optimal controllers. The lateral tracking problem is first tackled in Sharp and Valtetsiotis (2001) in the context of steering control of a road vehicle moving at a constant speed along a path. The control is designed using a linear model described in an inertial reference frame, however, as the vehicle moves, the reference frame is updated so that it is aligned to, and coincides with, the vehicle. This process is justified by the intuitive notion that a human driver controls a vehicle using a ‘local’ reference frame that is aligned to the vehicle. The algorithm is further supported by numerical studies that find the control to be invariant to both changes in position of the reference frame, and also small rotations. Later examples of this technique are also found in Sharp (2007a,b). In these papers, increasing the preview length is again found to lead to improvements in tracking and reductions in control magnitude. A similar coordinate transformation method is employed in Hazawa et al. (2004), where the authors design a tracking controller for a model scale helicopter operating with constant path speed in a fixed horizontal plane. The error based modelling used in Paulino et al. (2006a,b) is extended in Cunha et al. (2006) to the 3D case for an Unmanned Aerial Vehicle (UAV) path tracking problem. Their solution achieved notable reductions in the lateral tracking error and the heading error.
2.2.2
Driver Modelling
It is evident that human drivers make use of road preview, and so Optimal Preview Control may provide a useful and computationally cheap method for modelling driver behaviour. Such an approach is proposed in Sharp et al. (2000), where a standard Linear Quadratic (LQ) Preview Controller is modified to include various saturation functions on both its inputs and outputs, with a view to ensuring the vehicle remains within its operating limits (as defined by maximum steering angles and tyre force saturation). It is assumed that the forward speed is constant, and so only the steering input and the lateral path errors need be considered. Despite the highly constrained nature of the plant, it is found that the modified preview controller displays good performance, and robust stability in the face of realistic parameter variations. Car steering control is also examined in Sharp (2005), with the objective of analysing car handling qualities. This is largely accomplished by examining the structure and value of the Full Information controller gain matrices as a function of a number of model parameters, such as the position of the centre of gravity, the yaw inertia, and the tyre cornering stiffness. It is proposed that the preview length required to achieve ‘full preview’ is an important car handling measure, where full preview is defined to be the preview length at which the control signal
31
‘closely’ approximates the control obtained from an infinite preview controller. In this work, full preview is deemed to have been achieved when the absolute sum of the entries of the Full Information gain matrix reaches 98% of the sum of the entries of a Full Information gain matrix that was computed for a ‘very large’ preview length. Comparisons are made between a large saloon car and a sports car, with the latter requiring approximately half the preview length. It is claimed that this is well aligned with experimental findings. In addition, it is also found that the preview controller predicts typical driver behaviour, such as the oscillatory steering input often used by rally drivers in the approach to a monotonic turn. In Cole et al. (2006), three candidate driver modelling techniques are compared: Infinite Horizon LQ Preview Control, Receding Horizon LQ Preview Control, and unconstrained Predictive Control (as formulated by Maciejowski 2002). Different combinations of control horizons and preview horizons are examined, and the structure and value of the controller gains are analysed in each case. It is found that the controllers all coincide when the control and the preview horizons are both large. No conclusions are drawn regarding which technique may most accurately reflect the behaviour of a human driver.
2.2.3
Other Applications
The design of active suspensions for road vehicles has provided another significant application area for Preview Control. In fact, it was this topic that prompted some of the earliest work on Preview Control (Tomizuka, 1976; Bender, 1968). By sensing variations in the transverse road profile ahead of the vehicle, it is possible to use active suspension components to improve vibration isolation. There are a large number of papers on this topic dating from the late 1980s to the early 1990s, and a useful overview of this literature is provided in Gordon and Sharp (1998), which also compares several different preview based techniques and discusses some of the practical limitations on the design of active suspensions. In particular, it is noted that fully active suspensions consume too much energy to be economically viable, and a semiactive suspension system is proposed in which only the level of damping may be dynamically altered. The authors conclude that a nonlinear preview control variant combined with a semiactive suspension appears to provide the best combination of performance and practicality. Interest in this area appears to have declined in the last decade, possibly due to the practical difficulties and cost associated with obtaining reliable preview information. An interesting twist to the active suspension idea is provided in Marzbanrad et al. (2004), which considers the design of an active earthquake suppression system for a building, under the assumption that remote measurements of ground vibrations are available. It is found that a preview length of 0.12s results in a 30% reduction in the peak acceleration experienced by the building, as compared to an active system without preview.
2.3
H∞ Preview Theory
In recent times there has been an increasing interest in H∞ preview control as well as the dual problem of H∞ fixedlag smoothing. In broad terms the approaches to these problems mirror the approaches adopted to solve the standard H∞ control problem. A variety of preview problems are studied in a game theoretic framework in: Gershon et al. (2004a,b); Cohen and Shaked (1997, 1998); Tadmor and Mirkin (2005b,a). Gershon et al. (2004b) considers a continuoustime finitehorizon tracking problem in which there are stochastic parameter uncertainties. Both the state and outputfeedback cases are considered for three information patterns according as the reference is known perfectly, known up to the present time,
32
or previewed for a fixed interval ahead. Each problem is recast and solved as a minimax problem in a game theory framework. Cohen and Shaked (1997), and Cohen and Shaked (1998) consider finitehorizon linear discretetime tracking problems with preview; the aforementioned three reference information patterns are again considered. These tracking problems are formulated as games and conditions for the existence of a saddle point are derived, and the corresponding controllers evaluated. Gershon et al. (2004a) considers discretetime finite and infinitehorizon preview tracking problems with three different reference information patterns in the presence of zeromean noisy parameter uncertainties. It should be noted that the problem considered in this thesis is distinct from the problems presented in Gershon et al. (2004a,b) and Cohen and Shaked (1997, 1998), because in these papers r affects only the saddlepoint strategy and the value of the game, but not the conditions for the existence of a saddle point. In other words, r is not a ‘player’ in the game. Continuoustime H∞ preview and fixedlag smoothing problems are considered in Tadmor and Mirkin (2005a). Necessary and sufficient conditions for solubility are derived using game theoretic arguments. The solubility conditions are given in terms of the properties of a pair of H2 and H∞ Riccati equations with dimension that of the delayfree plant. Complimentary discretetime results are found in Tadmor and Mirkin (2005b). Example 2 in this paper is of particular interest, because it highlights a pitfall associated with any solution technique that recursively generates the solution to the DARE for the (N + 1)preview step problem from the DARE for the N step problem. Indeed, it is possible that such methods (e.g. Bolzern et al. 2004) can break down on a point set of γ values which might be dense. Perhaps more importantly, associated computational algorithms potentially suffer from numerical problems as γ approaches a value in the excluded point set of performance values. The deep connections between differential games, indefinite factorization theory and indefinite innerproduct spaces are well known. Preview problems have also been studied in these settings; Mirkin (2003), Colaneri et al. (1998) and Colaneri and Ferrante (2002) all make use of a Jspectral factorisation theory. While the continuoustime H∞ fixedlag smoothing problem is apparently infinite dimensional, it is shown in Mirkin (2003) that this problem can be solved using a single Riccati equation with dimension equal to that required in the analogous delayfree filtering problem — the delay causes no degree inflation in the solution equation. The resulting smoother consists of a finite dimensional part reminiscent of an H∞ filter and an infinite dimensional FIR part corresponding to the smoothing lag. Fixedlag H∞ estimation problems in discrete time are considered in Colaneri et al. (1998) and Colaneri and Ferrante (2002). The main result in these papers, which study filtering, prediction and smoothing problems in a Jspectral factorization framework, is that the filters, predictors and smoothers can be constructed in terms of the same filtering Riccati equation. Unfortunately, as explored in Colaneri and Ferrante (2004), there is a finite set of γ for which the fixed lag smoothing problem is solvable (for some sufficiently large smoothing lag) and yet a stabilising solution to this filtering Riccati equation does not exist. A Riccati decomposition process is studied in Bolzern et al. (2004) where the discretetime H∞ fixedlag smoothing problem is again the focus. The solution is achieved by considering a transformed problem for which a decomposition, similar to that used in H2 Preview Control, is possible. Whilst the authors only provide sufficient conditions for filter synthesis, they argue that this is not restrictive since it is only a zero measure set of γ values which are excluded. However, it is noted in Tadmor and Mirkin (2005b) that this set may be arbitrarily dense. The difficulties with this approach are further compounded by errors in equations (35) and (36) and the resulting invalidation of Lemma 3.5, whose purpose is to check the nonnegativity of the solution to the augmented Riccati equation. It turns out to be possible to generalise these to 33
results such that restrictions on the plant matrices are removed, Lemma 3.5 is fixed, and the signal w is included. However, the resulting conditions still suffer from a lack of necessity. Full Information preview control with robustness to polytopic uncertainties is examined in Takaba (2000) using LMI optimisation over an augmented search space. A tutorial introduction to H∞ Preview Control using discretetime statespace augmentation is given in Takaba (2003). A continuoustime H∞ control problem with fixed disturbance preview is studied in Katoh (2004) in a Full Information statespace framework. Using the bilateral Laplace transform as the enabling tool, it is demonstrated that such a problem can be solved using standard finitedimensional arguments based on a single Riccati equation. It is also shown that the achievable H∞ criterion can ‘saturate’ at a finite preview length and further increases in preview length are ineffective; tools are provided for computing the minimum achievable H∞ norm. A similar problem is considered in Kojima and Ishijima (2003, 2006) for the Full Information case, and in Kojima and Ishijima (2004) for the Output Feedback case. Here the solution is achieved by considering an auxiliary system for which a finite dimensional solution is possible. The solution to the original infinitedimensional disturbance preview problem is then recovered from the solution to the finite dimensional auxiliary problem. The equations which transform the solution to the auxiliary problem into the solution of the preview problem bear a high degree of similarity to those found in the discretetime problems analysed in Bolzern et al. (2004). Kojima and Ishijima (2003) provide a necessary condition given in terms of the spectral properties of the Hamiltonian matrix associated with the standard gametheory Riccati equation associated with Full Information control. The Output Feedback case is considered in Kojima and Ishijima (2004), where necessary and sufficient conditions for a solution are given in terms of a Full Information operator Riccati equation, a finitedimensional filtering equation, and a spectral radius condition. These results are generalized in Kojima and Ishijima (2006) to the case of multiple control and multiple disturbance delays. The problem setup is sufficiently general as to capture a Full Information, unweighted version of Figure 1.5. The finite horizon case is considered and sufficient conditions for a solution are found. The H∞ fixedlag smoothing problem for linear discrete timeinvariant and timevarying problems is studied in Zhang et al. (2001, 2005) using Kreinspace projection techniques. The smoother is specified in terms of the solutions to two Riccati difference equations having the same dimension as the plant. By exploiting a duality between H∞ Full Information control and H2 smoothing of an associated stochastic system, Zhang et al. (2007) solves a discretetime H∞ Full Information control problem with multiple control and input delays. A controller is specified in terms of the solutions to two Riccati equations of the same order as the plant (with the delays ignored). The minimum achievable H∞ norm for the fixedlag smoothing problem is considered in Mirkin and Tadmor (2004), and Mirkin and Meinsma (2004), where conditions are provided under which the H∞ performance saturates at a finite preview length. Performance limitations are further explored in Middleton et al. (2004), where Poissonintegral like expressions for tracking sensitivity are obtained for a SISO feedforward problem. NevalinnaPick interpolation theory is then used to derive bounds for the optimal H∞ performance as a function of the values of the RHP zeros.
2.4
Conclusions and Gaps in the Literature
Despite a large number of publications on the subject of Preview Control, there are a number of gaps which are apparent from the above discussion. Perhaps most obvious is the complete lack of applied work on H∞ Preview Control, which possibly suggests that the present tools do not fulfil the requirements imposed by realistic control problems. For example, for discretetime 34
problems, the additional signal w is only tackled by Zhang et al. (2007), and only by Kojima and Ishijima (2006) for the continuoustime case. Only Kojima and Ishijima (2004) tackle the Output Feedback case, and the author is not aware of any results which can accommodate a dynamic weighting function Wr . Such weighting functions are crucial for solving practical H∞ synthesis problems (Green and Limebeer, 1995). The inclusion of the signal w together with the extension to Output Feedback is well motivated by the special cases in Section 1.4. With the exception of Bolzern et al. (2004) (which only provides sufficient conditions, as pointed out above), all attempts at efficiently solving the H∞ preview problem appear to rely on derivations from first principles, rather than statespace augmentation and efficient solution of the resulting Riccati equations. This approach has complicated the extension to the Output Feedback case, which one might have expected to be a simple matter. It therefore seems that there is justification in exploring efficient algorithms which have their roots in standard discretetime H∞ theory, such as that described in Green and Limebeer (1995). In contrast, H2 theory has been used in a wide array of application areas, and so our motivation for studying H2 Preview Control is a little different. Because the theory is not particularly mathematically complex, one finds that most papers on LQG/H2 Preview Control contain a rederivation of the core theory, with modifications to adapt it to the particular application under consideration. Such an approach is repetitious, tedious, error prone and prohibitive to the industrial control engineer. There is, therefore, a motivation to present the solution to a single preview problem that is sufficiently general to capture a wide array of conceivable preview problems and hence provide a useful reference for applied control engineers. It is also interesting to note that the H2 preview problem has not yet been tackled from the point of view of the generalised regulator framework and the associated H2 statespace machinery. Although mathematically equivalent to the LQG formulation, the use of a H2 statespace framework facilitates the formulation and understanding of more sophisticated preview problems such as that in Figure 1.7. Admittedly, in tackling a problem of the form of Figure 1.5, it will not be possible to accommodate uncertain preview problems of the form in Figure 2.1. However, the fact such problems appear to lead unavoidably to highorder controller designs is incompatible with our desire to study efficient, implementable controllers. In summary: the H2 and H∞ versions of the problem in Figure 1.5 are wellmotivated, and efficient solutions do not appear in the current literature.
35
Chapter 3
Problem formulation The optimal preview controller is defined to be the K that minimises Tv→z 2,∞ , where v = h i′ η ′ w′ , and z, η and w are defined in Figure 1.5. In other words, we wish to choose K, which minimises kFl (P, K)k2,∞ , where P is the mapping:
z
" P11 y = P21 r
P12 P22
η w . u
#
The signals satisfy: w(k) ∈ Rlw , r(k) ∈ Rlr , η(k) ∈ Rlr , v(k) ∈ Rl (i.e. l = lr + lw ), u(k) ∈ Rm , y(k) ∈ Rqg and z(k) ∈ Rp . Also define q = qg + lr . The N step delay line, Φ, has the realisation: Φ(Z) = Z
−N
s
Ilr =
"
Ap
Bp
Cp
0lr ×lr
#
with Ap , Bp and Cp defined by: 0lr . .. Ap = 0lr 0lr
Ilr .. . 0lr
...
0lr
...
0lr .. . Ilr
...
0lr
and # 0(N −1)lr ×lr , Bp = Ilr "
Cp =
h
Ilr
0lr ×(N −1)lr
i
where N represents the number of preview steps and Ap ∈ RN lr ×N lr . Without loss of generality the square transfer function matrix Wr is assumed to be outer (Lin et al., 1996), with realisation: s
Wr =
"
Ar
Br
Cr
Dr
#
where Ar ∈ Rnr ×nr . Also without loss of generality (Green and Limebeer, 1995), the plant is assumed to have the realisation:
36
Ag
s G = C1g
C2g
B1gr
B1gw
B2g
D11gr
D11gw
D21gr
D21gw
D12 0
where Ag ∈ Rng ×ng .
" # rˆ has realisation: The transfer function from η to r
Ap Bd 0 0 = C p Dr 0
Ad C d1 Cd2
Bp Dr Br , 0 Dr
Bp Cr Ar 0 Cr
and so the generalised plant P has realisation: ng
↔ ng l s
P =
N lr +nr l pl ql lr l n
s
=
nl pl ql
Ag 0 C1g C2g 0
B1gr Cd1 Ad
0 Bd
B1gw 0
D11gr Cd1
0
D11gw
D21gr Cd1 Cd2
0 Dr
D21gw 0
↔
l
↔
A
B1
B2
C1 C2
D11 D21
w ↔
r ↔
↔
↔
l
l
N lr +nr
m
. D12 0
m
↔ B2g 0 D12 0 0
(3.1)
(3.2)
The Amatrix in (3.2) satisfies A ∈ Rn×n with n = ng + N lr + nr . A Full Information version of (3.2) will be defined by (Green and Limebeer, 1995): n
nl s
PF I =
pl nl ll
l
↔ A
↔ B1
C1 I 0
D11 0
37
I
m
↔ B2 . D12 0 0
Chapter 4
Solution of the General H2 Preview Problem Chapter Objective To derive an efficient algorithm for synthesising and implementing the H2 optimal controller for the problem described in Chapter 3.
4.1
Introduction
The problem formulation from the previous chapter will be used as a basis for the results presented here. Contributions made by this chapter include: 1. a first complete solution to the preview problem in Figure 1.5; 2. an efficient method for finding the H2 norm of the closedloop system; 3. a method for evaluating the norm reduction due to preview as N → ∞; 4. a loworder output feedback controller implementation; 5. a loworder feedforward controller implementation. Points 2 and 3 are useful in that they enable one to answer the following questions: (a) What is the preview length required to achieve a given performance specification? (b) What is the maximum possible reduction in the closedloop H2 norm through preview? (c) If a large amount of preview is available, how much should be used? It may seem that point 2 is sufficient to answer question (c), as one could simply keep iterating until the cost has stopped reducing. However, this approach is flawed because it is possible that as N increases the H2 norm may first reduce, then remain constant, and then continue reducing. Such behaviour is often observed in plants which contain delays1 . It is therefore necessary to compute the maximum achievable cost reduction due to preview. A partial analysis of the LQG cost reduction has previously appeared in Roh and Park (1999), but the maximum cost reduction is not considered, nor is there a treatment of Output Feedback or input weighting. In 1 For example, consider a tracking problem where the plant is a pure time delay and r is assumed to be white noise. Norm reduction due to preview can only be achieved once the preview length is greater than the plant delay.
38
fact, computation of the maximum possible reduction does not seem to be addressed anywhere in the discretetime preview literature. This chapter is structured as follows: after a summary of the general theory, the Full Information Preview Control problem is solved in Section 4.2. The results are mainly concerned with efficient algorithms for solving the H2 Full Information Riccati equation, and the evaluation of the Full Information feedback gain matrix. The solution of the Output Feedback preview problem is given in Section 4.3. The Output Feedback controller involves a combination of a stateestimator, and the solution to the Full Information problem. An efficient controller implementation is also given in this section. The effect of preview in reducing the H2 norm of the closedloop system is analysed in Section 4.5.
4.2 4.2.1
Full Information Solution Standard Theory
We begin with a brief summary of the discretetime, linear timeinvariant Full Information control problem (Green and Limebeer, 1995), which has the plant description:
nl s
PF I =
pl nl ll
↔
n
↔
l
↔
A
B1
B2
C1 I 0
D11 0 I
D12 0 0
m
,
and which satisfies the following standard assumptions: (A1) (A, B2 ) is stabilisable , ′ (A2) D12 D12 > 0, " A − ejθ I (A3) rank C1
B2 D12
#
=n+m
∀ θ ∈ (−π, π].
We would like to find the internally stabilising controller KF I that minimises Fl (PF I , KF I )2 . First define: ′ ¯ = D12 R D12 + B2′ XB2
(4.1)
¯ −1 (B ′ XA + D′ C1 ) F2 = −R 2 12
(4.2)
Ac = A + B2 F2 .
(4.3)
In Zhou et al. (1996) it is shown that if (A1)(A3) are satisfied then there exists a solution X to the Discrete Algebraic Riccati Equation (DARE):
¯ 2 + C ′ C1 X = A′ XA − F2′ RF 1
(4.4)
X≥0
(4.5)
Ac is asymptotically stable.
(4.6)
such that:
39
A matrix X satisfying (4.4) and (4.6) is said to be stabilising. The internally stabilising, Full Information H2 optimal controller is then given by: h KF I = F2
F0
i
(4.7)
with ¯ −1 (B ′ XB1 + D′ D11 ). F0 = −R 2 12 The resulting closedloop norm is given by: 2
Fl (PF I , KF I )2
= Tr {(D11 + D12 F0 )′ (D11 + D12 F0 ) + (B1 + B2 F0 )′ X(B1 + B2 F0 )} .
It should be noted that (A1) and (A3) are necessary and sufficient conditions for existence of a H2 optimal controller, whereas assumption (A2) is made for convenience, and may be removed using the techniques described in Stoorvogel (1992).
4.2.2
Efficient Computation of the Full Information controller
In this section we will find an efficient solution to the DARE (4.4) for the plant described in Chapter 3. First we decompose (4.4) into an ng dimensional DARE, an N lr + nr dimensional discrete Lyapunov equation, and an (ng × N lr + nr )dimensional Stein equation. We then give an efficient solution to the Stein equation, and show how this leads to an efficient method for computing the Full Information controller. First note that assumptions (A1)(A3) are satisfied if and only if G satisfies the assumptions: (A1g) (Ag , B2g ) is stabilisable ′ D12 > 0 (A2g) D12 " Ag − ejθ I (A3g) rank C1g
B2g D12
#
=n+m
∀ θ ∈ (−π, π].
Lemma 4.1 (Decomposition of DARE). Let X be the unique stabilising and nonnegative solution to the DARE (4.4), and partition X as: ng
X=
ng l N lr +nr l
" ↔ Xgg ′ Xgd
N lr +nr
↔ #
Xgd Xdd
,
then Xgg is the unique stabilising and nonnegative solution to the DARE: ′ ¯ ′ Xgg = A′g Xgg Ag − F2g RF2g + C1g C1g ,
(4.8)
where ¯ −1 B ′ Xgg Ag + D′ C1g F2g = −R 2g 12 ¯ may be computed from in which R ′ ′ ¯ = B2g R Xgg B2g + D12 D12 .
40
(4.9)
(4.10)
Further, Xgd and Xdd are the unique solutions to Xgd = SCd1 + A′cg Xgd Ad
(4.11)
Xdd = A′d Xdd Ad + Q,
(4.12)
with: ′ ′ ′ ′ ′ B2g Xgg B1gr + F2g D12 D11gr + C1g D11gr S = A′g Xgg B1gr + F2g
(4.13)
Acg = Ag + B2g F2g ¯ −1
F2d = −R
(4.14)
′ B2g Xgd Ad
+
′ B2g Xgg B1gr Cd1
+
′ D12 D11gr Cd1
(4.15)
′ ′ ′ ′ ′ Q = Cd1 B1gr Xgg B1gr Cd1 + A′d Xgd B1gr Cd1 + Cd1 B1gr Xgd Ad
−
′ ¯ F2d RF2d
+
(4.16)
′ ′ Cd1 D11gr D11gr Cd1 .
(4.17)
Proof. First partition (4.2) conformably with X: ¯ −1
F2 = −R
h ′ B2g
" i X gg 0 ′ Xgd
Xgd Xdd
h ¯ −1 B ′ Xgg Ag + D′ C1g = −R 2g 12 h i = F2g F2d ,
#"
Ag 0
# h B1gr Cd1 ′ + D12 C1g Ad
D11gr Cd1
i
!
′ ′ ′ B2g Xgd Ad + B2g Xgg B1gr Cd1 + D12 D11gr Cd1
i
(4.18)
and hence F2g and F2d form partitions of F2 . Now partition (4.4) to obtain:
"
Xgg ′ Xgd
# " Xgd A′g = ′ ′ Cd1 B1gr Xdd
# #" Xgg Xgd Ag B1gr Cd1 ′ Xgd 0 Ad Xdd # # " " h h i ′ ′ F2g C 1g ¯ F2g F2d + − R C1g ′ ′ ′ F2d Cd1 D11gr
0 A′d
#"
i D11gr Cd1 .
(4.19)
Equation (4.10) is easily checked, and so equations (4.8), (4.11) and (4.12) follow immediately by considering, respectively, the top left, the top right, and the bottom right partitions of (4.19). Notice that uniqueness of the solution to (4.11) is guaranteed by the fact that σµ−1 6= 1 for any σ ∈ λ(Ad ), µ ∈ λ(Acg ) (Lancaster and Rodman, 1995), which is ensured by stability of both Acg and Ad . Now note that: "
Acg Ac = 0
⋆ Ad
#
in which Ad is stable. It now follows from assumption (A1) that Xgg is stabilising if and only if X is stabilising. ¯ are not functions of Xgd or Xdd , and so (4.8) may be solved indeNote that F2g and R pendently of (4.11) and (4.12). Since (4.11) depends on the solution of (4.8), it can be solved next. Finally (4.12) depends on both (4.8) and (4.11) and so is necessarily solved last. Also note that the DARE is of order ng and so it may be solved using standard algorithms such as that described in Pappas et al. (1980). The following result provides a fast algorithm for solving (4.11).
41
Lemma 4.2 (Efficient solution of Stein equation). Consider the discrete Stein equation: Xgd = SCd1 + A′cg Xgd Ad h with Acg stable. Partitioning Xgd = Xgp
(4.20)
i Xgr compatibly with
"
Ap Ad = 0
# Bp Cr , Ar
leads to h Xgp = S
A′cg S
2
A′cg S
...
A′cg
N −1
S
N
Xgr = A′cg SCr + A′cg Xgr Ar .
i
(4.21) (4.22)
Proof. Partitioning (4.20) leads to : Xgp = SCp + A′cg Xgp Ap
(4.23)
Xgr = A′cg Xgp Bp Cr + A′cg Xgr Ar .
(4.24)
If we substitute (4.23) into itself M times we obtain: Xgp = A′cg
M +1
+1 Xgp AM + p
M X
k
A′cg SCp Akp .
k=0
Since Acg and Ap are stable, we may allow M → ∞ and hence write: Xgp =
∞ X
k
A′cg SCp Akp .
k=0
However, since AN p = 0 we may truncate the infinite sum to give: Xgp =
N −1 X
k
A′cg SCp Akp .
(4.25)
k=0
The effect of postmultiplying by Akp is to shift the columns of the preceding matrix right by h i klr , and so Cp Akp = 0lr ×klr Ilr 0lr ×(N −1−k)lr . Substituting this into (4.25) leads to (4.21). Now substituting (4.21) into (4.24) leads to (4.22). The following is obtained by substituting (4.21) and (4.22) into the definitions for the controller gains F2 and F0 . Corollary 4.3 (Efficient computation of Full gains). The matrix F2 may h Information controller i
be partitioned (compatibly with A) as F2 = F2g
F2p
h ¯ −1 B ′ Xgg B1gr + D′ D11gr B ′ S F2p = −R 2g 12 2g N −1 ′ ¯ −1 B ′ A′ SCr + B2g Xgr Ar . F2r = −R 2g cg
42
F2r in which F2g is given by (4.9), and
′ B2g A′cg S
...
′ B2g A′cg
N −2
S
i
(4.26) (4.27)
h If we partition F0 = F0r
i F0w then: ′ ′ N −1 ¯ −1 B2g F0r = −R Xgr Br + B2g Acg SDr ¯ −1 B ′ Xgg B1gw + D′ D11gw . F0w = −R 2g 12
(4.28) (4.29)
Corollary 4.4. As N → ∞ the control becomes independent of the choice of Wr Proof. Notice that uniqueness of the solution to (4.22) is guaranteed by the fact that σµ−1 6= 1 for any σ ∈ λ(Ar ), µ ∈ λ(Acg ) (Lancaster and Rodman, 1995), which is ensured by stability of both Acg and Ar . In the limit as N → ∞, (4.22) implies that Xgr = A′cg Xgr Ar and so in the limit Xgr = 0. Direct substitution into (4.27) and (4.28), while taking the limit as N → ∞, leads to: F2r = 0 and F0r = 0 ∀Ar , Br , Cr , Dr , and so the control signal is independent of Wr . Remark 4.5. If xg and xr are the states of G and Wr respectively, then the optimal control is given by:
with
N −1 X F2p,j r(k − N + j) u(k)∗ = F2g xg (k) + F2r xr (k) + F0r η(k) + F0w w(k) +  {z } j=0 {z } feedback  feedforward
¯ −1 B ′ Xgg B1gr + D′ D11gr F2p,0 = −R 2g 12 ′ ¯ −1 B2g F2p,j = −R Aj−1 cg S
1 ≤ j ≤ N − 1.
Remark 4.6. The feedback gain, F2g , is precisely that which would be obtained if one were to search for a Full Information controller that minimises Tw→z , with Wr and Φ removed from the problem description. The choice of feedback control is therefore independent of the preview length. Remark 4.7. The Full Information controller which minimises Tv→z 2 also minimises Tη→z 2 and Tw→z 2 . This type of relationship is true for any partition of the exogenous disturbance signal in an H2 Full Information generalised regulator problem, and is not a particular feature of the Preview Control problem. To see this, note that the two minimisation problems: min Tη→z 2
(4.30)
min Tw→z 2 ,
(4.31)
KF I
KF I
are related by the choice of B1 and D11 , and that computation of the controller gain F2 is independent of these matrices. The feedforward control gains F0r and F0w can be chosen independently, and so it is possible to simultaneously minimise Tη→z 2 and Tw→z 2 . 2 2 2 Since Tv→z 2 = Tη→z 2 + Tw→z 2 , a controller satisfying (4.30) and (4.31) also minimizes Tv→z 2 .
43
4.3
Output Feedback Solution
4.3.1
Standard Theory
We now consider a discretetime, linear, timeinvariant system, P , of the form
nl
s
P =
pl ql
↔ A
n
↔ B1
C1 C2
D11 D21
l
m
↔ B2 , D12 0
which satisfies (A1)(A3) as well as: (A4) (A, C2 ) is detectable, ′ (A5) D21 D21 > 0, " A − ejθ I (A6) rank C2
B1 D21
#
=n+q
∀ θ ∈ (−π, π].
We wish to compute an internally stabilising K that minimises Fl (P, K)2 . Define: ′ S¯ = D21 D21 + C2 Y C2′
′ L2 = −(AY C2′ + B1 D21 )S¯−1 .
If (A4)(A6) are satisfied, it is shown in Zhou et al. (1996) that there exists a Y that solves: ¯ ′ + B1 B ′ , Y = AY A′ − L2 SL 2 1
(4.32)
such that Y ≥0 A + L2 C2 is asymptotically stable. If we define: ′ L0 = (F2 Y C2′ + F0 D21 )S¯−1 ,
then, according to Zhou et al. (1996), the H2 optimal output feedback controller is given by: s
K=
"
AK
BK
CK
DK
#
(4.33)
AK = A + B2 F2 + L2 C2 − B2 L0 C2
(4.34)
BK = −(L2 − B2 L0 )
(4.35)
CK = F2 − L0 C2
(4.36)
DK = L0 .
(4.37)
The H2 norm of the resulting closed loop system is given by: 2
2
Fl (P, K)2 = Fl (PF I , KF I )2 ¯ (L0 D21 − F0 )(L0 D21 − F0 )′ + (L0 C2 − F2 )Y (L0 C2 − F2 )′ )} . + Tr R
44
4.3.2
Efficient Computation of the Output Feedback Controller
In this section we aim to find a computationally efficient solution to the DARE (4.32), given that P has the structure described in (3.1). The results of this section do not depend on the internal structure of Ap , Bp and Cp (though we do require that Ap is stable). Lemma 4.8. The stabilising nonnegative solution to (4.32) may be computed using: ng N lr +nr
Y =
"↔ Yg
ng l
0
N lr +nr l
↔# , 0 0
where Yg is the unique stabilising and nonnegative solution to: ′ Yg = Ag Yg A′g − L2g S¯g L′2g + B1gw B1gw ,
(4.38)
with: ′ ′ S¯g = D21gw D21gw + C2g Yg C2g
′ ′ L2g = −(Ag Yg C2g + B1gw D21gw )S¯g−1 .
Proof. Note that (A4) − (A6) imply (A4g) (Ag , C2g ) is detectable, ′ > 0, (A5g) D21gw D21gw # " Ag − ejθ I B1gw = ng + qg (A6g) rank C2g D21gw
∀ θ ∈ (−π, π].
It then follows that (A4) − (A6) ensure the existence of a stabilising nonnegative solution to (4.38). " Let #Yg be a stabilising and nonnegative solution to (4.38). We will now show that Yg 0 Y = is a stabilising nonnegative solution to (4.32). 0 0 # " Yg 0 : It easily checked that the following hold if Y = 0 0 # " S¯g 0 ¯ S= 0 Dr Dr′ # " L2g 0 L2 = 0 −Bd Dr−1 # " ′ 0 B1gw B1gw ′ B1 B1 = 0 Bd Bd′ " # Ag Yg A′g 0 AY A′ = , 0 0
(4.39)
where the invertibility of Dr is guaranteed by assumption (A5), together with the fact that Wr is square. It then follows that: " ¯ ′ + B1gw B ′ Ag Yg A′g − L2g S¯g L 2g 1gw ′ ′ ¯ ¯ AY A − L2 S L2 + B1 B1 = 0 " # Yg 0 = = Y. 0 0 ′
45
0 0
#
y
r
u
IIR
FIR Order N lr
Order ng IIR Order nr Figure 4.1: Structure of the H2 optimal preview controller. The signal u is the control, the measurement is y, and r is the future value of the previewable disturbance. The preview length is N , lr is the dimension of r, nr is the order of Wr and ng is the order of G.
"
Yg Therefore, if Yg solves (4.38), then Y = 0 stabilising. Note that:
# 0 solves (4.32). We now need to check that Y is 0
"
Ag + L2g C2g A + L2 C2 = 0
# ⋆ . Ad − Bd Dr−1 Cd2
The matrix Ad − Bd Dr−1 Cd2 is stable because: Ad −
Bd Dr−1 Cd2
=
"
Ap
0
0
Ar − Br Dr−1 Cr
#
,
(4.40)
in which Ap is stable by definition and Ar − Br Dr−1 Cr is stable because Wr is assumed to be outer. Since Yg is stabilising, we know that Ag + L2g C2g is stable, and hence that A + L2 C2 is stable, as required.
4.3.3
Efficient Implementation
We now have a complete method for efficiently computing the Output Feedback preview controller, however, in its present form, this controller has the same order as the generalized plant. In general, a controller of this order cannot be implemented. Fortunately the highorder part of the controller is an FIR filter (illustrated in Figure 4.1), for which efficient implementations exist. This controller structure is proved in the following Lemma: Lemma 4.9. The optimal controller described in (4.33) for the plant in (3.1) can be written in the form:
s
K=
"
AK
BK
CK
DK
#
=
AKgg
AKgp
AKgr
BKgy
BKgr
0 0
Ap 0
0 Ar − Br Dr−1 Cr
0 0
Bp Br Dr−1
CKg
CKp
CKr
L0y
F0r Dr−1
46
(4.41)
where AKgg ∈ Rng ×ng and BKgg ∈ Rng ×lw and: ′ ′ L0y = (F2g Yg C2g + F0w D21gw )S¯g−1
AKgg = Ag + B2g F2g + L2g C2g − B2g L0y C2g AKgp = B1gr Cp + B2g F2p + L2g D21gr Cp − B2g L0y D21gr Cp AKgr = B2g F2r − B2g F0r Dr−1 Cr BKgy = −(L2g − B2g L0g ) BKgr = B2g F0r Dr−1 CKg = F2g − L0y C2g CKp = F2p − L0y D21gr Cp CKr = F2r − F0r Dr−1 Cr Proof. The realization given in (4.41) follows from (4.33), together with (4.39), (4.40) and: h L0 = L0y
i F0r Dr−1 .
This then leads to the loworder implementation:
AKgg s ¯ K= 0 CKg
AKgr Ar − Br Dr−1 Cr
BKgy 0
AKgp 0
CKr
L0y
CKp
BKgr Br Dr−1 , F0r Dr−1
(4.42)
where the optimal control is given by: " # y ¯ u =K r¯ r(k − N ) .. . r¯(k) = . r(k) ∗
Corollary 4.10. As N → ∞ the control becomes independent of the choice of Wr . Proof. In Corollary 4.4, it is noted that F0r → 0 and F2r → 0 as N → ∞, and so CKr → 0, BKgr → 0 and AKgr → 0. It is then clear from (4.41) that the value of the control signal is not affected by the choice of Ar , Br , Cr or Dr . Corollary 4.11. The Output Feedback controller that minimises Tv→z 2 , also minimises Tη→z 2 and Tw→z 2 . Proof. The controller may be decomposed into feedback and feedforward components Kf b and Kf f , so that u∗ = Kf b y + Kf f r, with Kf b given by: s
Kf b =
"
AKgg
BKgy
CKg
L0y
47
#
.
η
r
Wr
Φ G KF F
z
u
Figure 4.2: A feedforward controller design problem. The notation follows that of Figure 1.5. The transfer function Tw→z is determined by Kf b and P , and it is easily checked that Kf b is precisely the controller which is obtained by minimising Tw→z 2 alone. Therefore minimising Tv→z 2 also leads to a minimal Tw→z . It is well known that the H2 optimal controller has an observer structure. If w = 0, then the observer will contain an exact copy of the states of G and Wr (once intial transients have decayed). Therefore the closedloop transfer function Tη→z will be precisely the same as that which results from application of the Full Information controller, KF I , to the plant PF I . Remark 4.7 implies that the value of Tη→z 2 achieved by the this controller is indeed minimal. If Tη→z 2 and Tw→z 2 are minimal then T[η′ w′ ]′ →z 2 is also minimal.
Unlike the Full Information case, this result is not a general property of any partition of the
exogenous disturbance signal, instead it results from the particular structure considered here. The result is useful because it leads us to the conclusion that the choice of Wr does not alter the resulting Tw→z , and so Wr tunes only the response to the previewable signal.
4.4
Feedforward Solution
In this section we consider the problem of designing a feedforward controller. Such a problem may arise if there is no feedback signal, or if we wish to use a preview precompensator to enhance an existing feedback controller. One could potentially tackle a feedforward problem that is identical to Figure 1.5 except with the measurement signal y removed, however, if we recall that T[η′
w′ ]′ →z
2 = Tw→z 2 + Tη→z 2 , 2 2 2
and that a feedforward controller does not alter Tw→z , then it follows that T[w′ η′ ]′ →z 2 is minimised by choosing the feedforward controller which minimises Tη→z 2 . Given these observations, we may neglect the influence of w in the design process. The problem considered in this section is illustrated in Figure 4.2. Such a configuration is
apparently a special case of Figure 1.5, and so it is tempting to try to tackle this problem by using the above general theory with y set to zero (by setting D21gw , D21gr , C2g and D22g to zero). Unfortunately, such an approach does not succeed because assumption (A5) is violated. By modifying (3.1), it follows that the appropriate generalised plant for Figure 4.2 is given
48
by:
PF F
Ag B1gr Cd1 0 Ad Bd s 0 = C 1g D11gr Cd1 0 0 Cd2 Dr A B1 B2 = C1 D11 D12 . C2 D21 0
B2g 0 D12 0
(4.43)
(4.44)
We will assume that this plant satisfies assumptions (A1)(A6) and Wr is outer. It is easily checked that the associated is obtained by removing the gain associated h Full Information control i
with w, and so KF I = F2g F2p F2r F0r , where the gains may be computed using (4.9) and (4.26)(4.28). To arrive at this result one need only retrace the derivations of Section 4.2, with B1gw and D11gw set to zero. Next, we give a result concerning the solution to the estimation DARE: Lemma 4.12. If Ag is stable and Wr is outer, then the DARE (4.32) associated with (4.43) has a stabilising solution Y = 0. Proof. First note that if Y = 0, then: "
0 L2 = − Bd Dr−1
#
S¯ = Dr Dr′ , from which it can easily be checked that Y = 0 solves (4.32). This solution is stabilising because: "
Ag A + L2 C2 = 0
B1gr Cd1 Ad − Bd Dr−1 Cd2
#
is stable since Ag is stable and Wr is outer (see (4.40)). If we also note that L0 = F0r Dr−1 , with F0r defined in (4.28), then we can use (4.33) to obtain the following H2 optimal feedforward controller: s
KF F =
AK
BK CK
"
AK
BK
#
CK DK Ag + B2g F2g B1gr Cp + B2g F2p = 0 Ap 0 0 B2g F0r Dr−1 = Bp −1 Br Dr h i = F2g F2p F2r − F0r Dr−1 Cr
DK = F0r Dr−1 ,
49
B2g F2r − B2g F0r Dr−1 Cr 0 Ar − Br Dr−1 Cr
ˆ G η
Wr
r
Φ
z
rˆ w
η
Φ
Wr
G
w y
u
r
Wr
K
z
rˆ
G y
u K
ˆ K
Figure 4.3: Two equivalent representations of the previewable disturbance rejection problem. These representations are equivalent in the sense that the transfer functions from η and w to z, r and y are identical. Recall that Φ = Z −N I, which commutes with Wr under multiplication. which has the low order representation:
s ¯FF = K
Ag + B2g F2g
B2g F2r − B2g F0r Dr−1 Cr
B1gr Cp + B2g F2p
B2g F0r Dr−1
0
Ar − Br Dr−1 Cr
0
Br Dr−1
F2g
F2r − F0r Dr−1 Cr
F2p
F0r Dr−1
such that the optimal control is given by: ¯ F F r¯ u∗ = K in which: r(k − N ) .. . r¯(k) = . r(k)
4.5
Reduction in H2 norm due to Preview
The purpose of this section is to derive an efficient means of computing both the minimum achievable closedloop H2 norm for a particular preview length N , and also for computing the norm reduction as N → ∞. For the purposes of computing the minimum achievable H2 norm, we may assume Wr = I without loss of generality. The transformation that enables us to make this assumption is ˆ and G ˆ is clearly a problem of the illustrated in Figure 4.3. The design problem involving K class of Figure 1.5, but without a prefilter. The achievable H2 norm will be the same in either case, and in this section we will work with the simpler problem setup, where it is assumed that ˆ and K. ˆ This transformation is not used in the preceding sections Wr has been absorbed into G because it obscures the impact of Wr on the control signal, and because we would be required to perform further manipulations in order to remove the additional controller states resulting from the extra copy of Wr . It is easy to check that the results of the previous sections carry over for Wr = I. All that is required is to remove the gains associated with the states of Wr . We note again that: T[r′
w′ ]′ →z
2 = Tw→z 2 + Tr→z 2 . 2 2 2
(4.45)
As observed in Corollary 4.11, the optimal preview controller also minimises Tw→z 2 . Since Xgg and Yg are the solutions to the DAREs associated with the problem of minimising Tw→z 2 , 50
we may use the results in Sections 4.2.1 and 4.3.1 to write: 2 γwc = Tr {(D11gw + D12 F0w )′ (D11gw + D12 F0w )
+(B1gw + B2g F0w )′ Xgg (B1gw + B2g F0w )} ¯ ((L0y D21gw − F0w )(L0y D21gw − F0w )′ = Tr R
2 γwf
+(L0y C2g − F2g )Ygg (L0y C2g − F2g )′ )}
2
2 2 Tw→z 2 = γwc + γwf ,
which is independent of the preview length. We now turn our attention to the evaluation of Tr→z 2 . Since the signal r is ‘known’ to the controller, it does not introduce an estimation error. As a result the Output Feedback controller achieves exactly the same transfer function Tr→z as the Full Information controller, KF I . Thus:
A + B2 F2 Tr→z =
C1 + D12 F2
"
B2g F0r Bp
#
.
D12 F0r
Note that X satisfies: X = (A + B2 F2 )′ X(A + B2 F2 ) + (C1 + D12 F2 )′ (C1 + D12 F2 ), and so using equation (2) we may write: 2 Tr→z 2
(
"
B2g F0r = Tr (D12 F0r ) D12 F0r + Bp ′
#′ " Xgg ′ Xgp
Xgp Xpp
#"
B2g F0r Bp
#)
.
¯ −1 B ′ Xgp Bp . The above expression may be simplified to where F0r = −R 2g 2 ′ ¯ Tr→z 2 = Tr Bp′ Xpp Bp − F0r RF0r .
(4.46)
Our next task is to find an efficient method for computing Bp′ Xpp Bp . Using the Wr = I version of (4.12), we can write: ˆ − F ′ RF ¯ 2p Xpp = A′p Xpp Ap + Q 2p in which ˆ = C ′ B ′ Xgg B1gr Cp + A′ X ′ B1gr Cp + C ′ B ′ Xgp Ap + C ′ D′ D11gr Cp . Q p gp p 1gr p 11gr p 1gr Substituting this into itself leads to:
Xpp =
N −1 X
′
ˆ − F ′ RF ¯ 2p )Aj . Ajp (Q 2p p
j=0
Note that postmultiplying by Ajp Bp has the effect of selecting individual block columns of the preceding matrix, that Cp Akp Bp = 0 ∀k 6= N − 1, and that AN p = 0. This means that: ′ ′ ′ ¯ 2p0 − Bp′ Xpp Bp = B1gr Xgg B1gr + D11gr D11gr − F2p0 RF
N −2 X j=0
51
¯ −1 B ′ Aj ′ S, S ′ Ajcg B2g R 2g cg
where S is defined in (4.13), and F2p0 is the leftmost block column of F2p and is given by: ¯ −1 B ′ Xgg B1gr + D′ D11gr . F2p0 = −R 2g 12
(4.47)
Combining this with (4.46), and using (4.21), leads to
N −1 X 2 ′ ′ ′ ′ j −1 ′ j ′ ¯ ¯ S Acg B2g R B2g Acg S . Tr→z 2 = Tr B1gr Xgg B1gr + D11gr D11gr − F2p0 RF2p0 −  {z } j=0  {z } Zero preview Preview reduction (4.48) The cost formula for the zero preview case can be found in Appendix A.3. In order to judge how much preview to use, we need to know the value of the maximum possible improvement due to preview action. Suppose the matrix Γ satisfies: ¯ −1 B ′ , Γ = Acg ΓA′cg + B2g R 2g which implies that: Γ=
∞ X
j ′ ¯ −1 B2g Ajcg B2g R A′cg .
j=0
2
Comparing this to (4.48), it follows that the reduction in Tr→z 2 due to preview is bounded above by Tr {S ′ ΓS} , and evaluating this limit only requires the solution of an ng dimensional Lyapunov equation (in addition to the ng dimensional DARE required to evaluate S). The following quantity provides a useful measure of the fraction of the maximum norm reduction that has been achieved: N −1 X ′ −1 ′ ¯ −1 B2g (4.49) γ %,imp = 100 × Tr {S ′ ΓS} S ′ Ajcg B2g R Ajcg S . j=0
This can be used to determine how much preview to use; for example, one might continue adding preview points until γ %,imp > 99%. Cost analysis for a simple example We will now investigate the achievable cost reduction for the closedloop transfer function: "
# (GK − Φ)ρ−1 , Kρ
where G=
Z − cz , Z − cp
for some real cp and cz . This is essentially the problem considered in Section 1.2, with an additional term, Kρ, which penalises large control signals. Plots of the cost reduction are given in Figures 4.4 to 4.6
52
Norm reduction due to infinite preview, c =0.5 p
100
Percentage reduction
80
60
40
20
0 1.1 3
1.05
2.5 2 1.5
1
1 0.5
c
0.95
0
z
ρ
Figure 4.4: Maximum norm reduction as a function of zero position (cz ) and control weighting (ρ). The pole was fixed at cp = 0.5. For the case where G is MP, Figure 4.4 shows that preview provides little benefit if ρ is either very small or very large. However, for intermediate values, the addition of preview action results in a significant reduction in the closedloop norm. For an NMP plant then preview action can result in up to 100% reduction in the closedloop norm. Note that this agrees with the results in Section 1.2, where the ρ → 0 case was considered. Figure 4.4 showed that, for a single cp and a range of cz (with cz  < 1), then preview was only helpful for intermediate values of ρ. Figure 4.5 shows that the same conclusion holds across a range of cp positions. It appears from Figure 4.6 that, broadly speaking, preview action is most beneficial when cp − cz  is large. To see why this is the case, consider what happens as cz → cp . We find that G → 1, so there is no lag associated with the plant dynamics, and consequently there is no need for anticipative control action.
4.6
Conclusions
By embedding a class of Preview Control problems in a generalised regulator configuration, an efficient synthesis procedure for the H2 optimal preview controller has been derived. Efficient algorithms have been presented for solving the two standard FI and OF Riccati equations, as well as for computing the corresponding controller gains. The associated OF controller was found to be low order with degree ng + nr . It is interesting to note that the following conditions are sufficient to enable efficient solution
53
Norm reduction due to infinite preview, cz=0.952
70
Percentage reduction
60 50 40 30 20 10 0 1 3
0.5 2.5 0
2 1.5 −0.5
1 0.5
cp
−1
0
ρ
Figure 4.5: Maximum norm reduction as a function of pole position (cp ) and control weighting (ρ). The zero was fixed at cz = 0.95.
54
Norm reduction due to infinite preview, ρ=1
100 90
Percentage reduction
80 70 60 1
50 40
0.5
30 0
20 10
−0.5 0 2
1.5
1
0.5
0
−0.5
−1
−1 −1.5
c
p
−2
c
z
Figure 4.6: Maximum norm reduction as a function of zero position (cz ) and pole position (cp ). The control weighting was held constant at ρ = 1.
55
of the FI equation: 1. Φ is uncontrollable from u; 2. Φ is FIR (and hence xp can be chosen to have a ‘shiftregister’ behaviour). If it is additionally assumed that: 3. Φ is uncontrollable from w; 4. the input to Φ is ‘known’ by the controller; 5. Wr has a stable and causal inverse; then it follows that the controller can perfectly reconstruct the states of Φ and Wr . This implies that the covariance of the estimates of these states is zero, and hence the corresponding entries in the estimation DARE must be zero. ¯ was enabled by the ‘shiftregister’ behaviour of The efficient controller implementation K xp , which is a result of the FIR property of Φ. It has been shown that the frequency weighted feedforward problem can be tackled with only minor modifications to the general theory. In the absence of w, synthesis of the feedforward controller only requires the solution of one Riccati equation. Given the equivalence between Disturbance Feedforward (DF) problems and FI problems (Zhou et al., 1996), and the fact that (4.43) can be transformed into a DF problem, this result was expected. An efficient feedforward implementation was also derived. A detailed analysis of the achievable H2 norm reduction due to preview was presented, and these results were used to analyse the norm reduction as a function of plant pole and zero positions for a simple example system. It was found that preview action can be of considerable benefit even for stable, MP systems. Whilst some of these results could have been derived by incremental development of existing algorithms, it is hoped that the derivations presented here provide a more compact and general framework for understanding and synthesising H2 preview controllers. Furthermore, the following items have not previously been addressed: • the efficient Output Feedback controller representation; • the cost reduction analysis for infinite preview; • the proof that changes in Wr do not affect the optimal choice of feedback controller; • the proof that the Output Feedback controller is independent of Wr for long preview lengths.
56
Chapter 5
Additional H2 Results Chapter Objective To derive an alternative Full Information H2 preview solution that clarifies the links to Receding Horizon Control (RHC).
5.1
Recursive construction of the FI DARE solution
In this section, an alternative solution to the H2 Full Information preview control problem is derived. Although the form for the solution is not as computationally attractive as that presented in Section 4.3, it is worth pursuing in order to make links with both RHC and with the continuoustime split optimisation horizon approach used in Kojima (2004) and Moelja and Meinsma (2006). Many variables relating to the augmented plant are functions of the preview length. Where it is necessary to make this dependence explicit, the notation A[N ] (denoting a version of the matrix A relating to the N preview step problem) is used throughout this thesis. In this chapter, we will use the shorthand A = A[N ] and A+ = A[N +1] . Also, a version of equation (x) with N preview steps will be referred to as (x), and a version with N + 1 preview steps will be referred to as (x)+ . We will consider only the Full Information problem and we will make the additional assumption that Wr = I (see Section 4.5). The corresponding generalised plant is given by: n
nl s
PF I =
pl nl ll
l
↔ A
↔ B1
C1 I 0
D11 0
I
m
↔ B2 D12 0 0
(5.1)
where: "
A
B1
B2
C1
D11
D12
#
Ag = 0 C1g
B1gr Cp Ap
0 Bp
B1gw 0
D11gr Cp
0
D11gw
B2g 0 D12
(5.2)
and the matrices on the RHS of (5.2) are defined in Chapter 3. We now seek a KF I which minimises Fl (PF I , KF I )2 .
57
It will be useful to note that: # B2 ∀N ≥ 0 B2 = 0 h i C1 + = C1 0 ∀N > 0 h i C1 [1] = C1 [0] D11gr " # A E A+ = ∀N > 0 0 0 # " A[0] B1gr [1] A = 0 0 +
"
E=
"
where: 0ng +(N −1)lr ×lr Ilr
#
,
and A[0] = Ag , B2 [0] = B2g , C1 [0] = C1g . As before, the optimal control can be synthesised using the general theory of Section 4.2.1, which requires solution of the DARE: ¯ 2 + C1′ C1 X = A′ XA − F2′ RF
(5.3)
where: ¯ = D′ D12 + B ′ XB2 R 12 2 ′ ¯ −1 (B2′ XA + D12 F2 = −R C1 )
Ac = A + B2 F2 . The following result relates the DARE for the N previewstep problem to the DARE for the (N + 1)step problem. Lemma 5.1. If (A1g)(A3g) (see p.40) are satisfied, then for all N ≥ 0, there exists X which is a stabilising solution to (5.3). Furthermore, for all N ≥ 0, a stabilising X + may be computed from a stabilising X using +′
X+ = A +′
− A
"
X 0
"
X 0 #
# 0 0
′
A+ + C1 + C1 +
0 ′ B2 + + C1 + D12 0
!
′ D12 + B2 D12
+′
" X 0
# !−1 0 B2 + 0
B2
+′
"
X 0
# ! 0 + A + D12 ′ C1 + 0 (5.4)
Proof. Given an X which satisfies (5.3), we propose that there exists an X + = +
which satisfies (5.3) for some suitable choice of X12
58
"
X
X12
#
′ X22 X12 and X22 . In other words, we propose that
there exists X12 and X22 such that: "
! # # " # " X12 X X X X ′ ′ 12 12 ′ ′ + + + + = A+ A+ + C1 C1 − A+ B2 + C1 D12 ′ ′ X22 X12 X22 X12 X22 # " !−1 # " ! X X12 X X12 +′ + + +′ +′ ′ + × D12 D12 + B2 B2 B2 A + D12 C1 . (5.5) ′ ′ X12 X22 X12 X22
X ′ X12
If we note that +′
A B2
+′
"
"
X ′ X12
X ′ X12
# # " X12 0 + +′ X A+ A =A 0 0 X22 # " # 0 X12 + +′ X B2 = B2 B2 + 0 0 X22
and substitute into (5.5), then X12 and X22 disappear from the RHS and so (5.5) is trivially satisfied. Equation (5.4) immediately follows. Now note that: h F2+ = F2
¯ −1 B ′ XE −R 2
A+ c
B2+ F2+
i
and so: +
=A +
"
=
Ac
¯ −1 B2 XE −B2′ R
0
0
#
.
Therefore X is stabilising iff X + is stabilising.
5.2
A Link to Receding Horizon Control
Consider the following deterministic, finitehorizon, linearquadratic preview control problem, in which the optimisation horizon is the same as the preview horizon: N X min z(j)′ z(j) x(N + 1)′ ∆x(N + 1) + u(0)...u(N )
(5.6)
j=0
subject to:
# " r(k) + B2 u(k) x(k + 1) = Ax(k) + B1 0 z(k) = C1 x(k) + D12 u(k) x(0) = x0
where A, B2 , C1 and D12 are defined in (5.2), and ∆ is a real, positive semidefinite matrix. This is the same plant as that considered in the previous section, except that the disturbance w(k) is assumed to be zero. Because the optimisation horizon is the same length as the preview horizon, only r(0) has time to reach G. In effect, the initial condition x0 stores all but one point of the trajectory to be tracked.
59
If we define a sequence of matrices Λ(k): Λ(0) = ∆ Λ(k + 1) = A′ Λ(k)A + C1 ′ C1 − A′ Λ(k)B2 + C1 ′ D12 −1 ′ × D12 D12 + B2 ′ Λ(k)B2 B2 ′ Λ(k)A + D12 ′ C1 ,
(5.7)
then the optimal controller is given by (Bitmead et al., 1990):
′ ′ u∗ (k) = −(D12 D12 + B2′ Λ(N − k)B2 )−1 (B2′ Λ(N − k)A + D12 C1 )x(k) ′ ′ − (D12 D12 + B2′ Λ(N − k)B2 )−1 (B2′ Λ(N − k)B1 + D12 D11 )r(k)
0 ≤ k ≤ N.
Often control problems are not finite in duration, and so an alternative problem formulation is required. Receding Horizon Control (RHC) is a common technique for applying finite horizon controllers to infinite horizon problems. When employing RHC, only the first element in the optimal control sequence is used, and then the optimisation window is shifted forward by one timestep and the first element in the next optimal control sequence is obtained. This leads to the control: ′ ′ u∗ (k) = −(D12 D12 + B2′ Λ(N )B2 )−1 (B2′ Λ(N )A + D12 C1 )x(k) ′ ′ − (D12 D12 + B2′ Λ(N )B2 )−1 (B2′ Λ(N )B1 + D12 D11 )r(k)
k ≥ 0.
(5.8)
Now notice that there is a striking similarity between (5.7) and (5.4). In fact, if we choose: " Xgg ∆= 0
0 0N lr
#
(5.9)
then: Λ(k) =
" X [k] 0
0 0(N −k)lr
#
,
(5.10)
and so Λ(N ) = X [N ] . By noting the similarity between (5.8) and (4.7), it follows that the receding horizon controller with an appropriately chosen terminal cost (as given by 5.9) yields precisely the same control as the infinite horizon H2 optimal preview controller. This result provides an interesting link between Preview Control and LQ Receding Horizon Tracking (RHT) controllers of the form considered in Bitmead et al. (1990) and Kwon and Byun (1989). In particular, by proving equivalence to the H2 preview controller, we have shown that a specific choice of terminal cost leads to closedloop stability of the RHT controller.
5.3
A Link to SplitOptimisationHorizon Methods
A continuoustime previewable disturbance rejection problem is considered in Moelja and Meinsma (2006) and Kojima (2004), where it is noted that the H2 optimal controller is the controller which minimises the L2 norm of z in the presence of a delta function disturbance at t = 0. Therefore, it is argued that the preview problem may be viewed as an LQR optimisation with a state jump caused by a delta function input at t = h, where h is the preview length. The problem may then be solved as two independent LQR problems: a finite horizon problem for 0 < t < h and a standard infinite horizon regulation problem for t > h. The cost function for the infinite horizon problem then provides a boundary condition for the cost of the finite horizon problem.
60
From the results given in the preceding sections, it is clear that the H2 optimal control may be obtained from a finite horizon optimisation with a terminal cost based on an infinite horizon optimisation; as expected, it seems that there are clear parallels to the continuoustime case. In fact, we could easily rederive the result X [N ] = Λ(N ) using the splitoptimisationhorizon method.
5.4
Conclusions
An alternative scheme for recursive computation of the solution to the H2 FI DARE has been presented. Using this result it has been shown that a particular LQ RHC problem yields precisely the same control as a H2 Preview Controller. Although largely a theoretical curiosity, this result does have some practical relevance. It suggests that Model Predictive Controllers for constrained, nonlinear systems could achieve the same H2 performance as a Preview Controller during the times that they operate in a region of the plant dynamics which is both linear and unconstrained. The link to splitoptimisationhorizon methods confirms an expected symmetry with the continuoustime case, and it highlights a technique which could facilitate the development of more advanced Preview Control algorithms. For example, Moelja and Meinsma (2006) use this approach to tackle the problem in which each disturbance has a different preview length. Such a problem does not appear to have been tackled in discretetime.
61
Chapter 6
Solution of the General H∞ Preview Problem Chapter Objective To derive an efficient algorithm for synthesising and implementing the H∞ optimal controller for the problem described in Chapter 3.
6.1
Introduction
In this chapter, the synthesis problem illustrated in Figure 1.5 is solved by formulating it as a discretetime generalised regulator H∞ problem (see Chapter 3). The solution of the estimation problem is tackled by noting that only a small partition of the corresponding Riccati equation is nonzero. This nonzero partition may be expressed in terms of the solution of a standard loworder Riccati equation. The resulting estimator comprises a loworder H∞ filter together with an internal model of the delay line Φ and the inverse of the reference filter Wr ; this structure is precisely analogous to the H2 case, and is similarly amenable to efficient implementation in hardware. The Full Information Riccati equation is tackled using a recursive reduction procedure, which is enabled by the fact that the associated closedloop matrix is singular. This approach is inspired by the algorithms described in Ferrante and Wimmer (2007), and Ferrante (2004). The method described in Ferrante (2004) allows one to reduce the order of the Riccati equation by the dimension of the right null space of the closedloop matrix. This reduction can potentially be repeated recursively. In contrast, Ferrante and Wimmer (2007) use a single reduction based on a generalised right null space of the closedloop matrix. Whilst the results of Ferrante and Wimmer (2007), or Ferrante (2004) could be used without modification, they would lead to the evaluation, multiplication and inversion of a number of augmented matrices that have dimension n = ng + nr + (N lr ), in which ng is the order of G, nr is the order of Wr and N lr is the order of Φ. The computational complexity of such operations is O(n3 ) (Cormen et al., 2001)1 , and so there is apparently little improvement over computing the DARE solution directly (see Section 1.3). In addition, recursive application of the algorithm in Ferrante (2004) is not guaranteed to succeed – a point which is highlighted by the author in his conclusions. In contrast, whilst the method described in Ferrante and Wimmer (2007) is guaranteed to succeed, it requires the evaluation the N lr dimensional Stable Deflating 1 Algorithms have been found which reduce the computational complexity of matrix multiplication or inversion to O(n2.38 ) (Cormen et al., 2001). However, due to the large constant in front of the n2.38 term, such methods are not generally used in practice.
62
X
=
111111111 000000000 000000000 111111111 000000000 111111111 000000000 111111111 000000000 111111111 000000000 111111111 000000000 111111111 000000000 111111111 000000000 111111111
ng
(N − 1)lr
lr + nr
Figure 6.1: The crosshatched areas denote the parts of X which must be computed in order to synthesise the controller. Subspace (SDS) of an augmented Extended Symplectic Pencil (ESP) (for relevant definitions see Ionescu and Weiss (1992) or Section 6.2.1). As such, the computational effort is not significantly reduced in comparison to direct solution of the augmented DARE (which requires evaluation of an (N lr + ng + nr )dimensional subspace). The development in this chapter begins by generalising some of the results of Ferrante (2004), and then developing an algorithm which removes the need for storing or performing computations with highdimension matrices. At this point one could suggest that even if the algorithm itself does not require the computation of augmented matrices, the solution to the Riccati equation is still a highdimension matrix. Whilst this is true, it will be shown that only a small portion of the solution to the Riccati equation is required in order to compute the optimal controller. The reasons for this are explored in detail at the start of Section 6.2.2. It could also be argued that the augmented statespace matrices are sparse, and so it should be possible to make effective use of efficient DARE solvers specialised for sparse problems (see e.g. Sima 2005). However, such methods would again result in the computation of the entire augmented DARE solution, which must then be tested for nonnegativity. Such a test has an operation count of n3 /6 using Cholesky decomposition (Press et al., 2007). After this, a number of augmented matrix multiplications would still be required in order to evaluate the optimal controller. As discussed above, such matrix operations are also not computationally acceptable. Distinguishing features of the algorithm presented here include: • The inclusion of previewable and nonpreviewable disturbances. • The output feedback synthesis problem is solved and frequency weighting on both the previewable and nonpreviewable signals is permitted. • The controller synthesis procedure is based on two standard loworder DAREs for which good numerical methods already exist. " # Yg 0 • The solution to the estimation Riccati equation has the form Y = in which Yg is 0 0 ng × ng . • Only a small part of the Full Information Riccati equation solution is required. See Figure 6.1. • The resulting controller is readily implemented (in hardware). This chapter is organised as follows: the Full Information solution presented in Section 6.2 and the Output Feedback solution is given in Section 6.3; sections 6.2 and 6.3 begin with a short summary of the standard discretetime H∞ theory. The special case of feedforward controller design is considered in Section 6.4. Conclusions are drawn in Section 6.6. 63
6.2 6.2.1
Full Information Solution Standard Theory
We begin with a brief summary of the discretetime, linear timeinvariant Full Information control problem (Green and Limebeer, 1995), which has the plant description: n
nl s
PF I =
pl nl ll
l
↔ A
↔ B1
C1 I 0
D11 0
I
m
↔ B2 , D12 0 0
and which satisfies the following standard assumptions: (A1) (A, B2 ) is stabilisable, ′ (A2) D12 D12 > 0, " A − ejθ I (A3) rank C1
B2 D12
#
=n+m
∀ θ ∈ (−π, π].
Now define: h i B = B1 B2 # " ′ D11 C1 L= ′ D12
Q = C1′ C1 " ′ D11 − γ 2 I D11 R= ′ D12 D11
¯ = R + B ′ XB R
¯ = L + B ′ XA. L
h ¯ and L ¯ may be partitioned conformably with B = B1 The matrices R " ¯1 R ¯ R= ¯ R2
¯′ R 2 ¯3 R
#
′ D12 D11 ′ D12 D12
#
i B2 to give:
" # ¯1 L ¯ L= . ¯ L2
Also define: ¯R ¯ −1 L ¯ D(A, B, Q, R, L; X) = A′ XA + Q − L ¯ −1 L. ¯ Ac (A, B, R, L; X) = A − B R In Green and Limebeer (1995), it is shown that if (A1)(A3) are satisfied then there exists an internally stabilising K which achieves Fl (PF I , K)∞ < γ if and only if there exists a matrix X which solves the Discrete Algebraic Riccati Equation (DARE): X = D(A, B, Q, R, L; X)
(6.1)
such that: X≥0
(6.2)
Ac (A, B, R, L; X) is asymptotically stable ¯1 − ∇=R
¯ −1 ¯ ¯′ R R 2 3 R2
< 0.
64
(6.3) (6.4)
In this case a controller which achieves the desired performance is given by: h ¯ −1 L ¯2 K = −R 3
i ¯2 . R
(6.5)
If (6.3) is satisfied, X is said to be stabilising, and if (6.4) is satisfied then X will be called feasible. The H∞ control problem therefore has a solution if and only if X is stabilising, feasible and nonnegative. It is shown in Ionescu and Weiss (1992) that the extended symplectic pencil (ESP) M − λZ with
A 0 M = Q −I L
0
I Z = 0
B L′
0
R
0 −A′ −B
′
0 0
(6.6)
0
plays a crucial role in solving the above DARE. Before stating the relationship between this matrix pencil and the solution to (6.1), further definitions are required. A matrix pencil is called regular if det(M − λZ) is not identically zero. The ESP is called dichotomic if it has no generalised eigenvalues on the unit circle. A subspace U ⊂ R(2n+m+l) is called a deflating subspace of the pencil M − λZ if dim(M U + ZU) = dim(U) where M U denotes the set {M u : u ∈ U}. Such a subspace will be called stable if the spectrum of M − λZ restricted to U lies inside the unit disk. If a matrix U and a stable matrix S satisfy: M U = ZU S,
(6.7)
then the columns of U form a basis for a stable deflating subspace (SDS) of M − λZ. The following two results come from Ionescu and Weiss (1992) : Lemma 6.1 (Existence of SDS). Suppose the ESP is regular, then a stable deflating subspace of dimension n exists if and only if the ESP is dichotomic. If such a subspace exists it is unique. An n dimensional SDS is said to be maximal. Let h a basis, U i, ′ for the maximal SDS be partitioned conformably with M and N so that U = U1′ U2′ U3′ . If U1 is invertible, then the matrix pencil is said to be disconjugate. Lemma 6.2 (Solution of DARE). A stabilising solution to the DARE (6.1) exists iff the associated ESP is disconjugate, regular and dichotomic. Furthermore, if U is a basis for the maximal stable deflating subspace then the stabilising X which solves (6.1) is given by X = U2 U1−1 . These results may be restated (Ionescu and Weiss, 1992) as: X is a stabilising solution to (6.1) iff M − λZ is regular, and there exists an X and an F such that Ac (A, B, R, L; X) is stable and I I M X = Z X Ac (A, B, R, L; X) F
(6.8)
F
¯ −1 L. ¯ The matrices F and Ac (A, B, R, L; X) are related to a basis for the SDS as with F = −R follows: F = U3 U1−1
Ac (A, B, R, L; X) = U1 SU1−1 . 65
β (N ) X (N ) β (N )
X
′
Ψ(N )
+
=
Figure 6.2: The relationship between X, the solution to the highorder DARE, and X (N ) the solution to a loworder DARE. lw + m
1111111 n 0000000 0000000 1111111
g
B = lr + nr
(N − 1)lr
111 000 000 111 lr
Figure 6.3: Illustration of the structure of the control inputmatrix B. The crosshatched areas denote the nonzero parts of B.
6.2.2
Efficient solution of FI DARE
The purpose of this section is to find an efficient solution to the DARE given in (6.1), for the case where A, B, C1 , D11 and D12 have the structure described in (3.1). We present a method for obtaining the solution to the highdimensional equation (6.1) based on the solution of a DARE of order ng + nr . Figure 6.2 foreshadows the results presented later in the chapter and shows the last step of an algorithm that finds the solution X to (6.1) in terms of the solution X (N ) to a lowdimensional ARE. Without further exploitation of the problem structure, this algorithm would still require the computation and storage of at least two highdimensional matrices — this is not acceptable in cases when N is large. As can be seen from the controller formulae in the standard theory (Section 6.2.1), evaluation of the optimal Full Information controller only requires the evaluation of B ′ X. The structure of B, which is illustrated in Figure 6.3, ensures that one need only evaluate and store the outer edges of X (see Figure 6.1). It also follows that one need only compute the outer edge of Ψ(N ) , a matrix which is generated as the output of a recursive algorithm. In the standard theory (Section 6.2.1) one normally has to check the condition X ≥ 0 in order to guarantee the existence of a controller that satisfies the H∞ performance bound. In Lemma 6.9 we replace the nonnegativity test on X with one which only requires an ng × ng partition of X. Our computational scheme relies crucially on the fact that Ac (A, B, R, L; X) is singular for the preview problem of (3.1). For generic values of γ this fact is not immediately obvious, and a formal proof requires a detailed examination of the structure of the statespace matrices for the generalized plant. It is perhaps instructive to make the preliminary observation that as ¯ −1 L ¯ 2 . In this case Ac (A, B, R, L; X) has γ → ∞ (the H2 case), Ac (A, B, R, L; X) → A − B2 R 3 N lr zeroeigenvalues because Φ is uncontrollable from B2 . In the first two lemmas of this section, we relate the right null space of Ac (A, B, R, L; X) to the right null space of M , with M given in (6.6). We then present a general method for reducing DAREs having singular Ac (A, B, R, L; X). These two results, which form the core of our solution, generalise Ferrante (2004, Proposition 2.1) to the case when R is potentially singular. Presupposing that the matrix M in (6.6) is singular, and that the DARE (6.1) has a solution,
66
the next result establishes important properties of bases for the right null space of M ; the singularity of M will be established in Lemma 6.6. It should be noted that Lemmas 6.36.6 are concerned only with the first step of the reduction process. Recursive application of these results is considered in Lemma 6.7 onwards. Lemma 6.3. If there exists X such that X = D(A, B, Q, R, L; X) and there exists a full rank h i′ U = U1′ U2′ U3′ such that M U = 0, then U1 has full (column) rank and Ac (A, B, R, L; X)U1 = 0. Proof. It is shown in Guo (1998) that if X satisfies X = D(A, B, Q, R, L; X), then there exist nonsingular matrices Σ and Π such that: Ac − λI Σ(M − λZ)Π = 0 0
λB(R + B ′ XB)−1 B ′ I − λA′c −λB ′
0 0 ′ R + B XB
in which Ac = Ac (A, B, R, L; X). The transformation matrix Π is given by
I Π = −X −F
0 I 0
0 0 . I
Setting λ = 0 gives: Ac ΣM Π = 0
0 I
0
h Supposing U = U1′
U2′
U3′
i′
0
0 0 ′
R + B XB
.
(6.9)
satisfies M U = 0, then it follows that: (ΣM Π)(Π−1 U ) = 0.
(6.10)
Now:
U1
I
0
0
Π−1 = X
I 0
0 ⇒ ΣM Π ⋆ = 0. ⋆ I
F
The structure of ΣM Π in (6.9) together with the invertibility of R + B ′ XB, establishes that: U1 ΣM Π 0 = 0 0 and that Ac U1 = 0 as required. It follows from (6.10) and (6.11) that: I U = X U1 , F
which completes the proof by showing that U is full column rank iff U1 is. 67
(6.11)
If M is singular and the DARE (6.1) has a solution, then Lemma 6.3 proves that there exists h h i′ i′ a full column rank T2′ V ′ W ′ such that M T2′ V ′ W ′ = 0 with T2′ T2 = I. In the next h i result we introduce a T1 such that T = T1 T2 is orthogonal and show that the solution of (6.1) can be expressed in terms of a lowerdimension DARE. h i′ Lemma 6.4. Suppose M T2′ V ′ W ′ = 0 with T2′ T2 = I, and that a T1 is selected so that h i T = T1 T2 orthogonal. Then X is a stabilising and feasible solution to: X = D(A, B, Q, R, L; X),
(6.12)
if and only if X = T1′ XT1 is a stabilising and feasible solution to: X = D(A, B, Q, R, L; X)
(6.13)
A = T1′ AT1
(6.14)
with:
B=
T1′ B
(6.15)
Q = T1′ QT1 + T1′ A′ HAT1 ′
(6.16)
R = R + B HB
(6.17)
L = LT1 + BHAT1
(6.18)
X = T1 XT1′ + H
(6.19)
H = T2 V ′ T1 T1 ′ + V T2′ .
(6.20)
in which case:
where:
Proof. Suppose there exists a stabilizing and feasible X which solves (6.12). Lemma 6.2 ensures that the pencil M − λZ is regular and that: I I M X = Z X Ac ,
(6.21)
F
F
with Ac = Ac (A, B, R, L; X). Equivalently, XT is a solution to XT = D(AT , BT , QT , RT , LT ; XT ),
(6.22)
where AT = T ′ AT , BT = T ′ B, LT = LT , QT = T ′ QT , and XT = T ′ XT . The corresponding
68
transformed (regular) ESP MT − λZT is
AT MT = QT LT
0 −I 0
I ZT = 0 0
BT L′T R
0 0 0
0 −A′T −BT′
with:
I
I
MT XT = ZT XT AcT FT FT
(6.23)
in which AcT = T ′ Ac T and FT = F T . It follows from Lemma 6.3 that AcT h If we write T = T1
# 0 . 0
"
Ac11 = Ac12
(6.24)
i T2 then we may partition XT and FT conformally as: "
X XT = ′ X12
X12 X22
#
h FT = F1
F2
i
and so:
I
0 MT X ′ X12 F1
0
I X12 = ZT X22 F2
I
0
0 X ′ X12 F1
I " Ac11 X12 A c12 X22 F2
# 0 . 0
(6.25)
h h i′ i′ h i′ ′ ′ Since M T2′ V ′ W ′ = 0, it follows that MT T2′ T V ′ T W ′ = 0 and so X12 = X22 h i′ T1 T2 V and F2 = W satisfies the right hand block column of (6.25). We have therefore h i′ ′ ′ found a method for computing X12 which is independent of the existence of X. X22 Equation (6.22) can be written as: "
# X12 = T ′ D(A, B, Q, R, L; X)T X22
X XT = ′ X12 "
X and it follows that the matrix XT = V ′ T1
T1′ V T2′ V
#
solves (6.26) if:
X = T1′ D(A, B, Q, R, L; X)T1 . # " X 0 ′ 0 Clearly X = T XT T implies that X = T T +T V ′ T1 0 0 stituting this into (6.27) gives: ′
"
(6.27) # T1′ V T ′ = T1 XT1′ + H. SubT2′ V
X = T1′ D(A, B, Q, R, L; T1 XT1′ + H)T1 = D(A, B, Q, R, L; X).
69
(6.26)
Conversely, if X satisfies (6.13), then each of the above steps may be reversed to give X = T1 XT1′ + H which satisfies (6.12). We now address the questions of stability and feasibility. Suppose X and X satisfy (6.12), (6.13) and (6.19), then: AcT = T ′ Ac (A, B, R, L; X)T = T ′ A − B(R + B ′ XB)−1 (B ′ XA + L) T.
Substituting X = T1 XT1′ + H gives:
−1 AcT = T ′ A − B (R + B ′ (T1 XT1′ + H) B) (B ′ (T1 XT1′ + H) A + L) T −1 ′ ⇒ Ac11 = A − B R + B′ XB B XA + L and so: AcT
# Ac (A, B, R, L; X) 0 . = ⋆ 0 "
Hence AcT is stable iff X is stabilising, and so X is stabilising iff X is stabilising. Finally note that: R + B′ XB = R + B ′ HB + B ′ T1 XT1′ B = R + B ′ XB
(6.28)
and so X is feasible iff X is feasible. We have not related the nonnegativity of X to the nonnegativity of X, and so it is still necessary to compute X in order to check that there exists an internally stabilising K satisfying Fl (PF I , K)∞ < γ. A computationally attractive lowdimensional alternative to checking nonnegativity of X is given in Lemma 6.9. We have a reduction algorithm based on the right kernel of M , however, it has not yet been established that the matrix M for our system is singular, nor have we addressed how T , V and W might be computed; a ‘brute force’ approach is not practical for large M . To address these questions, we examine the structure of the generalized plant matrices in greater detail. The statespace matrices of the generalised plant (3.2) have the natural partitioning shown in (3.1) with an ng × ng partition in the top left corner. As we will now show, it will be useful to repartition the generalised plant realization so that the (1,1) partition of A is dilated to (ng + lr ) × (ng + lr ) thereby accommodating one preview step: Lemma 6.5. The plant description given in (3.1) has the following features: ng +lr
"
A
B
L
R
#
ng +lr l
=
n ˜l lr l lw +m l
↔ Aˆ
0 0 ˆ L
ng +lr
Q=
ng +lr l n ˜l
" ↔ ˆ Q 0
70
n ˜
↔ A¯ A˜ 0 0 n ˜
↔# 0 0
l
r ↔
lw +m
↔ ˆ 0 B ˜ B 0 −γ 2 I 0 ˆ 0 R
where: n ˜ = (N − 1)lr + nr # " [N −1] B p ˜= B Br # " Ap [N −1] Bp [N −1] Cr ˜ A= 0 Ar 0 0 N > 1 Ilr ¯ A= 0 N =1 C r
ˆ B, ˆ L, ˆ R, ˆ and Q ˆ are appropriately dimensioned real matrices. Also note that: and A, ng +lr
ng +lr l lw +m l
lw +m
"↔ Aˆ ˆ L
↔# ˆ = B ˆ R
ng l lr l lw +m l
⋆
0 ˆ L
⋆
0. ˆ R
(6.29)
Proof. This follows by direct calculation. Next, we show how (ng + lr )sized partitions may be used to efficiently compute T , V and W. i′ h ˆ′ Lemma 6.6. If there exists an X such that X = D(A, B, Q, R, L; X), then there exists Tˆ2′ W such that " #" # ˆ Tˆ2 Aˆ B =0 (6.30) ˆ R ˆ W ˆ L and Tˆ2′ Tˆ2 = Ilr . h Furthermore, if Tˆ1 is defined such that Tˆ1 "
Tˆ1 0 T1 = 0 I(N −1)lr +nr " # 0lr W = ˆ W
#
(6.31)
i Tˆ2 is orthogonal, and:
ˆ Tˆ2 + L ˆW ˆ Vˆ = Q
T2 =
"
V =
"
Tˆ2 0((N −1)lr +nr )×lr Vˆ 0((N −1)lr +nr )×lr
# # (6.32)
then
T2
M V = 0, W h with T = T1
i T2 orthogonal. 71
(6.33)
"
# ˆ Aˆ B Proof. It is clear from (6.29) that the square matrix has a right kernel of dimension ˆ R ˆ L h i′ ˆ ′ which satisfies (6.30). Combining ≥ lr , and hence that there exists a full column rank Tˆ2′ W (6.30) and (6.32) gives:
Aˆ 0 ˆ Q −I ˆ L 0
ˆ B Tˆ2 ′ ˆ = 0. ˆ L V ˆ R
ˆ W
i′ h i′ h ˆ ′ , and partition M conformably If we partition T2′ V ′ W ′ as Tˆ2′ 0 Vˆ ′ 0 0 W (using Lemma 6.5) then it is easily checked that (6.33) holds. Lemma 6.3 then implies that T2 must be ifull column rank, and hence we can indeed chose Tˆ2 such that (6.31) is satisfied. Since h Tˆ1 Tˆ2 is orthogonal it follows that T is also orthogonal. We have hnow shown i that M is singular (Lemma 6.5) and that we can compute the orthogonal
matrix T = T1 T2 using lowdimensional calculations. Having reduced our DARE by lr states, it is natural to ask if the same reduction algorithm
can be applied to the reducedorder DARE given in (6.13). The above reduction procedure was enabled by Ac (A, B, R, L; X) having a right null space (of dimension ≥ lr ), and so we just need to establish whether Ac (A, B, R, L; X) also possesses such a null space. A brief reexamination of the proof of Lemma 6.6 reveals that the relationships of Lemma 6.5 are sufficient to guarantee the existence of an orthogonal T2 satisfying (6.33) and having lr columns. Lemma 6.3 then implies that Ac (A, B, R, L; X) has a right null space of dimension lr . Subsequent reduction steps are indeed possible, because the structural properties associated with Lemma 6.5 are inherited by A, B, R, L and Q. Furthermore, this reduction process may be continued until a DARE of order ng + nr is obtained. The following Lemma considers such a recursive reduction procedure, and involves three sets of parameters. The first set are associated with the original plant, A, B, R, L and Q, and are functions of N . The second set of parameters are defined recursively. At the jth step these are denoted A(j) , B (j) , R(j) , L(j) , Q(j) , and reduce in size as the recursion proceeds. At the N th step these matrices lead to an (ng + nr )sized DARE. These recursively defined variables are initialised with the original plant data: A(0) = A, B (0) = B, R(0) = R, L(0) = L, Q(0) = Q. The first reduction step, as was illustrated in Lemma 6.4, gives A(1) = A, B (1) = B, R(1) = R, L(1) = L, Q(1) = Q. These variable are functions of both N and j, where j refers to the recursion index. If we were to compute the parameters of the reduced DARE using formulae of the form given in Lemma 6.4, then it would be necessary to compute, store and manipulate a variety of highdimensional matrices. It turns out that it is only necessary to compute and store (ng +lr )dimensional partitions of A(j) , B (j) , R(j) , L(j) , Q(j) . This third set of (lowdimensional) ˆ (j) , R ˆ (j) , L ˆ (j) , Q ˆ (j) , which are functions of j only (and not N ). parameters are denoted Aˆ(j) , B ˆ B ˆ (0) = B, ˆ R ˆ (0) = R, ˆ L ˆ (0) = L ˆ and Q ˆ (0) = Q. ˆ Let X be a Lemma 6.7. Define Aˆ(0) = A, stabilising and feasible solution to X = D(A, B, Q, R, L; X), then for 0 ≤ j ≤ N − 1 there exists
72
h ′ a Tˆ2(j)
ˆ (j)′ W
i′
satisfying "
Aˆ(j) ˆ (j) L
ˆ (j) B ˆ (j) R
#"
# (j) Tˆ2 =0 ˆ (j) W
(6.34)
′
(j) (j) Tˆ2 Tˆ2 = Ilr .
h (j) Define Tˆ1 so that Tˆ1(j)
(6.35)
i (j) is orthogonal. For 0 ≤ j ≤ N − 1: Tˆ2 h (j) Tˆ1
i
(j) T¯1
=
Vˆ (j)
ˆ (j) Tˆ(j) + L ˆ (j) W ˆ (j) = Q 2
ˆ (j)
H
=
(j) Aˆt
=
0ng +lr ×lr ′
(6.36)
′ (j) (j) (j)′ Tˆ2 Vˆ (j) Tˆ1 Tˆ1
"
"
(j) Aˆ(j) Tˆ1
0 Ilr
(6.37) ˆ (j)
+V ##
(j)′ Tˆ2
(6.38) (6.39)
and for 0 ≤ j ≤ N − 2: Aˆ(j+1)
′
(j) (j) = T¯1 Aˆt
ˆ (j+1) B
(j) ˆ (j) = T¯1 B
ˆ (j+1)
ˆ (j)
R
ˆ (j+1) Q ˆ (j+1)
L
(6.40)
′
(6.41)
ˆ (j)′
= R
ˆ (j)
+B
H
ˆ (j)
B
(6.42)
′
′
(j) ˆ (j) ˆ(j) (j) ˆ (j) ¯ (j) T1 + Aˆt H At = T¯1 Q
ˆ (j)
= L
(j) T¯1
ˆ (j)′
+B
ˆ (j)
H
(6.43)
(j) Aˆt .
(6.44)
Suppose: A(0) = A, B (0) = B, R(0) = R, L(0) = L, Q(0) = Q, X (0) = X and for 0 ≤ j ≤ N − 1: (j) T1
"
(j) Tˆ = 1 0
V (j) =
0 I(N −j−1)lr +nr " Vˆ (j)
#
(j) T2
,
0((N −j−1)lr +nr )×lr (j)
′
(j)
(j)′
(j+1)
B
=
(j) Tˆ2
0((N −j−1)lr +nr )×lr # " 0lr (j) , W = ˆ (j) W
#
(j)′
(j)′
+ V (j) T2
H (j) = T2 V (j) T1 T1 A(j+1) = T1
#
=
"
(j)
A(j) T1
(6.45)
(j)′ T1 B (j)
(6.46) ′
R(j+1) = R(j) + B (j) H (j) B (j) (j)
′
(j)
(j) T1
(j)
′
Q(j+1) = T1 (j+1)
L
=L
X (j+1) = T1
(j)
Q(j) T1
+B
(j)
+ T1
(j)′
H
′
(j)
(6.47) ′
(j)
A(j) H (j) A(j) T1 (j)
A
(j) T1
(6.48) (6.49)
(j)
X (j) T1
then X (j) is the stabilising and feasible solution to: X (j) = D(A(j) , B (j) , R(j) , L(j) , Q(j) ; X (j) ) where
X (j) =
(j) (j)′ T1 X (j+1) T1
+ H (j)
73
0 ≤ j ≤ N,
(6.50)
0 ≤ j ≤ N − 1.
(6.51)
The following hold for 0 ≤ j ≤ N − 1: ng +lr
"
(j)
A
(j)
L
B
(j)
R
(j)
#
ng +lr l
=
n ˜ (j) l lr l lw +m l
↔ Aˆ(j) 0 0 ˆ L(j)
ng +lr
h
Q(j)
H (j)
i
=
ng +lr l n ˜ (j) l
n ˜ (j)
0 ˜ B (j) 2
0 0
−γ I 0
n ˜ (j)
" ↔ ˆ (j) Q 0
l
r ↔
↔ A¯(j) A˜(j)
↔
0 0
ng +lr
↔ ˆ H (j) 0
lw +m
↔ ˆ (j) B 0 0 ˆ R(j)
n ˜ (j)
↔ # 0 0
(6.52)
(6.53)
where: n ˜ (j) = (N − 1 − j)lr + nr # " [N −j−1] B p (j) ˜ = B Br # " Ap [N −j−1] Bp [N −j−1] Cr (j) ˜ A = 0 Ar 0 0 0 ≤ j < N − 1 Ilr (j) ¯ A = 0 j =N −1 C
(6.54)
r
and
"
# ⋆ (j) ˆ B = 0 ˆ (j) R ˆ (j) L
Aˆ(j) ˆ (j) L
⋆
0 ˆ (j) R
(6.55)
in which the zero partitions have lr rows. Proof. Lemma 6.5 ensures that equations (6.52)(6.55) hold for j = 0 and so we may compute i′ h (0)′ ˆ (0)′ using Lemma 6.6. Equation (6.50) holds for j = 0 since X (0) = X. W Tˆ2 Now assume that (6.50) and (6.52)(6.55) hold for some j = ¯j where 0 ≤ ¯j ≤ N − 2. We now show that (6.52)(6.55) hold for j = ¯j + 1. We may repeat the arguments given in Lemma 6.6 (j) ˆ (j) as defined in (6.34) and (6.35). Therefore, the matrices A(j+1) , and compute Tˆ and W 2
B (j+1) , R(j+1) , L(j+1) , Q(j+1) may also be evaluated. For j = ¯j: A(j+1) =
"
′
(j) (j) Tˆ1 Aˆ(j) Tˆ1
0
# (j)′ Tˆ1 A¯(j) . A˜(j)
Expanding the top left partition of A(j+1) by lr rows and columns, while exploiting the structure ˜ gives: of A, A(j+1)
" Aˆ(j+1) = 0
74
# A¯(j+1) . A˜(j+1)
Also: B
(j+1)
"
ˆ (j) Tˆ1 (j)′ B 0
0 = ˜ (j) B
#
in which the top block row of B (j+1) is expanded by lr rows to give: =
"
# ˆ (j+1) B . 0
0 ˜ (j+1) B
Using: (j) A(j) T1
" (j) Aˆt = 0
(j) T1
" (j) T¯
# 0 ⋆
(6.56)
# 0 , ⋆
(6.57)
and =
1
0
allows the remaining partitions to be checked. For example : (j)
(j)
′
L(j+1) = L(j) T1 + B (j) H (j) A(j) T1 #" # " (j) " 0 0 0 0 T¯1 = (j)′ (j) ˆ ˆ 0 ⋆ B L 0 " # 0 0 = . (j+1) ˆ L 0
˜ (j)′ B 0
#"
ˆ (j) H 0
0 0
#"
(j) Aˆt 0
# 0 ⋆
Since: h
Aˆ(j+1)
" (j)′ (j) i Tˆ1 Aˆt (j+1) = ˆ B 0
# (j)′ ˆ (j) Tˆ1 B , 0lr
it follows that equations (6.52)(6.55) hold for j = ¯j + 1. The arguments of Lemmas 6.3, 6.4 and 6.6 may now be repeated to conclude that (6.50) holds for j = ¯j + 1. Since (6.50) and (6.52)(6.55) hold for j = ¯j + 1, we may also compute (¯ j+1) Tˆ which is a solution to (6.34) and (6.35). Thus (6.34), (6.35), (6.50) and (6.52)(6.55) 2
hold for j = ¯j + 1, and so it follows by induction that each of these statements is true for all j ≤ N − 1. A final application of Lemmas 6.3 and 6.4 shows that (6.50) also holds for j = N . Equation (6.51) is satisfied as a consequence of Lemma 6.4.
The main result of the section is now presented. Theorem 6.8. Suppose: β (0) = In (j)
β (j+1) = β (j) T1 Ψ(0) = 0n
′
Ψ(j+1) = Ψ(j) + β (j) H (j) β (j) .
75
(6.58)
Then X is a stabilising and feasible solution to: X = D(A, B, Q, R, L; X) ′
if and only if X (N ) = β (N ) Xβ (N ) is a stabilising and feasible solution to: X (N ) = D(A(N ) , B (N ) , Q(N ) , R(N ) , L(N ) ; X (N ) ),
(6.59)
in which case: ′
X = β (N ) X (N ) β (N ) + Ψ(N ) .
(6.60)
Proof. This follows directly from Lemma 6.7. In particular (6.60) follows from the recursive application of (6.51).
We have reduced the highdimensional DARE of order N lr + nr + ng to a DARE of order nr + ng , which may be solved using standard techniques (see e.g. Ionescu and Weiss (1992)). Equations (6.52) and (6.53) together with (6.36)(6.44) provide an efficient method for obtaining the parameters A(N −1) , B (N −1) , Q(N −1) , R(N −1) , L(N −1) . To perform the N th reduction, the formulae (6.45)(6.49) are used. The following result replaces testing of the nonnegativity of X with a lowdimensional alternative, which depends on Xgg only: ng
X=
" ↔ Xgg ′ Xgd
ng l N lr +nr l
N lr +nr
↔ # Xgd . Xdd
Lemma 6.9. There exists an internally stabilising K such that Fl (PF I , K)∞ < γ if and only if: 1. There exists a stabilising and feasible solution X (N ) to: the DARE X (N ) = D A(N ) , B (N ) , Q(N ) , R(N ) , L(N ) ; X (N ) ′ ′ ′ ′ 2. Ag − B2g (D12 D12 + B2g Xgg B2g )−1 (D12 C1g + B2g Xgg Ag ) is asymptotically stable.
Proof. We begin by showing that the stated conditions are necessary. If there exists an internally ¯ −1 L ¯ 2 is stable and stabilising K satisfying Fl (PF I , K)∞ < γ, then X ≥ 0 exists, A − B2 R 3 ∇ < 0 (see Section 6.2.1). By Theorem 6.8, it follows that there exists an X (N ) which is stabilising and feasible and so Condition 1 is necessary. Since: ¯ −1 L ¯2 = A − B2 R 3
"
Ag
B1gr Cd1
0
Ad
#
−
"
B2g 0
#
′ ′ ′ (D12 D12 + B2g Xgg B2g )−1 (D12 C1 + B2′ XA),
and h ′ ′ ′ D12 C1 + B2′ XA = D12 C1g + B2g Xgg Ag
⋆
i
,
¯ −1 L ¯ 2 implies that Condition 2 is also necessary. the stability of A − B2 R 3 76
We now show that the stated conditions imply the existence of a stabilising K such that Fl (PF I , K)∞ < γ. It is shown in Green and Limebeer (1995, p 488), that the DARE X = D(A, B, Q, R, L; X) may be written as: ¯ −1 L ¯ 2 )′ X(A − B2 R ¯ −1 L ¯2) + ∆ X = (A − B2 R 3 3
(6.61)
with: ¯ ′2 ) ¯ ′2 )′ (C1 − D12 R ¯ −1 L ¯ −1 L ∆ = −L∇ ∇−1 L′∇ + (C1 − D12 R 3 3 ¯1 − R ¯′ R ¯ −1 ¯ L∇ = L 2 3 L2 which is a discrete Lyapunov equation in X. If Conditions 1 and 2 hold, then the existence of X (N ) provides a solution X to (6.61) (by Theorem 6.8). Condition 2 together with the ¯ −1 L ¯ 2 is asymptotically stable. Since ∆ ≥ 0 asymptotic stability of Ad implies that A − B2 R 3 (because ∇ < 0), we conclude that X ≥ 0 and hence that a suitable K exists.
The evaluation of β (j) , Ψ(j) and X (j) apparently requires the manipulation and storage of order n2 matrices, which presents an unacceptable computational burden. The next result uses only lowdimension calculations to obtain β (N ) : Lemma 6.10. Define: (j) Tˆ1
=
" (j) # Tˆ
ng l
11
(6.62)
(j) Tˆ12
lr l
βˆ(0) = Ing " # ˆ(j) Tˆ(j) β 11 (j+1) βˆ = (j) Tˆ
(6.63) (6.64)
12
then: β
(j)
"
βˆ(j) = 0
0 I(N −j)lr +nr
#
0 ≤ j ≤ N.
(6.65)
Proof. It is obvious that (6.65) is satisfied for j = 0. Now assume that (6.65) is satisfied for some j = ¯j, 0 ≤ ¯j ≤ N − 1. Then:
β (j+1)
(j) (j) Tˆ11 0 βˆ 0 0 (j) (j) = β (j) T1 = 0 I 0 Tˆ12 0 0 I 0 0 I (j) (j) # " βˆ Tˆ11 0 βˆ(j+1) 0 ˆ(j) , = T12 0 = 0 I(N −j−1)lr +nr 0 I
and so (6.65) is also satisfied for j = ¯j+1. We therefore conclude that (6.65) holds for 0 ≤ ¯j ≤ N .
An inspection of the standard controller formulae given in Section 6.2.1 and Section 6.3.1, where the output feedback case is treated, shows that X only appears in the product B ′ X, or
77
in the expression ρ(XY ), in which Y is the solution to the H∞ estimation Riccati equation and ρ(·) denotes the spectral radius. Also, Lemma 6.9 only requires Xgg as does the evaluation of ρ(XY ). The following two Lemmas address computation of Xgg and B ′ X. ˆ (j) as: Lemma 6.11. Partition H ng
ˆ (j) = H
ng l lr l
l
r ↔ # (j) ˆ H 12 . ˆ (j) H
↔
"
ˆ (j) H 11 (j)′ ˆ H12
(6.66)
22
Define for 0 ≤ j ≤ N − 1: Λ(0) = 0(lw +m)×(N lr +nr +ng ) h ′ ′ ˆ (j) βˆ(j) ˆ (j) H Λ(j+1) = Λ(j) + B 1
11
(6.67) ′
i
ˆ (j) ˆ (j) H B 1 12
0
ˆ (N −1) Dr′ H 22
0
1
(6.68)
(j) ˆ (j) . Then: with Bˆ1 being the top ng rows of B
′
BX=
"h
′
ˆ (N −1) βˆ(N −1)′ Dr′ H 12 Λ(N ) ′
+ B (N ) X (N ) β (N )
i#
.
(6.69)
′
ˆ (j) to be partitioned as: Proof. To begin, note that (6.55) allows B ˆ (j) = B
ng l lr l
"
ˆ (j) B 1 0
#
.
(6.70)
Premultiplying (6.58) by B ′ gives ′
′
B ′ Ψ(j+1) = B ′ Ψ(j) + B (j) H (j) β (j) . Now note: B
(j)′
H
(j) (j)′
β
=
"
0 ˆ (j)′ B
# ˜ (j)′ ′ B H (j) β (j) 0
and using (6.53): h ˆ (j)′ B
i h ′ ′ ˆ (j) H ˆ (j) 0 H (j) β (j) = B 1 11
ˆ (j) H 12
i ′ 0 β (j) .
Also: h 0
i
˜ (j) H (j) β (j) B ′
It therefore follows that: B ′ Ψ(N ) =
′
0 = h ′ D′ H ˆ (j) βˆ(j)′ r
"h
12
(N −1)′
ˆ Dr′ H 12
′ βˆ(N −1)
Λ(N )
78
j ≤N −2 ˆ (j) Dr′ H 22
i 0
(N −1)
ˆ Dr′ H 22
j =N −1
0
i#
.
.
Premultiplying (6.60) by B ′ completes the proof.
(j) (j) Lemma 6.12. Define Ψgg to be the first ng columns and rows of Ψ(j) , and βˆg to be the first ng rows of βˆ(j) , then
Ψ(0) gg = 0ng
(6.71)
(j) ˆ (j) βˆ(j)′ Ψ(j+1) = Ψgg + βˆg(j) H gg 11 g
βˆg(0) = Ing
(6.72)
(j) βˆg(j+1) = βˆg(j) Tˆ11
and ) ˆ(N ) (N ) ˆ(N )′ Xgg = Ψ(N gg + βg Xgg βg
(6.73)
Proof. Result follows from partitioning (6.58) and (6.60) and noting that: (j+1) Ψgg
=
(j) Ψgg
h + βˆg(j)
= Ψ(j) gg +
i
0 H
(j)
# " (j)′ βˆg 0
ˆ (j) βˆg(j)′ . βˆg(j) H 11
The solution method may be summarised by the following algorithm: Algorithm 6.1 (Efficient Full Information synthesis ). 1. Select initial N and γ values. ˆ (N −1) , R ˆ (N −1) , Q ˆ (N −1) , L ˆ (N −1) using (6.36)(6.44), and compute 2. Compute Aˆ(N −1) , B (N ) (N ) Ψgg and βˆg using (6.72) and (6.71). If the computation fails (i.e. there exists a j in (j)
the set 0 ≤ j ≤ N − 1 such that a suitable T2 and goto 2.
cannot be found) increase N and/or γ,
3. Compute A(N ) , B (N ) , R(N ) , Q(N ) , L(N ) using (6.52), (6.53) and one application of (6.45)(6.49). 4. Compute the stabilising solution to X (N ) = D A(N ) , B (N ) , Q(N ) , R(N ) , L(N ) ; X (N ) . If a stabilising solution exists and it is feasible, then continue, otherwise increase N and/or γ, and go to 2. 5. Compute Xgg using (6.73). 6. Use Lemma 6.9 to check if a stabilising K satisfying Fl (PF I , K)∞ < γ exists. If a suitable K does not exist then increase N and/or γ, and goto 2. 7. Compute B ′ X using Lemma 6.11. Compute K using the formulae in Section 6.2.1, or return to Algorithm 6.2 (Output Feedback synthesis).
79
For any N , there exists a γ such that a suitable controller exists. However, for a given γ, there may not be a solution for any N . It may be useful, therefore, to bound the search space with a maximum N . The choice of maximum N would usually arise naturally from the physical problem being solved. It is worth noting that the recursions which produce the quantities in step 2 do not depend on N , and so it is not necessary to repeat the entire recursion when N is incremented. Whilst iterating over γ and N , all computed matrices have dimension ng + nr + lr or less. The evaluation of larger matrices is only necessary when evaluating the controller.
6.3 6.3.1
Output Feedback Solution Standard Theory
We now consider a discretetime, linear, timeinvariant system, P , of the form:
s
P =
nl pl ql
↔ A
n
↔ B1
C1 C2
D11 D21
l
m
↔ B2 , D12 0
which satisfies (A1)(A3) as well as: (A4) (A, C2 ) is detectable, ′ (A5) D21 D21 > 0, " A − ejθ I (A6) rank C2
B1 D21
#
=n+q
∀ θ ∈ (−π, π].
Now define: # C1 C= C2 h ′ M = B1 D11 "
′ D21
¯ = M + AY C ′ M
i
S=
"
′ D11 D11 − γ 2 Ip
′ D11 D21
′ D21 D11
′ D21 D21
#
S¯ = S + CY C ′
" # C1 ¯ to give: The matrix S is partitioned conformably with C = C2 "
S¯1 S¯ = S¯′
2
# S¯2 . S¯3
It is shown in Green and Limebeer (1995) that an internally stabilising Output Feedback (OF) controller satisfying Fl (P, K)∞ < γ exists iff there exists X which is a stabilising, feasible and nonnegative solution to (6.1) and there exists Y which is a stabilising, feasible and nonnegative solution to: ¯ S¯−1 M ¯ ′ + B1 B ′ Y = AY A′ − M 1
80
(6.74)
such that ρ(XY ) < γ 2 (where ρ(·) denotes the spectral radius). The matrix Y is stabilising if: ¯ S¯−1 C is stable A−M and feasible if S¯1 − S¯2 S¯3−1 S¯2′ < 0. If we define: Z = Y (I − γ −2 XY )−1 ¯1 − R ¯ 2′ R ¯ −1 L ¯2 L∇ = L 3 ′ ¯3 V12 V12 = R ′ V21 V21 = −γ −2 ∇ −1 A − B1 ∇−1 L∇ B1 V21 ˜ At Bt = V12 R ¯ −1 (L ¯2 − R ¯ 2 ∇−1 L∇ ) V12 R ¯ −1 R ¯ 2 V −1 3 3 21 ˜t Ct D −1 C2 − D21 ∇−1 L∇ D21 V21 # " Il 0 ˆ J= 0 −γ 2 Im h i ˜t JˆD ˜ t′ + At ZCt′ = Mt1 Mt2 Mt = B # " St1 St2 ′ ′ ˜ ˆ ˜ St = Dt J Dt + Ct ZCt = ′ St2 St3
with Mt and St partitioned conformably with Ct =
" # Ct1 Ct2
0
Im 0
, then a suitable controller which
achieves the desired performance level is given by: K=
"
AK
BK
CK
DK
#
−1 −1 −1 −1 AK = At + B2 V12 St2 St3 Ct2 − B2 V12 Ct1 − Mt2 St3 Ct2 −1 −1 −1 St2 St3 − B2 V12 BK = Mt2 St3
(6.75)
−1 −1 −1 CK = −V12 Ct1 + V12 St2 St3 Ct2 −1 −1 . St2 St3 DK = −V12
6.3.2
Efficient Output Feedback Controller Synthesis
In this section we aim to find a computationally efficient solution to the DARE (6.74), given that P has the structure described in (3.1). The results of this section do not depend on the internal structure of Ap , Bp and Cp (though we do require that Ap is stable).
81
Lemma 6.13. If we define: Mg = B1gw
h
′ D21gw
′ D11gw
¯ g = Mg + Ag Yg Cg′ M " ′ D11gw D11gw − γ 2 Ip Sg = ′ D21gw D11gw
# " C1g Cg = C2g
i
S¯g = Sg + Cg Yg Cg′ ′ D11gw D21gw ′ D21gw D21gw
#
then the DARE: ′ ¯ g S¯g−1 M ¯ g′ + B1gw B1gw Yg = Ag Yg A′g − M ,
(6.76)
has a feasible, stabilizing and nonnegative solution if and only if there exists a feasible, stabilizing " and #nonnegative Y which solves (6.74). Furthermore, these solutions are related by Yg 0 Y = . 0 0 ¯ Proof. Suppose (6.76) has a feasible, stabilizing # and nonnegative solution. The matrix Sg may " C1g to give: be partitioned conformably with Cg = C2g "
S¯1g S¯g = S¯′
2g
# S¯2g . S¯g3
Since Yg is stabilising: ¯ g S¯−1 Cg is stable, Ag − M g and since Yg is feasible: −1 ¯′ Sg2 < 0. S¯g1 − S¯g2 S¯g3
We will now show that Y =
" Yg
# 0
0
0
is a stabilising and feasible solution to (6.74). By direct
calculation: # " S¯g 0 ¯ S= 0 Dr Dr′ " # Ag Yg A′g 0 ′ AY A = . 0 0
# " ¯g M 0 ¯ M= 0 Bd Dr′ # " ′ B1gw B1gw 0 ′ B1 B1 = 0 Bd Bd′ It can be checked that: ¯ S¯−1 M ¯ ′ + B1 B ′ = AY A − M 1 ′
"
¯ g S¯−1 M ¯ ′ + B1gw B ′ Ag Yg A′g − M g g 1gw 0 "
Yg Therefore, if Yg solves (6.76), then Y = 0
# 0 solves (6.74). 0
82
# 0 0
=
" Yg 0
# 0 0
= Y.
η
z
r
Wr
e −
Φ G y
w
zˆ F
6.4: An output estimation problem in which a stable filter F is chosen which minismises Figure T[η′ w′ ]′ →e . ∞ We now need to check that this Y is stabilising. Note that: " ¯ g S¯−1 Cg Ag − M g −1 ¯ ¯ A − MS C = 0
⋆ Ad − Bd Dr−1 Cd2
#
The square matrix Dr is invertible by assumption (A5) and the matrix Ad − Bd Dr−1 Cd2 is stable because: # " Ap 0 −1 Ad − Bd Dr Cd2 = 0 Ar − Br Dr−1 Cr in which Ap is stable and Ar − Br Dr−1 Cr is stable because Wr is assumed to be outer. Since Yg ¯ g S¯g−1 Cg is stable, and hence that A − M ¯ S¯−1 C is stable. is stabilising, we know that Ag − M # " Yg 0 , then: If Y = 0 0 S¯3 =
"
S¯g3
0
0
Dr Dr′
#
,
h S¯2 = S¯g2
i 0 ,
S¯1 = S¯g1
and so: −1 ¯′ S¯1 − S¯2 S¯3−1 S¯2′ = S¯g1 − S¯g2 S¯g3 Sg2
# Yg 0 is a feasible solution to (6.74) if Yg is a feasible solution (6.76). Thus Y = 0 0 Now suppose that (6.74) has a stabilising, feasible and nonnegative solution. Using standard results in Green and Limebeer (1995)[p 495], such a Y exists iff there exists an F (see Figure 6.4) " # which provides an estimate for z such that the infinity norm of the transfer function from w to e (as defined in Fig. 6.4) is less than γ. The same filter also ensures that the infinity η norm of the transfer function from w to e is less than γ. The existence of such a filter implies "
that a stabilising, feasible and nonnegative Yg exists. Having found efficient methods for computing Y and X, the matrix Z is found easily: Z = Y (I − γ −2 XY )−1 " Yg (I − γ −2 Xgg Yg )−1 = 0
# " Zg 0 = 0 0
# 0 0
in which Zg ∈ Rng ×ng . Also, it is straightforward to check that ρ(XY ) = ρ(Xgg Yg ). The output feedback controller synthesis procedure is summarised in the following algorithm:
83
y
r
IIR
FIR Order N lr
u
Order ng IIR Order nr Figure 6.5: Illustration of the structure of the central H∞ suboptimal preview controller. Note that only the FIR block is of high order.
Algorithm 6.2. 1. Chose initial γ and N values 2. Is Yg stabilising, feasible and nonnegative? Yes→ Continue; No→ Increase γ and Goto 2. 3. Is X stabilising, feasible and nonnegative (see Algorithm 1)? Yes→ Continue; No→ Increase γ and/or N and Goto 3. 4. Recompute Yg if γ has changed since step 2. 5. Is ρ(Xgg Yg ) < γ 2 ? Yes→ Stop; No→ Increase γ and/or N and Goto 3. As before, for a particular γ, there may not be a solution for any N and so it is necessary to bound the search space with a maximum N .
6.3.3
Efficient Implementation
We now have a complete method for efficiently computing the output feedback preview controller, however, in its present form, this controller has the same order as the generalized plant. In general, a controller of this order cannot be implemented. Fortunately the high order part of the controller is an FIR block (as illustrated in Figure 6.5), for which efficient implementations exist. This controller structure is proved in the following Lemma: Lemma 6.14. The central controller described in (6.75) for the plant in (3.1) can be written in the form:
K
s
=
"
AK
BK
CK
DK
#
=
AKgg
AKgp
AKgr
BKgy
BKgr
0 0
Ap 0
0 Ar − Br Dr−1 Cr
0 0
Bp Br Dr−1
CKg
CKp
CKr
DKy
DKr
(6.77)
where AKgg ∈ Rng ×ng and BKgg ∈ Rng ×q . Proof. The invertibility of Dr is guaranteed by assumption (A5) together with the fact that Wr
84
is square. Now define BK AK Mt2 St3
# BKg = BKd # " AKg = AKd # " Mt2g = Mt2d # " St3y = St3r "
with BKd ∈ Rnr +N lr ×q with AKg ∈ Rng ×n with Mt2d ∈ Rnr +N lr ×q with St3r ∈ Rlr ×q .
h i We will first show that BKd = 0 Bd Dr−1 (and hence BK has the structure in (6.14)).
−1 From (6.75) it is clear that BKd = Mt2d St3 . We can write: ′
−1 −1 ′ ′ Mt2 = At ZCt2 + B1 V21 V21 D21 ′
−1 −1 ′ ′ V21 D21 = (A − B1 ∇−1 L∇ )Z(C2′ − L′∇ ∇−1 D21 ) + B1 V21 ′ ′ ′ = AZC2′ − B1 ∇−1 L∇ ZC2′ − AZL′∇ ∇−1 D21 + B1 ∇−1 L∇ ZL′∇ ∇−1 D21 − γ −2 B1 ∇−1 D21
Since Z = so:
"
Zg
0
0
0
#
h Mt2d = Bd
, the entries in the bottom N lr + nr rows of the matrix AZ are all zero, and
i h 0 ∇−1 L∇ ZC2′ + Bd
i h ′ − γ −2 Bd 0 ∇−1 L∇ ZL′∇ ∇−1 D21
i ′ 0 ∇−1 D21
We can also write: ′
−1 −1 ′ ′ V21 D21 St3 = Ct2 ZCt2 + D21 V21 ′ = C2 ZC2′ − D21 ∇−1 L∇ ZC2′ − C2 ZL′∇ ∇−1 D21 ′ ′ + D21 ∇−1 L∇ ZL′∇ ∇−1 D21 − γ −2 D21 ∇−1 D21
If we partition St3 as St3
# St3y with St3r ∈ Rlr ×q , then = St3r "
h St3r = Dr
i h i ′ 0 ∇−1 L∇ ZC2′ + Dr 0 ∇−1 L∇ ZL′∇ ∇−1 D21 h i ′ , − γ −2 Dr 0 ∇−1 D21
h i from which it follows that Mt2d = Bd Dr−1 St3r . If, additionally, we note that St3r = 0 I St3 then we can conclude that h i −1 Mt2d St3 = 0 Bd Dr−1 = BKd as required. We now turn our attention to AK , which may be partitioned as AK Rng ×n . Equation (6.75) implies that: h i h AKd = 0 Ad − Bd
(6.78)
# AKg , with AKg ∈ = AKd "
i −1 (C2 − D21 ∇−1 L∇ ). 0 ∇−1 L∇ − Mt2d St3 85
Now (6.78) can be used together with the relations: h
i h i 0 Bd Dr−1 D21 = Bd 0 h i h i 0 Bd Dr−1 C2 = 0 Bd Dr−1 Cd2
to show that h i AKd = 0 Ad − Bd Dr−1 Cd2 # " 0 Ap 0 = 0 0 Ar − Br Dr−1 Cr and so AKd has the desired structure. The following loworder implementation is then obtained:
s ¯ = K
AKgg
AKgr
BKgy
AKgp
0
Ar − Br Dr−1 Cr
0
0
CKg
CKr
DKy
CKp
BKgr
Br Dr−1 , DKr
(6.79)
where the optimal control is given by: " # y ¯ u =K r¯ r(k − N ) .. . r¯(k) = . r(k) ∗
If L∇g is the first ng columns of L∇ , and Ag is the first ng rows of A, then it is straightforward to show that the controller parameters may be efficiently computed using the following formulae: h
AKgg
AKgp
i h AKgr = AKg = Ag
B1gr Cp
i 0 + B1g ∇−1 L∇
(6.80)
−1 −1 −1 −1 Ct2 (6.81) Ct1 − Mt2g St3 Ct2 − B2g V12 St2 St3 + B2g V12
h BKgy
i −1 −1 −1 St2 St3 − B2g V12 BKgr = BKg = Mt2g St3
(6.82)
where: ′ ′ Mt2g = −B1g ∇−1 D21 γ 2 + (Ag − B1g ∇−1 L∇g )Zg Ct2g .
(6.83)
The matrix L∇ can be efficiently computed using the expression for B ′ X given in Lemma 6.11. The matrices CK and DK are computed directly using (6.75).
86
η
r
Wr
Φ w
z
G
KF F
u
Figure 6.6: A feedforward controller design problem. The notation follows that of Figure 1.5.
6.4
Feedforward Solution
Unlike the H2 case, the signal w cannot be neglected. The problem considered in this section is illustrated in Figure 6.6, and the corresponding generalised plant is given by:
PF F
Ag
B1gr Cd1
0
0 Ad Bd = C 1g D11gr Cd1 0 0 Cd2 Dr A B1 B2 = C1 D11 D12 . C2 D21 0 s
B1gw
B2g
0
0
D11gw
D12
0
0
(6.84)
(6.85)
We will assume that this plant satisfies assumptions (A1)(A6) and that Wr is outer. The Full Information part of this problem may be solved using the theory in Section 6.2.2. The estimation part of the problem is tackled in the following result: Lemma 6.15. If we define: ′ Mg = B1gw D11gw
′ Sg = D11gw D11gw − γ 2 Ip
′ ¯ g = Mg + Ag Yg C1g M
′ S¯g = Sg + C1g Yg C1g
then the DARE: ′ ¯ g S¯g−1 M ¯ g′ + B1gw B1gw Yg = Ag Yg A′g − M
has a feasible, stabilizing and nonnegative solution if and only if there exisits a feasible, stabilizing and nonnegative Y which solves the # version of (6.74) relating to (6.84). Furthermore, these " Yg 0 . solutions are related by Y = 0 0 Proof. Precisely follows the proof of Lemma 6.13. The optimal feedforward controller can then be computed by using the formulae from the previous section, except with the matrix partitions relating to the signal y having been removed. This fact may be verified by retracing the derivations in the previous section, except using the generalised plant definition given in (6.84) instead of (3.1). If w is removed (i.e. B1gw = 0 and D11gw = 0) then it is easy to check that, analogous the H2 case, Yg = 0 is a stabilising, nonnegative and feasible solution to (6.76).
87
0.5 Measured time t= 1.40e−002+4.45e−004× N
0.45
Computational Time (s)
0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0
0
100
200
300
400 500 600 Preview Length
700
800
900
1000
Figure 6.7: Computational time required to efficiently compute Xgg and Yg , and to test for the existence of K satisfying Fl (P, K)∞ < γ. The plant was identical to that used in Section 1.3.
6.5
Computational Time
For the example system described in Section 1.3, the computational time required to compute Xgg and Yg , and also to test for the existence of K satisfying Fl (P, K)∞ < γ, is illustrated in Figure 6.7. The times were measured for a 3.2GHz Intel Pentium 4 with 1GB RAM running the MATLAB code described in Appendix B.1. The computational complexity appears to be O(n), in contrast to the direct DARE solution which is at least O(n3 ) (see Figure 1.6). The time required to check for existence of a suitable K is 0.459s at N = 1000. The time to compute the corresponding controller is 0.941s; the larger time results from the additional requirement to compute B ′ X. If, as in Section 1.3, it is assumed that we have 5 iterations over γ and 20 design iterations, then the total computational time is 64.7s (= 20 × (0.459 × 5 + 0.941)), in comparison to 69 days for the direct DARE solution.
6.6
Conclusions
In this chapter a class of previewable disturbance rejection problems were solved by exploiting the standard theory of H∞ regulator synthesis in combination with efficient methods for solving a particular class of highorder gametheorytype Riccati equations. The results are directed at Output Feedback H∞ control problems that involve both previewable and nonpreviewable reference and/or disturbance inputs. The technical focus was on the development of algorithms that solve high previewdimension problems using only lowdimension calculations and the solutions to loworder Riccati equations. The standard controller existence conditions involving the signdefiniteness of solutions to Riccati equations, as well as a spectral radius condition, could also be tested using only lowdimension computations. The majority of the technical difficulty was found to be in the solution to the Full Information problem. The extension to the Output Feedback case was relatively straightforward because, in contrast to established results on H∞ preview control, the problem was treated within a standard generalised regulator framework. The final Output Feedback controller was found to 88
have an efficient implementation that closely parallels that derived for the H2 case. The computational complexity of the algorithm was estimated to be O(n) in contrast to O(n3 ) for the bruteforce solution. For an example problem with N = 1000, the efficient algorithm completed 92,000 times faster.
89
Chapter 7
Additional H∞ Analysis and Results Chapter Objective To present an alternative approach to the solution of the Full Information Preview DARE, and to derive a lower bound on the achievable closedloop H∞ norm.
7.1
An Alternative Solution Method Based on Recursive Construction of Deflating Subspaces
In this section we show how the maximal Stable Deflating Subspace (SDS) for the FI Extended Symplectic Pencil (ESP) for preview length N + 1 can be obtained from the maximal SDS corresponding to the N step problem. This leads to a method for computing the FI DARE solution for (N + 1)steps, X [N +1] , from the solution for N steps, X [N ] . Since X [1] can be computed directly, this could form the basis for a recursive solution technique. Such a method will only succeed if the existence of a stabilising X [N +1] implies the existence of a stabilising X [N ] . Unfortunately, as discussed in Section 2.3, and also in Example 2 of Tadmor and Mirkin (2005b), the existence of such a solution cannot be guaranteed. Despite this, the following results are included because they reveal some interesting structure and also suggest possible links to receding horizon H∞ control. We will use the shorthand A = A[N ] and A+ = A[N +1] . Also, a version of equation (x) with N preview steps will be referred to as (x), and a version with N + 1 preview steps will be referred to as (x)+ . Without loss of generality, we will make the additional assumptions that Wr = I and that R (as defined in Section 6.2.1) is invertible. For details of transformations that ensure R is invertible, see Ferrante and Wimmer (2007), and for a justification of Wr = I see Section 4.5. The generalised plant for this section is given by: n
nl s
PF I =
pl nl ll
l
↔ A
↔ B1
C1 I 0
D11 0
90
I
m
↔ B2 D12 0 0
(7.1)
where: "
A
B1
B2
C1
D11
D12
#
Ag = 0 C1g
B1gr Cp Ap
0 Bp
B1gw 0
D11gr Cp
0
D11gw
B2g 0 . D12
(7.2)
The assumption that R is invertible allows us to work with a compressed pencil, as described by the following result. Lemma 7.1. If R is invertible, the matrix: U1 U = U2 U3
satisfies: M U = ZU S if and only if: U3 = −R−1 (B ′ U2 S + LU1 ) and Mr
"
" # # U1 U1 S = Zr U2 U2
(7.3)
with: Mr =
"
Av
0
H
−I
#
V −A′v
#
"
I Zr = 0 and
Av = A − BR−1 L H = Q − L′ R−1 L V = BR−1 B ′ . Proof. Define: I T = 0 0
0
−BR−1
I 0
−L′ R−1 . I
91
If U satisfies M U = ZU S, then T M U = T ZU S. Writing out the blocks of this equation gives: Av U1 = (U1 + V U2 )S HU1 − U2 = −A′v U2 S LU1 + RU3 = −B ′ U2 S, from which the result immediately follows. We may therefore solve the DARE (6.1) by finding the maximal SDS of the pencil Mr − λZr , instead of the maximal SDS of the ESP. The use of this pencil for solving DAREs was first proposed by Pappas et al. (1980) for the case where R > 0. If X is a solution to (6.1), then it follows from the above result together with (6.8) that: Mr
" # I X
= Zr
" # I X
Ac ,
(7.4)
which implies the following alternative form for the DARE (6.1): X = A′v (I + XV )−1 XAv + H
(7.5)
with: Ac = (I + V X)−1 Av . We now present a result which relates the solution of the N step DARE to the SDS for the (N + 1)step reduced pencil. Lemma 7.2. If X is the stabilising solution to (6.1), X + is the stabilising solution to (6.1)+ , and N > 0, then: Mr+ U +
=
Zr+ U +
" Ac 0
# P , 0
(7.6)
where:
U+
I −2 ′ γ E XAc = X ′ E XAc
0
I + γ −2 E ′ XP , A′c XE E ′ XP
P = (I + V X)−1 E, # " 0ng +(N −1)lr ×lr , E= Ilr
(7.7)
(7.8) (7.9)
and furthermore U + is a basis for the maximal SDS of the pencil Mr+ − λZr+ . Proof. See Appendix A.2. We continue to assume that X is a stabilising solution to (6.1) and that X + is the stabilising
92
solution to (6.1)+ . Now partition U + as: U
+
" # U1+ = , U2+
and so obtain the relationship: X
+
=
U2+
−1 U1+
=
"
X
Av ′ XP
E ′ XAc
E ′ XP
#"
I
0
−γ −2 W −1 E ′ XAc
W −1
#
,
(7.10)
with: W = I + γ −2 E ′ XP.
(7.11)
The assumption that X + solves (6.1)+ implies that the (N + 1)step ESP is disconjugate, and hence U1+ is invertible. This in turn guarantees that W is invertible, as required by (7.10). Equation (7.10) can be rearranged to give the following result: Lemma 7.3. If X is the stabilising solution to (6.1), X + is the stabilising solution to (6.1)+ , and N > 0, then # X 0 A+ + Q+ X+ = A 0 0 " # ! " X 0 X ′ ′ − A+ B + + L+ R + B+ 0 0 0 +′
"
0 0
#
B+
!−1
B
+′
" X 0
0 0
#
A+ + L+
!
(7.12)
Proof. See Appendix A.2. This result could form the core of a recursive algorithm for generating DARE solutions for increasing preview lengths. Further refinements are then possible so that we compute only the parts of X necessary to synthesize the controller. It turns out that the final form of the algorithm is a generalisation of the results in Bolzern et al. (2004), although we have approached the derivation from an entirely different perspective. It should be emphasised that these conditions are only sufficient; it is possible that there exists an X + which solves (6.1)+ , and yet there does not exist an X which solves (6.1). The formula in (7.12) is quite strikingly similar to the H2 version given in (5.4), which is interesting because it provides the first point of contact between the solutions to the H2 and H∞ Preview Control problems. Additionally, the similarities with the Discrete Riccati Difference Equation (Green and Limebeer, 1995) hints at a link between H∞ Preview Control and a certain receding horizon H∞ tracking problem. However, unlike the H2 case, the recursion is not guaranteed to exist for all N , and so it is difficult to make a formal link to a receding horizon problem.
7.2
A Bound on Achievable Performance
When a large amount of preview is available, it may be desired to find the smallest N for which the closedloop satisfies a given H∞ performance bound γ. In some cases the performance bound may not be satisfied for any N ; in order to prevent unnecessary search over N , it will be useful to derive a lower bound on the H∞ norm which might be achieved. First we require a result concerning the spectrum of previewtype FI ESPs: 93
Lemma 7.4. If N > 0, then: 1. Mr+ − λZr+ is regular if and only if Mr − λZr is regular. 2. λ 6= 0 is an eigenvalue of Mr+ − λZr+ if and only if λ is an eigenvalue of Mr − λZr . Proof. Using Lemma A.1 we can write:
Mr+
−
λZr+
Av − λI 0 = H 0
E −λI
−λV − λγ −2 EE ′ 0
0
λA′v − I
0
λE ′
0
λγ −2 I . 0 −I
Performing column and row permutations and defining P1 , P2 , P3 and P4 , gives: "
P1
P2
P3
P4
#
Av − λI H = 0 0
−λV − λγ −2 EE ′ λA′v − I
E 0
0 λE ′
−λI 0
0 0
. −2 λγ I −I
Now note that: P4−1
=
" −λ−1 I
−γ −2 I
0
−I
#
∀λ 6= 0,
and so application of the identity det
"
P1
P2
P3
P4
#
= det P4 det(P1 − P2 P4−1 P3 ),
leads to the conclusion that: det Mr+ − λZr+ = (−λ)lr det (Mr − λZr )
∀λ 6= 0,
from which the result immediately follows.
Now we are able to provide a computationally cheap bound on achievable performance: Lemma 7.5. If there exists a stabilising solution X to the DARE (6.1), then γ > γlow where γlow is the infimal value of γ for which the following pencil is dichotomic (has no eigenvalues on the unit circle): "
Av [1]
0
H [1]
−I
#
−λ
"
I 0
V [1] −A′v
[1]
#
(7.13)
Proof. First note that the pencil (7.13) is in fact Mr [1] − λZr [1] . Recursive application of Lemma 7.4 implies that (7.13) is dichotomic if and only if Mr − λZr is dichotomic. It then follows that M − λZ is dichotomic if and only if (7.13) is dichotomic. Dichotomy of M − λZ is a necessary condition for existence of a stabilising X (see Section 6.2.1), and so we must have γ > γlow if a stabilising solution exists.
94
This result generalises Takaba (2003, Theorem 2). It is interesting to note that this relationship is similar to Kojima and Ishijima (2003, Theorem 1), where a continuoustime performance bound is stated in terms of the eigenvalues of a plantsized Hamiltonian matrix. The following result is conjectured: Conjecture 7.1. Assume that the nonpreviewable signal w is missing, then in the limit as N → ∞, the H∞ optimal closed loop achieves γ = γlow . In other words, in the absence of w, it is conjectured that it is the dichotomoy of the pencil (not disconjugacy, or nonnegativeness of X) that limits performance. Whilst counterexamples to this conjecture have not been found, there has thus far been no progress towards a proof.
7.3
Failure on a Point Set of γ Values
It is possible that for some N there exists a stabilising X + which solves (6.1)+ , and yet there does not exist a stabilising X which solves (6.1) (an example is provided in Tadmor and Mirkin 2005b). This means that it is not feasible to use Lemma 7.3 as a recursive algorithm for generating DARE solutions. However, if X + exists then the (N + 1)step ESP is regular and dichotomic, and so Lemma 7.4 implies that the N step ESP is also regular and dichotomic. Therefore the only circumstances under which X + exists but X does not exist, is if the N step ESP is not disconjugate. The following conjecture is based on a result that is proved in Colaneri and Ferrante (2004) for a related fixedlag smoothing problem. Conjecture 7.2. If γ > γlow then there are at most ng values of γ for which the ESP is not disconjugate. This conjecture implies that there are at most ng point values of γ for which a given step in a recursion based on Lemma 7.3 could fail. Since these ‘forbidden’ values are different for each preview length, it follows that there are at most N × ng point values for which the algorithm will fail. It may seem that avoiding a point set of γ values is a relatively mild restriction, however, the real problem is that close to these values, the inversion in (7.12) becomes poorly conditioned and the associated X becomes large. The author is not aware of a proof of Conjecture 7.2 in the literature to date.
7.4
Conclusions
Assuming there exists a stabilising X [N ] and X [N +1] , a formula has been provided that links these two quantities. It has been shown that the only condition under which X [N +1] exists, but X [N ] does not exist, is one where the N step ESP is not disconjugate. It was conjectured that this can only occur on a point set of γ values. Although the formula relating X [N ] and X [N +1] is similar to the H2 version (5.4), a lack of necessity in the H∞ result prevented analogous links being made to a receding horizon H∞ control problem. It was found that the nonzero eigenvalues of the ESP are independent of preview length, and this result led to a computationally inexpensive method for computing a lower bound on the achievable Full Information closedloop H∞ norm. Sections 7.1 and 7.3 are primarily of theoretical interest, whereas Section 7.2 is practically useful in that its results may reduce the time required to synthesise a H∞ preview controller. 95
Chapter 8
Behaviour and Features of Preview Controllers Chapter Objective To summarise the major features of H2 and H∞ preview controllers, and to provide a guide for control system designers.
8.1
Generic Controller features
In this section we summarise some of the generic features of preview controllers which emerge from the theory presented in the preceding chapters.
8.1.1
H2 and H∞ controllers
Full Information control structure. The Full Information control signal has the form u(k)∗ = u ˆ(k) +
N X
Fp,j r(k − N + j),
j=0
in which u ˆ(k) is a linear function of the states of G and Wr , and of the signals η and w; the Fp,j ’s are sometimes referred to as the ‘preview gains’. The preview gains decay to zero as N → ∞. It was first noted in Tomizuka and Whitney (1975) that the magnitude of the LQ preview gains approaches zero as N approaches infinity; in the H2 case this follows from equation (4.26) and limN →∞ AN cg = 0. This means that fardistant preview information is relatively less important and that the infinite preview length controller can be approximated to arbitrary accuracy using a finite preview length. Such an effect is also observed for H∞ controllers, though no proof has yet appeared in the literature. The controller has FIR (preview) and IIR components. Discretetime preview controllers are composed of a highorder Finite Impulse Response (FIR) preview component, and loworder Infinite Impulse Response (IIR) components. This structure is illustrated in Figure 6.5, and is also highlighted for the H2 continuoustime case in Moelja and Meinsma (2006). For the discretetime case a proof is provided in Section 4.3 (H2 ) and Section 6.3 (H∞ ). If the controller is written in observer form, then the states of the FIR preview
96
y(k) r(k − N ) .. .
¯ K
u(k)
r(k)
Figure 8.1: The structure of the H2  or H∞ optimal discretetime preview controller. The signal u(k) is the control, the measurement is y(k), and r(k) is the futuremost value of the previewable disturbance.
block and the order nr IIR block are (perfect) reconstructions of the states of Φ and Wr respectively. The state of the order ng IIR block is an estimate for the state of G. The controller is essentially loworder. A discretetime FIR transfer function can be realised using a shiftregister to update the state, and a gain array to compute the output. This representation leads to the loworder controller representation in Figure 8.1, where ¯ is given by (4.42) for the H2 case and by (6.79) for the H∞ case. K Noisy preview signals require a highorder controller. One might consider an uncertain preview problem, where the controller has access only to a noisecorrupted version of the previewed signal. In this scenario, the states of Φ are not known, and must be estimated. The preview provides benefit both by reducing the Full Information control cost, and by reducing the estimation cost. Estimating the states of Φ is a type of fixedlag smoothing problem. Loworder implementations of fixedlag smoothers are given in Anderson and Moore (1979), but these implementations are not usable here, because of the need for an estimate of all of the states of Φ, rather than just the output of Φ. The resulting controller is thus of the same order as the augmented plant. A controller for this problem may be synthesised by direct application of the results in Section 4.3.1 (H2 ) or Section 6.3.1 (H∞ ).
8.1.2
H2 only
The optimal control is independent of Wr for large N This phenomenon was first noticed in Tomizuka and Whitney (1975), with a proof provided in Section 4.2 of this thesis. It is instructive to consider the influence of Wr from a stochastic perspective. Since η is assumed to be a realisation of a whitenoise process, then a dynamic Wr provides statistical information on future values of r. We would therefore expect Wr to reduce the need for preview, and also that its influence on the control would decline as N tends to infinity. The optimal Tw→z is independent of Wr . In contrast with the H∞ case, there is no conflict between the rejection of w and the rejection of η, and hence Wr tunes only the closedloop Tη→z ; a proof of this is provided in Section 4.3.
8.2
Design Insights for Preview Tracking Controllers
This section provides a number of ‘rules of thumb’ and observations that the author has found useful. For the purposes of illustration, we will consider the Full Information preview tracking
97
η
Wr
r
Φ
zg u
− e +
We
z1
G z2 Figure 8.2: A simple preview tracking problem. The feedback signal is derived from the states of G, Wr , We and Φ, together with η. The signal u is the control, r is the previewed reference, ′ and z = [z1′ z2′ ] is the output to be minimized. problem described in Figure 8.2, where G is given by: 1.26 × 10−8 (Z + 1)3 (Z − 1)(Z 2 − 1.998Z + 0.998) " # ˆ G G = . 1 ˆ = G
(8.1)
ˆ was obtained by discretising The discrete transfer function G 101 , s(s2 + 2s + 101) using a sample time of 0.001 seconds. We search for a K which minimises Tη→z 2,∞ , or equivalently, the K which minimises: " # W W T e r r→e . Wr Tr→u 2,∞
(8.2)
Clearly this represents a tracking problem in which minimisation of tracking errors must be balanced against excessive control requirements. The transfer functions Wr and We may be chosen to reflect, respectively, the expected frequency content of r, and the importance of achieving good tracking at a given frequency. In the H∞ case, it is perhaps more useful to formulate the optimisation in terms of frequency response bounds. If the H∞ version of (8.2) is minimised, and γ is the norm bound, then the following closedloop frequency response bounds are satisfied: Tr→e ejθ < We ejθ −1 Wr ejθ −1 γ Tr→u ejθ < Wr ejθ −1 γ.
We will now use this example to illustrate some general properties of H2 and H∞ preview tracking controllers. In most of the following examples, the weighting functions are chosen with the H2 controller in mind, and the H∞ optimal responses are given for comparison only. It is likely that the performance of the H∞ controllers could be improved with different choices of weighting functions. Where response plots of the H∞ optimal controllers are given, then the controllers have been computed by iterating over γ until the final controller achieves a closedloop norm which is within 0.01% of the optimal value.
98
Preview improves steadystate tracking. Figure 8.3 illustrates the ‘nonresponsiveness’ of the closedloop system in the case of no reference weight, and a low preview horizon. In the limiting case, where there is zero preview and no reference weighting, the controller does not have any information about the value of the reference at the next time step, and so it cannot make a decision about the direction in which to send the plant. Therefore, the tracking error cost cannot be reduced, and so the optimal controller can only minimise the control cost, leading to a choice of u = 0. Alternatively, as N → ∞, then the steady state error tends towards zero (in the absence of disturbances or modelling errors). The improvement due to preview is particularly marked in the H∞ case (see Figure 8.3). Reference weighting can compensate for reduced preview. The responses illustrated in Figure 8.3 are unsatisfactory for preview horizons of less than N = 200. When short preview horizons are mandated, a lowpass Wr improves low frequency tracking by biasing the controller optimisation towards lower frequencies. It is worth noting, however, that care should be taken in choosing Wr . If, for example, Wr rolls off too quickly, the closedloop will be poorly tuned for step inputs and can have an oscillatory response, and/or highamplitude controls. This is because a lowpass Wr has the dual effect of penalising low frequency tracking errors, and also reducing the penalty on high frequency controls – see (8.2). The effect of a lowpass Wr is illustrated in Figure 8.4, and a similar issue is also discussed in Bitmead et al. (1990, p66). Trackingerror filtering. Consider the Full Information controller synthesis problem illustrated in Figure 8.2 and let We be a dynamic trackingerror filter. A lowpass weight on the tracking error improves the steadystate tracking performance, without needing to change the assumed frequency content of the reference signal (i.e. without changing Wr ). Even if Wr = 1, the inclusion of a lowpass trackingerror filter (We ) ensures that the lowfrequency components of r will be tracked accurately, in contrast to Figure 8.3. This is accomplished via feedback based on the states of We , which is lowpass and so there is no initial ‘spike’ in the control signal – see Figure 8.6. Improving the lowfrequency tracking behaviour. It appears that there are three alternative ways of improving the lowfrequency tracking behaviour, which could be used alone or in combination: (A) use a long preview horizon; (B) add a lowpass reference filter, and (C) introduce a lowpass trackingerror filter. These alternatives are illustrated in Figure 8.5. In order to achieve a fair comparison, We was scaled so that the resulting closed loops achieved approximately similar rise times. The trackingerror filter achieves good steadystate performance without excessive control, or large control spikes. However, the introduction of a trackingerror filter tends to introduce additional phase lag, which can have a deleterious effect on the loop’s robust stability. In contrast, the feedback part of the controller is independent of Wr , which means that a reference filter can be used without jeopardising stability. Preview reduces the peak control magnitude. Figure 8.6 illustrates the influence of preview on the control magnitude. In this example, the output response is not strongly influenced by changes in the preview horizon, but the peak control magnitude reduces substantially as the preview horizon increases. This effect can be very useful in applications in which control ceilings are a limiting factor, and one wishes to maintain a short rise time.
99
1.5 N=30 N=50 N=200 Reference
Output
1 0.5 0 −0.5 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
200 N=30 N=50 N=200
Control
100 0 −100 −200 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
(a) H2 Preview Controller
1.5 N=30 N=50 N=200 Reference
Output
1 0.5 0 −0.5 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
Control
100 N=30 N=50 N=200
0
−100
−200 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
(b) H∞ Preview Controller
Figure 8.3: Closedloop response of the system described in (8.1) and Figure 8.2 with Wr = 1 and We = 1000. The plotted output is the signal zg in Figure 8.2, and shows the relative nonresponsiveness of the lowpreviewhorizon system.
100
1.5 N=30 N=50 N=200 Reference
Output
1 0.5 0 −0.5 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
1000 N=30 N=50 N=200
Control
500
0
−500 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
(a) H2 Preview Controller
1.5 N=30 N=50 N=200 Reference
Output
1 0.5 0 −0.5 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
15000 N=30 N=50 N=200
Control
10000 5000 0 −5000 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
(b) H∞ Preview Controller
Figure 8.4: Closedloop response of the system described in (8.1) and Figure 8.2; the reference weight is given by Wr = Z/(Z − 0.99), with We = 1000. The improved step response (of zg ) for short preview horizons is clearly visible. Note the highamplitude control in the N = 30 case.
101
1.5 Wr=1, We=α1 W =1/(z−0.99), W =α r
Output
1
e
2
W =1, W =α /(z−1) r
e
3
Reference 0.5
0 −0.1
−0.05
0
0.05
0.1
0.15 Time
0.2
0.25
0.3
0.35
0.4
400 W =1, W =α r
Control
200
e
1
Wr=1/(z−0.99), We=α2
0
W =1, W =α /(z−1) r
e
3
−200 −400 −600 −0.1
−0.05
0
0.05
0.1
0.15 Time
0.2
0.25
0.3
0.35
0.4
(a) H2 Preview Controller
1.5
Output
Wr=1, We=β1 W =1/(z−0.99), W =β r
1
e
2
W =1, W =β /(z−1) r
e
3
Reference 0.5
0 −0.1
−0.05
0
0.05
0.1
0.15 Time
0.2
0.25
0.3
0.35
0.4
1000 W =1, W =β r
Control
500
e
1
Wr=1/(z−0.99), We=β2 W =1, W =β /(z−1) r
0
e
3
−500 −1000 −0.1
−0.05
0
0.05
0.1
0.15 Time
0.2
0.25
0.3
0.35
0.4
(b) H∞ Preview Controller
Figure 8.5: Closedloop response of the example system described in (8.1) and Figure 8.2. The preview horizon is fixed at N = 50 and the αi and βi are used to achieve similar closedloop rise times. While the closedloop responses (zg ) are similar, the control signal are quite different; especially near the beginning of the preview horizon.
102
1.5 N=30 N=50 N=200 Reference
Output
1 0.5 0 −0.5 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
600 N=30 N=50 N=200
Control
400 200 0 −200 −400 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
(a) H2 Preview Controller
1.5 N=30 N=50 N=200 Reference
Output
1 0.5 0 −0.5 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
1500 N=30 N=50 N=200
Control
1000 500 0 −500 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
(b) H∞ Preview Controller
Figure 8.6: Closedloop response of the example system described in (8.1) and Figure 8.2; the weighting functions are Wr = 1 and We = 100/(1 − Z). The plotted output is the signal zg in Figure 8.2, and is relatively insensitive to the preview horizon. The control signal becomes ‘spread out’, and lower in amplitude, as the preview horizon is increased.
103
1.5 N=30 N=50 N=200 Reference
Output
1 0.5 0 −0.5 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
Control
2000 N=30 N=50 N=200
0
−2000
−4000 −0.2
−0.15
−0.1
−0.05
0
0.05 Time
0.1
0.15
0.2
0.25
0.3
Figure 8.7: Closedloop response of the system described in (8.1) and Figure 8.2 with Wr = 1, We = 1000 and the addition of an additive disturbance to zg . The plotted output is the signal zg . Convergence of H2 and H∞ preview controllers It is apparent from Figures 8.4, 8.3 and 8.6 that the H2  and H∞ optimal closedloops coincide for large N . Such convergence is discussed in detail in Mirkin (2003) for the fixedlag smoothing problem. It should be noted, however, that when an additional nonpreviewable signal, w, is included then the controllers do not necessarily converge. Figure 8.7 gives the closedloop step responses for the case where an additive disturbance is included on the output zg , but the setup is otherwise identical to that used for Figure 8.3. Note how the responses differ to those in Figure 8.3(b). Preview only improves low frequency tracking performance. For a lowpass plant, high frequency tracking performance is limited by the prohibitive size of the control action, which is a fundamental feature of the plant and cannot be changed by anticipative action. This effect if illustrated in Figure 8.8 for the H∞ case. In this example, preview improves the lowfrequency performance by reducing the magnitude of both the tracking error and the control signal. H2 norm reduction. Table 8.1 reports the closedloop H2 norm and also γ %,imp , as defined in (4.49), for both the unweighted plant (Figure 8.3) and for the plant with a lowpass We (Figure 8.6). In Section 4.5, it was proposed that γ %,imp would provide a good criteria for determing the number of preview points; preview points could continue being added until this quantity reached some predetermined threshold, e.g. 99%. This quantity is labelled γ %,imp . From the data in Table 8.1 and also Figures 8.3 and 8.6, it seems that this measure conforms well with a subjective assessment of the time domain step responce performance as function of preview length (such an assessment being largely based on steadystate errors and peaks in control). It is also interesting to note that the percentage change in the closedloop norm can be 104
T
T
r→ e
r→ u
5
100
0
N=30 N=50 N=200
80
−5
60 40
Magnitude (dB)
Magnitude (dB)
−10 −15 −20
20 0
−25 −20
−30 N=30 N=50 N=200
−35 −40 0 10
2
−40 −60 0 10
4
10 Frequency (rad/sec)
10
2
4
10 Frequency (rad/sec)
10
(a) Unweighted plant
T
T
r→ e
r→ u
10
20
0
10
N=30 N=50 N=200
0
−10
Magnitude (dB)
Magnitude (dB)
−10 −20 −30 −40
−20 −30 −40
−50
−50 N=30 N=50 N=200
−60 −70 0 10
2
10 Frequency (rad/sec)
−60 −70 0 10
4
10
(b) We =
2
10 Frequency (rad/sec)
4
10
1 Z−1
Figure 8.8: Bode plots of the closedloop transfer functions Tr→e and Tr→u which result from application of the H∞ optimal controls. The unweighted plant is considered in (a), and a lowpass We is employed in (b).
105
Unweighted
We =
1 Z−1
N 30 50 200 30 50 200
H∞ norm 1000.0 1000.0 1000.0 1536.3 1330.2 1326.2
H2 norm 998.8 995.4 992.1 420.2 282.0 239.6
γ %,imp 39.9% 75.6% 100.0% 83.8% 97.2% 100.0%
Table 8.1: Closedloop norm values and reductions in closedloop norm due to preview. The generalised plant is described by (8.1) and Figure 8.2. very small even though the step response appears to be much improved (see Table 8.1, unweighted case). In this example, preview action is beneficial for a relatively small proportion of the entire frequency range. In the unweighted problem, performance at all frequencies is rated equally, and so the percentage change in the closedloop norm is relatively small. On the other hand, if the low frequency performance is given a higher weighting (using a lowpass We ), then we observe that the closedloop norm changes considerably (see Table 8.1, weighted case). H∞ norm reduction Table 8.1 also shows the H∞ norm as a function of preview length. In the unweighted case, it is found that the optimal norm is unaffected by preview, to within the accuracy of our calculations (+/ 0.001% in this case). This is because the ‘worst case’ frequency (i.e. the one that is hardest to track using reasonable control levels), is the highest frequency (see Figure 8.8). Tracking quality for very high frequency signals cannot be improved by preview. Despite the lack of change in the H∞ norm, there is still a large subjective improvement in performance as N is increases . It appears that the central H∞ suboptimal controller uses the preview to improve its performance across a range of frequencies, even when it cannot improve the H∞ performance. In so doing, it converges towards the H2 controller, as noted above. Integral action with output feedback. If integral action and Output Feedback is required, then the integrated error signal must be included in the measurements in order to ensure that the integrator state is detectable. Such a setup is illustrated in Figure 8.9. Tuning the relative magnitudes of We1 and We2 is akin to adjusting the gains in a PI controller. The ability to adjust the integral gain is useful, because too much integral action can be detrimental to stability and/or the transient response. In fact a ‘derivative’ signal could also be added, thus completing the PID analogy and facilitating tuning of the preview controller.
8.3
Conclusions
Some of the general behaviours and features of Preview Controllers have been summarised, with a view to providing information which will assist in the design process. Although elements of these results are already known within the control systems community, they are spread over a number of publications spanning three decades. The discussion has particularly focused on the use of weighting functions to improve steadystate performance and to mitigate the effects of short preview. It should be noted that, whilst the results of Section 8.1 are generic and formally proven, the comments in Section 8.2 may not be globally applicable, since they are based on trends observed by the author and backedup by a single example. 106
Φ w
− +
η
Wr
r
u
z1
We1
G
e
1 I Z−1
We2
z2
z3 y1
K
Wn
y2
w
′
Figure 8.9: Preview tracking with integral action. The signal z = [z1′ z2′ z3′ ] is the output of the ′ closedloop transfer function whose 2norm is to be minimised; y = [y1′ y2′ ] is the measurement signal. The transfer functions We1 , We2 and Wn are shaping filters. Other notation follows that of Figure 1.5. In Figure 8.9 and the final remark of Section 8.2, a new method was presented for designing and tuning Output Feedback preview controllers with integral action. Previous papers that have addressed the addition of integral action have done so in an LQG setting through the use of the differentiated control signal in the cost function (e.g. Tomizuka and Rosenthal, 1979; Katayama and Hirono, 1987; Tomizuka and Fung, 1980). Such an approach does not allow one to adjust the strength of the integral action, which could lead to difficulty in satisfying stability/performance requirements. In many of the above plots, the H∞ controller requires a much larger control signal than the H2 controller, whilst only achieving similar (or worse) performance. In particular, preview length seems to have a large impact on the peak control signal for the H∞ optimal controller. It is perhaps unsurprising that step responses of the H∞ controller are not satisfactory, since 1 tracking of step inputs is more closely captured by the H2 norm. In fact, as Wr → Z−1 then the H2 optimal controller is precisely the controller that minimises the norm of z in the presence
of a step input. It is likely that, for this problem, the short preview performance of the H∞ controller could be improved by a different choice of weighting functions. However, the real power of the H∞ approach is the possibility of capturing complex performance specifications and robust performance requirements as detailed in Section 1.4.
107
Chapter 9
A Framework for the Preview Control of Vehicles Chapter Objective To derive a general framework for the design of previewbased tracking controllers for autonomous vehicles.
9.1
Introduction
In this chapter, we examine the problem of designing a preview controller that enables a vehicle to track a trajectory through space. The first step towards designing a linear preview controller is to produce a linear plant model. When designing conventional (nonpreview) tracking controllers for autonomous vehicles, one would typically work with a model that described the vehicle’s motion in a bodyfixed coordinate system. This has the advantage that an aircraft, for example, pointing North has the same linear transfer function (from small changes in inputs to changes in body fixed coordinates) as an aircraft pointing East, assuming all other trim conditions remain the same. Therefore, for all vehicle headings, we need only one linear model and one controller. Unfortunately, such an approach complicates the addition of preview action to our controller. This is because the segment of previewed trajectory becomes a function of the vehicle position and orientation (because the trajectory is now expressed in bodyfixed coordinates). The preview dynamics are thus considerably more complicated than the simple delay line which is used in the preview control literature, and we lose all the structures that had enabled the efficient computation of H2  or H∞ optimal controllers. Existing work in this area seems to divide into two camps. In the work of Sharp (2006), Sharp and Valtetsiotis (2001), and Cole et al. (2006), the control is designed using a linear model described in an inertial reference frame. However, as the vehicle moves, the reference frame is updated so that it is aligned to, and coincides with, the vehicle. This process is justified by the intuitive notion that a human driver controls a vehicle using a ‘local’ reference frame that is aligned to the vehicle. The following limitations are apparent in these references: • Speed and steering control are treated as two decoupled problems, which means the controller cannot take advantage of any coupling between the longitudinal and lateral dynamics. • The theory is developed with reference to particular vehicle models, and so it is not clear what minimum features are required by a given vehicle model in order to use the co
108
ordinate shifting approach. • Measurement of yaw angle is always required as an integral part of the algorithm. The likely impact of noisy yaw angle measurements is not known. • The trajectory must be reinterpolated at each timestep, which places additional computational burden on the controller. • Stability of the algorithm is not discussed. • It is not possible to accommodate linearisations about trim states having a nonzero yaw rate. This is particularly important when a vehicle’s linear dynamics vary significantly during cornering e.g. aircraft and motorcycles. • In Cole et al. (2006), a linearised rotation matrix is used, which could lead to significant errors when the vehicle turns through a large angle. An alternative approach is employed by Paulino et al. (2006a) and Cunha et al. (2006), who describe the nonlinear vehicle dynamics in a coordinate system attached to the reference path. The reference is constrained to be composed of segments of trimming trajectories, and the previewed signal is a disturbance associated with the transition between trajectory segments. There are several limitations to the algorithms presented by Paulino et al. (2006a) and Cunha et al. (2006). For example, in many autonomous vehicle applications, it is desirable to compute or recompute the trajectory online in response to a changing environment. However, this would require online computation of a new set of trim states in response to an online change in trajectory. For moderately complex nonlinear vehicle models, the trim equations must be solved numerically, which is likely to present an excessive computational burden. Furthermore, there are possible safety concerns when the trim equations are nonconvex and hence convergence of numerical solvers is hard to guarantee within the discrete timestep. Also, in Paulino et al. (2006a) and Cunha et al. (2006), the vehicle orientation (roll, pitch and yaw angle) forms part of the reference signal, yet we are usually interested only in ensuring good position tracking. By fixing the vehicle orientation, we remove a degree of freedom which might otherwise be useful for rejecting disturbances. For example, consider the case where it is desired for an aircraft to follow a straight horizontal trajectory, with the additional specification that the aircraft should be aligned with that trajectory. Now introduce a persistent lateral wind disturbance; in this case it is not possible to satisfy both the position tracking requirement and the orientation requirement. In this chapter, a general algorithm is presented for designing preview controllers for a wide class of vehicles. It is intended that the framework presented here will have applications in the design of tracking controllers for unmanned aircraft, autonomous ground vehicles, and autonomous underwater vehicles, as well as assisting in the development of models of human drivers/pilots. First a general nonlinear vehicle model is described, and a linear model written in inertial coordinates and continuously parameterised by yaw angle is derived. Next a transformation is performed which removes the dependence on yaw angle. The transformed system essentially represents a linearisation described in a set of coordinates attached to and aligned with an equilibrium (or ‘trim’) trajectory. The particular equilibrium trajectory that is used will vary depending on the vehicle heading, since it is necessary for the vehicle’s yaw angle to be ‘close’ to the yaw angle of the equilibrium trajectory in order for the corresponding linearisation to be representative of the plant dynamics. The controller design process involves synthesising a controller for the transformed system (which is independent of yaw angle), and then reversing the transformation to obtain a parameterisation of the set of controllers corresponding to 109
every possible choice of equilibrium yaw angle. At any instant the control is computed by first selecting the most appropriate equilibrium trajectory (based on the yaw angle of the vehicle), and then using the controller corresponding to that trajectory. Our work is inspired by the ideas of Cole et al. (2006) and Sharp and Valtetsiotis (2001), and it is motivated by a desire to tackle the aforementioned issues with these references. We believe our approach has the following advantages over the techniques that currently appear in the literature: • The presented algorithm has guaranteed Local Asymptotic Stability, and connections are also made to gain scheduled systems. We therefore inherit the (albeit limited) global stability results associated with such systems (Leith and Leithead, 2000). • Our approach can tolerate noise on the yaw angle measurement or, unlike the above approaches, it can even operate with no yaw angle measurement at all. This is important since accurate attitude information can be expensive to obtain (Kingston and Beard, 2004). • It is possible to accommodate linearisations about trim states having a nonzero yaw rate. This ensures that coupling between longitudinal and lateral modes is properly exploited during the controller design. • There is no requirement for reinterpolation of the trajectory, or evaluation of the closest point. Our design is mathematically simpler than that of Paulino et al. (2006a) and Cunha et al. (2006). Also, the reference trajectory is not constrained to be composed of segments of a trimming trajectory, thus facilitating online path planning. Furthermore, we do not explicitly force the vehicle orientation to match the instantaneous path heading, allowing maximum freedom to reject disturbances. In many applications, the path following problem is of more interest than the trajectory tracking problem. In other words, we do not impose a time specification, and it is only required that the vehicle stays on or near the path, whilst satisfying some other constraints, or minimising some cost (e.g. minimum time to destination). In order to use trajectory tracking algorithms (such as preview control) for path following problems, it is necessary to impose an artificial timeplan. One method for doing this is to choose the maximum path speed for which there exists a trim vehicle condition which does not violate any constraints. This approach is illustrated in the case study in Section 9.9. It is also worth highlighting that one of the advantages of the presented preview control algorithm is that the timeplan need only be generated for a finite time into the future, so it can be updated online in response to unanticipated disturbances. The structure of this chapter is as follows: the notation is described in Section 9.2, a nonlinear vehicle model is introduced in Section 9.3, and the preview control problem is formulated in Section 9.4. In Section 9.5, the equilibrium trajectories of both the plant and the preview dynamics are described. A parameterised set of linearisations of the vehicle model is introduced in Section 9.6, and a corresponding set of controllers is designed in Section 9.7. Two possible algorithms for switching between members of the controller set are described in Section 9.8, and a case study using a bicycle model is presented in Section 9.9. Extensions to more complex tracking problems and to the output feedback case are presented in Section 9.10. Finally, conclusions are drawn in Section 9.11.
110
9.2
Notation
We will make use of the shift operator, q, defined such that: y = qx
⇔
y(k) = x(k + 1) ∀k.
We also define a sampling operator, S, and a hold operator, H, such that: y = Sz
⇔
y(k) = z(kTs ) ∀k,
z = Hy
⇔
z(t) = y(int(t/Ts ))
(9.1) ∀t,
(9.2)
where z is a continuoustime signal, y is a discretetime signal, Ts is the sampling time, and int(·) returns the integer part. An m × p dimensional zero matrix will be denoted as 0m×p and an n dimensional identity matrix will written as In . The shorthand 0m = 0m×m will also be used.
9.3
The Nonlinear Vehicle Model
We will work in a cartesian coordinate system (X, Y, Z) and use the standard Society of Automotive Engineers (SAE) sign conventions, in which Z points down and a right hand rule is used for angles. The variable ψ will represent the vehicle yaw angle, which is defined to be the orientation of the vehicle about the Z axis, with ψ = 0 implying that the vehicle is pointing along X. In order to simplify the exposition, we will initially consider only models constrained to the horizontal plane. Extension to the 3D case will be covered in Section 9.10. Define ζ to be the vector of the vehicle generalised coordinates (sometimes known as the h i′ configuration variables), excluding the position and yaw angle. Let v = vf vl be the vehicle forward velocity and lateral velocity respectively, and let ρ be yaw rate. Now define the state vector: ζ˙ ζ xb = xa , v ρ
where xa represents some additional states that may be used to model actuator dynamics. We will consider a class of multibody vehicle models which may be described by the set of general Differential Algebraic Equations: 0 = fb (x˙ b , xb , w, u) ,
(9.3)
ψ˙ = ρ,
(9.4)
p˙ = T (ψ)v,
(9.5)
where T (ψ) =
"
cos(ψ)
− sin(ψ)
sin(ψ)
cos(ψ)
h and fb (·) is a vector valued function; p = px
py
111
i′
#
,
is the (X, Y ) position of the vehicle; u is
the control signal; and w is a general disturbance signal, which may include both sensor noise and external forces acting on the vehicle. Because the evolution of xb is not dependent on position or yaw angle, p and ψ do not appear in (9.3). This is a reasonable assumption because a vehicle’s dynamics are often independent of the horizontal position of the vehicle, or the direction in which the vehicle is pointing. In other words, position and yaw angle are ‘cyclic coordinates’ (Goldstein, 1980). In the instances where vehicle position does influence xb , then we will assume that such effects may be captured through the addition of the disturbance w. We will assume that fb is locally Lipschitz continuous in the neighbourhood of all xb and x˙ b of interest, and that the Jacobian of fb (·) with respect to x˙ b is nonsingular for all x˙ b of interest. The former condition ensures that fb (·) is linearisable, and the latter condition ensures that the linearisation does not have descriptor form. It will be useful to note that: T (ψ)−1 = T (−ψ),
T (ψ1 )T (ψ2 ) = T (ψ1 + ψ2 ), d T (ψ) = T (ψ + π/2), dψ
T (ψ)′ T (ψ) = I.
In fact, the development which follows will apply for any matrix function T (ψ), providing that the above relations are satisfied. As an example, if we were to describe a bicycle model of the type derived in Meijaard et al. (2007) then we would have: ǫ˙ ǫ φ˙ xb = φ v ψ˙ where ǫ is the steer angle and φ is the roll angle. The control signal would be composed of Td u = Tǫ , Tl where Td , Tǫ and Tl are the drive torque, steer torque and lean torque respectively. The variable p could represent the position of the rear wheel ground contact point.
9.4
The Preview Control Task
The preview control problem is summarised in Figure 9.1. As usual, the operator Φ is a delay line with a shiftregisterlike realisation: Φ:
qxp = Ap xp + Bp r yp = Cp xp
112
(9.6)
Φ
v
w
ρ
0 = fb (xb , x˙ b , u, w) r
xb (0) = xb0
T (ψ) R
p
R
+ +
ψ
e
xb
K
Figure 9.1: A nonlinear preview control problem. The signal r represents the future value of the reference, and the objective is to design a nonlinear controller K such that p tracks Φr as closely as possible. where r is the future value of the reference, the segment of previewed data is stored in xp , and: 0lr . .. Ap = 0lr 0lr
...
Ilr .. . 0lr
...
0lr
...
0lr .. . , Ilr
0lr
and # 0(N −1)lr ×lr , Bp = Ilr "
Cp =
h
Ilr
0lr ×(N −1)lr
i
,
with N being the preview length and lr being the dimension of r. By designing a controller which minimises e, we will ensure that the vehicle position, p, tracks a delayed version of r (where r is the future value of the reference). The tracking error, e, is defined by: e = Sp − Cp xp ,
(9.7)
where S is the sampling operator defined in (9.1).
9.5
The Equilibrium Trajectory
We may approximate the control signal and the vehicle states as: x ¯b + Hδxb xb ¯ ψ ≈ ψ + Hδψ p¯ + Hδp p
u=u ¯ + Hδu,
113
where δxb , δψ, δp and δu are small discretetime signals, and x ¯b and u ¯ are constant trim conditions satisfying: 0 = fb (0, x ¯b , 0, u ¯).
(9.8)
The variables p¯ and ψ¯ represent the equilibrium trajectory that results from the velocities prescribed by x ¯b . It follows that: ¯ = ψ0 + ρ¯t ψ(t) Z t ¯ ))dτ v¯, T (ψ(τ p¯(t) = p0 + 0
where v¯ and ρ¯ represent the equilibrium velocity and yaw rate components of x ¯b , and ψ0 and p0 are the initial conditions. The perturbation signals are expressed in discretetime because it is desired to produce a discretetime linearisation. All variables with a δ prefix will be discretetime signals. The signal δu will be the output of a linear discretetime controller. We may also represent xp and r relative to their equilibrium trajectories x ¯p and r¯, so that: xp = x ¯p + δxp r = r¯ + δr. We wish to consider perturbations about e = 0, and so x ¯p and r¯ must satisfy: q¯ xp = Ap x ¯p + Bp r¯
(9.9)
0 = S p¯ − Cp x ¯p ,
(9.10)
and so by using (9.6) and (9.7) it follows that: qδxp = Ap δxp + Bp δr δe = δp − Cp δxp , where δe is the small signal approximation to e. Remembering that Ap performs a shiftregisterlike operation on xp , it follows from (9.9) that: r¯(k − N ) .. , x ¯p (k) = . r¯(k − 1) and this combined with (9.10) implies that r¯(k − N ) = p¯(kTs ), or alternatively, r¯(k) = p¯((k + N )Ts ), and so:
p¯(kTs ) .. .
. p¯((k + N − 1)Ts )
x ¯p (k) =
Therefore x ¯p is a vector containing the future values of p¯. Figure 9.2 illustrates the equilibrium trajectories of p¯(t) and x ¯p (k) for the case where ρ¯ < 0.
114
X
δxp
x ¯p p¯ e δp Vehicle
Reference Trajectory Y Figure 9.2: Illustration of a constant velocity equilibrium trajectory with v¯ > 0 and ρ¯ < 0. The dotted line represents both the trajectory of p¯ and the trajectory of the elements of x ¯p . The filled circles represent a snapshot of the elements of x ¯p , and the open circle represents p¯; note that p¯ coincides with the last element of x ¯p . The crosses represent a snapshot of the contents of xp .
115
X
δp
Vehicle
p¯ ψ¯ = ψ0,1
ψ¯ = ψ0,2
Y ¯ from ψ0,1 to ψ0,2 . In this example ρ¯ = 0. Figure 9.3: Illustration of the effects of updating ψ(·) The dotted line represents the path of p¯, and the solid line is the reference trajectory.
9.6
A Family of Discrete Linearisations
If the preview dynamics (9.6) and the nonlinear plant (9.3)(9.5) are linearised about the trim condition x ¯b , and then discretised, the following family of potentially timevarying statespace models is obtained: qδxb = Ab δxb + B1b δw + B2b δu qδψ = Aψb δxb + δψ Σ:
¯ eb δxb + T (S ψ¯ + π/2)Aeψ δψ + δp qδp = T (S ψ)A qδxp = Ap δxp + Bp δr δe = δp − Cp δxp ,
where the matrices Ab , B1b , B2b , Aψb , Aeb , Aeψ are the appropriate (timeinvariant) Jacobians, ¯ is potentially timevarying. and T (S ψ) ¯ The set of systems, Σ, is parameterised by the choice of equilibrium yaw function ψ(·). Since the set of all equilibrium yaw functions is parameterised by ψ0 (for a given x ¯b ), we can consider Σ to be parameterised by ψ0 . ¯ If the vehicle yaw angle ψ(t) departs significantly from the equilibrium yaw angle ψ(t), then the linear model will cease to provide a good representation of the vehicle dynamics. In this case, we may wish to switch to a model linearised about a different equilibrium yaw function. ¯ The effect of a change in ψ0 (and hence a change in equilibrium yaw function ψ(·)) is illustrated in Figure 9.3. Some rules for updating ψ0 are discussed further in Section 9.8. In effect, there are two ways in which ψ¯ might vary with time: when a trim condition has been chosen that results in a nonzero equilibrium yaw rate ρ¯, and when ψ0 is ‘manually’ shifted to bring ψ¯ closer to ψ. Directly designing a controller for the set of timevarying linear systems Σ would be a complex ¯ and hence process. Instead we perform a transformation which removes the dependence on T (ψ),
116
also removes the timedependence present in the parameters of Σ. Define: ¯ −1 δp δpt = T (S ψ) ¯ −1 δr δrt = T (S ψ) ¯ −1 δe δet = T (S ψ) ¯ −1 δxp δxpt = T¯(S ψ) ¯ T (ψ) 0 ¯ 0 T ( ψ) ¯ = . T¯(ψ) . . 0
0
... ... ...
0 0 ¯ T (ψ)
and substitute into the definition of Σ to obtain the following system: qδxb = Ab δxb + B1b δw + B2b δu qδψ = Aψb δxb + δψ Σt :
qδpt = Aeb δxb + T (π/2)Aeψ δψ + δpt qδxpt = Ap δxpt + Bp δrt δet = δpt − Cp δxpt .
In obtaining these expressions, the identities ¯ −1 Ap T¯(ψ) ¯ = Ap T¯(ψ) ¯ −1 Bp T (ψ) ¯ = Bp T¯(ψ) ¯ = Cp ¯ −1 Cp T¯(ψ) T (ψ) were used. The system Σt represents a linearisation described in a set of coordinates attached to and aligned with the equilibrium trajectory. In contrast, Σ represents a set of linear systems described in coordinates attached to the equilibrium trajectory, but aligned with the inertial axes (X,Y). The transformation from Σ to Σt has some similarity with the ‘global’ to ‘local’ transformations described by Sharp and Valtetsiotis (2001). It is worth emphasising that Σt does not represent a model written in a coordinate system ¯ that rotates with the vehicle; the coordinates associated with Σt rotate with ψ(t), not ψ(t). If a coordinate system rotating with the vehicle was used, then δψ would not appear in the equation for δpt , but would instead appear in the equation for δxpt . Such an augmented system cannot be tackled by algorithms presented in the preceding chapters or by the algorithms that currently appear in the literature. In contrast, the system Σt is of a form that may be handled by existing preview control algorithms. After computing a single preview controller based on the single system Σt , the transformation is reversed in order to obtain a family of controllers for the family of systems Σ. This procedure is illustrated in the next section for the case of a simple H2 preview problem. A similar procedure may also be applied to more complex H2 preview problems and also to H∞ preview problems.
117
Σt δrt
Φ
δpt
w
−
W1
+
z1
G δu
z2
W2
Figure 9.4: The plant G is the linear system to be controlled, and Φ is an N step delay line. The disturbance w is not previewable; the state of G is xg ; δrt is the previewable reference; and the control and measurement signals are δu and [x′g δrt′ w′ ]′ respectively. The static gain matrices W1 and W2 are used for tuning the controller.
9.7
Design of a Simple Full Information H2 Preview Controller
In this section we will design a simple H2 Preview controller for the system Σt , which will then lead to a family of controllers for the family of plants Σ. We consider the problem setup described in Figure 9.4, in which we search for the control signal δu that minimises: J =E
) n 1X ′ z(i) z(i) , lim n→∞ n i=0
(
h i′ where z = z1′ z2′ , and E {·} denotes expectation over δrt and w, which are assumed to be Gaussian white noise processes. The transfer function G(Z) is given by: s
G(Z) =
"
Ag
B1g
B2g
Cg
0
0
Ab
Aψb = A eb 0
#
0
0
B1b
B2b
1 T (π/2)Aeψ
0 I
0 0
0 0
0
I
0
0
Note that the state of G is composed of: δxb xg = δψ . δpt The following technical assumptions are also made: (A1) (Ag , B2g ) is stabilisable
118
.
(A2) W2′ W2 > 0 " Ag − ejθ I (A3) Cg
B2g 0
#
is full column rank
∀ θ ∈ (−π, π].
If we denote the state of G by xg , and note that the state of Φ is δxpt , then the results in Section 4.2.2 may be used to show that the optimal control is given by: δu∗ = Fg xg + Fp δxpt + Fr δrt + Fw w, where ¯ −1 B ′ Xgg Ag Fg = −R 2g h ¯ −1 0 B ′ S B ′ A′ S Fp = −R 2g 2g cg
(9.11) ...
N −1 ′ ¯ −1 B2g Fr = −R A′cg S
¯ −1
Fw = −R
′ B2g A′cg
N −2
S
i
′ B2g Xgg B1g
(9.13) (9.14)
¯ = W2′ W2 + Bg′ Xgg Bg R S=
(9.12)
(9.15)
Cg′ W1′ W1
(9.16)
Acg = Ag + B2g Fg ,
(9.17)
and Xgg is the stabilising solution to the Discrete Algebraic Riccati Equation: ¯ g + C ′ W ′ W1 Cg . Xgg = A′g Xgg Ag − Fg′ RF g 1 h If we recall that xg = δx′b
δψ ′
(9.18)
i′ δp′t , then the controller for the plant Σt may be written as:
δu∗ = Fb δxb + Fψ δψ + Fe δpt + Fp δxpt + Fr δrt + Fw w,
(9.19)
h
i Fb Fψ Fe . This control leads to the following family of Full Information controllers for the original family of linearisations Σ:
where Fg =
¯ −1 δp + Fp T¯(S ψ) ¯ −1 δxp + Fr T (S ψ) ¯ −1 δr + Fw δw. δu∗ = Fb δxb + Fψ δψ + Fe T (S ψ)
(9.20)
¯ This set of controllers is parameterised by the choice of ψ(·), which is in turn parameterised by ψ0 . The controller structure is illustrated in Figure 9.5. It should be noted that the design procedure presented here applies equally well in the case that it is the H∞ norm which we desire to minimise. ¯ For a particular equilibrium function ψ(·), the nonlinear closedloop formed with the above nonlinear controller, is guaranteed to be locally asymptotically stable by virtue of KF I being a stabilising controller for Σt . By updating the equilibrium yaw function, we are essentially switching to a different controller for a different operating point. If the switching is performed at every timestep, then this process is analagous to discretetime gainscheduling1 (with the scheduling variable being ψ0 ). Global stability is hard to prove for gainscheduled systems (Leith and Leithead, 2000). However, given the wealth of successful practical implementations of linear gain scheduled controllers, there is good evidence that such a scheme will exhibit good global performance. 1 If the switch to a new controller is not performed every timestep, then our algorithm would be considered to represent a switched controller.
119
x ¯b
−
xb ψ¯ ψ
p¯
−
p
− u ¯ KF I
¯ −1 T (S ψ)
u
x ¯p
−
xp r
−
¯ −1 T¯(S ψ) ¯ −1 T (S ψ)
r¯ Figure 9.5: The Full Information controller including input transformations. The matrix KF I is given by KF I = [Fg Fp Fr Fw ].
9.8
Choosing ψ¯
¯ is one of the inputs to the controller in Figure 9.5, and it simply represents The variable ψ(t) the trim yaw angle at time t. When computing the controls we are free to assign any value to ¯ Conceptually, ψ¯ at any time, with the controls being computed relative to the new value of ψ. ¯ are made by altering ψ0 . In practice, however, the changes to the equilibrium function ψ(·) input to the controller is simply the new value of ψ¯(t), and we do not need to keep track of ψ0 . ¯ There are two obvious ways of assigning ψ(t): either using the angle formed by a line tangential to the reference trajectory, or using a measurement of the vehicle’s yaw angle. Which of these is chosen will depend on the characteristics of the reference trajectory and also on the ¯ based on the reference trajectory will only keep δψ small dynamics of the vehicle. Using a ψ(t) if it is assumed that the vehicle is always approximately orientated along the trajectory. This assumption may be poor for vehicles that operate with significant sideslip e.g. an aircraft, or a car on a low friction surface. The assumption will also breakdown if the reference trajectory contains sudden changes in heading. ¯ is chosen to be equal to a measurement of the vehicle’s yaw angle, then Alternatively, if ψ(t) ¯ and changes in δu can occasionally cause unwanted oscillatory feedback between changes in ψ(·) behaviour. Sometimes these oscillatory effects can be removed by ratelimiting ψ0 . The advantages of using a pathbased ψ¯ are that it is not necessary to measure ψ and ¯ The benefit of using a yaw that there is no feedback from the control action to updates in ψ. measurement is that paths containing discontinuous changes of direction can be accommodated, as can vehicles with large sideslip. ¯ It is worth highlighting a few additional points regarding the choice of ψ: • If ψ¯ is set equal to a measurement of the vehicle yaw angle, then measurment errors on this signal will not necessarily degrade performance. The reason for this is that we only require that ψ¯ remains near enough to ψ that the linear model is valid. In particular, it should be possible to achieve good tracking in the presence of a constant offset in the yaw measurement. ¯ are instantaneous, and they may be carried • The updates resulting from changes to ψ(·) 120
out in between samples.
9.9
Application to a Nonlinear Bicycle Model
In this section, we outline application of the above algorithms to a nonlinear bicycle model. The objective is to track a prespecified path at the highest possible speed, whilst maintaining good tracking accuracy and without violating any of the following constraints: • Longitudinal acceleration < amax (due to a drive torque constraint) • Longitudinal deceleration < dmax (due to a braking force constraint) • Longitudinal velocity (vf ) < vf max (maximum speed constraint) • Roll Angle (φ) < φmax (due to geometric constraints or lateral tyre force constraints).
9.9.1
The Nonlinear Bicycle Model
A nonlinear Autosim2 bicycle model was provided by Amrit Sharma3 . The bicycle model and its degrees of freedom are illustrated in Figure 9.6, with a full model description given in Appendix C.
Figure 9.6: The simple bicycle model with each of its degrees of freedom. The model comprises two frames hinged together along an inclined steering axis. The rider is rigidly attached to the rear frame, and each wheel is assumed to be in point contact with the road.
For this model, p represents the position of the rear wheel ground contact point in inertial coordinates, ψ is the yaw angle of the rear frame also in inertial coordinates, and: h xb = δ
δ˙
φ˙ φ
vf
vl
i′ ρ ,
where δ is the steering angle and φ is the roll angle. The wheel angular positions (θr and θf ) are cyclic coordinates and need not appear in the model. Wheel angular velocities are not needed in xb because of a nonholonomic constraint that eliminates longitudinal slip (see Appendix C). 2 Autosim 3 Control
2.5, Mechanical Simulation Corporation and Power Group, Imperial College, London
121
mvf2 /c
m
mg φ
Figure 9.7: An inverted pendulum representation of a bicycle cornering at a constant roll angle. The mass of the rider and the bicycle is represented as a simple point mass (m), and the pendulum is free to pivot about the ground contact point. The bicycle is travelling out of the page, and the centre of curvature of the path is to rider’s right. The radius of curvature is c. The arrows represent the gravitational force and the D’Alembert force that results from the path curvature. The D’Alembert force due to φ¨ is omitted since we only consider the constant roll angle case. Straightforward application of D’Alembert’s principle leads to equation (9.21).
9.9.2
Trajectory Planning
The goal of this section is to derive a method for creating a timeplan from a path that is specified as a set of X, Y coordinate pairs. Let this sequence of path points be denoted as (rx (i), ry (i)), for 0 < i < Npath − 1. Our objective, therefore, is to assign a time t(i) to each path point (rx (i), ry (i)). The first step in the procedure is as follows: 1) For each path point, (rx (i), ry (i)), evaluate a distance along the path s(i) and a local radius of curvature, c(i). Using a ‘pendulum’ bicycle model (see Figure 9.7), the following relationship may be derived for steadystate cornering at a fixed roll angle: vf2 = cg tan φ,
(9.21)
where c is the radius of curvature of the path, vf is the forward velocity of the bike, and φ is the roll angle. Using this approximation, the roll angle constraint may be converted into a velocity constraint. This leads us to the next step in the algorithm: 2) Compute a sequence of ideal path velocities: p videal (i) = min vf max , c(i)g tan φmax . Unfortunately, such a sequence of velocities may violate the acceleration and deceleration constraints, amax and dmax . The next two steps are concerned with modifying the velocity profile so that it remains within these constraints. We have computed, amongst other things, a set of pairs (videal (i), s(i)), and hence the demanded forward velocity is available as a function of path length. The following relationship dv translates acceleration limits into limits on dsf (with a slight abuse of notation): amax dvf < ds vf
⇔
122
dvf < amax . dt
Therefore, the maximum allowable change in forward velocity during a path distance δs is given by: δvf max =
amax δs. vf
In the next step of the algorithm, a recursive computation uses a discretised version of this relationship to compute a sequence, va (i), in which excessive accelerations have been removed. 3) Remove large accelerations: va (0) = videal (0) amax va (i + 1) = min videal (i + 1), (s(i + 1) − s(i)) + va (i) va (i) Excessive decelerations may be removed using the same process, except that in this case the trajectory is parsed from end to start: 4) Remove large decelerations: vp (Npath − 1) = va (Npath − 1) amax (s(i + 1) − s(i)) + vp (i + 1) vp (i) = min va (i), vp (i + 1) The final two steps are: 5) Perform a discrete integration to obtain the time t(i) for each point on the path: t(0) = 0 t(i + 1) = t(i) +
s(i + 1) − s(i) vp (i)
6) Having obtained the triple (rx (i), ry (i), t(i)), reinterpolate at regularly spaced time intervals corresponding to the sampling time of the preview controller. This last step results in a reference signal suitable for input to a preview controller. Figure 9.8 illustrates the effects of steps (2),(3) and (4). It may seem that step (4) requires the entire path to be known in advance, contradicting one of the previously stated benefits of preview controllers. In reality, however, the path only needs to be known for a period of no more than (vmax /dmax ) seconds into the future. Essentially, vmax /dmax represents the maximum required ‘braking time’, and beyond this time, future features of the path have no impact on the desired path speed. It therefore follows that the above algorithm may be implemented online, providing that the path is known for a minimum distance of vf2 max /dmax .
9.9.3
Controller Design
A nonlinear controller was designed for the model described in Section 9.9.1 using the algorithm described in Section 9.7. For the purposes of controller design, only linearisations about straight running conditions were considered. In other words, the only nonzero element of x ¯b was the trim forward speed v¯f . A sampling time of 0.02s and a preview length of N = 300 were used.
123
videal
(2)
(3)
va
t
(4)
vp
t
t
Figure 9.8: Illustration of the output of steps (2), (3) and (4) of the trajectory planning algorithm. The first plot consists of two step changes in videal , which were produced by two step changes in the path curvature. The next two plots show how the described algorithm removes the accelerations and decelerations that would have violated the actuation constraints.
124
Unfortunately, because the linear dynamics vary with forward speed, it was impossible to find a controller which performed well at all operating points. It was therefore decided to vary the controller gain KF I as a function of forward speed, by interpolating between a set of gains computed for a range of different forward speeds. Let the set of forward speeds be: Vf = {0.1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} , in m/s, and denote the ith member of this set as Vf,i . For each member of this set, the Full Information gain matrix KF I,i was found. If Vf,i < vf < Vf,i+1 , then the interpolated controller may be computed as follows: KF I (vf ) = KF I,i α + (1 − α)KF I,i+1 , where: α=
Vf,i+1 − vf . Vf,i+1 − Vf,i
Some care is required when computing the trim perturbations for this gainscheduled controller. At any instant, the trim conditions used to compute trim perturbations must correspond to the designpoint for the controller. For example, if the forward velocity is 5.5m/s, then the interpolation procedure produces a controller which approximates the controller for a plant linearised about a forward speed of 5.5m/s. Therefore, the trim perturbations should be computed with reference to the 5.5m/s design point. This is trivial for x ¯b , p¯ and r¯. However, x ¯p is computed from the following:
x ¯p (k) =
p¯(kTs ) .. .
p¯((k + N − 1)Ts )
,
and in this section ρ¯ = 0, so ¯v p¯(t) = p0 + T (ψ)¯
Z
t
dτ,
0
and hence:
¯ x ¯p (k) = p¯(kTs ) + T¯(ψ)
0 Ts v¯ .. .
.
(k + N − 1)Ts v¯
# vf , and so x ¯p represents a set of points that We are using a timevarying v¯ that is equal to 0 extends or contracts as vf increases or decreases respectively. "
125
For all the controller design points, the following weighting matrices were used: # " 100 0 W1 = 0 100 30 0 0 W2 = 0 0.2 0 . 0 0 1.5 Whilst there is nothing preventing the use of different weighting matrices for different speeds, constant weightings were found to be sufficient for this problem.
9.9.4
Simulations
The above planning and control algorithms were implemented in MATLAB/Simulink, and the nonlinear bicycle model was compiled for Simulink using Ccode generated by Autosim. Simulation results are presented for three different paths in Figures 9.9, 9.10 and 9.11. The path planning constraints were chosen to be: vmax = 10m/s φmax = 20◦ amax = 1m/s dmax = 4m/s, with the exception that φmax is 30◦ in Figure 9.11. At each timestep, the value of ψ¯ was updated to the latest value of ψ. Figures 9.9 to 9.11 show that the path planning algorithm leads to reasonable velocity profiles, which exhibit expected behaviours such as braking into corners and accelerating out of corners. It is evident from Figure 9.9(b) that translation of the rollangle constraint into a pathspeed constraint has been successful. Preview action is particularly obvious in Figures 9.9 and 9.11, where considerable roll and steer angle variations may be seen in preparation for the corner. Additionally, preview action can be observed at the midpoint of the chicane, where the rider must flip the bike from one rollangle extreme to another. This is a severe manoeuvre, and it is notable that the control algorithm exhibits good tracking during this phase of the trajectory. Figure 9.11 describes a path with a tighter corner and larger roll angle than Figure 9.9, which presents a greater challenge to the controller due the growing effect of nonlinearities in the model. Despite this, the tracking error is still just a few centimetres, and the roll angle remains within the specified bounds. It is likely that further performance improvements could be obtained by gainscheduling with respect to roll angle (i.e. using nonzero equilibrium yaw rates) in addition to the velocitybased scheduling.
9.10
Extensions
It is often required to track other signals in addition to the position p. For example, in an aircraft application, it may be desired to track altitude, or to follow a predetermined heading angle. In other words, we may wish to control additional quantities which are functions of xb
126
10.5 80 10 70 9.5 60 9
vf (m/s)
X (m)
50
40
8.5
8
7.5
30
7
20
6.5 10 6 0 0
10
20
30
5.5
40
0
5
10
Y (m)
15
20
t (s)
(a) The left plot shows both the desired path (solid line) and the simulated position of the rear wheel ground contact point (crosses plotted at 0.5s intervals). The path begins at the bottom left. The simulation begins at t=0 with the bike positioned at the start of the path with an initial forward speed of vmax and with zero roll angle. The right plot shows the desired speed (solid line), and the actual speed (dotted line). The arrows on the right hand plot occur at the same point in time as the boxes on the left hand plot. 2
Lean Steer 0
−20
0
0
2
4
6
8
10
12
14
16
18
−2 20
Steer Torque (Nm)
Lean Torque (Nm)
20
t (s) 50
10
0
−50
0
0
2
4
6
8
10
12
14
16
18
δ (deg)
φ (deg)
φ δ
−10 20
t (s) (b) The steer angle, roll angle, and control torques for the manoeuvre described in Figure (a). The red dotted lines in the lower plot represent the desired bounds on the roll angle. The arrows occur at the same point in time as the boxes on the XY plot in (a).
Figure 9.9: A chicane manoeuvre in which the bike starts a top speed along the straight, decelerates into the corner, and then executes both semicircular bends at a speed dictated by the roll angle constraint. Finally, the bike accelerates out of the last bend until reaching its maximum straightline speed. A preview length of 6 seconds was used for this simulation.
127
11 60 10 50 9
8
vf (m/s)
X (m)
40
30
7
6 20
5 10 4 0 −10
0
10
3
20
0
5
Y (m)
10
15
t (s)
(a) The left plot shows both the desired path (solid line) and the simulated position of the rear wheel ground contact point (crosses plotted at 0.5s intervals). The path begins at the bottom left. The simulation begins at t=0 with the bike positioned at the start of the path with an initial forward speed of vmax and with zero roll angle. The right plot shows the desired speed (solid line), and the actual speed (dotted line). The arrows on the right hand plot occur at the same point in time as the boxes on the left hand plot. 0.5
Lean Steer 0
−20
0
0
5
10
−0.5 15
Steer Torque (Nm)
Lean Torque (Nm)
20
t (s) 20
φ δ 20
0
10
0
5
10
δ (deg)
φ (deg)
40
0 15
t (s) (b) The steer angle, roll angle, and control torques for the manoeuvre described in Figure (a). The red dotted lines in the lower plot represent the desired bounds on the roll angle. The arrows occur at the same point in time as the boxes on the XY plot in (a).
Figure 9.10: A manoeuvre in which the path curvature rapidly increases and then decreases, leading to corresponding variations in path speed. A preview length of 6 seconds was used for this simulation.
128
11 70 10 60 9
vf (m/s)
X (m)
50
40
8
7
30
20
6
10 5 0 −10
0
10
20
4
30
0
5
Y (m)
10
15
t (s)
(a) The left plot shows both the desired path (solid line) and the simulated position of the rear wheel ground contact point (crosses plotted at 0.5s intervals). The path begins at the bottom left. The simulation begins at t=0 with the bike positioned at the start of the path with an initial forward speed of vmax and with zero roll angle. The right plot shows the desired speed (solid line), and the actual speed (dotted line). The arrows on the right hand plot occur at the same point in time as the boxes on the left hand plot. 2
Lean Steer
20
1
0
0
−20 −40
−1
0
5
10
−2 15
Steer Torque (Nm)
Lean Torque (Nm)
40
t (s) 20
φ δ
20
10
0
0
−20 −40
δ (deg)
φ (deg)
40
−10
0
5
10
−20 15
t (s) (b) The steer angle, roll angle, and control torques for the manoeuvre described in Figure (a). The red dotted lines in the lower plot represent the desired bounds on the roll angle. The arrows occur at the same point in time as the boxes on the XY plot in (a).
Figure 9.11: A chicane manoeuvre similar to that in Figure 9.9, except that the peak path curvature is doubled and a roll angle of 30◦ is allowed. A preview length of 6 seconds was used for this simulation.
129
and ψ. Our control scheme is easily extended to this case by partitioning r so that " # r1 , r= r2 where r1 represents the desired value of p, and r2 is the desired value of ga (xb , ψ), for some appropriate function ga (·). The error signal becomes: e=
"
p ga (xb , ψ)
#
− Cp xp .
Subsequently, when computing δet and δrt , it is only necessary to apply the transformation ¯ to the partition corresponding to δp. T (ψ) Often it is not possible to measure all the states of the system, and hence we must design a controller which uses output feedback rather than state feedback. Using the framework presented here, the approach to the output feedback problem is clear: simply design an estimator for the state of Σt (using the results in Section 4.3 or 6.3), and apply the Full Information controls to the state estimate. The H2 or H∞ separation principles may then be invoked to argue that the ¯ resulting controller is optimal. When moving to a new equilibrium yaw function ψ(·), it will be necessary to update the controller’s estimates of δψ, δpt and δxpt . If δψ is observable for a particular vehicle model, then we may estimate δψ, and hence remove ¯ is chosen to be pathbased). the requirement for measuring ψ (providing that ψ(·)
9.11
Conclusions
We have presented a generic method for designing vehicle preview controllers for a wide class of vehicle models. Our approach could be considered to be a generalisation of that described in Sharp and Valtetsiotis (2001), whose results we extend by: • providing the capacity to solve combined speed and steering control problems; • providing a framework which is easily generalised to the output feedback case and the case of dynamic weighting functions; • not (necessarily) requiring a measurement of yaw angle; • allowing tracking of 3dimensional trajectories; • eliminating the need to reinterpolate the trajectory at each timestep. In addition, we have provided a timeplan generation algorithm that takes account of stateconstraints (φmax ) and control constraints (amax , dmax ). Finally, the presented control and planning algorithms were combined with velocitybased gain scheduling and successfully applied to a nonlinear bicycle model.
130
Chapter 10
Case Study: H2 Preview Control of a Power Steering Test Rig Chapter Objective To summarise the design and implementation of a Preview Controller for a power steering test rig owned by a Formula 1 racing team. The purpose of the power steering test rig is to expose a Power Assisted Steering (PAS) rack to the same trackrod forces and steering column inputs that it would experience in a racing situation. This chapter describes a project that had the aim of improving certain deficiencies in the control of the steering rig, which had previously prevented accurate reproduction of either trackrod forces or steering inputs. The project encompassed several different control problems, however, this chapter will focus on summarising the two problems for which a preview controller was employed. We will begin with a section describing the operation of the test rig, the requirement for improved control, and a simple mechanical model of the rig. The subsequent two sections are concerned with the design and test of a full feedback preview controller and a simple preview ‘preprocessor’ (see Section 1.4.5) respectively.
10.1
The Test Rig
10.1.1
Overview of Rig Operation
A schematic of the test rig is given in Figure 10.1; descriptions of the variables are given in Table 10.1. The driver steering input is simulated by a rotary motor which applies a torque to the steering column. A given change in the steering column angle causes the PAS rack to effect a fixed translation in the track rods. Two linear motors labelled ‘Left’ and ‘Right’ are free to move along a linear tracks represented by dotted lines near the bottom of the figure. The linear motors apply forces to the force transmission linkages, which in turn apply forces to the track rods. Details of the linkage between the linear motors and the track rods are omitted for reasons of commercial confidentiality. The system reference inputs are the demanded track rod forces and steering column angles as a function of time. The track rod forces were previously controlled in an openloop fashion, by direct computation of the desired linear motor current; it was assumed that a constant
131
Figure 10.1: Steering Rig Schematic
gain related linear motor currents to track rod forces. The rotary motor angular position was controlled by a Proportional Integral Derivative (PID) controller, whose output was the rotary motor current. Throughout this chapter we will refer to the “standard test data”, this is a set of track rod forces and steering angles recorded at Jerez race track and sampled at 20Hz.
10.1.2
A Model of the Rig
If all the components were stiff then the rig would have only one degree of freedom, and the modelling/control task would be considerably simplified. Unfortunately, it was found that there was considerable compliance in both the force transmission linkages and in the steering column. As a result, it was chosen to model the rig as a series of masses, springs and dampers. The following assumptions were made: 1. The PAS rack is rigid and light. 2. The hydraulic assistance in the steering rack may be modelled as an additional torque that is proportional to the torque applied by the steering column. 3. The force transmission linkages may be modelled by lightly damped linear springs. 4. The steering column is a damped torsional spring. 5. The linear motors have a drag proportional to their velocity. 6. The rotary motor has zero drag. 7. Motor torques/forces are proportional to the corresponding motor currents.
132
Ts θc θs kc Dc Ic θp ψ Tc Tpl Tpr Gpas θl kll θr klr Dl Dpas Dlinl Dlinr IM otorr Tr IM otorl Tl Ftr Ftl xl xr IM otorrot rp rl
Torque applied by the rotary motor to the steering column Angle of base of steering column (at connection to PAS) Angle of top of steering column (at connection to rotary motor) Stiffness of steering column Steering column damping Rotary motor inertia Angular coordinate internal to force transmission linkages An angular ratio defined by: θc = ψθp Torque applied to base of steering column Torque applied to left linkage by left track rod Torque applied to right linkage by right track rod PAS force gain (including hydraulic assistance) Angular coordinate internal to left force transmission linkage Stiffness of left force transmission linkage Angular coordinate internal to right force transmission linkage Stiffness of right force transmission linkage Damping of transmission linkages PAS damping (as observed from steering column) Left linear motor drag Right linear motor drag Right motor current Torque internal to right linkage Left motor current Torque internal to left linkage Right Track Rod force Left Track Rod force Left motor position Right motor position Rotary motor current Distance from pivot centre to pin Distance from pivot centre to linear motor Table 10.1: Variables for the test rig model.
133
Based on these assumptions, the following equations are obtained: Ts + (θc − θs )kc + (θ˙c − θ˙s )Dc = Ic θ¨s θc = ψθp Gpas Tc = −(Tpl + Tpr ) Tpl + (θl − θp )kll + (θ˙l − θ˙p )Dl = 0 Tpr + (θr − θp )klr + (θ˙r − θ˙p )Dl = 0 Tc = (θc − θs )kc + (θ˙c − θ˙s )Dc + θ˙c Dpas Dlinl θ˙l + Il θ¨l = Tl + (θp − θl )kll + (θ˙p − θ˙l )Dl Dlinr θ˙r + Il θ¨r = Tr + (θp − θr )klr + (θ˙p − θ˙r )Dl IM otorr = 0.00875 × Tr /rl IM otorl = 0.00875 × Tl /rl rp Ftr = Tpr rp Ftl = Tpl xl = rl θl xr = rl θr IM otorrot = 0.1125 × Ts Sign conventions can be determined from Figure 10.1. If the motor currents are zero and the rig is at rest in the configuration shown in Figure 10.1, then all displacements are defined to be zero. A MATLAB/Maple script was used to solve these equations and to derive a linear transfer function matrix with the three motor currents as inputs and all of the forces and displacements as outputs. The code is included in Appendix B.2. It was also be useful to derive a model in which the existing PID rotary motor position controller was also included. The inputs to such a model are the linear motor currents and the desired rotary motor position. The code in Appendix B.2 also returns a model of this form.
10.1.3
Parameter Determination and Values
Masses and moments of inertia were determined from original component data, as were the gains from motor current to torques/forces. Various low frequency experiments were conducted to obtain the remaining model parameters. For example, one experiment involved application of a slowly varying sinusoidal current to both linear motors, whilst maintaining a fixed rotary motor position. During this test, outer motor positions and trackrod forces were recorded, and so it was possible to determine stiffnesses of the linkages and of the steering column. The results of this and other tests are collated in Table 10.2. In addition, Dl is set to zero, and Dc is also assumed to be small, but is set to 0.1 to improve the numerical performance of the simulations. Although the resulting model performed well at low frequencies, during replay of track data it was not particularly accurate at predicting rig forces and component positions. In order to further refine the model performance, the parameters Gpas , Dpas , Dlinl and Dlinr were optimised to reduce various prediction errors. For example, Gpas was chosen to minimise the mean squared error in predicting the rotary motor current. The modified parameters are given in Table 10.3.
134
Il = 0.923 Ic = 0.0301 kc = 180 ψ = 10.34 Gpas = 29.24 kll = 86000 klr =102000 Dpas = 4.24 Dlinl = 90.7 Dlinr = 140 rp = 0.085 rl = 0.645
kgm2 kgm2 Nm/rad
Nm/rad Nm/rad Nms/rad Nms/rad Nms/rad m m
Table 10.2: Parameter values derived from component data and low frequency tests.
Parameter Gpas Dpas Dlinl Dlinr
Value 50 0.11 32 32
Nms/rad Nms/rad Nms/rad
Signal error minimised Rotary motor current Track rod forces Track rod forces Track rod forces
Table 10.3: Modified parameters based on timedomain least squares fitting.
Rotary Motor Current
Rotary current (A)
6 Actual Simulated
4 2 0 −2 −4 23.6
23.7
23.8
23.9
24
24.1
24.2
24.3
24
24.1
24.2
24.3
Time (s)
1.5
Error (A)
1 0.5 0 −0.5 −1 23.6
23.7
23.8
23.9 Time (s)
Figure 10.2: Comparison of predicted and actual rotary motor current using standard test data at 100% scaling. Note the short time scale of these plots.
135
Left Track Rod Force Left Track Rod Force (%)
150 Actual Simulated
100 50 0 −50 −100 −150
0
10
20
30
40 Time (s)
50
60
70
80
0
10
20
30
40 Time (s)
50
60
70
80
3000
Error (N)
2000 1000 0 −1000 −2000 −3000
Figure 10.3: Comparison of predicted and actual left track rod force when running the standard test data at 100% scaling. The absolute value of the trackrod forces are omitted for reasons of commercial confidentiality.
10.1.4
Evaluation of Model Fidelity
The standard test data was run on the rig and also simulated using the linear model. Figures 10.2 and 10.3 show the predicted and actual rotary motor current and left track rod force respectively. In Figure 10.3 it seems there are two components to the prediction error, a high frequency error due to unmodelled dynamics, and a low frequency error, which may be a result of ‘motor force ripple’ – the variation in forcecurrent gain along the length of the linear motor track (previously estimated to be about +/ 10%). Although the finer features of either signal has not been well predicted (possibly due to unmodelled sensor quantisation noise in the case of the rotary motor), the broad behaviour is sufficiently well reproduced that the model seems to be a reasonable basis for performing control design.
10.1.5
Control Deficiencies
Improved control is desired for the following reasons: Openloop control of the linear motors leads to large force errors The linear motors are used to achieve the desired trackrod forces. The current applied to the linear motors was computed under the assumptions that: 1. There is a constant gain between linear motor current and the generated force. 2. The force transmission linkages are rigid. Unfortunately, neither of these assumptions hold, which leads to the unsatisfactory performance illustrated in Figure 10.4.
136
Left Track Rod Force Tracking
Track Rod Force (%)
150 Demanded Actual
100 50 0 −50 −100 −150
0
10
20
30
40
50
60
70
80
90
50
60
70
80
90
Time (s)
1500 1000
Error (N)
500 0 −500 −1000 −1500 −2000
0
10
20
30
40 Time (s)
Figure 10.4: Demanded track rod force and actual track rod force with openloop control of linear motors.
The rotary motor displays poor position tracking. This is mainly due to a lag in attaining the correct position. Although reference tracking is poor, the disturbance rejection of the PID controller is good, even during simulated curb strikes (occurring at t=57s and t=64s). Performance is illustrated in Figure 10.5
10.1.6
Controller Coding and Implementation
The control algorithms were coded in Simulink and compiled for a dSpace target using MATLAB Realtime Workshop. The controller parameters were generated using the Preview Control Toolbox described in Appendix B.1. The code was executed with a fixed sampling time of 1ms.
137
Rotary Motor Tracking without reference pre−processing Rotary Motor Angle (deg)
100
50
0
−50
−100
0
10
20
30
40
50
60
70
80
90
50
60
70
80
90
Time (s)
15 10 Error (deg)
5 0 −5 −10 −15 −20
0
10
20
30
40 Time (s)
Figure 10.5: Illustration of rotary motor tracking performance with original PID controller.
10.2
Trackrod Force Control
In this section, we will outline the design of a preview tracking controller in which the linear motor currents are used to control the trackrod forces. The rotary motor current will be determined by the existing PID controller.
10.2.1
Problem Formulation
The relevant block diagram is given in Figure 10.6, with a description of signals provided in Table 10.4. In this formulation, the rotary motor demand is treated as a nonpreviewable disturbance. In reality, however, the rotary demand is known in advance, and so we could also apply preview u y w wr wd wy r z z1 z2
Linear motor currents Linear motor positions, track rod forces and desired rotary motor angle wr = wd wy Desired rotary motor angle Linear motor input disturbances Linear motor position measurement noise; track rod force measurement noise Desired trackrod forces z = 1 z2 Weighted force tracking error = Wu u Table 10.4: Signals for outer motor force control problem
138
Φ
ηw
ηr
Wr
−
w
Ww
+
z1
G
u
r
We
y
K Wu
z2
Figure 10.6: A preview tracking problem. The signals u, w, y and r are the controls, disturbances, measurements and reference signals respectively. The signal z = [z1′ z2′ ]′ is the objective signal whose expected power is minimised by the optimal choice of K. The signals labelled ηr and ηw are Gaussian white noise processes, and the filters Ww and Wr are used to model the expected spectral content of w and r.
control principles to this signal, resulting in a combined preview tracking and previewable disturbance rejection problem. However, the inertial component of the trackrod loads is only of the order of a few hundred Newtons, and so the disturbance effect of the rotary demand signal is relatively small. It was therefore decided that the potential performance gains were too small to warrant the additional controller complexity.
10.2.2
Design Procedure
The choice of optimal controller can be strongly influenced by the expected spectral content of the reference and of the disturbance, and so selection of appropriate Ww and Wr is crucial to achieving the desired performance. We will partition Ww as Wwr Ww = 0
0 Wwd
0
0
0 0 . Wwy
Additionally, We may be used to represent the relative importance of achieving good tracking in a particular frequency range. The following points outline the design procedure: 1. Measure the magnitude and spectral content of wr and wy , and so choose initial Wwr and Wwy 2. Estimate spectral content of wd and select initial Wwd This signal was added in order to represent the uncertainty in our model, and so it is not a real signal whose statistics can be measured. It was assumed that most of the model uncertainty was due to motor force ripple, and so the spectrum of the disturbance should be similar to the spectrum of the linear motor position signal, which in turn has a similar spectrum to the steering angle demand. This assumption was used to select an initial Wwd . 3. Adjust filters to tune performance The ideas in Section 8.2 were crucial in the filter design process. Furthermore, it was 139
found that careful choice of Wwd was useful in improving rejection of measurement noise. If the controller receives a measurement which is different to that which it was ‘expecting’ (based on its internal representation of the plant), then this can be attributed either to a disturbance (wd ) or to measurement noise (wy ). If the former, then the controller should act to reject the disturbance, and if the latter, then the controller should do nothing. It is therefore necessary for the controller to be able to distinguish between effects of wy and wd . Such a separation may be achieved when wy and wd have distinctly different spectral contents. Fortunately, for this problem wd is mostly low frequency and wy is white. Modelling this difference in frequency content (through appropriate choice of Wwd ) is crucial in achieving low sensitivity to sensor noise. The final filter choices were: Wwr = Wwd =
Wwy
5.1015 × 10−5 (z − 0.01)2 (z − 0.99)2 " 0.0503(z+3.57)(z+0.256) (z 2 −1.823z+0.837)
0
0
0.0503(z+3.57)(z+0.256) (z 2 −1.823z+0.837)
10−3 0 = 0 0 "
0 0
1 (z−0.999)
Wze =
Wzu =
0 10−3
0 0 100 0 0 100 # 0 0 0
1 (z−0.999)
0
"
#
49800(z−1)2 (z−0.9) z(z 2 −1.991z+0.9912)
0
0 49800(z−1)2 (z−0.9) z(z 2 −1.991z+0.9912)
#
The frequency response of the error weighting, We , was chosen to be flat for moderatetohigh frequencies and large for very low frequencies, thus ensuring good DC tracking. The control weighting function, Wu , was chosen to be small at low frequencies (i.e. low frequency controls are not penalised) in order to further improve low frequency tracking, and large at high frequencies in order to improve the damping of the step response. A preview length of N = 25 was found to be sufficient to achieve γ %,prev = 100.0%.
10.2.3
Performance Evaluation
Figures 10.7 and 10.8 show the openloop and closedloop performance respectively. Table 10.5 gives a quantitative comparison. The preview controller improves the mean tracking error by a factor of 4.7 and the peak error by a factor of 2.2. The simulated closedloop performance with and without motor force ripple is depicted in Figures 10.9 and 10.10. Clearly motor force ripple has a large impact on the closed loop performance. If a set of weighting functions is chosen which leads to better nominal tracking performance, then it is found the feedbackloop becomes unstable with respect to the input multiplicative perturbations associated with motor force ripple. It seems that, in effort to improve nominal tracking, the feedback controller exhibits a ‘higher gain’, which is detrimental to robust stability. Therefore, it was not actuator saturation, or measurement noise which limited performance, it was model uncertainty. It was also possible to tune a nonpreview controller to achieve similar nominal performance
140
Left Track Rod Force Tracking
Track Rod Force (%)
150 Demanded Actual
100 50 0 −50 −100 −150
0
10
20
30
40
50
60
70
80
90
50
60
70
80
90
Time (s)
1500 1000
Error (N)
500 0 −500 −1000 −1500 −2000
0
10
20
30
40 Time (s)
Figure 10.7: Left Track Rod force with openloop control.
Mean Absolute Error (N) Peak Absolute Error (N)
Closed Loop (preview) Left Right 56 55 830 1,300
Open Loop Left Right 230 290 1,700 3,200
Table 10.5: Quantitative comparison of open and closed loop control to the preview controller, without exceeding maximum motor current constraints. However, when this controller was tested with simulated motor force ripple, it was found to be unstable. In fact, it was found that the best H2 nonpreview controller design did not perform any better than the openloop controls. The use of preview was therefore crucial for solving this problem. The top plot in Figure 10.10 illustrates the anticipative nature of the controller. Whilst the corners in the demand signal are just sampling artefacts, the example still usefully illustrates how a preview controller copes with signals with largeamplitude highfrequency features. Although the force tracking performance has been greatly improved, the force errors are still large compared to the inertial components of the track rod loads, and so it is not possible to accurately simulate the effects of changing the wheel inertia.
141
Left Track Rod Force Tracking
Track Rod Force (%)
100 Demanded Actual
50 0 −50 −100 −150
0
10
20
30
40
50
60
70
80
90
50
60
70
80
90
Time (s)
1000
Error (N)
500
0
−500
−1000
0
10
20
30
40 Time (s)
Figure 10.8: Left Track Rod force with closed loop control. r r˜ z z1 z2
Desired future value of rotary motor angle Preprocessed angle demand z1 = z2 Weighted angle error Rotary motor current
Table 10.6: Signals for rotary motor preprocessor problem.
10.3
Rotary Motor Position Control
The rotary motor position tracking performance using the original PID controller is shown in Figure 10.5. The disturbance rejection of this controller is good (for example, the tracking error does not change substantially during the curb strikes at t=57s and t=64s). However, the reference tracking is poor, and so it seems like a good candidate for the use of a Preview Preprocessor to improve tracking performance.
10.3.1
Formulation as a Preview Preprocessing Problem
A Preview Preprocessor simply modifies the reference signal in order to improve the tracking performance of an existing controller. The basic idea is that by feeding the modified trajectory (˜ r) to the preexisting controller, the plant will in fact follow the original trajectory (Φr) more accurately than if it had tried to track Φr directly. The block diagram for this preprocessing problem is shown in Figure 10.11. As before, there are weighting functions which may be adjusted in order to tune the preprocessor performance.
142
Demanded and actual (simulated) left Track Rod force
Track rod Force (%)
100 50 0 −50 −100 −150
Demand Simulated Force 0
10
20
30
40 Time
50
60
70
80
0
10
20
30
40 Time
50
60
70
80
1000
Error (N)
500 0 −500 −1000 −1500 −2000
(a) Without force ripple Demanded and actual (simulated) left Track Rod force
Track rod Force (%)
150 100 50 0 −50 −100 −150
Demand Simulated Force 0
10
20
30
40 Time
50
60
70
80
0
10
20
30
40 Time
50
60
70
80
1000
Error (N)
500 0 −500 −1000 −1500 −2000
(b) With force ripple
Figure 10.9: Simulated closedloop performance with standard test data. Without ripple (a), and with simulated +/10% force ripple (b).
143
Demanded and actual (simulated) left Track Rod force
Track rod Force (%)
100 Demand Simulated Force 50
0
−50
−100 62.75
62.8
62.85
62.9
62.95
63
63.05
63.1
63.15
63.2
63
63.05
63.1
63.15
63.2
Time
1000
Error (N)
500
0
−500
−1000 62.75
62.8
62.85
62.9
62.95 Time
(a) Without force ripple Demanded and actual (simulated) left Track Rod force
Track rod Force (%)
100 Demand Simulated Force 50
0
−50
−100 62.75
62.8
62.85
62.9
62.95
63
63.05
63.1
63.15
63.2
63
63.05
63.1
63.15
63.2
Time
1000
Error (N)
500
0
−500
−1000 62.75
62.8
62.85
62.9
62.95 Time
(b) With force ripple
Figure 10.10: Simulated closedloop performance during a curb strike which occurs in the standard test data. Without ripple (a), and with simulated +/10% force ripple (b).
144
Φ
ηr
Wr
r
K
r˜
−
Gc
+
We
z1 z2
Figure 10.11: The block Gc represents the closedloop formed by the existing tracking controller. The signals r and r˜ are the future reference and the preprocessed reference signals respectively. The signal z is the objective signal whose expected power is minimised by the optimal choice of K. The signal ηr is a realisation of a Gaussian white noise process, and Wr is used to model the expected spectral content of r. Additional descriptions of the signals can be found in Table 10.6.
Mean Absolute Error (deg) Peak Absolute Error (deg)
Raw Demand 1.5 15.2
Preprocessed Demand 0.23 2.2
Table 10.7: Quantitative comparison of rotary motor tracking performance with and without preprocessing.
10.3.2
Design Procedure
By eliminating the feedback element of the controller, the number of weighting functions is greatly reduced. In fact, because we will choose a preview length which is ‘large’, the choice of Wr has no impact on the control (Corollary 4.10), and so it is only necessary to design We . It turns out that a simple gain: We = 103 , is sufficient to produce good tracking without excessive motor current requirements. As with the force control problem, a preview length of N=25 was sufficient to achieve γ %,prev = 100.0.
10.3.3
Performance Evaluation
The standard test data was run on the rig, and the improvement due to preprocessing is illustrated in Figures 10.12 and 10.13, with a quantitative comparison given in Table 10.7. Approximately a factor of 6 improvement has been achieved in both the peak error and the mean error. Figure 10.13 shows that preprocessing eliminated the lag associated with the original controller and also improved tracking of highfrequency features1 . A comparison of the raw and preprocessed demands is given in Figure 10.14. Given the shape of the preprocessed demand, it is unsurprising to find that the magnitude of the rotary motor current has increased (see Figure 10.15). It seems that preview preprocessing provides a very simple and effective method for utilising reference preview to gain a performance benefit. Given a suitable plant model, the design, test and implementation time was of the order of a few hours.
1 Admittedly these features are sampling artefacts in this example, however, the results still serve to show how highfrequency tracking can be improved by preprocessing.
145
Rotary Motor Tracking without reference pre−processing Rotary Motor Angle (deg)
100
50
0
−50
−100
0
10
20
30
40
50
60
70
80
90
50
60
70
80
90
Time (s)
15 10 Error (deg)
5 0 −5 −10 −15 −20
0
10
20
30
40 Time (s)
(a) Without preprocessing Rotary Motor Tracking with reference pre−processing Rotary Motor Angle (deg)
100
50
0
−50
−100
0
10
20
30
40
50
60
70
80
90
50
60
70
80
90
Time (s)
2
Error (deg)
1 0 −1 −2 −3
0
10
20
30
40 Time (s)
(b) With preprocessing
Figure 10.12: Rotary motor tracking with standard data. Without preprocessing (a), and with preprocessing (b).
146
Rotary Motor Angle (deg)
Without reference pre−processing Actual Demand
65 60 55 50 45 40 35 56.95
57
57.05
57.1
57.15
57.2 Time (s)
57.25
57.3
57.35
57.4
Rotary Motor Angle (deg)
With reference pre−processing Actual Demand
65 60 55 50 45 40 35 56.95
57
57.05
57.1
57.15
57.2 Time (s)
57.25
57.3
57.35
57.4
Figure 10.13: Rotary motor tracking with standard data. Without preprocessing (top) and with preprocessing (bottom). The plotted ‘Demand’ signal is Φr.
Raw and preprocessed reference 50
Preprocessed Raw
45
Rotary Motor Angle (deg)
40
35
30
25
20
15
10
52.7
52.8
52.9
53 Time (s)
53.1
53.2
53.3
Figure 10.14: Raw rotary demand (Φr) and preprocessed rotary demand (˜ r).
147
Without reference pre−processing Rotary Motor Current (A)
2
1
0
−1
−2
0
10
20
30
40
50
60
70
80
90
60
70
80
90
Time (s) With reference pre−processing Rotary Motor Current (A)
10
5
0
−5
−10
0
10
20
30
40
50 Time (s)
Figure 10.15: Rotary motor current with and without preprocessing.
10.4
Conclusions
1. Closedloop control of trackrod forces was implemented, bringing a near fivefold improvement in force tracking accuracy as compared to the existing control scheme. It is likely, however, that the errors are still sufficiently large that accurate simulation of different wheel inertias is not possible. 2. Rotary motor tracking was improved using a Preview Preprocessor, which achieved a sixfold reduction in RMS tracking error. Much of this improvement resulted from eliminating the time lag present in the original closedloop system. 3. Preview preprocessing provides a very simple method for using preview to improve performance. The design/implementation/test time was a few hours, as compared to approximately two weeks for the force controller. It is also worth noting that preview preprocessing can be used either to enhance tracking performance, or to reduce the required actuation level whilst maintaining the same tracking performance. 4. Preview can be useful even when the system is ‘fast’; it was only necessary to use 25ms of preview for both the force control and the rotary control problems. 5. Use of the efficient implementation given in Section 4.3.3 was important in ensuring that all computations were completed within the 1ms sample time. 6. Linear motor closedloop performance was limited by plant uncertainty. This makes a strong case for using H∞ design techniques which explicitly take account of plant uncertainty (see, for example, Section 1.4.3). Unfortunately, strict time limits prevented such techniques from being trialled as part of this project.
148
Chapter 11
Conclusions and Future Work 11.1
Conclusions
A general Preview Control problem has been identified that captures a wide variety of special cases including, amongst others, robust preview tracking, fixedlag smoothing and previewbased mixedsensitivity design. A literature review revealed that neither the H2 or H∞ versions of this problem could be solved with reasonable computational time using known algorithms. Preview control had not previously been tackled within the H2 generalised regulator framework, and the established LQG results were insufficiently general for the problem considered here. Known efficient H∞ algorithms were all incompatible with frequency dependent weighting of the reference signal, and none could accommodate both output feedback and the presence of a nonpreviewable disturbance. In this thesis, complete H2  and H∞ optimal solutions to the general preview problem have been presented. These solutions involve both an efficient controller synthesis technique and a novel efficient controller implementation. In particular, the solution of the H∞ problem significantly widens the class of preview problems that may be tackled; for the first time it is possible to utilise practically relevant design techniques such as the robust tracking design and the mixedsensitivity design described in Section 1.4. Efficient computation of the H2 FI controller gains is enabled by a decomposition of the augmented DARE into a plant sized DARE, a Lyapunov equation, and a Stein equation. Solution of the latter two equations is facilitated by the fact that the delay line is uncontrollable from u and the state transition matrix of the delay line is nilpotent. It was found that the Extended Symplectic Pencil associated with the H∞ FI DARE is singular, and this fact was used to recursively reduce the order of the DARE, finally leading to an efficient scheme for computing the H∞ FI controller gains. Solution of the H2 OF DARE, and the derivation of efficient H∞ and H2 controller representations, was enabled by the fact that the states of Φ are uncontrollable from w, and hence the controller may perfectly reconstruct the state of Φ. In order to assess how much preview to use (or indeed whether to use preview at all), it is useful to be able to evaluate both the optimal closedloop norm for a particular preview length (N ) and also the minimum closedloop norm as N → ∞. In the H2 case, both these quantities may be determined using only loworder computations. In fact, it is proposed that the norm reduction achieved by a particular preview length, divided by the maximum norm reduction, should be a good metric for decisions concerning the preview length to be used. In contrast, it was only possible to derive a lower bound for the achievable H∞ performance as N → ∞, and it has not yet been determined whether this bound is tight. The optimal H∞ norm for a given 149
N is obtained as a byproduct of the controller synthesis procedure. Regarding the use of future information, there are obvious parallels between preview controllers and receding horizon controllers. It turns out that the H2 preview problem may be solved by an alternative method which permits a clarification of the link to receding horizon control. Specifically, it was found that a linearquadratic recedinghorizon disturbancerejection problem with a particular choice of cost function generates a control law identical to the H2 preview controller. As a byproduct, this particular receding horizon controller was proven to be closedloop stable. A formula similar to the alternative H2 solution formula may also be found for the H∞ DARE. However, additional subtleties surrounding the existence of H∞ DARE solutions prevent corresponding links being made to minmax receding horizon control problems (such as those described in Lee and Kouvaritakis, 2000). Although many papers have been published on the subject of Preview Control, there has been very little discussion of the generic properties of preview controllers, or the design process in which weighting functions are selected. Such issues were addressed in Chapter 8. In particular it was found that careful choice of frequency dependent weighting functions is crucial when the preview length is short. Preview Control appears to be wellsuited for application to autonomous vehicles, however, a class of nonlinearities generically associated with vehicle models prevents its immediate use. Fortunately this nonlinearity may be accurately represented by a parameterised set of linear systems, from which a simple parameterised set of controllers may be derived. The complete control scheme, combined with speeddependent gain scheduling, is shown to be very effective in controlling a nonlinear bicycle model. The ability of this algorithm to handle a nonlinear, NMP plant, also bodes well for potential application to autonomous aircraft. A H2 preview controller was demonstrated on real hardware as part of a project for McLaren Racing. The most significant conclusions from this project were that efficient controller implementation is important even with relatively short preview lengths, and that the Preview Preprocessor approach to Preview Control is very successful in enhancing the performance of an existing control design. In fact, preprocessing could be one of the most of effective ways of applying Preview Control in an industrial setting, because the design time is short and stability of the plant may remain within the hands of a well understood and industrially accepted control scheme (e.g. PID). In summary: this thesis provides a substantial set of tools for the design, synthesis and implementation of both H2 and H∞ preview controllers.
11.2
Future Work
The writing of this thesis has highlighted a number of areas that would merit further investigation. Some of these are listed below: Theoretical work • It has been noted that the H∞ and H2 controllers can converge for large N , and that the H2 performance of the H∞ optimal closedloop continues to improve, even when the H∞ performance has ceased to do so. It is well known that the H2 norm of the closedloop is bounded above by the entropy (as defined in Iglesias and Mustafa, 1993). Preliminary investigations suggest that the entropy of the H∞ optimal closedloop is monotonically decreasing with increasing N . It would be interesting to find a proof for this observation, and to investigate whether there
150
is a link between a possible entropy reduction formula and the H2 cost reduction formulae derived in Section 4.5. • In Section 7.2, a lower bound was derived for the closedloop norm achievable with infinite preview. It would be useful to investigate the tightness of this bound, perhaps by proving Conjecture 7.1 on page 95. • Numerical experiments suggest that Xgg , the plantsized partition of the H∞ DARE solution, converges to a constant value as N → ∞. In fact it appears that the terminal value of Xgg solves the plantsized Riccati equation associated with rejection of the nonpreviewable disturbance w. In other words, it seems that, for large N , a decomposition along the same lines as the H2 DARE is possible. Furthermore, if the signal w is omitted and N is large, then the DARE partition Xgg is identical for both the H∞ and H2 DAREs. This observation is undoubtedly connected to the convergence of the H2 and H∞ controllers. A proof of these propositions could lead to a very efficient and simple method for synthesising a H∞ preview controller for large preview lengths. • Although no difficulties have been observed to date, the numerical conditioning of the efficient FI H∞ preview synthesis algorithm has not yet been studied in detail. • It has been noted that the stability of a certain receding horizon controller may be guaranteed by virtue of its relationship to a H2 preview controller. It would be interesting to see how this relates to established results on the closedloop stability of receding horizon controllers. • Further investigation of the link between receding horizon minmax control problems (see e.g. Lee and Kouvaritakis 2000) and H∞ preview control could yield results that are of interest to the robust MPC research community. • Problems involving measurement noise on the previewed signal do not fit well within the framework presented in this thesis. Indeed, in the absence of any results to the contrary, it seems that such a problem leads to a high order controller, and requires the ‘bruteforce’ solution of an augmented estimation DARE. Further investigation may reveal a method for reducing the size of the DARE, or an efficient controller implementation, or perhaps a proof that such an implementation does not exist. Applied work • The vehicle control framework described in Chapter 9 has clear applicability to the design of tracking controllers for Unmanned Aerial Vehicles. A case study using an aircraft model would validate the algorithm’s usefulness in an aerospace setting. • The foundations have been laid for the synthesis of preview controllers with guaranteed robust performance. However, these techniques have not yet been applied to real models. Adding preview action to the design procedure and case studies described in Limebeer et al. (1993) would provide a very interesting insight into the operation and benefits of a robust preview controller.
151
Appendix A
Proofs The Simple H2 Example
A.1
We may perform the following innerouter factorisation of G(z): Z − cz ˆ ˆ G(Z)(Z − cz ) = G(Z)(1 − cz Z) . {z } 1 − cz Z   {z } G (Z) Gi (Z)
o
The error function may now be written as:
E(Z) = Gi (Z) Go (Z)K(Z) −Gi (Z)−1 Φ(Z) . {z }  q(Z)
The controller is internally stabilising iff q(Z) is stable, and the H2 norm of the error function is minimised iff the norm of bracketed term is minimised (due to the allpass nature of Gi (Z)). Therefore, the optimal choice of q(Z) will be that which cancels the stable projection of Gi (Z)−1 Φ(Z) Doyle et al. (1990). Now: 1 − cz Z (A.1) (Z − cz )Z N 1 −N +1 N +1 −(1 − c−2 Z − (1 − c−2 = z )cz z )cz Z (Z − cz )Z N −N +1 N +1 +(1 − c−2 Z − c−1 z )cz z (Z − cz ) 1 − c−2 1 − (Z/cz )N c−1 z z −N +1 N +1 = . −cz Z + (Z − cz ) Z − (Z − cz )Z N 1 − Z/cz 1 − c−2 z
Gi (Z)−1 Φ(Z) =
Noting that
−1
Gi (Z)
1−(Z/cz )N 1−Z/cz
is the formula for the sum of a geometric progression gives:
βZ 1 Φ(Z) = + N Z − cz Z
−c−1 z
+ (1 −
c−2 z )cz
i=1
where β=
N X
1 − c2z . +1 cN z
152
i
(Z/cz )
!
,
(A.2)
Setting q(Z) equal to the stable portion of (A.2) leads to the following H2 optimal K(Z): K(Z) = Go (Z)−1 q(Z) −1 ˆ G(Z) = (1 − cz Z)Z N
−c−1 z
+ (1 −
c−2 z )cz
N X i=1
i
(Z/cz )
!
.
The error function is then determined by the remaining unstable portion of (A.2), which could not be cancelled by a stable q(Z): Gi (Z)βZ Z − cz βZ = c Z −1 "z # c−1 c−1 z z = . βc−1 βc−1 z z
E(Z) = −
We may use this statespace representation to compute the H2 norm of E(Z): −1 −2 X = c−1 z Xcz + cz 2
⇒ E(Z)2 = β 2 c−2 z (X + 1) =
A.2
⇒
X=
c−2 z 1 − c−2 z
β2 c2z − 1
1 p ⇒ E(Z)2 = N +1 c2z − 1. cz
Additional H∞ Proofs
This section contains some of the proofs for the results in Section 7.1. The following result concerning the dilation of Av , H and V will be useful. Lemma A.1 (Dilation of Av , H and V ). Av , H and V are related to Av + , H + and V + by: H+ =
" H
+
" Av
Av
V+
where E =
0 .. . 0
Ilr
Proof.
=
0
0
0 0
#
E 0
(A.3) #
" V + EE ′ γ −2 = 0
and E ∈ R(ng +klr )×lr .
153
(A.4) # 0 , −Ilr γ −2
(A.5)
First define h i D1g = D11gw D12 h i Bg = B1gw B2g
′ Lg = C1g D1g " ′ D11gw D11gw − Ilw γ 2 Rg = ′ D12 D11gw
′ D11gw D12 ′ D12 D12
#
.
It is easily checked that R has the structure: R=
"
−γ 2 Ilr
0
0
Rg
#
,
and so: V = BR−1 B ′ " Bg Rg−1 Bg′ = 0
# . 0 −Bp Bp′ γ −2
(A.6)
An increase in preview length will just have the effect of extending Bp , and so (A.5) follows from (A.6). We can write:
Av = A − BR−1 L′ " Bg Rg−1 L′g =A− 0
(A.7) ′ Bg Rg−1 D1g D11gr Cp
0
#
.
Equation (A.4) follows from this expression together with the fact that
Cp + h Using C1 + = C1
h = Cp
# A E , ∀ N ≥ 1. 0 and A+ = 0 0 "
i
i h 0 , and defining D1 = D11
i D12 , then:
′
H + = C1 + (I − D1 R−1 D1′ )C1 + # " H 0 . = 0 0
Proof of Lemma 7.2 First note that, because X satisfies (6.1), then X also satisfies (7.4), and so: Av = (I + V X)Ac −H + X = A′v XAc ,
154
(A.8)
with I + V X guaranteed to be invertible. Writing out (7.6) and using Lemma A.1 gives 4 equations: "
Av
E
0
0
#"
I
#
"
#
I
"
V + EE ′ γ −2
+ = 0 γ −2 E ′ XAc γ −2 E ′ XAc # #" # " # " " #" ′ X −Av 0 X H 0 I Ac = − ′ ′ ′ −2 ′ −E 0 E XAc E XAc 0 0 γ E XAc # " # " #" " V + EE ′ γ −2 I 0 Av E + = 0 γ −2 E ′ XAc 0 0 I + γ −2 E ′ XP # #" # " # " #" " X −A′v 0 A′c XE 0 H 0 P = − ′ ′ ′ −2 ′ −E 0 E XAc E XP 0 0 I + γ E XP
−Iγ −2
#"
0 −Iγ −2
#"
0
E ′ XAc
#!
Ac
X E ′ XAc
#!
P
X
It is straightforward to check that all of these are satisfied. The relationship Ac = (I +V X)−1 Av is useful for checking the fourth equation. In order to check that U + , as given by (7.7), is indeed a basis for the maximal SDS+ , we also require that the columns of U + are independent. This is easily verified by subtracting γ −2 times row 4 from row 2 of U + . Proof of Lemma 7.3 The following identity holds for all X and P for which W is invertible: E ′ XP − γ −2 E ′ XP (I + γ −2 E ′ XP )−1 E ′ XP = E ′ XP (I + γ −2 E ′ XP )−1 .  {z } {z }  W
W
Using this together with symmetry of X, we can write (7.10) as: X+ =
"
X − γ −2 Av ′ XP W −1 E ′ XAc
Ac ′ XE − γ −2 Ac ′ XEW −1 P ′ XE
E ′ XAc − γ −2 E ′ XP W −1 E ′ XAc
E ′ XP − γ −2 E ′ XP W −1 E ′ XP
#
(A.9)
Next we aim to show that (A.9) is equivalent to: X
+
# " h Av ′ −1 T X = Av E′
"
H E − 0 i
# 0 0
(A.10)
with: T = I + X(V + EE ′ γ −2 ) In order to do this, the matrix inversion lemma is used to find an alternative form for T −1 : T −1 = ((I + XV ) + XEE ′ γ −2 )−1 = (I + XV )−1 − γ −2 (I + XV )−1 X(I + EE ′ γ −2 (I + XV )−1 X)−1 EE ′ (I + XV )−1 = (I + XV )−1 − γ −2 (I + XV )−1 XE(I + γ −2 E ′ (I + XV )−1 XE)−1 E ′ (I + XV )−1 = (I + XV )−1 − γ −2 (I + XV )−1 XEW −1 E ′ (I + XV )−1 .
155
By substituting this expression into (A.10), it is easy to see that (A.10) and (A.9) are equivalent. Invertibility of T is guaranteed by invertibility of (I + XV ) and W . It follows from (A.5) that: ˜ −1 B ˜ ′, V + EE ′ γ −2 = BR ˜ is identical to B except that the bottom lr rows have been set to zero. Using this where B allows us to write (A.10) as: X+ =
" Av ′ E′
= Av +
# 0
I+
I+
"
0
′
X 0
"
X
0
#" # ˜ B
h
˜′ R B 0 0 0 # !−1 " X 0 ˜ + ˜ +′ B RB 0 0
i 0
!−1 "
X 0
#" 0 Av 0
0
E 0
#
−
"
H 0
# 0 0
#
0 Av + − H + 0
This now has the form of the DARE (7.5), and so we may immediately write the alternative form: X
+
+′
=A
−
"
X
# 0
A+ + Q+ 0 # ! " " 0 ˜+ + +′ X +′ X ˜ B +L R+B A 0 0 0 0
# !−1 0 ˜+ B 0
" +′ X ˜ B 0
# ! 0 + + A +L . 0
Alternatively, this can be shown using the matrix inversion lemma and some straightforward algebra. Finally, the result follows by using: "
A.3
X 0
# 0 B. 0
# " X 0 ˜ B= 0 0
Zero Preview H2 norm Decomposition
The objective of this section is to evaluate the minimum achievable Tr→z 2 for the case where Wr = I and N = 0. First we observe that P N =0,Wr =I = G. As discussed in Section 4.5, we need only consider the cost associated with the Full Information problem, because the signal r does not introduce any estimation error. The plant G has the Full Information equivalent:
GF I
Ag
B1gr
B1gw
B2g
C1g s = I 0 0
D11gr
D11gw
D12 0 0 0
0
0
I 0
0 I
and so we seek a KF IG which minimises Fl (GF I , KF IG )2 . Using the theory in Section 4.2.1, the associate DARE is given by (6.73) and the optimal controller is given by: h KF IG = F2g
F2p0
156
i F0w .
The quantities F2g , F2p0 and F0w are defined in (4.9), (4.47) and (4.29) respectively. Using (2), we may write: 2 ′ ′ Tr→z 2 = Tr (D11gr + D12 F2p0 ) (D11gr + D12 F2p0 ) + (B1gr + B2g F2p0 ) Xgg (B1gr + B2g F2p0 ) .
¯ 2p0 = B ′ Xgg B1gr + D′ D11gr and R ¯ = B ′ Xgg B2g + Multiplying this out and noting that −RF 2g 12 2g ′ D12 D12 , leads to: ′ 2 ′ ′ Tr→z 2 = Tr B1gr Xgg B1gr + D11gr D11gr − F2p0 RF2p0 .
157
Appendix B
Code B.1
Preview Control Toolbox
The Preview Control Toolbox (PCT) provides MATLAB code which implements the controller synthesis algorithms described in Chapters 4 and 6. In writing the PCT, the objectorientated features of MATLAB were found to be particularly useful, largely because of the very natural ‘inheritance’ relationship between the various generalised plants. Loosely speaking, the statement “class A inherits from class B”, implies that class A has all the functionality of class B, in addition to some extra data or functions. The disturbance rejection with preview problem contains all the attributes of a generalised regulator problem, plus some additional data regarding the structure of the statespace matrices. We may define two classes which represent these generalised plants, and which have an inheritance relationship. The full PCT class hierarchy is described in Figure B.1, and the table below summarises the relationship between the classes and the preview problems they represent. Class
Figure
GenSys
1
DistRejPrevSys PrevTrackSys PreprocSys
1.5 B.2 1.11
Description Generalised Regulator Preview Disturbance Rejection Preview Tracking without integral action Preview preprocessing
The class PrevController (illustrated on Figure B.1) is used to ensure a particular state ordering within the controller, which is useful when passing controller objects to Simulink for simulation or code generation. It is hoped that the PCT will eventually contain classes for all of the problems described in Section 1.4. Each of these classes would inherit from DistRejPrevSys. The latest version of the PCT is available at: http://previewcontroltoolbox.googlecode. com/.
Getting started with the Preview Control Toolbox The following code illustrates the use of the PCT. A copy of this code can be found in the file PCTDemo.m. Details on the use of any function can be obtained by typing ‘help ’ at the MATLAB prompt. First define the signal dimensions: 1 2 3
p=2; % dim(z) q=1; % dim(y) m=1; % dim(u)
158
lti
ss MATLAB Control Systems Toolbox class representing a generic statespace system
+A: matrix +B: matrix +C: matrix +D: matrix +Ts: int
GenSys Generalised plant
+l: int +m: int +p: int +q: int +n: int +X2d(): matrix
PrevController Preview Controller
+PrevController(K:ss) Constructor
Returns solution to FI H2 DARE
DistRejGSys
+Xinfd():
Generalised plant with partitioned disturbance
+lw:
+trans():
int
GenSys
Returns transpose system
Dimension of w
+lr:
matrix
Returns solution to FI Hinf DARE
+MakeH2dK():
int
PrevController
Returns H2optimal controller
Dimension of r
+MakeHinfdK():
PrevController
Returns Hinfsuboptimal controller
+MakeOptHinfdK():
PrevController
Returns Hinfoptimal controller
DistRejPrevSys Generalised plant for previewable disturbance rejection
+N: int +Wz: ss +Wr: ss +Ww: ss +G: DistRejGSys +MkH2dK(): PrevController +MkHinfdK(): PrevController +MkOptHinfdK(): PrevController +ComputXggRb(): matrix Efficient computation of Xgg and Rbar for Hinf FI DARE
+ComputeBX():
matrix
Efficient computation of B’X for Hinf FI DARE
PrevTrackSys
PreprocSys
Preview tracking system
Preview preprocessing system
+N: int +lr: int +Wz: ss +Wr: ss +PreprocSys(Gc:GenSys,N:int,lr:int, Wz:ss,Wr:ss)
+lr: int +Wz: ss +Wr: ss +Ww: ss +N: int +G: GenSys +PrevTrackSys(G:GenSys,N:int,lr:int, Wz:ss,Wr:ss,Ww:ss)
Constructor
Constructor
Figure B.1: Universal Modelling Language (UML) diagram for classes in the Preview Control Toolbox (some member functions and attributes have been omitted for clarity). All attributes are public but readonly, with the exception of the attributes of the class ‘ss’, which may also be written to.
159
Φ
ηw ηr
Wr
−
w
Ww
G
u
r
Wz
+
K
z
y
Figure B.2: A generic preview tracking problem. The signals u, w, y and r are the controls, disturbances, measurements and reference signals respectively. The signal z is the controlled variable. The signals labelled ηr and ηw are Gaussian white noise processes, and the filters Ww and Wr are used to model the expected spectral content of w and r.
4 5
lr=1;% dim(r) l=1; % dim(w)=0 in this example
Define the preview length: 6
N=200;
Define the sample time: 7
Ts=0.002;
Define the Ztransform variable: 8
z=tf([1 0],1,Ts);
Construct a delay line: 9
Phi=zˆ−N;
Define some weightings (for tuning performance): 10 11
trackweight=10; measnoise=1;
Define the plant to be controlled: 12 13 14
cp=1+10*j; % an unstable pole G=zpk([],[cp,cp'],[100]); % a zero−pole−gain model G=c2d(G,Ts); % convert to discrete−time
Add an additional output, so that the control signal is included in z: 15
Ggen=[ G;
eye(m) ];
Add an output disturbance: 16
Ggen=[[20;0] Ggen];
Add a measurement signal, y. In this case, the measured signal is identical to the signal we are trying to control. 17
Ggen=[ Ggen;Ggen(1,:)];
Add some measurement noise: 18
Ggen=[[zeros(q+p−1,q); measnoise] Ggen];
Convert Ggen to class GenSys: 19
Ggen=GenSys(minreal(ss(Ggen)),q,m);
In this example, the outputs of Ggen are [zg+wout;u;y], where wout is the output disturbance, and it is desired for zg to track a delayed version of the reference r. Also note that y=zg+noise and also z=Wz*[zg;u]. 160
Now, define a low pass output weighting function: 20
Wz=[trackweight*zpk(0,0.99,1,Ts),0;0, 1];
Define an input weighting function: 21
Wr=eye(lr); % this could be any 'lti' object
Create the object P , which represents the generalised plant for a preview tracking system: 22
P=PrevTrackSys(Ggen,N,lr,Wz,Wr);
Notice that PrevTrackSys inherits from DistRejGSys, DistRejPrevSys, and GenSys. It also inherits form the class PublicProperties, which means that one can read its attributes using ‘dot’ notation, e.g. P.Wr, P.A, P.lr, P.Ts etc. Because P inherits from GenSys, we can call any of the public methods provided by GenSys. For example, the following code computes (by bruteforce) the H2 FI and OF DARE solutions: 23 24
X=X2d(P); Y=X2d(trans(P));
Since the class GenSys does not ‘know’ anything about the finer structure of its statespace matrices, all methods contained in GenSys necessarily involve bruteforce computations. Efficient computational algorithms can only appear in the class DistRejSys (or in classes inheriting from DistRejSys). Now compute the H2 and H∞ Output Feedback controllers, and also form the closedloop transfer functions: 25 26
K2=MkH2dK(P); % Compute OF controller; calls efficient routines in DistRejPrevSys CL2=lft(P,K2); % form closed loop using a linear fractional transformation
27 28 29 30 31
gam0=1;h0=1000;hmin=1e−2;bFI=false; [Kinf,gam]=MkOptHinfdK(P,P.N,gam0,h0,hmin,bFI); % Compute OF controller; % calls efficient routines in DistRejPrevSys CLinf=lft(P,Kinf); % linear fractional transformation
Obtain Full Information version of generalised plant: 34
PFI=GetFIPlant(P);
Compute H2 and H∞ Full Information controllers, and also form the closedloop transfer functions: 35 36
KFI2=KFI2d(P); % Compute FI H2 gains CLFI2=lft(PFI,KFI2); % linear fractional transformation
37 38 39 40 41
gam0=1;h0=1000;hmin=1e−2;bFI=true; [KFIinf,gamFI]=MkOptHinfdK(P,P.N,gam0,h0,hmin,bFI); % Compute FI controller gain; % calls efficient routines in DistRejPrevSys CLFIinf=lft(PFI,KFIinf); % linear fractional transformation
If the preview length is very large, then storing the full augmented system, P, may represent an excessive memory requirement. In this instance, it is possible to use a P which has been instantiated with an arbitrary preview length (e.g. N = 1), and then override this preview length for computation of the controller. In other words, the efficient controller synthesis routines ignore the attribute P.N. For example: 42 43
Nlong=1000; KFI2 long=KFI2d(P,Nlong);
Similar overriding is also possible when using MkOptHinfdK(...) and MkHinfdK(...). Now compute the improvement in 2norm due to preview: 44 45
[gamFI2,gam2prev]=ComputeMinFICL2norm(P); %gamFI2 is the FI 2−norm, and gam2prev is the improvement
Compute maximum possible improvement for N → ∞: 46
gam2prevmax=ComputeImpCL2normNinf(P);
161
For the Full Information closedloops, plot the response of the outputh of G toi a step change ′ ′ in r. Note that the computed closedloop transfer functions map η = ηr′ ηw to z, so some manipulation is required to produce the closedloop transfer function from r to the output of G. 47 48 49 50 51 52 53 54 55 56 57
Tf=1; figure(1);clf subplot(2,1,1) step(CLFI2(1,1)/(Wz(1,1)*Wr(1,1))+Phi,Tf) % CLFI2(1,1)/(Wz(1,1)*Wr(1,1))+Phi represents % the TF from r−>zg hold all step(CLFIinf(1,1)/(Wz(1,1)*Wr(1,1))+Phi,Tf) step(Phi,Tf) grid on legend('Ouput of G with H2 Control', 'Output of G with Hinf Control', 'Desired output') title('Full Information Preview Tracking Controllers')
58 59 60 61 62 63 64
subplot(2,1,2) step(CLFI2(2,1)/(Wz(2,2)*Wr(1,1)),Tf) hold all step(CLFIinf(2,1)/(Wz(2,2)*Wr(1,1)),Tf) grid on legend('H2 Control','Hinf Control')
Output: Full Information Preview Tracking Controllers
Amplitude
1.5 Ouput of G with H2 Control Output of G with Hinf Control Desired output
1 0.5 0 −0.5
0
0.1
0.2
0.3
0.4
0.5 Time (sec)
0.6
0.7
0.8
0.9
1
Step Response
Amplitude
20 H2 Control Hinf Control
10 0 −10 −20
0
0.1
0.2
0.3
0.4
0.5 Time (sec)
0.6
0.7
0.8
0.9
1
Plot response of the Output Feedback closedloops for step change in r: 65 66 67 68 69 70 71 72 73
figure(2);clf subplot(2,1,1) step(CL2(1,1)/(Wz(1,1)*Wr(1,1))+Phi,Tf) hold all step(CLinf(1,1)/(Wz(1,1)*Wr(1,1))+Phi,Tf) step(Phi,Tf) grid on legend('Ouput of G with H2 Control', 'Output of G with Hinf Control', 'Desired output') title('Output Feedback Preview Tracking Controllers')
74 75 76 77 78 79
subplot(2,1,2) step(CL2(2,1)/(Wz(2,2)*Wr(1,1)),Tf) hold all step(CLinf(2,1)/(Wz(2,2)*Wr(1,1)),Tf) grid on
162
Output: Output Feedback Preview Tracking Controllers
Amplitude
1.5 Ouput of G with H2 Control Output of G with Hinf Control Desired output
1 0.5 0 −0.5
0
0.1
0.2
0.3
0.4
0.5 Time (sec)
0.6
0.7
0.8
0.9
1
0.6
0.7
0.8
0.9
1
Step Response
Amplitude
20 10 0 −10 −20
B.2
0
0.1
0.2
0.3
0.4
0.5 Time (sec)
Generation of Linear Steering Rig Model
The following MATLAB code was used to generate a linear steering rig model with the userspecified inputs and outputs. 1 2 3 4 5 6 7 8
function [Gc,G,Sol]=MkRigModel(inputs,outputs,usr val) % MkRigModel(inputs,outputs,usr val) % Derives a linear model with the desired inputs and outputs % 'inputs' and 'outputs' are cell arrays of variable names. 'usr val' is % cell array of additional commands to execute (e.g. to override default % parameter values) % Returns Gc, the closed loop transfer function with the rotary motor % engaged, and G, the open loop transfer function.
9 10
% All parameters are in SI units.
11 12 13 14
if nargin==2 usr val={} end
15 16 17 18 19 20 21
Tsamp=0.001; Ic=0.0301; kc=180; Dc=0.1; psi=10.68/1.044; Gpas=29.24;
22 23 24 25
Il=0.0303+2.15*0.645ˆ2; kll=86038*0.645ˆ2; klr=102446*0.645ˆ2;
26 27 28 29 30
Dl=0; Dlin=32; Dlinl=Dlin; Dlinr=Dlin;
31 32
Dpas=0.11;
33 34
for i=1:length(usr val)
163
% execute user instructions (usually to override default parameter % values) eval(usr val{i})
35 36 37 38
end
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
eqn1='Ts+(tc−ts)*kc+(tc−ts)*s*Dc=Ic*ts*sˆ2'; eqn2='tc=psi*tp'; eqn3='Gpas*Tc=−(Tpl+Tpr)'; eqn4='Tpl+(tl−tp)*kll+(tl−tp)*Dl*s=0'; eqn5='Tpr+(tr−tp)*klr+(tr−tp)*Dl*s=0'; eqn6='Tc=(tc−ts)*kc+(tc−ts)*Dc*s+tc*Dpas*s'; eqn7='Dlinl*tl*s+Il*tl*sˆ2=Tl+(tp−tl)*kll+(tp−tl)*Dl*s'; eqn8='Dlinr*tr*s+Il*tr*sˆ2=Tr+(tp−tr)*klr+(tp−tr)*Dl*s'; eqn9='IMotorr=(14/1600)*Tr/0.645'; eqn10='IMotorl=(14/1600)*Tl/0.645'; eqn11='Ftr*0.085=Tpr'; eqn12='Ftl*0.085=Tpl'; eqn13='xl=0.645*tl'; eqn14='xr=0.645*tr'; eqn15='xc=(xl+xr)/2'; eqn16='IMotorrot=(18/160)*Ts';
56 57 58 59
Sol=solve(eqn1,eqn2,eqn3,eqn4,eqn5,eqn6,eqn7,eqn8,eqn9,eqn10,eqn11,eqn12,... eqn13,eqn14,eqn15,eqn16,... 'xl,xr,tl,tr,ts,tc,tp,Tpl,Tpr,Tc,Tr,Tl,Ftr,Ftl,xc,Ts');
60 61
disp('Done Derivation...')
62 63 64
s=tf([1 0],1); Gsym=MakeSymbolicG(Sol,inputs,outputs);
65 66 67 68 69 70 71 72
sz=size(Gsym); for i=1:sz(1) for j=1:sz(2) % convert symbolic Gsym into an ss system G(i,j)=eval(strrep(char(Gsym(i,j)),'.*','*')); end end
73 74 75
% compute a minimal realisation of the open−loop transfer function G=minreal(ss(G));
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
% obtain transfer function for rotary motor controller % and store in Krot s=tf([1 0],1); z=tf([1 0],1,0.001); FBf0=150; FFf0=100; Kff=15; Kp=30; Kd1=0.5; Kd2=0; Ki=600; FF=2*pi*FFf0/(s+2*pi*FFf0); FB=2*pi*FBf0/(s+2*pi*FBf0); V=Kp+FB*(Kd1*s+Kd2*sˆ2);
91 92 93
Kru=Kff*FF+Ki/s; % tf from reference to control Kyu=−V−Ki/s; % tf from measurement to control
94
164
95 96
Krot=[Kyu Kru]; % inputs: [actual position; demanded position] % outputs: IOutputRotary
97 98 99 100
%form open−loop model G=GenSys(G,1,1); % the GenSys class is provided by the Preview Control Toolbox
101 102 103
%form closed−loop model Gc=lft(G,Krot);
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
disp('Formed LTI system...') end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function G=MakeSymbolicG(Sol,inputs,outputs) % Forms a symbolic representation of the rig transfer function for i=1:length(inputs) for j=1:length(outputs) if IsInList(outputs{j},inputs) if strcmp(inputs{i},outputs{j}) %the output is actually an input, so just pass through this %channel G(j,i)=1; end else G(j,i)=collect(diff(Sol.(outputs{j}),inputs{i}),'s'); end end end
123 124
end
125 126 127 128 129 130 131 132 133 134
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function ans=IsInList(test,list) ans=0; for i=1:length(list) if strcmp(list{i},test) ans=i; break end end
135 136
end
165
Appendix C
Nonlinear bicycle model The following model description and Autosim code is the work of Amrit Sharma1 .
C.1
Model Description
The bicycle model that was originally studied by Whipple, and then over a century later in Meijaard et al. (2007) and Limebeer and Sharp (2006), is illustrated in Figure C.1. The front and rear frames of the vehicle are connected along an inclined steering axis. The rider is assumed to be rigidly attached to the rear frame. The front and rear wheels are free to spin and are attached respectively to the front and rear frame sections. The wheels are modelled δ
θf
θr head angle
O X Z
ϕ
trail
wheelbase
ψ
Figure C.1: The simple bicycle model with each of its degrees of freedom. The model comprises two frames hinged together along an inclined steering axis. The rider is rigidly attached to the rear frame, and each wheel is assumed to be in point contact with the road.
as planar and each wheel is assumed to make a point contact with the ground. The wheel mass distribution need not be planar and any positive moments of inertia are allowed providing Iyy ≤ 2Ixx and Iyy ≤ 2Izz . In the case of planar wheels equality follows from the perpendicular axis theorem. This simple model is fully characterized by twenty five parameters that are listed in Table C.1. Each parameter is defined in an upright reference configuration that has both wheels in contact with a level ground plane, and with the machine steering pointing straight ahead. In the reference configuartion the origin of the inertial coordinate system is at the rearwheel groundcontact point O. The SAE vehicle dynamics sign convention is used that has 1 Control
and Power Group, Imperial College, London
166
the positive xaxis pointing forwards, the positive zaxis pointing down and the positive yaxis pointing to the rider’s right. Positive angles are defined using a righthand rule. Parameters Wheel base Trail Head Angle Steer axis tilt Twist axis joint Gravity Rear wheel Radius Mass Mass moments of inertia Relaxation Length Cornering Stiffness Coefficient Camber Stiffness Coefficient Position of center of mass Mass Mass moments of inertia Front frame Position of center of mass Mass Mass moments of inertia Front wheel Radius Mass Mass moments of inertia Relaxation Length Cornering Stiffness Coefficient Camber Stiffness Coefficient
Symbol w c α λ (xjoint , zjoint ) g
Value 1.02m 0.08m (2π)/5 rad/s (π/2 − α) rad/s (0.8, −0.9)m 9.81N/kg
rR mR (IRxx , IRyy , IRzz ) σr Crs Crc (xB , yB , zB ) mB IBxx 0 IBxz IByy 0 sym IBzz
0.3m 2kg (0.06, 0.12, 0.06)kg m2 0.1m 14.325 1.0 (0.3, 0.0, −0.9)m 85kg 9.2 0 2.4 11 0 kg m2 sym 2.8
(xH , yH , zH ) mH IHxx 0 IHxz IHyy 0 sym IHzz
(0.9, 0.0, −0.7)m 4kg 0.0546 0 −0.0162 kg m2 0.06 0 sym 0.0114
rF mF (IF xx , IF yy , IF zz ) σf Cf s Cf c
0.35m 3kg (0.14, 0.28, 0.14)kg m2 0.1m 14.325 1.0
Table C.1: Bicycle parameters based on Meijaard et al. (2007) and Limebeer and Sharp (2006). The inertia matrices are referred to bodyfixed axis systems that have their origins at the body’s mass center, and are aligned with the inertial reference frame Oxyz when the machine is in its nominal configuration. The machine’s configuration can be described in terms of nine generalized coordinates. The location of the origin of the rear frame is described by three global Cartesian coordinates, with its orientation described by yawrollpitch angular freedoms. Consequently, the angle between the inertial xaxis and the line of intersection of the rear frame with the ground plane is the yaw angle ψ, where a positive angle corresponds to a positive rotation about the zaxis. The roll angle ϕ is the angle that the rear frame makes with the inertial zaxis; a lean to the right is deemed positive. The pitch angle is the angle between the rearframefixed xaxis and the line of intersection between the rear frame and the road surface. The other three generalized coordinates are the steering angle δ, and the angular positions of the road wheels θr and θf . Since the two wheels remain in contact with the ground, the two resulting holonomic constraints mean that the heave displacement is zero, with the pitch angle dependent on the lean angle ϕ and the steering angle δ. There are two nonholonomic constraints associated with the wheelcontact groundplane velocities that eliminates longitudinal slip while sideslipping tyres are modelled as a dynamic
167
force development process via a speeddependent firstorder lag. The characterizing parameter is called the relaxation length and can be determined experimentally. The force generated by the front tyre due to a combination of slip and camber is modelled as: σf ˙ f F + Fyf vf  y
= Fzf (Cf s vyf − Cf c ϕf ),
(C.1)
where σf is the relaxation length, Fzf is the normal load on the front tyre and ϕf is the front wheel’s camber angle relative to the road. The side force Ff acts in a direction to oppose the lateral velocity vyf . The product Fzf Cf c is called the tyre’s camber stiffness and vf  is the wheel travel speed. The side force associated with the rear tyre is given analogously by σr ˙ r F + Fyr vr  y
= Fzr (Crs vyr − Crc ϕr ),
(C.2)
where each term has an interpretation that parallels that of the front wheel. The requisite six tyre parameters are given in Table C.1.
C.2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Autosim Bicycle Model
;; Set up preliminaries ; (defvar *linear*) (setf *linear* t) ;Ask for a linear or nonlinear model (t or nil) (reset) (si) (add−gravity) (setsym *double−precision* t) (setsym *absolute−drop* nil) (setsym *drop−small−terms* nil) (setsym *safe−sqrt* t) (setsym *safe−divide* t) (setsym *maximum−difeqn−lines* 500) (setsym *stiff−integrator* t) (setsym *fast−computed−coordinates* nil)
16 17 18
(unless *linear* (setsym *multibody−system−name* "Meijaard Bicycle n"))
;n for non−linear
19 20 21
(when *linear* (setsym *multibody−system−name* "Meijaard Bicycle ls"))
;l for linear
22 23
;;Define various points in the nominal configuration within n:
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
(add−point Gr
:name :body (add−point Gf :name :body (add−point rw centre :name :body (add−point fw centre :name :body (add−point rwcpn :name :body (add−point fwcpn :name :body (add−point ff joint :name :body
"Rear frame centre of mass" n :coordinates (xrf 0 −zrff)) "Front frame centre of mass" n :coordinates (xff 0 −zfff)) "Rear wheel centre point" n :coordinates ( 0 0 −Rrw)) "Front wheel centre point" n :coordinates (ww 0 −Rfw)) "Rear wheel ground contact point in n" n :coordinates (0 0 0)) "Front wheel ground contact point in n" n :coordinates (ww 0 0)) "Front frame joint point with rear frame" n :coordinates (xcohead 0 −zcohead))
168
39 40 41
; ;;Build the rear frame into the model. This is done in two steps: ;
42 43 44 45 46 47 48 49 50 51
(add−body ya fr :name "Yaw Frame" :parent n :translate (x y) :joint−coordinates (0 0 0) :body−rotation−axes z :parent−rotation−axis z :reference−axis x :mass 0 :inertia−matrix 0)
52 53 54 55 56 57 58 59 60 61
(add−body ptch fr :name "Pitch Frame" :parent ya fr :translate z ; Added on 07/05/10 :joint−coordinates (0 0 0) :body−rotation−axes y :parent−rotation−axis y :reference−axis z :mass 0 :inertia−matrix 0)
62 63
(add−body rf
64 65 66 67 68 69 70 71 72
:name "Rear Frame" :parent ptch fr :body−rotation−axes x :parent−rotation−axis x :reference−axis y :cm−coordinates Gr :mass Mr :inertia−matrix ((Irx 0 Crxz) (0 Iry 0) (Crxz 0 Irz)))
73 74 75 76 77 78 79 80 81 82 83 84
; ;;Add in the rear wheel: (add−body rw :name "Rear Wheel" :parent rf :body−rotation−axes y :parent−rotation−axis y :reference−axis z :joint−coordinates rw centre :cm−coordinates rw centre :mass Mrw :inertia−matrix (irwx irwy irwx))
85 86 87 88 89 90 91 92 93 94 95
(setsym (setsym (setsym (setsym (setsym (setsym (setsym
rw lat "z(dir(z(dplane([rwy],[nz]))))") rw long "z(cross(@rw lat,[nz]))") rwr rad "z(cross(@rw long, [rwy]))") rw vec "z(@rwr rad*Rrw)") rw xx "z(dot(@rw vec, [rwx]))") rw yy "z(dot(@rw vec, [rwy]))") rw zz "z(dot(@rw vec, [rwz]))")
96 97 98
;;Introduce an unspun ground contact point for the rear wheel. This ;;point is fixed in the rear frame:
169
99 100 101 102
(add−point rwcp :name "Rear Wheel Ground Contact Point" :body rw :coordinates (@rw xx @rw yy @rw zz) :moving t)
103 104
(add−point rwcpv
105 106
:name "Rear wheel contact point" :body rf :coordinates rwcpn)
107 108 109 110 111 112
;Define the ;rear wheel (setsym vur (setsym vul
rear wheel speed along the line of intersection of the and the ground plane: "dot(vel(rwcpv),@rw long))") "dot(vel(rwcpv),@rw lat))")
113 114 115 116
;;Define the steering and reference axis for the front frame: (setsym str axis "sin(epsilon)*[rfx] + cos(epsilon)*[rfz]") (setsym twst axis "cos(epsilon)*[rfx] − sin(epsilon)*[rfz]")
117 118 119 120 121 122 123 124 125 126 127 128
;;Add in the front frame: (add−body ff :name "Front Frame" :parent rf :body−rotation−axes z :parent−rotation−axis @str axis :reference−axis @twst axis :joint−coordinates ff joint :cm−coordinates Gf :mass Mf :inertia−matrix ((Ifx 0 Cfxz)(0 Ify 0)(Cfxz 0 Ifz)) :inertia−matrix−coordinate−system n)
129 130 131 132 133 134 135 136 137 138 139 140
;;Add in the front wheel: (add−body fw :name "Front Wheel" :parent ff :body−rotation−axes y :parent−rotation−axis y :reference−axis z :joint−coordinates fw centre :cm−coordinates fw centre :mass Mfw :inertia−matrix (ifwx ifwy ifwx))
141 142 143 144
;;Introduce an unspun ground contact point for the front wheel. This ;;point is fixed in the front frame:
145 146
(add−point rwcm
:name "Rear wheel mass centre point" :body rw :coordinates rw centre)
(add−point fwcm
:name "Front wheel mass centre point" :body fw :coordinates fw centre)
(add−point rfcm
:name "Rear frame mass centre point" :body rf :coordinates Gr)
(add−point ffcm
:name "Front frame mass centre point"
147 148 149 150 151 152 153 154 155 156 157 158
170
:body ff :coordinates Gf)
159 160 161 162 163 164 165
;;Define the front wheel speed along the line of intersection of the ;;front wheel and the ground plane:
166 167 168 169 170 171 172 173
(setsym (setsym (setsym (setsym (setsym (setsym (setsym
fw lat "z(dir(z(dplane([fwy],[nz]))))") fw long "z(cross(@fw lat,[nz]))") fwr rad "z(cross(@fw long, [fwy]))") fw vec "z(@fwr rad*Rfw)") fw xx "z(dot(@fw vec, [fwx]))") fw yy "z(dot(@fw vec, [fwy]))") fw zz "z(dot(@fw vec, [fwz]))")
174 175 176 177 178 179 180
;;Introduce an unspun ground contact point for the rear wheel. This ;;point is fixed in the rear frame: (add−point fwcp :name "Front Wheel Ground Contact Point" :body fw :coordinates (@fw xx @fw yy @fw zz) :moving t)
181 182
(add−point fwcpv
183 184
:name "Front wheel contact point" :body ff :coordinates fwcpn)
185 186 187 188 189
(setsym (setsym (setsym (setsym
vuf "dot(vel(fwcpv),@fw long)") fw z "dot(pos(fwcpv, n0),[nz])") rw z "dot(pos(rwcpv, n0),[nz])") vun "dot(vel(fwcpv),[nz])")
190 191 192 193
;;Define the camber and side−slip angles: ;;Rear wheel camber angle: (setsym phir "asin(dot([rfy],[nz]))")
194 195 196
;;Front wheel camber angle: (setsym phif "asin(dot([ffy],[nz]))")
197 198 199 200
;;Rear wheel side−slip angle: Positive lateral velocity gives positive slip ;;and negative force. (setsym alphar "asin(dot(@rw lat,dir(vel(rwcpv))))")
201 202 203
;;Front wheel side−slip angle: (setsym alphaf "asin(dot(@fw lat,dir(vel(fwcpv))))")
204 205 206 207 208 209 210
;;Work out the normal tyre loads. Only the front one is influential. (setsym ground vector "pos(fwcpv,rwcpv)") (setsym Gr vector "pos(rfcm,rwcpv)") (setsym Gf vector "pos(ffcm,rwcpv)") (setsym Gfw vector "pos(fwcm,rwcpv)") (setsym Grw vector "pos(rwcm,rwcpv)")
211 212 213 214 215 216
;;No slip in the longitudinal direction (setsym sliprw long "dot(vel(rw0),@rw long) + Rrw*ru(rw)") (add−speed−constraint "@sliprw long" ) (setsym slipfw long "dot(vel(fw0),@fw long) + Rfw*ru(fw)") (add−speed−constraint "@slipfw long" )
217 218
; Work out the normal and lateral spring loads. ;Added in on 07/05/09
171
219 220 221 222 223 224 225 226
(setsym rwr mag "z(dot(pos(ya fr0, rw0),[ya frz]))/cos(@phir)") (setsym fwr mag "z(dot(pos(ya fr0, fw0),[ya frz]))/cos(@phif)") (add−state−variable Yrw Yrwdot F) (add−state−variable Yfw Yfwdot F) (setsym Zr "Yrw*tan(@phir)−(Ktr*(Rrw−@rwr mag))/cos(@phir) −Dtr*dxdt((Rrw−@rwr mag))/cos(@phir)") (setsym Zf "Yfw*tan(@phif)−(Ktf*(Rfw−@fwr mag))/cos(@phif) − Dtf*dxdt((Rfw−@fwr mag))/cos(@phif)")
227 228 229 230 231
;;Work out the tyre side forces, introducing tyre relaxation: (add−state−variable Yr Yr dot F) (set−aux−state−deriv Yr dot "(@vur/sigmar)*(Cr1*@Zr*@alphar −Cr2*@Zr*@phir−Yr)")
232 233 234 235
(add−state−variable Yf Yf dot F) (set−aux−state−deriv Yf dot "(@vuf/sigmaf)*(Cf1*@Zf*@alphaf −Cf2*@Zf*@phif−Yf)")
236 237 238
(set−aux−state−deriv Yrwdot Yr dot) (set−aux−state−deriv Yfwdot Yf dot)
239 240 241 242 243 244 245 246 247
;;Include the side forces: (add−line−force Yr2 :name "Rear Wheel Lateral Tyre Force" :direction "@rw lat" :point1 rwcp :point2 n0 :magnitude Yr :no−forcem *linear*)
248 249 250 251 252 253 254
(add−line−force Yf2 :name "Front Wheel Lateral Tyre Force" :direction "@fw lat" :point1 fwcp :point2 n0 :magnitude Yf :no−forcem *linear*)
255 256 257 258 259 260 261
(add−line−force Zff :name "Vertical load on front wheel" :direction [nz] :point1 fwcp :point2 n0 :magnitude @Zf :no−forcem *linear*) ;"min(@Zf,0)"
262 263 264 265 266 267 268
(add−line−force Zrf :name "Vertical load on rear wheel" :direction [nz] :point1 rwcp :point2 n0 :magnitude @Zr :no−forcem *linear*) ;"min(@Zr,0)"
269 270 271 272 273 274 275 276 277 278
(unless *linear* ;;Control Forward Speed of Bicycle (add−input thetaref "F*L" :name "Velocity Control") (add−moment drv torq :name "Drive Torque" :direction [rwy] :body1 rw :body2 rf :magnitude "input ext(thetaref)"
172
279
:no−forcem t)
280 281 282 283 284 285 286 287 288
;;Control Steering Torque (add−input ∆ref "F*L" :name "Steering Angle Control") (add−moment str torq :name "Steering Torque" :direction [ffz] :body1 ff :body2 rf :magnitude "input ext(∆ref)" :no−forcem t)
289 290 291 292 293 294 295 296 297 298
;;Control Roll Torque (add−input phiref "F*L" :name "Roll Angle Control") (add−moment roll torq :name "Roll Torque" :direction "@rw long" :body1 rf :body2 ptch fr :magnitude "input ext(phiref)" :no−forcem t) )
299 300 301 302 303 304 305 306 307
(when *linear* (add−variables dyvars real drv tqm) (add−moment drv torq :name "Drive Torque" :direction [rwy] :body1 rw :body2 rf :magnitude drv tqm :no−forcem t)
308 309 310 311 312 313 314 315
(add−variables dyvars real str tqm) (add−moment str torq :name "Steering Torque" :direction [ffz] :body1 ff :body2 rf :magnitude str tqm :no−forcem t)
316 317 318 319 320 321 322 323 324 325
(add−variables dyvars real roll tqm) (add−moment roll torq :name "Roll Torque" :direction [rfx] :body1 rf :body2 ptch fr :magnitude roll tqm :no−forcem t) )
326 327 328 329 330 331 332 333 334 335 336 337 338
(add−coordinates−to−output) (add−speeds−to−output) (add−out "Yrw" "RwLat" :long−name "Rear Wheel Lateral Force" :units F) (add−out "Yfw" "FwLat" :long−name "Front Wheel Lateral Force" :units F) (add−out "rq(ptch fr)" "PtchAng" :long−name "Pitch Angle" :units A) (add−out "ru(ptch fr)" "PtchVel" :long−name "Pitch Velocity" :units "A/T") (add−out "tq(ptch fr)" "Zdisp" :long−name "Z Displacement" :units L) (add−out "tu(ptch fr)" "Zvel" :long−name "Z Velocity" :units "L/T") (add−out "rq(fw)" "FwAng" :long−name "Angular Displacement Front Wheel" :units "A") (add−out "rq(rw)" "RwAng" :long−name "Angular Displacement Rear Wheel" :units "A")
173
339 340 341 342 343 344 345 346 347 348 349 350
(add−out (add−out (add−out (add−out (add−out (add−out (add−out (add−out (add−out
"ru(ff)" "StrVel" :long−name "Steer Angular Velocity" :units "A/T") "rq(ff)" "StrAng" :long−name"Steer Angle" :units A) "ru(rf)" "RolVel" :long−name"Roll Angular Velocity" :units "A/T") "rq(rf)" "RolAng" :long−name"Roll Angle" :units "A") "@vur" "VelLong" :long−name"Longitudinal Velocity" :units "L/T") "@vul" "VelLat" :long−name"Lateral Velocity" :units "L/T") "ru(ya fr)" "YawVel" :long−name"Yaw Angular Velocity" :units "A/T") "rq(ya fr)" "YawAng" :long−name"Yaw Angle" :units A) "dot(pos(ya fr0), [nx])" "X disp" :long−name"X Displacement of Yaw Frame" :units L) (add−out "dot(pos(ya fr0), [ny])" "Y disp" :long−name"Y Displacement of Yaw Frame" :units L)
351 352 353 354 355 356
(unless *linear* (dynamics)) (when *linear* (linear :u (drv tqm str tqm roll tqm))) (finish)
357 358 359
;;Introduce all the bike parameters:
360 361 362 363 364 365 366
;;Default values (set−names Mf Mr Mfw Mrw (set−defaults Mf
for masses "Mass of front frame" "Mass of rear frame" "Mass of front wheel" "Mass of rear wheel") 4.0 Mr 85.0 Mfw 3.0 Mrw 2.0)
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382
;;Default values for moments of inertia (set−names Ifx "front frame inertia w.r.t. mass centre" Ify "front frame inertia w.r.t. mass centre" Ifz "front frame inertia w.r.t. mass centre" Irx "rear frame inertia w.r.t. mass centre" Iry "rear frame inertia w.r.t. mass centre" Irz "rear frame inertia w.r.t. mass centre" Crxz "rear frame inertia product w.r.t. mass centre" ifwx "front wheel camber inertia" ifwy "front wheel polar moment of inertia" irwx "rear wheel camber inertia" irwy "rear wheel polar inertia") (set−defaults Ifx 0.05892 Ify 0.06 Ifz 0.00708 Irx 9.2 Iry 11.0 Irz 2.80 Crxz 2.4 Cfxz −0.00756 ifwx 0.14 ifwy 0.28 irwx 0.06 irwy 0.12)
383 384 385 386 387 388
;;Geometric parameters (set−names Rrw "Rear wheel unloaded radius" Rfw "Front wheel unloaded radius") (set−defaults xrf 0.3 zrff 0.9 Rrw 0.3 ww 1.02 tt 0.08 xff 0.9 zfff 0.7 Rfw 0.35 epsilon 0.314159265 xcohead 0.8 zcohead 0.9)
389 390 391 392 393 394 395 396 397 398
;;Tyre parameters (set−names sigmar "rear tyre relaxation length" sigmaf "front tyre relaxation length" Cf1 "front tyre cornering stiffness coefficient" Cf2 "front tyre camber stiffness coefficient" Cr1 "rear tyre cornering stiffness coefficient" Cr2 "rear tyre camber stiffness coefficient") (set−defaults sigmar 0.1 sigmaf 0.1 Cf1 14.325 Cf2 1.0 Cr1 14.325 Cr2 1.0)
174
399 400 401 402 403 404 405
(unless *linear* ; Control reference parameters. (set−names v0 "Initial forward speed") (set−defaults v0 5 toff 0.0 "tu(ya fr,1)" v0 phi ref 0.0 "rq(rf)" phi ref) (set−defaults "tq(ptch fr)" 0.001225784304552 "rq(ptch fr)" 0.0005961332353763) )
406 407
(unless *linear* (set−defaults iprint 1 stopt 50 step 0.001 epsdi 1e−6 st tq 0))
408 409 410 411 412
;Longitudinal Slip parameters (set−names clsrw "Rear Wheel Longitudinal Slip Constant" clsfw "Front Wheel Longitudinal Slip Constant") (set−defaults clsrw −10000 clsfw −10000)
413 414 415 416 417 418 419 420 421
; Stiffness and damping parameters (set−names Kp twst "frame stiffness" Cp twst "frame damping" Ktr "rear wheel tyre spring constant" Ktf "front wheel tyre spring constant" Dtr "rear wheel tyre damping constant" Dtf "front wheel tyre damping constant") (set−defaults Ktr 500000 Ktf 500000 Dtr 10000 Dtf 10000)
422 423
(set−defaults
eps 0.000000000001)
175
Bibliography B. D. O. Anderson and J. B. Moore. Optimal Filtering. Englewood Cliffs, NJ: PrenticeHall, 1979. E. K. Bender. Optimal linear preview control with application to vehicle suspension. Journal of Basic Engineering, Trans. ASME, 90(2):213–221, 1968. Robert Bitmead, Michel Gevers, and Vincent Wertz. Adaptive Optimal Control: The Thinking Man’s GPC. Prentice Hall, 1990. P. Bolzern, P. Colaneri, and G. De Nicolao. On discrete time H∞ fixed lag smoothing. IEEE Trans Signal Processing, 52:132–141, 2004. A. Cohen and U. Shaked. Linear discretetime H∞ optimal tracking with preview. IEEE Trans Auto Control, 42(2):270–276, 1997. ISSN 00189286. Agn´es Cohen and Uri Shaked.
Robust discretetime H∞ optimal tracking with preview.
International Journal of Robust and Nonlinear Control, 8(1):29–37, 1998. P. Colaneri and A. Ferrante. A Jspectral factorization approach for H∞ estimation problems in discrete time. IEEE Trans Auto Control, 47:2108–2113, 2002. P. Colaneri and A. Ferrante. Algebraic riccati equation and Jspectral factorization for H∞ estimation. Systems and Control Letters, 51:383–393, 2004. P. Colaneri, M. Maroni, and U. Shaked. H∞ prediction and smoothing for discretetime systems: a Jspectral factorzation approach. In Proceedings of the 37th IEEE Conference on Decision & Control, 1998. D. J. Cole, A. J. Pick, and A. M. C. Odhams. Predictive and linear quadratic methods for potential application to modelling driver steering control. Vehicle System Dynamics, 44(3): 259–284, 2006. Thomas H. Cormen, Charles E. Leiserson, and Ronald L. Rivest. Introduction to algorithms. MIT Press, 2001. Rita Cunha, Duarte Antunes, Pedro Gomes, and Carlos Silvestre. A pathfollowing preview controller for autonomous air vehicles. In AIAA Guidance, Navigation, and Control Conference, volume 8, pages 4929–4949, 2006. John Doyle, Bruce Francis, and Allen Tannenbaum. Feedback Control Theory. Macmillan Publishing Co., 1990. A. Farooq and D.J.N Limebeer. Path following of optimal trajectories using preview control. In Proceedings of the IEEE Conference on Decision and Control, pages 2787–2792, December 2005. 176
A. Farooq, D.J.N. Limebeer, and P.J. MacBean. Optimal trajectory tracking using an output feedback preview controller. In IEE Conference on Target Tracking, March 2006. A. Ferrante and H. Wimmer. Order reduction of discretetime algebraic riccati equations with singular closed loop matrix. Operators and Matrices, 1:61–70, 2007. Augusto Ferrante. On the structure of the solutions of discretetime algebraic riccati equation with singular closedloop matrix. IEEE Trans Auto Control, 49:2049–2054, 2004. E. Gershon, D.J.N. Limebeer, U. Shaked, and I. Yaesh. Stochastic H∞ tracking with preview for statemultiplicative systems. IEEE Trans Auto Control, 49(11):2061–2068, 2004a. ISSN 00189286. E. Gershon, U. Shaked, and I. Yaesh. H∞ tracking of linear continuoustime systems with stochastic uncertainties and preview. International Journal of Robust and Nonlinear Control, 14(7):607 – 626, 2004b. Herbert Goldstein. Classical Mechanics. AddisonWesley, 1980. T J Gordon and R S Sharp. On improving the performance of automotive semiactive suspension systems through road preview. Journal of Sound and Vibration, 217(1):163–182, 1998. M. Green and D.J.N. Limebeer. Linear Robust Control. PrenticeHall, 1995. M.J. Grimble. Polynomial solution of predictive optimal control problems for systems in stateequation form. In IFAC 15th Triennial World Congress, 2002. ChunHua Guo. Newton’s method for discrete algebraic riccati equations when the closedloop matrix has eigenvalues on the unit circle. SIAM J. Matrix Anal. Appl., 20:279–294, 1998. A. Hac. Optimal linear preview control of active vehicle suspension. Vehicle System Dynamics, 21(3):167–195, 1992. Kensaku Hazawa, Jinok Shin, Daigo Fujiwara, and Kazuhiro Igarashi. Autonomous flight control of hobbyclass small unmanned helicopter. In Proceedings of 2004 IEEE/RSJ lnternational Conference on Intelligent Robots and Systems, pages 754–760, 2004. Constantine H. Houpis and Gary B. Lamont. Digital Control Systems. McGrawHill, 2nd edition, 1991. P. A. Iglesias and D. Mustafa. Statespace solution of the discretetime minimum entropy control problem via separation. IEEE Trans Auto Control, 38:1525–1529, 1993. Vlad Ionescu and Martin Weiss. On computing the stabilizing solution of the discrete time riccati equation. Linear Algebra and its Applications, 174:229–238, 1992. Tohru Katayama and Takahide Hirono. Design of an optimal servomechanism with preview action and its dual problem. International Journal of Control, 45:407–420, 1987. H. Katoh. H∞ optimal preview controller and its performance limit. IEEE Trans Auto Control, 49(11):2011–2017, 2004. ISSN 00189286. Derek B. Kingston and Randal W. Beard. Realtime attitude and position estimation for small uavs using lowcost sensors. In AIAA 3rd ”Unmanned Unlimited” Technical Conference, Workshop and Exhibit, 2004.
177
A. Kojima. H2 performance on preview feedforward action. In Proceedings of the 16th MTNS, 2004. Akira Kojima and Shintaro Ishijima. H∞ performance of preview control systems. Automatica, 39(4):693–701, April 2003. Akira Kojima and Shintaro Ishijima. H∞ preview tracking in an output feedback setting. International Journal of Robust and Nonlinear Control, 14(7):627 – 641, 2004. Akira Kojima and Shintaro Ishijima. Formulas on preview and delayed H∞ control. IEEE Trans Auto Control, 51(12):1920–1937, 2006. Wook Hyun Kwon and Dae Gyu Byun. Receding horizon tracking control as a predictive control and its stability properties. International Journal of Control, 50(5):1807 – 1824, 1989. Peter Lancaster and Leiba Rodman. Algebraic Riccati Equations. Oxford University Press, 1995. Y. I. Lee and B. Kouvaritakis. Receding horizon H∞ predictive control for systems with input saturation. IEE Proc. Control Theory Appl., Vol. 147, No. 2, March 2000, 147:153–158, 2000. D.J. Leith and W.E. Leithead. Survey of gainscheduling analysis and design. International Journal of Control, 73:1001–1025, 2000. D. Li, D. Zhou, Z. Hu, and H. Hu. Optimal preview control applied to terrain following flight. In IEEE Conference on Decision and Control, volume 1, pages 211–216. IEEE, December 2001. Limebeer, Kasenally, and Perkins. On the design of robust two degree of freedom controllers. Automatica, 29(1):157–168, 1993. David J.N. Limebeer and Robin S. Sharp. Singletrack vehicle modelling and control: Bicycles, motorcycles,and models. IEEE Control Systems Magazine, 26:34– 61, 2006. Zongli Lin, Ben M. Chen, Ali Saberi, and Yacov Shamash. Innerouter factorization of discretetimetransfer function matrices. IEEE Trans Auto Control, 43(11):941–945, 1996. A. Lindquist. On optimal stochastic control with smoothed information. Information Science, 1(1):55–85, 1968. N Louam, D A Wilson, and R S Sharp. Optimization and performance enhancement of active suspensions for automobiles under preview of the road. Vehicle System Dynamics, 21(1): 39–63, 1992. J. M. Maciejowski. Predictive Control: With Constraints. PrenticeHall: London, 2002. I. R. Manchester and A. V. Savkin. Circular navigation guidance for precision missile/target engagements. In Proceedings of the 41st IEEE Decision and Control Conference, volume 2, pages 1287–1292, December 2002. G. Marro and E. Zattoni. H2 optimal rejection with preview in the continuoustime domain. Automatica, 41(5):815–821, 2005. J. Marzbanrad, G. Ahmadi, H. Zohoor, and Y. Hojjat. Stochastic optimal preview control of a vehicle suspension. Journal of Sound and Vibration, 275(35):973–990, 2004.
178
J. P. Meijaard, Jim M. Papadopoulos, Andy Ruina, and A. L. Schwab. Linearised dynamics equations for the balance and steer of a bicycle: a benchmark and review. Proc. R. Soc. A, 463:1955–1982, 2007. R. H. Middleton, J. Chen, and J. S. Freudenberg. Tracking sensitivity and achievable H∞ performance in preview control. Automatica, 40(8):1297–1306, 2004. L. Mirkin and G. Meinsma. When does the H∞ fixedlag smoothing performance saturate for a finite smoothing lag? IEEE Trans. Auto. Control, 49(1):131–134, 2004. Leonid Mirkin. On the H∞ fixedlag smoothing: how to exploit the information preview. Automatica, 39:1495–1504, 2003. Leonid Mirkin and Gilead Tadmor. Fixedlag smoothing as a constrained version of the fixedinterval case. In Proceeding of the 2004 American Control Conference, 2004. A. A. Moelja and G. Meinsma. H2 control of preview systems. Automatica, 42(6):945–952, 2006. E. Mosca and G. Zappa. Matrix fraction solution to the discretetime lq stochastic tracking and servo problems. IEEE Trans. Automat. Contr., 34(2):240–242, 1989. Edoardo Mosca and Alessandro Casavola. Deterministic lq preview tracking design. IEEE Trans. Automat. Contr., 40(7):1278–1281, 1995. Thrasyvoulos Pappas, Alan Laub, and Nils Sandell. On the numerical solution of the discretetime algebraic riccati equation. IEEE Trans Auto Control, 25:631–641, 1980. N. Paulino, R. Cunha, and C. Silvestre. Affine parameterdependent preview control for rotorcraft terrain following flight. AIAA Journal of Guidance, Control and Dynamics, 29(6): 1350–1359, 2006a. Nuno Paulino, Carlos Silvestre, Rita Cunha, and Antonio Pascoal. A bottomfollowing preview controller for autonomous underwater vehicles. In 45th IEEE Conference on Decision & Control, 2006b. William H. Press, Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery. Numerical Recipes 3rd Edition: The Art of Scientific Computing. Cambridge University Press, 2007. G. Prokop and R.S. Sharp. Performance enhancement of limitedbandwidth active automotivesuspensions by road preview. Control Theory and Applications, IEE Proceedings, 142 (2):140–148, 1995. ISSN 13502379. R. M. Redheffer. On a certain linear fractional transformation. J. Maths. Phys., 39:269–286, 1960. H. S. Roh and Y. Park. Stochastic optimal preview control of an active vehicle suspension. Journal of Sound and Vibration, 220(2):313–330, 1999. R. S. Sharp. Motorcycle steering control by road preview. Trans. ASME, Journal of Dynamic Systems, Measurement and Control, 129:373–381, 2007a. R. S. Sharp, D. Casanova, and P. Symonds. A mathematical model for driver steering control, with design, tuning and performance results. Vehicle System Dynamics, 33:289326, 2000. R. S. Sharp and V. Valtetsiotis. Optimal preview car steering control. Vehicle System Dynamics Supplement, 35:101–117, 2001. 179
Robin S. Sharp. Driver steering control and a new perspective on car handling qualities. Proc. IMechE Part C: J. Mechanical Engineering Science, 219(10):1041–1051, 2005. Robin S. Sharp. Optimal linear timeinvariant preview steering control for motorcycles. Vehicle System Dynamics, 44(1):329–340, 2006. Robin S. Sharp. Optimal stabilization and pathfollowing controls for a bicycle. Proc. IMechE, Part C: J. Mechanical Engineering Science, 221:415–428, 2007b. T. B. Sheridan. Three models of preview control. IEEE Trans on Human Factors in Electronics, 7(2):91–102, 1966. Vasile Sima. Computational experience in solving algebraic riccati equations. In Proceedings of the 44th IEEE Conference on Decision and Control, 2005. Anton Stoorvogel. The H∞ Control Problem. Prentice Hall, 1992. G. Tadmor and L. Mirkin. H∞ control and estimation with previewpart I: matrix ARE solutions in continuous time. IEEE Trans Auto Control, 50(1):19–28, 2005a. ISSN 00189286. G. Tadmor and L. Mirkin. H∞ control and estimation with previewpart II: fixedsize ARE solutions in discrete time. IEEE Trans Auto Control, 50(1):29–40, 2005b. ISSN 00189286. K. Takaba. Robust servomechanism with preview action for polytopic uncertain systems. International Journal of Robust and Nonlinear Control, 10:101–111, 2000. Kiyotsugu Takaba. A tutorial on preview control systems. In SICE Annual Conference in Fukui, 2003. M. Tomizuka. The Optimal Finite Preview Problem and its Application to ManMachine Systems. PhD thesis, Massachusetts Institute of Technology, Cambridge, MA, 1973. M. Tomizuka. Optimal continuous finite preview problem. IEEE Trans Auto Control, 20(3): 362–365, 1975. M. Tomizuka. Optimal preview control with application to vehicle suspension  revisited. Journal of Dynamic Systems, Measurement and Control, Trans. ASME, 98(3):362–365, 1976. M. Tomizuka and D.H. Fung. Design of digital feedfoward/preview controllers for processes with predetermined feedback controllers. Journal of Dynamic Systems, Measurement and Control, Trans. ASME, 102(4):218–225, 1980. M. Tomizuka and D. E. Rosenthal. On the optimal digital state vector feedback controller with integral and preview actions. Journal of Dynamic Systems, Measurement and Control, Trans. ASME, 101(2):172–178, 1979. M. Tomizuka and D. E. Whitney. Optimal discrete finite preview problems (why and how is future information important?). Journal of Dynamic Systems, Measurement and Control, Trans. ASME, 97(4):319–325, 1975. A. Vahidi and A. Eskandarian. Influence of preview uncertainties in the preview control of vehicle suspensions. Proceedings of the Institution of Mechanical Engineers: Journal of Multibody Dynamics, 216:295–301, 2002. E. Zattoni. H2 optimal decoupling with preview: a dynamic feedforward solution based on factorization techniques. In Proc. 2006 American Control Conference, pages 316–320, ASME Transactions,, 2006. IEEE. 180
H. Zhang, L. Hie, Y. Chai Soh, and D. Zhang. H∞ fixedlag smoothing for discrete linear timevarying systems. Automatica, 41:839–846, 2005. H. Zhang, L. Xie, and Y.C. Soh. A unified approach to linear estimation for discretetime systemspart II: H∞ estimation. In Proceedings of the 40th IEEE Conference on Decision and Control, 2001. Huanshui Zhang, Lihua Xie, and Guangren Duan. H∞ control of discretetime systems with multiple input delays. IEEE Trans Auto Control, 52(2):271–283, 2007. K. Zhou, J.C. Doyle, and K. Glover. Robust and Optimal Control. PrenticeHall, 1996.
181