mirror of
https://github.com/ANL-CEEESA/powersas.m.git
synced 2025-12-06 01:48:52 -06:00
First release of PowerSAS.m
This commit is contained in:
39
example/ex_cpf.m
Normal file
39
example/ex_cpf.m
Normal file
@@ -0,0 +1,39 @@
|
||||
% EXAMPLE: continuation power flow
|
||||
%
|
||||
% in Software PowerSAS.m
|
||||
% Author: Rui Yao <ruiyao@ieee.org>
|
||||
%
|
||||
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
|
||||
%
|
||||
% OPEN SOURCE LICENSE
|
||||
%
|
||||
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
%
|
||||
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
%
|
||||
%
|
||||
% ******************************************************************************************************
|
||||
% DISCLAIMER
|
||||
%
|
||||
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
% ***************************************************************************************************
|
||||
|
||||
clear;
|
||||
clc;
|
||||
|
||||
global Global_Settings
|
||||
|
||||
Global_Settings.logLevel='INFO';
|
||||
|
||||
res_npcc140_zip=runPowerSAS('pf','d_npcc140_ind_zip');
|
||||
res_npcc140_zip_cpf=runPowerSAS('cpf','d_npcc140_ind_zip',[],res_npcc140_zip.SysDataBase.zip,[],res_npcc140_zip.snapshot);
|
||||
|
||||
plotCurves(1,res_npcc140_zip_cpf.t,res_npcc140_zip_cpf.stateCurve,res_npcc140_zip_cpf.SysDataBase,'v');
|
||||
36
example/ex_ctg.m
Normal file
36
example/ex_ctg.m
Normal file
@@ -0,0 +1,36 @@
|
||||
% EXAMPLE: contingency analysis
|
||||
%
|
||||
% in Software PowerSAS.m
|
||||
% Author: Rui Yao <ruiyao@ieee.org>
|
||||
%
|
||||
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
|
||||
%
|
||||
% OPEN SOURCE LICENSE
|
||||
%
|
||||
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
%
|
||||
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
%
|
||||
%
|
||||
% ******************************************************************************************************
|
||||
% DISCLAIMER
|
||||
%
|
||||
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
% ***************************************************************************************************
|
||||
|
||||
clear; clc;
|
||||
|
||||
global Global_Settings
|
||||
|
||||
Global_Settings.logLevel='INFO';
|
||||
|
||||
res_wecc=runPowerSAS('ctg','d_wecc',setOptions('dataPath',[pwd,'/data'],'nlvl',20,'segAlpha',0.2),1);
|
||||
res_140=runPowerSAS('ctg','d_npcc140_zip',setOptions('dataPath',[pwd,'/data'],'nlvl',20,'segAlpha',0.2),11); % System separates
|
||||
37
example/ex_dyn.m
Normal file
37
example/ex_dyn.m
Normal file
@@ -0,0 +1,37 @@
|
||||
% EXAMPLE: general dynamic simulation
|
||||
%
|
||||
% in Software PowerSAS.m
|
||||
% Author: Rui Yao <ruiyao@ieee.org>
|
||||
%
|
||||
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
|
||||
%
|
||||
% OPEN SOURCE LICENSE
|
||||
%
|
||||
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
%
|
||||
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
%
|
||||
%
|
||||
% ******************************************************************************************************
|
||||
% DISCLAIMER
|
||||
%
|
||||
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
% ***************************************************************************************************
|
||||
|
||||
clear; clc;
|
||||
|
||||
global Global_Settings
|
||||
|
||||
Global_Settings.logLevel='INFO';
|
||||
|
||||
res_ei_528=runPowerSAS('dyn','d_ei_528.m',setOptions('dataPath',[pwd,'/data'],'nlvl',25,'segAlpha',0.5,'diffTol',1e-4),'settings_ei_1');
|
||||
|
||||
plotCurves(1,res_ei_528.t,res_ei_528.stateCurve,res_ei_528.SysDataBase,'v');
|
||||
52
example/ex_extended_term_dyn.m
Normal file
52
example/ex_extended_term_dyn.m
Normal file
@@ -0,0 +1,52 @@
|
||||
% EXAMPLE: extended-term simulation
|
||||
%
|
||||
% in Software PowerSAS.m
|
||||
% Author: Rui Yao <ruiyao@ieee.org>
|
||||
%
|
||||
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
|
||||
%
|
||||
% OPEN SOURCE LICENSE
|
||||
%
|
||||
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
%
|
||||
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
%
|
||||
%
|
||||
% ******************************************************************************************************
|
||||
% DISCLAIMER
|
||||
%
|
||||
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
% ***************************************************************************************************
|
||||
|
||||
clear; clc;
|
||||
|
||||
global Global_Settings
|
||||
|
||||
Global_Settings.logLevel='INFO';
|
||||
|
||||
% Full dynamic simulation
|
||||
tagFullDynStart=tic;
|
||||
res_004_fulldyn=runPowerSAS('dyn','d_004_2a_bs_agc.m',setOptions('allowSteadyDynSwitch',0),'settings_d_004_2a_agc');
|
||||
timeFullDyn=toc(tagFullDynStart);
|
||||
|
||||
clc;
|
||||
% Hybrid simulation with dynamic-QSS switching
|
||||
tagHybridStart=tic;
|
||||
res_004=runPowerSAS('dyn','d_004_2a_bs_agc.m',setOptions('allowSteadyDynSwitch',1),'settings_d_004_2a_agc');
|
||||
timeHybrid=toc(tagHybridStart);
|
||||
|
||||
clc;
|
||||
|
||||
disp(['Full dynamic simulation computation time:', num2str(timeFullDyn),' s.']);
|
||||
disp(['Hybrid simulation computation time:', num2str(timeHybrid),' s.']);
|
||||
|
||||
plotCurves(1,res_004_fulldyn.t,res_004_fulldyn.stateCurve,res_004_fulldyn.SysDataBase,'v');
|
||||
plotCurves(2,res_004.t,res_004.stateCurve,res_004.SysDataBase,'v');
|
||||
38
example/ex_n_minus_one.m
Normal file
38
example/ex_n_minus_one.m
Normal file
@@ -0,0 +1,38 @@
|
||||
% EXAMPLE: N-1 analysis
|
||||
%
|
||||
% in Software PowerSAS.m
|
||||
% Author: Rui Yao <ruiyao@ieee.org>
|
||||
%
|
||||
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
|
||||
%
|
||||
% OPEN SOURCE LICENSE
|
||||
%
|
||||
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
%
|
||||
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
%
|
||||
%
|
||||
% ******************************************************************************************************
|
||||
% DISCLAIMER
|
||||
%
|
||||
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
% ***************************************************************************************************
|
||||
|
||||
clear; clc;
|
||||
|
||||
global Global_Settings
|
||||
|
||||
Global_Settings.logLevel='INFO';
|
||||
|
||||
startTag=tic;
|
||||
res_npcc140_zip=runPowerSAS('n-1','d_npcc140_zip');
|
||||
compTime=toc(startTag);
|
||||
addLog(['N-1 total computation time: ',num2str(compTime),'s.'],'INFO');
|
||||
45
example/ex_pf.m
Normal file
45
example/ex_pf.m
Normal file
@@ -0,0 +1,45 @@
|
||||
% EXAMPLE: steady-state
|
||||
%
|
||||
% in Software PowerSAS.m
|
||||
% Author: Rui Yao <ruiyao@ieee.org>
|
||||
%
|
||||
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
|
||||
%
|
||||
% OPEN SOURCE LICENSE
|
||||
%
|
||||
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
%
|
||||
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
%
|
||||
%
|
||||
% ******************************************************************************************************
|
||||
% DISCLAIMER
|
||||
%
|
||||
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
% ***************************************************************************************************
|
||||
|
||||
clear;
|
||||
clc;
|
||||
|
||||
global Global_Settings
|
||||
|
||||
Global_Settings.logLevel='INFO';
|
||||
|
||||
res_003=runPowerSAS('pf','d_003.m');
|
||||
res_014_syn_ind_zip=runPowerSAS('pf','d_014_syn_ind_zip');
|
||||
|
||||
res_npcc140_ind_zip=runPowerSAS('pf','d_npcc140_ind_zip.m');
|
||||
res_wecc=runPowerSAS('pf','d_wecc.m');
|
||||
res_dcase2383wp_mod_ind_zip=runPowerSAS('pf','d_2383wp_mod_ind_zip.m');
|
||||
|
||||
% Uncomment the lines below to try running large cases
|
||||
% res_ACTIVSg70k=runPowerSAS('pf','d_ACTIVSg70k.m',setOptions('dataPath',[pwd,'/data'],'nlvl',25,'segAlpha',0.4,'diffTol',1e-4));
|
||||
% res_210k=runPowerSAS('pf','d_210k.m',setOptions('dataPath',[pwd,'/data'],'nlvl',25,'segAlpha',0.4,'diffTol',1e-4));
|
||||
39
example/ex_restoration.m
Normal file
39
example/ex_restoration.m
Normal file
@@ -0,0 +1,39 @@
|
||||
% EXAMPLE: system restoration
|
||||
%
|
||||
% in Software PowerSAS.m
|
||||
% Author: Rui Yao <ruiyao@ieee.org>
|
||||
%
|
||||
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
|
||||
%
|
||||
% OPEN SOURCE LICENSE
|
||||
%
|
||||
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
%
|
||||
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
%
|
||||
%
|
||||
% ******************************************************************************************************
|
||||
% DISCLAIMER
|
||||
%
|
||||
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
% ***************************************************************************************************
|
||||
|
||||
clear; clc;
|
||||
|
||||
global Global_Settings
|
||||
|
||||
Global_Settings.logLevel='INFO';
|
||||
|
||||
dbstop if error
|
||||
|
||||
res_014=runPowerSAS('dyn','d_014_syn_ind_zip.m',setOptions('allowSteadyDynSwitch',1,'useDiffCtrl',1,'diffTolCtrl',1e-4),'settings_restoration_014_syn_2');
|
||||
|
||||
plotCurves(1,res_014.t,res_014.stateCurve,res_014.SysDataBase,'v');
|
||||
43
example/ex_tsa.m
Normal file
43
example/ex_tsa.m
Normal file
@@ -0,0 +1,43 @@
|
||||
% EXAMPLE: transient stability analysis
|
||||
%
|
||||
% in Software PowerSAS.m
|
||||
% Author: Rui Yao <ruiyao@ieee.org>
|
||||
%
|
||||
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
|
||||
%
|
||||
% OPEN SOURCE LICENSE
|
||||
%
|
||||
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
%
|
||||
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
%
|
||||
%
|
||||
% ******************************************************************************************************
|
||||
% DISCLAIMER
|
||||
%
|
||||
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
% ***************************************************************************************************
|
||||
|
||||
clear; clc;
|
||||
|
||||
global Global_Settings
|
||||
|
||||
Global_Settings.logLevel='INFO';
|
||||
|
||||
res_2383_st=runPowerSAS('pf','d_2383wp_mod2_ind_zip_syn.m',[]);
|
||||
faultSpec=[...
|
||||
114, 0.00, 0, 0.02, 0.5,0.65;
|
||||
74, 0.00, 0, 0.02, 0.5,0.65;
|
||||
1069, 0.00, 0, 0.02, 0.86,0.95;
|
||||
];
|
||||
res_2383_tsa=runPowerSAS('tsa','d_2383wp_mod2_ind_zip_syn.m',[],faultSpec,res_2383_st.snapshot);
|
||||
|
||||
plotCurves(1,res_2383_tsa.t,res_2383_tsa.stateCurve,res_2383_tsa.SysDataBase,'omega');
|
||||
38
example/ex_tsa2.m
Normal file
38
example/ex_tsa2.m
Normal file
@@ -0,0 +1,38 @@
|
||||
% EXAMPLE: transient stability analysis
|
||||
%
|
||||
% in Software PowerSAS.m
|
||||
% Author: Rui Yao <ruiyao@ieee.org>
|
||||
%
|
||||
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
|
||||
%
|
||||
% OPEN SOURCE LICENSE
|
||||
%
|
||||
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
%
|
||||
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
%
|
||||
%
|
||||
% ******************************************************************************************************
|
||||
% DISCLAIMER
|
||||
%
|
||||
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
% ***************************************************************************************************
|
||||
|
||||
clear; clc;
|
||||
|
||||
global Global_Settings
|
||||
|
||||
Global_Settings.logLevel='INFO';
|
||||
|
||||
res_2383_st=runPowerSAS('pf','d_2383wp_mod2_ind_zip_syn.m',setOptions('diffTol',5e-5,'nlvl',15));
|
||||
res_2383_tsa=runPowerSAS('dyn','d_2383wp_mod2_ind_zip_syn.m',setOptions('hotStart',1),'settings_polilsh_tsa',res_2383_st.snapshot);
|
||||
|
||||
plotCurves(1,res_2383_tsa.t,res_2383_tsa.stateCurve,res_2383_tsa.SysDataBase,'v');
|
||||
38
example/ex_tsa3.m
Normal file
38
example/ex_tsa3.m
Normal file
@@ -0,0 +1,38 @@
|
||||
% EXAMPLE: transient stability analysis
|
||||
%
|
||||
% in Software PowerSAS.m
|
||||
% Author: Rui Yao <ruiyao@ieee.org>
|
||||
%
|
||||
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
|
||||
%
|
||||
% OPEN SOURCE LICENSE
|
||||
%
|
||||
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
%
|
||||
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
%
|
||||
%
|
||||
% ******************************************************************************************************
|
||||
% DISCLAIMER
|
||||
%
|
||||
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
% ***************************************************************************************************
|
||||
|
||||
clear; clc;
|
||||
|
||||
global Global_Settings
|
||||
|
||||
Global_Settings.logLevel='INFO';
|
||||
|
||||
res_039_st=runPowerSAS('pf','d_039_mod.m');
|
||||
res_039_tsa=runPowerSAS('dyn','d_039_mod.m',setOptions('hotStart',1),'setting_039_1',res_039_st.snapshot);
|
||||
|
||||
plotCurves(1,res_039_tsa.t,res_039_tsa.stateCurve,res_039_tsa.SysDataBase,'v');
|
||||
37
example/ex_vsa.m
Normal file
37
example/ex_vsa.m
Normal file
@@ -0,0 +1,37 @@
|
||||
% EXAMPLE: voltage stability analysis
|
||||
%
|
||||
% in Software PowerSAS.m
|
||||
% Author: Rui Yao <ruiyao@ieee.org>
|
||||
%
|
||||
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
|
||||
%
|
||||
% OPEN SOURCE LICENSE
|
||||
%
|
||||
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
%
|
||||
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
%
|
||||
%
|
||||
% ******************************************************************************************************
|
||||
% DISCLAIMER
|
||||
%
|
||||
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
% ***************************************************************************************************
|
||||
|
||||
clear; clc;
|
||||
|
||||
global Global_Settings
|
||||
|
||||
Global_Settings.logLevel='INFO';
|
||||
|
||||
res_2383=runPowerSAS('dyn','d_2383wp_mod_ind_zip.m',[],'settings_polilsh_vsa');
|
||||
|
||||
plotCurves(1,res_2383.t,res_2383.stateCurve,res_2383.SysDataBase,'v');
|
||||
Reference in New Issue
Block a user