Você está na página 1de 15

A proposal for resolution of Lyapunov equation matrix.

A PROPOSAL FOR RESOLUTION OF Q PA P A


T
+ LYAPUNOV EQUATION.
Cosme Rafael Marcano Gamero.
Systems Engineer, (Universidad de los Andes, Mrida 1986).
Magster Scientiarum in Electronic Engineering,
(Universidad Nacional Experimental Politcnica Antonio Jos de Sucre - 2004).
Professor at UNEXPO Antonio Jos de Sucre.
Estado Bolvar - Venezuela
cosmemarcano@yahoo.com
tlf. 58-0286-9619965
Abstract. The Lyapunov Second Stability Method consists of select
ing a so-called Lyapunov Candidate Function, which satisfies certain conditions that
permit us to utilize it in the stability analysis of a mathematical model synthesized from a
process which we want to put under action of a given Control Law. In linear cases, it is
always possible to find a candidate function of quadratic kind, Ax x
T
, that satisfies the
desired cond5itions. By applying the Lyapunov Second Stability Method to this function, it
appears an algebraic, ordinary matrix equations system of the kind Q PA P A
T
+ , where
P and Q are positive-definite matrices. In this work, the solution of this algebraic system
by solving a lineal system of
2
n unknowns and same number of equations is proposed.
After some elementary manipulation of original equations, solution can be achieved with
some traditional method, like Gauss Inverse Deletion or any of its variants. This paper
presents some easy algorithms that allow us to re-accommodate the original matrix system
into a conventional algebraic, ordinary, linear equations system. Ax=b.
Key words: Lyapunov Second Stability Method, Matrix System, Gaussian Back Deletion
Algorithm.
:
A proposal for resolution of Lyapunov equation matrix.
A PROPOSAL FOR RESOLUTION OF Q PA P A
T
+ LYAPUNOV EQUATION.
INTRODUCTION.
In the analysis of control systems in the time domain, two options for determining
the systems stability have been presented. First, the determination of the Transfer
Function poles, whose real part must be in the negative half-plane (which is known as
Lyapunov Indirect Method orFirst Lyapunov Stability Method) [1], and, second, the
Lyapunov Direct Method or Second Lyapunov Stability Method. Both of these methods
apply on a system which is described by the following equations system:
bu Ax
dt
dx
+ (1)
where A is a nxn matrix, called System Matrix, b is a row vector of n elements and x is a
column vector, known as State Vector. On the other hand, u designates a scalar function,
known as Control Function which is determined by the state variables, i.e., the State
Vector components, x.
The characteristic equation of system (1) is given by the
) det( A sI
, where s is the
Laplace variable. The Transfer Function poles are obtained by calculating the zeros of the
characteristic equation, i.e.
0 ) det( A sI
. (2)
Accordingly to the Lyapunov First Stability Method, the real parts of this equation
roots must be in the negative half-plane in order to warrant the stability of the system given
by (1).
:
A proposal for resolution of Lyapunov equation matrix.
THEORETICAL FOUNDATION OF THE LYAPUNOVS SECOND METHOD
The Lyapunov Second Stability Method, also known as Lyapunov Direct Method
[1], which is founded in the application of the following theorem:
T HEOREM
Let be x = 0 an equilibrium point of a non lineal system, in general, given by
) (x f x
Let be V: D R a continuously differentiable function in the neighbourhood D of
x = 0, such as V(0) = 0 and V(x) > 0 in D {0}. If V is always decrecent in D, i.e.,
0 ) ( x V

in D
then, it might be assured that the system is stable in x = 0.
Furthermore, if
0 ) ( < x V

in D {0} then x = 0 is asymptotically stable


The task is encountering a V(x), called Lyapunov candidate function, which satisfies the
following requirements:
V is continouos
V(x) has an unique minimum in x
eq
respect to all the other points in D
Along any system trajectory contained in D, the value of V never increases.
9
The Lyapunov First Stability Method determines the stability in the neighbourhood
of an equilibrium point, while de Lyapunov Second Stability Method allow to determine
how far could be the trajectory of a system from an equilibrium point and still approaching
to it as t tends to
Region of Asymptotic Stability (Atraction Region)
Let be (t;x) the solution of the equations system going from an initial state x at time
t = 0. Then, the attraction region is defined as the set conformed by all the points x such
that lim
t
(t;x) = 0
:
A proposal for resolution of Lyapunov equation matrix.
If
c
= { x R
n
| V(x) c } is limited and constrained in D, then each trajectory that Stara
from
c
remains in
c
and approaches to the equilibrium point as t . So,
c
is an
estimate of the attraction region.
TYPES OF STABILITY RESPECT TO THE ATTRACTION REGION.
Lyapunov defines three stability typos in relation to the attraction region, which are
explained below:
Local Stability (stability in the neighbourhood) when a system remains inside an
infinitesimal region around the equilibrium point being under some little disturbances
Finite Stability when a system returns to an equilibrium point from any point inside
the region of finite dimensions, R.
Global Stability (Stability at large) if the region R includes the whole state space.
The Figure 1 graphically describes the various stability types that proposed Lyapunov.
It is good to remark that is always possible to find a Lyapunov function for linear system
like those described by (1), without external disturbance, i.e., with u=0. In that case, it
might be chosen a Lyapunov function of quadratic form:
Px x V
T
(3)
where P is a symmetric matrix, positive definite. Then, we have
Qx x
x PA P A x
PAx x Px A x
Ax P x Px Ax V
x P x Px x V
T
T T
T T T
T T
T T

+
+
+
+
) (
) ( ) (

(4)
where:
Q PA P A
T
+ (5)
:
A proposal for resolution of Lyapunov equation matrix.
Note that the matrix equations system (5), which must be solved during the
application ofthe Lyapunov Second Stability Method, has the general form of a AX + XB =
C. system This general system must be adequate for the Lyapunov particular system by
taking
T
A B
and C = -Q. Checking for the system consistency, we realised that all the
involved matrices must be squares.
Figura 1. Various Stability conditions.
If the matrix Q is positive definite, then the system is said to be asymptotically
stable. By instance, it can be chosen Q = I, the identity matrix, which is obviously positive
definite, and solve the following matrix system
I PA P A
T
+
:
A proposal for resolution of Lyapunov equation matrix.
for P, and check whether or not P is also positive definite (which may be face up using, for
example, the n main minors of P, according to the Sylvester Criteria).
Although a linear system stability can be checked by verifying that the real parts of
its characteristic equation are in the left half plane, the solution of the Lyapunov matrix
equation can provides an estimate to a candidate function for a non-linear system, mainly
when that estimation is doing by a computation program.
RESOLUTION OF LYAPUNOV MATRIX EQUATIONS SYSTEM.
In this section, it will be faced up the matriz equations system given by (5), which
appears during the Lyapunov Second Stability Method application, as seen in previous
section , i.e.,
Q PA P A
T
+
In order to start this task, it will be primarily solved a generic system of the form:
Q C
A B
and
where
C XA BX
T

+
(6)
By checking for matrix dimensions consistency, it is clear that n must equal to m. The
expansion of the matrix equation system stated by (6), it is obtained:

'

+


n k
n i
para a x x b s
n
l
lk il
n
j
jk ij ik
,..., 3 , 2 , 1
,..., 3 , 2 , 1
1 1
(7)
:
A proposal for resolution of Lyapunov equation matrix.
Note that, due to the bidimesional nature of X, the system solution implies the
solution of a nxn algebraic equations system with the same number of unknowns.
The proposed technique to face up the solution of this algebraic problem consists in
re-accommodating the equations given by (6), in the conventional form of a set of linear
equations, of the kind Sz=t, where z is a column vector of nxn elements, which is shown
below:
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
]
1

