Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

the program that is needed to do the work is power world Five Bus System Homewor

ID: 2072679 • Letter: T

Question



the program that is needed to do the work is power world

Five Bus System Homework Assignment Thanks to Prof Chen-Ching Liu and Ph.D. Candidate Madeleine Gibescu ofthe University of Washington for this problem set Download the cases needed for the Assignment (PW Simulator 5.0 or later format) A one line diagram, together with the bus and line data, of a 5-bus power system is shown below; the system will be referred to as utility A. Solve the following problems using thePowerWorld Simulator and the original data file 454 0.pwb and the one-line diagram file 454 0.pwd 1. For the power system of utility A, use the PowerWorld program to find the MVAr rating of a shunt capacitor at bus 3 that increases V3 to 1.00 p.u. Determine the effect of the capacitor bank on the line loading and total 12R losses 2. Run the original power flow for utility A. Do you find any voltage violations? (The normal range of bus voltages is assumed to be 0.95-1.05 p.u. Now suppose both transformers in this system are tap changing transformers whose taps can be varied from 0.85 to 1.15 p.u. in increments of 0.05 p.u. Determine the tap settings required to increase the voltage at bus 3 to 0.95 p.u., while causing as few high voltage violations as possible at the other buses 3. A new transformer is installed between buses 2 and 5, in parallel with the existing transformer between buses 2 and 5. The new transformer is identical to the existing transformer. The taps on both transformers are set to the nominal value, 1.0 p.u. Find the real power, reactive power and MVA supplied by each of these transformers to bus 5 4. Refer to the one-line diagram of utility A. Suppose an additional line is installed between buses 3 and 4. The line parameters of the added line are equal to those of the existing line 3-4. Determine the effects on the voltage at bus 3, line loading and total 12R losses 5. In problem 2 you already ran the power flow for utility A and detected low voltage violations Place a capacitor at bus 3 to bring the bus 3 voltage up to 0.95 p.u. Determine the size of the capacitor bank. Now suppose the line between buses 3 and 5 is removed for maintenance. Run the power flow again. s the operating condition acceptable? If not, determine the amount of load you have to shed at bus 3 in order to maintain the bus 3 voltage above 0.95 p.u. Cut the same percentage of MW and MVAr at bus 3

Explanation / Answer

.                              MAIN MENU

                                   =========

      1 LOAD THE PSF                        8 DATA VERIFICATIO

      2 IMPORTING UTILITIES                 9 LIMIT CHECKS

      3 INPUT DATA PROCESSING              10 SENSITIVITY FACTORS

      4 STUDY PREPARATION UTILITIES        11 EXPORTING UTILITIES

      5 POWER FLOW SOLUTION                12 CLOSE THE PSF

      6 NETWORK REDUCTION                  13 QUIT

      7 POWER FLOW SOLUTION REPORTING

ENTER MENU CHOICE: 5

                         *** POWER FLOW SOLUTION ***

                         =============================

                          1 AUTOMATIC SOLUTION

                          2 FAST DECOUPLED (XB)

                          3 NEWTON RAPHSON

                          4 FAST DECOUPLED (BX)

                          5 LOCALIZED SOLUTION (FD XB)

                          6 DC POWER FLOW SOLUTION

                          7 POWER FLOW SOLUTION OPTIONS

ITEM #, EXIT 3

*** START OF NEWTON RAPHSON ITERATIONS ***

ITERATION :   1   NEWTON RAPHSON                  UNSOLVED ABSOLUTE ERROR

-------------- BUS WITH LARGEST ERROR ------------ BUSES     SUMMATION

P(P.U. MW)       0.000375 (    30 BUS    3138.    )     0          0.0017

V(RADIANS)       0.000179 (    70 BUS    7138.    )     8          0.0016

Q(P.U. MVAR)     0.001873 (   120 BUS   12230.    )     0          0.0078

V(P.U. KV)       0.000210 (    30 BUS    3138.    )     3          0.0009

ITERATION :   2   NEWTON RAPHSON                  UNSOLVED ABSOLUTE ERROR

-------------- BUS WITH LARGEST ERROR ------------ BUSES     SUMMATION

P(P.U. MW)       0.000006 (   160 BUS   16230.    )     0          0.0000

Q(P.U. MVAR)    -0.000008 (   170 BUS   17230.    )     0          0.0000

*** POWER FLOW SOLUTION IS REACHED IN     2 ITERATIONS ***

2.                              MAIN MENU

                                   =========

      1 LOAD THE PSF                        8 DATA VERIFICATION

      2 IMPORTING UTILITIES                 9 LIMIT CHECKS

      3 INPUT DATA PROCESSING              10 SENSITIVITY FACTORS

      4 STUDY PREPARATION UTILITIES        11 EXPORTING UTILITIES

      5 POWER FLOW SOLUTION                12 CLOSE THE PSF

      6 NETWORK REDUCTION                  13 QUIT

      7 POWER FLOW SOLUTION REPORTING

ENTER MENU CHOICE: 9

                      ** LOAD FLOW SOLUTION LIMIT CHECK **

                      ====================================

           1 OVERLOADED LINES OR TRANSFORMERS

           2 CONTROL PARAMETERS VIOLATION

           3 BUS VOLTAGE OUTSIDE SPECIFIED BAND

           4 LINES ACROSS WHICH THE ANGLE EXCEEDS THE SPECIFIED VALUE

           5 CHECK FOR ALL LIMITS AND VIOLATIONS

           6 SORT OPTIONS

ITEM #, SPECIFY SUBSYSTEM, EXIT 1

ALL LINES TRANSFORMERS: A

                     *** LOAD FLOW SOLUTION LIMIT CHECK ***

         1 OVERLOADED BRANCHES        RATING GROUP = 1 % LOADING = 100.0

<----- FROM BUS -----> <------ TO BUS ------>            MVA     MVA PERCENT

NUMBER       NAME       NUMBER       NAME         CKT    LOADING RATING LOADING

====== ================ ====== ================ ======== ======= ====== =======

    60 BUS    6138.        100 BUS   10138.     1          175.4 175.0 100.22

3.                 ** LOAD FLOW SOLUTION LIMIT CHECK **

                      ====================================

           1 OVERLOADED LINES OR TRANSFORMERS

           2 CONTROL PARAMETERS VIOLATION

           3 BUS VOLTAGE OUTSIDE SPECIFIED BAND

           4 LINES ACROSS WHICH THE ANGLE EXCEEDS THE SPECIFIED VALUE

           5 CHECK FOR ALL LIMITS AND VIOLATIONS

           6 SORT OPTIONS

ITEM #, SPECIFY SUBSYSTEM, EXIT 3

HI VOLTAGE LIMIT LO VOLTAGE LIMIT: L

ENTER VALUE IN PU: .99

                     *** LOAD FLOW SOLUTION LIMIT CHECK ***

                               4 BUSES WITH V < 0.990

<-------- BUS -------->              <-- VOLTAGE -->

NUMBER       NAME       TYPE BASE KV   MAG    ANGLE AREA ZONE     OWNER ID

====== ================ ==== ======= ======= ======= ==== ==== ================

    30 BUS    3138.     1     138.00 0.9868 -26.02   10    1 BLANK

    40 BUS    4138.     1     138.00 0.9888 -20.27   10    1 BLANK

    90 BUS    9138.     1     138.00 0.9824 -15.83   10    1 BLANK

   120 BUS   12230.     1     230.00 0.9876   -4.73   10    1 BLANK

UP DOWN SCREEN DUMP LIST TO FILE CHANGE RATING EXIT : e

4.                              MAIN MENU

                                   =========

      1 LOAD THE PSF                        8 DATA VERIFICATION

      2 IMPORTING UTILITIES                 9 LIMIT CHECKS

      3 INPUT DATA PROCESSING              10 SENSITIVITY FACTORS

      4 STUDY PREPARATION UTILITIES        11 EXPORTING UTILITIES

      5 POWER FLOW SOLUTION                12 CLOSE THE PSF

      6 NETWORK REDUCTION                  13 QUIT

      7 POWER FLOW SOLUTION REPORTING

ENTER MENU CHOICE: 7

                     ** LOAD FLOW SOLUTION REPORTING **

                    ==================================

1 MISMATCH SUMMARY                     11 ULTC/PS SUMMARY

2 SUBSYSTEM SUMMARY                    12 SERIES COMPENSATORS

3 BUS SHUNT DATA                       13 POWER FLOW SUMMARY

4 PLANT DATA                           14 SECTIONALIZED BRANCHES

5 MACHINE DATA                         15 STATIC TAP CHANGERS / PHASE SHIFTERS

6 AREA INTERCHANGE DATA                16 THREE WINDING TRANSFORMERS

7 TIE LINE FLOWS                       17 INTERFACE FLOWS

8 BUS FLOWS                            18 VOLTAGE PROFILE

9 DC CONVERTERS                        19 SORT OPTIONS

10 DC FLOWS

ITEM #, SPECIFY SUBSYSTEM, EXIT 8

SUBSYSTEM BUSES PICK BUSES EXIT: p

ENTER BUS LIST FILE NAME OR BUSES TO INCLUDE OR EXCLUDE

> 60

                     *** SOLUTION REPORTING - BUS FLOWS ***

                             BUS:    60 BUS    6138.

                   VOLTAGE : 1.0017 PU (   138.2 kV)   -20.67

BUS NUM        NAME       AREA   CKT       MW      MVAR       MVA      TAP

======== ================ ==== ======== ======== ======== = ======== ========

LOAD                                      136.00    28.00     138.85

SW SHUNT                                    0.00   100.33     100.33

TO   100 BUS   10138.       10 1         -128.63 -107.64     167.73

TO    20 BUS    2138.       10 1           -7.37   -20.69      21.96

UP DOWN NEXT BUS PREVIOUS BUS SCREEN DUMP LIST TO FILE EXIT : e

SUBSYSTEM BUSES PICK BUSES EXIT: p

ENTER BUS LIST FILE NAME OR BUSES TO INCLUDE OR EXCLUDE

> 100

                     *** SOLUTION REPORTING - BUS FLOWS ***

                             BUS:   100 BUS   10138.

                   VOLTAGE : 1.0132 PU (   139.8 kV)   -16.15

BUS NUM        NAME       AREA   CKT       MW      MVAR       MVA      TAP

======== ================ ==== ======== ======== ======== = ======== ========

LOAD                                      195.00    40.00     199.06

TO   120 BUS   12230.       10 1         -234.48    60.92     242.27 1.0000LK

TO   110 BUS   11230.       10 1         -235.99    52.21     241.70 1.0000LK

TO    80 BUS    8138.       10 1           69.77    -3.74      69.87

TO    60 BUS    6138.       10 1          130.95 -131.80     185.80

TO    50 BUS    5138.       10 1           74.76   -17.59      76.80

UP DOWN NEXT BUS PREVIOUS BUS SCREEN DUMP LIST TO FILE EXIT : e

5.                   ** LOAD FLOW SOLUTION REPORTING **

                       ==================================

1 MISMATCH SUMMARY                     11 ULTC/PS SUMMARY

2 SUBSYSTEM SUMMARY                    12 SERIES COMPENSATORS

3 BUS SHUNT DATA                       13 POWER FLOW SUMMARY

4 PLANT DATA                           14 SECTIONALIZED BRANCHES

5 MACHINE DATA                         15 STATIC TAP CHANGERS / PHASE SHIFTERS

6 AREA INTERCHANGE DATA                16 THREE WINDING TRANSFORMERS

7 TIE LINE FLOWS                       17 INTERFACE FLOWS

8 BUS FLOWS                            18 VOLTAGE PROFILE

9 DC CONVERTERS                        19 SORT OPTIONS

10 DC FLOWS

ITEM #, SPECIFY SUBSYSTEM, EXIT 4

                    *** SOLUTION REPORTING - PLANT DATA ***

                    =======================================

                  1 ALL PLANTS

                  2 ON LINE PLANTS

                  3 PLANTS AT VAR LIMIT WITH UNEQUAL VAR LIMITS

                  4 PLANTS WITH UNSCHEDULED REACTIVE POWER

                  5 PLANTS CONTROLLING A REMOTE BUS

                  6 PLANTS WITH RESERVE REACTIVE POWER

ITEM #, EXIT 1

                           *** SOLUTION REPORTING ***

                                     10 PLANTS

     PLANT BUS                 MACHINES

   NUM         NAME       TYPE I/S O/S    MW      MVAR     QMAX     QMIN      

======== ================ ==== ======== ======== ======== ======== ========    

R     10 BUS    1138.        2   4    0   134.70    41.53   280.00   -50.00    

R     20 BUS    2138.        2   4    0   187.00    30.50   140.00 -100.00    

R     70 BUS    7138.        2   3    0   165.00    91.63   280.00     0.00    

R    130 BUS   13230.        3   3    0   337.53   170.64   540.00 -300.00    

R    150 BUS   15230.        2   6    0   185.00    40.36   310.00   -55.00    

R    160 BUS   16230.        2   1    0   155.00   106.41   280.00   -55.00    

R    180 BUS   18230.        2   1    0   400.00   100.73   200.00   -90.00    

R    210 BUS   21230.        2   1    0   400.00    25.25   200.00   -90.00    

R    220 BUS   22230.        2   6    0   300.00   -80.55   696.00 -560.00    

R    230 BUS   23230.        2   3    0   660.00    33.34   310.00 -125.00    

UP DOWN OTHER SCREEN SCREEN DUMP LIST TO FILE EXIT :e

CODES: 1.) CODE FOR TAKING BUS DATA

