From e5579d206045a97ef144e238673d6007138c05b4 Mon Sep 17 00:00:00 2001 From: Changgang Li Date: Sun, 24 Mar 2024 22:56:04 +0800 Subject: [PATCH] this is a released version. add function of changing dynamic simulation time step manually. stepspy is updated but not pushed to pypi due to token issue. --- README.md | 3 +- code/steps/STEPS.cbp | 5 +- code/steps/STEPS.depend | 232 +++++++++--------- code/steps/header/apis/steps_api.h | 2 + code/steps/header/basic/steps_enum.h | 15 +- code/steps/header/block/block.h | 2 +- code/steps/header/block/differential_block.h | 3 +- code/steps/header/block/first_order_block.h | 2 + code/steps/header/block/integral_block.h | 2 + code/steps/header/block/lead_lag_block.h | 2 + code/steps/header/block/pd_block.h | 3 + code/steps/header/block/pi_block.h | 3 + code/steps/header/block/pid_block.h | 3 + code/steps/header/block/second_order_block.h | 2 + .../bus_frequency_model/bus_frequency_model.h | 4 +- .../dynamic_simulator/dynamic_simulator.h | 18 +- code/steps/source/STEPS.cpp | 2 +- .../apis/steps_api_dynamic_simulation.cpp | 22 ++ code/steps/source/block/block.cpp | 2 +- .../steps/source/block/differential_block.cpp | 24 +- .../source/block/differential_block_test.cpp | 6 +- code/steps/source/block/first_order_block.cpp | 44 +++- .../source/block/first_order_block_test.cpp | 18 +- code/steps/source/block/integral_block.cpp | 23 +- .../source/block/integral_block_test.cpp | 32 +-- code/steps/source/block/lead_lag_block.cpp | 24 +- .../source/block/lead_lag_block_test.cpp | 18 +- code/steps/source/block/pd_block.cpp | 18 +- code/steps/source/block/pd_block_test.cpp | 6 +- code/steps/source/block/pi_block.cpp | 14 +- code/steps/source/block/pi_block_test.cpp | 6 +- code/steps/source/block/pid_block.cpp | 23 +- code/steps/source/block/pid_block_test.cpp | 6 +- .../source/block/proportional_block_test.cpp | 34 +-- .../steps/source/block/second_order_block.cpp | 27 +- code/steps/source/device/bus_test.cpp | 2 +- code/steps/source/device/energy_storage.cpp | 9 +- .../steps/source/device/equivalent_device.cpp | 7 +- code/steps/source/device/generator.cpp | 9 +- code/steps/source/device/lcc_hvdc2t.cpp | 2 +- code/steps/source/device/load.cpp | 9 +- code/steps/source/device/pv_unit.cpp | 9 +- code/steps/source/device/vsc_hvdc.cpp | 9 +- code/steps/source/device/wt_generator.cpp | 9 +- .../bus_frequency_model.cpp | 64 ++++- .../vsg_model/vsg_model_test.cpp | 10 +- .../converter_common_model/pll_model/pll0.cpp | 4 +- .../es_converter_model_test.cpp | 18 +- .../es_converter_model/escvx.cpp | 2 +- .../es_converter_model/escvy.cpp | 2 +- .../es_electrical_model_test.cpp | 8 +- .../source/model/equivalent_model/ARXL.cpp | 2 +- .../source/model/lcc_hvdc2t_model/CDC4T.cpp | 2 +- .../source/model/lcc_hvdc2t_model/CDC6T.cpp | 2 +- .../lcc_hvdc2t_model_test.cpp | 72 +++--- code/steps/source/model/load_model/CIM6.cpp | 2 +- code/steps/source/model/load_model/IEEL.cpp | 2 +- .../model/load_model/load_model_test.cpp | 24 +- .../source/model/load_relay_model/PUFLS.cpp | 6 +- .../source/model/load_relay_model/UFLS.cpp | 2 +- .../source/model/load_relay_model/UVLS.cpp | 2 +- .../load_frequency_relay_model_test.cpp | 26 +- .../load_voltage_relay_model_test.cpp | 24 +- .../pv_converter_model_test.cpp | 18 +- .../pvu_models/pv_converter_model/pvcv0.cpp | 2 +- .../pvu_models/pv_converter_model/pvcvx.cpp | 2 +- .../pvu_models/pv_converter_model/pvgu1.cpp | 2 +- .../pv_electrical_model_test.cpp | 8 +- .../pvu_models/pv_electrical_model/pvex.cpp | 4 +- .../sg_models/compensator_model/COMP.cpp | 2 +- .../sg_models/compensator_model/IEEEVC.cpp | 2 +- .../sg_models/compensator_model/PSASPVC.cpp | 2 +- .../compensator_model_test.cpp | 12 +- .../model/sg_models/exciter_model/CSEET1.cpp | 2 +- .../model/sg_models/exciter_model/CSEET2.cpp | 2 +- .../model/sg_models/exciter_model/IEEET1.cpp | 2 +- .../model/sg_models/exciter_model/PSASPE1.cpp | 2 +- .../sg_models/exciter_model/PSASPE13.cpp | 2 +- .../sg_models/exciter_model/PSASPE14.cpp | 2 +- .../model/sg_models/exciter_model/PSASPE2.cpp | 2 +- .../model/sg_models/exciter_model/SEXS.cpp | 2 +- .../exciter_model/exciter_model_test.cpp | 10 +- .../sg_models/stabilizer_model/IEE2ST.cpp | 2 +- .../sg_models/stabilizer_model/PSASPS1.cpp | 2 +- .../sg_models/stabilizer_model/PSASPS2.cpp | 2 +- .../sg_models/stabilizer_model/PSASPS3.cpp | 2 +- .../sg_models/stabilizer_model/PSASPS4.cpp | 2 +- .../sg_models/stabilizer_model/PSASPS5.cpp | 2 +- .../sg_models/stabilizer_model/PSASPS6.cpp | 2 +- .../sg_models/stabilizer_model/PSASPS8.cpp | 2 +- .../sg_models/sync_generator_model/gencls.cpp | 2 +- .../sg_models/sync_generator_model/genrou.cpp | 2 +- .../sg_models/sync_generator_model/gensal.cpp | 2 +- .../sync_generator_model_test.cpp | 16 +- .../sg_models/turbine_governors/GAST2A.cpp | 2 +- .../sg_models/turbine_governors/IEEEG1.cpp | 2 +- .../sg_models/turbine_governors/IEEEG1SB.cpp | 2 +- .../sg_models/turbine_governors/IEEEG2.cpp | 2 +- .../sg_models/turbine_governors/IEEEG3.cpp | 2 +- .../sg_models/turbine_governors/IEESGO.cpp | 2 +- .../sg_models/turbine_governors/TGOV1.cpp | 2 +- .../sg_models/turbine_governors/URCSCT.cpp | 2 +- .../turbine_governor_model_test.cpp | 10 +- .../turbine_load_controller_model/lcfb1.cpp | 2 +- .../vsc_hvdc_converter_model/VSCHVDCC0.cpp | 2 +- .../vsc_hvdc_converter_model/VSCHVDCC1.cpp | 2 +- .../vsc_hvdc_converter_model/VSCHVDCC2.cpp | 2 +- .../vsc_hvdc_network_model/VSCHVDCP0.cpp | 2 +- .../wtg_models/wt_electrical_model/wt3e0.cpp | 28 ++- .../wtg_models/wt_electrical_model/wt3e1.cpp | 2 +- .../wt_electrical_model_test.cpp | 8 +- .../wtg_models/wt_generator_model/wt3g0.cpp | 2 +- .../wtg_models/wt_generator_model/wt3g1.cpp | 2 +- .../wtg_models/wt_generator_model/wt3g2.cpp | 2 +- .../wtg_models/wt_generator_model/wt3gx.cpp | 2 +- .../wt_generator_model_test.cpp | 20 +- .../model/wtg_models/wt_pitch_model/wt3p0.cpp | 2 +- .../wt_pitch_model/wt_pitch_model_test.cpp | 24 +- .../wt_relay_model/wt_relay_model_test.cpp | 90 +++---- .../wtg_models/wt_relay_model/wtrly0.cpp | 2 +- .../wtg_models/wt_relay_model/wtvrtrly1.cpp | 2 +- .../wtg_models/wt_turbine_model/wt3t0.cpp | 2 +- .../wt_turbine_model_test.cpp | 90 +++---- .../model/wtg_models/wt_vrt_model/wtvrt3.cpp | 2 +- .../dynamic_simulator/dynamic_simulator.cpp | 140 +++++++---- python/stepspy-current/README.md | 3 +- python/stepspy-current/setup.py | 2 +- python/stepspy-current/stepspy/__init__.py | 4 +- .../stepspy/libsteps/pylibsteps.py | 3 + python/stepspy-current/stepspy/stepspy.py | 16 +- 130 files changed, 965 insertions(+), 626 deletions(-) diff --git a/README.md b/README.md index 9f6821ac..689d2d64 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ - Reminder of major repository: * The github repository may lag behind the gitee repository due to some GIT PUSH issues. So, use gitee repository first. * The 'dev' branch is constantly updating while the 'main' branch is updated when major functions are added. Use 'main' branch for stable applications, and try 'dev' branch for new features. -- Date of Readme: Nov. 2, 2023 +- Date of Readme: March 24, 2024 # Reference Please cite STEPS with the following papers: @@ -23,6 +23,7 @@ Though BPA dat format is supported, it will be supported in the future version i You are encouraged to join us for further development. ## Major versions +- v2.2.0. Add function to change dynamic simulation time step manually. stepspy is also updated however not pushed to pypi due to token issue. please use python/stepspy-current/stepspy. - v2.1.0. Add function to check if NAN is detected in powerflow solver. stepspy is also updated. Compile option '-ffast-math' is disabled. - v2.0.0. Major version. (1) Short circuit functions added. Short circuit analysis with direct solution is supported. APIs are added to stepspy. Short circuit analysis with iterative solution is implemented in C++, and APIs will be added in later version. (2) Two toolkit functions added: Correct Three Winding Transformer Impedance Logic and Blockwise Automatic Large Step Logic. If the 'Correct' logic is enabled, zero impedance winding of 3-winding transformer can be automatically fixed to avoid NaN error. If the 'Blockwise' logic is enabled, dynamic simulation time step can be increased for fast simulation (See Reference Paper [2]). The 'Blockwise' logic is implemented with changes of dynamic blocks of first order, differential, and lead-lag. (3) Option 'libsteps_file' is added to stepspy when creating STEPS() object when dynamic library with name different from 'libSTEPS' is used. (4) Some wind turbine model bugs are fixed. (5) stepspy module is also upgraded to v2.0.0. - v1.6.0. Add VSC HVDC for powerflow and dynamic simulation. stepspy also updated. Released on April 13, 2022. diff --git a/code/steps/STEPS.cbp b/code/steps/STEPS.cbp index bf614415..966ca4cf 100644 --- a/code/steps/STEPS.cbp +++ b/code/steps/STEPS.cbp @@ -8,11 +8,10 @@