Skip to content

Commit

Permalink
add linearizatin of SEXS,GENSAL,IEEEG2,IEE2ST. add linearization inte…
Browse files Browse the repository at this point in the history
…rface for GENERATOR and LOAD. add main test for SSA.
  • Loading branch information
changgang committed Mar 10, 2024
1 parent 81d5ab4 commit 4861da6
Show file tree
Hide file tree
Showing 38 changed files with 1,312 additions and 218 deletions.
10 changes: 7 additions & 3 deletions code/steps/STEPS.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
<Option compiler="gcc" />
<Build>
<Target title="release">
<Option output="../../build/bin/release/libSTEPS" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
<Option output="../../build/bin/release/STEPS" prefix_auto="1" extension_auto="1" />
<Option object_output="../../build/obj/release/" />
<Option type="3" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Option parameters="--compiler " />
<Compiler>
<Add option="-O3" />
Expand Down Expand Up @@ -456,7 +457,10 @@
<Unit filename="main_short_circuit.cpp">
<Option link="0" />
</Unit>
<Unit filename="main_tests.cpp" />
<Unit filename="main_small_signal_analysis.cpp" />
<Unit filename="main_tests.cpp">
<Option link="0" />
</Unit>
<Unit filename="main_ufls_simulation.cpp">
<Option link="0" />
</Unit>
Expand Down
72 changes: 36 additions & 36 deletions code/steps/STEPS.depend
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@
1664187911 d:\steps\code\steps\header\model\bus_model\bus_frequency_model\bus_frequency_model.h
"header/block/differential_block.h"

1704712226 d:\steps\code\steps\header\block\differential_block.h
1710077423 d:\steps\code\steps\header\block\differential_block.h
"header/block/block.h"

1710076196 d:\steps\code\steps\header\device\generator.h
1710079431 d:\steps\code\steps\header\device\generator.h
<string>
<complex>
"header/device/source.h"
Expand Down Expand Up @@ -197,20 +197,20 @@
"header/block/first_order_block.h"
"header/block/saturation_block.h"

1710073704 d:\steps\code\steps\header\model\sg_models\sg_model.h
1710078187 d:\steps\code\steps\header\model\sg_models\sg_model.h
"header/model/model.h"
"header/device/bus.h"
"header/basic/sparse_matrix_define.h"
<complex>

1704712219 d:\steps\code\steps\header\block\integral_block.h
1710077423 d:\steps\code\steps\header\block\integral_block.h
"header/block/block.h"

1704712222 d:\steps\code\steps\header\block\first_order_block.h
1710077423 d:\steps\code\steps\header\block\first_order_block.h
"header/block/block.h"
"header/block/proportional_block.h"

1704726296 d:\steps\code\steps\header\block\proportional_block.h
1710077423 d:\steps\code\steps\header\block\proportional_block.h
"header/block/block.h"

1700647330 d:\steps\code\steps\header\block\saturation_block.h
Expand Down Expand Up @@ -354,15 +354,15 @@
"header/model/model.h"
<complex>

1710076218 d:\steps\code\steps\header\device\load.h
1710080529 d:\steps\code\steps\header\device\load.h
"header/device/nonbus_device.h"
"header/model/load_model/load_model.h"
"header/model/load_relay_model/load_voltage_relay_model.h"
"header/model/load_relay_model/load_frequency_relay_model.h"
<string>
<complex>

1710074033 d:\steps\code\steps\header\model\load_model\load_model.h
1710077423 d:\steps\code\steps\header\model\load_model\load_model.h
"header/model/model.h"
"header/basic/steps_enum.h"
"header/device/bus.h"
Expand Down Expand Up @@ -1342,7 +1342,7 @@
"header/block/lead_lag_block.h"
"header/STEPS.h"

1704712213 d:\steps\code\steps\header\block\lead_lag_block.h
1710077423 d:\steps\code\steps\header\block\lead_lag_block.h
"header/block/block.h"
"header/block/first_order_block.h"

Expand All @@ -1355,7 +1355,7 @@
"header/block/pid_block.h"
"header/STEPS.h"

