diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1964/CH4 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1964/CH4')
-rwxr-xr-x | 1964/CH4/EX4.1/ex4_1.sce | 67 | ||||
-rwxr-xr-x | 1964/CH4/EX4.10/ex4_10.sce | 22 | ||||
-rwxr-xr-x | 1964/CH4/EX4.11/ex4_11.sce | 12 | ||||
-rwxr-xr-x | 1964/CH4/EX4.12/ex4_12.sce | 29 | ||||
-rwxr-xr-x | 1964/CH4/EX4.13/ex4_13.sce | 28 | ||||
-rwxr-xr-x | 1964/CH4/EX4.14/ex4_14.sce | 15 | ||||
-rwxr-xr-x | 1964/CH4/EX4.15/ex4_15.sce | 14 | ||||
-rwxr-xr-x | 1964/CH4/EX4.16/ex4_16.sce | 19 | ||||
-rwxr-xr-x | 1964/CH4/EX4.17/ex4_17.sce | 23 | ||||
-rwxr-xr-x | 1964/CH4/EX4.18/ex4_18.sce | 20 | ||||
-rwxr-xr-x | 1964/CH4/EX4.19/ex4_19.sce | 17 | ||||
-rwxr-xr-x | 1964/CH4/EX4.2/ex4_2.sce | 31 | ||||
-rwxr-xr-x | 1964/CH4/EX4.20/ex4_20.sce | 19 | ||||
-rwxr-xr-x | 1964/CH4/EX4.21/ex4_21.sce | 29 | ||||
-rwxr-xr-x | 1964/CH4/EX4.22/ex4_22.sce | 33 | ||||
-rwxr-xr-x | 1964/CH4/EX4.23/ex4_23.sce | 40 | ||||
-rwxr-xr-x | 1964/CH4/EX4.24/ex4_24.sce | 15 | ||||
-rwxr-xr-x | 1964/CH4/EX4.25/ex4_25.sce | 62 | ||||
-rwxr-xr-x | 1964/CH4/EX4.3/ex4_3.sce | 15 | ||||
-rwxr-xr-x | 1964/CH4/EX4.4/ex4_4.sce | 11 | ||||
-rwxr-xr-x | 1964/CH4/EX4.5/ex4_5.sce | 29 | ||||
-rwxr-xr-x | 1964/CH4/EX4.6/ex4_6.sce | 25 | ||||
-rwxr-xr-x | 1964/CH4/EX4.7/ex4_7.sce | 14 | ||||
-rwxr-xr-x | 1964/CH4/EX4.8/ex4_8.sce | 15 | ||||
-rwxr-xr-x | 1964/CH4/EX4.9/ex4_9.sce | 19 |
25 files changed, 623 insertions, 0 deletions
diff --git a/1964/CH4/EX4.1/ex4_1.sce b/1964/CH4/EX4.1/ex4_1.sce new file mode 100755 index 000000000..50a552548 --- /dev/null +++ b/1964/CH4/EX4.1/ex4_1.sce @@ -0,0 +1,67 @@ +//Chapter-4, Example 4.1, Page 126
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+//for WAVEFORM 1
+//Average Value
+b1=2;
+h1=5;
+area1=0.5*b1*h1;//area under one complete cycle(area of a triangle)
+av0=area1/2;//average value
+//rms value
+area2=0.33*(h1)^2*b1;
+rms=sqrt(area2/b1);//rms value
+//form factor
+ff=rms/av0;//form factor
+//peak factor
+Kp=h1/rms;//peak factor
+mprintf("WAVEFORM 1\n");
+mprintf("average value=%1.1f amps,rms value=%1.3f amps,formfactor=%1.3f ,peak factor=%1.3f\n",av0,rms,ff,Kp);
+//for WAVEFORM 2
+//Average Value
+T=1;//assuming time period is 1
+h2=100;
+h3=-50;
+area3=(h2+h3)*(T/2);//area under one complete cycle(area of a rectangle)
+av=area3/T;//average value
+//rms value
+area_under_squared_curve=((h2)^2+(h3)^2)*(T/2);
+rms1=sqrt(area_under_squared_curve/T);//rms value
+//form factor
+ff1=rms1/av;//form factor
+//peak factor
+Kp1=h2/rms1;//peak factor
+mprintf("WAVEFORM 2\n");
+mprintf("average value=%d volts,rms value=%2.3f volt,formfactor=%1.2f ,peak factor=%1.2f\n",av,rms1,ff1,Kp1);
+//for WAVEFORM 3
+//Average Value
+Vm=1;//assuming mean voltage is 1
+a1=0.5*Vm*(%pi/3);//area of the triangle from 0 to (pi/3)
+a2=Vm*(%pi/3);//area of the rectangle for period (pi/3) to (2*pi/3)
+a3=0.5*Vm*(%pi/3);//area of the triangle from (2*pi/3) to pi
+a=a1+a2+a3;
+av2=(a/%pi);//average value
+//rms value
+area_under_squared_curv2=((Vm)^2*(%pi/3)*(5/3))
+rms2=sqrt(area_under_squared_curv2/(%pi));//rms value
+//form factor
+ff2=rms2/av2;//form factor
+//peak factor
+Kp2=Vm/rms2;//peak factor
+mprintf("WAVEFORM 3\n");
+mprintf("average value=%1.3f volts,rms value=%1.3f volt,formfactor=%1.2f ,peak factor=%1.3f\n",av2,rms2,ff2,Kp2);
+//for WAVEFORM 4
+//Average Value
+T2=1;//let timeperiod=1
+av3=(100*(T2/2))/(T2/2);//average
+//rms value
+area_under_squared_curv3=((100)^2*(T2/2));
+rms3=sqrt((area_under_squared_curv3)/(T2/2));//rms value
+//form factor
+ff3=rms3/av3;//form factor
+//peak factor
+Kp3=100/rms3;//peak factor
+mprintf("WAVEFORM 4\n");
+mprintf("average value=%d volts,rms value=%d volt,formfactor=%d ,peak factor=%d\n",av3,rms3,ff3,Kp3);
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.10/ex4_10.sce b/1964/CH4/EX4.10/ex4_10.sce new file mode 100755 index 000000000..dfa71759d --- /dev/null +++ b/1964/CH4/EX4.10/ex4_10.sce @@ -0,0 +1,22 @@ +//Chapter-4, Example 4.10, Page 137
+//=============================================================================
+clc
+clear
+//INPUT DATA
+f=50;//freq in c/s
+I=20;//current in A
+Im=I/sqrt(2);
+t=0.0025;//time in sec
+//equation for instantaneous emf
+i=(20*sqrt(2))*sin(2*%pi*f*t);
+t1=0.0125;
+i1=(20*sqrt(2))*sin(2*%pi*f*t1);
+i2=14.14;
+x=(i2)/(20*(sqrt(2)));
+y=asin(x);
+z=(2*%pi*50);
+t=y/z;
+mprintf("current when t is 00025 sec and 0.0125 sec are %d A and %d A respectively\n",i,i1);
+mprintf("time when value of instantaneous cureent 14.14 is %g sec",t);
+//note:in textbook for sub div (c) square root has not taken for maximum value computed
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.11/ex4_11.sce b/1964/CH4/EX4.11/ex4_11.sce new file mode 100755 index 000000000..fcc480314 --- /dev/null +++ b/1964/CH4/EX4.11/ex4_11.sce @@ -0,0 +1,12 @@ +//Chapter-4, Example 4.11, Page 137
+//=============================================================================
+clc
+clear
+//INPUT DATA
+I1=5;//current in A
+I=10;//current in A
+I2=I/sqrt(2);
+//CALCULATIONS
+i3=sqrt(((2*I1)^2)+(I2^2));
+mprintf("rms value of current is %1.2f A respectively\n",i3);
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.12/ex4_12.sce b/1964/CH4/EX4.12/ex4_12.sce new file mode 100755 index 000000000..a11cd3052 --- /dev/null +++ b/1964/CH4/EX4.12/ex4_12.sce @@ -0,0 +1,29 @@ +//Chapter-4, Example 4.12, Page 138
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+Im=141.4;//instantaneous current
+f=50;//freq in hz
+w=2*%pi*f;//angular freq in rad/sec
+//instantaneous current equation is i=141.4*sin(w*t);
+function f=myfun(t)
+ f=Im*sin(w*t(1));
+endfunction
+t=[0.0025];
+g=numdiff(myfun,t)
+mprintf("rate of change of current is %d A/sec \n",g);
+function f1=myfun(t1)
+ f1=Im*sin(w*t1(1));
+endfunction
+t1=[0.005];
+g1=numdiff(myfun,t1)
+mprintf("rate of change of current is %d A/sec \n",g1);
+function f2=myfun(t2)
+ f2=Im*sin(w*t2(1));
+endfunction
+t2=[0.01];
+g2=numdiff(myfun,t2)
+mprintf("rate of change of current is %d A/sec \n",g2);
+//note:answer given in textbook for section c is wrong
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.13/ex4_13.sce b/1964/CH4/EX4.13/ex4_13.sce new file mode 100755 index 000000000..01d1c9d32 --- /dev/null +++ b/1964/CH4/EX4.13/ex4_13.sce @@ -0,0 +1,28 @@ +//Chapter-4, Example 4.13, Page 138
+//=============================================================================
+clc
+clear
+//INPUT DATA
+R=60;//resistance in ohms
+Rf=50;//resistance in ohms
+Rr=500;//resistance in ohms
+V=120;//supply voltage in volts
+f=50;//freq in hz
+//CALCULATIONS
+peak=V*sqrt(2);//peak value of applied voltage
+peak1=peak/(R+Rf);//peak value of current in forward direction
+peak2=peak/(R+Rr);//peak value of current in reverse direction
+i=((2*peak1)-(2*peak2))/(2*%pi);//current in moving coil ammeter over the period 0 to 2*(%pi)
+i1=((%pi/2)*((peak1)^2+(peak2)^2))/(2*(%pi));//mean current over the period 0 to 2*(%pi)
+rms=sqrt(i1);//rms value in hot wire ammeter
+mprintf("rms value in hot wire ammeter is %1.3f A\n",rms);
+If=(peak1)/(sqrt(2));//rms value in forward direction
+mprintf("rms value in forward direction is %1.2f A\n",If);
+Ir=(peak2)/(sqrt(2));//rms value in reverse direction
+mprintf("rms value in reverse direction is %1.2f A\n",Ir);
+av=((R+Rf)*((If)^2)+(R+Rr)*((Ir)^2))/(2);
+mprintf("average power dissipated is %2.2f W\n",av);
+pf=((Rf)*((If)^2)+(Rr)*((Ir)^2))/(2);
+mprintf("power dissipated in rectifier is %2.1f W\n",pf);
+//=================================END OF PROGRAM==============================
+
diff --git a/1964/CH4/EX4.14/ex4_14.sce b/1964/CH4/EX4.14/ex4_14.sce new file mode 100755 index 000000000..f4f4257b8 --- /dev/null +++ b/1964/CH4/EX4.14/ex4_14.sce @@ -0,0 +1,15 @@ +//Chapter-4, Example 4.14, Page 144
+//=============================================================================
+clc
+clear
+//given voltage applied is 100*sin(w*t)
+//CALCULATIONS
+R=10;//resisitance in ohms
+//i=(100)*sin(w*t)/10=10*sin(w*t)
+//instantaneous power=1000*(sin(w*t))^2
+E=(100)/sqrt(2);//average value of voltage in volts
+I=(10)/sqrt(2);//average value of current in amps
+P=E*I;//average power in Watts
+mprintf("thus average power is %1.0f W",P);
+//=================================END OF PROGRAM==============================
+
diff --git a/1964/CH4/EX4.15/ex4_15.sce b/1964/CH4/EX4.15/ex4_15.sce new file mode 100755 index 000000000..54d578fb6 --- /dev/null +++ b/1964/CH4/EX4.15/ex4_15.sce @@ -0,0 +1,14 @@ +//Chapter-4, Example 4.15, Page 144
+//=============================================================================
+clc
+clear
+//given voltage applied is e=340*sin(314*t)
+//given current applied is i=42.5*sin(314*t)
+//CALCULATIONS
+R=340/42.5;//resisitance in ohms
+E=(340)/sqrt(2);//average value of voltage in volts
+I=(42.5)/sqrt(2);//average value of current in amps
+P=E*I;//average power in Watts
+mprintf("thus average power is %1.0f W",P);
+//=================================END OF PROGRAM==============================
+
diff --git a/1964/CH4/EX4.16/ex4_16.sce b/1964/CH4/EX4.16/ex4_16.sce new file mode 100755 index 000000000..6e9d48876 --- /dev/null +++ b/1964/CH4/EX4.16/ex4_16.sce @@ -0,0 +1,19 @@ +//Chapter-4, Example 4.16, Page 145
+//=============================================================================
+clc
+clear
+//given voltage applied is e=100*sin(314*t)
+//CALCULATIONS
+E=100/sqrt(2);
+w=314;
+L=0.2;//inductannce in henry
+// indefinitely integrating e and later dividing by L we get it as
+//i=-1.592*cos(314*t);//instantaneous current
+//instantaneous power=e*i=-79.6*sin(628t)
+P=0;//average power=0
+Xl=w*L;//inductance in ohms
+I=(E)/(Xl);//rms current
+mprintf("inductive reactance and rms current is %2.1f ohms and %1.3f amps respectively",Xl,I);
+//note:We cannot compute symbolic or indefinite integration in scilab.In order to verify your results use wxmaxima software.
+//=================================END OF PROGRAM==============================
+
diff --git a/1964/CH4/EX4.17/ex4_17.sce b/1964/CH4/EX4.17/ex4_17.sce new file mode 100755 index 000000000..f780eeb37 --- /dev/null +++ b/1964/CH4/EX4.17/ex4_17.sce @@ -0,0 +1,23 @@ +//Chapter-4, Example 4.17, Page 145
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+L=0.225;//inductance in henry
+e=120;//voltage in volts
+f=50;//frequency in c/s
+Xl=(2*%pi*f*L);//inductive reactance in ohms
+mprintf("Inductive reactance in ohms is %2.2f ohms\n",Xl);
+L=0.2;//inductance in henry
+Im=2.4;//peak value of current in A
+//instantaneous voltage equation is e=(sqrt(2)*120*sin(314*t))
+// indefinitely integrating e and later dividing by L we get it as
+//i=-2.4*cos(314t);//instantaneous current in A
+I=Im/(sqrt(2));//in A
+mprintf("Current is %1.3f A\n",I);
+m=(e*sqrt(2)*Im)/2;//maximum power delivered in watts
+mprintf("Maximum power delivered to inductor is %3.2f watts\n",m);
+mprintf("average power is zero\n")
+mprintf("equation for voltage and current are 169.68*sin(314*t) and -2.4*cos(314*t) respectively");
+//note:We cannot compute symbolic or indefinite integration in scilab.In order to verify your results use wxmaxima software.
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.18/ex4_18.sce b/1964/CH4/EX4.18/ex4_18.sce new file mode 100755 index 000000000..cc55e0354 --- /dev/null +++ b/1964/CH4/EX4.18/ex4_18.sce @@ -0,0 +1,20 @@ +//Chapter-4, Example 4.18, Page 146
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+L=0.01;//inductance in henry
+//equation of current is 10*cos(1500*t)
+w=1500;//angular freq in rad/sec
+Xl=(w*L);//inductive reactance in ohms
+mprintf("inductive reactance is %1.1f ohms\n",Xl);
+function f=myfun(t)
+ f=10*cos(w*t);
+q=derivative(f);
+endfunction//derivation yields e=-150*sin(1500*t)
+mprintf("equation for voltage across is e=-150*sin(1500*t)")
+X2=40;//given new inductance in ohms
+f2=X2/(2*%pi*L);//freq in hz
+mprintf("thus at freq %d hz inductance will be 40 ohms",f2)
+//note:answer given for inductive reactance is wrong.Please check the calculations
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.19/ex4_19.sce b/1964/CH4/EX4.19/ex4_19.sce new file mode 100755 index 000000000..e6bf79327 --- /dev/null +++ b/1964/CH4/EX4.19/ex4_19.sce @@ -0,0 +1,17 @@ +//Chapter-4, Example 4.19, Page 146
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+C=135;//capacitance in uF
+E=150;//voltage in volts
+f=50;//freq in c/s
+Xc=1/(2*3.14*f*C*10^-6);//capacitive reactance in ohms
+//equation for current is i=8.99*sin(314*t+(%pi/2))A
+//instantaneous power is P=E*I*sin(2*w*t)
+P=0;//average power
+Im=8.99;//peak value of instantaneous current equation
+I=(Im)/(sqrt(2));//rms current in amps
+M=E*sqrt(2)*I*sqrt(2);//maximum power delivered in Watts
+mprintf("thus capacitive reactance,Rms current and Maximum power delivered are %2.3f ohms ,%1.2f Amps,%1.0f Watts respectively",Xc,I,M);
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.2/ex4_2.sce b/1964/CH4/EX4.2/ex4_2.sce new file mode 100755 index 000000000..f56678a48 --- /dev/null +++ b/1964/CH4/EX4.2/ex4_2.sce @@ -0,0 +1,31 @@ +//Chapter-4, Example 4.2, Page 130
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+//for halfwave rectifier
+Im=1;//assume peak value is 1
+//for (0 to pi) value is (Im*sin(theta)) for (pi to 2*pi) value is 0
+function y1=f1(x),y1=(Im^2)*(sin(x))^2,endfunction
+a1=(intg(0,%pi,f1));
+a=(a1)/(2*%pi);//mean square value
+rms=sqrt(a);//rms value
+function y3=f3(x),y3=(Im)*(sin(x)),endfunction
+a3=(intg(0,%pi,f3));
+av=a3/(2*(%pi));//average value
+ff=rms/av;//form factor
+pf=Im/rms;//peak factor
+mprintf("for half wave rectifier\n");
+mprintf("form factor=%1.2f,peak factor=%d\n",ff,pf);
+//for fullwave rectifier
+function y4=f4(x),y4=(Im^2)*(sin(x))^2,endfunction
+a4=(intg(0,%pi,f4));
+a4=a4/(%pi);
+rms2=sqrt(a4);//rms value
+function y5=f5(x),y5=(Im)*(sin(x)),endfunction
+av2=(intg(0,%pi,f5))/(%pi);//average value
+ff2=rms2/av2;//form factor
+pf2=Im/rms2;//peak factor
+mprintf("for full wave rectifier\n");
+mprintf("form factor=%1.2f,peak factor=%1.2f",ff2,pf2);
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.20/ex4_20.sce b/1964/CH4/EX4.20/ex4_20.sce new file mode 100755 index 000000000..07604d82b --- /dev/null +++ b/1964/CH4/EX4.20/ex4_20.sce @@ -0,0 +1,19 @@ +//Chapter-4, Example 4.20, Page 147
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+//given voltage eqn is v=100+(100*sqrt(2))*sin(314*t) volts
+W=314;//freq in rad/sec
+R=5;//resistance in ohms
+X=12;//reactance in ohms
+Z=R+((%i)*(X));//impedance in ohms
+Idc=100/R;//dc current in A
+Iac=(100)/(sqrt((R)^2+(X)^2));//rms value of ac component of current
+Pt=(R*(Idc^2))+(R*(Iac^2));//total power in Watts
+V1=sqrt((100)^2+(100)^2);//supplied voltage in Rms in volts
+I1=sqrt((20)^2+(7.69)^2);//current in Rms in Amps
+Z1=V1/I1;//circuit impedance in ohms
+Pf=Pt/(V1*I1);//Power factor
+mprintf("thus circuit impedance,Power expended and Power factors are %1.1f Ohms ,%1.0f W and %1.3f respectively",Z1,Pt,Pf);
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.21/ex4_21.sce b/1964/CH4/EX4.21/ex4_21.sce new file mode 100755 index 000000000..9716cf6d5 --- /dev/null +++ b/1964/CH4/EX4.21/ex4_21.sce @@ -0,0 +1,29 @@ +//Chapter-4, Example 4.21, Page 147
+//=============================================================================
+clc
+clear
+ function [polar] = r2p(x,y)//function to convert rectangular to polar
+ polar = ones(1,2)
+ polar(1) = sqrt ((x ^2) +(y^2))
+ polar(2) = atan (y/x)
+ polar(2) =(polar (2)*180)/%pi
+ endfunction
+ function [ rect ] = p2r(r,theta)//function to convert polar to rectangular
+ rect = ones(1 ,2)
+ theta =( theta *%pi) /180
+ rect (1)=r* cos(theta)
+ rect (2)=r* sin(theta)
+ endfunction
+//CALCULATIONS
+I1=p2r(300,0);
+disp(I1);
+I2=p2r(350,30);
+disp(I2);
+I=I1+I2;
+disp(I);
+i3=r2p(I(1),I(2))
+disp(i3);
+mprintf("Thus resultant current is 627.9 A and it leads 300 A by 16 degrees")
+//note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions
+//=================================END OF PROGRAM======================================================================================================
+
diff --git a/1964/CH4/EX4.22/ex4_22.sce b/1964/CH4/EX4.22/ex4_22.sce new file mode 100755 index 000000000..2a14bd86f --- /dev/null +++ b/1964/CH4/EX4.22/ex4_22.sce @@ -0,0 +1,33 @@ +//Chapter-4, Example 4.22, Page 147
+//=============================================================================
+clc
+clear
+funcprot(0)
+function [polar] = r2p(x,y)//function to convert rectangular to polar
+ polar = ones(1,2)
+ polar(1) = sqrt ((x ^2) +(y^2))
+ polar(2) = atan (y/x)
+ polar(2) =(polar (2)*180)/%pi
+ endfunction
+ function [ rect ] = p2r(r,theta)//function to convert polar to rectangular
+ rect = ones(1 ,2)
+ theta =( theta *%pi) /180
+ rect (1)=r* cos(theta)
+ rect (2)=r* sin(theta)
+ endfunction
+//v=230*sin(100*%pi*t)
+//CALCULATIONS
+R=100;//resistance in ohms
+L=319;//inductance in mH
+Xl=(100*%pi*L*10^-3);//inductive reactance in ohms
+Z=R+((%i)*(Xl));//impedance in ohms
+Z=r2p(R,Xl);//impedance in polar form
+disp(Z);
+Z1=p2r(Z(1),Z(2));
+disp(Z1);
+//i=230/1.414*sin(100*%3.14*t-45)=1.626*sin(100*%3.14*t-45)
+i=(1.626/(sqrt(2)));//rms current in A
+P=(i)^2*R;//power taken by the coil in W
+mprintf("power taken by the coil is %3.1f W",P);
+//note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions
+//=================================END OF PROGRAM=======================================================================================================
diff --git a/1964/CH4/EX4.23/ex4_23.sce b/1964/CH4/EX4.23/ex4_23.sce new file mode 100755 index 000000000..f48d6f0f7 --- /dev/null +++ b/1964/CH4/EX4.23/ex4_23.sce @@ -0,0 +1,40 @@ +//Chapter-4, Example 4.23, Page 148
+//=============================================================================
+clc
+clear
+function [polar] = r2p(x,y)//function to convert rectangular to polar
+ polar = ones(1,2)
+ polar(1) = sqrt ((x ^2) +(y^2))
+ polar(2) = atan (y/x)
+ polar(2) =(polar (2)*180)/%pi
+ endfunction
+ function [ rect ] = p2r(r,theta)//function to convert polar to rectangular
+ rect = ones(1 ,2)
+ theta =( theta *%pi) /180
+ rect (1)=r* cos(theta)
+ rect (2)=r* sin(theta)
+ endfunction
+//e1=230*sin(w*t)
+//e2=230*sin(w*t*%pi/6)
+//CALCULATIONS
+E1=p2r(230,0);//impedance in rectangular form
+disp(E1);
+E2=p2r(230,30);
+disp(E2);
+E=E1+E2;
+E=E/sqrt(2);
+E=r2p(E(1),E(2));
+disp(E)
+Z=r2p(8,6);
+disp(Z);
+I1=E(1)/Z(1);
+disp(I1)
+theta=E(2)-Z(2);
+disp(theta);
+phi=cos(theta*%pi/180)
+disp(phi)
+P1=(E(1))*(I1)*(phi);//power supplied in Watts
+mprintf("Thus Rms current and power supplied are %2.1f A and %f W respectively",I1,P1);
+//note here power calculated my vary as we took many decimal values for calculation.Please check the calculations
+//note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions
+//=================================END OF PROGRAM=======================================================================================================
diff --git a/1964/CH4/EX4.24/ex4_24.sce b/1964/CH4/EX4.24/ex4_24.sce new file mode 100755 index 000000000..72b8da676 --- /dev/null +++ b/1964/CH4/EX4.24/ex4_24.sce @@ -0,0 +1,15 @@ +//Chapter-4, Example 4.24, Page 148
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+//e1=230*sin(100*%pi*t)
+C=20*10^-6;//capacitance in F
+//e2=230*sin(700*%pi*t)
+Vm1=230;//peak voltage for e1
+Vm2=35;//peak voltage for e2
+I1=Vm1*(100*%pi*C)/(sqrt(2));//current due to component e1
+I2=Vm2*(700*%pi*C)/(sqrt(2));//current due to component e2
+mprintf("thus current due to component e1 and e2 are %1.2fA and %1.2fA respectively",I1,I2);
+//=================================END OF PROGRAM======================================================================================================
+
diff --git a/1964/CH4/EX4.25/ex4_25.sce b/1964/CH4/EX4.25/ex4_25.sce new file mode 100755 index 000000000..a4335968e --- /dev/null +++ b/1964/CH4/EX4.25/ex4_25.sce @@ -0,0 +1,62 @@ +//Chapter-4, Example 4.25, Page 149
+//=============================================================================
+clc
+clear
+funcprot(0)
+function [polar] = r2p(x,y) //function to convert rectangular to polar
+ polar = ones(1,2)
+ polar(1) = sqrt ((x ^2) +(y^2))
+ polar(2) = atan (y/x)
+ polar(2) =(polar (2)*180)/%pi
+ endfunction
+ function [ rect ] = p2r(r,theta)//function to convert polar to rectangular
+ rect = ones(1 ,2)
+ theta =( theta *%pi) /180
+ rect (1)=r* cos(theta)
+ rect (2)=r* sin(theta)
+ endfunction
+//CALCULATIONS
+//v=230*sin(314*t)+60*sin(942*t)
+V=230;//voltage in volts
+V1=60;//voltage of harmonic in volts
+R=10;//resistance in ohms
+L=0.3;//inductance in henry
+C=100*10^-6;//capacitance in F
+//Branch with Resistor (R)
+I1m=V/R;//current in A
+I1m=I1m/(sqrt(2));//rms current in A
+I3m=V1/R;//current in A
+I3m=I3m/(sqrt(2));//rms current in A
+I=sqrt((I1m)^2+(I3m)^2);//rms current in A
+Pr=((I)^2)*(R);//power in Watts
+//Branch with inductor(L)
+Z1=(10+((%i)*(314*0.03)));//impedance to fundamental component
+M=sqrt((10)^2+(9.42)^2);//magnitude of Z1 in polar form
+theta=atan(9.42/10)*(180/%pi);//angle of Z1 in polar form
+I2m=V/M;//fundamental current in A
+I2m=I2m/(sqrt(2));//rms current in A
+I4m=V1/M;//third harmonic component of current
+I4m=I4m/(sqrt(2));//rms current in A
+I1=((I2m)^2+(I4m)^2);//total rms current in A
+Pr1=(I1)*(R);//Power in Watts
+//branch with capacitor
+X1=1/(314*10^-4);//reactance to fundamental component in ohms
+I5m=V/(X1);//current in A
+I5m=I5m/(sqrt(2));//rms current in A
+X2=1/(942*10^-4);//reactance to third harmonic component in ohms
+I6m=V1/X2;//current in A
+I6m=I6m/(sqrt(2));//rms current in A
+I2=sqrt((I5m)^2+(I6m)^2);//total rms current in A
+Pr2=0;//power in watts
+T=Pr+Pr1+Pr2;//total power dissipated in W
+//calculation of total current
+Im=(p2r(16.26,0)+p2r(11.84,43.29)+p2r(5.1,90));//pol to rect
+disp(Im);//fundamental component of current in A
+Im1=(p2r(4.24,0)+p2r(3.09,-43.29)+p2r(4,90));//pol to rect
+disp(Im1);//third harmonic component of current in A
+T1=sqrt((Im(1))^2+(Im1(1))^2);//total rms current in A
+V2=(sqrt((V)^2+(V1)^2))/sqrt(2);//voltage applied in rms
+pf=T/((T1)*(V2));//power factor
+mprintf("thus total current ,power input and power factor are %2.2f A ,%f W,%1.2f respectively",T1,T,pf);
+//=================================END OF PROGRAM======================================================================================================
+
diff --git a/1964/CH4/EX4.3/ex4_3.sce b/1964/CH4/EX4.3/ex4_3.sce new file mode 100755 index 000000000..4bd650a87 --- /dev/null +++ b/1964/CH4/EX4.3/ex4_3.sce @@ -0,0 +1,15 @@ +//Chapter-4, Example 4.3, Page 132
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+v1=0;v2=5;v3=10;v4=20;v5=50;v6=60;v7=50;v8=20;v9=10;v10=5;v11=0;v12=-5;v13=-10;
+Vm=60;
+V=((v1^2)+(v2^2)+(v3^2)+(v4^2)+(v5^2)+(v6^2)+(v7^2)+(v8^2)+(v9^2)+(v10^2))
+V=sqrt(V/10);
+Vav=(v1+v2+v3+v4+v5+v6+v7+v8+v9+v10)/10;//average value
+Kf=V/Vav;//form factor
+Kp=Vm/V;//peak factor
+rms2=Vm/(sqrt(2));//rms voltage value with the same peak value
+mprintf("rms1 =%2.2f volts\n average value=%d volts \n form factor= %2.2f \n peak factor= %1.3f \n rms2 value is %2.2f volts",V,Vav,Kf,Kp,rms2);
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.4/ex4_4.sce b/1964/CH4/EX4.4/ex4_4.sce new file mode 100755 index 000000000..4a41254bf --- /dev/null +++ b/1964/CH4/EX4.4/ex4_4.sce @@ -0,0 +1,11 @@ +//Chapter-4, Example 4.4, Page 133
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+f=60;
+Im=120;
+i=96;
+t=asin(i/Im)/(2*%pi*60);
+mprintf("time is %1.5f sec",t)
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.5/ex4_5.sce b/1964/CH4/EX4.5/ex4_5.sce new file mode 100755 index 000000000..ae63f801c --- /dev/null +++ b/1964/CH4/EX4.5/ex4_5.sce @@ -0,0 +1,29 @@ +//Chapter-4, Example 4.5, Page 133
+//=============================================================================
+clc
+clear
+funcprot(0)
+//CALCULATIONS
+Im=100;//current in amps
+f=50;//freq in hz
+w=2*%pi*50;//angular freq in rad/sec
+//at t=0.0025
+function f=myfun(t)
+ f=Im*sin(w*t(1));
+endfunction
+t=[0.0025];
+g=numdiff(myfun,t)//by using numdiff function the calculated value will defer to observed value by 15
+//at t= 0.005
+function f1=myfun(t1)
+ f1=Im*sin(w*t1(1));
+endfunction
+t1=[0.005];
+g1=numdiff(myfun,t1);
+//at t= 0.01
+function f2=myfun(t2);
+ f2=Im*sin(w*t2(1));
+endfunction
+t2=[0.01];
+g2=numdiff(myfun,t2);
+mprintf("rate of change of current at t=0.025,t=0.005,t=0.01 sec are %d A/sec %d A/sec %d A/sec respectively",g,g1,g2);
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.6/ex4_6.sce b/1964/CH4/EX4.6/ex4_6.sce new file mode 100755 index 000000000..ae28b3d03 --- /dev/null +++ b/1964/CH4/EX4.6/ex4_6.sce @@ -0,0 +1,25 @@ +//Chapter-4, Example 4.6, Page 134
+//=============================================================================
+clc
+clear
+//INPUT DATA
+N=200;//no of turns
+a=250;//area of cross-section in sq.cm
+Bm=0.5;//magnetic field strength in Tesla
+speed=1200;//in r.p.m
+//CALCULATIONS
+w=2*%pi*(speed/60);//angular freq in rad/sec
+phi=Bm*a*10^-4;//area taken in sq.m
+Em=N*w*phi;//maximum value of induced Emf
+mprintf("maximum value of induced Emf is %d volts\n",Em);
+//equation for instantaneous induced emf is e=Em*sin(w*t)
+//when plane of coil is parallel to field ,theta is 90 degrees
+e1=Em*sin(%pi/2);//converted degrees to radians
+mprintf("when plane of coil is parallel to field, induced Emf is %d volts\n",e1);
+//when plane of coil is parallel to field ,theta is 0 degrees
+e2=Em*sin(0);
+mprintf("when plane of coil is perpendicular to field, induced Emf is %d volts\n",e2);
+//when plane of coli is inclined at 45 degrees to the field
+e3=Em*sin(%pi/4);
+mprintf("when plane of coil is at 45 degrees to field, induced Emf is %d volts\n",e3);
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.7/ex4_7.sce b/1964/CH4/EX4.7/ex4_7.sce new file mode 100755 index 000000000..8067c2d25 --- /dev/null +++ b/1964/CH4/EX4.7/ex4_7.sce @@ -0,0 +1,14 @@ +//Chapter-4, Example 4.7, Page 135
+//=============================================================================
+clc
+clear
+//INPUT DATA
+I=10;//direct current in A
+Im=10;//peak value of sinusoidal current in A
+//CALCULATIONS
+function y1=f1(x),y1=(I+Im*sin(x))^2,endfunction
+a1=(intg(0,2*%pi,f1));
+a1=a1/(2*%pi);//mean square value in A
+rms=sqrt(a1);//rms value in A
+mprintf("rms value is %2.2f A",rms);
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.8/ex4_8.sce b/1964/CH4/EX4.8/ex4_8.sce new file mode 100755 index 000000000..2d5263e50 --- /dev/null +++ b/1964/CH4/EX4.8/ex4_8.sce @@ -0,0 +1,15 @@ +//Chapter-4, Example 4.8, Page 136
+//=============================================================================
+clc
+clear
+//let the current peak value of sinusoidal and rectangular waves are Im.
+//CALCULATIONS
+Im=1;//let im current value be 1(just for calculation purposes)
+rms1=sqrt(((Im)^2*%pi)/(%pi));//rms current value of rectangular wave
+function y1=f1(x),y1=(Im^2)*(sin(x))^2,endfunction
+a1=(intg(0,%pi,f1));
+a1=a1/(%pi);//mean square value in A
+rms=sqrt(a1);//rms value in A
+z=((rms)^2/(rms1)^2);//relative heating effects
+mprintf("relative heating effects is %1.1f",z);
+//=================================END OF PROGRAM==============================
diff --git a/1964/CH4/EX4.9/ex4_9.sce b/1964/CH4/EX4.9/ex4_9.sce new file mode 100755 index 000000000..efc93d898 --- /dev/null +++ b/1964/CH4/EX4.9/ex4_9.sce @@ -0,0 +1,19 @@ +//Chapter-4, Example 4.9, Page 137
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+//for subdivision a
+funcprot(0);
+max=40;
+rms=max/sqrt(2);
+mprintf("max and rms values are %d units and %2.2f units respectively\n",max,rms);
+//for subdivision b
+//max=A+B
+//rms=(A+B)/sqrt(2)
+//for subdivision c
+max1=sqrt(((10)^2)+((17.3)^2));
+rms1=max1/sqrt(2);
+mprintf("max and rms values are %2.2f units and %2.2f units respectively",max1,rms1);
+//note:in textbook for sub div (c) square root has not taken for maximum value computed
+//=================================END OF PROGRAM==============================
|