Bogdan Ciubotaru - Curs 08 (CO) (3B) (2023-24)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Optimal Control

Lecture 08: “Matrix-Sign-Function for the Algebraic Riccati Equation”

Bogdan D. Ciubotaru

2023-24
Outline

1 Matrix Sign Function

2 B747 Application Example


Cuprins

1 Matrix Sign Function


Preliminaries on Matrix Functions
Matrix-Sign-Function Approach

2 B747 Application Example


Matrix Sign Function Preliminaries on Matrix Functions

Objective I

This lecture provides some results on Matrix-Sign-Function.

It is useful when the Matrix-Sign-Function approach is used for the implementation of the Progres-
sive Accommodation Scheme.

It gives the properties of matrix functions, of Matrix-Sign-Function (MSF), and of spectral-projectors,


respectively, while it also addresses the connections between the MSF and the Continuous Algebraic
Riccati Equation respectively the MSF and spectral-projection, as well.

C LEC-08-CO-2023-24 2023-24 1 / 23
Matrix Sign Function Preliminaries on Matrix Functions

Properties of Matrix Functions I


Given matrix Af ∈ Rn×n , the matrix-function f(Af ) ∈ Rn×n (assume it is defined on the spectrum
of Af , Λ(Af ); of course, f(Af ) ∈ Rq×q or f(Af ) ∈ Rq , with q ̸= n, is possible depending on the
definition of f) shows the following properties:
(i) f(Af ) commutes with Af , respectively

f(Af )Af = Af f(Af ) ;

(ii) ( )
f A⊤
f = [f(Af )]⊤ ;

(iii) For any nonsingular Tf , it does hold that


( )
f Tf Af T−1
f = Tf f(Af )T−1
f ;

C LEC-08-CO-2023-24 2023-24 2 / 23
Matrix Sign Function Preliminaries on Matrix Functions

Properties of Matrix Functions II

(iv)
[ ] [ ]
f diag (Af1 , Af2 , . . . , Afn̄ ) = diag f(Af1 ), f(Af2 ), . . . , f(Afn̄ ) ;

(v) If Af is diagonalizable, with

T−1
f Af Tf = Df = diag (df1 , df2 , . . . , dfn ) ,

then
[ ]
f(Af ) = Tf f(Df )T−1
f = Tf diag f(df1 ), f(df2 ), . . . , f(dfn ) T−1
f .

C LEC-08-CO-2023-24 2023-24 3 / 23
Matrix Sign Function Preliminaries on Matrix Functions

Properties of Matrix-Sign-Function I

Given matrix Af ∈ Rn×n , the matrix-sign-function Zf ≜ sign (Af ) has the following properties:
(i) Z2f = In (Zf is involutory);

(ii) Zf is diagonalizable, with eigenvalues ±1;

(iii) Zf Af = Af Zf ;

(iv) If Af is real, then Zf is real;

(v) If Zf is symmetric positive-definite, then sign (Af ) = In .

C LEC-08-CO-2023-24 2023-24 4 / 23
Matrix Sign Function Preliminaries on Matrix Functions

Properties of Spectral-Projectors I

Definition (Matrix-Projector)

Matrix Pf ∈ Rn×n is called projector onto the subspace Sf ⊂ Rn×n if

Im (Pf ) = Sf and P2f = Pf . (1)

Definition (Spectral-Projector)

Let Hf ∈ Rn×n , with Λ(Hf ) = Λ− + − + −


f ∪ Λf , Λf ∩ Λf = ∅, and let Sf be the (right)
Hf -invariant-subspace corresponding to Λ−
f .

Then a projector onto Sf− is called a spectral-projector.

C LEC-08-CO-2023-24 2023-24 5 / 23
Matrix Sign Function Preliminaries on Matrix Functions

Properties of Spectral-Projectors II

Lemma (Lancaster and Rodman; 1991)

Let Hf ∈ Rn×n and let Pf ∈ Rn×n be a spectral-projector onto the right Hf -invariant-subspace
corresponding to Λ−
f .

Then:
(i) Im (Pf ) = Im (Hf Pf );
(ii) a Ker (Pf ) = Im (In − Pf );

b Im (Pf ) = Ker (In − Pf );

(iii) In − Pf is a spectral-projector onto the right Hf -invariant-subspace corresponding to Λ+


f .

C LEC-08-CO-2023-24 2023-24 6 / 23
Matrix Sign Function Preliminaries on Matrix Functions

Matrix-Sign-Function and Spectral-Projection I

Computations based on the matrix-sign-function can be considered as spectral-projection methods


as they involve
1
P−f = [I2n − sign (Hf )] ,
2

