Home > matpower4.1 > extras > cpf > test_cpf.m

test_cpf

PURPOSE ^

TEST_CPF Test continuation power flow (CPF).

SYNOPSIS ^

function test_cpf

DESCRIPTION ^

TEST_CPF  Test continuation power flow (CPF).
   created by Rui Bo on 2007/11/12

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function test_cpf
0002 %TEST_CPF  Test continuation power flow (CPF).
0003 %   created by Rui Bo on 2007/11/12
0004 
0005 %   MATPOWER
0006 %   $Id: test_cpf.m,v 1.4 2010/04/26 19:45:26 ray Exp $
0007 %   by Rui Bo
0008 %   Copyright (c) 2009-2010 by Rui Bo
0009 %
0010 %   This file is part of MATPOWER.
0011 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0012 %
0013 %   MATPOWER is free software: you can redistribute it and/or modify
0014 %   it under the terms of the GNU General Public License as published
0015 %   by the Free Software Foundation, either version 3 of the License,
0016 %   or (at your option) any later version.
0017 %
0018 %   MATPOWER is distributed in the hope that it will be useful,
0019 %   but WITHOUT ANY WARRANTY; without even the implied warranty of
0020 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0021 %   GNU General Public License for more details.
0022 %
0023 %   You should have received a copy of the GNU General Public License
0024 %   along with MATPOWER. If not, see <http://www.gnu.org/licenses/>.
0025 %
0026 %   Additional permission under GNU GPL version 3 section 7
0027 %
0028 %   If you modify MATPOWER, or any covered work, to interface with
0029 %   other modules (such as MATLAB code and MEX-files) available in a
0030 %   MATLAB(R) or comparable environment containing parts covered
0031 %   under other licensing terms, the licensors of MATPOWER grant
0032 %   you additional permission to convey the resulting work.
0033 
0034 casename = 'case30';%'case6bus'; %'case30'
0035 
0036 %% test cpf
0037 fprintf('\n------------testing continuation power flow (CPF) solver\n');
0038 loadvarloc = 7;%6;%7                 % bus number at which load changes
0039 sigmaForLambda = 0.2;%0.05;          % stepsize for Lambda
0040 sigmaForVoltage = 0.05;%0.025;       % stepsize for voltage
0041 [max_lambda, predicted_list, corrected_list, combined_list, success, et] = cpf(casename, loadvarloc, sigmaForLambda, sigmaForVoltage);
0042 fprintf('maximum lambda is %f\n\n', max_lambda);
0043 
0044 %% draw PV curve
0045 flag_combinedCurve = true;
0046 busesToDraw = [];%[3:6];
0047 drawPVcurves(casename, loadvarloc, corrected_list, combined_list, flag_combinedCurve, busesToDraw);
0048

Generated on Mon 26-Jan-2015 15:00:13 by m2html © 2005