(busdata.m)

% Returns Initial Bus datas of the system... function busdt = busdatas() % Type.... %

1 - Slack Bus.. % 2 - PV Bus.. % 3 - PQ Bus.. % |Bus | Type | Vsp | theta | PGi | QGi | PLi | QLi |

busdat14 = [1 1 1.00 0 0 0 100 0 ; 2 2 1.01 0 250 0 200 100 ; 3 3 1.00 0 0 0 300 100 ;]; busdt = busdat14; 2.) CODE FOR TAKING LINE DATA

(linedatas.m) % Returns Line datas of the system... function linedt = linedatas() % | From | To | R | X | B/2 | % | Bus | Bus | pu | pu | pu |

linedat14 = [1 2 0.01 0.05 0 1 3 0.015 0.05 0 2 3 0.015 0.05 0 ]; linedt = linedat14;

3.) CODE FOR BUILDING Y-BUS MATRIX (ybusmatrix.m)

Program to for Admittance And Impedance Bus Formation....

function Y = ybusmatrix() % Returns Y

linedata = linedatas(); % Calling Linedatas..

. fb = linedata(:,1); % From bus number..

. tb = linedata(:,2); % To bus number...

r = linedata(:,3); % Resistance, R...

x = linedata(:,4); % Reactance, X..

