Skip to content

Commit

Permalink
sqrt(3/2) added + logs improved
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasmees authored and gnakti committed Jun 29, 2023
1 parent 4329479 commit 51cc013
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 115 deletions.
2 changes: 1 addition & 1 deletion dpsim-models/src/EMT/EMT_Ph3_VSIVoltageControlDQ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void EMT::Ph3::VSIVoltageControlDQ::setParameters(Real sysOmega, Real VdRef, Rea
mVoltageControllerVSI->setParameters(VdRef, VqRef);

**mOmegaN = sysOmega;
**mVdRef = VdRef;
**mVdRef = VdRef * sqrt(3/2);
**mVqRef = VqRef;
}

Expand Down
4 changes: 2 additions & 2 deletions dpsim-models/src/EMT/EMT_Ph3_VSIVoltageControlVCO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void EMT::Ph3::VSIVoltageControlVCO::setParameters(Real sysOmega, Real VdRef, Re
mVoltageControllerVSI->setParameters(VdRef, VqRef);

**mOmegaN = sysOmega;
**mVdRef = VdRef;
**mVdRef = VdRef * sqrt(3/2);
**mVqRef = VqRef;
}

Expand Down Expand Up @@ -419,7 +419,7 @@ void EMT::Ph3::VSIVoltageControlVCO::mnaUpdateCurrent(const Matrix& leftvector)
if (mWithConnectionTransformer)
**mIntfCurrent = mConnectionTransformer->mIntfCurrent->get();
else
**mIntfCurrent = mSubResistorF->mIntfCurrent->get();
**mIntfCurrent = mSubResistorC->mIntfCurrent->get();
}

