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

test_se

PURPOSE ^

TEST_SE Test state estimation.

SYNOPSIS ^

function test_se

DESCRIPTION ^

TEST_SE  Test state estimation.
   created by Rui Bo on 2007/11/12

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function test_se
0002 %TEST_SE  Test state estimation.
0003 %   created by Rui Bo on 2007/11/12
0004 
0005 %   MATPOWER
0006 %   $Id: test_se.m,v 1.5 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 %%------------------------------------------------------
0035 % using data in Problem 6.7 in book 'Computational
0036 % Methods for Electric Power Systems' by Mariesa Crow
0037 %%------------------------------------------------------
0038 %% which measurements are available
0039 idx.idx_zPF = [1;2];
0040 idx.idx_zPT = [3];
0041 idx.idx_zPG = [1;2;3];
0042 idx.idx_zVa = [];
0043 idx.idx_zQF = [];
0044 idx.idx_zQT = [];
0045 idx.idx_zQG = [];
0046 idx.idx_zVm = [2;3];
0047 
0048 %% specify measurements
0049 measure.PF = [0.12;0.10];
0050 measure.PT = [-0.04];
0051 measure.PG = [0.58;0.30;0.14];
0052 measure.Va = [];
0053 measure.QF = [];
0054 measure.QT = [];
0055 measure.QG = [];
0056 measure.Vm = [1.04;0.98];
0057 
0058 %% specify measurement variances
0059 sigma.sigma_PF = 0.02;
0060 sigma.sigma_PT = 0.02;
0061 sigma.sigma_PG = 0.015;
0062 sigma.sigma_Va = [];
0063 sigma.sigma_QF = [];
0064 sigma.sigma_QT = [];
0065 sigma.sigma_QG = [];
0066 sigma.sigma_Vm = 0.01;
0067 
0068 %% check input data integrity
0069 nbus = 3;
0070 [success, measure, idx, sigma] = checkDataIntegrity(measure, idx, sigma, nbus);
0071 if ~success
0072     error('State Estimation input data are not complete or sufficient!');
0073 end
0074 
0075 %% run state estimation
0076 casename = 'case3bus_P6_6.m';
0077 type_initialguess = 2; % flat start
0078 [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