|
OrthogonalProjection IntroductionConsider the matrix differential equation:
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 following examples an explicit Runge-Kutta method is used for the basic time stepping. However, if we require greater accuracy we could easily use an extrapolation method, for example, by simply setting the appropriate Method option. Projection stepAt 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 and 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:
for the 2 and Frobenius norms [H96]. Schulz iterationWe 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 . Standard formulationAssume that an initial value for the current solution of the ODE is given, together with a solution from a one-step numerical integration method. Assume that an absolute tolerance for controlling the Schulz iteration is also prescribed. The following algorithm can be used for implementation. Step 1. Set and .
Step 2. Compute .
Step 3. Compute .
Step 4. If or then return .
Step 5. Set and go to Step 2. Increment formulationNDSolve uses compensated summation to reduce the effect of rounding errors made by repeatedly adding the contribution of small quantities to at each integration step [H96]. Therefore, the increment is returned by the base integrator. An appropriate orthogonal correction for the projective iteration can be determined using the following algorithm. Step 1. Set and .
Step 2. Set .
Step 3. Compute .
Step 4. Compute .
Step 5. If or , then return .
Step 6. Set and go to Step 2. This modified algorithm is used in OrthogonalProjection and shows an advantage of using an iterative process over a direct process, since it is not obvious how an orthogonal correction can be derived for direct methods. ExamplesOrthogonal error measurementA function to compute the Frobenius norm of a matrix A can be defined in terms of the Norm function as follows. In[1]:=  |
An upper bound on the departure from orthonormality of A can then be measured using this function [H97]. In[2]:=  |
This defines the utility function for visualizing the orthogonal error during a numerical integration. In[3]:=  |
In[5]:=  |
Square systemsThis example concerns the solution of a matrix differential system on the orthogonal group (see [Z98]). The matrix differential system is given by
with
and
The solution evolves as:
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]. In[6]:=  |
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, which is chosen in order to satisfy local relative and absolute error tolerances. Alternatively, the order of the method could be specified by using a Method option. In[15]:=  |
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. In[16]:=  |
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 earlier, but the step size sequence in the integration may differ. In[18]:=  |
Using the orthogonal projection method, the orthogonal error is reduced to approximately the level of roundoff in IEEE double-precision arithmetic. In[19]:=  |
The Schulz iteration, using the incremental formulation, generally yields smaller errors than the direct singular value decomposition.
Rectangular systemsIn 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]:
where , A = , with and . The exact solution is given by:
Normalizing q(t) as:
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. In[21]:=  |
This computes the exact solution which can be evaluated throughout the integration interval. In[35]:=  |
This computes the solution using an explicit Runge-Kutta method. In[36]:=  |
This computes the componentwise absolute global error at the end of the integration interval. In[38]:=  |
Out[38]=
|
This computes the orthogonal error - a measure of the deviation from the Stiefel manifold. In[39]:=  |
This computes the solution using an orthogonal projection method with an explicit Runge-Kutta method as the basic numerical integration scheme. In[40]:=  |
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. In[42]:=  |
Out[42]=
|
Using the orthogonal projection method however, the deviation from the Stiefel manifold is reduced to the level of roundoff. In[43]:=  |
ImplementationThe 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. Option summaryOptions of the method OrthogonalProjection.
|