Harmony
HARMONic stabilitY assessment of PE-penetrated power systems
Loading...
Searching...
No Matches
Geometric_certificates.h
Go to the documentation of this file.
1#ifndef GEOMETRIC_CERTIFICATES_H
2#define GEOMETRIC_CERTIFICATES_H
3
14#include "../../Constants.h"
15
16#include <complex>
17#include <vector>
18
21 double re = 0.0;
22 double im = 0.0;
23 double gain2 = 0.0;
24};
25
28 std::vector<std::complex<double>> boundary;
29 double min_real = 0.0;
30 double max_phase_deg = 0.0;
31 double zero_margin = 0.0;
32 bool contains_zero = false;
33 bool pass_phase = false;
34 bool pass_zero_outside = false;
35};
36
39 std::vector<DwShellPoint> samples;
41 double max_singular = 0.0;
42 double excess_passivity = 0.0;
43 double shortage_passivity = 0.0;
44 double xz_min_re = 0.0;
45 double xz_max_gain2 = 0.0;
46 bool pass_small_gain = false;
47 bool pass_excess = false;
48};
49
51double excessPassivity(const Eigen::MatrixXcd& A);
52double shortagePassivity(const Eigen::MatrixXcd& A);
53
55double spectralNorm(const Eigen::MatrixXcd& A);
56
61std::vector<std::complex<double>> numericalRangeBoundary(
62 const Eigen::MatrixXcd& A,
63 int n_theta = 180);
64
70 const Eigen::MatrixXcd& A,
71 double phase_limit_deg = 90.0,
72 int n_theta = 180);
73
80 const Eigen::MatrixXcd& A,
81 double phase_limit_deg = 90.0,
82 double gain_limit = 1.0,
83 double excess_eps = 0.0,
84 int n_theta = 180,
85 int n_sphere = 24);
86
93Eigen::MatrixXcd loopShiftedSector(
94 const Eigen::MatrixXcd& A,
95 double alpha,
96 double beta);
97
99bool certifySector(
100 const Eigen::MatrixXcd& A,
101 double alpha,
102 double beta,
103 double eps = 0.0);
104
105#endif // GEOMETRIC_CERTIFICATES_H
double excessPassivity(const Eigen::MatrixXcd &A)
Hermitian / excess passivity ν = λ_min(Her A); shortage = max(0,-ν).
Definition Geometric_certificates.cpp:54
std::vector< std::complex< double > > numericalRangeBoundary(const Eigen::MatrixXcd &A, int n_theta=180)
Trace ∂W(A) via the support function: z(θ) = e^{iθ} λ_max(Her(e^{-iθ} A)).
Definition Geometric_certificates.cpp:72
NumericalRangeCertificate certifyNumericalRange(const Eigen::MatrixXcd &A, double phase_limit_deg=90.0, int n_theta=180)
Numerical-range small-phase certificate.
Definition Geometric_certificates.cpp:91
DwShellCertificate certifyDwShell(const Eigen::MatrixXcd &A, double phase_limit_deg=90.0, double gain_limit=1.0, double excess_eps=0.0, int n_theta=180, int n_sphere=24)
Sample DW(A) on a dense set of unit vectors (exact NR boundary + sphere grid).
Definition Geometric_certificates.cpp:129
bool certifySector(const Eigen::MatrixXcd &A, double alpha, double beta, double eps=0.0)
True if Her(T) ≻ eps for the loop-shifted sector map (when defined).
Definition Geometric_certificates.cpp:222
double shortagePassivity(const Eigen::MatrixXcd &A)
Definition Geometric_certificates.cpp:60
double spectralNorm(const Eigen::MatrixXcd &A)
Operator (spectral) norm σ_max(A).
Definition Geometric_certificates.cpp:66
Eigen::MatrixXcd loopShiftedSector(const Eigen::MatrixXcd &A, double alpha, double beta)
Classic loop-shifted (sector) matrix for SISO/MIMO sector [α, β]: T = (A - α I)(β I - A)^{-1} when in...
Definition Geometric_certificates.cpp:204
Sampled DW shell + classical projections used as local certificates.
Definition Geometric_certificates.h:38
std::vector< DwShellPoint > samples
Definition Geometric_certificates.h:39
bool pass_excess
Definition Geometric_certificates.h:47
double shortage_passivity
Definition Geometric_certificates.h:43
double max_singular
σ_max(A) (small-gain)
Definition Geometric_certificates.h:41
double excess_passivity
Definition Geometric_certificates.h:42
double xz_max_gain2
max ||Av||^2 over samples
Definition Geometric_certificates.h:45
bool pass_small_gain
Definition Geometric_certificates.h:46
NumericalRangeCertificate nr
Definition Geometric_certificates.h:40
double xz_min_re
min Re over DW samples (≈ NR min real)
Definition Geometric_certificates.h:44
One point on the Davis–Wielandt shell DW(A) = {(v*Av, ||Av||^2)}.
Definition Geometric_certificates.h:20
double im
Im(v* A v)
Definition Geometric_certificates.h:22
double re
Re(v* A v)
Definition Geometric_certificates.h:21
double gain2
||A v||^2
Definition Geometric_certificates.h:23
Numerical-range / small-phase summary for one matrix.
Definition Geometric_certificates.h:27
double max_phase_deg
max |arg z| over ∂W (180 if 0 ∈ W)
Definition Geometric_certificates.h:30
double zero_margin
>0 ⇒ 0 ∉ W; ≤0 ⇒ 0 ∈ W (approx.)
Definition Geometric_certificates.h:31
double min_real
min Re W(A) = λ_min(Her A)
Definition Geometric_certificates.h:29
bool pass_zero_outside
Definition Geometric_certificates.h:34
bool contains_zero
Definition Geometric_certificates.h:32
bool pass_phase
max_phase ≤ limit (and preferably 0 ∉ W)
Definition Geometric_certificates.h:33
std::vector< std::complex< double > > boundary
Support-function samples of ∂W(A)
Definition Geometric_certificates.h:28