b = linedata(:,5); % Ground Admittance

, B/2... z = r + i*x; % z matrix..

. y = 1./z; % To get inverse of each element..

. b = i*b;% Make B imaginary...

nb = max(max(fb),max(tb)); % No. of buses...

nl = length(fb); % No. of branches..

. Y = zeros(nb,nb); % Initialise YBus... % Formation of the Off Diagonal Elements... for

k = 1:nl Y(fb(k),tb(k)) = Y(fb(k),tb(k)) - y(k); Y(tb(k),fb(k)) = Y(fb(k),tb(k));

end %

Formation of Diagonal Elements.... for m = 1:nb

for n = 1:nl

if fb(n) == m Y(m,m) = Y(m,m) + y(n) + b(n);

elseif

tb(n) == m Y(m,m) = Y(m,m) + y(n) + b(n);

end

end

end

%Y; % Bus Admittance Matrix %

Z = inv(Y); % Bus Impedance Matrix

4.) CODE FOR THE NEWTON-RAPHSON ITERATIONS (main.m) %

Program for Newton-Raphson Load Flow Analysis..

nbus=3; Y = ybusmatrix(); % Calling ybusmatrix.m to get Y-Bus Matrix..

busd = busdatas(); % Calling busdatas..

BMva = 100; % Base MVA..

