pymloc.model.optimization.objectives.lqr

Classes

LQRObjective(time, q, s, r, final_weight)

Implementation of the objective function of the linear quadratic regulator.

class pymloc.model.optimization.objectives.lqr.LQRObjective(time, q, s, r, final_weight)

Bases: pymloc.model.optimization.objectives.local_objective.LocalObjective

Implementation of the objective function of the linear quadratic regulator.

The objective function is given by

\[\begin{split}{ x(\tf)^{\Herm}Kx(\tf) + \int_{t_0}^{\tf}{ \begin{pmatrix} x(t)\\ u(t) \end{pmatrix}^{\Herm} \begin{bmatrix} Q(t) & S(t)\\ S^{\Herm}(t)& R(t) \end{bmatrix} \begin{pmatrix} x(t)\\ u(t) \end{pmatrix}\end{split}\]

mathrm{d}t}}.

time: time interval of integration with \(t_0\) as starting point and \(t_f\) as end point. q: weight function r: weight function s: weight function final_weight: final weight

Parameters
  • time (pymloc.model.variables.time_function.Time) –

  • q (Callable[[float], numpy.ndarray]) –

  • s (Callable[[float], numpy.ndarray]) –

  • r (Callable[[float], numpy.ndarray]) –

  • final_weight (numpy.ndarray) –

property final_weight
integral_weights(t)
Parameters

t (float) –

Return type

numpy.ndarray

reset()

Resets all DAE objects. Removes stored current values.

value(solution)
Parameters

solution (pymloc.solvers.base_solver.TimeSolution) –

Return type

numpy.ndarray