You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert an `System` to a `NamedStateSpace` using linearization. `inputs, outputs` are vectors of variables determining the inputs and outputs respectively. See docstring of `ModelingToolkit.linearize` for more info on `kwargs`.
64
63
@@ -75,6 +74,8 @@ function RobustAndOptimalControl.named_ss(
75
74
outputs;
76
75
descriptor =true,
77
76
simple_infeigs =true,
77
+
balance = descriptor &&!simple_infeigs, # balance only if descriptor is true and simple_infeigs is false
78
+
big =false,
78
79
kwargs...,
79
80
)
80
81
@@ -113,7 +114,7 @@ function RobustAndOptimalControl.named_ss(
113
114
# This indicates that input derivatives are present
114
115
duinds =findall(any(!iszero, eachcol(matrices.B[:, nu+1:end]))) .+ nu
115
116
u2du = (1:nu) .=> duinds # This maps inputs to their derivatives
If `descriptor = true`, the function `DescriptorSystems.dss2ss` is used. In this case,
157
+
- `balance`: indicates whether to balance the system using `DescriptorSystems.gprescale` before conversion to `StateSpace`. Balancing changes the state realization (through scaling).
158
+
- `simple_infeigs`: if set to false, further simplification may be performed in some cases.
159
+
160
+
If `descriptor = false`, the argument `big = true` performs computations in `BigFloat` precision, useful for poorly scaled systems.
bq >10000&&@warn("The numerical balancing of the system is poor (gbalqual = $bq), consider using `balance=true` to balance the system before conversion to StateSpace to improve accuracy of the result.")
0 commit comments