bus = busd(:,1); % Bus Number..

type = busd(:,2); % Type of Bus 1-Slack, 2-PV, 3-PQ..

V = busd(:,3); % Specified Voltage..

del = busd(:,4); % Voltage Angle..

Pg = busd(:,5)/BMva; % PGi..

Qg = busd(:,6)/BMva; % QGi..

Pl = busd(:,7)/BMva; % PLi..

Ql = busd(:,8)/BMva; % QLi..

P = Pg - Pl; % Pi = PGi - PLi..

Q = Qg - Ql; % Qi = QGi - QLi..

Psp = P; % P Specified..

Qsp = Q; % Q Specified..

G = real(Y); % Conductance matrix..

B = imag(Y); % Susceptance matrix..

pv = find(type == 2 | type == 1); % PV Buses.

. pq = find(type == 3); % PQ Buses.

. npv = length(pv); % No. of PV buses..

npq = length(pq); % No. of PQ buses.. T

ol = 1; Iter = 1;

while (Tol > 1e-5) % Iteration starting..

P = zeros(nbus,1);

Q = zeros(nbus,1); % Calculate P and Q for i = 1:nbus

for k = 1:nbus

P(i) = P(i) + V(i)* V(k)*(G(i,k)*cos(del(i)-del(k)) + B(i,k)*sin(del(i)-del(k)));

