LQR
===
The optimal state-feedback gain K (u = −K x) for weights Q (states) and R (inputs), and the Riccati solution P, as matrix text. A number for Q or R is that times the identity.
``lqr`` · control
.. raw:: html
Outputs
-------
.. list-table::
:header-rows: 1
* - Port
- Type
- Unit
- Components
* - ``K``
- text
- —
- —
* - ``P``
- text
- —
- —
Parameters
----------
.. list-table::
:header-rows: 1
* - Param
- Type
- Default
- Options or unit
* - ``A``
- text
- ``"0"``
- —
* - ``B``
- text
- ``"1"``
- —
* - ``Q``
- text
- ``"1"``
- —
* - ``R``
- text
- ``"1"``
- —
* - ``domain``
- enum
- ``"s"``
- ``s``, ``z``