Fixes to various optimization-based control functions by murrayrm · Pull Request #709 · python-control/python-control

Skip to content

Navigation Menu

Sign in

Appearance settings

Conversation

@murrayrm

I recently finished teaching an optimization-based controls course and found a but of small things in the code that needing fixing/improving:

  • Parameters were not being passed properly to differentially flat systems.
  • Basis functions derived from BasisFamily were not calling BasisFamily.__init__.
  • Changed constraints keyword in optimal.solve_ocp and flatsys.point_to_point to trajectory_constraints for more consistency (legacy keyword still works).
  • Initial conditions for simulation of discrete time systems was being passed as a list instead of an ndarray, which caused some odd behavior and wasn't consistent with continuous time system usage.
  • Added check for constraint types in optimal control problem setup (rather than when solving the optimal control problem).
  • Fixed small inconsistency in the way discrete time was handled in setting up an I/O system for model predictive control (should be inherited from system, not passed separately).
  • Unused keywords in OptimalControlProblem now generate an error (mentioned here).
  • To be consistent with the normal problem formulation, the discrete time optimal cost calculation no longer includes the endpoint (use terminal_cost instead).
  • create_mpc_iosystem now re-computes the optimal controller when returning the output, which eliminates an unintended one-step delay in the MPC dynamics.
  • Added unit tests.

@coveralls

Coverage Status

Coverage increased (+0.006%) to 93.601% when pulling f807b33 on murrayrm:cds112 into e10855e on python-control:master.

2 participants

@murrayrm @coveralls