Home > matpower7.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-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 fd = 1; % output to screen
0014 
0015 fprintf(fd, '\n================================================================================');
0016 fprintf(fd, '\n|     Comparison of measurements and their estimations                         |');
0017 fprintf(fd, '\n|     NOTE: In the order of PF, PT, PG, Va, QF, QT, QG, Vm (if applicable)     |');
0018 fprintf(fd, '\n================================================================================');
0019 fprintf(fd, '\n    Type        Index      Measurement   Estimation');
0020 fprintf(fd, '\n                 (#)         (pu)          (pu)    ');
0021 fprintf(fd, '\n -----------  -----------  -----------   ----------');
0022 cnt = 0;
0023 len = length(idx.idx_zPF);
0024 for i = 1: len
0025     fprintf(fd, '\n      PF        %3d      %10.4f     %10.4f', idx.idx_zPF(i), z(i+cnt), z_est(i+cnt));
0026 end
0027 cnt = cnt + len;
0028 len = length(idx.idx_zPT);
0029 for i = 1: len
0030     fprintf(fd, '\n      PT        %3d      %10.4f     %10.4f', idx.idx_zPT(i), z(i+cnt), z_est(i+cnt));
0031 end
0032 cnt = cnt + len;
0033 len = length(idx.idx_zPG);
0034 for i = 1: len
0035     fprintf(fd, '\n      PG        %3d      %10.4f     %10.4f', idx.idx_zPG(i), z(i+cnt), z_est(i+cnt));
0036 end
0037 cnt = cnt + len;
0038 len = length(idx.idx_zVa);
0039 for i = 1: len
0040     fprintf(fd, '\n      Va        %3d      %10.4f     %10.4f', idx.idx_zVa(i), z(i+cnt), z_est(i+cnt));
0041 end
0042 cnt = cnt + len;
0043 len = length(idx.idx_zQF);
0044 for i = 1: len
0045     fprintf(fd, '\n      QF        %3d      %10.4f     %10.4f', idx.idx_zQF(i), z(i+cnt), z_est(i+cnt));
0046 end
0047 cnt = cnt + len;
0048 len = length(idx.idx_zQT);
0049 for i = 1: len
0050     fprintf(fd, '\n      QT        %3d      %10.4f     %10.4f', idx.idx_zQT(i), z(i+cnt), z_est(i+cnt));
0051 end
0052 cnt = cnt + len;
0053 len = length(idx.idx_zQG);
0054 for i = 1: len
0055     fprintf(fd, '\n      QG        %3d      %10.4f     %10.4f', idx.idx_zQG(i), z(i+cnt), z_est(i+cnt));
0056 end
0057 cnt = cnt + len;
0058 len = length(idx.idx_zVm);
0059 for i = 1: len
0060     fprintf(fd, '\n      Vm        %3d      %10.4f     %10.4f', idx.idx_zVm(i), z(i+cnt), z_est(i+cnt));
0061 end
0062 
0063 fprintf(fd, '\n\n[Weighted sum of squared errors]:\t%f\n', error_sqrsum);

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