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
Remove fuzz functionality, simplify trajectory_ss to use LinearizationOpPoint directly
trajectory_ss now delegates entirely to MTK's linearize with
LinearizationOpPoint(sol, t) — no manual op construction needed.
Removed ControlSystemsMTK.fuzz and all references to it.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Linearize `sys` around the trajectory `sol` at times `t`. Returns a vector of `StateSpace` objects and the simplified system.
518
518
@@ -523,56 +523,20 @@ Operating points are extracted from the solution automatically using `ModelingTo
523
523
- `outputs`: A vector of variables or analysis points.
524
524
- `sol`: An ODE solution object.
525
525
- `t`: Time points along the solution trajectory at which to linearize. The returned array of `StateSpace` objects will be of the same length as `t`.
526
-
- `fuzzer`: A function that takes an operating point dictionary and returns an array of "fuzzed" operating points. This is useful for adding noise/uncertainty to the operating points along the trajectory. See [`ControlSystemsMTK.fuzz`](@ref) for such a function.
527
526
- `kwargs`: Are sent to the linearization functions (e.g., `loop_openings`).
528
527
- `named`: If `true`, the returned systems will be of type `NamedStateSpace`, otherwise they will be of type `StateSpace`.
529
528
"""
530
-
functiontrajectory_ss(sys, inputs, outputs, sol; t =_max_100(sol.t), allow_input_derivatives =false, fuzzer =nothing, verbose =true, named =true, kwargs...)
529
+
functiontrajectory_ss(sys, inputs, outputs, sol; t =_max_100(sol.t), allow_input_derivatives =false, verbose =true, named =true, kwargs...)
531
530
maximum(t) >maximum(sol.t) &&@warn("The maximum time in `t`: $(maximum(t)), is larger than the maximum time in `sol.t`: $(maximum(sol.t)).")
532
531
minimum(t) <minimum(sol.t) &&@warn("The minimum time in `t`: $(minimum(t)), is smaller than the minimum time in `sol.t`: $(minimum(sol.t)).")
533
532
534
533
input_names =reduce(vcat, getproperty.(ap.outputs, :u) for ap invcat(inputs))
535
534
output_names =reduce(vcat, ap.input.u for ap invcat(outputs))
536
535
537
-
# Use LinearizationOpPoint to extract operating points from the solution.
538
-
# _build_op_from_solution gives differential states + parameters; we supplement
539
-
# with all unknowns of the linearization system to avoid initialization issues.
"Fuzz" an operating point `op::Dict` by changing each non-zero value to an uncertain number with multiplicative uncertainty `p`, represented by `N` samples, i.e., `p = 0.1` means that the value is multiplied by a `N` numbers between 0.9 and 1.1.
596
-
597
-
`parameters` and `variables` indicate whether to fuzz parameters and state variables, respectively.
598
-
599
-
This function modifies all variables the same way. For more fine-grained control, load the `MonteCarloMeasurements` package and use the `Particles` type directly, followed by `MonteCarloMeasurements.particle_dict2dict_vec(op)`, i.e., the following makes `uncertain_var` uncertain with a 10% uncertainty:
0 commit comments