nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
lyapunov.hpp
Go to the documentation of this file.
1
3// toolboxes/control/include/nk/control/lyapunov/lyapunov.hpp
4//
5// Continuous and discrete Lyapunov equations.
6//
7// lyap (A, Q): A·X + X·Aᵀ + Q = 0
8// dlyap(A, Q): A·X·Aᵀ − X + Q = 0
9//
10// We solve the n²×n² vectorised system directly — fine for the
11// state dims that show up in textbook control problems (n ≤ 32).
12
13#pragma once
14
15#include <memory_resource>
16#include <nk/value/value.hpp>
17
18namespace nk::control {
19
22
23
44Value lyap(const Value &A, const Value &Q,
45 std::pmr::memory_resource *mr = nullptr);
46
60Value dlyap(const Value &A, const Value &Q,
61 std::pmr::memory_resource *mr = nullptr);
62
63
65} // namespace nk::control
Core MATLAB-compatible multidimensional array and scalar value type.
Definition value.hpp:61
Value dlyap(const Value &A, const Value &Q, std::pmr::memory_resource *mr=nullptr)
Discrete-time Lyapunov (Stein) equation solver (X = dlyap(A, Q)).
Value lyap(const Value &A, const Value &Q, std::pmr::memory_resource *mr=nullptr)
Continuous-time Lyapunov equation solver (X = lyap(A, Q)).