Skip to content

Commit

Permalink
fix bug in IEEEG1 in case T1 or T2 is not 0
Browse files Browse the repository at this point in the history
  • Loading branch information
changgang committed Sep 13, 2020
1 parent c6bceeb commit 28077e0
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
12 changes: 6 additions & 6 deletions code/steps/STEPS.depend
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,7 @@
"header/power_system_database.h"
"header/STEPS.h"

1583938871 d:\steps\code\steps\header\model\sg_models\stabilizer_model\psasps4.h
1599810669 d:\steps\code\steps\header\model\sg_models\stabilizer_model\psasps4.h
"header/model/sg_models/stabilizer_model/stabilizer_model.h"
"header/block/first_order_block.h"
"header/block/differential_block.h"
Expand Down Expand Up @@ -2415,7 +2415,7 @@
"header/data_imexporter/bpa_imexporter.h"
<iostream>

1599635294 source:d:\steps\code\steps\source\apis\steps_api_set_dynamic_models.cpp
1599635432 source:d:\steps\code\steps\source\apis\steps_api_set_dynamic_models.cpp
"header/apis/steps_api.h"
"header/apis/steps_api_common.h"
"header/basic/utility.h"
Expand Down Expand Up @@ -4552,7 +4552,7 @@
"header/power_system_database.h"
"header/STEPS.h"

1599356811 source:d:\steps\code\steps\source\model\sg_models\exciter_model\cseet1.cpp
1599964137 source:d:\steps\code\steps\source\model\sg_models\exciter_model\cseet1.cpp
"header/model/sg_models/exciter_model/CSEET1.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand All @@ -4566,7 +4566,7 @@
"header/basic/utility.h"
"header/steps_namespace.h"

1599362384 source:d:\steps\code\steps\source\model\sg_models\exciter_model\cseet2.cpp
1599964502 source:d:\steps\code\steps\source\model\sg_models\exciter_model\cseet2.cpp
"header/model/sg_models/exciter_model/CSEET2.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand Down Expand Up @@ -4768,7 +4768,7 @@
"header/basic/utility.h"
"header/steps_namespace.h"

1599356520 source:d:\steps\code\steps\source\model\sg_models\stabilizer_model\psasps4.cpp
1599812186 source:d:\steps\code\steps\source\model\sg_models\stabilizer_model\psasps4.cpp
"header/model/sg_models/stabilizer_model/PSASPS4.h"
"header/basic/constants.h"
"header/STEPS.h"
Expand Down Expand Up @@ -4919,7 +4919,7 @@
<istream>
<iostream>

1598590744 source:d:\steps\code\steps\source\model\sg_models\turbine_governors\ieeeg1.cpp
1599989854 source:d:\steps\code\steps\source\model\sg_models\turbine_governors\ieeeg1.cpp
"header/model/sg_models/turbine_governor_model/IEEEG1.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand Down
6 changes: 4 additions & 2 deletions code/steps/header/model/sg_models/stabilizer_model/PSASPS4.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ class PSASPS4 : public STABILIZER_MODEL
void copy_from_const_model(const PSASPS4& model);

FIRST_ORDER_BLOCK speed_sensor, pelec_sensor;
DIFFERENTIAL_BLOCK speed_dedc_block_1, speed_dedc_block_2, pelec_dedc_block_1, pelec_dedc_block_2;
//FIRST_ORDER_BLOCK pelec_dedc_block_1;
DIFFERENTIAL_BLOCK speed_dedc_block_1, speed_dedc_block_2;
//DIFFERENTIAL_BLOCK pelec_dedc_block_1;
FIRST_ORDER_BLOCK pelec_dedc_block_1;
DIFFERENTIAL_BLOCK pelec_dedc_block_2;
double Ks;
LEAD_LAG_BLOCK notch_filter_phase_tuner;
FIRST_ORDER_BLOCK notch_filter_first_order_block_1, notch_filter_first_order_block_2, notch_filter_first_order_block_3, notch_filter_first_order_block_4;
Expand Down
2 changes: 1 addition & 1 deletion code/steps/source/model/sg_models/exciter_model/CSEET1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1310,10 +1310,10 @@ string CSEET1::get_standard_psse_string() const

if(get_tuner_type()==SERIAL_TUNER)
{
tuner_K = get_serial_tuner_K();
tuner_KV = get_serial_tuner_KV();
tuner_selector = 0;
if(tuner_KV) tuner_selector = 1;
tuner_K = get_serial_tuner_K();
tuner_T1 = get_serial_tuner_T1_in_s();
tuner_T2 = get_serial_tuner_T2_in_s();
tuner_VA1max = get_serial_tuner_VA1max_in_pu();
Expand Down
2 changes: 1 addition & 1 deletion code/steps/source/model/sg_models/exciter_model/CSEET2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -915,10 +915,10 @@ string CSEET2::get_standard_psse_string() const

if(get_tuner_type()==SERIAL_TUNER)
{
double K = get_serial_tuner_K();
bool KV = get_serial_tuner_KV();
unsigned int selector = 0;
if(KV) selector = 1;
double K = get_serial_tuner_K();
double T1 = get_serial_tuner_T1_in_s();
double T2 = get_serial_tuner_T2_in_s();
double VA1max = get_serial_tuner_VA1max_in_pu();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ using namespace std;

/***
It should be noted that, the first De-DC block of Pelec is a FIRST_ORDER_BLOCK in manual of PSASP V7.3, July 2017.
However, it is modeled as a DIFFERENTIAL_BLOCK in STEPS.
Further check is necessary.
It was modeled as a DIFFERENTIAL_BLOCK in STEPS before, and is now modeled as FIRST_ORDER_BLOCK.
***/
PSASPS4::PSASPS4(STEPS& toolkit) : STABILIZER_MODEL(toolkit),
speed_sensor(toolkit),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ void IEEEG1::set_K(double K)

void IEEEG1::set_T1_in_s(double T)
{
droop.set_T1_in_s(T);
droop.set_T2_in_s(T);
}

void IEEEG1::set_T2_in_s(double T)
{
droop.set_T2_in_s(T);
droop.set_T1_in_s(T);
}

void IEEEG1::set_T3_in_s(double T)
Expand Down Expand Up @@ -207,12 +207,12 @@ double IEEEG1::get_K() const

double IEEEG1::get_T1_in_s() const
{
return droop.get_T1_in_s();
return droop.get_T2_in_s();
}

double IEEEG1::get_T2_in_s() const
{
return droop.get_T2_in_s();
return droop.get_T1_in_s();
}

double IEEEG1::get_T3_in_s() const
Expand Down

0 comments on commit 28077e0

Please sign in to comment.