Q(i) = Q(i) + V(i)* V(k)*(G(i,k)*sin(del(i)-del(k)) - B(i,k)*cos(del(i)-del(k)));

end

end

% Calculate change from specified value

dPa = Psp-P;

dQa = Qsp-Q; k = 1;

dQ = zeros(npq,1);

for i = 1:nbus

if type(i) == 3 dQ(k,1) = dQa(i);

k = k+1; end

end

dP = dPa(2:nbus);

M = [dP; dQ]; % Mismatch Vector % Jacobian % J1 - Derivative of Real Power Injections with Angles..

J1 = zeros(nbus-1,nbus-1);

for i = 1:(nbus-1)

m = i+1;

for k = 1:(nbus-1)

n = k+1;

if n == m for n = 1:nbus

J1(i,k) = J1(i,k) + V(m)* V(n)*(-G(m,n)*sin(del(m)- del(n)) + B(m,n)*cos(del(m)-del(n)));

end

J1(i,k) = J1(i,k) - V(m)^2*B(m,m);

else J1(i,k) = V(m)* V(n)*(G(m,n)*sin(del(m)-del(n)) - B(m,n)*cos(del(m)-del(n)));

end

end

end

% J2 - Derivative of Real Power Injections with V..

J2 = zeros(nbus-1,npq);

for i = 1:(nbus-1) m = i+1;

for k = 1:npq n = pq(k);

if n == m for n = 1:nbus

J2(i,k) = J2(i,k) + V(n)*(G(m,n)*cos(del(m)-del(n)) + B(m,n)*sin(del(m)-del(n)));

end

J2(i,k) = J2(i,k) + V(m)*G(m,m);

else

J2(i,k) = V(m)*(G(m,n)*cos(del(m)-del(n)) + B(m,n)*sin(del(m)-del(n)));

end

end

end

% J3 - Derivative of Reactive Power Injections with Angles.. J3 = zeros(npq,nbus-1); for i = 1:npq m = pq(i);

for k = 1:(nbus-1) n = k+1;

if n == m for n = 1:nbus

J3(i,k) = J3(i,k) + V(m)* V(n)*(G(m,n)*cos(del(m)- del(n)) + B(m,n)*sin(del(m)-del(n)));

end

J3(i,k) = J3(i,k) - V(m)^2*G(m,m); else J3(i,k) = V(m)* V(n)*(-G(m,n)*cos(del(m)-del(n)) - B(m,n)*sin(del(m)-del(n)));

end

end

end

% J4 - Derivative of Reactive Power Injections with V..

J4 = zeros(npq,npq);

for i = 1:npq

m = pq(i);

for k = 1:npq n = pq(k);

if n == m

for n = 1:nbus

J4(i,k) = J4(i,k) + V(n)*(G(m,n)*sin(del(m)-del(n)) - B(m,n)*cos(del(m)-del(n)));

end

J4(i,k) = J4(i,k) - V(m)*B(m,m);

else J4(i,k) = V(m)*(G(m,n)*sin(del(m)-del(n)) - B(m,n)*cos(del(m)-del(n)));

end

end

end

J = [J1 J2; J3 J4]; % Jacobian Matrix..

X = inv(J)*M; % Correction Vector

dTh = X(1:nbus-1); % Change in Voltage Angle..

dV = X(nbus:end); % Change in Voltage Magnitude..

% Updating State Vectors..

del(2:nbus) = dTh + del(2:nbus); % Voltage Angle..

k = 1;

for i = 2:nbus

if type(i) == 3 V(i) = dV(k) + V(i); % Voltage Magnitude..

k = k+1;

end

end

Iter = Iter + 1;

Tol = max(abs(M)); % Tolerance..

end

loadflow(nbus,V,del,BMva); % Calling Loadflow.m..

5.) CODE FOR THE PRINTING THE LOADFLOW SOLUTION (loadflow.m)

% Program for Bus Power Injections, Line & Power flows (p.u)...

function [Pi Qi Pg Qg Pl Ql] = loadflow(nb,V,del,BMva) Y = ybusmatrix(); % Calling Ybus program..

lined = linedatas(); % Get linedats..