nn
n
n
n
x
x
x
x
x
x
x
x
z
...
...
...
...
1
2
22
21
1
12
11
(8)
As can be appreciated in (8), the vector components of z, are the same as in the
matrix X of the system given by (6), arranged in the form of an unique column vector,
conformed by the components of each of the matrix X columns, put in vertical form. In the
same way, the vector of the vector t of the modified system is obtained putting in vertical
form, followed one after each other, the original system matrix C columns. Later, it will be
explained how the matrix S is prepared.
The equations matrix system that results of the Lyapunov Second Stability Method,
has the peculiar feature that all the involved matrices are squares, and the matrix B of (6)
corresponds to the matrix A transpose.
:
A proposal for resolution of Lyapunov equation matrix.
The matrix A is positive definite and, naturally, non singular. The matrix C can be
arbitrarily and conveniently chosen. It used to be chosen the nxn identity matrix, which is
positive definite.
Expansion of the expression (7) for n=3, results in the formation of two auxiliary
matrices, say U and V, which are showed below.
1
1
1
1
1
1
1
1
1
1
1
1
]
1

33 23 13
32 22 12
31 21 11
33 23 13
32 22 12
31 21 11
33 23 13
32 22 12
31 21 11
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
b b b
b b b
b b b
b b b
b b b
b b b
b b b
a b b
b b b
U
(9)
1
1
1
1
1
1
1
1
1
1
1
1
]
1

