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

Generated on Fri 09-Oct-2020 11:21:31 by m2html © 2005