1704712197 d:\steps\code\steps\header\block\pid_block.h
1710077423 d:\steps\code\steps\header\block\pid_block.h
"header/block/block.h"
"header/block/proportional_block.h"
"header/block/integral_block.h"
Expand All @@ -1370,7 +1370,7 @@
"header/block/pi_block.h"
"header/STEPS.h"

1704712202 d:\steps\code\steps\header\block\pi_block.h
1710077423 d:\steps\code\steps\header\block\pi_block.h
"header/block/block.h"
"header/block/pid_block.h"

Expand All @@ -1383,7 +1383,7 @@
"header/block/pd_block.h"
"header/STEPS.h"

1704712209 d:\steps\code\steps\header\block\pd_block.h
1710077423 d:\steps\code\steps\header\block\pd_block.h
"header/block/block.h"
"header/block/proportional_block.h"
"header/block/differential_block.h"
Expand All @@ -1397,7 +1397,7 @@
"header/block/second_order_block.h"
"header/STEPS.h"

1704712173 d:\steps\code\steps\header\block\second_order_block.h
1710077423 d:\steps\code\steps\header\block\second_order_block.h
"header/block/block.h"
"header/block/proportional_block.h"
"header/block/first_order_block.h"
Expand Down Expand Up @@ -3211,7 +3211,7 @@
<iostream>
<fstream>

1710076780 source:d:\steps\code\steps\source\basic\sparse_matrix_csparse.cpp
1710079984 source:d:\steps\code\steps\source\basic\sparse_matrix_csparse.cpp
"header/basic/sparse_matrix_csparse.h"
"header/basic/constants.h"
"header/basic/utility.h"
Expand Down Expand Up @@ -3617,14 +3617,14 @@
"header/steps_namespace.h"
"header/basic/utility.h"

1710071303 source:d:\steps\code\steps\source\block\differential_block.cpp
1710077423 source:d:\steps\code\steps\source\block\differential_block.cpp
"header/block/differential_block.h"
"header/basic/utility.h"
"header/steps_namespace.h"
<istream>
<iostream>

1704715820 source:d:\steps\code\steps\source\block\differential_block_test.cpp
1710077423 source:d:\steps\code\steps\source\block\differential_block_test.cpp
"header/basic/test_macro.h"
"header/block/differential_block_test.h"
"header/basic/utility.h"
Expand All @@ -3634,14 +3634,14 @@
<cstring>
<cstdio>

1710071359 source:d:\steps\code\steps\source\block\first_order_block.cpp
1710077423 source:d:\steps\code\steps\source\block\first_order_block.cpp
"header/block/first_order_block.h"
"header/basic/utility.h"
"header/steps_namespace.h"
<istream>
<iostream>

1704715829 source:d:\steps\code\steps\source\block\first_order_block_test.cpp
1710077423 source:d:\steps\code\steps\source\block\first_order_block_test.cpp
"header/basic/test_macro.h"
"header/block/first_order_block_test.h"
"header/basic/utility.h"
Expand All @@ -3651,7 +3651,7 @@
<cstring>
<cstdio>

1710071414 source:d:\steps\code\steps\source\block\integral_block.cpp
1710077423 source:d:\steps\code\steps\source\block\integral_block.cpp
"header/block/integral_block.h"
"header/basic/utility.h"
"header/steps_namespace.h"
Expand All @@ -3668,7 +3668,7 @@
<cstring>
<cstdio>

1710071455 source:d:\steps\code\steps\source\block\lead_lag_block.cpp
1710077423 source:d:\steps\code\steps\source\block\lead_lag_block.cpp
"header/block/lead_lag_block.h"
"header/basic/utility.h"
"header/steps_namespace.h"
Expand All @@ -3685,7 +3685,7 @@
<cstring>
<cstdio>

1710071500 source:d:\steps\code\steps\source\block\pd_block.cpp
1710077423 source:d:\steps\code\steps\source\block\pd_block.cpp
"header/block/pd_block.h"
"header/basic/utility.h"
"header/steps_namespace.h"
Expand All @@ -3702,7 +3702,7 @@
<cstring>
<cstdio>

