How should I find the Cholesky factorization of the gramian in MATLAB?

2 views (last 30 days)
I used two methods to find the Cholesky factorization of a gramian. These methods yield different results for certain systems.
The first method is to use command GRAM with option 'of'
rq = gram(SYS, 'of')
The second method is to find the gramian first, then take the Cholesky factorization.
q = gram(SYS, 'o');
rq = chol (q);

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The command GRAM calculates the Cholesky factorization of the gramian directly from a Cholesky Lyapunov solver. If there is no specified factorization, GRAM explicitly forms the product Wo = R' * R. In other words,
q = gram(SYS, 'o');
is equivalent to:
r = gram(SYS, 'of');
q = r' * r;
To calculate the Cholesky factorization of the gramian,
rq = gram(SYS, 'of');
should be used. Using:
q = gram(SYS, 'o');
rq = chol(q);
may cause round-off errors and scaling issues. This is so because it performs the product q = r' * r first in the call to GRAM and then refactorizes the product q using CHOL.

More Answers (0)

Categories

Find more on Matrix Computations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!