33 32 31
33 32 31
33 32 31
23 22 21
23 22 21
23 22 21
13 12 11
13 12 11
13 12 11
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
a a a
a a a
a a a
a a a
a a a
a a a
a a a
a a a
a a a
V
(10)
Note that the n blocks that appear on the matrix U main diagonal, are the same each
other, and, in addition, each block consists of the matrix A transpose elements, given by
(1). On the other hand, matrix V is conformed by the matrix B of (6), disposed in diagonal
bands. Note also that the so obtained matrices present many zeros.
By adding matrices U and V, it is obtained the matrix S:
:
A proposal for resolution of Lyapunov equation matrix.
1
1
1
1
1
1
1
1
1
1
1
1
]
1

+
+
+
+
+
+
+
+
+

33 33 23 13 32 31
32 33 22 12 32 31
31 21 33 11 32 31
23 22 22 23 13 21
23 32 22 22 12 21
23 31 21 22 11 21
13 12 11 33 23 13
13 12 32 11 22 12
13 12 31 21 11 11
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
a b b b a a
b a b b a a
b b a b a a
a a b b b a
a b a b b a
a b b a b a
a a a b b b
a a b a b b
a a b b a b
S
(11)
Next, we proceed to synthesize the algorithms for preparing matrices U, V and S.
MATLAB m-files to get U and V are shown below:

PrepararMatriz_U Procedure
% Initializing variables
a=[1 -2 3;4 1 6;7 8 -1]; % a particular example
nuevafila=1; nuevacolumna=1; n2=n; nc=n*n; k=1; m=1; u=zeros(nc);
for bloque = 1: n,
for fila = nuevafila: n2,
for columna = nuevacolumna: n2,
u(fila,columna) = b(k,m)
m = m + 1
end
k = k + 1;
m = 1;
end
k = 1;
m = 1;
nuevafila = nuevafila + n;
n2 = n2 + n;
nuevacolumna = nuevacolumna + n;
end
%End of PrepareMatrix_U
Figure 2. MATLAB m-file for Preparing Matrix U
:
A proposal for resolution of Lyapunov equation matrix.
PrepareMatrix_V Procedure
f=1; c=1; n=3;
b=a;
nuevafila=1;
nuevacolumna = 1;
n2 = n;
nc = n*n;
v=zeros(nc);
fila = 1;
columna =1;
for h=1: n,
for fila=nuevafila: n2,
for columna=nuevacolumna: n: nc,
fila, columna
v(fila,columna) = b(f, c);
c = c + 1;
end
nuevacolumna = nuevacolumna + 1;
c = 1;
end
f = f + 1;
c =1;
nuevafila= nuevafila+ n;
n2 = n2 + n;
nuevacolumna = 1;
end
End of PrepareMatrix_V
Figure 3. MATLAB m-file for Preparing Matrix V
:
A proposal for resolution of Lyapunov equation matrix.
Finally, the matrix S is obtained by adding matrices U and V as shown below:
Furthermores, matrix Q is arbitrarily taken as an identity nxn matrix.
% m-file for Solving the matrix system I the conventional form Ax=b
s = u + v
Q=eye(n);
% converting Q matrix in QQ vector
k=1;
for i=1:n,
for j=1:n,
QQ(k) = Q(i,j);
k = k + 1;
end;
end;
if det(s) == 0
'Matrix S is singular: det(s) = 0'
else
P1 = inv(s)*(-QQ);
end;
% P1 is a vector which contains the elements of the solution matrix P
% Now, lets convert the vector P1 in the matrix P.
k=1;
for i=1:n,
for j=1:n,
P(i,j) = P1(k);
k = k+1;
end;
end;
% End of script
Figure 4. Algorithm for Adding Matrices U and V.
Once prepared matrices U, V and S, and the vector t, the original matrix system
C X A BX + is expressed in the form of a nxn linear algebraic ordinary equations system,
given by:
t Sz
(12)
which solution will consists of nxn scalar values for the vector z elements, which,
according to (8), correspond with the components of matrix X, and constitutes the matrix
system solution given by (6). Because of that, after resolving the modified system given by
:
A proposal for resolution of Lyapunov equation matrix.
(13), utilizing some resolution method of linear algebraic equations systems, as Gauss
Back Deletion [2], pr any of its variants (Gauss-Jordan or Gauss-Seidel) only would rest
re-accommodate the vector elements z, in the matrix form of X, as is shown below.
1
1
1
1
]
1

