Harmony
HARMONic stabilitY assessment of PE-penetrated power systems
Loading...
Searching...
No Matches
DQsym_Conversion_Functions.h
Go to the documentation of this file.
1#ifndef _DQSYM_CONVERSION_FUNCTIONS_H_
2#define _DQSYM_CONVERSION_FUNCTIONS_H_
3
13#include "../../Constants.h"
14
19{
20 std::vector<double> t;
21 MatrixXd Xabc;
22};
23
30extern MatrixXcd dq_add(const MatrixXcd& a, const MatrixXcd& b);
31
38extern MatrixXcd dq_subtract(const MatrixXcd& a, const MatrixXcd& b);
39
49extern MatrixXcd dq_integrate(MatrixXcd& Zpnz_old, MatrixXcd& Xpnz_old, const MatrixXcd& Xpnz,
50 double dt, double w);
51
58extern MatrixXcd dq_multiply(const MatrixXcd& x_coef1_in, const MatrixXcd& y_coef1_in);
59
71extern void convertToPhasor(const MatrixXcd& A, const MatrixXcd& B,
72 const MatrixXcd& C, const MatrixXcd& D,
73 MatrixXcd& Adc, MatrixXcd& Bdc,
74 MatrixXcd& Cdc, MatrixXcd& Ddc);
75
82extern MatrixXcd truncateHarmonics(const MatrixXcd& X, int nColsToKeep);
83
90extern Vector3d dqn2abc_at_time(const MatrixXcd& Xdcpnz_c, double theta);
91
98extern std::vector<Vector3d> dqn2abc_groups_at_time(const MatrixXcd& Y, double theta);
99
109extern ABCResult simulate_dqn2abc(const MatrixXcd& Xdcpnz_c,
110 double freq_hz, double t0, double t1, double Ts);
111
112#endif // _DQSYM_CONVERSION_FUNCTIONS_H_
ABCResult simulate_dqn2abc(const MatrixXcd &Xdcpnz_c, double freq_hz, double t0, double t1, double Ts)
Simulates abc waveform reconstruction over a time interval.
Definition DQsym_Conversion_Functions.cpp:432
void convertToPhasor(const MatrixXcd &A, const MatrixXcd &B, const MatrixXcd &C, const MatrixXcd &D, MatrixXcd &Adc, MatrixXcd &Bdc, MatrixXcd &Cdc, MatrixXcd &Ddc)
Converts abc-stacked state-space matrices to phasor/sequence domain.
Definition DQsym_Conversion_Functions.cpp:240
MatrixXcd dq_subtract(const MatrixXcd &a, const MatrixXcd &b)
Element-wise subtraction of two dynamic-phasor coefficient matrices.
Definition DQsym_Conversion_Functions.cpp:43
MatrixXcd dq_multiply(const MatrixXcd &x_coef1_in, const MatrixXcd &y_coef1_in)
Multiplies two dynamic-phasor coefficient matrices (convolution in harmonic domain).
Definition DQsym_Conversion_Functions.cpp:71
std::vector< Vector3d > dqn2abc_groups_at_time(const MatrixXcd &Y, double theta)
Reconstructs abc values for all 3-row output groups at one angle.
Definition DQsym_Conversion_Functions.cpp:401
MatrixXcd dq_integrate(MatrixXcd &Zpnz_old, MatrixXcd &Xpnz_old, const MatrixXcd &Xpnz, double dt, double w)
Integrates a dynamic-phasor signal over one time step.
Definition DQsym_Conversion_Functions.cpp:186
MatrixXcd truncateHarmonics(const MatrixXcd &X, int nColsToKeep)
Truncates harmonic columns beyond nKeep in a coefficient matrix.
Definition DQsym_Conversion_Functions.cpp:284
Vector3d dqn2abc_at_time(const MatrixXcd &Xdcpnz_c, double theta)
Reconstructs abc phase values from a 3×H dqn block at one angle.
Definition DQsym_Conversion_Functions.cpp:311
MatrixXcd dq_add(const MatrixXcd &a, const MatrixXcd &b)
Element-wise addition of two dynamic-phasor coefficient matrices.
Definition DQsym_Conversion_Functions.cpp:19
Time-domain abc waveform reconstructed from dqn coefficients.
Definition DQsym_Conversion_Functions.h:19
MatrixXd Xabc
Definition DQsym_Conversion_Functions.h:21
std::vector< double > t
Definition DQsym_Conversion_Functions.h:20