Home > matpower4.1 > extras > se > test_se_14bus_err.m

test_se_14bus_err

PURPOSE ^

TEST_SE_14BUS Test state estimation on IEEE 14-bus system.

SYNOPSIS ^

function test_se_14bus_err

DESCRIPTION ^

TEST_SE_14BUS    Test state estimation on IEEE 14-bus system. 
   NOTE: This test shows system can be not observable due to measurement
   issues.
    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_err
0002 %TEST_SE_14BUS    Test state estimation on IEEE 14-bus system.
0003 %   NOTE: This test shows system can be not observable due to measurement
0004 %   issues.
0005 %    created by Rui Bo on Jan 6, 2010
0006 
0007 %   MATPOWER
0008 %   $Id: test_se_14bus_err.m,v 1.3 2010/04/26 19:45:26 ray Exp $
0009 %   by Rui Bo
0010 %   Copyright (c) 2009-2010 by Rui Bo
0011 %
0012 %   This file is part of MATPOWER.
0013 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0014 %
0015 %   MATPOWER is free software: you can redistribute it and/or modify
0016 %   it under the terms of the GNU General Public License as published
0017 %   by the Free Software Foundation, either version 3 of the License,
0018 %   or (at your option) any later version.
0019 %
0020 %   MATPOWER is distributed in the hope that it will be useful,
0021 %   but WITHOUT ANY WARRANTY; without even the implied warranty of
0022 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0023 %   GNU General Public License for more details.
0024 %
0025 %   You should have received a copy of the GNU General Public License
0026 %   along with MATPOWER. If not, see <http://www.gnu.org/licenses/>.
0027 %
0028 %   Additional permission under GNU GPL version 3 section 7
0029 %
0030 %   If you modify MATPOWER, or any covered work, to interface with
0031 %   other modules (such as MATLAB code and MEX-files) available in a
0032 %   MATLAB(R) or comparable environment containing parts covered
0033 %   under other licensing terms, the licensors of MATPOWER grant
0034 %   you additional permission to convey the resulting work.
0035 
0036 %%------------------------------------------------------
0037 % for IEEE 14-bus system
0038 %%------------------------------------------------------
0039 % NOTE:
0040 % 1) all eight members of 'idx', 'measure' and 'sigma' must be
0041 % defined. They should be null vectors([]) if they do not have data
0042 % 2) all data used in this code are for testing purpose only
0043 %% which measurements are available
0044 idx.idx_zPF = [1;3;8;9;10;13;15;19];
0045 idx.idx_zPT = [4;5;7;11];
0046 idx.idx_zPG = [1;2];
0047 idx.idx_zVa = [];
0048 idx.idx_zQF = [1;3;8;9;10;13;15;19];
0049 idx.idx_zQT = [4;5;7;11];
0050 idx.idx_zQG = [1;2];
0051 idx.idx_zVm = [2;3];
0052 
0053 %% specify measurements
0054 measure.PF = [1.5708;0.734;0.2707;0.1546;0.4589;0.1834;0.2707;0.0188];
0055 measure.PT = [-0.5427;-0.4081;0.6006;-0.0816];
0056 measure.PG = [2.32;0.4];
0057 measure.Va = [];
0058 measure.QF = [-0.1748;0.0594;-0.154;-0.0264;-0.2084;0.0998;0.148;0.0141];
0059 measure.QT = [0.0213;-0.0193;-0.1006;-0.0864];
0060 measure.QG = [-0.169;0.424];
0061 measure.Vm = [1;1];
0062 
0063 %% specify measurement variances
0064 sigma.sigma_PF = 0.02;
0065 sigma.sigma_PT = 0.02;
0066 sigma.sigma_PG = 0.015;
0067 sigma.sigma_Va = [];
0068 sigma.sigma_QF = 0.02;
0069 sigma.sigma_QT = 0.02;
0070 sigma.sigma_QG = 0.015;
0071 sigma.sigma_Vm = 0.01;
0072 
0073 %% check input data integrity
0074 nbus = 14;
0075 [success, measure, idx, sigma] = checkDataIntegrity(measure, idx, sigma, nbus);
0076 if ~success
0077     error('State Estimation input data are not complete or sufficient!');
0078 end
0079     
0080 %% run state estimation
0081 casename = 'case14.m';
0082 type_initialguess = 2; % flat start
0083 [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:00:13 by m2html © 2005