which is a spectral-projector onto the stable Hf -invariant-subspace.

Also
1
P+
f = [I2n + sign (Hf )]
2

is a spectral-projector onto the Hf -invariant-subspace corresponding to the eigenvalues in the open


right-half plane.

C LEC-08-CO-2023-24 2023-24 7 / 23
Matrix Sign Function Preliminaries on Matrix Functions

Algebraic Riccati Equation and Matrix-Sign-Function I

Theorem (Byers; 1987)

The solution Xf to
A⊤ −1 ⊤
f Xf + Xf Af − Xf Bf Rn Bf Xf + Qn = 0 (2)

results by solving the system


[ ] [ ]
Zf12 Zf11 + In
Xf = − , (3)
Zf22 + In Zf21

where [ ]
Zf11 Zf12
sign (Hf ) ≜ Zf = ,
Zf21 Zf22

for [ ]
Af −Gf
Hf = , with Gf = Bf R−1 ⊤
n Bf .
−Qn −A⊤
f

C LEC-08-CO-2023-24 2023-24 8 / 23
Matrix Sign Function Matrix-Sign-Function Approach

Matrix-Sign-Function and Jordan decomposition I

For the next development, introduce first the classical theorem on Jordan decomposition and the
definition of a matrix function based on its Jordan decomposition.

C LEC-08-CO-2023-24 2023-24 9 / 23
Matrix Sign Function Matrix-Sign-Function Approach

Matrix-Sign-Function and Jordan decomposition II


Theorem (Jordan Decomposition)

If matrix Af ∈ Rn×n has n̄f linearly independent eigenvectors, then it is similar to a matrix which is
in Jordan form with n̄f square blocks on the diagonal, respectively
 
Jf 1
 .. 
Jf = T−1  .
f Af Tf =  .  (4)
Jfn̄
f

Each block has one eigenvector, one eigenvalue, and ones just above the diagonal, respectively
 
λfk 1
 .. .. 
 . . 
 
Jfk (λfk ) =  . (5)
 .. 
 . 1 
λfk

When the block Jfk (λfk ) has order mfk > 1, the eigenvalue λfk is repeated mfk times and there are
mfk − 1 of ones above the diagonal, with mf1 + mf2 + . . . + mfn̄ = n; the same eigenvalue λfk
f
may appear in several blocks if it corresponds to several independent eigenvectors.

C LEC-08-CO-2023-24 2023-24 10 / 23
Matrix Sign Function Matrix-Sign-Function Approach

Matrix-Sign-Function approach I
Definition (Jordan Canonical Form and Matrix Function)

Let Af ∈ Rn×n have the Jordan canonical form (4) with Jordan blocks as in (5), where Tf is
nonsingular.

Then { [ ]}
f(Af ) = Tf f(Jf )T−1
f = Tf diag f Jfk (λfk ) T−1
f ,

where  ( ) 
mf −1
f k (λf )
 f(λfk ) f′ (λ fk ) ... ( )k 
 mf −1 ! 
 k 
[ ]  .. .. .. 
f Jfk (λfk ) = 
 . . .
;

 
 .. 
 . f′ (λfk ) 
f(λfk )

the prime superscript (.)′ stands for derivation and (.)! denotes the factorial product.

C LEC-08-CO-2023-24 2023-24 11 / 23
Matrix Sign Function Matrix-Sign-Function Approach

Matrix-Sign-Function approach II
Next, define the sign-function of a matrix based on its Jordan decomposition.

Definition (Matrix Sign Function)

If Af = Tf Jf T−1
f ∈ Rn×n is a Jordan canonical form (4) so that
[ ]
J−
f Ok,n−k
Jf = ,
On−k,k J+
f

where block-matrices J−
f ∈R
k×k and J+ ∈ R(n−k)×(n−k) have spectra Λ(J− ) ⊂ C− and
f f
+
Λ(Jf ) ⊂ C , then the sign-function of Af writes as
+

[ ]
−Ik Ok,n−k
sign (Af ) = Tf T−1
f .
On−k,k In−k

If Af has any pure imaginary eigenvalues, then sign (Af ) is not defined.

C LEC-08-CO-2023-24 2023-24 12 / 23
Matrix Sign Function Matrix-Sign-Function Approach

Matrix-Sign-Function approach III


In the following, let the real n × n matrix Zf = sign (Af ) be defined and see that Z2f = In (Zf is
involutory); moreover, Zf is diagonalizable with eigenvalues ±1.

Also, reconsider the Hamiltonian-matrix (6), respectively


[ ]
Af −Gf
Hf = ⊤ , (6)
−Qn −Af

