generate_control_function(sys, inputs) compiles sys with inputs as
inputs and returns its dynamics as an R function f(x, u, p, t) (or
f(x, u, p, t, w) with known disturbances), where x are the unknowns
dvs, u the inputs and p the parameters ps. Unknown
disturbance_inputs keep their dynamics but are set to zero. With
implicit_dae = TRUE the function is the residual f(dx, x, u, p, t).
inputs may also be analysis points, whose connections are opened.
Usage
generate_control_function(
sys,
inputs = NULL,
disturbance_inputs = NULL,
known_disturbance_inputs = NULL,
implicit_dae = FALSE,
simplify = FALSE,
system_modifier = identity,
...
)
calculate_control_jacobian(sys, sparse = FALSE, simplify = FALSE)
generate_control_jacobian(sys, simplify = FALSE, sparse = FALSE, ...)Arguments
- sys
A
System.- inputs
Input variables or analysis points.
- disturbance_inputs
Unknown disturbance inputs.
- known_disturbance_inputs
Disturbance inputs passed as
w.- implicit_dae
Generate a residual function.
- simplify
Passed to
mtkcompile().- system_modifier
For analysis point inputs, a function applied to the opened system.
- ...
Unused.
- sparse
Unused.
Value
A list with f, dvs, ps and the compiled system io_sys;
for the Jacobian functions a symbolic matrix or an R function.