nn n n
n
n
x x x
x x x
x x x
X
, , ,
... ... ... ...
...
...
2 1
2 22 21
1 12 11
(13)
The matrix given by (13) constitutes the solution to the matrix system given by (6).
In order to get the particular solution of the matrix system required by the Lyapunov
Second Stability Method, it is necessary to make the corresponding substitutions of
T
A B
and C=-Q. After doing these substitutions, we get:
1
1
1
1
1
1
1
1
1
1
1
1
]
1

+
+
+
+
+
+

33 32 31 32 13
23 33 22 21 23 13
12 1 33 11 32 13
23 22 33 32 31 21
23 23 22 21 21
23 13 12 22 11 21
13 12 11 33 32 31
13 12 23 11 22 21
13 12 13 12 11
2 0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 2 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0 2
a a a a a
a a a a a a
a a a a a a
a a a a a a
a a a a a
a a a a a a
a a a a a a
a a a a a a
a a a a a
S
(11)
Note that, due to
T
A B
, we have
ji ij
a b
.
Without pretending to extend in an exhaustive study od control systems, which
goes too far of merely computational approach of this paper, it is important stamd out thsy
the possibility of applying the Lyapunov Second Stability Method to non-linear is actually
the great advantage of this method, because of in linear systems results much more simple
to check the stability by verifying that the real part of the characterictic equation are in the
negative half plane. This simple comprobation ins not applicable to non-linear systems.
The Lyapunov Second Stability Method importante is more evident in the recent
approaches to the synthesis and design f indusrtrial control systems, which are, in general,
:
A proposal for resolution of Lyapunov equation matrix.
non-linear. Examples of that kina of controllers are those based in Variable Structure
Theory [1] and [3], which utilizes the underlying theory of the Second Stability Method to
get asymptotically stable plants, with small settling and responses times, along with small
overshoot percentage
EXAMPLE
For comparison purpose, between the results obtained with my scripts and those
reported by the <MATLAB P=lyap(A,C) function, let us take a numerical example:
Lets be a = [1 -2 3;4 1 6;7 8 -1] that is non singular. By applying my scripts, it is
obtained the following partial results for the system Q PA P A
T
+ , with Q=ye(3):
Matrix U:
1 -2 3 0 0 0 0 0 0
4 1 6 0 0 0 0 0 0
7 8 -1 0 0 0 0 0 0
0 0 0 1 -2 3 0 0 0
0 0 0 4 1 6 0 0 0
0 0 0 7 8 -1 0 0 0
0 0 0 0 0 0 1 -2 3
0 0 0 0 0 0 4 1 6
0 0 0 0 0 0 7 8 -1
Matrix V:
1 0 0 -2 0 0 3 0 0
0 1 0 0 -2 0 0 3 0
0 0 1 0 0 -2 0 0 3
4 0 0 1 0 0 6 0 0
0 4 0 0 1 0 0 6 0
0 0 4 0 0 1 0 0 6
7 0 0 8 0 0 -1 0 0
0 7 0 0 8 0 0 -1 0
0 0 7 0 0 8 0 0 -1
Vector P1 (transposed, the solution of the conventional form Ax=b, with
x=P1):
>>P1
-0.23485 0.89394 0.50758 0.89394 0.74242
-0.80303 0.50758 -0.80303 -2.3712
:
A proposal for resolution of Lyapunov equation matrix.
Matrix P =
-0.23485 0.89394 0.50758
0.89394 0.74242 -0.80303
0.50758 -0.80303 -2.3712
On the other hand, results reported for P=lyap(A,Q):
>> PLyap = lyap(a,Q)
PLyap =
-0.23485 0.89394 0.50758
0.89394 0.74242 -0.80303
0.50758 -0.80303 -2.3712
Substracting one from the other, we get:
>> P2-PLyap
ans =
-2.3592e-015 -9.1038e-015 -3.1086e-015
-9.992e-015 -1.6542e-014 1.1546e-014
-5.7732e-015 6.6613e-015 3.908e-014
As it can be noted, differences are of the order of
14
10

