54 template <
typename DerivedA,
typename DerivedB>
56 const Eigen::MatrixBase<DerivedB> &b) {
57 return (a.array() * b.array()).matrix();
73 Int maxFreq = 1,
Int freqIdx = 0,
74 Matrix::Index colOffset = 0);
77 Int maxFreq = 1,
Int freqIdx = 0);
80 Int maxFreq = 1,
Int freqIdx = 0);
94 Matrix::Index column,
Complex value,
95 Int maxFreq = 1,
Int freqIdx = 0);
98 Matrix::Index column,
Complex value,
99 Int maxFreq = 1,
Int freqIdx = 0);
102 Matrix::Index column,
Matrix value,
103 Int maxFreq = 1,
Int freqIdx = 0);
106 Matrix::Index column,
Complex value);
109 Matrix::Index column,
Real value);
112 std::vector<UInt> columns,
Complex value);
115 Matrix::Index column,
Real value);
117 std::vector<UInt> columns,
Real value);
193 const Matrix &statesPrevStep,
194 const Matrix &inputCurrStep,
195 const Matrix &inputPrevStep);
197 static void FFT(std::vector<Complex> &samples);
212 static std::pair<Real, Real>
ScopedZeroSkipping(const ScopedZeroSkipping &)=delete
ScopedZeroSkipping(Bool enabled)
ScopedZeroSkipping & operator=(const ScopedZeroSkipping &)=delete
static void clearSparseMatrixValueCache(SparseMatrixRow &mat)
static Complex polar(Real abs, Real phase)
static std::pair< Real, Real > pccPowerFromFilterPowerReference(Real pFilterRef, Real qFilterRef, Real rc, Real vGridRmsLL)
static Matrix singlePhasePowerToThreePhase(Real power)
To convert single phase power to symmetrical three phase.
static Complex polarDeg(Real abs, Real phase)
static Matrix StateSpaceEuler(Matrix states, Matrix A, Matrix B, Real dt, Matrix u)
static Matrix StateSpaceTrapezoidalNoCopy(const Matrix &states, const Matrix &A, const Matrix &B, Real dt, const Matrix &u_new, const Matrix &u_old)
static Complex complexFromVectorElement(const Matrix &mat, Matrix::Index row, Int maxFreq=1, Int freqIdx=0)
static Real degToRad(Real deg)
static Real realFromVectorElement(const Matrix &mat, Matrix::Index row)
static void calculateStateSpaceTrapezoidalMatrices(const Matrix &A, const Matrix &B, const Matrix &C, const Real &dt, Matrix &Ad, Matrix &Bd, Matrix &Cd)
Calculate the discretized state space matrices Ad, Bd, Cd using trapezoidal rule.
static void setVectorElement(Matrix &mat, Matrix::Index row, Complex value, Int maxFreq=1, Int freqIdx=0, Matrix::Index colOffset=0)
static Bool zeroSkippingEnabled()
static void addToVectorElement(Matrix &mat, Matrix::Index row, Complex value, Int maxFreq=1, Int freqIdx=0)
static Complex rotatingFrame2to1(Complex f2, Real theta1, Real theta2)
static auto elementwiseProduct(const Eigen::MatrixBase< DerivedA > &a, const Eigen::MatrixBase< DerivedB > &b)
Elementwise product of two same-shaped Eigen expressions.
static Matrix inverseParkTransformMatrixPowerInvariant(Real theta)
static Real phaseDeg(Complex value)
Real(* DeriveFnPtr)(Matrix inputs)
static Real phase(Complex value)
static void setMatrixElement(SparseMatrixRow &mat, Matrix::Index row, Matrix::Index column, Complex value, Int maxFreq=1, Int freqIdx=0)
static Matrix parkTransformPowerInvariant(Real theta, const Matrix &fabc)
static Matrix applyStateSpaceTrapezoidalMatrices(const Matrix &Ad, const Matrix &Bd, const Matrix &Cd, const Matrix &statesPrevStep, const Matrix &inputCurrStep, const Matrix &inputPrevStep)
Apply the trapezoidal based state space matrices Ad, Bd, Cd to get the states at the current time ste...
static Matrix StateSpaceEulerNoCopy(const Matrix &states, const Matrix &A, const Matrix &B, Real dt, const Matrix &u)
static void prepareSparseMatrixValueCache(SparseMatrixRow &mat)
static Matrix singlePhaseParameterToThreePhase(Real parameter)
To convert single phase parameters to symmetrical three phase ones.
static bool isFinite(Real value)
static Real abs(Complex value)
static void addToMatrixElement(SparseMatrixRow &mat, Matrix::Index row, Matrix::Index column, Complex value, Int maxFreq=1, Int freqIdx=0)
static void invertMatrix(const Matrix &mat, Matrix &matInv)
static Matrix inverseParkTransformPowerInvariant(Real theta, const Matrix &fdq)
static Matrix parkTransformMatrixPowerInvariant(Real theta)
static void FFT(std::vector< Complex > &samples)
static Real radtoDeg(Real rad)
static MatrixComp singlePhaseVariableToThreePhase(Complex var_1ph)
To convert single phase complex variables (voltages, currents) to symmetrical three phase ones.
static Matrix StateSpaceTrapezoidal(Matrix states, Matrix A, Matrix B, Real dt, Matrix u_new, Matrix u_old)
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
Eigen::SparseMatrix< Complex, Eigen::RowMajor > SparseMatrixCompRow
Sparse matrix for complex numbers (row major).
std::complex< Real > Complex
Eigen::Matrix< Complex, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > MatrixComp
Dense matrix for complex numbers.
Eigen::SparseMatrix< Real, Eigen::RowMajor > SparseMatrixRow
Sparse matrix for real numbers (row major).