1.4. Higher-order perturbation

You can solve for higher-order perturbation if you are in one of the following cases:

  1. You are using symbolic derivatives and those derivatives have been precomputed at parse time via the max_deriv_order option to the model factory.

  2. You are using automatic derivatives.

  3. You are using numerical derivatives.

  4. You are using matlab derivatives.

And you are able to solve the generalized system of Sylvester equations.

1.4.1. Choosing the derivatives

To change the type of derivatives, use the option solve_derivatives_type. RISE implements four types:

  • symbolic

  • numerical

  • automatic

  • matlab

1.4.2. Solving the system of generalized Sylvester equations

The complicated linear problem is solved using a solver with the syntax:

[X, flag, relres, iter, resvec] = linsolver(A, b, ...
    TolFun, Maxiter, ...
    M1, M2, x0, vargs{:});

Inputs:

  • A – either a square matrix or a function handle returning the result of the operation \(A \times x\) without explicitly forming and storing \(A\).

  • b – the right-hand side of \(A x = b\).

  • TolFun – tolerance.

  • Maxiter – maximum number of iterations.

  • M1 = [] – not set.

  • M2 = [] – not set.

  • x0 – initial guess.

  • vargs – any additional arguments.

Outputs:

  • X – the final solution.

  • flag0 if the problem solves; 1 if the maximum number of iterations is reached; another number otherwise.

  • relres – the relative residual norm(b - A*x) / norm(b).

  • iter – the iteration number at which the final solution was computed.

  • resvec – vector of residual norms at each half iteration, including the first norm(b - A*x0).

Change the default with the option solve_linsyst_user_algo. Some of the algorithms usable in MATLAB:

  • 'tfqmr' (default)

  • 'bicg'

  • 'bicgstab'

  • 'bicgstabl'

  • 'cgs'

  • 'gmres'