Commit 2100aa4c authored by Jan Dinkelbach's avatar Jan Dinkelbach
Browse files

Fix update of averaged inverter interface voltage for dp1ph

parent 61374501
......@@ -146,8 +146,10 @@ namespace Ph1 {
void mnaApplySystemMatrixStamp(Matrix& systemMatrix);
/// Stamps right side (source) vector
void mnaApplyRightSideVectorStamp(Matrix& rightVector);
/// Returns current through the component
/// Updates current through the component
void mnaUpdateCurrent(const Matrix& leftVector);
/// Updates voltage across component
void mnaUpdateVoltage(const Matrix& leftVector);
/// MNA pre and post step operations
void mnaPreStep(Real time, Int timeStepCount);
void mnaPostStep(Real time, Int timeStepCount, Attribute<Matrix>::Ptr &leftVector);
......@@ -470,8 +470,7 @@ void DP::Ph1::AvVoltageSourceInverterDQ::mnaPostStep(Real time, Int timeStepCoun
this->mSubResistorC->mnaPostStep(time, timeStepCount, leftVector);
// post-step of component itself
this->updateInputStateSpaceModel(*leftVector, time);
this->step(time, timeStepCount);
void DP::Ph1::AvVoltageSourceInverterDQ::CtrlStep::execute(Real time, Int timeStepCount){
......@@ -485,3 +484,10 @@ void DP::Ph1::AvVoltageSourceInverterDQ::mnaUpdateCurrent(const Matrix& leftvect
mIntfCurrent = mSubResistorC->attribute<MatrixComp>("i_intf")->get();
void DP::Ph1::AvVoltageSourceInverterDQ::mnaUpdateVoltage(const Matrix& leftVector) {
mIntfVoltage(0, 0) = 0;
if (terminalNotGrounded(1))
mIntfVoltage(0,0) = Math::complexFromVectorElement(leftVector, matrixNodeIndex(1));
if (terminalNotGrounded(0))
mIntfVoltage(0,0) = mIntfVoltage(0,0) - Math::complexFromVectorElement(leftVector, matrixNodeIndex(0));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment