1.4. Higher-order perturbation
You can solve for higher-order perturbation if you are in one of the following cases:
You are using symbolic derivatives and those derivatives have been precomputed at parse time via the
max_deriv_orderoption to the model factory.You are using automatic derivatives.
You are using numerical derivatives.
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:
symbolicnumericalautomaticmatlab
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.flag–0if the problem solves;1if the maximum number of iterations is reached; another number otherwise.relres– the relative residualnorm(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 firstnorm(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'