busd = busdatas(); % Get busdatas.

. Vm = pol2rect(V,del); % Converting polar to rectangular.

. Del = 180/pi*del; % Bus Voltage Angles in Degree...

fb = lined(:,1); % From bus number..

. tb = lined(:,2); % To bus number...

nl = length(fb); % No. of Branches..

Pl = busd(:,7); %

PLi.. Ql = busd(:,8); %

QLi.. Iij = zeros(nb,nb);

Sij = zeros(nb,nb);

Si = zeros(nb,1); % Bus Current Injections..

I = Y*Vm; Im = abs(I);

Ia = angle(I); %Line Current Flows..

for m = 1:nl

p = fb(m);

q = tb(m);

Iij(p,q) = -(Vm(p) - Vm(q))*Y(p,q);%

Y(m,n) = -y(m,n).. Iij(q,p) = -Iij(p,q);

end Iij = sparse(Iij);

Iijm = abs(Iij);

Iija = angle(Iij);

% Line Power Flows..

for m = 1:nb

for n = 1:nb

if m ~= n Sij(m,n) = Vm(m)*conj(Iij(m,n))*BMva;

end

end

end

Sij = sparse(Sij);

Pij = real(Sij);

Qij = imag(Sij); % Line Losses..

Lij = zeros(nl,1); for m = 1:nl

p = fb(m); q = tb(m); Lij(m) = Sij(p,q) + Sij(q,p); end Page | 19 Lpij = real(Lij); Lqij = imag(Lij); % Bus Power Injections.. for i = 1:nb for k = 1:nb Si(i) = Si(i) + conj(Vm(i))* Vm(k)*Y(i,k)*BMva; end end Pi = real(Si); Qi = -imag(Si); Pg = Pi+Pl; Qg = Qi+Ql; disp('##################################################################### ####################'); disp('--------------------------------------------------------------------- --------------------'); disp(' Newton Raphson Loadflow Analysis '); disp('--------------------------------------------------------------------- --------------------'); disp('| Bus | V | Angle | Injection | Generation | Load |'); disp('| No | pu | Degree | MW | MVar | MW | Mvar | MW | MVar | '); for m = 1:nb disp('----------------------------------------------------------------- ------------------------'); fprintf('%3g', m); fprintf(' %8.4f', V(m)); fprintf(' %8.4f', Del(m)); fprintf(' %8.3f', Pi(m)); fprintf(' %8.3f', Qi(m)); fprintf(' %8.3f', Pg(m)); fprintf(' %8.3f', Qg(m)); fprintf(' %8.3f', Pl(m)); fprintf(' %8.3f', Ql(m)); fprintf(' '); end disp('--------------------------------------------------------------------- --------------------'); fprintf(' Total ');fprintf(' %8.3f', sum(Pi)); fprintf(' %8.3f', sum(Qi)); fprintf(' %8.3f', sum(Pi+Pl)); fprintf(' %8.3f', sum(Qi+Ql)); fprintf(' %8.3f', sum(Pl)); fprintf(' %8.3f', sum(Ql)); fprintf(' '); disp('--------------------------------------------------------------------- --------------------'); disp('##################################################################### ####################'); disp('--------------------------------------------------------------------- ----------------'); disp(' Line FLow and Losses '); disp('--------------------------------------------------------------------- ----------------'); disp('|From|To | P | Q | From| To | P | Q | Line Loss |'); disp('|Bus |Bus| MW | MVar | Bus | Bus| MW | MVar | MW | MVar |'); for m = 1:nl p = fb(m); q = tb(m); disp('----------------------------------------------------------------- --------------------'); fprintf('%4g', p); fprintf('%4g', q); fprintf(' %8.3f', full(Pij(p,q))); fprintf(' %8.3f', full(Qij(p,q))); Page | 20 fprintf(' %4g', q); fprintf('%4g', p); fprintf(' %8.3f', full(Pij(q,p))); fprintf(' %8.3f', full(Qij(q,p))); fprintf(' %8.3f', Lpij(m)); fprintf(' %8.3f', Lqij(m)); fprintf(' '); end disp('--------------------------------------------------------------------- ----------------'); fprintf(' Total Loss '); fprintf(' %8.3f', sum(Lpij)); fprintf(' %8.3f', sum(Lqij)); fprintf(' '); disp('--------------------------------------------------------------------- ----------------'); disp('##################################################################### ################');