Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Power System Simulation and Optimization
DPsim
DPsim
Commits
2100aa4c
Commit
2100aa4c
authored
Sep 13, 2020
by
Jan Dinkelbach
Browse files
Fix update of averaged inverter interface voltage for dp1ph
parent
61374501
Changes
2
Hide whitespace changes
Inline
Side-by-side
models/Include/cps/DP/DP_Ph1_AvVoltageSourceInverterDQ.h
View file @
2100aa4c
...
...
@@ -146,8 +146,10 @@ namespace Ph1 {
void
mnaApplySystemMatrixStamp
(
Matrix
&
systemMatrix
);
/// Stamps right side (source) vector
void
mnaApplyRightSideVectorStamp
(
Matrix
&
rightVector
);
///
Return
s current through the component
///
Update
s 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
);
...
...
models/Source/DP/DP_Ph1_AvVoltageSourceInverterDQ.cpp
View file @
2100aa4c
...
...
@@ -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
->
mnaUpdateCurrent
(
*
leftVector
);
this
->
updateInputStateSpaceModel
(
*
leftVector
,
time
);
this
->
step
(
time
,
timeStepCount
);
this
->
mnaUpdateVoltage
(
*
leftVector
);
}
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
));
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment