9 #include <dpsim-models/DP/DP_Ph1_DPDQInterface.h>
18 const Real &simTime) {
19 mDQToDPTransform << cos(thetaDQ - mOmegaShift * simTime),
20 -sin(thetaDQ - mOmegaShift * simTime),
21 sin(thetaDQ - mOmegaShift * simTime),
22 cos(thetaDQ - mOmegaShift * simTime);
26 const Real &simTime) {
27 mDPToDQTransform << cos(thetaDQ - mOmegaShift * simTime),
28 sin(thetaDQ - mOmegaShift * simTime),
29 -sin(thetaDQ - mOmegaShift * simTime),
30 cos(thetaDQ - mOmegaShift * simTime);
34 const MatrixFixedSize<2, 1> &dqMatrix) {
36 dpComplex = Complex((mDQToDPTransform * dqMatrix)(0, 0),
37 (mDQToDPTransform * dqMatrix)(1, 0));
43 MatrixFixedSize<2, 1> dqMatrix;
44 dqMatrix(0, 0) = mDPToDQTransform(0, 0) * dpComplex.real() +
45 mDPToDQTransform(0, 1) * dpComplex.imag();
46 dqMatrix(1, 0) = mDPToDQTransform(1, 0) * dpComplex.real() +
47 mDPToDQTransform(1, 1) * dpComplex.imag();
void updateDQToDPTransform(const Real &thetaDQ, const Real &simTime)
Update transformation matrix from DQ to DP.
void updateDPToDQTransform(const Real &thetaDQ, const Real &simTime)
Update transformation matrix from DP to DQ.
Complex applyDQToDPTransform(const MatrixFixedSize< 2, 1 > &dqMatrix)
Apply transform to obtain current complex DP.
MatrixFixedSize< 2, 1 > applyDPToDQTransform(const Complex &dpComplex)
Apply transform to obtain current DQ vector.
Real mOmegaShift
Shifting frequency of the DP domain (assumed to be constant)
void setDPShiftFrequency(const Real &omegaShift)
Setter for shit frequency.