1710071545 source:d:\steps\code\steps\source\block\pi_block.cpp
1710077423 source:d:\steps\code\steps\source\block\pi_block.cpp
"header/block/pi_block.h"
"header/basic/utility.h"
"header/steps_namespace.h"
Expand All @@ -3719,14 +3719,14 @@
<cstring>
<cstdio>

1710071646 source:d:\steps\code\steps\source\block\pid_block.cpp
1710077423 source:d:\steps\code\steps\source\block\pid_block.cpp
"header/block/pid_block.h"
"header/basic/utility.h"
"header/steps_namespace.h"
<istream>
<iostream>

1704715901 source:d:\steps\code\steps\source\block\pid_block_test.cpp
1710077423 source:d:\steps\code\steps\source\block\pid_block_test.cpp
"header/basic/test_macro.h"
"header/block/pid_block_test.h"
"header/basic/utility.h"
Expand All @@ -3736,7 +3736,7 @@
<cstring>
<cstdio>

1710071693 source:d:\steps\code\steps\source\block\proportional_block.cpp
1710077423 source:d:\steps\code\steps\source\block\proportional_block.cpp
"header/block/proportional_block.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand Down Expand Up @@ -3769,14 +3769,14 @@
<cstring>
<cstdio>

1710071775 source:d:\steps\code\steps\source\block\second_order_block.cpp
1710077423 source:d:\steps\code\steps\source\block\second_order_block.cpp
"header/block/second_order_block.h"
"header/basic/utility.h"
"header/steps_namespace.h"
<istream>
<iostream>

1704715939 source:d:\steps\code\steps\source\block\second_order_block_test.cpp
1710077423 source:d:\steps\code\steps\source\block\second_order_block_test.cpp
"header/basic/test_macro.h"
"header/block/second_order_block_test.h"
"header/basic/utility.h"
Expand Down Expand Up @@ -4098,7 +4098,7 @@
<cstdio>
<cstdlib>

1710076196 source:d:\steps\code\steps\source\device\generator.cpp
1710081458 source:d:\steps\code\steps\source\device\generator.cpp
"header/device/generator.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand Down Expand Up @@ -4244,7 +4244,7 @@
<iostream>
<cstdio>

1710076232 source:d:\steps\code\steps\source\device\load.cpp
1710080679 source:d:\steps\code\steps\source\device\load.cpp
"header/device/load.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand Down Expand Up @@ -4304,7 +4304,7 @@
<iostream>
<cstdio>

1697457172 source:d:\steps\code\steps\source\device\source.cpp
1710079502 source:d:\steps\code\steps\source\device\source.cpp
"header/device/source.h"
"header/basic/utility.h"
"header/steps_namespace.h"
Expand Down Expand Up @@ -4687,7 +4687,7 @@
"header/basic/utility.h"
"header/steps_namespace.h"

1710074011 source:d:\steps\code\steps\source\model\load_model\load_model.cpp
1710077423 source:d:\steps\code\steps\source\model\load_model\load_model.cpp
"header/model/load_model/load_model.h"
"header/power_system_database.h"
"header/basic/utility.h"
Expand Down Expand Up @@ -5276,7 +5276,7 @@
"header/basic/utility.h"
"header/steps_namespace.h"

1710075944 source:d:\steps\code\steps\source\model\sg_models\exciter_model\sexs.cpp
1710079008 source:d:\steps\code\steps\source\model\sg_models\exciter_model\sexs.cpp
"header/model/sg_models/exciter_model/SEXS.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand All @@ -5290,7 +5290,7 @@
"header/basic/utility.h"
"header/steps_namespace.h"

1710073745 source:d:\steps\code\steps\source\model\sg_models\sg_model.cpp
1710078665 source:d:\steps\code\steps\source\model\sg_models\sg_model.cpp
"header/model/sg_models/sg_model.h"
"header/basic/utility.h"
"header/power_system_database.h"
Expand All @@ -5308,7 +5308,7 @@
<cstdio>
<cmath>

