Home > matpower5.1 > extras > se > outputsesoln.m

outputsesoln

PURPOSE ^

OUTPUTSESOLN Output state estimation solution.

SYNOPSIS ^

function outputsesoln(idx, sigma, z, z_est, error_sqrsum)

DESCRIPTION ^

OUTPUTSESOLN  Output state estimation solution.
   created by Rui Bo on 2008/01/14

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function outputsesoln(idx, sigma, z, z_est, error_sqrsum)
0002 %OUTPUTSESOLN  Output state estimation solution.
0003 %   created by Rui Bo on 2008/01/14
0004 
0005 %   MATPOWER
0006 %   Copyright (c) 2009-2015 by Power System Engineering Research Center (PSERC)
0007 %   by Rui Bo
0008 %
0009 %   $Id: outputsesoln.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 fd = 1; % output to screen
0016 
0017 fprintf(fd, '\n================================================================================');
0018 fprintf(fd, '\n|     Comparison of measurements and their estimations                         |');
0019 fprintf(fd, '\n|     NOTE: In the order of PF, PT, PG, Va, QF, QT, QG, Vm (if applicable)     |');
0020 fprintf(fd, '\n================================================================================');
0021 fprintf(fd, '\n    Type        Index      Measurement   Estimation');
0022 fprintf(fd, '\n                 (#)         (pu)          (pu)    ');
0023 fprintf(fd, '\n -----------  -----------  -----------   ----------');
0024 cnt = 0;
0025 len = length(idx.idx_zPF);
0026 for i = 1: len
0027     fprintf(fd, '\n      PF        %3d      %10.4f     %10.4f', idx.idx_zPF(i), z(i+cnt), z_est(i+cnt));
0028 end
0029 cnt = cnt + len;
0030 len = length(idx.idx_zPT);
0031 for i = 1: len
0032     fprintf(fd, '\n      PT        %3d      %10.4f     %10.4f', idx.idx_zPT(i), z(i+cnt), z_est(i+cnt));
0033 end
0034 cnt = cnt + len;
0035 len = length(idx.idx_zPG);
0036 for i = 1: len
0037     fprintf(fd, '\n      PG        %3d      %10.4f     %10.4f', idx.idx_zPG(i), z(i+cnt), z_est(i+cnt));
0038 end
0039 cnt = cnt + len;
0040 len = length(idx.idx_zVa);
0041 for i = 1: len
0042     fprintf(fd, '\n      Va        %3d      %10.4f     %10.4f', idx.idx_zVa(i), z(i+cnt), z_est(i+cnt));
0043 end
0044 cnt = cnt + len;
0045 len = length(idx.idx_zQF);
0046 for i = 1: len
0047     fprintf(fd, '\n      QF        %3d      %10.4f     %10.4f', idx.idx_zQF(i), z(i+cnt), z_est(i+cnt));
0048 end
0049 cnt = cnt + len;
0050 len = length(idx.idx_zQT);
0051 for i = 1: len
0052     fprintf(fd, '\n      QT        %3d      %10.4f     %10.4f', idx.idx_zQT(i), z(i+cnt), z_est(i+cnt));
0053 end
0054 cnt = cnt + len;
0055 len = length(idx.idx_zQG);
0056 for i = 1: len
0057     fprintf(fd, '\n      QG        %3d      %10.4f     %10.4f', idx.idx_zQG(i), z(i+cnt), z_est(i+cnt));
0058 end
0059 cnt = cnt + len;
0060 len = length(idx.idx_zVm);
0061 for i = 1: len
0062     fprintf(fd, '\n      Vm        %3d      %10.4f     %10.4f', idx.idx_zVm(i), z(i+cnt), z_est(i+cnt));
0063 end
0064 
0065 fprintf(fd, '\n\n[Weighted sum of squared errors]:\t%f\n', error_sqrsum);

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