Home > matpower5.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 %   Copyright (c) 2009-2015 by Power System Engineering Research Center (PSERC)
0007 %   by Rui Bo
0008 %
0009 %   $Id: test_se.m 2644 2015-03-11 19:34:22Z ray $
0010 %
0011 %   This file is part of MATPOWER.
0012 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0013 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0014 
0015 %%------------------------------------------------------
0016 % using data in Problem 6.7 in book 'Computational
0017 % Methods for Electric Power Systems' by Mariesa Crow
0018 %%------------------------------------------------------
0019 %% which measurements are available
0020 idx.idx_zPF = [1;2];
0021 idx.idx_zPT = [3];
0022 idx.idx_zPG = [1;2;3];
0023 idx.idx_zVa = [];
0024 idx.idx_zQF = [];
0025 idx.idx_zQT = [];
0026 idx.idx_zQG = [];
0027 idx.idx_zVm = [2;3];
0028 
0029 %% specify measurements
0030 measure.PF = [0.12;0.10];
0031 measure.PT = [-0.04];
0032 measure.PG = [0.58;0.30;0.14];
0033 measure.Va = [];
0034 measure.QF = [];
0035 measure.QT = [];
0036 measure.QG = [];
0037 measure.Vm = [1.04;0.98];
0038 
0039 %% specify measurement variances
0040 sigma.sigma_PF = 0.02;
0041 sigma.sigma_PT = 0.02;
0042 sigma.sigma_PG = 0.015;
0043 sigma.sigma_Va = [];
0044 sigma.sigma_QF = [];
0045 sigma.sigma_QT = [];
0046 sigma.sigma_QG = [];
0047 sigma.sigma_Vm = 0.01;
0048 
0049 %% check input data integrity
0050 nbus = 3;
0051 [success, measure, idx, sigma] = checkDataIntegrity(measure, idx, sigma, nbus);
0052 if ~success
0053     error('State Estimation input data are not complete or sufficient!');
0054 end
0055 
0056 %% run state estimation
0057 casename = 'case3bus_P6_6.m';
0058 type_initialguess = 2; % flat start
0059 [baseMVA, bus, gen, branch, success, et, z, z_est, error_sqrsum] = run_se(casename, measure, idx, sigma, type_initialguess);

Generated on Fri 20-Mar-2015 18:23:34 by m2html © 2005