Learn R Programming

ksm (version 1.0)

Riccati: Solver for Riccati equation

Description

Given two matrices M and S, solve Riccati equation by iterative updating to find the solution \(\mathbf{R}\), where the latter satisfies $$\mathbf{R}=\mathbf{M}\mathbf{R}\mathbf{M}^\top + \mathbf{S}$$ until convergence (i.e., when the Frobenius norm is less than tol, or the maximum number of iterations maxiter is reached.

Usage

Riccati(M, S, tol = 1e-08, maxiter = 10000L)

Value

a list containing

  • solution matrix solution to Riccati's equation

  • error numerical error

  • niter number of iteration

  • convergence bool indicating convergence (TRUE) if niter < maxiter

Arguments

M

matrix

S

matrix

tol

double for tolerance

maxiter

integer, the maximum number of iterations