where
Gf = Bf R−1 ⊤
n Bf ,

and note that matrix Xf is the desired solution to the post-fault CARE if and only if
[ ] [ ][ ][ ]−1
Af −Gf In On Âf −Gf In On
= ,
−Qn −A⊤
f
Xf In On −Â⊤
f
Xf In

where Âf = Af − Bf Kf = Af − Gf Xf is the closed-loop matrix in the faulty case, with In and On the
identity and null matrices, respectively.

C LEC-08-CO-2023-24 2023-24 13 / 23
Matrix Sign Function Matrix-Sign-Function Approach

Matrix-Sign-Function approach IV
Henceforth, introduce the matrix
[ ]
On In
J= ∈ R2n×2n ,
−In On

and observe that Hf is J-symmetric, i.e., JHf = (JHf )⊤ ; that is, if λf ∈ Λ(Hf ), then −λf ∈ Λ(Hf ).

Hence, the spectrum of the Hamiltonian-matrix is symmetric w.r.t. the imaginary axis and therefore
Hf has exactly n stable eigenvalues, if there are no eigenvalues with Re (λf ) = 0.

Remember also that there always exists a similarity transformation Tf of eigenvectors such that
[ − ]
Hf On
Hf = Tf + T−1
f , (7)
On Hf

where H− +
f and Hf are Jordan blocks associated with the stable and unstable eigenvalues, respec-
tively.

C LEC-08-CO-2023-24 2023-24 14 / 23
Matrix Sign Function Matrix-Sign-Function Approach

Matrix-Sign-Function approach V
Then, following the property of matrix functions saying that, for any nonsingular Tf , one has

f(Tf Af T−1 −1
f ) = Tf f(Af )Tf ,

see that sign (Hf ) may be computed upon (7) as


[ ]
−In On
sign (Hf ) = Tf T−1
f . (8)
On In

Moreover, the Newton iteration for computing the principal square-root of the identity matrix
1( )
Zfk+1 = Zfk + Z−1
fk , for k = 1, 2, . . . , NMSF , (9)
2

with the initial step Zf0 = Hf , obeys

lim Zfk = sign (Hf ) = ZfN .


k→+∞ MSF

C LEC-08-CO-2023-24 2023-24 15 / 23
Matrix Sign Function Matrix-Sign-Function Approach

Matrix-Sign-Function approach VI
So forth, the convergence point may be expressed as
[ ] [ ][ ][ ]−1
Zf11 Zf12 In On −In Wf In On
= ,
Zf21 Zf22 Xf In On In Xf In

where Wf is the solution to the continuous algebraic Lyapunov equation

Âf Wf + Wf Â⊤
f − 2Gf = 0 .

Hence, the solution XfN to (10), respectively


MSF

CAREf : A⊤ −1 ⊤
f Xf + Xf Af − Xf Bf Rn Bf Xf + Qn = 0 , (10)

results by solving the over-determined but consistent system


[ ] [ ]
Z fk Zfk + In
12 Xf k = − 11 , (11)
Zfk + In Zfk
22 21

for k =k→+∞ NMSF , after partitioning ZfN accordingly.


MSF

C LEC-08-CO-2023-24 2023-24 16 / 23
Matrix Sign Function Matrix-Sign-Function Approach

Symmetry of Matrix-Sign-Function approach I

Still, accelerating the speed of the first steps is possible through an appropriate scaling and by
symmetrizing the iterations, i.e., replacing (9) with
[ ]− 1
Z̄fk = Zfk det(Zfk ) 2n and (12a)
1[ ]
Zfk+1 = Z̄fk − Z̄fk − (JZ̄fk )−1 J . (12b)
2

Another improvement might be achieved if avoiding the inversion in iterations (12b) by using the
Newton-Schulz scaling
1 ( )
Zfk+1 = Zfk 3I2n − Z2fk , for Zf0 = Hf ; (13)
2

though (13) involves no matrix inverses, unfortunately it highly depends on the norm of the post-
fault Hamiltonian-matrix that might be far from 1, whereas the convergence of (13) is guaranteed
only for ∥I2n − Hf ∥2 < 1.

Also, instead of the determinantal scaling in (12a), the less numerically expensive Frobenius norm
or Barraud scaling might be used; scaling improves consistently the numerical conditioning of the
method. The Matrix-Sign-Function method can also be applied either to solving generalized Riccati
and Lyapunov equations, or to computing invariant-subspaces.

C LEC-08-CO-2023-24 2023-24 17 / 23
Matrix Sign Function Matrix-Sign-Function Approach

Convergence of Matrix-Sign-Function approach I

