Skip to contents

get_sensitivity(sys, ap) linearizes the sensitivity function at the analysis point ap: the transfer from a perturbation added to the input of the point to the signal at its outputs. get_comp_sensitivity() gives the complementary sensitivity function and get_looptransfer() the loop transfer function, which includes the negative feedback of the loop. The *_function variants return the linearization function and the simplified system instead, see linearization_function().

Usage

get_sensitivity(
  sys,
  ap,
  loop_openings = list(),
  system_modifier = identity,
  allow_input_derivatives = TRUE,
  op = list(),
  t = 0,
  eliminate_algebraic = FALSE,
  ...
)

get_comp_sensitivity(
  sys,
  ap,
  loop_openings = list(),
  system_modifier = identity,
  allow_input_derivatives = TRUE,
  op = list(),
  t = 0,
  eliminate_algebraic = FALSE,
  ...
)

get_looptransfer(
  sys,
  ap,
  loop_openings = list(),
  system_modifier = identity,
  allow_input_derivatives = TRUE,
  op = list(),
  t = 0,
  eliminate_algebraic = FALSE,
  ...
)

get_sensitivity_function(sys, ap, ...)

get_comp_sensitivity_function(sys, ap, ...)

get_looptransfer_function(sys, ap, ...)

Arguments

sys

The unsimplified, uncompleted model.

ap

An analysis point sys$name (or sys$inner$name), its name, or a list of them.

loop_openings

Analysis points whose connections are removed before linearization; the opened signals keep the value of their drivers unless op gives one.

system_modifier

A function applied to the transformed system.

allow_input_derivatives, op, t, eliminate_algebraic

Passed to linearize().

...

Passed to linearization_function().

Value

For get_*, the result of linearize(): a list with matrices A, B, C, D, the simplified system sys and extras. For get_*_function, a list with lin_fun 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); e <- Variable("e", t, output = TRUE)
sys <- System(list(D(x) ~ -x + u, y ~ x, e ~ -y, connect(e, "loop", u)),
  t, name = "fb")
S <- get_sensitivity(sys, sys$loop, verbose = FALSE)
S$A; S$D
#>      [,1]
#> [1,]   -2
#>      [,1]
#> [1,]    1