1710075963 source:d:\steps\code\steps\source\model\sg_models\stabilizer_model\iee2st.cpp
1710078994 source:d:\steps\code\steps\source\model\sg_models\stabilizer_model\iee2st.cpp
"header/model/sg_models/stabilizer_model/IEE2ST.h"
"header/basic/constants.h"
"header/STEPS.h"
Expand Down Expand Up @@ -5470,7 +5470,7 @@
<cstdio>
<cmath>

1710076062 source:d:\steps\code\steps\source\model\sg_models\sync_generator_model\gensal.cpp
1710081532 source:d:\steps\code\steps\source\model\sg_models\sync_generator_model\gensal.cpp
"header/model/sg_models/sync_generator_model/gensal.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand Down Expand Up @@ -5542,7 +5542,7 @@
"header/basic/utility.h"
"header/steps_namespace.h"

1710076106 source:d:\steps\code\steps\source\model\sg_models\turbine_governors\ieeeg2.cpp
1710079080 source:d:\steps\code\steps\source\model\sg_models\turbine_governors\ieeeg2.cpp
"header/model/sg_models/turbine_governor_model/IEEEG2.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand Down
10 changes: 5 additions & 5 deletions code/steps/header/block/differential_block.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class DIFFERENTIAL_BLOCK : public BLOCK
void initialize();
void run(DYNAMIC_MODE mode);

STEPS_SPARSE_MATRIX get_linearized_system_variable(char var) const;
STEPS_SPARSE_MATRIX get_linearized_system_A() const;
STEPS_SPARSE_MATRIX get_linearized_system_B() const;
STEPS_SPARSE_MATRIX get_linearized_system_C() const;
STEPS_SPARSE_MATRIX get_linearized_system_D() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_variable(char var) const;
STEPS_SPARSE_MATRIX get_linearized_matrix_A() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_B() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_C() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_D() const;

virtual void check();

Expand Down
10 changes: 5 additions & 5 deletions code/steps/header/block/first_order_block.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ class FIRST_ORDER_BLOCK : public BLOCK
void initialize();
void run(DYNAMIC_MODE mode);

STEPS_SPARSE_MATRIX get_linearized_system_variable(char var) const;
STEPS_SPARSE_MATRIX get_linearized_system_A() const;
STEPS_SPARSE_MATRIX get_linearized_system_B() const;
STEPS_SPARSE_MATRIX get_linearized_system_C() const;
STEPS_SPARSE_MATRIX get_linearized_system_D() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_variable(char var) const;
STEPS_SPARSE_MATRIX get_linearized_matrix_A() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_B() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_C() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_D() const;

virtual void check();

Expand Down
10 changes: 5 additions & 5 deletions code/steps/header/block/integral_block.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class INTEGRAL_BLOCK : public BLOCK
void initialize();
void run(DYNAMIC_MODE);

STEPS_SPARSE_MATRIX get_linearized_system_variable(char var) const;
STEPS_SPARSE_MATRIX get_linearized_system_A() const;
STEPS_SPARSE_MATRIX get_linearized_system_B() const;
STEPS_SPARSE_MATRIX get_linearized_system_C() const;
STEPS_SPARSE_MATRIX get_linearized_system_D() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_variable(char var) const;
STEPS_SPARSE_MATRIX get_linearized_matrix_A() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_B() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_C() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_D() const;

virtual void check();
private:
Expand Down
10 changes: 5 additions & 5 deletions code/steps/header/block/lead_lag_block.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class LEAD_LAG_BLOCK : public BLOCK
void initialize();
void run(DYNAMIC_MODE mode);

STEPS_SPARSE_MATRIX get_linearized_system_variable(char var) const;
STEPS_SPARSE_MATRIX get_linearized_system_A() const;
STEPS_SPARSE_MATRIX get_linearized_system_B() const;
STEPS_SPARSE_MATRIX get_linearized_system_C() const;
STEPS_SPARSE_MATRIX get_linearized_system_D() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_variable(char var) const;
STEPS_SPARSE_MATRIX get_linearized_matrix_A() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_B() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_C() const;
STEPS_SPARSE_MATRIX get_linearized_matrix_D() const;

virtual void check();
private:
Expand Down
Loading

0 comments on commit 4861da6

Please sign in to comment.