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
For a system that has been linearized, assemble a quadratic cost matrix (for LQR or Kalman filtering) that penalizes states or outputs of simplified system `ssys` accoring to the vector of pairs `costs`.
244
+
245
+
The motivation for this function is that ModelingToolkit does not guarantee
246
+
- Which states are selected as states after simplification.
247
+
- The order of the states.
248
+
249
+
The second problem above, the ordering of the states, can be worked around using `reorder_states`, but the first problem cannot be solved by trivial reordering. This function thus accepts an array of costs for a user-selected state realization, and assembles the correct cost matrix for the state realization selected by MTK. To do this, the funciton needs the linearization (`matrices`) as well as the simplified system, both of which are outputs of `linearize`.
250
+
251
+
# Arguments:
252
+
- `matrices`: Output of `linearize`, an object containing a property called `C`.
Assemble a quadratic cost matrix (for LQR or Kalman filtering) that penalizes states or outputs of system `sys` accoring to the vector of pairs `costs`.
278
+
279
+
The motivation for this function is that ModelingToolkit does not guarantee
280
+
- Which states are selected as states after simplification.
281
+
- The order of the states.
282
+
283
+
The second problem above, the ordering of the states, can be worked around using `reorder_states`, but the first problem cannot be solved by trivial reordering. This function thus accepts an array of costs for a user-selected state realization, and assembles the correct cost matrix for the state realization selected by MTK. To do this, the funciton needs the linearization (`matrices`) as well as the simplified system, both of which are outputs of `linearize`.
284
+
285
+
# Arguments:
286
+
- `inputs`: A vector of variables that are to be considered controlled inputs for the LQR controller.
0 commit comments