This far, the computational load required by the Matrix-Sign-Function to obtain the solution to
the post-fault CARE is averaged at 4 n3 per iteration. The complexity of this approach might be
considerably raised whether solving at each step the system of equations (11), solution of which
is better numerically conditioned if obtained using the QR-algorithm instead of the pseudo-inverse
matrix.

Concluding, the Matrix-Sign-Function method converges to the solution of CAREf no matter if


the post-fault system becomes unstable after the fault by simply initializing the algorithm with
Zf0 = Hf .

On the contrary, for the Newton-Kleinman approach, this technique obviously can be initialized
using the solution to CAREn , i.e., using Xn which gave the nominal control matrix Kn until the
moment the fault occurred only if the system remains stable after a fault.

Nonetheless, in situations when the closed-loop system matrix Âf = Af − Bf Kn eventually becomes
unstable, an appropriate stabilizing initial step is crucial, which is necessary to ensure the conver-
gence of the method. This aspect is discussed in the sequel.

C LEC-08-CO-2023-24 2023-24 18 / 23
Matrix Sign Function Matrix-Sign-Function Approach

Monotonicity of Matrix-Sign-Function approach I


In the case the minimum singular value of the Hamiltonian-matrix Hf is very small, a similar version
of Bass-Armstrong spectrum-shifting procedure can also be applied to the Matrix-Sign-Function
but on Hf ’s spectrum this time.

This technique amounts to starting the sign-iterations in (9) with the initial step

Zf0 = Hf − λavg × I2n ,

with
1
λavg = tr (Hf ) ,
2n

where tr (.) stands for the trace of the square matrix in the argument.

That might be motivated by an unbalanced nominal matrix An and heretofore the post-fault one Af
which could contain elements with different orders of magnitude. Thus, an appropriate balancing
to bring equilibrium between the numerical values that express physical quantities with different
metrics should be done before beginning the iteration.

C LEC-08-CO-2023-24 2023-24 19 / 23
Matrix Sign Function Matrix-Sign-Function Approach

Monotonicity of Matrix-Sign-Function approach II

In any event, the difficulty in applying the Matrix-Sign-Function method for progressive accommo-
dation is that no ”anytime” result can be established for its convergence and hence it is impossible
to see how the cost of the control solution evolves along the iterations; that is, against choosing
the progressive accommodation approach based on the Matrix-Sign-Function method stands the
fact that nothing can be said about the ordering of the series of intermediate solutions, as the
definiteness of Xfk ’s obtained at each iteration fluctuates following no pattern (this is eventually to
be seen in the simulations, but it was also questioned before in the literature).

C LEC-08-CO-2023-24 2023-24 20 / 23
Cuprins

1 Matrix Sign Function

2 B747 Application Example


Iterative Fault Accommodation - Matrix-Sign-Function Approach
Faulty System - Unstable Case
B747 Application Example Iterative Fault Accommodation - Matrix-Sign-Function Approach

Iterative fault accommodation - Matrix-Sign-Function approach I


Furthermore, the following table shows the complete accommodation of the control matrix Kacc
f
along the NMSF = 4 iterations.

k 1 2 3 4
kacc
f1 −0.3988 −0.0895 −0.0812 −0.0812
kacc
f −386.5720 −19.9963 −26.8122 −26.8122
2

C LEC-08-CO-2023-24 2023-24 21 / 23
B747 Application Example Iterative Fault Accommodation - Matrix-Sign-Function Approach

Iterative fault accommodation - Matrix-Sign-Function approach II

The following figure shows how the accommodation process using Matrix-Sign-Function is faster in
number of steps but still Newton-Kleinman is smoother again.

NK- / MSF- PAS vs. CAS for B747-SP - Stable Case (Transient)

C LEC-08-CO-2023-24 2023-24 22 / 23
B747 Application Example Faulty System - Unstable Case

Faulty System - Unstable Case I

Recall that there is no need for a special initialization procedure in this case; using the same
criterion as previously for testing convergence, the method needed again only NMSF = 4 steps for
the accommodation of the post-fault closed-loop system. The evolution of the control gains in the
Matrix-Sign-Function approach is shown in the following table.

k 1 2 3 4
kacc
f1 −4.3076 −1.1391 −2.4510 −2.4510
kacc
f −395.7656 −71.1889 −216.9582 −216.9582
2

C LEC-08-CO-2023-24 2023-24 23 / 23
Questions? vs. Answers!

Acknowledgments:
Marcel Staroswiecki, Dumitru Popescu,
and
Andrei Sperilă, Sabin Diaconescu, Teodor Rotaru,
and
Nicolai Christov, Cristian Oară.

You might also like