//example3.4 clc disp("The given values are,") disp("(I_0)=1 A, cos(psi_0)=0.4, I2=50 A, and cos(psi_2)=0.8") k=200/400 disp(k,"K=E2/E1=") k=0.5*50 disp(k,"Therefore, I2''(in A)=K*I2=") disp("The angle of (I2'') is to be decided from cos(psi_2)=0.8") disp("Now, cos(psi_2)=0.8") p=acosd(0.8) format(6) disp(p,"Therefore, (psi_2)[in degree]=") disp("I2'' is in antiphase with I2 which lags E2 by 36.86 degree") disp("Consider the phasor diagram shown in the fig 3.18. The fluz (psi) is the reference") disp("Now cos(psi_0)=0.4") c=acosd(0.4) disp(c,"Therefore, psi_0(in degree)") disp("vector(I1)=vector(I2'')+vector(I_0)") disp("Resolve (I_0) and (I2'') into two components, along reference (psi) and in quadrature with (psi) in phase with V1.") x=1*sind(66.42) format(7) disp(x,"x component of (I_0)=(I_0)*sin(psi_0)=") x=1*cosd(66.42) format(4) disp(x,"y component of (I_0)=(I_0)*(psi_0)=") disp("Therefore, vector(I_0)=0.9165+j(0.4) A") i=25*sind(36.86) format(7) disp(i,"x component of I2''(in A)=I2''*sin(psi_2)=") i=25*0.8 disp(i,"y component of I2''(in A)=I2''*cos(psi_2)=") disp("Thus the two component of I1 are as shown in the fig 3.18(c)") io=sqrt((15.9165^2)+(20.4^2)) disp(io,"I1(in A)=sqrt[((15.9165)^2)+(20.4)^2]=") disp("This is the primary current magnitude.") disp("while tan(phi_1)=15.9165/20.4") t=atand(15.9165/20.4) disp(t,"Therefore, (psi_1)[in degree]=") disp("Hence the primary power factor is,") i=cosd(37.96) disp(i,"cos(psi_1)[lagging]=cos(37.96)=") disp("Key point: Remember that (psi_1) is angle between V1 and I1 and as V1 is vertical, (psi_1) is measured with respect V1. So do not convert rectangular to polar as it goes angle with respect to x-axis and we want it with respect to y-axis.")