Home > matpower4.0 > 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 %   $Id: outputsesoln.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 fd = 1; % output to screen
0035 
0036 fprintf(fd, '\n================================================================================');
0037 fprintf(fd, '\n|     Comparison of measurements and their estimations                         |');
0038 fprintf(fd, '\n|     NOTE: In the order of PF, PT, PG, Va, QF, QT, QG, Vm (if applicable)     |');
0039 fprintf(fd, '\n================================================================================');
0040 fprintf(fd, '\n    Type        Index      Measurement   Estimation');
0041 fprintf(fd, '\n                 (#)         (pu)          (pu)    ');
0042 fprintf(fd, '\n -----------  -----------  -----------   ----------');
0043 cnt = 0;
0044 len = length(idx.idx_zPF);
0045 for i = 1: len
0046     fprintf(fd, '\n      PF        %3d      %10.4f     %10.4f', idx.idx_zPF(i), z(i+cnt), z_est(i+cnt));
0047 end
0048 cnt = cnt + len;
0049 len = length(idx.idx_zPT);
0050 for i = 1: len
0051     fprintf(fd, '\n      PT        %3d      %10.4f     %10.4f', idx.idx_zPT(i), z(i+cnt), z_est(i+cnt));
0052 end
0053 cnt = cnt + len;
0054 len = length(idx.idx_zPG);
0055 for i = 1: len
0056     fprintf(fd, '\n      PG        %3d      %10.4f     %10.4f', idx.idx_zPG(i), z(i+cnt), z_est(i+cnt));
0057 end
0058 cnt = cnt + len;
0059 len = length(idx.idx_zVa);
0060 for i = 1: len
0061     fprintf(fd, '\n      Va        %3d      %10.4f     %10.4f', idx.idx_zVa(i), z(i+cnt), z_est(i+cnt));
0062 end
0063 cnt = cnt + len;
0064 len = length(idx.idx_zQF);
0065 for i = 1: len
0066     fprintf(fd, '\n      QF        %3d      %10.4f     %10.4f', idx.idx_zQF(i), z(i+cnt), z_est(i+cnt));
0067 end
0068 cnt = cnt + len;
0069 len = length(idx.idx_zQT);
0070 for i = 1: len
0071     fprintf(fd, '\n      QT        %3d      %10.4f     %10.4f', idx.idx_zQT(i), z(i+cnt), z_est(i+cnt));
0072 end
0073 cnt = cnt + len;
0074 len = length(idx.idx_zQG);
0075 for i = 1: len
0076     fprintf(fd, '\n      QG        %3d      %10.4f     %10.4f', idx.idx_zQG(i), z(i+cnt), z_est(i+cnt));
0077 end
0078 cnt = cnt + len;
0079 len = length(idx.idx_zVm);
0080 for i = 1: len
0081     fprintf(fd, '\n      Vm        %3d      %10.4f     %10.4f', idx.idx_zVm(i), z(i+cnt), z_est(i+cnt));
0082 end
0083 
0084 fprintf(fd, '\n\n[Weighted sum of squared errors]:\t%f\n', error_sqrsum);

Generated on Mon 26-Jan-2015 14:56:45 by m2html © 2005