, which is, obviously,


negligible! By the way, it is important to note that the Online Help offered by MATLAB
6.5, R13, say that lyap(A.C) function solves the equation AX + XA = -C, and must be AX
+ XA = -C that do correspond to the Lyapunov matrix equation. These matrix eqations has
different solutions.
Finally, it is worthy to be mentioned that the m-files that appear in this paper were
developed and used by the author with the MATLAB, version 4.2c.1, Student version, some
years ago, which did not included the lyap(A,C) function.
:
A proposal for resolution of Lyapunov equation matrix.
CONCLUSSIONS.
1. Through simple manipulations of rows and columns, it is possible to re-
accommodate an algebraic equations matrix system, in order to obtain a
conventional system of ordinary linear equations, which may be easily solved
by utilizing some known method to solve Algebraic Ordinary Equations
Systems, like the Gaussian Back Deletion or any of its variants, i.e., Gauss-
Jordan or Gauss-Seidel.. Taking advantage of the sparse nature of the matrix
elements after manipulation, it would be possible to utilize other method which
results more efficient in the number of operations to do to get the solution.
2. Algorithms are presented in MATLAB m-file format, although it may be
translate to any available programming language, as Visual Basic or Visual C;
both of them are products of Microsoft Corporation, or in other language from
any manufacturer.
REFERENCES.
[1] Utkin, Vadim. Sliding Modes and their Applications in Variable Structure
Systems, MIR Publishers, Mosc, 1978.

[2] Marcano G., Cosme R. Sntesis y Diseo de Controladotes de Estructura
Variable, Trabajo de Maestra, Universidad Nacional Experimental Politcnica
Antonio Jos de Sucre, Puerto Ordaz - Venezuela, Mayo 2.004.

[3] Fadeeva, V.N., Mtodos de Clculo del lgebra Lineal, Editorial Paraninfo,
Madrid, 1973.
[4] Marcano G., Cosme R. Sistemas de Estructura Variable, Trabajo de Grado,
Universidad de los Andes, Mrida Venezuela, Mayo 1986.
[5] Kailath, Thomas. Linear Systems, Prentice may, Englewood Cliffs, New
Jersey EE.UU.198
[6] Utkin, Vadim. Variable Structure Control, Automation and Remote Control, 44, pp.
1105-1119, september 1983.
[7] Sira-Ramrez, Hebert. Nonlinear Sliding Manifolds for Linear and Bilinear
Systems. Confrence Internationale Francophone d'Automatique, CIFA' 2000. Pars,
2000.
[8] The Mathworks, Inc. Matlab Online Help version 6.5, Release R13
:

Você também pode gostar