diff --git a/code/steps/STEPS.cbp b/code/steps/STEPS.cbp
index a9f8a423..76a1990b 100644
--- a/code/steps/STEPS.cbp
+++ b/code/steps/STEPS.cbp
@@ -260,6 +260,11 @@
+
+
+
+
+
@@ -311,6 +316,7 @@
+
@@ -356,6 +362,7 @@
+
@@ -408,9 +415,9 @@
-
-
-
+
+
+
@@ -695,6 +702,8 @@
+
+
@@ -843,8 +852,8 @@
-
-
+
+
diff --git a/code/steps/STEPS.depend b/code/steps/STEPS.depend
index 225e3701..87c5676d 100644
--- a/code/steps/STEPS.depend
+++ b/code/steps/STEPS.depend
@@ -188,7 +188,7 @@
"header/basic/constants.h"
"header/meter/meter.h"
-1709443457 d:\steps\code\steps\header\device\wt_generator.h
+1709511959 d:\steps\code\steps\header\device\wt_generator.h
"header/device/source.h"
@@ -198,7 +198,7 @@
"header/model/wtg_models/wt_turbine_model/wt_turbine_model.h"
"header/model/wtg_models/wt_pitch_model/wt_pitch_model.h"
"header/model/wtg_models/wind_speed_model/wind_speed_model.h"
- "header/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_model.h"
+ "header/model/wtg_models/wt_vrt_model/wt_vrt_model.h"
"header/model/wtg_models/wt_relay_model/wt_relay_model.h"
1709445308 d:\steps\code\steps\header\model\wtg_models\wt_generator_model\wt_generator_model.h
@@ -236,7 +236,7 @@
1634637238 d:\steps\code\steps\header\model\wtg_models\wt_relay_model\wt_relay_model.h
"header/model/wtg_models/wtg_model.h"
-1697457172 d:\steps\code\steps\header\device\pv_unit.h
+1709519047 d:\steps\code\steps\header\device\pv_unit.h
"header/device/source.h"
@@ -244,6 +244,8 @@
"header/model/pvu_models/pv_panel_model/pv_panel_model.h"
"header/model/pvu_models/pv_electrical_model/pv_electrical_model.h"
"header/model/pvu_models/pv_irradiance_model/pv_irradiance_model.h"
+ "header/model/pvu_models/pv_vrt_model/pv_vrt_model.h"
+ "header/model/pvu_models/pv_relay_model/pv_relay_model.h"
1634637238 d:\steps\code\steps\header\model\pvu_models\pv_converter_model\pv_converter_model.h
"header/model/pvu_models/pvu_model.h"
@@ -2151,27 +2153,15 @@
"header/data_imexporter/psse_imexporter.h"
"header/model/all_supported_models.h"
-1708527175 d:\steps\code\steps\header\model\all_supported_models.h
- "header/model/sg_models/sync_generator_model/sync_generator_models.h"
- "header/model/sg_models/compensator_model/compensator_models.h"
- "header/model/sg_models/exciter_model/exciter_models.h"
- "header/model/sg_models/stabilizer_model/stabilizer_models.h"
- "header/model/sg_models/turbine_governor_model/turbine_governor_models.h"
- "header/model/sg_models/turbine_load_controller_model/turbine_load_controller_models.h"
+1709519722 d:\steps\code\steps\header\model\all_supported_models.h
+ "header/model/sg_models/supported_sg_models.h"
"header/model/load_model/load_models.h"
"header/model/load_relay_model/load_voltage_relay_models.h"
"header/model/load_relay_model/load_frequency_relay_models.h"
"header/model/hvdc_model/hvdc_models.h"
"header/model/vsc_hvdc_model/vsc_hvdc_network_model/vsc_hvdc_network_models.h"
"header/model/vsc_hvdc_model/vsc_hvdc_converter_model/vsc_hvdc_converter_models.h"
- "header/model/wtg_models/wt_generator_model/wt_generator_models.h"
- "header/model/wtg_models/wt_aerodynamic_model/wt_aerodynamic_models.h"
- "header/model/wtg_models/wt_electrical_model/wt_electrical_models.h"
- "header/model/wtg_models/wt_turbine_model/wt_turbine_models.h"
- "header/model/wtg_models/wt_pitch_model/wt_pitch_models.h"
- "header/model/wtg_models/wind_speed_model/wind_speed_models.h"
- "header/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_models.h"
- "header/model/wtg_models/wt_relay_model/wt_relay_models.h"
+ "header/model/wtg_models/supported_wtg_models.h"
"header/model/pvu_models/pv_converter_model/pv_converter_models.h"
"header/model/pvu_models/pv_panel_model/pv_panel_models.h"
"header/model/pvu_models/pv_electrical_model/pv_electrical_models.h"
@@ -3753,14 +3743,10 @@
-1697457172 source:d:\steps\code\steps\source\device\pv_unit.cpp
+1709519251 source:d:\steps\code\steps\source\device\pv_unit.cpp
"header/device/pv_unit.h"
"header/basic/utility.h"
"header/steps_namespace.h"
- "header/model/pvu_models/pv_converter_model/pv_converter_models.h"
- "header/model/pvu_models/pv_panel_model/pv_panel_models.h"
- "header/model/pvu_models/pv_electrical_model/pv_electrical_models.h"
- "header/model/pvu_models/pv_irradiance_model/pv_irradiance_models.h"
@@ -3889,18 +3875,11 @@
"header/power_system_database.h"
"header/STEPS.h"
-1709443461 source:d:\steps\code\steps\source\device\wt_generator.cpp
+1709519283 source:d:\steps\code\steps\source\device\wt_generator.cpp
"header/device/wt_generator.h"
"header/basic/utility.h"
"header/steps_namespace.h"
"header/STEPS.h"
- "header/model/wtg_models/wt_generator_model/wt_generator_models.h"
- "header/model/wtg_models/wt_aerodynamic_model/wt_aerodynamic_models.h"
- "header/model/wtg_models/wt_electrical_model/wt_electrical_models.h"
- "header/model/wtg_models/wt_turbine_model/wt_turbine_models.h"
- "header/model/wtg_models/wt_pitch_model/wt_pitch_models.h"
- "header/model/wtg_models/wind_speed_model/wind_speed_models.h"
- "header/model/wtg_models/wt_relay_model/wt_relay_models.h"
@@ -5298,7 +5277,7 @@
"header/model/wtg_models/wt_generator_model/wt3g2.h"
"header/STEPS.h"
-1709445620 source:d:\steps\code\steps\source\model\wtg_models\wt_generator_model\wt_generator_model.cpp
+1709511959 source:d:\steps\code\steps\source\model\wtg_models\wt_generator_model\wt_generator_model.cpp
"header/model/wtg_models/wt_generator_model/wt_generator_model.h"
"header/basic/utility.h"
"header/basic/constants.h"
@@ -57080,3 +57059,69 @@
"header/steps_namespace.h"
+1709512813 source:d:\steps\code\steps\source\model\pvu_models\pv_relay_model\pv_relay_model.cpp
+ "header/model/pvu_models/pv_relay_model/pv_relay_model.h"
+ "header/basic/utility.h"
+ "header/STEPS.h"
+
+
+1709512796 d:\steps\code\steps\header\model\pvu_models\pv_relay_model\pv_relay_model.h
+ "header/model/pvu_models/pvu_model.h"
+
+1709511959 d:\steps\code\steps\header\model\wtg_models\wt_vrt_model\wt_vrt_model.h
+ "header/model/wtg_models/wtg_model.h"
+
+
+1709511959 d:\steps\code\steps\header\model\wtg_models\wt_vrt_model\wt_vrt_models.h
+ "header/model/wtg_models/wt_vrt_model/wtvrt3.h"
+
+1709511959 d:\steps\code\steps\header\model\wtg_models\wt_vrt_model\wtvrt3.h
+ "header/model/wtg_models/wt_vrt_model/wt_vrt_model.h"
+ "header/model/converter_common_models/vrt_model/lvrt_control.h"
+ "header/model/converter_common_models/vrt_model/hvrt_control.h"
+
+1709512773 source:d:\steps\code\steps\source\model\pvu_models\pv_vrt_model\pv_vrt_model.cpp
+ "header/model/pvu_models/pv_vrt_model/pv_vrt_model.h"
+ "header/basic/utility.h"
+ "header/device/pv_unit.h"
+ "header/power_system_database.h"
+ "header/STEPS.h"
+
+1709512769 d:\steps\code\steps\header\model\pvu_models\pv_vrt_model\pv_vrt_model.h
+ "header/model/pvu_models/pvu_model.h"
+
+
+1709511959 source:d:\steps\code\steps\source\model\wtg_models\wt_vrt_model\wt_vrt_model.cpp
+ "header/model/wtg_models/wt_vrt_model/wt_vrt_model.h"
+ "header/basic/utility.h"
+ "header/device/wt_generator.h"
+ "header/power_system_database.h"
+ "header/STEPS.h"
+
+1709511959 source:d:\steps\code\steps\source\model\wtg_models\wt_vrt_model\wtvrt3.cpp
+ "header/model/wtg_models/wt_vrt_model/wtvrt3.h"
+ "header/device/wt_generator.h"
+ "header/power_system_database.h"
+ "header/STEPS.h"
+ "header/basic/utility.h"
+ "header/steps_namespace.h"
+
+
+1709519594 d:\steps\code\steps\header\model\wtg_models\supported_wtg_models.h
+ "header/model/wtg_models/wt_generator_model/wt_generator_models.h"
+ "header/model/wtg_models/wt_aerodynamic_model/wt_aerodynamic_models.h"
+ "header/model/wtg_models/wt_electrical_model/wt_electrical_models.h"
+ "header/model/wtg_models/wt_turbine_model/wt_turbine_models.h"
+ "header/model/wtg_models/wt_pitch_model/wt_pitch_models.h"
+ "header/model/wtg_models/wind_speed_model/wind_speed_models.h"
+ "header/model/wtg_models/wt_vrt_model/wt_vrt_models.h"
+ "header/model/wtg_models/wt_relay_model/wt_relay_models.h"
+
+1709519699 d:\steps\code\steps\header\model\sg_models\supported_sg_models.h
+ "header/model/sg_models/sync_generator_model/sync_generator_models.h"
+ "header/model/sg_models/compensator_model/compensator_models.h"
+ "header/model/sg_models/exciter_model/exciter_models.h"
+ "header/model/sg_models/stabilizer_model/stabilizer_models.h"
+ "header/model/sg_models/turbine_governor_model/turbine_governor_models.h"
+ "header/model/sg_models/turbine_load_controller_model/turbine_load_controller_models.h"
+
diff --git a/code/steps/header/device/pv_unit.h b/code/steps/header/device/pv_unit.h
index c208ecb8..874b38fe 100644
--- a/code/steps/header/device/pv_unit.h
+++ b/code/steps/header/device/pv_unit.h
@@ -8,6 +8,8 @@
#include "header/model/pvu_models/pv_panel_model/pv_panel_model.h"
#include "header/model/pvu_models/pv_electrical_model/pv_electrical_model.h"
#include "header/model/pvu_models/pv_irradiance_model/pv_irradiance_model.h"
+#include "header/model/pvu_models/pv_vrt_model/pv_vrt_model.h"
+#include "header/model/pvu_models/pv_relay_model/pv_relay_model.h"
using namespace std;
@@ -36,11 +38,15 @@ class PV_UNIT : public SOURCE
void set_pv_panel_model(PV_PANEL_MODEL* model);
void set_pv_electrical_model(PV_ELECTRICAL_MODEL* model);
void set_pv_irradiance_model(PV_IRRADIANCE_MODEL* model);
+ void set_pv_vrt_model(PV_VRT_MODEL* model);
+ void set_pv_relay_model(PV_RELAY_MODEL* model);
PV_CONVERTER_MODEL* get_pv_converter_model() const;
PV_PANEL_MODEL* get_pv_panel_model() const;
PV_ELECTRICAL_MODEL* get_pv_electrical_model() const;
PV_IRRADIANCE_MODEL* get_pv_irradiance_model() const;
+ PV_VRT_MODEL* get_pv_vrt_model() const;
+ PV_RELAY_MODEL* get_pv_relay_model() const;
virtual void run(DYNAMIC_MODE mode);
virtual void report() const;
@@ -86,6 +92,8 @@ class PV_UNIT : public SOURCE
PV_PANEL_MODEL* pv_panel_model;
PV_ELECTRICAL_MODEL* pv_electrical_model;
PV_IRRADIANCE_MODEL* pv_irradiance_model;
+ PV_VRT_MODEL* pv_vrt_model;
+ PV_RELAY_MODEL* pv_relay_model;
double R1, X1, R2, X2, R0, X0, Rground, Xground;
bool sequence_parameter_import_flag;
diff --git a/code/steps/header/device/wt_generator.h b/code/steps/header/device/wt_generator.h
index d2a01d9b..a8a4ca1a 100644
--- a/code/steps/header/device/wt_generator.h
+++ b/code/steps/header/device/wt_generator.h
@@ -10,7 +10,7 @@
#include "header/model/wtg_models/wt_turbine_model/wt_turbine_model.h"
#include "header/model/wtg_models/wt_pitch_model/wt_pitch_model.h"
#include "header/model/wtg_models/wind_speed_model/wind_speed_model.h"
-#include "header/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_model.h"
+#include "header/model/wtg_models/wt_vrt_model/wt_vrt_model.h"
#include "header/model/wtg_models/wt_relay_model/wt_relay_model.h"
using namespace std;
@@ -42,7 +42,7 @@ class WT_GENERATOR : public SOURCE
void set_wt_electrical_model(WT_ELECTRICAL_MODEL* model);
void set_wt_pitch_model(WT_PITCH_MODEL* model);
void set_wind_speed_model(WIND_SPEED_MODEL* model);
- void set_wt_voltage_ride_through_model(WT_VOLTAGE_RIDE_THROUGH_MODEL* model);
+ void set_wt_vrt_model(WT_VRT_MODEL* model);
void set_wt_relay_model(WT_RELAY_MODEL* model);
WT_GENERATOR_MODEL* get_wt_generator_model() const;
@@ -51,7 +51,7 @@ class WT_GENERATOR : public SOURCE
WT_ELECTRICAL_MODEL* get_wt_electrical_model() const;
WT_PITCH_MODEL* get_wt_pitch_model() const;
WIND_SPEED_MODEL* get_wind_speed_model() const;
- WT_VOLTAGE_RIDE_THROUGH_MODEL* get_wt_voltage_ride_through_model() const;
+ WT_VRT_MODEL* get_wt_vrt_model() const;
WT_RELAY_MODEL* get_wt_relay_model() const;
virtual void run(DYNAMIC_MODE mode);
@@ -146,7 +146,7 @@ class WT_GENERATOR : public SOURCE
WT_TURBINE_MODEL* wt_turbine_model;
WT_PITCH_MODEL* wt_pitch_model;
WIND_SPEED_MODEL* wind_speed_model;
- WT_VOLTAGE_RIDE_THROUGH_MODEL* wt_vrt_model;
+ WT_VRT_MODEL* wt_vrt_model;
WT_RELAY_MODEL* wt_relay_model;
double R1, X1_sync, X1_transient, X1_subtransient;
diff --git a/code/steps/header/model/all_supported_models.h b/code/steps/header/model/all_supported_models.h
index 09c72be7..393e8363 100644
--- a/code/steps/header/model/all_supported_models.h
+++ b/code/steps/header/model/all_supported_models.h
@@ -2,12 +2,7 @@
#define ALL_SUPPORTED_MODELS_H
-#include "header/model/sg_models/sync_generator_model/sync_generator_models.h"
-#include "header/model/sg_models/compensator_model/compensator_models.h"
-#include "header/model/sg_models/exciter_model/exciter_models.h"
-#include "header/model/sg_models/stabilizer_model/stabilizer_models.h"
-#include "header/model/sg_models/turbine_governor_model/turbine_governor_models.h"
-#include "header/model/sg_models/turbine_load_controller_model/turbine_load_controller_models.h"
+#include "header/model/sg_models/supported_sg_models.h"
#include "header/model/load_model/load_models.h"
#include "header/model/load_relay_model/load_voltage_relay_models.h"
@@ -18,14 +13,7 @@
#include "header/model/vsc_hvdc_model/vsc_hvdc_network_model/vsc_hvdc_network_models.h"
#include "header/model/vsc_hvdc_model/vsc_hvdc_converter_model/vsc_hvdc_converter_models.h"
-#include "header/model/wtg_models/wt_generator_model/wt_generator_models.h"
-#include "header/model/wtg_models/wt_aerodynamic_model/wt_aerodynamic_models.h"
-#include "header/model/wtg_models/wt_electrical_model/wt_electrical_models.h"
-#include "header/model/wtg_models/wt_turbine_model/wt_turbine_models.h"
-#include "header/model/wtg_models/wt_pitch_model/wt_pitch_models.h"
-#include "header/model/wtg_models/wind_speed_model/wind_speed_models.h"
-#include "header/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_models.h"
-#include "header/model/wtg_models/wt_relay_model/wt_relay_models.h"
+#include "header/model/wtg_models/supported_wtg_models.h"
#include "header/model/pvu_models/pv_converter_model/pv_converter_models.h"
#include "header/model/pvu_models/pv_panel_model/pv_panel_models.h"
diff --git a/code/steps/header/model/pvu_models/pv_relay_model/pv_relay_model.h b/code/steps/header/model/pvu_models/pv_relay_model/pv_relay_model.h
new file mode 100644
index 00000000..85d72ec3
--- /dev/null
+++ b/code/steps/header/model/pvu_models/pv_relay_model/pv_relay_model.h
@@ -0,0 +1,56 @@
+#ifndef PV_RELAY_MODEL_H
+#define PV_RELAY_MODEL_H
+
+#include "header/model/pvu_models/pvu_model.h"
+class PV_RELAY_MODEL : public PVU_MODEL
+{
+ /*
+ pv relay model:
+ inputs:
+ frequency: bus frequency
+ voltage: bus voltage
+ output:
+ trip pv if necessary
+ */
+ public:
+ PV_RELAY_MODEL(STEPS& toolkit);
+ virtual ~PV_RELAY_MODEL();
+
+ virtual string get_model_type() const;
+ // inputs
+ double get_bus_frequency_in_pu() const;
+ //double get_bus_positive_sequence_voltage_in_pu() const;
+ public: // specific model level
+ virtual string get_model_name() const = 0;
+
+ virtual bool setup_model_with_steps_string_vector(vector& data) = 0;
+ virtual bool setup_model_with_psse_string(string data) = 0;
+ virtual bool setup_model_with_bpa_string(string data) = 0;
+
+ virtual void setup_block_toolkit_and_parameters() = 0;
+
+ virtual void initialize() = 0;
+ virtual void run(DYNAMIC_MODE mode) = 0;
+
+ virtual void check() = 0;
+ virtual void clear() = 0;
+ virtual void report() = 0;
+ virtual void save() = 0;
+ virtual string get_standard_psse_string(bool export_internal_bus_number=false) const = 0;
+
+ virtual void prepare_model_data_table() = 0;
+ virtual double get_model_data_with_name(string par_name) const = 0;
+ virtual void set_model_data_with_name(string par_name, double value) = 0;
+ virtual double get_minimum_nonzero_time_constant_in_s() = 0;
+
+ virtual void prepare_model_internal_variable_table() = 0;
+ virtual double get_model_internal_variable_with_name(string var_name)= 0;
+
+ virtual string get_dynamic_data_in_psse_format() const = 0;
+ virtual string get_dynamic_data_in_bpa_format() const = 0;
+ virtual string get_dynamic_data_in_steps_format() const = 0;
+ private:
+ void common_constructor();
+};
+
+#endif // PV_RELAY_MODEL_H
diff --git a/code/steps/header/model/pvu_models/pv_relay_model/pv_relay_model_test.h b/code/steps/header/model/pvu_models/pv_relay_model/pv_relay_model_test.h
new file mode 100644
index 00000000..4c42c931
--- /dev/null
+++ b/code/steps/header/model/pvu_models/pv_relay_model/pv_relay_model_test.h
@@ -0,0 +1,52 @@
+#ifndef PV_RELAY_MODEL_TEST_H
+#define PV_RELAY_MODEL_TEST_H
+
+#include
+#include
+#include
+#include
+
+#ifdef _MSC_VER
+ #pragma warning (disable: 4290)
+#endif
+
+#include "header/model/pvu_models/pvu_model_test.h"
+#include "header/power_system_database.h"
+using namespace std;
+
+class PV_RELAY_MODEL_TEST : public PVG_MODEL_TEST
+{
+ public:
+ PV_RELAY_MODEL_TEST();
+ protected:
+ virtual void setup();
+ virtual void tear_down();
+ protected:
+ void test_get_model_type();
+ void test_set_get_damping();
+ void test_get_standard_psse_string();
+ void test_step_response_of_wt_turbine_model_with_pitch_angle_increase_in_underspeed_mode();
+ void test_step_response_of_wt_turbine_model_with_pitch_angle_increase_in_mppt_mode();
+ void test_step_response_of_wt_turbine_model_with_pitch_angle_increase_in_overspeed_mode();
+ void test_step_response_of_wt_turbine_model_with_generator_power_order_drop_in_underspeed_mode();
+ void test_step_response_of_wt_turbine_model_with_generator_power_order_drop_in_mppt_mode();
+ void test_step_response_of_wt_turbine_model_with_generator_power_order_drop_in_overspeed_mode();
+
+ protected:
+ virtual void test_get_model_name() = 0;
+ virtual void test_set_get_parameters() = 0;
+ virtual void test_initialize() = 0;
+ private:
+ void run_step_response_of_wt_turbine_model_with_pitch_angle_increase_in_underspeed_mode();
+ void run_step_response_of_wt_turbine_model_with_pitch_angle_increase_in_mppt_mode();
+ void run_step_response_of_wt_turbine_model_with_pitch_angle_increase_in_overspeed_mode();
+ void apply_1deg_pitch_angle_increase();
+ void run_step_response_of_wt_turbine_model_with_generator_power_order_drop_in_underspeed_mode();
+ void run_step_response_of_wt_turbine_model_with_generator_power_order_drop_in_mppt_mode();
+ void run_step_response_of_wt_turbine_model_with_generator_power_order_drop_in_overspeed_mode();
+ void apply_10_percent_power_order_drop();
+ void export_meter_title();
+ void export_meter_values();
+};
+
+#endif//PV_RELAY_MODEL_TEST_H
diff --git a/code/steps/header/model/pvu_models/pv_relay_model/pv_relay_models.h b/code/steps/header/model/pvu_models/pv_relay_model/pv_relay_models.h
new file mode 100644
index 00000000..1b055e8b
--- /dev/null
+++ b/code/steps/header/model/pvu_models/pv_relay_model/pv_relay_models.h
@@ -0,0 +1,6 @@
+#ifndef PV_RELAY_MODELS_H
+#define PV_RELAY_MODELS_H
+
+//#include "header/model/pvu_models/pv_relay_model/xxx.h"
+
+#endif // PV_RELAY_MODELS_H
diff --git a/code/steps/header/model/pvu_models/pv_vrt_model/pv_vrt_model.h b/code/steps/header/model/pvu_models/pv_vrt_model/pv_vrt_model.h
new file mode 100644
index 00000000..489e28ba
--- /dev/null
+++ b/code/steps/header/model/pvu_models/pv_vrt_model/pv_vrt_model.h
@@ -0,0 +1,69 @@
+#ifndef PV_VRT_MODEL_H
+#define PV_VRT_MODEL_H
+
+#include "header/model/pvu_models/pvu_model.h"
+#include
+class PV_VRT_MODEL : public PVU_MODEL
+{
+ /*
+ PV voltage ride through control model
+ General inputs:
+ vterm: PV terminal or remote AC voltage
+ General output:
+ ipcmd: active current command in pu
+ iqcmd: reactive current command in pu
+ */
+ public:
+ PV_VRT_MODEL(STEPS& toolkit);
+ virtual ~PV_VRT_MODEL();
+ public: // pe elctricla control common
+ virtual string get_model_type() const;
+ // get input
+ complex get_terminal_bus_complex_voltage_in_pu() const;
+ double get_terminal_bus_voltage_in_pu() const;
+
+ complex get_pv_unit_terminal_generation_in_MVA() const;
+ complex get_pv_unit_terminal_generation_in_pu_based_on_mbase() const;
+ complex get_pv_unit_terminal_complex_current_in_pu() const;
+ double get_pv_unit_terminal_current_in_pu() const;
+ public: // specific exciter
+ virtual string get_model_name() const = 0;
+
+ virtual bool setup_model_with_steps_string_vector(vector& data) = 0;
+ virtual bool setup_model_with_psse_string(string data) = 0;
+ virtual bool setup_model_with_bpa_string(string data) = 0;
+
+ virtual void setup_block_toolkit_and_parameters() = 0;
+
+ virtual void initialize() = 0;
+ virtual void run(DYNAMIC_MODE mode) = 0;
+
+ virtual VRT_STATUS get_lvrt_status() const = 0;
+ virtual VRT_STATUS get_hvrt_status() const = 0;
+
+ virtual double get_active_current_command_in_pu_based_on_mbase() = 0;
+ virtual double get_active_power_command_in_pu_based_on_mbase() = 0;
+ virtual double get_reactive_current_command_in_pu_based_on_mbase() = 0;
+ virtual double get_reactive_power_command_in_pu_based_on_mbase() = 0;
+ virtual double get_reactive_voltage_command_in_pu() = 0;
+ virtual void check() = 0;
+ virtual void clear() = 0;
+ virtual void report() = 0;
+ virtual void save() = 0;
+ virtual string get_standard_psse_string(bool export_internal_bus_number=false) const = 0;
+
+ virtual void prepare_model_data_table() = 0;
+ virtual double get_model_data_with_name(string par_name) const = 0;
+ virtual void set_model_data_with_name(string par_name, double value) = 0;
+ virtual double get_minimum_nonzero_time_constant_in_s() = 0;
+
+ virtual void prepare_model_internal_variable_table() = 0;
+ virtual double get_model_internal_variable_with_name(string var_name)= 0;
+
+ virtual string get_dynamic_data_in_psse_format() const = 0;
+ virtual string get_dynamic_data_in_bpa_format() const = 0;
+ virtual string get_dynamic_data_in_steps_format() const = 0;
+ private:
+};
+
+#endif // PV_VRT_MODEL_H
diff --git a/code/steps/header/model/pvu_models/pv_vrt_model/pv_vrt_models.h b/code/steps/header/model/pvu_models/pv_vrt_model/pv_vrt_models.h
new file mode 100644
index 00000000..757cce81
--- /dev/null
+++ b/code/steps/header/model/pvu_models/pv_vrt_model/pv_vrt_models.h
@@ -0,0 +1,6 @@
+#ifndef PV_VRT_MODELS_H
+#define PV_VRT_MODELS_H
+
+//#include "header/model/pvu_models/pv_vrt_model/xxx.h"
+
+#endif // PV_VRT_MODELS_H
diff --git a/code/steps/header/model/sg_models/supported_sg_models.h b/code/steps/header/model/sg_models/supported_sg_models.h
new file mode 100644
index 00000000..cea3baee
--- /dev/null
+++ b/code/steps/header/model/sg_models/supported_sg_models.h
@@ -0,0 +1,11 @@
+#ifndef SUPPORTED_SG_MODELS_H
+#define SUPPORTED_SG_MODELS_H
+
+#include "header/model/sg_models/sync_generator_model/sync_generator_models.h"
+#include "header/model/sg_models/compensator_model/compensator_models.h"
+#include "header/model/sg_models/exciter_model/exciter_models.h"
+#include "header/model/sg_models/stabilizer_model/stabilizer_models.h"
+#include "header/model/sg_models/turbine_governor_model/turbine_governor_models.h"
+#include "header/model/sg_models/turbine_load_controller_model/turbine_load_controller_models.h"
+
+#endif // SUPPORTED_SG_MODELS_H
diff --git a/code/steps/header/model/wtg_models/supported_wtg_models.h b/code/steps/header/model/wtg_models/supported_wtg_models.h
new file mode 100644
index 00000000..1b2222ad
--- /dev/null
+++ b/code/steps/header/model/wtg_models/supported_wtg_models.h
@@ -0,0 +1,13 @@
+#ifndef SUPPORTED_WTG_MODELS_H
+#define SUPPORTED_WTG_MODELS_H
+
+#include "header/model/wtg_models/wt_generator_model/wt_generator_models.h"
+#include "header/model/wtg_models/wt_aerodynamic_model/wt_aerodynamic_models.h"
+#include "header/model/wtg_models/wt_electrical_model/wt_electrical_models.h"
+#include "header/model/wtg_models/wt_turbine_model/wt_turbine_models.h"
+#include "header/model/wtg_models/wt_pitch_model/wt_pitch_models.h"
+#include "header/model/wtg_models/wind_speed_model/wind_speed_models.h"
+#include "header/model/wtg_models/wt_vrt_model/wt_vrt_models.h"
+#include "header/model/wtg_models/wt_relay_model/wt_relay_models.h"
+
+#endif // SUPPORTED_WTG_MODELS_H
diff --git a/code/steps/header/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_models.h b/code/steps/header/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_models.h
deleted file mode 100644
index 58c75289..00000000
--- a/code/steps/header/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_models.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef WT_VOLTAGE_RIDE_THROUGH_MODELS_H
-#define WT_VOLTAGE_RIDE_THROUGH_MODELS_H
-
-#include "header/model/wtg_models/wt_voltage_ride_through_model/wtvrt3.h"
-
-#endif // WT_VOLTAGE_RIDE_THROUGH_MODELS_H
diff --git a/code/steps/header/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_model.h b/code/steps/header/model/wtg_models/wt_vrt_model/wt_vrt_model.h
similarity index 90%
rename from code/steps/header/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_model.h
rename to code/steps/header/model/wtg_models/wt_vrt_model/wt_vrt_model.h
index b7150789..b0a3761a 100644
--- a/code/steps/header/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_model.h
+++ b/code/steps/header/model/wtg_models/wt_vrt_model/wt_vrt_model.h
@@ -1,9 +1,9 @@
-#ifndef WT_VOLTAGE_RIDE_THROUGH_MODEL_H
-#define WT_VOLTAGE_RIDE_THROUGH_MODEL_H
+#ifndef WT_VRT_MODEL_H
+#define WT_VRT_MODEL_H
#include "header/model/wtg_models/wtg_model.h"
#include
-class WT_VOLTAGE_RIDE_THROUGH_MODEL : public WTG_MODEL
+class WT_VRT_MODEL : public WTG_MODEL
{
/*
Wind voltage ride through control model
@@ -14,8 +14,8 @@ class WT_VOLTAGE_RIDE_THROUGH_MODEL : public WTG_MODEL
iqcmd: reactive current command in pu
*/
public:
- WT_VOLTAGE_RIDE_THROUGH_MODEL(STEPS& toolkit);
- virtual ~WT_VOLTAGE_RIDE_THROUGH_MODEL();
+ WT_VRT_MODEL(STEPS& toolkit);
+ virtual ~WT_VRT_MODEL();
public: // pe elctricla control common
virtual string get_model_type() const;
// get input
@@ -66,4 +66,4 @@ class WT_VOLTAGE_RIDE_THROUGH_MODEL : public WTG_MODEL
private:
};
-#endif // WT_VOLTAGE_RIDE_THROUGH_MODEL_H
+#endif // WT_VRT_MODEL_H
diff --git a/code/steps/header/model/wtg_models/wt_vrt_model/wt_vrt_models.h b/code/steps/header/model/wtg_models/wt_vrt_model/wt_vrt_models.h
new file mode 100644
index 00000000..8ba5c0df
--- /dev/null
+++ b/code/steps/header/model/wtg_models/wt_vrt_model/wt_vrt_models.h
@@ -0,0 +1,6 @@
+#ifndef WT_VRT_MODELS_H
+#define WT_VRT_MODELS_H
+
+#include "header/model/wtg_models/wt_vrt_model/wtvrt3.h"
+
+#endif // WT_VRT_MODELS_H
diff --git a/code/steps/header/model/wtg_models/wt_voltage_ride_through_model/wtvrt3.h b/code/steps/header/model/wtg_models/wt_vrt_model/wtvrt3.h
similarity index 97%
rename from code/steps/header/model/wtg_models/wt_voltage_ride_through_model/wtvrt3.h
rename to code/steps/header/model/wtg_models/wt_vrt_model/wtvrt3.h
index 4219ca7e..dfbc6102 100644
--- a/code/steps/header/model/wtg_models/wt_voltage_ride_through_model/wtvrt3.h
+++ b/code/steps/header/model/wtg_models/wt_vrt_model/wtvrt3.h
@@ -1,11 +1,11 @@
#ifndef WTVRT3_H
#define WTVRT3_H
-#include "header/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_model.h"
+#include "header/model/wtg_models/wt_vrt_model/wt_vrt_model.h"
#include "header/model/converter_common_models/vrt_model/lvrt_control.h"
#include "header/model/converter_common_models/vrt_model/hvrt_control.h"
-class WTVRT3: public WT_VOLTAGE_RIDE_THROUGH_MODEL
+class WTVRT3: public WT_VRT_MODEL
{
public:
WTVRT3(STEPS& toolkit);
diff --git a/code/steps/source/device/pv_unit.cpp b/code/steps/source/device/pv_unit.cpp
index 6bada5eb..99f5db9f 100644
--- a/code/steps/source/device/pv_unit.cpp
+++ b/code/steps/source/device/pv_unit.cpp
@@ -1,10 +1,6 @@
#include "header/device/pv_unit.h"
#include "header/basic/utility.h"
#include "header/steps_namespace.h"
-#include "header/model/pvu_models/pv_converter_model/pv_converter_models.h"
-#include "header/model/pvu_models/pv_panel_model/pv_panel_models.h"
-#include "header/model/pvu_models/pv_electrical_model/pv_electrical_models.h"
-#include "header/model/pvu_models/pv_irradiance_model/pv_irradiance_models.h"
#include
#include
@@ -30,6 +26,8 @@ void PV_UNIT::clear()
pv_panel_model = NULL;
pv_electrical_model = NULL;
pv_irradiance_model = NULL;
+ pv_vrt_model = NULL;
+ pv_relay_model = NULL;
set_positive_sequence_resistance_in_pu(0.0);
set_positive_sequence_reactance_in_pu(0.0);
@@ -100,6 +98,8 @@ void PV_UNIT::run(DYNAMIC_MODE mode)
PV_ELECTRICAL_MODEL* elec = get_pv_electrical_model();
PV_PANEL_MODEL* panel = get_pv_panel_model();
PV_IRRADIANCE_MODEL* irrd = get_pv_irradiance_model();
+ PV_VRT_MODEL* vrt = get_pv_vrt_model();
+ PV_RELAY_MODEL* relay = get_pv_relay_model();
switch(mode)
{
@@ -195,6 +195,18 @@ void PV_UNIT::set_model(MODEL* model)
return;
}
+ if(model->get_model_type()=="PV VRT")
+ {
+ set_pv_vrt_model((PV_VRT_MODEL*) model);
+ return;
+ }
+
+ if(model->get_model_type()=="PV RELAY")
+ {
+ set_pv_relay_model((PV_RELAY_MODEL*) model);
+ return;
+ }
+
ostringstream osstream;
osstream<<"Warning. Unsupported model type '"<get_model_type()<<"' when setting up pv unit-related model.";
STEPS& toolkit = get_toolkit();
@@ -213,6 +225,10 @@ MODEL* PV_UNIT::get_model_of_type(string model_type, unsigned int index)
return get_pv_electrical_model();
if(model_type=="PV IRRADIANCE")
return get_pv_irradiance_model();
+ if(model_type=="PV VRT")
+ return get_pv_vrt_model();
+ if(model_type=="PV RELAY")
+ return get_pv_relay_model();
return NULL;
}
@@ -240,6 +256,18 @@ void PV_UNIT::set_pv_irradiance_model(PV_IRRADIANCE_MODEL* model)
pv_irradiance_model = model;
}
+void PV_UNIT::set_pv_vrt_model(PV_VRT_MODEL* model)
+{
+ if(model!=NULL)
+ pv_vrt_model = model;
+}
+
+void PV_UNIT::set_pv_relay_model(PV_RELAY_MODEL* model)
+{
+ if(model!=NULL)
+ pv_relay_model = model;
+}
+
PV_CONVERTER_MODEL* PV_UNIT::get_pv_converter_model() const
{
return pv_converter_model;
@@ -260,6 +288,16 @@ PV_IRRADIANCE_MODEL* PV_UNIT::get_pv_irradiance_model() const
return pv_irradiance_model;
}
+PV_VRT_MODEL* PV_UNIT::get_pv_vrt_model() const
+{
+ return pv_vrt_model;
+}
+
+PV_RELAY_MODEL* PV_UNIT::get_pv_relay_model() const
+{
+ return pv_relay_model;
+}
+
PV_UNIT& PV_UNIT::operator=(const PV_UNIT& pvu)
{
if(this==(&pvu)) return *this;
@@ -288,6 +326,8 @@ PV_UNIT& PV_UNIT::operator=(const PV_UNIT& pvu)
set_model(pvu.get_pv_panel_model());
set_model(pvu.get_pv_electrical_model());
set_model(pvu.get_pv_irradiance_model());
+ set_model(pvu.get_pv_vrt_model());
+ set_model(pvu.get_pv_relay_model());
set_positive_sequence_resistance_in_pu(pvu.get_positive_sequence_resistance_in_pu());
set_positive_sequence_reactance_in_pu(pvu.get_positive_sequence_reactance_in_pu());
diff --git a/code/steps/source/device/wt_generator.cpp b/code/steps/source/device/wt_generator.cpp
index 6d7697d9..6b2381d4 100644
--- a/code/steps/source/device/wt_generator.cpp
+++ b/code/steps/source/device/wt_generator.cpp
@@ -2,13 +2,6 @@
#include "header/basic/utility.h"
#include "header/steps_namespace.h"
#include "header/STEPS.h"
-#include "header/model/wtg_models/wt_generator_model/wt_generator_models.h"
-#include "header/model/wtg_models/wt_aerodynamic_model/wt_aerodynamic_models.h"
-#include "header/model/wtg_models/wt_electrical_model/wt_electrical_models.h"
-#include "header/model/wtg_models/wt_turbine_model/wt_turbine_models.h"
-#include "header/model/wtg_models/wt_pitch_model/wt_pitch_models.h"
-#include "header/model/wtg_models/wind_speed_model/wind_speed_models.h"
-#include "header/model/wtg_models/wt_relay_model/wt_relay_models.h"
#include
#include
@@ -109,7 +102,7 @@ void WT_GENERATOR::run(DYNAMIC_MODE mode)
WT_TURBINE_MODEL* turbine = get_wt_turbine_model();
WT_ELECTRICAL_MODEL* elec = get_wt_electrical_model();
WT_PITCH_MODEL* pitch = get_wt_pitch_model();
- WT_VOLTAGE_RIDE_THROUGH_MODEL* vrt = get_wt_voltage_ride_through_model();
+ WT_VRT_MODEL* vrt = get_wt_vrt_model();
WT_RELAY_MODEL* relay = get_wt_relay_model();
switch(mode)
@@ -269,7 +262,7 @@ void WT_GENERATOR::set_model(MODEL* model)
if(model->get_model_type()=="WT VRT")
{
- set_wt_voltage_ride_through_model((WT_VOLTAGE_RIDE_THROUGH_MODEL*) model);
+ set_wt_vrt_model((WT_VRT_MODEL*) model);
return;
}
@@ -303,7 +296,7 @@ MODEL* WT_GENERATOR::get_model_of_type(string model_type, unsigned int index)
if(model_type=="WIND SPEED")
return get_wind_speed_model();
if(model_type=="WT VRT")
- return get_wt_voltage_ride_through_model();
+ return get_wt_vrt_model();
if(model_type=="WT RELAY")
return get_wt_relay_model();
return NULL;
@@ -345,7 +338,7 @@ void WT_GENERATOR::set_wind_speed_model(WIND_SPEED_MODEL* model)
wind_speed_model = model;
}
-void WT_GENERATOR::set_wt_voltage_ride_through_model(WT_VOLTAGE_RIDE_THROUGH_MODEL* model)
+void WT_GENERATOR::set_wt_vrt_model(WT_VRT_MODEL* model)
{
if(model!=NULL)
wt_vrt_model = model;
@@ -388,7 +381,7 @@ WIND_SPEED_MODEL* WT_GENERATOR::get_wind_speed_model() const
return wind_speed_model;
}
-WT_VOLTAGE_RIDE_THROUGH_MODEL* WT_GENERATOR::get_wt_voltage_ride_through_model() const
+WT_VRT_MODEL* WT_GENERATOR::get_wt_vrt_model() const
{
return wt_vrt_model;
}
@@ -428,7 +421,7 @@ WT_GENERATOR& WT_GENERATOR::operator=(const WT_GENERATOR& gen)
set_model(gen.get_wt_turbine_model());
set_model(gen.get_wt_pitch_model());
set_model(gen.get_wind_speed_model());
- set_model(gen.get_wt_voltage_ride_through_model());
+ set_model(gen.get_wt_vrt_model());
set_model(gen.get_wt_relay_model());
set_positive_sequence_resistance_in_pu(gen.get_positive_sequence_resistance_in_pu());
diff --git a/code/steps/source/model/pvu_models/pv_relay_model/pv_relay_model.cpp b/code/steps/source/model/pvu_models/pv_relay_model/pv_relay_model.cpp
new file mode 100644
index 00000000..45cf732b
--- /dev/null
+++ b/code/steps/source/model/pvu_models/pv_relay_model/pv_relay_model.cpp
@@ -0,0 +1,31 @@
+#include "header/model/pvu_models/pv_relay_model/pv_relay_model.h"
+
+#include "header/basic/utility.h"
+#include "header/STEPS.h"
+#include
+
+PV_RELAY_MODEL::PV_RELAY_MODEL(STEPS& toolkit) : PVU_MODEL(toolkit)
+{
+ common_constructor();
+}
+
+PV_RELAY_MODEL::~PV_RELAY_MODEL()
+{
+ ;
+}
+
+void PV_RELAY_MODEL::common_constructor()
+{
+ set_allowed_device_type_CAN_ONLY_BE_CALLED_BY_SPECIFIC_MODEL_CONSTRUCTOR(STEPS_PV_UNIT);
+}
+
+string PV_RELAY_MODEL::get_model_type() const
+{
+ return "PV RELAY";
+}
+
+double PV_RELAY_MODEL::get_bus_frequency_in_pu() const
+{
+ BUS* bus = get_bus_pointer();
+ return bus->get_frequency_in_pu();
+}
diff --git a/code/steps/source/model/pvu_models/pv_vrt_model/pv_vrt_model.cpp b/code/steps/source/model/pvu_models/pv_vrt_model/pv_vrt_model.cpp
new file mode 100644
index 00000000..b42714ec
--- /dev/null
+++ b/code/steps/source/model/pvu_models/pv_vrt_model/pv_vrt_model.cpp
@@ -0,0 +1,70 @@
+#include "header/model/pvu_models/pv_vrt_model/pv_vrt_model.h"
+#include "header/basic/utility.h"
+#include "header/device/pv_unit.h"
+#include "header/power_system_database.h"
+#include "header/STEPS.h"
+
+PV_VRT_MODEL::PV_VRT_MODEL(STEPS& toolkit) : PVU_MODEL(toolkit)
+{
+ ;
+}
+
+PV_VRT_MODEL::~PV_VRT_MODEL()
+{
+ ;
+}
+
+string PV_VRT_MODEL::get_model_type() const
+{
+ return "PV VRT";
+}
+
+complex PV_VRT_MODEL::get_terminal_bus_complex_voltage_in_pu() const
+{
+ BUS* bus = get_bus_pointer();
+ return bus->get_positive_sequence_complex_voltage_in_pu();
+}
+
+double PV_VRT_MODEL::get_terminal_bus_voltage_in_pu() const
+{
+ complex V = get_terminal_bus_complex_voltage_in_pu();
+ double x = V.real(), y = V.imag();
+ return steps_sqrt(x*x + y * y);
+}
+
+complex PV_VRT_MODEL::get_pv_unit_terminal_generation_in_MVA() const
+{
+ PV_UNIT* pv_unit = get_pv_unit_pointer();
+ PV_CONVERTER_MODEL* model = pv_unit->get_pv_converter_model();
+ if(model!=NULL)
+ {
+ if(not model->is_model_initialized())
+ model->initialize();
+
+ return model->get_terminal_complex_power_in_MVA();
+ }
+ else
+ return 0.0;
+}
+
+complex PV_VRT_MODEL::get_pv_unit_terminal_generation_in_pu_based_on_mbase() const
+{
+ return get_pv_unit_terminal_generation_in_MVA()/get_mbase_in_MVA();
+}
+
+complex PV_VRT_MODEL::get_pv_unit_terminal_complex_current_in_pu() const
+{
+ PV_UNIT* pv_unit = get_pv_unit_pointer();
+ PV_CONVERTER_MODEL* model = pv_unit->get_pv_converter_model();
+ if(model!=NULL and model->is_model_initialized())
+ return model->get_terminal_complex_current_in_pu_in_xy_axis_based_on_mbase();
+ else
+ return 0.0;
+}
+
+double PV_VRT_MODEL::get_pv_unit_terminal_current_in_pu() const
+{
+ complex I =get_pv_unit_terminal_complex_current_in_pu();
+ double x = I.real(), y = I.imag();
+ return steps_sqrt(x*x+y*y);
+}
diff --git a/code/steps/source/model/wtg_models/wt_generator_model/wt_generator_model.cpp b/code/steps/source/model/wtg_models/wt_generator_model/wt_generator_model.cpp
index 4d63b5f5..2fd7c44c 100644
--- a/code/steps/source/model/wtg_models/wt_generator_model/wt_generator_model.cpp
+++ b/code/steps/source/model/wtg_models/wt_generator_model/wt_generator_model.cpp
@@ -102,7 +102,7 @@ double WT_GENERATOR_MODEL::get_active_current_command_in_pu_based_on_mbase()
{
WT_GENERATOR* wt_generator = get_wt_generator_pointer();
WT_ELECTRICAL_MODEL* elec_model = wt_generator->get_wt_electrical_model();
- WT_VOLTAGE_RIDE_THROUGH_MODEL* vrt_model = wt_generator->get_wt_voltage_ride_through_model();
+ WT_VRT_MODEL* vrt_model = wt_generator->get_wt_vrt_model();
if(elec_model!=NULL and elec_model->is_model_initialized())
{
if(vrt_model!=NULL and vrt_model->is_model_initialized())
@@ -123,7 +123,7 @@ double WT_GENERATOR_MODEL::get_reactive_current_command_in_pu_based_on_mbase()
{
WT_GENERATOR* wt_generator = get_wt_generator_pointer();
WT_ELECTRICAL_MODEL* elec_model = wt_generator->get_wt_electrical_model();
- WT_VOLTAGE_RIDE_THROUGH_MODEL* vrt_model = wt_generator->get_wt_voltage_ride_through_model();
+ WT_VRT_MODEL* vrt_model = wt_generator->get_wt_vrt_model();
if(elec_model!=NULL and elec_model->is_model_initialized())
{
if(vrt_model!=NULL and vrt_model->is_model_initialized())
@@ -144,7 +144,7 @@ double WT_GENERATOR_MODEL::get_reactive_voltage_command_in_pu()
{
WT_GENERATOR* wt_generator = get_wt_generator_pointer();
WT_ELECTRICAL_MODEL* elec_model = wt_generator->get_wt_electrical_model();
- WT_VOLTAGE_RIDE_THROUGH_MODEL* vrt_model = wt_generator->get_wt_voltage_ride_through_model();
+ WT_VRT_MODEL* vrt_model = wt_generator->get_wt_vrt_model();
if(elec_model!=NULL and elec_model->is_model_initialized())
{
if(vrt_model!=NULL and vrt_model->is_model_initialized())
@@ -165,7 +165,7 @@ double WT_GENERATOR_MODEL::get_active_power_command_in_pu_based_on_mbase()
{
WT_GENERATOR* wt_generator = get_wt_generator_pointer();
WT_ELECTRICAL_MODEL* elec_model = wt_generator->get_wt_electrical_model();
- WT_VOLTAGE_RIDE_THROUGH_MODEL* vrt_model = wt_generator->get_wt_voltage_ride_through_model();
+ WT_VRT_MODEL* vrt_model = wt_generator->get_wt_vrt_model();
if(elec_model!=NULL and elec_model->is_model_initialized())
{
if(vrt_model!=NULL and vrt_model->is_model_initialized())
@@ -186,7 +186,7 @@ double WT_GENERATOR_MODEL::get_reactive_power_command_in_pu_based_on_mbase()
{
WT_GENERATOR* wt_generator = get_wt_generator_pointer();
WT_ELECTRICAL_MODEL* elec_model = wt_generator->get_wt_electrical_model();
- WT_VOLTAGE_RIDE_THROUGH_MODEL* vrt_model = wt_generator->get_wt_voltage_ride_through_model();
+ WT_VRT_MODEL* vrt_model = wt_generator->get_wt_vrt_model();
if(elec_model!=NULL and elec_model->is_model_initialized())
{
if(vrt_model!=NULL and vrt_model->is_model_initialized())
diff --git a/code/steps/source/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_model.cpp b/code/steps/source/model/wtg_models/wt_vrt_model/wt_vrt_model.cpp
similarity index 60%
rename from code/steps/source/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_model.cpp
rename to code/steps/source/model/wtg_models/wt_vrt_model/wt_vrt_model.cpp
index 32487149..ab851fa4 100644
--- a/code/steps/source/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_model.cpp
+++ b/code/steps/source/model/wtg_models/wt_vrt_model/wt_vrt_model.cpp
@@ -1,38 +1,38 @@
-#include "header/model/wtg_models/wt_voltage_ride_through_model/wt_voltage_ride_through_model.h"
+#include "header/model/wtg_models/wt_vrt_model/wt_vrt_model.h"
#include "header/basic/utility.h"
#include "header/device/wt_generator.h"
#include "header/power_system_database.h"
#include "header/STEPS.h"
-WT_VOLTAGE_RIDE_THROUGH_MODEL::WT_VOLTAGE_RIDE_THROUGH_MODEL(STEPS& toolkit) : WTG_MODEL(toolkit)
+WT_VRT_MODEL::WT_VRT_MODEL(STEPS& toolkit) : WTG_MODEL(toolkit)
{
;
}
-WT_VOLTAGE_RIDE_THROUGH_MODEL::~WT_VOLTAGE_RIDE_THROUGH_MODEL()
+WT_VRT_MODEL::~WT_VRT_MODEL()
{
;
}
-string WT_VOLTAGE_RIDE_THROUGH_MODEL::get_model_type() const
+string WT_VRT_MODEL::get_model_type() const
{
return "WT VRT";
}
-complex WT_VOLTAGE_RIDE_THROUGH_MODEL::get_terminal_bus_complex_voltage_in_pu() const
+complex WT_VRT_MODEL::get_terminal_bus_complex_voltage_in_pu() const
{
BUS* bus = get_bus_pointer();
return bus->get_positive_sequence_complex_voltage_in_pu();
}
-double WT_VOLTAGE_RIDE_THROUGH_MODEL::get_terminal_bus_voltage_in_pu() const
+double WT_VRT_MODEL::get_terminal_bus_voltage_in_pu() const
{
complex V = get_terminal_bus_complex_voltage_in_pu();
double x = V.real(), y = V.imag();
return steps_sqrt(x*x + y * y);
}
-complex WT_VOLTAGE_RIDE_THROUGH_MODEL::get_wt_generator_terminal_generation_in_MVA() const
+complex WT_VRT_MODEL::get_wt_generator_terminal_generation_in_MVA() const
{
WT_GENERATOR* gen = get_wt_generator_pointer();
WT_GENERATOR_MODEL* genmodel = gen->get_wt_generator_model();
@@ -47,12 +47,12 @@ complex WT_VOLTAGE_RIDE_THROUGH_MODEL::get_wt_generator_terminal_generat
return 0.0;
}
-complex WT_VOLTAGE_RIDE_THROUGH_MODEL::get_wt_generator_terminal_generation_in_pu_based_on_mbase() const
+complex WT_VRT_MODEL::get_wt_generator_terminal_generation_in_pu_based_on_mbase() const
{
return get_wt_generator_terminal_generation_in_MVA()/get_mbase_in_MVA();
}
-complex WT_VOLTAGE_RIDE_THROUGH_MODEL::get_wt_generator_terminal_complex_current_in_pu() const
+complex WT_VRT_MODEL::get_wt_generator_terminal_complex_current_in_pu() const
{
WT_GENERATOR* gen = get_wt_generator_pointer();
WT_GENERATOR_MODEL* model = gen->get_wt_generator_model();
@@ -62,7 +62,7 @@ complex WT_VOLTAGE_RIDE_THROUGH_MODEL::get_wt_generator_terminal_complex
return 0.0;
}
-double WT_VOLTAGE_RIDE_THROUGH_MODEL::get_wt_generator_terminal_current_in_pu() const
+double WT_VRT_MODEL::get_wt_generator_terminal_current_in_pu() const
{
complex I =get_wt_generator_terminal_complex_current_in_pu();
double x = I.real(), y = I.imag();
diff --git a/code/steps/source/model/wtg_models/wt_voltage_ride_through_model/wtvrt3.cpp b/code/steps/source/model/wtg_models/wt_vrt_model/wtvrt3.cpp
similarity index 99%
rename from code/steps/source/model/wtg_models/wt_voltage_ride_through_model/wtvrt3.cpp
rename to code/steps/source/model/wtg_models/wt_vrt_model/wtvrt3.cpp
index 7f291b70..7b7c159d 100644
--- a/code/steps/source/model/wtg_models/wt_voltage_ride_through_model/wtvrt3.cpp
+++ b/code/steps/source/model/wtg_models/wt_vrt_model/wtvrt3.cpp
@@ -1,4 +1,4 @@
-#include "header/model/wtg_models/wt_voltage_ride_through_model/wtvrt3.h"
+#include "header/model/wtg_models/wt_vrt_model/wtvrt3.h"
#include "header/device/wt_generator.h"
#include "header/power_system_database.h"
#include "header/STEPS.h"
@@ -8,13 +8,13 @@
using namespace std;
-WTVRT3::WTVRT3(STEPS& toolkit) : WT_VOLTAGE_RIDE_THROUGH_MODEL(toolkit),
+WTVRT3::WTVRT3(STEPS& toolkit) : WT_VRT_MODEL(toolkit),
lvrt(toolkit), hvrt(toolkit)
{
clear();
}
-WTVRT3::WTVRT3(const WTVRT3& model) : WT_VOLTAGE_RIDE_THROUGH_MODEL(model.get_toolkit()),
+WTVRT3::WTVRT3(const WTVRT3& model) : WT_VRT_MODEL(model.get_toolkit()),
lvrt(model.get_toolkit()), hvrt(model.get_toolkit())
{
copy_from_const_model(model);