0001 function outputsesoln(idx, sigma, z, z_est, error_sqrsum)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 fd = 1;
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);