diff options
Diffstat (limited to '1319/CH1')
43 files changed, 1295 insertions, 0 deletions
diff --git a/1319/CH1/EX1.1/1_1.sce b/1319/CH1/EX1.1/1_1.sce new file mode 100644 index 000000000..2cd7a68e6 --- /dev/null +++ b/1319/CH1/EX1.1/1_1.sce @@ -0,0 +1,35 @@ +// To calculate frequency, instantaneous voltage and time of a voltage wave
+
+clc;
+clear;
+
+// The volatage eqaution is v= 0.02 sin (4000t + 30(degress)).
+
+
+Vm=0.02;
+
+deff('a=vol(b)','a=Vm*sind(((4000*b)*(180/%pi))+30)'); // Function for voltage equation
+
+t=320*(10^-6);
+
+w=4000; // angular frequency
+
+// General expression for voltage is given by V=Vm sin ()(2*pi*f*t)+theta)
+// Comparing both the eqautions we get 2*pi*f=4000
+
+f=w/(2*%pi);
+
+v=vol(t);
+
+// 360degress is equal to 1/f s.
+
+//Refer the diagram with this code to understand better.
+// 30degress is
+
+t30=30/(f*360);
+
+disp('Hz',f,'The frequency of the voltage wave =')
+disp('V',v,'The instantaneous voltage at t= 320 micro seconds =')
+
+disp('s',t30,'The time represented by 30 degrees phase difference =')
+
diff --git a/1319/CH1/EX1.10/1_10.sce b/1319/CH1/EX1.10/1_10.sce new file mode 100644 index 000000000..f57c46c9e --- /dev/null +++ b/1319/CH1/EX1.10/1_10.sce @@ -0,0 +1,39 @@ +// RLC circuit problems on resonace
+
+clc;
+clear;
+
+R=6.28;
+L=20*(10^-3);
+f=5*(10^3);
+
+w=2*%pi*f;
+
+C=1/(L*(w^2));
+
+Xc=1/(w*C);
+Xl=L*w;
+
+Vc=5;
+
+Z=Xc+R+Xl;
+
+I=Vc/Xc // Total current
+
+V=I*R;
+
+// frequency is inversely proportional to square root of capacitance
+// So if C is halved; f will increase square root of 2 times more.
+
+fn=sqrt(2)*f;
+
+Xln=2*%pi*fn*L;
+
+Q=Xln/R;
+
+//Note under resonance conditions Vl and Vc are much greater than the supply voltage.
+
+mprintf('i) The value of capacitor = %f micro F \n',(10^6)*C)
+mprintf('ii) The supply voltage = %f V \n',V)
+mprintf('iii) The frequency of resonance when C is halved = %f Hz \n',fn)
+mprintf(' The Q of the new circuit = %f \n',Q)
diff --git a/1319/CH1/EX1.11/1_11.sce b/1319/CH1/EX1.11/1_11.sce new file mode 100644 index 000000000..303d207f5 --- /dev/null +++ b/1319/CH1/EX1.11/1_11.sce @@ -0,0 +1,29 @@ +// RLC circuit problems with quality factor
+
+clc;
+clear;
+
+C=320*(10^-12);
+Q=50;
+f0=175*(10^3);
+w0=2*%pi*f0;
+
+L=1/(C*(w0^2));
+
+R=w0*L/Q;
+
+Xc=1/(C*w0);
+Xl=L*w0;
+
+V=0.85;
+
+I=V/R;
+
+Vc=I*Xc;
+
+bw=f0/Q;
+
+mprintf('The inductance for resonance =%f m H \n',(10^3)*L);
+mprintf('The current flowing in the circuit at resonance =%f m A \n',(10^3)*I);
+mprintf('The voltage across the capacitor at resonance =%f V \n',Vc);
+mprintf('The bandwidth of the circuit =%f Hz \n',bw);
diff --git a/1319/CH1/EX1.12/1_12.sce b/1319/CH1/EX1.12/1_12.sce new file mode 100644 index 000000000..d51e94f28 --- /dev/null +++ b/1319/CH1/EX1.12/1_12.sce @@ -0,0 +1,28 @@ +// RLC circuit problem to find the resonance frequncy and impedance magnitude
+
+clc;
+clear;
+
+R=10;
+L=100*(10^-3);
+C=0.01*(10^-6);
+
+f0=1/((2*%pi)*(sqrt(L*C)));
+// New frequencies according to the problem statement
+f1=f0-1000;
+f2=f0+1000;
+
+w1=2*%pi*f1;
+w2=2*%pi*f2;
+
+Xl1=w1*L;
+Xc1=1/(w1*C);
+
+Xl2=w2*L;
+Xc2=1/(C*w2);
+
+Z1=sqrt((R^2)+((Xl1-Xc1)^2));
+Z2=sqrt((R^2)+((Xl2-Xc2)^2));
+
+mprintf('The Impedance magnitude at 1KHz below resonance (Capacitive) =%f ohms \n',Z1)
+mprintf('The Impedance magnitude at 1KHz above resonance (Inductive) =%f ohms \n',Z2)
diff --git a/1319/CH1/EX1.13/1_13.sce b/1319/CH1/EX1.13/1_13.sce new file mode 100644 index 000000000..946a65cd6 --- /dev/null +++ b/1319/CH1/EX1.13/1_13.sce @@ -0,0 +1,31 @@ +//Series Resonace of a RLC circuit with 2 coils.
+
+clc;
+clear;
+
+R1=0.5;
+R2=1.5;
+R3=0.5;
+C1=6*(10^-6);
+C2=12*(10^-6);
+L1=25*(10^-3);
+L2=15*(10^-3);
+
+// Both the coils are connected in series
+
+Req=R1+R2+R3;
+
+Leq=L1+L2;
+
+Ceq=(C1*C2)/(C1+C2);
+
+f=1/((2*%pi)*sqrt(Leq*Ceq));
+
+Q=2*%pi*f*Leq/Req;
+
+Q1=2*%pi*f*L1/(R1+R3);
+Q2=2*%pi*f*L2/R2;
+
+mprintf('i) The frequency of resonance = %f Hz or Wo = %f rad/sec \n',f,2*%pi*f)
+mprintf('ii) Q of the circuit = %f \n',Q)// The total resistance should be considered, Error in the textbook
+mprintf('iii) Q of coil 1 is %f and Q of coil 2 is %f \n',Q1,Q2)
diff --git a/1319/CH1/EX1.14/1_14.sce b/1319/CH1/EX1.14/1_14.sce new file mode 100644 index 000000000..7e1c58a01 --- /dev/null +++ b/1319/CH1/EX1.14/1_14.sce @@ -0,0 +1,35 @@ +//Series Resonance in RLC circuit to find inductance and power
+
+clc;
+clear;
+
+R=5;
+C=50*(10^-6);
+f0=100;
+w=2*%pi*f0;
+
+L=1/(C*(w^2));
+
+V=200;
+Xc=1/(C*w);
+Xl=L*w;
+
+I=V/R;
+
+P=(I^2)*R;
+
+Vc=I*Xc;
+
+Zc=R+(Xl*%i);
+
+Vz=I*(Zc);
+
+Q0=Xl/R;
+
+bw=f0/Q0;
+
+printf('a) The inductance of the coil = %f mH \n',(10^3)*L)
+printf('b) The power delivered to the coil = %f kW \n',(10^-3)*P)
+printf('c) The voltage magnitude across the capacitor = %f V \n The voltage magnitude of the coil = %f V \n',Vc,abs(Vz)) // Magnitudes with at most accuracy
+printf('d) The bandwidth of the circuit = %f \n',bw)
+
diff --git a/1319/CH1/EX1.15/1_15.sce b/1319/CH1/EX1.15/1_15.sce new file mode 100644 index 000000000..e98294e4d --- /dev/null +++ b/1319/CH1/EX1.15/1_15.sce @@ -0,0 +1,55 @@ +//Determine the current in parallel branches and supply current
+
+clc;
+clear;
+
+Xl=%i*100; // Inductance
+R=10; // Resistance
+V=10;
+Xco=-%i*100;
+
+Q=abs(Xl)/R;
+
+Z0=Q*abs(Xco);
+I0=V/Z0;
+
+Ic=V/Xco;
+Il=V/Xl;
+
+Pi=V*I0; // Power Input
+
+Pc=(I0^2)*10; // Copper Loss
+
+// Frequency reduced to fo/2
+
+Xl1=Xl/2; // New Inductive reactance at half the initial frequency
+Xco1=Xco*2; // New Capacitative reactance at half the initial frequency
+
+Z1=R+Xl1; // Net impedance of the branch containing Resistance and inductor
+
+Znet= Z1*Xco1/(Xco1+Z1); // Net Impedance of the circuit
+
+I1=V/Znet; // Net Current for reduced frequency
+
+ti1=atand(imag(I1)/real(I1)); // Phase Angle
+
+// Frequncy increased to 2fo
+
+Xl2=2*Xl;// New Inductive reactance at double the initial frequency
+Xco2=Xco/2;// New Capacitative reactance at double the initial frequency
+Z2=R+Xl2;// Net impedance of the branch containing resistance and inductor
+
+Zt=Z2*Xco2/(Z2+Xco2);// Net Impedance of the circuit
+
+I2=V/Zt; // Net Current
+
+ti2=atand(imag(I2)/real(I2));
+
+printf('a) The Current flowing in the inductor =')
+disp('mA',Il*1000)
+printf(' The current flowing in the capacitor =')
+disp('mA',Ic*1000)
+printf(' The supply current = %g mA\n \n',I0*1000)
+printf('b) The current for half the intial frequency = %g/_%g mA\n',abs(I1)*1000,ti1)
+printf(' The current for double the intial frequency = %g/_%g mA\n',abs(I2)*1000,ti2)
+
diff --git a/1319/CH1/EX1.16/1_16.sce b/1319/CH1/EX1.16/1_16.sce new file mode 100644 index 000000000..9ed04a6f4 --- /dev/null +++ b/1319/CH1/EX1.16/1_16.sce @@ -0,0 +1,27 @@ +// Determine the original and loaded circuit bandwidth
+
+clc;
+clear;
+
+f0=1000*(10^3);
+V=5;
+Q=50;
+Xl=2*(10^3);
+Xc0=2*(10^3);
+R1=40*(10^3); // Branch near the source
+R2=Q*Xl; // Branch with both the inductor and resitance
+
+Z0=Q*Xc0;
+
+bw=f0/Q; // Original Bandwidth
+
+// Considering loading resistance
+
+Reff= R1*R2/(R1+R2);
+Qd=Reff/Xc0;
+
+bw1=f0/Qd; // Bandwidth with loading resistance
+
+printf('The original bandwidth = %g kHz\n',bw/1000)
+printf('The loaded circuit bandwidth = %g kHz\n',bw1/1000)
+
diff --git a/1319/CH1/EX1.17/1_17.sce b/1319/CH1/EX1.17/1_17.sce new file mode 100644 index 000000000..7ce177a6f --- /dev/null +++ b/1319/CH1/EX1.17/1_17.sce @@ -0,0 +1,15 @@ +//Expression for the sum of energy stored by inductor and capacitor connected in series at resonance
+
+clc;
+clear;
+
+printf(' i= Im*cos(w0)*t\n')
+printf(' The energy stored is L*(i^2)/2 = L*(Im^2)*(cos(w0*t)^2) \n\n')
+
+printf(' The energy stored in the capacitor (q^2)/2C = 1/2C * (Im^2)*[integration of i wrt dt from 0 to t]^2 \n')
+printf(' = 1/2C * (Im^2) *[integration of cos(w0*t) wrt dt from 0 to t]^2\n')
+printf(' = 1/2C * (Im^2) *[(sin(w0*t)/w0) limits 0 to t]^2\n')
+printf(' = (Im^2)/2 * L * (sin(w0*t)^2)\n\n')
+printf('Therefore total energy = L*(Im^2)/2 * [(cos(w0*t)^2)+(sin(w0*t)^2)]\n')
+printf(' = (Im^2)*L/2\n')
+printf(' = L*(I^2)\n')
diff --git a/1319/CH1/EX1.18/1_18.sce b/1319/CH1/EX1.18/1_18.sce new file mode 100644 index 000000000..da9005f1f --- /dev/null +++ b/1319/CH1/EX1.18/1_18.sce @@ -0,0 +1,14 @@ +//Expression for the sum of energy stored by inductor and capacitor connected in parallel at resonance
+
+clc;
+clear;
+
+printf('v = Vm * cos(w0*t)\n')
+printf('The energy stored by the capacitor = C*(Vm^2)*(cos(w0*t)^2)\n')
+printf('The energy stored by the inductor = L*(i^2)/2\n\n')
+printf('v = L *(di/dt)\n di = v*dt/L\n (i^2) = [integration of (v/L) wrt dt from 0 to t]^2 \n')
+printf(' = (Vm^2)/(L^2) * (sin(w0*t)^2)/(w0^2) = (Vm/L)^2 * (sin(w0*t)^2) * LC\n')
+printf(' = (Vm^2)*C*(sin(w0*t)^2)/L \n\n')
+printf(' Energy = L*(i^2)/2 = (Vm^2)*C*(sin(w0*t)^2)*L/(L*2)\n')
+printf(' = C/2 * (Vm^2)*(sin(w0*t)^2)\n\n')
+printf(' Therefore total energy = C*(Vm^2)/2 = C*(V^2)\n')
diff --git a/1319/CH1/EX1.19/1_19.sce b/1319/CH1/EX1.19/1_19.sce new file mode 100644 index 000000000..3f7c39da4 --- /dev/null +++ b/1319/CH1/EX1.19/1_19.sce @@ -0,0 +1,24 @@ +// To determine bandwidth and half power frequencies
+
+clc;
+clear;
+
+R=50;
+f=750; // Frequency
+w0=(2*%pi*f);
+L=10*(10^-3);
+I=1; // Maximum Current
+
+Q=w0*L/R;
+
+bw=f/Q;
+
+a=(f^2); // let a = f1*f2
+b= bw; // let b = f2-f1
+c=sqrt((b^2)+(4*a)); // let c = f2+f1
+
+f2=(b+c)/2;
+f1=(c-b)/2;
+
+printf('The bandwidth = %g Hz\n',bw)
+printf('The half frequencies are f1 = %g Hz and f2 = %g Hz\n)',f1,f2)
diff --git a/1319/CH1/EX1.2/1_2.sce b/1319/CH1/EX1.2/1_2.sce new file mode 100644 index 000000000..505ac5e0d --- /dev/null +++ b/1319/CH1/EX1.2/1_2.sce @@ -0,0 +1,17 @@ +// To find the current and power
+
+clc;
+clear;
+
+Z=10+20*%i;
+
+V=120;
+
+I=V/Z;
+
+theta=atand(imag(I)/real(I));
+
+P=V*abs(I)*cosd(theta);
+
+disp('A',I,'The current flowing through the given impedance =')
+disp('watt',P,'The real power delivered to the impedance =')
diff --git a/1319/CH1/EX1.20/1_20.sce b/1319/CH1/EX1.20/1_20.sce new file mode 100644 index 000000000..5dbd3d47d --- /dev/null +++ b/1319/CH1/EX1.20/1_20.sce @@ -0,0 +1,16 @@ +// Determine the frequency of resonance and Max value of Rc at resonance
+
+clc;
+clear;
+
+Rl=6;
+L=1*(10^-3);
+Rc=4;
+C=20*(10^-6);
+
+w0=(1/(sqrt(L*C)))*(sqrt(((Rl^2)-(L/C))/((Rc^2)-(L/C))));
+
+Rcmax=sqrt(L/C);
+
+printf(' The frequency of resonance = %g rad/sec\n',w0)
+printf(' The Maximum value of Rc = %g ohms \n',Rcmax)
diff --git a/1319/CH1/EX1.21/1_21.sce b/1319/CH1/EX1.21/1_21.sce new file mode 100644 index 000000000..242ece728 --- /dev/null +++ b/1319/CH1/EX1.21/1_21.sce @@ -0,0 +1,21 @@ +// To determine Rl for which resonance can take place
+
+clc;
+clear;
+
+Rl=poly(0,'Rl');
+Rc=5;
+Xc=6;
+Xl=15;
+
+x=(((Rl^2)+(Xl^2))*Xc)-(((Rc^2)+(Xc^2))*Xl);
+
+Rl=roots(x);
+
+disp(x)
+
+printf('The above eqaution must be eqauted to zero to get Rl \n')
+
+disp(Rl)
+
+printf('The above eqaution leads to imaginary roots which is not possible, hence no value of Rl can bring resonance in the circuit at the given condition \n' )
diff --git a/1319/CH1/EX1.22/1_22.sce b/1319/CH1/EX1.22/1_22.sce new file mode 100644 index 000000000..c07b80259 --- /dev/null +++ b/1319/CH1/EX1.22/1_22.sce @@ -0,0 +1,31 @@ +//To find the resistor for a given Q factor
+
+clc;
+clear;
+
+f0=600*(10^3);
+bw=50*(10^3); // Bandwidth
+
+L=1.3*(10^-3); // Inductance
+
+Q=30;
+
+Xl=2*%pi*f0*L; // Inductive Reactance
+
+Xco=Xl;// At resonance Xl= Xco
+
+Zto=Q*Xco;
+
+Qd=f0/bw; // Required Q for the circuit
+
+Zdto= Qd*Xco; // The equivalent input resistance required
+
+Rd=poly(0,'Rd');
+
+x=(Zdto*(Zto+Rd))-(Zto*Rd); // Characteristic equation to the shunt resistance
+
+Rd=roots(x); // Shunt resistance
+
+printf('The resistance that is to be connected across the coil = %g k ohms\n',Rd/1000)
+
+
diff --git a/1319/CH1/EX1.23/1_23.sce b/1319/CH1/EX1.23/1_23.sce new file mode 100644 index 000000000..99aa77d84 --- /dev/null +++ b/1319/CH1/EX1.23/1_23.sce @@ -0,0 +1,36 @@ +//Find the flux density
+
+clc;
+clear;
+
+l=50*(10^-2); // Mean length
+m0=4*%pi*(10^-7); // Constant (Permeablity of air)
+ag=1*(10^-3); // Air Gap
+mr=300; // Relative permeability
+N=200; // No of turns
+I=1; // Current
+A=poly(0,'A');// Area
+
+Rel=l/(m0*mr*A);//Reluctance of the substance
+
+Relag=ag/(m0*A); // Air gap reluctance
+
+MMF=N*I;
+
+Relt=Rel+Relag; // Total reluctance
+
+phi=MMF/Relt;//Flux
+
+B=phi/A;
+
+// To get the numerical value of the flux density as the polynomial denominator doesn't divide
+
+x=B(2)-A;
+x=roots(x);
+
+y=B(3)-A;
+y=roots(y);
+
+B=x/y;
+
+printf('The flux density = %g mWb/(m^2)\n',B*1000)
diff --git a/1319/CH1/EX1.24/1_24.sce b/1319/CH1/EX1.24/1_24.sce new file mode 100644 index 000000000..4c51153cd --- /dev/null +++ b/1319/CH1/EX1.24/1_24.sce @@ -0,0 +1,29 @@ +//Find the number of ampere turns
+
+clc;
+clear;
+
+l=30*(10^-2); // Length of an iron path
+lag=2*(10^-3);//Length of air gap
+B=0.8; // Flux density
+H=700;
+m0=(4*%pi)*(10^-7);
+mr=B/(m0*H);
+
+A=poly(0,'A');//Area of the iron path
+
+R1=l/(m0*mr*A);
+R2=lag/(m0*A);
+R=R1+R2;
+
+phi=B*A;//Flux
+
+NI=phi*R;
+
+//To find numerical value
+y=NI-A;
+
+NI=roots(y(2));
+
+//The answer in the textbook contains Round off error
+printf('The number of turns necessary to produce a flux density of 0.8T in the air gap = %g AT\n',NI)
diff --git a/1319/CH1/EX1.25/1_25.sce b/1319/CH1/EX1.25/1_25.sce new file mode 100644 index 000000000..6ff58b51a --- /dev/null +++ b/1319/CH1/EX1.25/1_25.sce @@ -0,0 +1,32 @@ +//To find current in the 600 turn exciting coil
+
+clc;
+clear;
+
+N=600;
+mr=800;
+m0=4*%pi*(10^-7);
+
+phi=100*(10^-6);// Flux in air gap
+
+l1=10*(10^-2);
+l2=18*(10^-2);
+lg=2*(10^-3); // Air gap length
+Ac=(6.25)*(10^-4);// Central limb area
+As=3*(10^-4);// Side limb area
+
+Ra=lg/(m0*Ac);
+Ri=l1/(mr*m0*Ac);
+
+R=l2/(m0*mr*As);
+
+Rt=Ra+Ri; // Total reluctacne of the central limb
+
+AT1=Rt*phi; // MMF or Ampere turns for the central limb
+AT2=R*phi/2; // MMF, Two identical limbs hence flux becomes half and only one limb is considered
+
+AT=AT1+AT2;//Total MMF
+
+I=AT/N; // Current in the 600 turns
+
+printf('The current flowing in the 600 turns exciting coil = %g A\n',I)
diff --git a/1319/CH1/EX1.26/1_26.sce b/1319/CH1/EX1.26/1_26.sce new file mode 100644 index 000000000..b5d736627 --- /dev/null +++ b/1319/CH1/EX1.26/1_26.sce @@ -0,0 +1,36 @@ +// Find the current required to develop a flux of 1.6 mWb
+
+clc;
+clear;
+
+B=1;
+H=900;
+m0=4*%pi*(10^-7);
+mr=B/(m0*H);
+
+//lengths
+lg=1*(10^-3);// Air gap
+lc=24*(10^-2);// Central Limb
+la=60*(10^-2);// Side limbs
+
+//area
+A=4*4*(10^-4);
+
+phi=1.6*(10^-3); // Flux
+
+//Reluctances
+Ra=lg/(m0*A); // Air gap
+Rc=lc/(m0*mr*A);// Central limb
+Rs=la/(m0*mr*A);// One side limbs
+
+//mmf
+AT1=(Ra+Rc)*phi; // Central limb
+AT2=Rs*phi/2;// One of the side limb
+AT=AT1+AT2; // Total
+
+N=680;//Turns
+
+I=AT/N;
+
+printf('The current the current required to produce a total flux of 1.6 mWb = %g A\n',I)
+
diff --git a/1319/CH1/EX1.27/1_27.sce b/1319/CH1/EX1.27/1_27.sce new file mode 100644 index 000000000..a6ef2e0ec --- /dev/null +++ b/1319/CH1/EX1.27/1_27.sce @@ -0,0 +1,16 @@ +//Determine the inductance of individual winding
+
+clc;
+clear;
+
+La=15; // Self inductance of first coil
+Lb=16;// Self inductance of second coil
+M=-8; // Since the flux from both coils oppose each other
+
+L1=La+M;
+L2=Lb+M;
+
+L=L1*L2/(L1+L2);
+
+printf('The inductance of the individual windings are %g H and %g H respectively.\n',L1,L2)
+printf('The equivalent inductance between the terminals is %g H\n',L)
diff --git a/1319/CH1/EX1.28/1_28.sce b/1319/CH1/EX1.28/1_28.sce new file mode 100644 index 000000000..39f698011 --- /dev/null +++ b/1319/CH1/EX1.28/1_28.sce @@ -0,0 +1,21 @@ +//Determine the inductance of a three coil system
+
+clc;
+clear;
+//Self inductances of A B C
+L1=25;
+L2=30;
+L3=35;
+
+//Mutual inductances of AB BC CA
+M12=10;//Flux assist each other
+M23=-15;//Flux oppose each other
+M31=-10;//Flux oppose each other
+
+La=L1+M12+M31;
+Lb=L2+M12+M23;
+Lc=L3+M31+M23;
+
+Leq=1/(((La*Lb)+(Lb*Lc)+(Lc*La))/(La*Lb*Lc));
+
+printf('The equivalent inductance for a three coil system = %g H\n',Leq)
diff --git a/1319/CH1/EX1.29/1_29.sce b/1319/CH1/EX1.29/1_29.sce new file mode 100644 index 000000000..afb594f84 --- /dev/null +++ b/1319/CH1/EX1.29/1_29.sce @@ -0,0 +1,20 @@ +// To determine the parameters of an alternating current of 50Hz frequency
+
+clc;
+clear;
+
+f=50;
+Im=20;
+w=2*%pi*f;
+t=1/100;
+It=10;
+Irms=Im/(sqrt(2));
+Iav=0;//Full Cycle
+t10=asin(It/Im)/w;// time taken to rach 10A
+
+Ih=Im*sin(w*t);// Current at 1/100 sec
+
+printf('i) The general ecpression is i(t) = %g sin %gt\n',Im,w)
+printf('ii) The instantaneous value at t= 1/100 sec is %g A\n',floor(Ih*10)/10)
+printf('iii) The time taken to reach 10A for the first time = %g s\n',t10)
+printf('iv) The average and the rms value of current is %g A and %g A respectively\n',Iav,Irms)
diff --git a/1319/CH1/EX1.3/1_3.sce b/1319/CH1/EX1.3/1_3.sce new file mode 100644 index 000000000..85124d512 --- /dev/null +++ b/1319/CH1/EX1.3/1_3.sce @@ -0,0 +1,19 @@ +// To find the current and power of a capacitive circuit
+
+clc;
+clear;
+
+Z=10-25*%i;
+
+V=15;
+
+I=V/Z;
+
+theta=atand(imag(I)/real(I));
+
+Pr=V*abs(I)*cosd(theta);
+Pq=V*abs(I)*sind(theta);
+
+disp('A',I,'The current flowing through the given impedance =')
+disp('watt',Pr,'The real power loss of the capacitive impedance =')
+disp('Var',-Pq,'The reactive power of the capacitive circuit =')// Negative sign indicates power genrated.
diff --git a/1319/CH1/EX1.30/1_30.sce b/1319/CH1/EX1.30/1_30.sce new file mode 100644 index 000000000..26198cb29 --- /dev/null +++ b/1319/CH1/EX1.30/1_30.sce @@ -0,0 +1,17 @@ +//Determine the resultant current for two alternating currents
+
+clc;
+clear;
+
+ti1=30;
+ti2=45;
+
+i1=20*(expm(%i*%pi/6));
+i2=40*(expm(%i*%pi/4));
+
+i=i1+i2;
+
+ti=atand(imag(i)/real(i));
+
+printf('The resultant current = %g sin(314t + %g(degrees)) A\n',abs(i),ti)
+printf(' Or %g/_%g A\n',abs(i),ti)
diff --git a/1319/CH1/EX1.31/1_31.sce b/1319/CH1/EX1.31/1_31.sce new file mode 100644 index 000000000..3e1184dff --- /dev/null +++ b/1319/CH1/EX1.31/1_31.sce @@ -0,0 +1,21 @@ +//To determine the sum and difference of two alternating voltage sources
+
+clc;
+clear;
+
+//Phase angles
+tv1=0;
+tv2=-%pi/6;
+
+//Taking v1 as reference voltage
+v1=110*(expm(%i*tv1));
+v2=80*(expm(%i*tv2));
+
+Vs=v1+v2;//Sum
+Vd=v1-v2;//Difference
+
+ts=atand(imag(Vs)/real(Vs));
+td=atand(imag(Vd)/real(Vd));
+
+printf('i) The sum = %g sin(wt + (%g(degrees))) V\n',abs(Vs),ts)
+printf('i) The difference = %g sin(wt + (%g(degrees))) V\n',abs(Vd),td)
diff --git a/1319/CH1/EX1.32/1_32.sce b/1319/CH1/EX1.32/1_32.sce new file mode 100644 index 000000000..7b8592f47 --- /dev/null +++ b/1319/CH1/EX1.32/1_32.sce @@ -0,0 +1,25 @@ +//Determine the parameters of the circuit and power and pf
+
+clc;
+clear;
+
+tv=30;//Phase angle for voltage
+ti=-30;// Phase angle for current
+t=tv-ti;//Phase difference between v and i
+
+//Keeping i as reference, Voltage leads current by t angle
+
+i=10*(expm(%i*0));
+v=230*(expm(%i*(%pi*t/180)));
+
+z=v/i;
+
+R=real(z);
+X=imag(z);
+
+P=abs(v)*abs(i)*cosd(t)/2; // rms values of voltage and current
+
+printf('The circuit parameters are \n')
+printf('Resistance = %g ohms\nReactance = %g ohms\n\n',R,X)
+printf('The Power consumed = %g W\n',P)
+printf('p.f of the circuit = %g\n',cosd(t))
diff --git a/1319/CH1/EX1.33/1_33.sce b/1319/CH1/EX1.33/1_33.sce new file mode 100644 index 000000000..43f721cd7 --- /dev/null +++ b/1319/CH1/EX1.33/1_33.sce @@ -0,0 +1,31 @@ +//Determine circuit paramters of an iron coil
+
+clc;
+clear;
+
+f=50; // Frequency
+Vdc=40;//DC Voltage source
+Idc=5; // Current drawn from DC Voltage source
+Vac=200; // AC Voltage Source
+Iac=5; // Current drawn form AC Voltage source
+P=500; // Power Consumed by ac supply
+
+R=Vdc/Idc; // Resistance of the coil
+Z=Vac/Iac; // Impedance of the coil
+
+Pc=(Iac^2)*R; //Power loss in ohmic resistance
+
+Pil=P-Pc; // Iron loss
+
+Reff=P/(Iac^2); // Effective resistance of the coil
+
+Xl=sqrt((Z^2)-(Reff^2)); // Reactance of the coil
+
+L=Xl/(2*%pi*f); // Inductance of the coil
+
+pf=P/(Vac*Iac);
+
+printf('i) The impedance = %g ohms\n',Z)
+printf('ii) The iron loss = %g W\n',Pil)
+printf('iii) The inductance of the coil = %g H\n',L)
+printf('iv) p.f of the coil = %g\n',pf)
diff --git a/1319/CH1/EX1.34/1_34.sce b/1319/CH1/EX1.34/1_34.sce new file mode 100644 index 000000000..7b8397d8e --- /dev/null +++ b/1319/CH1/EX1.34/1_34.sce @@ -0,0 +1,21 @@ +//Determine the phase angle between 220V main and the current
+
+clc;
+clear;
+
+f=50;//Frequency of AC Mains
+Vni=100;//Voltage for non inductive load
+Ini=10; // Current drawn by a non inductive load
+Rni=Vni/Ini;// Resistance of an non inductive load
+Vac=220;// Supply from AC Mains
+
+Z=Vac/Ini;
+
+X=sqrt((Z^2)-(Rni^2));
+
+phi=atand(X/Rni);// Phase Angle
+
+L=X/(2*%pi*f);//Inductance
+
+printf('The inductance of a reactor to be connected in series = %g H\n',L)
+printf('The phase angle between the 220V mains and the current = %g degrees\n',phi)
diff --git a/1319/CH1/EX1.35/1_35.sce b/1319/CH1/EX1.35/1_35.sce new file mode 100644 index 000000000..35f09ecdd --- /dev/null +++ b/1319/CH1/EX1.35/1_35.sce @@ -0,0 +1,25 @@ +//To determine the coil parameters with resistance of 5 ohms
+
+clc;
+clear;
+//Parameters of the coil
+R=5; // Resistance
+I=10; // Current flowing
+V=200;// Voltage across
+f=50;// Frequency of operation
+P=750;//Total Power Dissipated
+
+Pc=(I^2)*R; // Copper Loss
+Pil=P-Pc;// Iron Loss
+
+Z=V/I;// Impedance
+
+X=sqrt((Z^2)-(R^2));//Reactance
+
+L=X/(2*%pi*f);// Inductance
+
+pf=P/(V*I); // Power Factor
+
+printf('i The iron loss = %g W\n',Pil)
+printf('ii) The inductance at the given value of current = %g H\n',L)
+printf('iii) p.f = %g\n',pf)
diff --git a/1319/CH1/EX1.36/1_36.sce b/1319/CH1/EX1.36/1_36.sce new file mode 100644 index 000000000..0d45c8ee5 --- /dev/null +++ b/1319/CH1/EX1.36/1_36.sce @@ -0,0 +1,36 @@ +//Determine the resonant frequency and the source current
+
+clc;
+clear;
+
+L=0.24; // Inductance
+Rl=150;
+Rc=100;
+C=3*(10^-6); // Capacitance
+f=50;
+w=2*%pi*f;
+V=200; // Source voltage
+
+fs=1/(2*%pi*sqrt(L*C)); // Frequency at the time of series connection
+
+f0=fs*sqrt(((Rl^2)-(L/C))/((Rc^2)-(L/C)))// Resonant frequency
+
+//Taking voltage as the reference
+
+Xl=L*w; // Inductive reactance
+Xc=1/(C*w); // Capacitive reactance
+
+Ra=Rl+(%i*Xl); // Effective resistance of inductive branch
+Rb=Rc-(%i*Xc);// Effective resistance of capacitive branch
+
+Reff=Ra*Rb/(Ra+Rb); // Effective Resistance
+Tr=atand(imag(Reff)/real(Reff)); // Phase Angle
+
+I=V/Reff;// Source current
+Ti=atand(imag(I)/real(I))// Phase angle
+
+printf('The resonant frequency = %g Hz\n',f0)
+printf('The source current = %g/_%g A\n',abs(I),Ti)
+printf('The input impeadance = %g/_%g ohms\n',abs(Reff),Tr)
+
+
diff --git a/1319/CH1/EX1.37/1_37.sce b/1319/CH1/EX1.37/1_37.sce new file mode 100644 index 000000000..46a6ca00b --- /dev/null +++ b/1319/CH1/EX1.37/1_37.sce @@ -0,0 +1,41 @@ +//Determine Circuit parameters for a circuit with a current source
+
+clc;
+clear;
+
+I=2.5*(10^-3); // Current Source
+R=100; // Resistance of the coil
+L=1*(10^-3); // Inductance of the coil
+fr=600*(10^3); // Resonance frequency
+R2=60*(10^3); // Resistance in parallel with the coil
+wr=2*%pi*fr;// Angular Resonance frequency
+
+Q=wr*L/R; // For the coil
+
+C=1/((wr^2)*L); // Capcitance in the circuit
+Xc0=1/(wr*C);
+
+Recc=Q*Xc0; // Equivalent resistance of coil and capacitor
+
+Req=R*Recc/(R+Recc); //Equivalent resistance of the circuit
+
+Qcir=wr*Req*C; // For the circuit
+
+bw=fr/Qcir; // Bandwidth of the circuit
+
+v=I*Req;
+
+MaxE=C*(v^2); // Maximum energy stored by the capacitor
+
+Pdr=(I^2)*Req; // Power dissipated in the resistor
+
+
+// Textbook calculation for Equivalent resistance of C and Coil is wrong
+
+printf('a) Q of the coil = %g\n',Q)
+printf('b) Capacitance C = %g pF\n',C*(10^12))
+printf('c) Q of the circuit = %g\n',Qcir)
+printf('d) Bandwidth of the circuit = %g kHz\n',bw/1000)
+printf('e) Maximum Energy stored in the capacitor = %g pJ\n',MaxE*(10^12))
+printf('f) Power Dissipated in the resistor = %g mW\n',Pdr*1000)
+
diff --git a/1319/CH1/EX1.38/1_38.sce b/1319/CH1/EX1.38/1_38.sce new file mode 100644 index 000000000..63b7979bb --- /dev/null +++ b/1319/CH1/EX1.38/1_38.sce @@ -0,0 +1,56 @@ +// Determine the instantaneous energy stored in the capacitor and inductor
+
+clc;
+clear;
+
+Vc=20*sqrt(2);
+C=2; // Capacitor
+L=1; // Inductor
+w=poly(0,'w');
+
+// Impedances in order from let to right (as a function of w)
+R1=%i*w;
+R2=1/(2*%i*w); // Top
+R3=1;// Bottom
+
+Rp=R2*R3/(R2+R3); // Effective resistance of the parallel path
+
+Reff=R1+Rp; // Effective resistance
+
+Reff(2)=Reff(2)*conj(Reff(3));
+Reff(3)=Reff(3)*conj(Reff(3));
+
+R=imag(Reff(2))/Reff(3); // Imaginary part of the above equation
+
+//From the above equation we get five roots, three are zero and we take the positive value
+w=roots(R(2));
+w=abs(w(2)); // Numerical Value
+
+// Impedances in order from let to right (Numerical Value)
+R1=%i*w;
+R2=1/(2*%i*w); // Top
+R3=1;// Bottom
+
+Vcrms=Vc/sqrt(2);
+
+// Taking Vc as reference
+
+Ic=Vcrms/R2; // Current through Capacitor
+Ir=Vcrms/R3; // Current through Resistor
+
+Il=Ic+Ir; // Rms value of Current through Inductor
+tl=atand(imag(Il)/real(Il)); // Phase angle of Inductor Current
+
+Ilmax=abs(Il)*sqrt(2); // Maximum Current
+
+Eins=C*(Vc^2)/2; // Magnitude of Instaneous energy stored
+
+Ein=L*(abs(Ilmax)^2)/2; // Energy through the inductor
+Er=(Ir^2)*R3; // Loss in the resistor
+
+Q0= w*Ein*(1+(1/sqrt(2)))/Er; // Q of the circuit
+
+printf('a) Instaneous Energy Stored in Capacitor = %g (sin(%gt)^2) \n',Eins,w)
+printf(' Instaneous Energy Stored in Inductor = %g (sin( %gt + %g)^2) \n',Ein,w,tl)
+printf('b) Q of the circuit = %g \n',Q0)
+
diff --git a/1319/CH1/EX1.39/1_39.sce b/1319/CH1/EX1.39/1_39.sce new file mode 100644 index 000000000..e54cdc7ed --- /dev/null +++ b/1319/CH1/EX1.39/1_39.sce @@ -0,0 +1,47 @@ +//To determine the current through all the branches of the given network
+
+clc;
+clear;
+
+L=1;
+R=1*(10^3);
+C=400*(10^-6);
+i=2; // 2 cos 50t
+
+w0=1/(sqrt(L*C));
+
+v=i*R; // Voltage across the source
+
+Xl=%i*w0*L; // Inductive reactance
+Xc=-%i/(C*w0);// Capacitive reactance
+
+Il=v/Xl; // Inductor current
+Ic=v/Xc; // Capacitor Current
+
+//Condition to check if angle is 90
+if(real(Il)==0)
+ if(imag(Il)>0)
+ tl=atand(%inf);
+ else
+ tl=-1*atand(%inf);
+ end
+
+else
+ tl=atand(imag(Il)/real(Il));
+end
+
+//Condition to check if angle is 90
+if(real(Ic)==0)
+ if(imag(Ic)>0)
+ tc=atand(%inf);
+ else
+ tc=-1*atand(%inf);
+ end
+
+else
+ tc=atand(imag(Ic)/real(Ic));
+end
+
+printf('The Current through the resistor is %g cos(%g)t A\n',i,w0)
+printf('The Current through the inductor is %g cos(%gt + (%g)) A\n',abs(Il),w0,tl)
+printf('The Current through the capacitor is %g cos(%gt + (%g)) A\n',abs(Ic),w0,tc)
diff --git a/1319/CH1/EX1.4/1_4.sce b/1319/CH1/EX1.4/1_4.sce new file mode 100644 index 000000000..ac7fa06d3 --- /dev/null +++ b/1319/CH1/EX1.4/1_4.sce @@ -0,0 +1,56 @@ +// To find the frequency in the RLC Circuit at a phase angle of 45 degrees
+
+clc;
+clear;
+
+R=100;
+L=2;
+C=20*(10^-6);
+
+f1=poly([0 1],'f1','c');
+f2=poly([0 1],'f2','c');
+w1=2*%pi*f1;
+w2=2*%pi*f2;
+
+//To achieve a phase angle of 45 degrees, the difference between Xl and Xc should be equal to R
+
+// We have two different situations
+
+Xl1=L*w1;
+Xc1=1/(w1*C);
+
+Xl2=L*w2;
+Xc2=1/(w2*C);
+
+cs1=Xl1-Xc1-R;
+cs2=Xc2-Xl2-R;
+
+f1=roots(cs1(2));
+f2=roots(cs2(2));
+
+//To find the suitable roots and to differenciate between positive and negative roots.
+
+a=sqrt(f1(1));
+b=sqrt(f1(2));
+c=sqrt(f2(1));
+d=sqrt(f2(2));
+
+if(imag(a))
+ f1=f1(2);
+end
+
+if(imag(b))
+ f1=f1(1);
+end
+
+if(imag(c))
+ f2=f2(2);
+end
+
+if(imag(d))
+ f2=f2(1);
+end
+
+disp('The frequencies at which the phase angle is 45 degress are')
+
+disp('Hz',f2,'f2 =','Hz',f1,'f1 =')
diff --git a/1319/CH1/EX1.40/1_40.sce b/1319/CH1/EX1.40/1_40.sce new file mode 100644 index 000000000..31999cd20 --- /dev/null +++ b/1319/CH1/EX1.40/1_40.sce @@ -0,0 +1,33 @@ +//To determine parameters to operate the relay
+
+clc;
+clear;
+
+N=500;// No of turns
+l=400*(10^-3); // Mean Core length
+lg=1*(10^-3); // Air Gap length
+B=0.8; // Flux density required to operate the relay
+m0=4*%pi*(10^-7); // permeability of free space
+H=500; // Magentic Field Intensity
+
+mmfc=H*l; // mmf for the core
+mmfg=2*lg*B/(m0); // mmf of the air gap
+
+tmmf=mmfc+mmfg; // Total mmf
+
+Iop=tmmf/N; // Operating current for the relay
+
+m=B/H; // Permeability
+
+mr=m/m0; // Relative permeability
+
+// When gap is zero
+
+mmf=mmfc; // Total mmf required
+
+I=mmf/N; // Current when the gap is zero
+
+printf('i) The current required to operate the relay = %g A\n',Iop)
+printf('ii)Wrt the Core, The permeability = %g and Relative permeablity = %g \n',m,mr)
+printf('iii) The current required when gap is zero = %g A \n',I)
+
diff --git a/1319/CH1/EX1.41/1_41.sce b/1319/CH1/EX1.41/1_41.sce new file mode 100644 index 000000000..95aa107a5 --- /dev/null +++ b/1319/CH1/EX1.41/1_41.sce @@ -0,0 +1,56 @@ +// To determine the parameters of a toroid
+
+clc;
+clear;
+
+//Arc length of different materials
+lni=0.3; // nickel iron alloy
+lss=0.2;//Silicon Steel
+lcs=0.1;//Cast steel
+
+A=1*(10^-3); // Area of cross section of Toroid
+
+N=100; // Hundred Turns
+
+phi=6*(10^-4); // Flux
+B=0.6; // Flux densities
+m0=4*%pi*(10^-7);
+
+//Field intensities
+Hni=10; // Ni alloy
+Hss=77;// Si Steel
+Hcs=270; // CAst steel
+
+mmf=(Hni*lni)+(Hss*lss)+(Hcs*lcs); // Total mmf
+
+B=phi/A;
+
+I=mmf/N;
+
+//P = Permeability, RP = Relative permeablity
+
+//For Nickel Alloy
+mni=B/Hni; // P
+mrni=mni/m0; // RP
+
+//For Si Steel
+mss=B/Hss; //P
+mrss=mss/m0; // RP
+
+//For Cast Steel
+mcs=B/Hcs; //P
+mrcs=mcs/m0; // RP
+
+deff('x=rel(y,z)','x=(y*z)/phi'); // Fucntion to find out Reluctance
+
+//Reluctances
+Rni=rel(Hni,lni);
+Rss=rel(Hss,lss);
+Rcs=rel(Hcs,lcs);
+
+printf('i) The mmf required to establish a magnetic flux of 6 *(10^-4) Wb = %g AT\n',mmf)
+printf('ii) The Current through the coil = %g A\n',I)
+printf('iii) Relative permeability and reluctance of each ferro magnetic material\n')
+printf(' Nickel Iron alloy is %g and %g ohms \n',mrni,Rni)
+printf(' Silicon Steel is %g and %g ohms \n',mrss,Rss)
+printf(' Cast Steel is %g and %g ohms \n',mrcs,Rcs)
diff --git a/1319/CH1/EX1.42/1_42.sce b/1319/CH1/EX1.42/1_42.sce new file mode 100644 index 000000000..c0a2c958e --- /dev/null +++ b/1319/CH1/EX1.42/1_42.sce @@ -0,0 +1,29 @@ +//Determine the magnetic flux for a toriod
+
+clc;
+clear;
+
+//Arc length of different materials
+lni=0.3; // nickel iron alloy
+lss=0.2;//Silicon Steel
+lcs=0.1;//Cast steel
+
+//Field intensities
+Hni=10; // Ni alloy
+Hss=77;// Si Steel
+Hcs=270; // Cast steel
+
+con=6*(10^-4); // Gives Constant reluctances
+
+deff('x=rel(y,z)','x=(y*z)/con'); // Fucntion to find out Reluctance
+
+//Reluctances
+Rni=rel(Hni,lni); // Note that the textbook has a wrong value calculated for the nickel alloy reluctance
+Rss=rel(Hss,lss);
+Rcs=rel(Hcs,lcs);
+
+mmf=35; // Applied mmf
+
+phi=mmf/(Rni+Rss+Rcs); // Magnetic flux produced
+
+printf('The approximate magnetic flux produced = %g Wb\n',phi)
diff --git a/1319/CH1/EX1.43/1_43.sce b/1319/CH1/EX1.43/1_43.sce new file mode 100644 index 000000000..4dbd2f58e --- /dev/null +++ b/1319/CH1/EX1.43/1_43.sce @@ -0,0 +1,35 @@ +//To determine the magnetic parameters of a steel ring
+
+clc;
+clear;
+
+d=30*(10^-2); // Mean diameter
+m0=4*%pi*(10^-7);
+lg=1*(10^-3); //Air Gap length
+r=(2*(10^-2))/2; // radius of the circular part of the air gap
+Ag=%pi*r*r; // Area of the air gap
+N=600; // No of turns
+I=2.5;// Current
+
+Ip=40/100; // Iron path usage
+Agp=1-Ip; // Air gap usage
+
+mmf=N*I;
+mmfs=Ip*mmf; // mmf required for the steel
+mmfg=Agp*mmf; // mmf required for the air gap
+
+Rg=lg/(m0*Ag); // Reluctance of the air gap
+
+phi=mmfg/Rg; // Flux through the gap
+
+Rs=mmfs/phi; // Reluctance of steel
+Rt=Rs+Rg; // Total reluctance
+B=phi/Ag; // Flux density of air
+
+printf('i) mmf of air gap and steel ring = %gAT and %gAT\n',mmfg,mmfs)
+printf('ii) Magnetic flux = %g mWb\n',phi*1000)
+printf('iii) Reluctance = %g M ohms \n',Rt/(10^6))
+printf('iv) Flux density = %g T\n',B)
+
+
+
diff --git a/1319/CH1/EX1.5/1_5.sce b/1319/CH1/EX1.5/1_5.sce new file mode 100644 index 000000000..c7babac38 --- /dev/null +++ b/1319/CH1/EX1.5/1_5.sce @@ -0,0 +1,45 @@ +// To find the inductance of a choke to operate a 120V 500W lamp at 230V
+
+clc;
+clear;
+
+V=120;
+W=500;
+Rl=(V^2)/W;
+I=W/V; // Circuit Current
+
+// Q of a choke means the ratio of its inductive reactance to its resistance
+
+Q=2;
+f=60;
+w=2*%pi*f;
+
+Vs=230; // Supply Voltage
+
+Xcir=230/I;
+
+L=poly([0 1],'L','c');
+
+Xl=w*L;
+
+Rc=Xl/2; // Q utilised
+
+// total resistance
+
+Rt=Rl+Rc;
+
+
+ind=(Rt^2)+(Xl^2)-(Xcir^2);// Characteristic equation to find L
+
+L=roots(ind);
+
+disp(ind,'The Characteristic equation to find L is')
+
+if(imag(sqrt(L(1))))
+ L=L(2);
+else
+ L=L(1);
+end
+
+
+disp('H',L,'The inductance of the choke coil = ')
diff --git a/1319/CH1/EX1.6/1_6.sce b/1319/CH1/EX1.6/1_6.sce new file mode 100644 index 000000000..a4c714e83 --- /dev/null +++ b/1319/CH1/EX1.6/1_6.sce @@ -0,0 +1,28 @@ +// Determine the value of the circuit components
+
+clc;
+clear;
+
+Z=10-(30*%i);
+
+f=1*(10^6);
+
+Y=1/Z;
+
+G=real(Y);
+B=imag(Y);
+
+// G= 1/R
+// B= wC
+
+
+w=2*%pi*f;
+
+R=1/G;
+
+C=B/(w);
+
+cap=abs((10^9)*C)/(10^9);
+
+disp('ohms',R,'The resistance of the circuit =')
+disp('nF',cap,'The capacitance of the circuit =')
diff --git a/1319/CH1/EX1.7/1_7.sce b/1319/CH1/EX1.7/1_7.sce new file mode 100644 index 000000000..d1ef873aa --- /dev/null +++ b/1319/CH1/EX1.7/1_7.sce @@ -0,0 +1,23 @@ +// To determine circuit impedance and current in a parallel connection of a resistor and capacitor.
+
+clc;
+clear;
+
+R=4700;
+V=240;
+f=60;
+w=2*%pi*f;
+C=2*(10^-6);
+Xc=-(1/(C*w))*%i;// Reactance in polar form
+
+Ir=V/R;
+Ic=V/Xc;
+
+I=Ir+Ic;// Total current
+
+Z=V/I;
+
+theta=atand(imag(Z)/real(Z));
+
+mprintf('Impedance of the circuit = %f /_ %f ohms',abs(Z),theta)
+
diff --git a/1319/CH1/EX1.8/1_8.sce b/1319/CH1/EX1.8/1_8.sce new file mode 100644 index 000000000..08a8dd069 --- /dev/null +++ b/1319/CH1/EX1.8/1_8.sce @@ -0,0 +1,22 @@ +//To find the current and impedance and admittance of the circuit
+
+clc;
+clear;
+
+R=25;
+Xl=50*%i;
+Z1=R+Xl;
+
+Z2=-40*%i;
+
+V=100;
+
+Zeq=(Z1*Z2)/(Z1+Z2);
+
+Y=1/Zeq;
+
+I=V*Y;
+
+mprintf('The Current of the circuit = %f /_ %f A \n',abs(I),atand(imag(I)/real(I)))
+mprintf('The Impedance of the circuit = %f /_ %f ohms \n',abs(Zeq),atand(imag(Zeq)/real(Zeq)))
+mprintf('The Admittance of the circuit = %f /_ %f siemens \n',abs(Y),atand(imag(Y)/real(Y)))
diff --git a/1319/CH1/EX1.9/1_9.sce b/1319/CH1/EX1.9/1_9.sce new file mode 100644 index 000000000..716cc9de9 --- /dev/null +++ b/1319/CH1/EX1.9/1_9.sce @@ -0,0 +1,22 @@ +// Maximum current and frequncy at which it occurs and respective voltages
+
+clc;
+clear;
+
+R=5;
+L=4*(10^-3);
+C=0.1*(10^-6);
+V=10;
+
+w0=1/(sqrt(L*C));
+
+Ir=V/R;
+
+Vl=w0*L*Ir;
+
+Vc=Ir/(w0*C);
+
+mprintf('The Maximum Current at resonance = %f A \n',Ir)
+mprintf('The frequency for resonance = %f rad/sec \n',w0)
+mprintf('The voltage magnitude across the inductor = %f V \n',Vl)
+mprintf('The voltage magnitude across the capacitor = %f V \n',Vc)
|