Skip to contents

linearize_symbolic(sys, inputs, outputs) returns the symbolic matrices A, B, C, D (symcompR matrices) of the linearization of sys together with the Jacobian blocks f_x, ..., h_u, and the simplified system. Algebraic unknowns are eliminated as in linearize() unless eliminate_algebraic = FALSE.

Usage

linearize_symbolic(
  sys,
  inputs,
  outputs,
  simplify = FALSE,
  allow_input_derivatives = FALSE,
  eliminate_algebraic = FALSE,
  ...
)

Arguments

sys

A System, or the simplified system for the second form.

inputs, outputs

Lists of variables or analysis points; for the second form, inputs is the LinearizationFunction.

simplify

Simplify the resulting expressions.

allow_input_derivatives

Allow derivatives of inputs, see above.

eliminate_algebraic

Eliminate algebraic unknowns from the state.

...

Passed to linearization_function().

Value

A list with the matrices, the blocks and sys.

Examples

t <- t_nounits; D <- D_nounits
x <- Variable("x", t); u <- Variable("u", t, input = TRUE)
y <- Variable("y", t, output = TRUE); k <- Parameter("k")
sys <- System(list(D(x) ~ -k * x + u, y ~ x), t, name = "s")
linearize_symbolic(sys, list(u), list(y))$A
#>      [,1]
#> [1,] -k