0001 function outputsesoln(idx, sigma, z, z_est, error_sqrsum)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 fd = 1;
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);