nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
connect.hpp
Go to the documentation of this file.
1
3// toolboxes/control/include/nk/control/connect/connect.hpp
4//
5// LTI block-diagram interconnections. All three return a `tf`
6// struct regardless of input forms — converting tf/zpk/ss inputs
7// to coefficient pairs first via the existing toolboxes/* primitives.
8
9#pragma once
10
11#include <memory_resource>
12#include <nk/value/value.hpp>
13
14namespace nk::control {
15
18
19
43Value series(const Value &sys1, const Value &sys2,
44 std::pmr::memory_resource *mr = nullptr);
45
59Value parallel(const Value &sys1, const Value &sys2,
60 std::pmr::memory_resource *mr = nullptr);
61
83Value feedback(const Value &G, const Value &H, int sign,
84 std::pmr::memory_resource *mr = nullptr);
85
86
88} // namespace nk::control
Core MATLAB-compatible multidimensional array and scalar value type.
Definition value.hpp:61
Value series(const Value &sys1, const Value &sys2, std::pmr::memory_resource *mr=nullptr)
Cascade two LTI blocks (series(sys1, sys2)).
Value parallel(const Value &sys1, const Value &sys2, std::pmr::memory_resource *mr=nullptr)
Parallel connection of two LTI blocks (parallel(sys1, sys2)).
Value feedback(const Value &G, const Value &H, int sign, std::pmr::memory_resource *mr=nullptr)
Closed-loop transfer function under feedback (feedback(G, H, sign)).