//Voltage update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ int main(int argc, char* argv[]) {
auto loggerEMT = DataLogger::make(simNameEMT);
loggerEMT->logAttribute("Spannung_PCC", n1EMT->attribute("v"));
loggerEMT->logAttribute("Spannung_Node_2", n2EMT->attribute("v"));
loggerEMT->logAttribute("Spannung_Node_3", n3EMT->attribute("v"));
loggerEMT->logAttribute("Spannung_Quelle", pv->attribute("Vs"));
loggerEMT->logAttribute("Strom_RLC", pv->attribute("i_intf"));
//loggerEMT->logAttribute("PLL_Phase", pv->attribute("pll_output"));
Expand Down
2 changes: 1 addition & 1 deletion dpsim/examples/cxx/Examples.h
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ namespace SGIB {
Real gamma_qInit = 0;

// VSI generated values
Real Vdref = 400 * sqrt(3./2.); //work with Amplitude (*sqrt(3/2))
Real Vdref = 400; //work with Amplitude (*sqrt(3/2))
Real Vqref = 0;
Real systemFrequency = 60;
Real OmegaNull = 2*M_PI*60; //System circular frequency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,32 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[16:28:03.923135 PiLine warning] Zero value for Capacitance, setting default value of C=1e-12 [F]\n",
"[16:28:03.923176 PiLine warning] Zero value for Conductance, setting default value of G=1e-06 [S]\n",
"[16:28:03.929365 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Initialize simulation: EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF\n",
"[16:28:03.931476 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF_PF_Solver warning] No suitable quantity found for setting mBaseApparentPower. Using 100000000 VA.\n",
"[16:28:03.937603 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Scheduling tasks.\n",
"[16:28:03.939845 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Scheduling done.\n",
"[16:28:03.939859 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Opening interfaces.\n",
"[16:28:03.939860 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Start synchronization with remotes on interfaces\n",
"[16:28:03.939861 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Synchronized simulation start with remotes\n",
"[16:28:03.939865 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Start simulation: EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF\n",
"[16:28:03.939877 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Time step: 5.000000e-01\n",
"[16:28:03.939879 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Final time: 1.000000e+00\n",
"[16:28:03.941293 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Simulation calculation time: 0.001410\n",
"[16:28:03.941702 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Simulation finished.\n",
"[16:28:03.993484 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Initialize simulation: EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT\n",
"[16:28:03.994703 MnaSolverFactory info] creating EigenDense solver implementation\n",
"[16:28:04.009919 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Scheduling tasks.\n",
"[16:28:04.011308 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Scheduling done.\n",
"[16:28:04.011318 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Opening interfaces.\n",
"[16:28:04.011319 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Start synchronization with remotes on interfaces\n",
"[16:28:04.011320 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Synchronized simulation start with remotes\n",
"[16:28:04.011321 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Start simulation: EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT\n",
"[16:28:04.011324 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Time step: 1.000000e-04\n",
"[16:28:04.011326 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Final time: 5.001000e-01\n",
"[16:28:05.454351 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Simulation calculation time: 1.443021\n",
"[16:28:05.457651 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Simulation finished.\n",
"[08:52:12.882817 PiLine warning] Zero value for Capacitance, setting default value of C=1e-12 [F]\n",
"[08:52:12.882846 PiLine warning] Zero value for Conductance, setting default value of G=1e-06 [S]\n",
"[08:52:12.886782 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Initialize simulation: EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF\n",
"[08:52:12.887985 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF_PF_Solver warning] No suitable quantity found for setting mBaseApparentPower. Using 100000000 VA.\n",
"[08:52:12.890268 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Scheduling tasks.\n",
"[08:52:12.891317 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Scheduling done.\n",
"[08:52:12.891325 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Opening interfaces.\n",
"[08:52:12.891326 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Start synchronization with remotes on interfaces\n",
"[08:52:12.891327 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Synchronized simulation start with remotes\n",
"[08:52:12.891329 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Start simulation: EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF\n",
"[08:52:12.891333 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Time step: 5.000000e-01\n",
"[08:52:12.891337 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Final time: 1.000000e+00\n",
"[08:52:12.892394 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Simulation calculation time: 0.001054\n",
"[08:52:12.892696 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_PF info] Simulation finished.\n",
"[08:52:12.918538 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Initialize simulation: EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT\n",
"[08:52:12.919560 MnaSolverFactory info] creating EigenDense solver implementation\n",
"[08:52:12.931214 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Scheduling tasks.\n",
"[08:52:12.932410 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Scheduling done.\n",
"[08:52:12.932417 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Opening interfaces.\n",
"[08:52:12.932418 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Start synchronization with remotes on interfaces\n",
"[08:52:12.932419 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Synchronized simulation start with remotes\n",
"[08:52:12.932421 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Start simulation: EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT\n",
"[08:52:12.932423 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Time step: 1.000000e-04\n",
"[08:52:12.932424 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Final time: 5.001000e-01\n",
"[08:52:14.486141 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Simulation calculation time: 1.553710\n",
"[08:52:14.486759 EMT_Slack_PiLine_VSI_VoltageControlled_SteadyState_with_PF_Init_EMT info] Simulation finished.\n",
"\n"
]
}
Expand Down Expand Up @@ -123,7 +123,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "cfc862d451a9410cb384e4b1a1ba5a79",
"model_id": "31f17bb3ccc74eaa82528af2f4b4eb6d",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -169,7 +169,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "24683c8ae5ff46a7851daa57ee3811a3",
"model_id": "a5f6995b7be547459820f4621d684b74",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -217,7 +217,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "78d0dc678894486fa45210771acee4db",
"model_id": "5b1a08fb853045c2bc0ca98e00ed7275",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -262,7 +262,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "56c6076b1f5a4a729a7c0a1e00d5c0ee",
"model_id": "480fb96cb9e8490e972d118dc8c22ec9",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -307,7 +307,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d03983116153418580690083c8fa2db1",
"model_id": "fa882b3a561949ba89b4f32bd75bb862",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -359,7 +359,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9dbaccb08f9a4288a9b3391fddf09aed",
"model_id": "112f3abc674a4d5cb869794d1d3620b4",
"version_major": 2,
"version_minor": 0
},
Expand Down

Large diffs are not rendered by default.

0 comments on commit 51cc013

Please sign in to comment.