Escolar Documentos
Profissional Documentos
Cultura Documentos
in D
then, it might be assured that the system is stable in x = 0.
Furthermore, if
0 ) ( < x V
(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