Introduction
Consider the matrix differential equation:
y′(t)=f(t,y(t)),t>0,
where the initial value
∈
is given. Assume that
, that the solution has the property of preserving orthonormality,
, and that it has full rank for all t ≥ 0.
From a numerical perspective, a key issue is how to numerically integrate an orthogonal matrix differential system in such a way that the numerical solution remains orthogonal. There are several strategies that are possible. One approach, suggested in [DRV94], is to use an implicit Runge-Kutta method (such as the Gauss scheme). Some alternative strategies are described in [DV99] and [DL01].
The approach which we will take up here is to use any reasonable numerical integration method and then post-process using a projective procedure at the end of each integration step.
An important feature of our implementation is that the basic integration method can be any built-in numerical method, or even a user-defined procedure. In the examples that follow an explicit Runge-Kutta method will be used for the basic time stepping. However if we required greater accuracy we could easily use an extrapolation method for example by simply setting the appropriate Method option.
Projection step
At the end of each numerical integration step we need to transform the approximate solution matrix of the differential system to obtain an orthogonal matrix. This can be carried out in several ways (see for example [DRV94] and [H97]):
Newton or Schulz iteration
QR decomposition
Singular value decomposition
The Newton or Schulz methods are quadratically convergent and the number of iterations may vary depending on the error tolerances used in the numerical integration. One or two iterations are usually sufficient for convergence to the orthonormal polar factor (see below) in IEEE double precision arithmetic.
QR decomposition is cheaper than singular value decomposition (roughly by a factor of two) but it does not give the closest possible projection.
Definition (Thin singular value decomposition [GV96]): Given a matrix
with m ≥ p there exist two matrices U ∈
and V ∈
such that
is the diagonal matrix of singular values of A, Σ =
∈
, where
. U has orthonormal columns and V is orthogonal.
Definition (Polar decomposition): Given a matrix
and its singular value decomposition
, the polar decomposition of A is given by the product of two matrices Z and P where
and P =
. Z has orthonormal columns and P is symmetric positive semidefinite.
The orthonormal polar factor Z of A is the matrix that solves:
minZ ∈ ℝm×p{||A-Z|| : ZTZ=I}
for the 2 and Frobenius norms [H96].
Schulz iteration
We have chosen an approach based on the Schulz iteration, which works directly for m>=p. In contrast Newton iteration for m>p needs to be preceded by QR decomposition.
Comparison with direct computation based on the singular value decomposition is also given.
The Schulz iteration is given by:
The Schulz iteration has an arithmetic operation count per iteration of
floating point operations, but is rich in matrix multiplication [H97].
In a practical implementation, gemm level 3 BLAS of LAPACK [LAPACK99] can be used in conjunction with architecture specific optimizations via the Automatically Tuned Linear Algebra Software [ATLAS00].
Such considerations mean that the arithmetic operation count of the Schulz iteration is not necessarily an accurate reflection of the observed computational cost.
A useful bound on the departure from orthonormality of A in is [H89]: 
Comparison with the Schulz iteration gives the stopping criterion
for some tolerance τ.
Examples
Orthogonal error measurement
A function to compute the Frobenius norm
of a matrix A can be defined in terms of the Norm function as follows.
An upper bound on the departure from orthonormality of A can then be measured using the following function [H97]:
This defines utility function for visualizing the orthogonal error during a numerical integration.
Square systems
This example concerns the solution of a matrix differential system on the orthogonal group
(see [Z98]).
The matrix differential system is given by
with
A = (
)
and
Y0=I3.
The solution evolves as:
Y(t) = exp[t A].
The eigenvalues of Y(t) are
,
,
, thus as t approaches
two of the eigenvalues of Y(t) approach -1. The numerical integration is carried out on the interval [0, 2].
This computes the solution using an explicit Runge-Kutta method. The appropriate initial step size and method order are selected automatically and the step size may vary throughout the integration interval - it is chosen in order to satisfy local relative and absolute error tolerances. Alternatively the order of the method could be specified as using a Method option.
This computes the orthogonal error, or absolute deviation from the orthogonal manifold, as the integration progresses. The error is of the order of the local accuracy of the numerical method.
This computes the solution using an orthogonal projection method with an explicit Runge-Kutta method used for the basic integration step. The initial step size and method order are the same as before, but the step size sequence in the integration may differ.
Using the orthogonal projection method, the orthogonal error is reduced to approximately the level of roundoff in IEEE double precision arithmetic.
The Schulz iteration, using the incremental formulation, generally yields smaller errors than the direct singular value decomposition.
Rectangular systems
In the following example it is shown how the implementation of the orthogonal projection method also works for rectangular matrix differential systems. Formally stated, we are interested in solving ordinary differential equations on the Stiefel manifold, the set of n×p orthogonal matrices with p < n.
Definition The Stiefel manifold of n×p orthogonal matrices is the set
= {Y∈
|
}, 1≤p<n, where
is the p×p identity matrix.
Solutions that evolve on the Stiefel manifold find numerous applications such as eigenvalue problems in numerical linear algebra, computation of Lyapunov exponents for dynamical systems and signal processing.
Consider an example adapted from [DL01]:
q′(t)=A q(t),t>0,q(0)=q0
where
, A =
, with
and
.
The exact solution is given by:
q(t) = 1n(
).
Normalizing q(t) as:
Y(t) = q(t)||q(t)||∈ℝn×1
it follows that Y(t) satisfies the following weak skew-symmetric system on
:
In the following example, the system is solved on the interval [0, 5] with α = 9/10 and dimension n = 2.
This computes the exact solution which can be evaluated throughout the integration interval.
This computes the solution using an explicit Runge-Kutta method.
This computes the componentwise absolute global error at the end of the integration interval.
This computes the orthogonal error - a measure of the deviation from the Stiefel manifold.
This computes the solution using an orthogonal projection method with an explicit Runge-Kutta method as the basic numerical integration scheme.
The componentwise absolute global error at the end of the integration interval is roughly the same as before since the absolute and relative tolerances used in the numerical integration are the same.
Using the orthogonal projection method however, the deviation from the Stiefel manifold is reduced to the level of roundoff.
Implementation
The implementation of the method OrthogonalProjection has three basic components:
Initialization. Set up the base method to use in the integration, determining any method coefficients and setting up any workspaces that should be used. This is done once, before any actual integration is carried out, and the resulting MethodData object is validated so that it does not need to be checked at each integration step. At this stage the system dimensions and initial conditions are checked for consistency.
Invoke the base numerical integration method at each step.
Perform an orthogonal projection. This performs various tests such as checking that the basic integration proceeded correctly and that the Schulz iteration converges.
Options can be used to modify the stopping criteria for the Schulz iteration. One option provided by our code is IterationSafetyFactor which allows control over the tolerance τ of the iteration. The factor is combined with a Unit in the Last Place, determined according to the working precision used in the integration (
for IEEE double precision).
The Frobenius norm used for the stopping criterion can be computed efficiently using the LAPACK LANGE functions [LAPACK99]
The option MaxIterations controls the maximum number of iterations
that should be carried out.