nk
1.0.0
C++ Numerical Computing Runtime
Toggle main menu visibility
Loading...
Searching...
No Matches
analyze.hpp
Go to the documentation of this file.
1
3
// toolboxes/control/include/nk/control/analyze/analyze.hpp
4
//
5
// Steady-state and time-domain quality metrics on top of the
6
// existing tf/zpk/ss + step/bode primitives.
7
8
#pragma once
9
10
#include <memory_resource>
11
#include <nk/value/value.hpp>
12
13
namespace
nk::control {
14
17
18
35
Value
dcgain
(
const
Value
&sys, std::pmr::memory_resource *mr =
nullptr
);
36
42
struct
MarginResult
{
43
Value
Gm
;
44
Value
Pm
;
45
Value
Wcg
;
46
Value
Wcp
;
47
};
48
68
MarginResult
margin
(
const
Value
&sys,
69
std::pmr::memory_resource *mr =
nullptr
);
70
93
Value
stepinfo
(
const
Value
&sys, std::pmr::memory_resource *mr =
nullptr
);
94
109
Value
allmargin
(
const
Value
&sys, std::pmr::memory_resource *mr =
nullptr
);
110
125
Value
hinfnorm
(
const
Value
&sys, std::pmr::memory_resource *mr =
nullptr
);
126
127
129
}
// namespace nk::control
nk::Value
Core MATLAB-compatible multidimensional array and scalar value type.
Definition
value.hpp:61
nk::control::hinfnorm
Value hinfnorm(const Value &sys, std::pmr::memory_resource *mr=nullptr)
H-infinity norm of a continuous-time LTI system (g = hinfnorm(sys)).
nk::control::dcgain
Value dcgain(const Value &sys, std::pmr::memory_resource *mr=nullptr)
DC (steady-state) gain of an LTI system.
nk::control::stepinfo
Value stepinfo(const Value &sys, std::pmr::memory_resource *mr=nullptr)
Step-response quality metrics (S = stepinfo(sys)).
nk::control::allmargin
Value allmargin(const Value &sys, std::pmr::memory_resource *mr=nullptr)
All stability margins as a struct (S = allmargin(sys)).
nk::control::margin
MarginResult margin(const Value &sys, std::pmr::memory_resource *mr=nullptr)
Gain and phase margins ([Gm, Pm, Wcg, Wcp] = margin(sys)).
nk::control::MarginResult
Result of margin(sys) — gain / phase margin pair plus the frequencies at which they occur.
Definition
analyze.hpp:42
nk::control::MarginResult::Wcp
Value Wcp
Gain-crossover frequency (where |H| = 1), rad/s.
Definition
analyze.hpp:46
nk::control::MarginResult::Gm
Value Gm
Gain margin (linear, not dB).
Definition
analyze.hpp:43
nk::control::MarginResult::Pm
Value Pm
Phase margin in degrees.
Definition
analyze.hpp:44
nk::control::MarginResult::Wcg
Value Wcg
Phase-crossover frequency (where phase = −180°), rad/s.
Definition
analyze.hpp:45
src
toolboxes
control
include
nk
control
analyze
analyze.hpp
Generated by
1.17.0