Home > matpower5.0 > extras > se > test_se_14bus.m

test_se_14bus

PURPOSE ^

TEST_SE_14BUS Test state estimation on IEEE 14-bus system

SYNOPSIS ^

function test_se_14bus

DESCRIPTION ^

TEST_SE_14BUS    Test state estimation on IEEE 14-bus system
    created by Rui Bo on Jan 6, 2010

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function test_se_14bus
0002 %TEST_SE_14BUS    Test state estimation on IEEE 14-bus system
0003 %    created by Rui Bo on Jan 6, 2010
0004 
0005 %   MATPOWER
0006 %   $Id: test_se_14bus.m 1635 2010-04-26 19:45:26Z ray $
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 %%------------------------------------------------------
0035 % using data for IEEE 14-bus system
0036 %%------------------------------------------------------
0037 % NOTE:
0038 % 1) all eight members of 'idx', 'measure' and 'sigma' must be
0039 % defined. They should be null vectors([]) if they do not have data
0040 % 2) all data used in this code are for testing purpose only
0041 %% which measurements are available
0042 idx.idx_zPF = [1;3;8;9;10;13;15;16;17;19];
0043 idx.idx_zPT = [4;5;7;11];
0044 idx.idx_zPG = [1;2;3;4;5];
0045 idx.idx_zVa = [];
0046 idx.idx_zQF = [1;3;8;9;10;13;15;19];
0047 idx.idx_zQT = [4;5;7;11];
0048 idx.idx_zQG = [1;2];
0049 idx.idx_zVm = [2;3;6;8;10;14];
0050 
0051 %% specify measurements
0052 measure.PF = [1.5708;0.734;0.2707;0.1546;0.4589;0.1834;0.2707;0.0523;0.0943;0.0188];
0053 measure.PT = [-0.5427;-0.4081;0.6006;-0.0816];
0054 measure.PG = [2.32;0.4;0;0;0];
0055 measure.Va = [];
0056 measure.QF = [-0.1748;0.0594;-0.154;-0.0264;-0.2084;0.0998;0.148;0.0141];
0057 measure.QT = [0.0213;-0.0193;-0.1006;-0.0864];
0058 measure.QG = [-0.169;0.424];
0059 measure.Vm = [1;1;1;1;1;1];
0060 
0061 %% specify measurement variances
0062 sigma.sigma_PF = 0.02;
0063 sigma.sigma_PT = 0.02;
0064 sigma.sigma_PG = 0.015;
0065 sigma.sigma_Va = [];
0066 sigma.sigma_QF = 0.02;
0067 sigma.sigma_QT = 0.02;
0068 sigma.sigma_QG = 0.015;
0069 sigma.sigma_Vm = 0.01;
0070 
0071 %% check input data integrity
0072 nbus = 14;
0073 [success, measure, idx, sigma] = checkDataIntegrity(measure, idx, sigma, nbus);
0074 if ~success
0075     error('State Estimation input data are not complete or sufficient!');
0076 end
0077     
0078 %% run state estimation
0079 casename = 'case14.m';
0080 type_initialguess = 2; % flat start
0081 [baseMVA, bus, gen, branch, success, et, z, z_est, error_sqrsum] = run_se(casename, measure, idx, sigma, type_initialguess);

Generated on Mon 26-Jan-2015 15:21:31 by m2html © 2005