diff options
author | prashantsinalkar | 2019-05-08 12:19:42 +0530 |
---|---|---|
committer | prashantsinalkar | 2019-05-08 12:19:42 +0530 |
commit | 7f9774a5323ebaf3d47e1178483ea5c1891aca77 (patch) | |
tree | 663be75a32c642efbf00a320ab80975ef5caba8a | |
parent | 38b19b5aef8266b5e7e66e8dea164c6c9479e2ab (diff) | |
download | Scilab-TBC-Uploads-1-7f9774a5323ebaf3d47e1178483ea5c1891aca77.tar.gz Scilab-TBC-Uploads-1-7f9774a5323ebaf3d47e1178483ea5c1891aca77.tar.bz2 Scilab-TBC-Uploads-1-7f9774a5323ebaf3d47e1178483ea5c1891aca77.zip |
initial commit / add all books
549 files changed, 12726 insertions, 0 deletions
diff --git a/3883/CH1/EX1.1/EX1_1.sce b/3883/CH1/EX1.1/EX1_1.sce new file mode 100644 index 000000000..1507fc4f9 --- /dev/null +++ b/3883/CH1/EX1.1/EX1_1.sce @@ -0,0 +1,39 @@ +//Chapter 1, Example 1.1
+clc
+//Variable Declaration
+a1 = 532.6 //(a) unit less variable
+a2 = 4.02 //(a) unit less variable
+a3 = 0.036 //(a) unit less variable
+b1 = 0.04 //(b) unit less variable
+b2 = 0.003 //(b) unit less variable
+b3 = 0.0064 //(b) unit less variable
+c1 = 4.632 //(c) unit less variable
+c2 = 2.4 //(c) unit less variable
+d1 = 3.051 //(d) unit less variable
+d2 = 802 //(d) unit less variable
+e1 = 1402 //(e) unit less variable
+e2 = 6.4 //(e) unit less variable
+f1 = 0.0046 //(f) unit less variable
+f2 = 0.05 //(f) unit less variable
+
+//Calculation
+//(a)
+a = a1+a2+a3 //addition function
+//(b)
+b = b1+b2+b3 //addition function
+//(c)
+c = c1*c2 //Multiplication function
+//(d)
+d = d1*d2 //Multiplication function
+//(e)
+e = e1/e2 //Division function
+//(f)
+f = f1/f2 //Division function
+
+//Results
+printf("(a) %.1f + %.2f + %.3f = %.3f = %.1f \n",a1,a2,a3,a,a)
+printf("(b) %.2f + %.3f + %.4f = %.4f = %.2f \n",b1,b2,b3,b,b)
+printf("(c) %.3f * %.1f = %.4f = %d \n",c1,c2,c,c)
+printf("(d) %.3f * %.0f = %.3f = %d \n",d1,d2,d,d)
+printf("(e) %.0f / %.1f = %.4f = %d \n",e1,e2,e,e)
+printf("(f) %.4f / %.2f = %.4f = %.2f",f1,f2,f,f)
diff --git a/3883/CH1/EX1.10/EX1_10.sce b/3883/CH1/EX1.10/EX1_10.sce new file mode 100644 index 000000000..d0a9d5e28 --- /dev/null +++ b/3883/CH1/EX1.10/EX1_10.sce @@ -0,0 +1,13 @@ +//Chapter 1, Example 1.10
+clc
+//Variable Declaration
+a = 1000000 //in ohms
+b = 1000000 //in meters
+c = 0.0001 //in second
+d = 0.000001 //in farad
+
+//Results
+printf("(a) %d x 10^6 ohms = %d megaohm \n",a/10**6,a/10**6)
+printf("(b) %d x 10^3 meters = %d kilometers \n",b/10**4,b/10**4)
+printf("(c) %.1f x 10-3 second = %.1f millisecond \n",c*1000,c*10**3)
+printf("(d) %d x 10-6 farad = %d microfarad",d*10**6,d*10**6)
diff --git a/3883/CH1/EX1.11/EX1_11.sce b/3883/CH1/EX1.11/EX1_11.sce new file mode 100644 index 000000000..5b70316c1 --- /dev/null +++ b/3883/CH1/EX1.11/EX1_11.sce @@ -0,0 +1,20 @@ +//Chapter 1, Example 1.11
+clc
+//Variable Declaration
+a = 41200 //in meter
+b = 0.00956 //in Joule
+c = 0.000768 //in sec
+d1 = 8400 //in meter
+d2 = 0.06 //in meter
+e1 = 0.0003 //in sec
+
+//Calculation
+d = d1/d2 //in meter
+e = e1^4 //in sec
+
+//Results
+printf("(a) %.1f km \n",a/1000)
+printf("(b) %.2f mJ \n",b*1000)
+printf("(c) %d us \n",c*10**6)
+printf("(d) %d km \n",d/1000)
+printf("(e) %.4f ps",e*10**12)
diff --git a/3883/CH1/EX1.12/EX1_12.sce b/3883/CH1/EX1.12/EX1_12.sce new file mode 100644 index 000000000..d4de4a09f --- /dev/null +++ b/3883/CH1/EX1.12/EX1_12.sce @@ -0,0 +1,11 @@ +//Chapter 1, Example 1.12
+clc
+//Variable Declaration
+a = 20*10^3 //frequency in hertz
+b = 0.01 //timeperiod in millisec
+c = 0.002 //in Km
+
+//Results
+printf("(a) %.2f MHz \n",a/10**6)
+printf("(b) %d us \n",b*10**3)
+printf("(c) %d mm",c*10**6)
diff --git a/3883/CH1/EX1.13/EX1_13.sce b/3883/CH1/EX1.13/EX1_13.sce new file mode 100644 index 000000000..fcbc88885 --- /dev/null +++ b/3883/CH1/EX1.13/EX1_13.sce @@ -0,0 +1,15 @@ +//Chapter 1, Example 1.13
+clc
+//Variable Declaration
+a1 = 6.8 //time in minutes
+a2 = 60 //60second in 1 minute
+b1 = 0.24 //measurement in meter
+b2 = 100 //100centimeter in 1 meter
+
+//Calculation
+a = a1*a2
+b = b1*b2
+
+//Results
+printf("(a) %d s \n",a)
+printf("(b) %d cm",b)
diff --git a/3883/CH1/EX1.14/EX1_14.sce b/3883/CH1/EX1.14/EX1_14.sce new file mode 100644 index 000000000..08d6b739f --- /dev/null +++ b/3883/CH1/EX1.14/EX1_14.sce @@ -0,0 +1,18 @@ +//Chapter 1, Example 1.14
+clc
+//Variable Declaration
+a1 = 0.5 //half day
+a2 = 24 //24hours in 1day
+a3 = 60 //60minutes in 1hour
+b1 =2.2 //yards
+b2 = 3 //3ft in 1 yard
+b3 = 12 //12inches in 1ft
+b4 = 39.37 //in inches
+
+//Calculation
+a = a1*a2*a3
+b = (b1*b2*b3)/b4
+
+//Results
+printf("(a) %d min \n",a)
+printf("(b) %.3f m",b)
diff --git a/3883/CH1/EX1.15/EX1_15.sce b/3883/CH1/EX1.15/EX1_15.sce new file mode 100644 index 000000000..222afce89 --- /dev/null +++ b/3883/CH1/EX1.15/EX1_15.sce @@ -0,0 +1,18 @@ +//Chapter 1, Example 1.15
+clc
+//Variable Declaration
+a1 =100 //in kilometers
+a2 = 1000 //in meters
+a3 = 39.37 //in inches
+a4 = 12 //in inches
+a5 = 5280 //in ft
+b1 = 60 //in minutes
+b2 = 4 //in hours
+
+//Calculation
+a = (a1*a2*a3)/(a4*a5)
+b = b1/b2
+
+//Results
+printf("(a) %.2f mi/h \n",a)
+printf("(b) %d mi/h",b)
diff --git a/3883/CH1/EX1.16/EX1_16.sce b/3883/CH1/EX1.16/EX1_16.sce new file mode 100644 index 000000000..e5ad03006 --- /dev/null +++ b/3883/CH1/EX1.16/EX1_16.sce @@ -0,0 +1,21 @@ +//Chapter 1, Example 1.16
+clc
+//Variable Declaration
+a1 = 9
+a2 = 3
+c1 = 3
+c2 = 9
+c3 = 4
+d1 = 1/4
+d2 = 1/6
+d3 = 2/3
+
+//Calculation
+a = sqrt(a1/a2)
+b = (c1+c2)/c3
+c = d1+d2+d3
+
+//Results
+printf("(a) %.2f \n",a)
+printf("(b) %.d \n",b)
+printf("(c) %.2f ",c)
diff --git a/3883/CH1/EX1.2/EX1_2.sce b/3883/CH1/EX1.2/EX1_2.sce new file mode 100644 index 000000000..77223e048 --- /dev/null +++ b/3883/CH1/EX1.2/EX1_2.sce @@ -0,0 +1,15 @@ +//Chapter 1, Example 1.2
+clc
+//Variable Declaration
+a = 1000 //(a) unit less variable
+b = 0.00001 //(b) unit less variable
+
+//Calculation
+//(a)
+a1 = 1/a //inverse function
+//(b)
+b1 = 1/b //inverse function
+
+//Results
+printf("(a) %d^-3 \n",a1*10000)
+printf("(b) %d^+5",round(b1/10000))
diff --git a/3883/CH1/EX1.3/EX1_3.sce b/3883/CH1/EX1.3/EX1_3.sce new file mode 100644 index 000000000..79d272f3c --- /dev/null +++ b/3883/CH1/EX1.3/EX1_3.sce @@ -0,0 +1,16 @@ +//Chapter 1, Example 1.3
+clc
+//Variable Declaration
+a1 = 1000 //(a) unit less variable
+a2 = 10000 //(a) unit less variable
+b1 = 0.00001 //(b) unit less variable
+b2 = 100 //(b) unit less variable
+
+//Calculation
+//(a)
+a = a1*a2 //multiplication function
+//(b)
+b = b1*b2 //multiplication function
+//Results
+printf("(a) %d^7 \n",a/1000000)
+printf("(b) %d^-3",b*10000)
diff --git a/3883/CH1/EX1.4/EX1_4.sce b/3883/CH1/EX1.4/EX1_4.sce new file mode 100644 index 000000000..7095c4742 --- /dev/null +++ b/3883/CH1/EX1.4/EX1_4.sce @@ -0,0 +1,16 @@ +//Chapter 1, Example 1.4
+clc
+//Variable Declaration
+a1 = 100000 //(a) unit less variable
+a2 = 100 //(a) unit less variable
+b1 = 1000 //(b) unit less variable
+b2 = 0.0001 //(b) unit less variable
+
+//Calculation
+//(a)
+a = a1/a2 //Division function
+//(b)
+b = b1/b2 //Division function
+//Results
+printf("(a) %d^3 \n",a/100)
+printf("(b) %d^7",b/1000000)
diff --git a/3883/CH1/EX1.5/EX1_5.sce b/3883/CH1/EX1.5/EX1_5.sce new file mode 100644 index 000000000..4f3bb8445 --- /dev/null +++ b/3883/CH1/EX1.5/EX1_5.sce @@ -0,0 +1,18 @@ +//Chapter 1, Example 1.5
+clc
+//Variable Declaration
+a1 = 100 //(a) unit less variable
+b1 = 1000 //(b) unit less variable
+c1 = 0.01 //(c) unit less variable
+
+//Calculation
+//(a)
+a = a1^4 //multiplication function
+//(b)
+b = b1^-2 //multiplication function
+//(c)
+c = c1^-3 //multiplication function
+//Results
+printf("(a) %d^8 \n",a/10000000)
+printf("(b) %d^-6 \n",b*10000000)
+printf("(c) %d^6",round(c/100000))
diff --git a/3883/CH1/EX1.6/EX1_6.sce b/3883/CH1/EX1.6/EX1_6.sce new file mode 100644 index 000000000..da3eb986d --- /dev/null +++ b/3883/CH1/EX1.6/EX1_6.sce @@ -0,0 +1,16 @@ +//Chapter 1, Example 1.6
+clc
+//Variable Declaration
+a1 = 6300 //(a) unit less variable
+a2 = 75000 //(a) unit less variable
+b1 = 0.00096 //(b) unit less variable
+b2 = 0.000086 //(b) unit less variable
+
+//Calculation
+//(a)
+a = a1 + a2 //addition function
+//(b)
+b = b1 - b2 //subtraction function
+//Results
+printf("(a) %.1f x 10^3 \n",a/1000)
+printf("(b) %.1f x 10^-5",b*100000)
diff --git a/3883/CH1/EX1.7/EX1_7.sce b/3883/CH1/EX1.7/EX1_7.sce new file mode 100644 index 000000000..93812f4c4 --- /dev/null +++ b/3883/CH1/EX1.7/EX1_7.sce @@ -0,0 +1,16 @@ +//Chapter 1, Example 1.7
+clc
+//Variable Declaration
+a1 = 0.0002 //(a) unit less variable
+a2 = 0.000007 //(a) unit less variable
+b1 = 340000 //(b) unit less variable
+b2 = 0.00061 //(b) unit less variable
+
+//Calculation
+//(a)
+a = a1*a2 //multiplication function
+//(b)
+b = b1*b2 //multiplication function
+//Results
+printf("(a) %d x 10^-10 \n",a*10000000000)
+printf("(b) %.1f",b)
diff --git a/3883/CH1/EX1.8/EX1_8.sce b/3883/CH1/EX1.8/EX1_8.sce new file mode 100644 index 000000000..538619f4c --- /dev/null +++ b/3883/CH1/EX1.8/EX1_8.sce @@ -0,0 +1,16 @@ +//Chapter 1, Example 1.8
+clc
+//Variable Declaration
+a1 = 0.00047 //(a) unit less variable
+a2 = 0.002 //(a) unit less variable
+b1 = 690000 //(b) unit less variable
+b2 = 0.00000013 //(b) unit less variable
+
+//Calculation
+//(a)
+a = a1/a2 //division function
+//(b)
+b = b1/b2 //division function
+//Results
+printf("(a) %.1f x 10^-2 \n",a*100)
+printf("(b) %.2f x 10^12",b/1000000000000)
diff --git a/3883/CH1/EX1.9/EX1_9.sce b/3883/CH1/EX1.9/EX1_9.sce new file mode 100644 index 000000000..500898267 --- /dev/null +++ b/3883/CH1/EX1.9/EX1_9.sce @@ -0,0 +1,14 @@ +//Chapter 1, Example 1.9
+clc
+//Variable Declaration
+a1 = 0.00003 //(a) unit less variable
+b1 = 90800000 //(b) unit less variable
+
+//Calculation
+//(a)
+a = a1**3 //multiplication function
+//(b)
+b = b1**2 //multiplication function
+//Results
+printf("(a) %d x 10^-15\n",a*10**15)
+printf("(b) %.4f x 10^14",b/10**14)
diff --git a/3883/CH10/EX10.1/EX10_1.sce b/3883/CH10/EX10.1/EX10_1.sce new file mode 100644 index 000000000..83fa701a9 --- /dev/null +++ b/3883/CH10/EX10.1/EX10_1.sce @@ -0,0 +1,19 @@ +//Chapter 10, Example 10.1
+clc
+//Variable Declaration
+c11=5*10^-6 //capacitance in farad
+c12=0.1*10^-6 //capacitance in farad
+c13=20*10^-6 //capacitance in farad
+c14=1000*10^-12 //capacitance in farad
+
+//Calculation
+c1 = 3*(c11) //capacitance in farad
+c2 = 0.5*(c12) //capacitance in farad
+c3 = 2.5*(c13) //capacitance in farad
+c4 = 5*4*(c14)/(1/8) //capacitance in farad
+
+//Results
+printf("a. C = %.f uF \n",c1*10^6)
+printf("b. C = %.2f uF \n",c2*10^6)
+printf("c. C = %.f uF \n",c3*10^6)
+printf("d. C = %.2f uF \n",c4*10^6)
diff --git a/3883/CH10/EX10.10/EX10_10.sce b/3883/CH10/EX10.10/EX10_10.sce new file mode 100644 index 000000000..5ff8243ba --- /dev/null +++ b/3883/CH10/EX10.10/EX10_10.sce @@ -0,0 +1,56 @@ +//Chapter 10, Example 10.10
+clc
+//Variable Declaration
+r1 = 60*10^3 //resistance in ohms
+r2 = 30*10^3 //resistance in ohms
+r3 = 10*10^3 //resistance in ohms
+vi = 5.44 //voltage
+vf = 0 //voltage
+c=0.2*10**-6 //capacitance in farad
+e=21 //emf in voltage
+
+//Calculation
+rth = ((r1*r2)/(r1+r2))+r3 //applying tevenin's theorem
+eth = r2*e/(r2+r1) //in volts
+t=rth*c //time constant
+vc1 = eth //vc at switch position1
+ic = eth/r2 //ic at switch position1
+vc = vf +(vi-vf) //vc at switch position2
+ii = vc/r3 //current in amperes
+t1=r3*c //time constant
+ic1 = -ii //ic at switch position2
+
+//for plotting graph
+x1 = 0 : 0.001 : 0.035
+x2 = 0 : 0.0005 : 0.05
+y1=eth*(1-exp(-x1/t))
+y2=vc*(exp(-x2/t1))
+i1=ic*(exp(-x1/t))
+i2=ic1*(exp(-x2/t1))
+
+subplot(221)
+plot2d(x1, y1)
+xlabel("t")
+ylabel("vc (V)")
+xtitle('Vc Charging')
+subplot(222)
+plot2d(x2, y2)
+xlabel("t")
+ylabel("vc (V)")
+xtitle('Vc Discharging')
+subplot(223)
+plot2d(x1, i1)
+xlabel("t")
+ylabel("ic (mA)")
+xtitle('ic Charging')
+subplot(224)
+plot2d(x2, i2)
+xlabel("t")
+ylabel("ic (mA)")
+xtitle('ic Discharging')
+
+//Results
+printf("a. vc = %d(1-e^-t/6ms) \n",vc1)
+printf(" ic = (%.3f x 10^-3)(e^-t/6ms) \n",ic*10^3)
+printf("b. vc = %.2f(e^-t/2ms) \n",vc)
+printf(" ic = (%.2f x 10^-3)(e^-t/2ms) \n",ic1*10^3)
diff --git a/3883/CH10/EX10.11/EX10_11.sce b/3883/CH10/EX10.11/EX10_11.sce new file mode 100644 index 000000000..e82db9271 --- /dev/null +++ b/3883/CH10/EX10.11/EX10_11.sce @@ -0,0 +1,19 @@ +//Chapter 10, Example 10.11
+clc
+//Variable Declaration
+r2 = 5*10^3 //resistance in ohms
+r1 = 7*10^3 //resistance in ohms
+r3 = 18*10^3 //resistance in ohms
+r4 = 2*10^3 //resistance in ohms
+e = 120 //voltage
+c = 40*10^-6 //capacitance in farad
+vi = 40 //voltage across capacitor
+
+//Calculation
+eth = (r3*e)/(r3+r1+r4) //in volts
+rth = ((r2+r3)*(r2+r3))/((r2+r3)+(r2+r3)) //resistance in ohms
+t = rth*c //time constant
+vc = vi //Vc after closing switch
+
+//Results
+printf("vc = %dV - %dV(e^-t/0.44s) \n",eth,vc)
diff --git a/3883/CH10/EX10.12/EX10_12.sce b/3883/CH10/EX10.12/EX10_12.sce new file mode 100644 index 000000000..725f25658 --- /dev/null +++ b/3883/CH10/EX10.12/EX10_12.sce @@ -0,0 +1,16 @@ +//Chapter 10, Example 10.12
+clc
+//Variable Declaration
+r1 = 6 //resistance in ohms
+r2 = 10 //resistance in ohms
+c = 500*10^-6 //capacitance in farad
+i = 20*10^-3 //source current in ampere
+
+//Calculation
+rth = r1+r2 //resistance in ohms
+eth = i*r1 //voltage
+t = rth*c //time constant
+vc = eth //voltage
+
+//Results
+printf("vc = %.2f(1-e^-t/8ms) \n",vc)
diff --git a/3883/CH10/EX10.13/EX10_13.sce b/3883/CH10/EX10.13/EX10_13.sce new file mode 100644 index 000000000..e76a14364 --- /dev/null +++ b/3883/CH10/EX10.13/EX10_13.sce @@ -0,0 +1,33 @@ +//Chapter 10, Example 10.13
+clc
+//Variable Declaration
+delv = 4 //change in voltage
+delt = 2*10^-3 //change in time (sec)
+c = 2*10^-6 //capacitor in farad
+delv1 = 0 //change in voltage
+delt1 = 6*10^-3 //change in time (sec)
+
+//Calculation
+ic = c*delv/(delt) //current in amperes
+ic1 = c*delv1/delt //current in amperes
+ic2 = -c*delv/delt1 //current in amperes
+
+x1 = 0: 0.0009 : 0.002
+x3 = 0.005 : 0.0009: 0.011
+
+ic11=[ic ic ic]
+ic12=[ic2 ic2 ic2 ic2 ic2 ic2 ic2]
+plot(x1, ic11,'LineWidth', 2)
+plot(x3, ic12)
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+xlabel("t")
+ylabel("ic (mA)")
+xtitle('Average Current')
+
+
+
+//Results
+printf("a. ic = %d mA \n",ic*10^3)
+printf("b. ic = %d \n",ic1)
+printf("c. ic = %.2f mA \n",ic2*10^3)
diff --git a/3883/CH10/EX10.14/EX10_14.sce b/3883/CH10/EX10.14/EX10_14.sce new file mode 100644 index 000000000..a0cb1f1cb --- /dev/null +++ b/3883/CH10/EX10.14/EX10_14.sce @@ -0,0 +1,24 @@ +//Chapter 10, Example 10.14
+clc
+//Variable Declaration
+c1 = 200*10^-6 //capacitance in farad
+c2 = 50*10^-6 //capacitance in farad
+c3 = 10*10^-6 //capacitance in farad
+e = 60 //voltage
+
+//Calculation
+ctt = (1/c1)+(1/c2)+(1/c3)
+ct = 1/ctt //total capacitance in farad
+qt = ct*e //charge on each plate
+v1 = qt/c1 //voltage across each capacitor
+v2 = qt/c2 //voltage across each capacitor
+v3 = qt/c3 //voltage across each capacitor
+e = v1+v2+v3 //voltage
+
+//Results
+printf("a. Ct = %d uF \n",ct*10^6)
+printf("b. Qt = %d uF \n",qt*10^6)
+printf("c. V1 = %.1f V \n",v1)
+printf(" V2 = %.1f V \n",v2)
+printf(" V3 = %.1f V \n",v3)
+printf(" E = %d V \n",e)
diff --git a/3883/CH10/EX10.15/EX10_15.sce b/3883/CH10/EX10.15/EX10_15.sce new file mode 100644 index 000000000..585ed237f --- /dev/null +++ b/3883/CH10/EX10.15/EX10_15.sce @@ -0,0 +1,21 @@ +//Chapter 10, Example 10.15
+clc
+//Variable Declaration
+c1 = 800*10^-6 //capacitance in farad
+c2 = 60*10^-6 //capacitance in farad
+c3 = 1200*10^-6 //capacitance in farad
+e = 48 //voltage
+
+//Calculation
+ct = c1+c2+c3 //total capacitance in farad
+q1 = c1*e //charge on each plate in coulombs
+q2 = c2*e //charge on each plate in coulombs
+q3 = c3*e //charge on each plate in coulombs
+qt = q1+q2+q3 //total charge in coulombs
+
+//Results
+printf("a. Ct = %d uF \n",ct*10^6)
+printf("b. Q1 = %.1f mC \n",q1*10^3)
+printf(" Q2 = %.2f mC \n",q2*10^3)
+printf(" Q3 = %.1f mC \n",q3*10^3)
+printf("c. Qt = %.2f mC \n",qt*10^3)
diff --git a/3883/CH10/EX10.16/EX10_16.sce b/3883/CH10/EX10.16/EX10_16.sce new file mode 100644 index 000000000..f02b6b4e2 --- /dev/null +++ b/3883/CH10/EX10.16/EX10_16.sce @@ -0,0 +1,26 @@ +//Chapter 10, Example 10.16
+clc
+//Variable Declaration
+c1 = 3*10^-6 //capacitance in farad
+c2 = 4*10^-6 //capacitance in farad
+c3 = 2*10^-6 //capacitance in farad
+e = 120 //voltage
+
+//Calculation
+ct1 = c2+c3 //capacitance in farad
+ct = (c1*ct1)/(c1+ct1) //capacitance in farad
+qt = ct*e //charge in coulombs
+q1 = qt //charge of C1 in coulombs
+v1 = q1/c1 //voltage1 of C1 in coulombs
+qt1 = q1 //charge in coulombs
+vt1 = qt1/ct1 //voltage total
+q2 = c2*vt1 //charge of C2
+q3 = c3*vt1 //charge of C3
+
+//Results
+printf("Qt = %d uC \n",qt*10^6)
+printf("Q1 = %d uC \n",q1*10^6)
+printf("V1 = %d V \n",v1)
+printf("Vt = %d uC \n",vt1)
+printf("Q2 = %d uC \n",q2*10^6)
+printf("Q3 = %d uC \n",q3*10^6)
diff --git a/3883/CH10/EX10.17/EX10_17.sce b/3883/CH10/EX10.17/EX10_17.sce new file mode 100644 index 000000000..1f0488ae0 --- /dev/null +++ b/3883/CH10/EX10.17/EX10_17.sce @@ -0,0 +1,16 @@ +//Chapter 10, Example 10.17
+clc
+//Variable Declaration
+r1 = 4 //resistance in ohms
+r2 = 8 //resistance in ohms
+e = 24 //voltage
+c1 = 20*10^-6 //capacitance in farad
+
+
+//Calculation
+vc = (r2*e)/(r1+r2) //voltage across capacitor
+q1 = c1*vc //charge in coulombs
+
+//Results
+printf("Vc = %d V \n",vc)
+printf("Q1 = %d uC \n",q1*10^6)
diff --git a/3883/CH10/EX10.18/EX10_18.sce b/3883/CH10/EX10.18/EX10_18.sce new file mode 100644 index 000000000..92097a0a2 --- /dev/null +++ b/3883/CH10/EX10.18/EX10_18.sce @@ -0,0 +1,21 @@ +//Chapter 10, Example 10.18
+clc
+//Variable Declaration
+r1= 2 //resistance in ohms
+r2 = 7 //resistance in ohms
+r3 =8 //resistance in ohms
+e = 72 //voltage
+c1 = 2*10^-6 //capacitance in farad
+c2 = 3*10^-6 //capacitance in farad
+
+//Calculation
+vc2 = (r2*e)/(r1+r2) //voltage across C2
+vc1 = (r1*e)/(r1+r2) //voltage across C1
+q1 = c1*vc1 //charge of C1
+q2 = c2*vc2 //charge of C2
+
+//Results
+printf("Vc2 = %d V \n",vc2)
+printf("Vc1 = %d V \n",vc1)
+printf("Q1 = %d uC \n",q1*10^6)
+printf("Q2 = %d uC \n",q2*10^6)
diff --git a/3883/CH10/EX10.19/EX10_19.sce b/3883/CH10/EX10.19/EX10_19.sce new file mode 100644 index 000000000..3f2163dbe --- /dev/null +++ b/3883/CH10/EX10.19/EX10_19.sce @@ -0,0 +1,15 @@ +//Chapter 10, Example 10.19
+clc
+//Variable Declaration
+c1 = 2*10^-6 //capacitance in farad
+v1 = 16 //voltage
+c2 = 3*10^-6 //capacitance in farad
+v2 = 56 //voltage
+
+//Calculation
+wc = c1*v1*v1/2 //energy of charge in joule
+wc1 = c2*v2*v2/2 //energy of charge in joule
+
+//Results
+printf("Wc = %d uJ \n",wc*10^6)
+printf("Wc = %d uJ \n",wc1*10^6)
diff --git a/3883/CH10/EX10.2/EX10_2.sce b/3883/CH10/EX10.2/EX10_2.sce new file mode 100644 index 000000000..f14386481 --- /dev/null +++ b/3883/CH10/EX10.2/EX10_2.sce @@ -0,0 +1,17 @@ +//Chapter 10, Example 10.2
+clc
+//Variable Declaration
+a = 0.01 //area of plate in meter square
+d = 1.5*10^-3 //distance in meter
+eo = 8.85*10^-12 //permittivity
+v = 450 //voltage
+
+//Calculation
+c = eo*a/d //capacitance in farad
+E = v/d //electric field in V/m
+q = c*v //charge on each plate in Coulomb
+
+//Results
+printf("a. C = %.f pF \n",c*10^12)
+printf("b. E = %d x 10^3 V/m \n",E/1000)
+printf("c. Q = %.2f nC \n",q*10^9)
diff --git a/3883/CH10/EX10.3/EX10_3.sce b/3883/CH10/EX10.3/EX10_3.sce new file mode 100644 index 000000000..12f6421bc --- /dev/null +++ b/3883/CH10/EX10.3/EX10_3.sce @@ -0,0 +1,19 @@ +//Chapter 10, Example 10.3
+clc
+//Variable Declaration
+v = 450 //voltage
+d = 1.5*10^3 //distance in meter
+a = 0.01 //area of plate in meter square
+er = 5 //permittivity
+eo = 8.855*10^-12 //permittivity
+C = 59*10^-12 //capacitance in farad
+
+//Calculation
+E = v/d //electric field in V/m
+q = er*eo*E*a //charge on each plate in coulomb
+c = er*C //capacitance in farad
+
+//Results
+printf("E = %.1f V/m \n",E) //wrong answer in textbook
+printf("Q = %f nC \n",q*10^9) //wrong answer in textbook
+printf("C = %d pF \n",c*10^12)
diff --git a/3883/CH10/EX10.4/EX10_4.sce b/3883/CH10/EX10.4/EX10_4.sce new file mode 100644 index 000000000..99b8f18b7 --- /dev/null +++ b/3883/CH10/EX10.4/EX10_4.sce @@ -0,0 +1,16 @@ +//Chapter 10, Example 10.4
+clc
+//Variable Declaration
+c = 0.2*10^-6 //capacitance in farad
+a = 0.3 //area of plate in meter square
+er = 6 //permittivity
+di = 200 //dielectric strength
+
+//Calculation
+d = (8.85*er*a)/(10^12*c) //find distance in micrometer
+d1 = d*(39.371)*1000 //converting micrometer to mils
+d2 = di*d1
+
+//Results
+printf("d = %.2f um \n",d*10^6)
+printf("V = %.2f V \n",d2)
diff --git a/3883/CH10/EX10.5/EX10_5.sce b/3883/CH10/EX10.5/EX10_5.sce new file mode 100644 index 000000000..ae2b52199 --- /dev/null +++ b/3883/CH10/EX10.5/EX10_5.sce @@ -0,0 +1,40 @@ + //Chapter 10, Example 10.5
+clc
+//Variable Declaration
+r = 8000 //resistance in ohms
+e = 40 //voltage
+c = 4*10^-6 //capacitor in farad
+m = -1/(32*10^-3)
+
+//Calculation
+t = r*c //time constant
+vc = e //in volts
+ic = e/r //in ampere
+vr = e //in volts
+b = 5*t //time constant
+
+//for plotting graph
+x1 = 0 : t : 1
+y1=vc*(1- exp(-x1/t))
+i1=ic*(1- exp(-x1/t))
+vr1=vc*(exp(-x1/t))
+
+subplot(221)
+plot(x1, y1)
+xlabel("t");
+ylabel("vc (V)");
+subplot(222)
+plot(x1, i1)
+xlabel("t");
+ylabel("ic (mA)");
+subplot(223)
+plot(x1, vr1)
+xlabel("t");
+ylabel("vR (V)");
+
+//Results
+printf("a. t = %d ms \n",t*10^3)
+printf(" Vc = %d*(1-e^-t/(32*10^-3)) \n",vc)
+printf(" ic = (%d x 10^-3)*(e^-t/(32*10^-3)) \n",ic*1000)
+printf(" vr = %d*(e^-t/(32*10^-3)) \n",vr)
+printf("b = %d ms",b*10^3)
diff --git a/3883/CH10/EX10.6/EX10_6.sce b/3883/CH10/EX10.6/EX10_6.sce new file mode 100644 index 000000000..a868aa440 --- /dev/null +++ b/3883/CH10/EX10.6/EX10_6.sce @@ -0,0 +1,36 @@ +//Chapter 10, Example 10.6
+clc
+//Variable Declaration
+t = 32*10^-3 //time in seconds
+e = 40 //voltage
+r = 8000 //resistance in ohms
+
+//Calculation
+vc = e //voltage
+ic = -e/r //in ampere
+vr = -e //voltage
+
+//for plotting graph
+x1 = 0 : t : 1
+y1=vc*(exp(-x1/t))
+i1=ic*(exp(-x1/t))
+vr1=-vc*(exp(-x1/t))
+
+subplot(221)
+plot(x1, y1)
+xlabel("t");
+ylabel("vc (V)");
+subplot(222)
+plot(x1, i1)
+xlabel("t");
+ylabel("ic (mA)");
+subplot(223)
+plot(x1, vr1)
+xlabel("t");
+ylabel("vR (V)");
+
+//Results
+printf("a. t = %d ms \n",t*10^3)
+printf(" Vc = %d*(e^-t/(32*10^-3)) \n",vc)
+printf(" ic = (%d x 10^-3)*(e^-t/(32*10^-3)) \n",ic*1000)
+printf(" vr = %d*(e^-t/(32*10^-3)) \n",vr)
diff --git a/3883/CH10/EX10.7/EX10_7.sce b/3883/CH10/EX10.7/EX10_7.sce new file mode 100644 index 000000000..3b1bf94af --- /dev/null +++ b/3883/CH10/EX10.7/EX10_7.sce @@ -0,0 +1,53 @@ +//Chapter 10, Example 10.7
+clc
+//Variable Declaration
+r1 = 100*10^3 //resistance in ohms
+r2 = 200*10^3 //resistance in ohms
+e = 10 //voltage
+c = 0.05*10^-6 //capacitance in farad
+t3=0.045
+
+//Calculation
+vc = e //voltage across the capacitor
+t = r1*c //time constant
+ic = e/r1 //current across the capacitor
+t1 = r2*c //time constant
+ic2 = -e/r2 //in ampere
+
+
+//for plotting graph
+x1 = 0 : 0.01 : t3
+x2 = t3 : 0.01 : 1
+y1=vc*(1-exp(-x1/t))
+y2=vc*(exp(-x2/t1))
+i1=ic*(exp(-x1/t))
+i2=ic2*(exp(-x2/t1))
+
+subplot(221)
+plot(x1, y1)
+xlabel("t")
+ylabel("vc (V)")
+xtitle('Vc Charging')
+subplot(222)
+plot(x2, y2)
+xlabel("t")
+ylabel("vc (V)")
+xtitle('Vc Discharging')
+subplot(223)
+plot(x1, i1)
+xlabel("t")
+ylabel("ic (mA)")
+xtitle('ic Charging')
+subplot(224)
+plot(x2, i2)
+xlabel("t")
+ylabel("ic (mA)")
+xtitle('ic Discharging')
+
+//Results
+printf("a. vc = %d(1-e^-t/(5*10^-3)) \n",vc)
+printf("b. ic = (%.1f x 10^-3)(e^-t/(5*10^-3)) \n",ic*10^3)
+printf("c. vc = %d V \n",vc)
+printf(" ic = %d A \n",ic)
+printf("d. vc = %d(e^-t/(10*10^-3)) \n",vc)
+printf(" ic = (%.2f x 10^-3)(e^-t/(10*10^-3)) \n",ic2*10^3)
diff --git a/3883/CH10/EX10.8/EX10_8.sce b/3883/CH10/EX10.8/EX10_8.sce new file mode 100644 index 000000000..84aebf888 --- /dev/null +++ b/3883/CH10/EX10.8/EX10_8.sce @@ -0,0 +1,44 @@ +//Chapter 10, Example 10.8
+clc
+//Variable Declaration
+r1 = 5000 //resistance in ohms
+e = 20 //voltage
+r2 = 1000 //resistance in ohms
+r3 = 3000 //resistance in ohms
+c = 10*10^-6 //capacitance in farad
+
+
+//Calculation
+vc = e //voltage across capacitor
+t1 = (r1+r3)*c //time constant
+t2 = (r2+r3)*c //time constant
+ic = e/(r1+r3) //current across capacitor
+vc1 = 0.632*e //Vc when switch at position2
+ic1 = -vc1/(r2+r3) //Ic when switch at position2
+
+
+//for plotting graph
+x1 = 0 : 0.001 : t1
+x2 = t1 : 0.001 : 0.4
+y1=vc*(1- exp(-x1/t1))
+y2=vc1*(exp(-x2/t2))
+i1=ic*(exp(-x1/t1))
+i2=ic1*(exp(-x2/t2))
+
+subplot(221)
+plot(x1, y1)
+plot(x2, y2)
+xlabel("t")
+ylabel("vc (V)")
+
+subplot(222)
+plot(x1, i1)
+plot(x2, i2)
+xlabel("t")
+ylabel("ic (mA)")
+
+//Results
+printf("a. vc = %d(1-e^-t/(80*10^-3)) \n",vc)
+printf("b. ic = (%.1f x 10^-3)(e^-t/(80*10^-3)) \n",ic*10^3)
+printf("c. vc = %.2f(e^-t/(40*10^-3)) \n",vc1)
+printf("ic = %.2f x 10^-3(e^-t/(40*10^-3)) \n",ic1*10^3)
diff --git a/3883/CH10/EX10.9/EX10_9.sce b/3883/CH10/EX10.9/EX10_9.sce new file mode 100644 index 000000000..ca36133db --- /dev/null +++ b/3883/CH10/EX10.9/EX10_9.sce @@ -0,0 +1,34 @@ +//Chapter 10, Example 10.9
+clc
+//Variable Declaration
+r1 = 2.2*10^3 //resistance in ohms
+r2 = 1.2*10^3 //resistance in ohms
+c = 3.3*10^-6 //capacitance in farad
+e = 24 //voltage
+vf = 24 //voltage
+vi = 4 //voltage across capapcitor
+
+//Calculation
+t = (r1+r2)*c //time constant
+vc = (vi-vf) //Vc when switch close
+im = (e-(vf+vc))/(r1+r2) //current in amperes
+ic = im //current during the transient peroid
+
+
+//for plotting graph
+x1 = 0 : 0.001 : (5*t)
+y1=vf-(-vc*exp(-x1/t))
+i1=(im*exp(-x1/t))
+subplot(221)
+plot(x1, y1)
+xlabel("t");
+ylabel("vc (V)");
+subplot(222)
+plot(x1, i1)
+xlabel("t");
+ylabel("ic (mA)");
+
+
+//Results
+printf("a. vc = %dV %dV(e^-t/(11.22*10^-3ms)) \n",vf,vc)
+printf("b. ic = %.2fmA(e^-t/(11.22*10^-3ms)) \n",ic*10^3)
diff --git a/3883/CH11/EX11.1/EX11_1.sce b/3883/CH11/EX11.1/EX11_1.sce new file mode 100644 index 000000000..ff24561cc --- /dev/null +++ b/3883/CH11/EX11.1/EX11_1.sce @@ -0,0 +1,12 @@ +//Chapter 11, Example 11.1
+clc
+//Variable Declaration
+o = 6*10^-5 //flux in webers
+a = 1.2*10^-3 //area in square meters
+
+//Calculation
+b = o/a //Tesla in T
+
+
+//Results
+printf("B = %d x 10^-2 T \n",b*10^2)
diff --git a/3883/CH11/EX11.2/EX11_2.sce b/3883/CH11/EX11.2/EX11_2.sce new file mode 100644 index 000000000..36a508845 --- /dev/null +++ b/3883/CH11/EX11.2/EX11_2.sce @@ -0,0 +1,11 @@ +//Chapter 11, Example 11.2
+clc
+//Variable Declaration
+a = 0.25 //area
+b = 1.2 //tesla in T
+//Calculation
+A = a*(1/39.37)*(1/39.37) //area in square meter
+o = b*A //flux in webers
+
+//Results
+printf("O = %.3f x 10^-4 Wb ",o*10^4)
diff --git a/3883/CH11/EX11.3/EX11_3.sce b/3883/CH11/EX11.3/EX11_3.sce new file mode 100644 index 000000000..485fd0f4f --- /dev/null +++ b/3883/CH11/EX11.3/EX11_3.sce @@ -0,0 +1,19 @@ +//Chapter 11, Example 11.3
+clc
+//Variable Declaration
+o = 4*10^-4 //magnetic flux in webers
+a = 2*10^-3 //area in square meter
+h = 170 //magnetizing force in At/m
+l = 0.16 //mean length in meter
+n = 400 //number of turns
+uo = 12.56*10^-7 //magnetic permeability (uo)
+
+//Calculation
+b = o/a //the flux density
+I = h*l/n //applying ampere's circuital law in mA
+u = b/h //the permeability of the material in Wb/A.m
+ur = u/uo //relative permeability (ur)
+//Results
+printf("a. I = %d mA \n",I*10^3)
+printf("b U = %f x 10^-3 Wb/A.m \n",u*10^3)
+printf(" Ur = %.2f \n",ur)
diff --git a/3883/CH11/EX11.4/EX11_4.sce b/3883/CH11/EX11.4/EX11_4.sce new file mode 100644 index 000000000..a562092d7 --- /dev/null +++ b/3883/CH11/EX11.4/EX11_4.sce @@ -0,0 +1,20 @@ +//Chapter 11, Example 11.4
+clc
+//Variable Declaration
+o = 3.5*10-4 //magnetic flux in Wb
+a = 6.452*10^-4 //area in square meter
+hefab = 70 //magnetizing force sheet steel in At/m
+hbcde = 1600 //magnetizing force cast iron in At/m
+n = 50 //number of turns
+
+//Calculation
+lefab = 4+4+4 //length of the material in inch
+lbcde = 0.5+4+0.5 //length of the material in inch
+lbcde1 = lbcde*(1/39.37) //in meters
+lefab1 = lefab*(1/39.37) //in meters
+b = o/a //flux density in T
+q = (hefab*lefab1)+(hbcde*lbcde1) //in At
+i = q/n //applying ampere's circuital law
+
+//Results
+printf("I = %.2f A \n",i)
diff --git a/3883/CH11/EX11.5/EX11_5.sce b/3883/CH11/EX11.5/EX11_5.sce new file mode 100644 index 000000000..9b5499853 --- /dev/null +++ b/3883/CH11/EX11.5/EX11_5.sce @@ -0,0 +1,17 @@ +//Chapter 11, Example 11.5
+clc
+//Variable Declaration
+o = 1.5*10^-5 //magnetic flux in Wb
+a = 0.15*10^-3 //area in square meter
+habcda = 20 //in At/m
+i1 = 2 //primary current in ampere
+n1 = 60 //number of turn in 1st winding
+n2 = 30 //number of turn in 2nd winding
+labcda = 0.16 //in meter
+
+//Calculation
+b = o/a //flux density
+i2 = ((n1*i1)-(habcda*labcda))/n2 //secondary current
+
+//Results
+printf("I2 = %.2f A \n",i2)
diff --git a/3883/CH11/EX11.6/EX11_6.sce b/3883/CH11/EX11.6/EX11_6.sce new file mode 100644 index 000000000..f2a0cd1d5 --- /dev/null +++ b/3883/CH11/EX11.6/EX11_6.sce @@ -0,0 +1,17 @@ +//Chapter 11, Example 11.6
+clc
+//Variable Declaration
+o = 0.75*10^-4 //magnetic flux in Wb
+a = 1.5*10^-4 //area in square meter
+hcore = 280 //H(cast steel) in At/m
+hg = 3.98*10^5 //in At/m
+icore = 100*10^-3 //in meter
+ig = 2*10^-3 //in meter
+n = 200 //number of turns
+
+//Calculation
+b = o/a //flux density
+i = ((hcore*icore)+(hg*ig))/n //in ampere
+
+//Results
+printf("I = %.2f A \n",i)
diff --git a/3883/CH11/EX11.7/EX11_7.sce b/3883/CH11/EX11.7/EX11_7.sce new file mode 100644 index 000000000..6e31813c5 --- /dev/null +++ b/3883/CH11/EX11.7/EX11_7.sce @@ -0,0 +1,36 @@ +//Chapter 11, Example 11.7
+clc
+//Variable Declaration
+o2 = 1.5*10^-4 //magnetic flux in Wb
+a = 6*10^-4 //area in square meter
+hbcde = 40 //in At/m
+ibcde = 0.2 //in meter
+ibe = 0.05 //in meter
+b1 = 0.97 //tesla in T
+hefab = 400 //in At/m
+iefab = 0.2 //in meter
+n = 50 //number of turns
+h1 = 40 //in At/m
+uo = 12.57*10^-7 //megnetic permeability
+h2 = 160 // in At/m
+b3 = 0.25 //tesla in T
+
+//Calculation
+b2 = o2/a //flux density in T
+hbe = (hbcde*ibcde)/ibe //in At/m
+o1 = b1*a //flux in Wb
+ot = o1+o2 //flux in Wb
+b = ot/a //flux density in T
+i = ((hefab*iefab)+(hbe*ibe))/n //in ampere
+u = b3/h1 //permeability
+ur = u/uo //permeability
+u1 = b1/h2 //permeability
+ur1 = u1/uo //permeability
+u4 = b/hefab //permeability
+ur2 = u4/uo //permeability
+
+//Results
+printf("I = %.2f A \n",i) //required curent
+printf("Ur = %.1f \n",ur)
+printf("For section be, Ur = %d \n",ur1)
+printf("For section efab, Ur = %.2f \n",ur2)
diff --git a/3883/CH11/EX11.8/EX11_8.sce b/3883/CH11/EX11.8/EX11_8.sce new file mode 100644 index 000000000..2775a3d99 --- /dev/null +++ b/3883/CH11/EX11.8/EX11_8.sce @@ -0,0 +1,15 @@ +//Chapter 11, Example 11.8
+clc
+//Variable Declaration
+n = 60 //numbers of turns
+i = 5 //in ampere
+labcda = 0.3 //in meter
+b = 0.39 //in T
+a = 2*10^-4
+
+//Calculation
+habcda = (n*i)/labcda //by Ampere's circuital law
+o = b*a //magnetic flux in Wb
+
+//Results
+printf("O = %.2f*10^-4 Wb",o*10^4)
diff --git a/3883/CH11/EX11.9/EX11_9.sce b/3883/CH11/EX11.9/EX11_9.sce new file mode 100644 index 000000000..e625157fe --- /dev/null +++ b/3883/CH11/EX11.9/EX11_9.sce @@ -0,0 +1,27 @@ +//Chapter 11, Example 11.9
+clc
+//Variable Declaration
+n = 100 //number of turns
+i = 4 //in ampere
+ig = 0.001 //in meter
+uo = 12.56*10^-7 //permeability
+hcore = 850 //in At/m
+lcore = 0.16 //in meter
+a = 0.003 //area in meter square
+hcore1 = 1500 //in At/m
+lcore1 = 0.16 //in meter
+
+//Calculation
+hg = (n*i)/ig //in At/m
+bg = uo*hg //in T
+o = bg*a //flux in Wb
+ni1 = (hcore*lcore)+(hg*ig) //applying Ampere's circuital law
+o1 = (1-0.3)*o //magnetic flux
+b = o1/a //in T
+hgig = (7.96*10^5)*b*ig //in At/m
+ni = (hcore*lcore)+(hgig) //in At
+hga = n*i //in At
+
+//Results
+printf("NI = %.2f At > %d At \n",ni,hga)
+printf("O = %.3f x 10^-3 Wb",o1*10^3)
diff --git a/3883/CH12/EX12.1/EX12_1.sce b/3883/CH12/EX12.1/EX12_1.sce new file mode 100644 index 000000000..e8b58f871 --- /dev/null +++ b/3883/CH12/EX12.1/EX12_1.sce @@ -0,0 +1,14 @@ +//Chapter 12, Example 12.1
+clc
+//Variable Declaration
+d = 4*10^-3 //diameter in meter square
+n = 100 //number of turns
+uo = 12.56*10^-7 //air in Wb/A.m
+l = 0.1 //length of the core in meter
+
+//Calculation
+a = (%pi*d*d)/4 //area of the core in square meter
+lo = (n*n*uo*a)/l //inductance of the air-coil in H
+
+//Results
+printf("Lo = %.2f uH",lo*10^6)
diff --git a/3883/CH12/EX12.10/EX12_10.sce b/3883/CH12/EX12.10/EX12_10.sce new file mode 100644 index 000000000..78c866e24 --- /dev/null +++ b/3883/CH12/EX12.10/EX12_10.sce @@ -0,0 +1,14 @@ +//Chapter 12, Example 12.10
+clc
+//Variable Declaration
+r1 = 2 //resistance1 in ohms
+r2 = 3 //resistance2 in ohms
+e = 10 //voltage in volts
+
+//Calculation
+il = e/(r1+r2) //load current in ampere
+vc = (r2*e)/(r1+r2) //load voltage in volts
+
+//Results
+printf("IL = %d A \n",il)
+printf("Vc = %d V ",vc)
diff --git a/3883/CH12/EX12.11/EX12_11.sce b/3883/CH12/EX12.11/EX12_11.sce new file mode 100644 index 000000000..82e8d2c6b --- /dev/null +++ b/3883/CH12/EX12.11/EX12_11.sce @@ -0,0 +1,21 @@ +//Chapter 12, Example 12.11
+clc
+//Variable Declaration
+r1 = 2 //resistance1 in ohms
+r2 = 5 //resistance2 in ohms
+r3 = 1 //resistance3 in ohms
+r4 = 4 //resistance4 in ohms
+r5 = 7 //resistance5 in ohms
+e = 50 //voltage in volts
+
+//Calculation
+
+i1 = e/(r1+r3+r5) //current1 in ampere
+i2= i1 //equal
+v2 = i2*r5 //voltage2 by ohm's law
+v1 = (r3+r5)*e/(r1+r3+r5) //voltage1 by voltage divider
+
+//Results
+printf("I1 = %d A \n",i1)
+printf("V2 = %d V \n",v2)
+printf("V1 = %d V \n",v1)
diff --git a/3883/CH12/EX12.12/EX12_12.sce b/3883/CH12/EX12.12/EX12_12.sce new file mode 100644 index 000000000..f7d5aef86 --- /dev/null +++ b/3883/CH12/EX12.12/EX12_12.sce @@ -0,0 +1,13 @@ +//Chapter 12, Example 12.12
+clc
+//Variable Declaration
+r1 = 3 //resistance1
+l = 6*10^-3 //inductance in mH
+e = 15 //voltage in volts
+r2 = 2 //resistance2
+//Calculation
+im = e/(r1+r2) //inductance current
+ws = (l*im*im)/2 //energy stored
+
+//Results
+printf("Ws = %d mJ",ws*10^3)
diff --git a/3883/CH12/EX12.2/EX12_2.sce b/3883/CH12/EX12.2/EX12_2.sce new file mode 100644 index 000000000..3d83eeab3 --- /dev/null +++ b/3883/CH12/EX12.2/EX12_2.sce @@ -0,0 +1,11 @@ +//Chapter 12, Example 12.2
+clc
+//Variable Declaration
+ur = 2000 //permeability of the core
+lo = 1.58*10^-6 //inductance of the coil
+
+//Calculation
+l = ur*lo //inductance in H
+
+//Results
+printf("L = %.2f mH",l*10^3)
diff --git a/3883/CH12/EX12.3/EX12_3.sce b/3883/CH12/EX12.3/EX12_3.sce new file mode 100644 index 000000000..9a6a88b3d --- /dev/null +++ b/3883/CH12/EX12.3/EX12_3.sce @@ -0,0 +1,19 @@ +//Chapter 12, Example 12.3
+clc
+//Variable Declaration
+i = 10*10^-3 //current in milli ampere
+l = 4*10^-3 //inductor in henry
+t = 2*10^-3 //time in millisecond
+t1 = 5*10^-3 //time in millisecond
+i1 = 0 //current
+
+//Calculation
+vl2 = (l*i1)/t //voltage in millivolts
+vl = (l*i)/t //voltage in millivolts
+vl1 = (-l*i)/t1 //voltage
+
+//Results
+printf("a. VL = %d \n",vl2)
+printf("b. VL = %d mV \n",vl*10^3)
+printf("c. VL = %d mV \n",vl1*10^3)
+printf("d. VL = %d",vl2)
diff --git a/3883/CH12/EX12.4/EX12_4.sce b/3883/CH12/EX12.4/EX12_4.sce new file mode 100644 index 000000000..b51f5b527 --- /dev/null +++ b/3883/CH12/EX12.4/EX12_4.sce @@ -0,0 +1,16 @@ +//Chapter 12, Example 12.4
+clc
+//Variable Declaration
+l = 4 //inductance in H
+r1 = 2000 //resistor1 in ohm
+e = 50 //voltage
+
+//Calculation
+to = l/r1 //in millisecond
+im = e/r1 //in milliAmperea
+il = im //load current
+vl = e //load voltage
+
+//Results
+printf("iL = (%d x 10^-3)(1-e^-t/(%dx10^-3)) \n",il*10^3,to*10^3)
+printf("VL = %de^-t/(%dx10^-3) \n",vl,to*10^3)
diff --git a/3883/CH12/EX12.5/EX12_5.sce b/3883/CH12/EX12.5/EX12_5.sce new file mode 100644 index 000000000..fe151f0ac --- /dev/null +++ b/3883/CH12/EX12.5/EX12_5.sce @@ -0,0 +1,25 @@ +//Chapter 12, Example 12.5
+clc
+//Variable Declaration
+e = 16 //battery volts
+r1 = 2.2*10^3 //resistance1 in kohm
+r2 = 6.8*10^3 //resistance2 in kohm
+l = 100*10^-3 //inductance in mH
+ii = 4*10^-3 //loade current in mA
+
+//Calculation
+rt = r1+r2 //total resistance
+if = e/(r1+r2) //in mA
+to = l/rt //time constant in microsecond
+il = if //current through the coil-
+il2 = ii-if //once the switch is closed
+vr1 = ii*r1 //voltage of resistance1
+vr2 = ii*r2 //voltage of resistance2
+vm = e-vr1-vr2 //voltage across the coil
+vl = vm
+
+//Results
+printf("a. iL = %.2f mA",il*10^3)
+printf(" + %.2f mAe^-t/%.2fus \n",il2*10^3,to*10^6)
+printf("b. VL = %d*e^-t/%.2fus \n",vl,to*10^6)
+printf("c. iL = %.2f mA ",il*10^3)
diff --git a/3883/CH12/EX12.6/EX12_6.sce b/3883/CH12/EX12.6/EX12_6.sce new file mode 100644 index 000000000..0b5d8ea11 --- /dev/null +++ b/3883/CH12/EX12.6/EX12_6.sce @@ -0,0 +1,33 @@ +//Chapter 12, Example 12.6
+clc
+//Variable Declaration
+r1 = 2000 //resistor1 in kohm
+r2 = 3000 //resistor2 in kohm
+l = 4 //inductor in henry
+e = 50 //battery voltage
+
+
+//Calculation
+to = l/r1 //time constant in ms
+vl = e //load voltage
+im = e/r1 //current in milliampere
+il = im //load current
+vr1 = e //voltage across r1
+vr2 = vr1 //voltage across r2
+to1 = l/(r1+r2)
+vi = (1+(r2/r1))*e //voltage in volts
+vl1 = -vi //voltage at switch open
+im1 = e/r1 //current in milliampere
+il1 = im1 //current at switch open
+vr11 = e //voltage across at r1 switch open
+vr22 = (-r2/r1)*e //voltage across at r2 switch open
+
+//Results
+printf("a. VL = %d*e^-t/(%d*10^-3) \n",vl,to*10^3)
+printf(" iL = %d*10^-3(1-e^-t/%d*10^-3) \n",il*10^3,to*10^3)
+printf(" VR1 = %d(1-e^-t/%d*10^-3) \n",vr1,to*10^3)
+printf(" VR2 = %d V\n",vr2)
+printf("b. iL = %.3fe^-t/(0.8*10^-3) \n",il)
+printf(" VL = -%de^-t/(%.1f*10^-3) \n",vi,to1*10^3)
+printf(" VR1 = %de-t/(%.1f*10^-3) \n",vr11,to1*10^3)
+printf(" VR2 = %de-t/(%.1f*10^-3)",vr22,to1*10^3)
diff --git a/3883/CH12/EX12.7/EX12_7.sce b/3883/CH12/EX12.7/EX12_7.sce new file mode 100644 index 000000000..c410b618d --- /dev/null +++ b/3883/CH12/EX12.7/EX12_7.sce @@ -0,0 +1,39 @@ +//Chapter 12, Example 12.7
+clc
+//Variable Declaration
+r1 = 20000 //resistor1 in kohm
+r2 = 4000 //resistor2 in kohm
+r3 = 16000 //resistor3 in kohm
+l = 80 //inductor in mH
+e = 12 //supply voltage
+n = 2 //number of turns
+
+//Calculation
+rth = r1/n //by thevenin theorem
+to = l/rth //time in microsecond
+eth = (r2+r3)*e/(r1+r2+r3) //applying voltage divider
+im = eth/rth //current in milliampere
+il = im //load current
+vl = eth //load voltage
+
+//Results
+printf("a. iL = (%.1f*10^-3)(1-e^-t/(%d*10^-6)) \n",il*10^3,to*10^3)
+printf(" VL = %de^-t/(%d*10^-6) \n",vl,to*10^3)
+
+
+
+//Graph
+x1=0:(1*10**-3):(50*10**-3)
+vc=vl*(exp(-x1/to)) //for VL
+ic=il*(1-exp(-x1/to)) //for iL
+
+subplot(221)
+plot(x1,vc)
+xlabel("t(s)")
+ylabel("VL (V)")
+xtitle("VL for the R-L network")
+subplot(222)
+plot(x1,ic)
+xlabel("t(s)")
+ylabel("iL (mA)")
+xtitle("iL for the R-L network\")
diff --git a/3883/CH12/EX12.8/EX12_8.sce b/3883/CH12/EX12.8/EX12_8.sce new file mode 100644 index 000000000..4a77c463f --- /dev/null +++ b/3883/CH12/EX12.8/EX12_8.sce @@ -0,0 +1,33 @@ +//Chapter 12, Example 12.8
+clc
+//Variable Declaration
+r1 = 2.2*10^3 //resistor1 in kohm
+r2 = 8.2*10^3 //resistor2 in kohm
+r3 = 1000 //resistor3 in kohm
+i = 12*10^-3 //sources current
+e = 6 //voltage
+l = 680*10^-3 //inductor in mH
+i = 12*10^-3 //current source in mA
+E = 26.4 //voltage
+
+//Calculation
+ii = -e/r3 //using ohm's law
+rth = r1+r2 //applying thevenin's theorem
+eth = i*r1 //in volts
+if = E/rth //in milliampere
+to = l/rth //time constant
+il = if //in milliampere
+il1 = ii-if //in milliampere
+
+//Results
+printf("a. ii = %d mA \n",ii*10^3)
+printf("b. iL = %.2f mA %.2fmAe^-t/(%.2fus) ",il*10^3,il1*10^3,to*10^6)
+
+//Graph
+x1=0:(0.1*10**-3):(0.5*10**-3)
+ic=il+(il1*exp(-x1/to)) //for iL
+plot(x1,ic)
+xlabel("t(s)")
+ylabel("iL (mA)")
+xtitle("The current iL for the network")
+
diff --git a/3883/CH12/EX12.9/EX12_9.sce b/3883/CH12/EX12.9/EX12_9.sce new file mode 100644 index 000000000..0de9d3521 --- /dev/null +++ b/3883/CH12/EX12.9/EX12_9.sce @@ -0,0 +1,14 @@ +//Chapter 12, Example 12.9
+clc
+//Variable Declaration
+l = 1.2 //L2 and L3 are equal
+n = 2 //number of turns
+l4 = 1.8 //inductance L4 in henry
+l1 = 0.56 //inductance L1 in henry
+
+//Calculation
+lt = l/n //total inductance in henry
+lt11 = (lt*l4)/(lt+l4) //total inductance in henry
+lt2 = l1+lt11 //total inductance in henry
+//Results
+printf("LT = %.2f H",lt2)
diff --git a/3883/CH13/EX13.1/EX13_1.sce b/3883/CH13/EX13.1/EX13_1.sce new file mode 100644 index 000000000..877c2130a --- /dev/null +++ b/3883/CH13/EX13.1/EX13_1.sce @@ -0,0 +1,14 @@ +
+//Chapter 13, Example 13.1
+clc
+//Variable Declaration
+f1 = 60 //frequency in hertz
+f2 = 1000 //frequency in hertz
+
+//Calculation
+t1 = 1/f1 //time in milli second
+t2 = 1/f2 //time in milli second
+
+//Results
+printf("T = %.2f ms \n",t1*10^3)
+printf("T = %d ms ",t2*10^3)
diff --git a/3883/CH13/EX13.10/EX13_10.sce b/3883/CH13/EX13.10/EX13_10.sce new file mode 100644 index 000000000..d0c1ac78e --- /dev/null +++ b/3883/CH13/EX13.10/EX13_10.sce @@ -0,0 +1,16 @@ +//Chapter 13, Example 13.10
+clc
+//Variable Declaration
+w = 314 //in rad/s
+
+//Calculation
+t = (2*3.14)/w //in millisecond
+t1 = t/2 //in millisecond
+t2 = t/4 //in millisecond
+t3 = t/12 //in millisecond
+
+//Results
+printf("360: T = %d ms \n",t*10^3)
+printf("180: T/2 = %d ms \n",t1*10^3)
+printf("90: T/4 = %d ms \n",t2*10^3)
+printf("30: T/12 = %.2f ms \n",t3*10^3)
diff --git a/3883/CH13/EX13.11/EX13_11.sce b/3883/CH13/EX13.11/EX13_11.sce new file mode 100644 index 000000000..af26195ac --- /dev/null +++ b/3883/CH13/EX13.11/EX13_11.sce @@ -0,0 +1,15 @@ +//Chapter 13, Example 13.11
+clc
+//Variable Declaration
+w = 1000 //in rad/s
+t = 2*10^-3 //in millisecond
+i1 = 6*10^-3 //in milliampere
+
+//calculation
+
+apl = (180*2)/3.14 //alphain degree
+sin114 = 0.9093 //in degree
+i = i1*sin114 //in milliampere
+
+//Results
+printf("i = %.2f mA ",i*10^3)
diff --git a/3883/CH13/EX13.13/EX13_13.sce b/3883/CH13/EX13.13/EX13_13.sce new file mode 100644 index 000000000..670469335 --- /dev/null +++ b/3883/CH13/EX13.13/EX13_13.sce @@ -0,0 +1,16 @@ +//Chapter 13, Example 13.13
+clc
+//Variable Declaration
+v1 = 10 //in volts
+t1 = 1*10^-3 //in millisecond
+v2 = 14 //in volts
+v3 = 6 //in volts
+
+//Calculation
+g = ((v1*t1)-(v1*t1))/(2*10^-3)
+g1 = ((v2*t1)-(v3*t1))/(2*10^-3)
+
+
+//Results
+printf("a. G = %d V \n",g)
+printf("b. G = %d V \n",g1)
diff --git a/3883/CH13/EX13.14/EX13_14.sce b/3883/CH13/EX13.14/EX13_14.sce new file mode 100644 index 000000000..1c925910b --- /dev/null +++ b/3883/CH13/EX13.14/EX13_14.sce @@ -0,0 +1,19 @@ +//Chapter 13, Example 13.14
+clc
+//Variable Declaration
+v1 = 3 //in volts
+v2 = 1 //in volts
+t1 = 4*10^-3 //in millisecond
+v3 = 10 //in volts
+t2 = 2*10^-3 //in millisecond
+v4 = 4 //in volts
+v5 = 2 //in volts
+
+//Calculation
+g = ((v1*t1)-(v2*t1))/(8*10^-3)
+g1 = (-(v3*t2)+(v4*t2)-(v5*t2))/(10*10^-3)
+
+
+//Results
+printf("a. G = %d V \n",g)
+printf("b. G = %.1f V \n",g1)
diff --git a/3883/CH13/EX13.15/EX13_15.sce b/3883/CH13/EX13.15/EX13_15.sce new file mode 100644 index 000000000..9a4fc6aa9 --- /dev/null +++ b/3883/CH13/EX13.15/EX13_15.sce @@ -0,0 +1,12 @@ +
+//Chapter 13, Example 13.15
+clc
+//Variable Declaration
+a = 2 //in volts
+b = 2 //in volts
+am = 1 //in volts
+//Calculation
+g = (a*am-b*am)/(2*3.14) //in volts
+
+//Results
+printf("G = %d V ",g)
diff --git a/3883/CH13/EX13.16/EX13_16.sce b/3883/CH13/EX13.16/EX13_16.sce new file mode 100644 index 000000000..89374cc2a --- /dev/null +++ b/3883/CH13/EX13.16/EX13_16.sce @@ -0,0 +1,14 @@ +//Chapter 13, Example 13.16
+clc
+//Variable Declaration
+v1 = 16 //in volts
+v2 = 2 //in volts
+
+
+//Calculation
+g1 = (v1+v2)/2 //in volts
+g2 = g1-(16) //in volts
+
+
+//Results
+printf("G = %d mv ",g2)
diff --git a/3883/CH13/EX13.17/EX13_17.sce b/3883/CH13/EX13.17/EX13_17.sce new file mode 100644 index 000000000..aa6259390 --- /dev/null +++ b/3883/CH13/EX13.17/EX13_17.sce @@ -0,0 +1,12 @@ +
+//Chapter 13, Example 13.17
+clc
+//Variable Declaration
+a = 2 //in volts
+b = 0 //in volts
+am = 10 //in volts
+//Calculation
+g = (a*am+b)/(2*3.14) //in volts
+
+//Results
+printf("G = %.2f V ",g)
diff --git a/3883/CH13/EX13.18/EX13_18.sce b/3883/CH13/EX13.18/EX13_18.sce new file mode 100644 index 000000000..93d0323c4 --- /dev/null +++ b/3883/CH13/EX13.18/EX13_18.sce @@ -0,0 +1,7 @@ +//Chapter 13, Example 13.18
+clc
+//Variable Declaration
+g = 2 //in volts
+
+//Results
+printf("G = %d mV ",g)
diff --git a/3883/CH13/EX13.19/EX13_19.sce b/3883/CH13/EX13.19/EX13_19.sce new file mode 100644 index 000000000..9e9a69ea2 --- /dev/null +++ b/3883/CH13/EX13.19/EX13_19.sce @@ -0,0 +1,14 @@ +//Chapter 13, Example 13.19
+clc
+//Variable Declaration
+a = 0.707 //in volts
+b = 12*10^-3 //in milliampere
+c = 169.73 //in volts
+
+//Calculation
+i = a*b //in milliampere
+v = a*c //in volts
+//Results
+printf("a. Irms = %.3f mA \n",i*10^3)
+printf("b. Irms = %.3f mA \n",i*10^3)
+printf("c. Vrms = %d mA ",v)
diff --git a/3883/CH13/EX13.2/EX13_2.sce b/3883/CH13/EX13.2/EX13_2.sce new file mode 100644 index 000000000..8f801ff46 --- /dev/null +++ b/3883/CH13/EX13.2/EX13_2.sce @@ -0,0 +1,12 @@ +
+//Chapter 13, Example 13.2
+clc
+//Variable Declaration
+t = 20*10^-3 //time in milli second
+
+
+//Calculation
+f = 1/t //frequency in hertz
+
+//Results
+printf("f = %d Hz",f)
diff --git a/3883/CH13/EX13.20/EX13_20.sce b/3883/CH13/EX13.20/EX13_20.sce new file mode 100644 index 000000000..253e5c106 --- /dev/null +++ b/3883/CH13/EX13.20/EX13_20.sce @@ -0,0 +1,16 @@ +//Chapter 13, Example 13.20
+clc
+//Variable Declaration
+pdc = 3.6 //power in watt
+vdc= 120 //in volts
+
+
+//Calculation
+idc = pdc/vdc //in milliampere
+im = sqrt(2)*idc //in milliampere
+em = sqrt(2)*vdc //in millivolts
+
+//Results
+printf("Idc = %d mA \n",idc*10^3)
+printf("Im = %.2f mA \n",im*10^3)
+printf("Em = %.2f mA \n",em)
diff --git a/3883/CH13/EX13.21/EX13_21.sce b/3883/CH13/EX13.21/EX13_21.sce new file mode 100644 index 000000000..6814879e3 --- /dev/null +++ b/3883/CH13/EX13.21/EX13_21.sce @@ -0,0 +1,14 @@ +//Chapter 13, Example 13.21
+clc
+//Variable Declaration
+x1 = 4 //in second
+y1 = 9 //in volts
+x2 = 4 //in second
+y2 = 1 //in volts
+x3 = 8 //in volts
+
+//Calculation
+v = sqrt(((y1*x1)+(y2*x2))/x3) //in volts
+
+//Results
+printf("Vrms = %.3f V ",v)
diff --git a/3883/CH13/EX13.22/EX13_22.sce b/3883/CH13/EX13.22/EX13_22.sce new file mode 100644 index 000000000..529ebea0c --- /dev/null +++ b/3883/CH13/EX13.22/EX13_22.sce @@ -0,0 +1,13 @@ +//Chapter 13, Example 13.22
+clc
+//Variable Declaration
+y1 = 100 //in volts
+x1 = 2 //in second
+y2 = 16 //in volts
+y3 = 4 //in volts
+
+//Calculation
+v = sqrt(((y1*x1)+(y2*x1)+(y3*x1))/10) //in volts
+
+//Results
+printf("Vrms = %.3f V ",v)
diff --git a/3883/CH13/EX13.23/EX13_23.sce b/3883/CH13/EX13.23/EX13_23.sce new file mode 100644 index 000000000..07948f61d --- /dev/null +++ b/3883/CH13/EX13.23/EX13_23.sce @@ -0,0 +1,11 @@ +//Chapter 13, Example 13.23
+clc
+//Variable Declaration
+y1 = 1600 //in volts
+x = 10*10^-3 //time in millisecond
+
+//Calculation
+v = sqrt(((y1*x)+(y1*x))/(20*10^-3)) //in volts
+
+//Results
+printf("Vrms = %d V ",v)
diff --git a/3883/CH13/EX13.24/EX13_24.sce b/3883/CH13/EX13.24/EX13_24.sce new file mode 100644 index 000000000..ed1af42a8 --- /dev/null +++ b/3883/CH13/EX13.24/EX13_24.sce @@ -0,0 +1,18 @@ +//Chapter 13, Example 13.24
+clc
+//Variable Declaration
+v1 = 20 //in volts
+v2 = 25 //in volts
+vm1 = v1 //in volts
+vm2 = 15 //in volts
+
+//Calculation
+m = 1.11*v1 //in volts
+vr1 = 0.707*vm1 //in volts
+vdc = vr1 //in volts
+vr2 = 0.707*vm2 //in volts
+//Results
+printf("Meter indication = %.1f V \n",m)
+printf("Vrms = %.2f V \n",vr1)
+printf("Vrms = Vdc = %d V \n",vdc)
+printf("Vrms = %.1f V \n",vr2)
diff --git a/3883/CH13/EX13.3/EX13_3.sce b/3883/CH13/EX13.3/EX13_3.sce new file mode 100644 index 000000000..03bd1bb0a --- /dev/null +++ b/3883/CH13/EX13.3/EX13_3.sce @@ -0,0 +1,18 @@ +
+//Chapter 13, Example 13.3
+clc
+//Variable Declaration
+d = 4 //division
+t= 50*10^-6 //time in microsecond
+d1 = 2 //division
+v = 0.1 //in volts
+
+//Calculation
+t1 = d*t //time in microsecond
+f = (1/t1) //frequency in hertz
+vm = d1*v //in volts
+
+//Results
+printf("T = %d us \n",t1*10^6)
+printf("f = %d kHz \n",f/10^3)
+printf("Vm = %.1f V \n",vm)
diff --git a/3883/CH13/EX13.4/EX13_4.sce b/3883/CH13/EX13.4/EX13_4.sce new file mode 100644 index 000000000..15602f0e8 --- /dev/null +++ b/3883/CH13/EX13.4/EX13_4.sce @@ -0,0 +1,12 @@ +
+//Chapter 13, Example 13.4
+clc
+//Variable Declaration
+f = 60 //frequency in hertz
+
+
+//Calculation
+w = 2*3.14*f //in rad/s
+
+//Results
+printf("w = %d rad/s",w)
diff --git a/3883/CH13/EX13.5/EX13_5.sce b/3883/CH13/EX13.5/EX13_5.sce new file mode 100644 index 000000000..5fc154a3f --- /dev/null +++ b/3883/CH13/EX13.5/EX13_5.sce @@ -0,0 +1,13 @@ +//Chapter 13, Example 13.5
+clc
+//Variable Declaration
+w = 500 //in rad/s
+
+
+//Calculation
+t = (2*3.14)/w //time in milliseconds
+f = 1/t //frequency in hertz
+
+//Results
+printf("T = %.2f ms \n",t*10^3)
+printf("f = %.2f Hz ",f)
diff --git a/3883/CH13/EX13.6/EX13_6.sce b/3883/CH13/EX13.6/EX13_6.sce new file mode 100644 index 000000000..946e42588 --- /dev/null +++ b/3883/CH13/EX13.6/EX13_6.sce @@ -0,0 +1,11 @@ +//Chapter 13, Example 13.6
+clc
+//Variable Declaration
+l = (3.14/2) //in rad/s
+w = 200 //in rad/s
+
+//Calculation
+t = l/w //time in millisecond
+
+//Results
+printf("t = %.2f ms \n",t*10^3)
diff --git a/3883/CH13/EX13.7/EX13_7.sce b/3883/CH13/EX13.7/EX13_7.sce new file mode 100644 index 000000000..86b34665a --- /dev/null +++ b/3883/CH13/EX13.7/EX13_7.sce @@ -0,0 +1,14 @@ +//Chapter 13, Example 13.7
+clc
+//Variable Declaration
+f = 60 //frequency in hertz
+t= 5*10^-3 //time in milli second
+
+//Calculation
+l = 2*3.14*f*t //in rad/s
+lo = (180*l)/3.14 //in degree
+
+
+//Results
+printf("alpha = %.3f rad \n",l)
+printf("alpha(degree) = %d degree",lo)
diff --git a/3883/CH13/EX13.8/EX13_8.sce b/3883/CH13/EX13.8/EX13_8.sce new file mode 100644 index 000000000..e0484029a --- /dev/null +++ b/3883/CH13/EX13.8/EX13_8.sce @@ -0,0 +1,14 @@ +//Chapter 13, Example 13.8
+clc
+//Variable Declaration
+e1 = 5 //in volts
+l = 0.8*3.14 //in degree
+
+//Calculation
+e = e1*sind(40) //in volts
+lo = 180*l/3.14 //in degree
+e2 = 5*sind(lo) //in volts
+
+//Results
+printf("e = %.3f V \n",e)
+printf("e = %.3f V \n",e2)
diff --git a/3883/CH13/EX13.9/EX13_9.sce b/3883/CH13/EX13.9/EX13_9.sce new file mode 100644 index 000000000..dd629d4a8 --- /dev/null +++ b/3883/CH13/EX13.9/EX13_9.sce @@ -0,0 +1,18 @@ +//Chapter 13, Example 13.9
+clc
+//Variable Declaration
+v = 4 //in volts
+em = 10 //in volts
+w = 377 //in rad/s
+//Calculation
+l1 = asind(v/em) //alpha1 in degree
+l2 = 180-(l1) //alpha2 in degree
+l3 = (%pi/180)*(l1) //in rad
+t1 = l3/w //in millisecond
+l4 = (%pi/180)*l2 //in rad
+t2 = l4/w //in millisecond
+//Results
+printf("a. alpha1 = %.3f \n",l1)
+printf(" alpha2 = %.3f \n",l2)
+printf("b. t1 = %.2f ms \n",t1*10^3)
+printf(" t2 = %.2f ms \n",t2*10^3)
diff --git a/3883/CH14/EX14.1/EX14_1.sce b/3883/CH14/EX14.1/EX14_1.sce new file mode 100644 index 000000000..32598adb2 --- /dev/null +++ b/3883/CH14/EX14.1/EX14_1.sce @@ -0,0 +1,15 @@ +//Chapter 14, Example 14.1
+clc
+//Variable Declaration
+vm = 100 //voltage magnitude of (a)
+r = 10 //resistance in ohms
+vm1 = 25 //voltage magnitude of (b)
+
+
+//Calculation
+i = vm/r //current of (a)
+i1 = vm1/r //current of (b)
+
+//Results
+printf("a. i = %dsin377t \n",i)
+printf("b. i = %.1fsin(377t+60dgree) \n",i1)
diff --git a/3883/CH14/EX14.10/EX14_10.sce b/3883/CH14/EX14.10/EX14_10.sce new file mode 100644 index 000000000..e09479c65 --- /dev/null +++ b/3883/CH14/EX14.10/EX14_10.sce @@ -0,0 +1,17 @@ +//Chapter 14, Example 14.10
+clc
+//Variable Declaration
+vm = 10 //voltage in volts
+im = 5 //current in ampere
+
+
+//Calculation
+p = (vm*im)/2 //power dissipation in watt
+r= (vm/im) //resistance in ohm
+p1 = ((0.707*vm)*(0.707*vm))/r //power in watt
+p2 = ((0.707*im)*(0.707*im))*r //power in watt
+
+//Results
+printf("P = %d W \n",p)
+printf("P = %.2f W \n",p1)
+printf("P = %.2f W \n",p2)
diff --git a/3883/CH14/EX14.11/EX14_11.sce b/3883/CH14/EX14.11/EX14_11.sce new file mode 100644 index 000000000..e3054f5c3 --- /dev/null +++ b/3883/CH14/EX14.11/EX14_11.sce @@ -0,0 +1,19 @@ +//Chapter 14, Example 14.11
+clc
+//Variable Declaration
+vm = 100 //peak voltage (a)
+im = 20 //peak current
+ov = 40 //theta voltage in degree (a)
+oi = 70 //theta current in degree (a)
+vm1 = 150 //peak voltage (b)
+im1 = 3 //peak current (b)
+ov1 = -70 //theta voltage in degree (b)
+oi1 = -50 //theta current in degree (b)
+
+//Calculation
+p = ((vm*im)/2)*0.866 //power (a) in watt
+p1 = ((vm1*im1)/2)*0.9397 //power (b) in watt
+
+//Results
+printf("P = %d W \n",p)
+printf("P = %.2f W \n",p1)
diff --git a/3883/CH14/EX14.12/EX14_12.sce b/3883/CH14/EX14.12/EX14_12.sce new file mode 100644 index 000000000..7f70eca41 --- /dev/null +++ b/3883/CH14/EX14.12/EX14_12.sce @@ -0,0 +1,16 @@ +//Chapter 14, Example 14.12
+clc
+//Variable Declaration
+a = cosd(40-(-20)) //leading
+b = cosd(80-30) //lagging
+p = 100 //in watt
+v = 20 //in voltage
+i = 5 //in ampere
+
+//Calculation
+fp = p/(v*i) //power factor
+
+//Results
+printf("a. Fp = %.1f leading \n",a)
+printf("b. Fp = %.4f leading \n",b)
+printf("c. Fp = %d \n",fp)
diff --git a/3883/CH14/EX14.13/EX14_13.sce b/3883/CH14/EX14.13/EX14_13.sce new file mode 100644 index 000000000..d37c18092 --- /dev/null +++ b/3883/CH14/EX14.13/EX14_13.sce @@ -0,0 +1,26 @@ +//Chapter 14, Example 14.13
+clc
+//Variable Declaration
+c1=complex(3,4)
+c2=complex(0,-6)
+c3=complex(-10,-20)
+
+//Calculation
+//Function to create plot on complex plane
+function complexPlot(x,y,z)
+ xpts = [0 x];
+ ypts = [0 y];
+ plot(xpts, ypts);
+ xtitle(z);
+ xlabel("Real");
+ ylabel("Imaginary");
+endfunction
+
+//Plot
+scf(1)
+complexPlot(real(c1),imag(c1),"3 + j4")
+scf(2)
+complexPlot(real(c2),imag(c2),"0 - j6")
+scf(3)
+complexPlot(real(c3),imag(c3),"-10 - j20")
+
diff --git a/3883/CH14/EX14.14/EX14_14.sce b/3883/CH14/EX14.14/EX14_14.sce new file mode 100644 index 000000000..b4d3d76f5 --- /dev/null +++ b/3883/CH14/EX14.14/EX14_14.sce @@ -0,0 +1,32 @@ +//Chapter 14, Example 14.14
+clc
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+
+[cr1,ci1]=polar2rect(5,30)
+[cr2,ci2]=polar2rect(7,-120)
+[cr3,ci3]=polar2rect(-4.2,60)
+
+//Calculation
+//Function to create plot on complex plane
+function complexPlot(x,y,z)
+ xpts = [0 x];
+ ypts = [0 y];
+ plot(xpts, ypts);
+ xtitle(z);
+ xlabel("Real");
+ ylabel("Imaginary");
+endfunction
+
+//Plot
+scf(1)
+complexPlot(cr1,ci1,"5 < 30degree")
+scf(2)
+complexPlot(cr2,ci2,"7 < 120 degree")
+scf(3)
+complexPlot(cr3,ci3,"4.2 < 60 degree")
diff --git a/3883/CH14/EX14.15/EX14_15.sce b/3883/CH14/EX14.15/EX14_15.sce new file mode 100644 index 000000000..c9d9fe899 --- /dev/null +++ b/3883/CH14/EX14.15/EX14_15.sce @@ -0,0 +1,20 @@ +//Chapter 14, Example 14.15
+clc
+funcprot(0)
+
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+
+//Variable Declaration
+x = 3 //real part
+y = 4 //imaginary part
+
+//Calculation
+[a,b]=rect2polar(x,y) //function of conversion
+
+//Results
+printf("C = %d < %.2f degree", a,b)
diff --git a/3883/CH14/EX14.16/EX14_16.sce b/3883/CH14/EX14.16/EX14_16.sce new file mode 100644 index 000000000..b3daa27a6 --- /dev/null +++ b/3883/CH14/EX14.16/EX14_16.sce @@ -0,0 +1,19 @@ +//Chapter 14, Example 14.16
+clc
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+
+//Variable Declaration
+a=10 //radius
+b=45 //angular in degree
+
+//Calculation
+[r,i]=polar2rect(a,b) //function of conversion
+
+//Results
+printf("C = %.2f + j %.2f",r,i)
diff --git a/3883/CH14/EX14.17/EX14_17.sce b/3883/CH14/EX14.17/EX14_17.sce new file mode 100644 index 000000000..39d63c987 --- /dev/null +++ b/3883/CH14/EX14.17/EX14_17.sce @@ -0,0 +1,17 @@ +//Chapter 14, Example 14.17
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th= 180-(atand(y/x))
+endfunction
+
+//Variable Decleration
+a = 6 //real part
+b = 3 //imaginary
+
+//Calculation
+[r,th] = rect2polar(a,b) //function of conversion
+
+//Results
+printf("C = %.2f < %.2f degree",r,th)
diff --git a/3883/CH14/EX14.18/EX14_18.sce b/3883/CH14/EX14.18/EX14_18.sce new file mode 100644 index 000000000..f48ce3702 --- /dev/null +++ b/3883/CH14/EX14.18/EX14_18.sce @@ -0,0 +1,17 @@ +//Chapter 14, Example 14.18
+clc
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//Variable Declaration
+a = 10 //real value
+b = 230 //angle in degree
+//Calculation
+[r,i]=polar2rect(a,b) //function of conversion
+
+//Results
+printf("C = %.3f j%.3f",r,i)
diff --git a/3883/CH14/EX14.19/EX14_19.sce b/3883/CH14/EX14.19/EX14_19.sce new file mode 100644 index 000000000..dae897316 --- /dev/null +++ b/3883/CH14/EX14.19/EX14_19.sce @@ -0,0 +1,21 @@ +//Chapter 14, Example 14.19
+clc
+//addition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+endfunction
+
+//Variable Declaration
+x1=complex(2,4) //complex form c1
+y1 = complex(3,1) //complex form c2
+x2 = complex(3,6) //complex form c1
+y2 = complex(-6,3) //complex form c2
+
+//Calculation
+[a,b]=addition(real(x1),real(y1),imag(x1),imag(y1)) //function of conversion
+[c,d]=addition(real(x2),real(y2),imag(x2),imag(y2)) //function of conversion
+
+//Results
+printf("a. C = %d + j%d \n", a,b)
+printf("b. C = %d + j%d", c,d)
diff --git a/3883/CH14/EX14.2/EX14_2.sce b/3883/CH14/EX14.2/EX14_2.sce new file mode 100644 index 000000000..41b92f94f --- /dev/null +++ b/3883/CH14/EX14.2/EX14_2.sce @@ -0,0 +1,11 @@ +//Chapter 14, Example 14.2
+clc
+//Variable Declaration
+im = 40 //current magnitude in ampere
+r = 5 //resistance in ohms
+
+//Calculation
+v = im*r //voltage in volt
+
+//Results
+printf("v = %dsin(377t+30degree) ",v)
diff --git a/3883/CH14/EX14.20/EX14_20.sce b/3883/CH14/EX14.20/EX14_20.sce new file mode 100644 index 000000000..8537de5e7 --- /dev/null +++ b/3883/CH14/EX14.20/EX14_20.sce @@ -0,0 +1,20 @@ +//Chapter 14, Example 14.20
+clc
+//subtraction
+function[c1,c2]=subtraction(x1,x2,y1,y2)
+ c1 = x1-x2
+ c2 = y1-y2
+ endfunction
+//Variable Declaration
+x1 = complex(1,4) //complex form c2
+y1 = complex(4,6) //complex form c1
+x2 = complex(-2,5) //complex form c2
+y2 = complex(3,3) //complex form c1
+//Calculation
+[a,b]=subtraction(real(y1),real(x1),imag(y1),imag(x1)) //function of conversion
+[c,d]=subtraction(real(y2),real(x2),imag(y2),imag(x2)) //function of conversion
+
+
+//Results
+printf("a. C = %d + j%d \n", a,b)
+printf("b. C = %d %dj", c,d)
diff --git a/3883/CH14/EX14.21/EX14_21.sce b/3883/CH14/EX14.21/EX14_21.sce new file mode 100644 index 000000000..5c39fea28 --- /dev/null +++ b/3883/CH14/EX14.21/EX14_21.sce @@ -0,0 +1,15 @@ +//Chapter 14, Example 14.12
+clc
+//Variable Declaration
+a1 = 2 //real value
+a2 = 3 //real value
+a3= 2 //real value
+a4 = 4 //real value
+
+//Calculation
+x1 = a1+a2 //real value
+x2 = a3+a4 //real value
+
+//Results
+printf("a. %d<45 \n",x1)
+printf("b. %d<0",x2)
diff --git a/3883/CH14/EX14.22/EX14_22.sce b/3883/CH14/EX14.22/EX14_22.sce new file mode 100644 index 000000000..0b34fbc98 --- /dev/null +++ b/3883/CH14/EX14.22/EX14_22.sce @@ -0,0 +1,18 @@ +//Chapter 14, Example 14.22
+clc
+function[c1,c2]=equ(x1,x2,y1,y2)
+ c1 = (x1*x2)-(y1*y2)
+ c2 = (y1*x2)+(x1*y2)
+ endfunction
+//Variable Declaration
+x1 = complex(2,3) //complex form of c1
+y1 = complex(5,10) //complex form of c2
+x2 = complex(-2,-3) //complex form of c1
+y2 = complex(4,-6) //complex form of c2
+//Calculation
+[a,b]=equ(real(x1),real(y1),imag(x1),imag(y1))
+[c,d]=equ(real(x2),real(y2),imag(x2),imag(y2))
+
+//Results
+printf("a. C = %d + j%d \n", a,b)
+printf("b. C = %d + j%d", c,d)
diff --git a/3883/CH14/EX14.23/EX14_23.sce b/3883/CH14/EX14.23/EX14_23.sce new file mode 100644 index 000000000..2fd405c0c --- /dev/null +++ b/3883/CH14/EX14.23/EX14_23.sce @@ -0,0 +1,23 @@ +//Chapter 14, Example 14.23
+clc
+//multiplication
+function[c1,c2]=equ(x1,x2,y1,y2)
+ c1 = (x1*x2)
+ c2 = (y1+y2)
+ endfunction
+//Variable Declaration
+x1 = 5 //real value
+x2 = 10 //real value
+y1 = 20 //angle in degree
+y2 = 30 //angle in degree
+x3 = 2 //real value
+x4 = 7 //real value
+y3 = -40 //angle in degree
+y4 = 120 //angle in degree
+
+//Calculation
+[a,b]=equ(x1,x2,y1,y2) //function of multiplication
+[c,d]=equ(x3,x4,y3,y4) //function of multiplication
+//Results
+printf("a. C = %d < %d degree \n", a,b)
+printf("b. C = %d < %d degree", c,d)
diff --git a/3883/CH14/EX14.24/EX14_24.sce b/3883/CH14/EX14.24/EX14_24.sce new file mode 100644 index 000000000..11fc95bc9 --- /dev/null +++ b/3883/CH14/EX14.24/EX14_24.sce @@ -0,0 +1,20 @@ +//Chapter 14, Example 14.24
+clc
+//muliplication
+function[C1,C2]=equ2(x1,x2,y1,y2)
+ C1 = ((x1*x2)+(y1*y2))/((y1*y1)+(y2*y2))
+ C2 = ((x2*y1)-(x1*y2))/((y1*y1)+(y2*y2))
+ endfunction
+
+//Variable Declaration
+x1 = complex(1,4) //complex form of c1
+y1 = complex(4,5) //complex form of c2
+x2 = complex(-4,-8) //complex form of c1
+y2 = complex(6,-1) //complex form of c2
+//Calculation
+[a,b]=equ2(real(x1),real(y1),imag(x1),imag(y1)) //function
+[c,d]=equ2(real(x2),real(y2),imag(x2),imag(y2)) //function
+//Results
+printf("C1/C2 = %.3f + j%.3f \n",a,b)
+printf("C1/C2 = %.3f + j%.3f \n",c,d)
+
diff --git a/3883/CH14/EX14.25/EX14_25.sce b/3883/CH14/EX14.25/EX14_25.sce new file mode 100644 index 000000000..5fe04ba37 --- /dev/null +++ b/3883/CH14/EX14.25/EX14_25.sce @@ -0,0 +1,22 @@ +//Chapter 14, Example 14.25
+clc
+//division
+function[c1,c2]=equ(x1,x2,y1,y2)
+ c1 = (x1/x2)
+ c2 = (y1-y2)
+ endfunction
+//Variable Declaration
+x1 = 15 //real value
+x2 = 2 //real value
+y1 = 10 //angle in degree
+y2 = 7 //angle in degree
+x3 = 8 //real value
+x4 = 16 //real value
+y3 = 120 //angle in degree
+y4 = -50 //angle in degree
+//Calculation
+[a,b]=equ(x1,x2,y1,y2) //function of division
+[c,d]=equ(x3,x4,y3,y4) //function of division
+//Results
+printf("C1/C2 = %.1f < %d degree\n",a,b)
+printf("C1/C2 = %.1f < %d degree\n",c,d)
diff --git a/3883/CH14/EX14.26/EX14_26.sce b/3883/CH14/EX14.26/EX14_26.sce new file mode 100644 index 000000000..0f2f83ae8 --- /dev/null +++ b/3883/CH14/EX14.26/EX14_26.sce @@ -0,0 +1,81 @@ +//Chapter 14, Example 14.26
+clc
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+ //subtraction
+function[c1,c2]=subtraction(x1,x2,y1,y2)
+ c1 = x1-x2
+ c2 = y1-y2
+ endfunction
+//addition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+//Variable Declaration
+x1 = complex(2,3) //complex form of x1
+x2 = complex(4,6) //complex form of x2
+y1 = complex(7,7) //complex form of x3
+y2 = complex(3,-3) //complex form of x4
+x3 = 50 //real value
+y3 = 30 //angle in degree
+x4 = complex(5,5) //complex form of x5
+x5 = 10 //real value
+y5= -20 //angle in degree
+x6 = 2 //real value
+y6 = 20 //angle in degree
+x7 = complex(3,4) //complex form of x6
+x8 = complex(8,-6) //complex form of x7
+x9 = 3 //real value
+y9 = 27 //angle in degree
+x10 = 6 //real value
+y10 = -40 //angle in degree
+//Calculation
+[a,b]=addition(real(x1),real(x2),imag(x1),imag(x2)) //function of addition
+[c,d]=subtraction(real(y1),real(y2),imag(y1),imag(y2)) //function of subtraction
+[aa,bb]=rect2polar(a,b) //function of conversion
+[cc,dd]=rect2polar(c,d) //function of conversion
+[e,f]=voltdivider(aa,cc,bb,-dd) //function of multiplication
+[g,h]=voltdivider(cc,cc,dd,-dd) //function of multiplication
+[m,n]=division(e,g,f,h) //function of division
+[mm,nn]=polar2rect(m,n) //function of conversion
+[o,p]=rect2polar(real(x4),imag(x4)) //function of conversion
+[oo,pp]=voltdivider(x3,o,y3,p) //function of multiplication
+[ee,ff]=division(oo,x5,pp,y5) //function of division
+[gg,hh]=voltdivider(x6,x6,y6,y6) //function of multiplication
+[i,j]=rect2polar(real(x7),imag(x7)) //function of conversion
+[ii,jj]=voltdivider(gg,i,hh,j) //function of multiplication
+[s,t]=rect2polar(real(x8),imag(x8)) //function of conversion
+[ss,tt]=division(ii,s,jj,t) //function of division
+[v,w]=polar2rect(x9,y9) //function of conversion
+[vv,ww]=polar2rect(x10,y10) //function of conversion
+[ma,na]=subtraction(v,vv,w,ww) //function of subtraction
+
+//Results
+printf("a. = %.3f + j%.3f \n",mm,nn)
+printf("b. = %.2f < %d degree \n",ee,ff)
+printf("c. = %.1f < %d degree \n",ss,tt)
+printf("d. = %.3f + j %.3f \n",ma,na)
diff --git a/3883/CH14/EX14.29/EX14_29.sce b/3883/CH14/EX14.29/EX14_29.sce new file mode 100644 index 000000000..54224cc5c --- /dev/null +++ b/3883/CH14/EX14.29/EX14_29.sce @@ -0,0 +1,21 @@ +//Chapter 14, Example 14.29
+clc
+function[t,p]=time2phasor(x,y)
+ t=x*0.707
+ p=y
+endfunction
+
+//Variable Declaration
+x1 = 50 //real value of time
+y1 = 0 //angle in degree
+x2 = 69.6 //peak voltage
+y2 = 72 //angle in degree
+x3 = 45 //peak voltage
+y3 = 90 //angle in degree
+//Calculation
+[a,b]=time2phasor(x2,y2) //function of conversion
+[c,d]=time2phasor(x3,y3) //function of conversion
+//Results
+printf("a. %d < %d degree \n",x1,y1)
+printf("b. %.2f < %d degree \n",a,b)
+printf("c. %.2f < %d degree \n",c,d)
diff --git a/3883/CH14/EX14.3/EX14_3.sce b/3883/CH14/EX14.3/EX14_3.sce new file mode 100644 index 000000000..4d4fff010 --- /dev/null +++ b/3883/CH14/EX14.3/EX14_3.sce @@ -0,0 +1,16 @@ +//Chapter 14, Example 14.3
+clc
+//Variable Declaration
+w = 377 //in rad/s
+l = 0.1 //inductance in ohms
+im = 10 //current of (a)
+im1= 7 //current of (b)
+
+//Calculation
+xl = w*l //inductance reactance
+vm = im*xl //voltage of (a)
+vm1 = im1*xl //voltage of (b)
+
+//Results
+printf("a. v = %dsin(377t+90degree) \n",vm)
+printf("b. v = %.1fsin(377t+20degree)",vm1)
diff --git a/3883/CH14/EX14.30/EX14_30.sce b/3883/CH14/EX14.30/EX14_30.sce new file mode 100644 index 000000000..99ef83979 --- /dev/null +++ b/3883/CH14/EX14.30/EX14_30.sce @@ -0,0 +1,20 @@ +//Chapter 14, Example 14.30
+clc
+function[m,n]=phasor2time(x,y)
+ m=sqrt(2)*x
+ n=y
+endfunction
+
+//Variable Declaration
+x1= 10 //real value
+y1 = 30 //angle in degree
+x2 = 115 //real value
+y2 = -70 //angle in degree
+
+//Calculation
+[a,b]=phasor2time(x1,y1) //function of conversion
+[c,d]=phasor2time(x2,y2) //function of conversion
+
+//Results
+printf("a. I = %.2f sin(377t + %d degree)\n",a,b)
+printf("b. V = %.1f sin(377t %d degree)\n",c,d)
diff --git a/3883/CH14/EX14.31/EX14_31.sce b/3883/CH14/EX14.31/EX14_31.sce new file mode 100644 index 000000000..27cc7c5ec --- /dev/null +++ b/3883/CH14/EX14.31/EX14_31.sce @@ -0,0 +1,45 @@ +//Chapter 14, Example 14.31
+clc
+ funcprot(0)
+//time to phasor
+function[m,n]=time2phasor(x,y)
+ m=0.707*x
+ n=y
+endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//addition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+y1
+ c2 = y2+x2
+endfunction
+
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+//phasor to time domain
+function[m,n]=phasor2time(x,y)
+ m=sqrt(2)*x
+ n=y
+endfunction
+//Variable Declaration
+x1=50 //maximum voltage of Va
+y1=30 //angle in degree of Va
+x2=30 //maximum voltage of Vb
+y2=60 //angle in degree of Vb
+//Calculation
+[a,b]=time2phasor(x1,y1) //function of conversion
+[c,d]=time2phasor(x2,y2) //function of conversion
+[e,f]=polar2rect(a,b) //function of conversion
+[g,h]=polar2rect(c,d) //function of conversion
+[i,j]=addition(e,f,g,h) //function of addition
+[k,l]=rect2polar(i,j) //function of conversion
+[o,p]=phasor2time(k,l) //function of conversion
+//Results
+printf("ein = %.2f sin(377t + %.2f degree)",o,p)
diff --git a/3883/CH14/EX14.32/EX14_32.sce b/3883/CH14/EX14.32/EX14_32.sce new file mode 100644 index 000000000..16c280dd2 --- /dev/null +++ b/3883/CH14/EX14.32/EX14_32.sce @@ -0,0 +1,53 @@ +//Chapter 14, Example 14.32
+clc
+ funcprot(0)
+function[m,n]=time2phasor(x,y)
+ m=0.707*x
+ n=y
+endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//subtraction
+function[c1,c2]=subtraction(x1,x2,y1,y2)
+ c1 = x1-y1
+ c2 = x2-y2
+ endfunction
+
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=-90
+ elseif x<0 then
+ th=atand(y/x)+180
+ else
+ th=atand(y/x)
+ if (x<0) & (y<0) then
+ th=th-180
+ end
+ end
+endfunction
+//phasor to time domain
+function[m,n]=phasor2time(x,y)
+ m=sqrt(2)*x
+ n=y
+endfunction
+//Variable Declaration
+x1= 120*10^-3 //maximum voltage of iT
+y1=60 //angle in degree
+x2 = 80*10^-3 //maximum voltage of i1
+y2 = 0 //angle in degree
+//Calculation
+[a,b]=time2phasor(x1,y1) //function of conversion
+[c,d]=time2phasor(x2,y2) //function of conversion
+[e,f]=polar2rect(a,b) //function of conversion
+[g,h]=polar2rect(c,d) //function of conversion
+[i,j]=subtraction(e,f,g,h) //subtraction
+[k,l]=rect2polar(i,j) //function of conversion
+[o,p]=phasor2time(k,l) //function of conversion
+//Results
+printf("i2 = %.1f x 10^-3 sin(wt + %.2f degree) ",o*10^3,p)
diff --git a/3883/CH14/EX14.4/EX14_4.sce b/3883/CH14/EX14.4/EX14_4.sce new file mode 100644 index 000000000..6be2b186b --- /dev/null +++ b/3883/CH14/EX14.4/EX14_4.sce @@ -0,0 +1,14 @@ +//Chapter 14, Example 14.4
+clc
+//Variable Declaration
+w = 20 //in rad/s
+l = 0.5 //inductance in henry
+vm = 100 //voltage in volts
+
+
+//Calculation
+xl = w*l //inductance reactance
+im = vm/xl //current in ampere
+
+//Results
+printf("i = %d sin(20t - 90degree)",im)
diff --git a/3883/CH14/EX14.5/EX14_5.sce b/3883/CH14/EX14.5/EX14_5.sce new file mode 100644 index 000000000..3b858a86e --- /dev/null +++ b/3883/CH14/EX14.5/EX14_5.sce @@ -0,0 +1,14 @@ +//Chapter 14, Example 14.5
+clc
+//Variable Declaration
+w = 400 //in rad/s
+c = 1*10^-6 //capacitance in microfarad
+vm = 30 //voltage in volts
+
+
+//Calculation
+xc = 1/(w*c) //capacitance reactance
+im = vm/xc //current in ampere
+
+//Results
+printf("i = %d x 10^-3 sin(400t + 90degree)",im*10^3)
diff --git a/3883/CH14/EX14.6/EX14_6.sce b/3883/CH14/EX14.6/EX14_6.sce new file mode 100644 index 000000000..8ef977326 --- /dev/null +++ b/3883/CH14/EX14.6/EX14_6.sce @@ -0,0 +1,14 @@ +//Chapter 14, Example 14.6
+clc
+//Variable Declaration
+w = 500 //in rad/s
+c = 100*10^-6 //capacitance in micro farad
+im = 40 //current in ampere
+
+
+//Calculation
+xc = 1/(w*c) //capacitance reactance
+vm = im*xc //voltage in volts
+
+//Results
+printf("v = %d sin(500t - 30degree)",vm)
diff --git a/3883/CH14/EX14.7/EX14_7.sce b/3883/CH14/EX14.7/EX14_7.sce new file mode 100644 index 000000000..a099900d8 --- /dev/null +++ b/3883/CH14/EX14.7/EX14_7.sce @@ -0,0 +1,26 @@ +//Chapter 14, Example 14.7
+clc
+//Variable Declaration
+vm1 = 100 //Vm of (a)
+im1 = 20 //Im of (a)
+vm2 = 1000 //Vm of (b)
+im2 = 5 //Im of (b)
+vm3 = 500 //Vm of (c)
+im3 = 1 //Im of (c)
+vm4 = 50 //Vm of (d)
+im4 = 5 //Im of (d)
+w = 377 //in rad/s
+w1 = 157 //in rad/s
+//Calculation
+r = vm1/im1 //resistance of (a)
+xl = vm2/im2 //inductance reactance
+l = xl/w //inductance in henry
+xc = vm3/im3 //capacitance reactance
+c = 1/(w1*xc) //capacitance in farad
+r1 = vm4/im4 //resistance of (d)
+
+//Results
+printf("a. R = %d ohm \n",r)
+printf("b. L = %.3f H \n",l)
+printf("c. C = %.2f uF \n",c*10^6)
+printf("d. R = %d ohm \n",r1)
diff --git a/3883/CH14/EX14.8/EX14_8.sce b/3883/CH14/EX14.8/EX14_8.sce new file mode 100644 index 000000000..905513fb0 --- /dev/null +++ b/3883/CH14/EX14.8/EX14_8.sce @@ -0,0 +1,12 @@ +//Chapter 14, Example 14.8
+clc
+//Variable Declaration
+l = 200*10^-3 //inductance in henry
+r = 5*10^3 //resistance in ohms
+xl = 2*3.14*l //reactance inductor
+
+//Calculation
+f= r/xl //frequency in hertz
+
+//Results
+printf("f = %.2f kHz ",f*10^-3)
diff --git a/3883/CH14/EX14.9/EX14_9.sce b/3883/CH14/EX14.9/EX14_9.sce new file mode 100644 index 000000000..01b58a273 --- /dev/null +++ b/3883/CH14/EX14.9/EX14_9.sce @@ -0,0 +1,12 @@ +//Chapter 14, Example 14.9
+clc
+//Variable Declaration
+l = 5*10^-3 //inductance in henry
+c = 0.1*10^-6 //capacitance in farad
+//calculation
+xl = 2*3.14*l //inductance reactance
+xc = 1/(2*3.14*c) //capacitance reactance
+f= 1/(2*3.14*sqrt(l*c)) //frequency in hertz
+
+//Results
+printf("f = %.2f kHz",f*10^-3)
diff --git a/3883/CH15/EX15.1/EX15_1.sce b/3883/CH15/EX15.1/EX15_1.sce new file mode 100644 index 000000000..1e6b5dd85 --- /dev/null +++ b/3883/CH15/EX15.1/EX15_1.sce @@ -0,0 +1,35 @@ +//Chapter 15, Example 15.1
+clc
+funcprot(0)
+//time to phasor
+function[m,n]=time2phasor(x,y)
+ m=0.707*x
+ n=y
+endfunction
+
+//phasor to time domain
+function[m,n]=phasor2time(x,y)
+ m=sqrt(2)*x
+ n=y
+endfunction
+//Variable Declaration
+x=100 //amplitude
+y=0
+r = 5 //resistor
+y1=0
+//Calculation
+[a,b]=time2phasor(x,y)
+i= a/r
+[c]=phasor2time(i,y1)
+
+//graph
+x1 = 0 : 1 : 1000 //time in seconds
+v = x*sin(377*x1) //in voltage
+ip = i*sin(377*x1) //current in amperes
+plot(x1, v)
+plot(x1, ip)
+xlabel("t")
+ylabel("i V")
+
+//Results
+printf("i = %.1f sin wt", c)
diff --git a/3883/CH15/EX15.10/EX15_10.sce b/3883/CH15/EX15.10/EX15_10.sce new file mode 100644 index 000000000..5264e3918 --- /dev/null +++ b/3883/CH15/EX15.10/EX15_10.sce @@ -0,0 +1,72 @@ +//Chapter 15, Example 15.10
+clc
+funcprot(0)
+//addition
+function[c1,c2]=addition1(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//addition
+function[c1,c2,c3]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+endfunction
+
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=-90
+ else
+ th=atand(y/x)
+ end
+endfunction
+
+
+ function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+//Variable Declaration
+x1=6 //real value of Zr
+x2=50 //real value of E
+y1=0 //angle in degree of Zr
+y2=30 //angle in degree of E
+r2=9 //real value of Zl
+s2=90 //angle in degree of Zl
+r3=17 //real value of Zc
+s3=-90 //angle in degree of Zc
+//Calculation
+[a,b]=voltdivider(x1,x2,y1,y2) //function of multiplication
+[c,d]=polar2rect(x1,y1) //function of conversion
+[e,f]=polar2rect(r2,s2) //function of conversion
+[ee,ff]=polar2rect(r3,s3) //function of conversion
+[i,j]=addition(c,e,ee,d,f,ff) //function of addition
+[o,p]=rect2polar(i,j) //function of conversion
+[m,n]=division(a,o,b,p) //function of division
+[aa,ba]=voltdivider(r2,x2,s2,y2) //function of conversion
+[ma,na]=division(aa,o,ba,p) //function of division
+[ab,bb]=voltdivider(r3,x2,s3,y2) //function of conversion
+[mb,nb]=division(ab,o,bb,p) //function of division
+[za,ya]=addition1(e,ee,f,ff) //function of addition
+[zb,yb]=rect2polar(za,ya) //function of conversion
+[zc,yc]=voltdivider(zb,x2,yb,y2) //function of multiplication
+[zd,yd]=division(zc,o,yc,p) //function of division
+
+//Results
+printf("Vr = %d V < %.2f degree \n",m,n)
+printf("Vl = %d V < %.2f degree \n",ma,na)
+printf("Vc = %d V < %.2f degree \n",mb,nb)
+printf("V1 = %d V < %.2f degree",zd,yd)
diff --git a/3883/CH15/EX15.11/EX15_11.sce b/3883/CH15/EX15.11/EX15_11.sce new file mode 100644 index 000000000..a0c01a88f --- /dev/null +++ b/3883/CH15/EX15.11/EX15_11.sce @@ -0,0 +1,80 @@ +//Chapter 15, Example 15.11
+clc
+funcprot(0)
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//addition
+function[c1,c2]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+endfunction
+
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+//Variable Declaration
+r1=6 //resistance in ohms
+r2=4 //resistance in ohms
+l1 = 0.05 //inductance in henry
+l2 = 0.05 //inductance in henry
+c1 = 200*10^-6 //capacitance in farad
+c2 = 200*10^-6 //capacitance in farad
+w = 377 //in rad/s
+z = 20 //source in volts
+//Calculation
+rt = r1+r2 //total resistance in ohms
+yt = 0 //angle in degree
+lt = l1+l2 //in henry
+ct = c1/2 //in farad
+xl = w*lt //in ohms
+xy = 90 //angle in degree
+xc = 1/(w*ct) //in ohms
+cy = -90 //angle in degree
+[a,b]=polar2rect(rt,yt) //function of conversion
+[c,d]=polar2rect(xl,xy) //function of conversion
+[e,f]=polar2rect(xc,cy) //function of conversion
+[i,j]=addition(a,c,e,b,d,f) //function of addition
+[m,n]=rect2polar(i,j) //function of conversion
+[o,p]=division(z,m,yt,n) //function of division
+[w,ww]=voltdivider(o,rt,p,yt) //function of multiplication
+[x,y]=voltdivider(o,xl,p,xy) //function of multiplication
+[v,k]=voltdivider(o,xc,p,cy) //function of multiplication
+fp1 = cosd(48.16) //in degree
+fp2 = (rt/m) //lagging
+pt= z*o*fp1 //power in watt
+q=x-v //in volts
+e= sqrt((w*w)+(q*q)) //in volts
+eo = 0 //in volts
+[aa,bb]=voltdivider(rt,e,yt,eo) //function of multiplication
+[cc,dd]=division(aa,m,bb,n) //function of division
+[ee,ff]=voltdivider(xc,e,cy,eo) //function of multiplication
+[ii,jj]=division(ee,m,ff,n) //function of division
+//Results
+printf("a. Zt = %d ohm < %.2f degree \n",m,n)
+printf(" I = %.3f A < %.2f degree \n",o,p)
+printf(" Vr = %.2f V < %.2f degree \n",w,ww)
+printf(" Vl = %.2f V < %.2f degree \n",x,y)
+printf(" Vc = %.2f V < %.2f degree \n",v,k)
+printf("b. Fp = %.3f lagging \n",fp1)
+printf(" Fp = %.3f lagging \n",fp2)
+printf("c. Pt = %.2f W \n",pt)
+printf("e. E = %d V \n",e)
+printf("f. Vr = %.1f V < %.2f degree \n",cc,dd)
+printf(" Vc = %.2f V < %.2f degree",ii,jj)
diff --git a/3883/CH15/EX15.12/EX15_12.sce b/3883/CH15/EX15.12/EX15_12.sce new file mode 100644 index 000000000..91a19cc94 --- /dev/null +++ b/3883/CH15/EX15.12/EX15_12.sce @@ -0,0 +1,90 @@ +//Chapter 15, Example 15.12
+clc
+funcprot(0)
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//adition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+endfunction
+
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//Function to create plot on complex plane
+function complexPlot(x1,y1,x2,y2,x3,y3,z)
+ xpts1 = [0 x1];
+ ypts1 = [0 y1];
+
+ xpts2 = [0 x2];
+ ypts2 = [0 y2];
+
+ xpts3 = [0 x3];
+ ypts3 = [0 y3];
+ scf(1);
+ clf(1);
+ set(gca(),"auto_clear","off")
+ plot(xpts1,ypts1,'ro-')
+ plot(xpts2,ypts2,'ro-')
+ plot(xpts3,ypts3,'ro-')
+ set(gca(),"auto_clear","on")
+ a = gca();
+ a.x_location="origin";
+ a.y_location="origin";
+ set(gca(),"data_bounds",matrix([-0.1,0.1,-0.2,0.2],2,-1))
+ xtitle(z);
+ xlabel("Real");
+ ylabel("Imaginary");
+endfunction
+
+//Variable Declaration
+g = 0.05 //in admittance
+d = 0 //in degrees
+bl = 0.1 //in admittance
+dl = -90 //in degrees
+zr= 20 //in impedance
+zro = 0 //in angle
+zl = 10 //in impedance
+zlo = 90 //in degrees
+
+//Calculation
+[a,b]=polar2rect(g,d)
+[c,d]=polar2rect(bl,dl)
+[e,f]=addition(a,c,b,d)
+[i,j]=rect2polar(e,f)
+m= (1/i)
+n= (-j)
+[o,p]=voltdivider(zr,zl,zro,zlo)
+[q,r]=polar2rect(zr,zro)
+[s,t]=polar2rect(zl,zlo)
+[oo,pp]=addition(q,s,r,t)
+[qq,rr]=rect2polar(oo,pp)
+[ss,tt]=division(o,qq,p,rr)
+
+//Plot
+complexPlot(a,b,c,d,e,f,"Admittance Diagram")
+
+//Results
+printf("Yr = %.2f S + j%d \n",a,b)
+printf("Yl = %d %.1fj s \n",c,d)
+printf("Yt = %.2f S %.1fj S \n",e,f)
+printf("Zt = %.2f ohm < %.2f degree \n",m,n)
+printf("Zt = %.2f ohm < %.2f degree \n",ss,tt)
diff --git a/3883/CH15/EX15.13/EX15_13.sce b/3883/CH15/EX15.13/EX15_13.sce new file mode 100644 index 000000000..a39041a80 --- /dev/null +++ b/3883/CH15/EX15.13/EX15_13.sce @@ -0,0 +1,114 @@ +//Chapter 15, Example 15.13
+clc
+funcprot(0)
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//adition
+function[c1,c2]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+endfunction
+
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+ //multiplication
+function [r,s] = voltdivider(x1,x2,x3,y1,y2,y3)
+ r=x1*x2*x3
+ s=y1+y2+y3
+endfunction
+
+ //multiplication
+function [r,s] = voltdivider1(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+
+//Function to create plot on complex plane
+function complexPlot(x1,y1,x2,y2,x3,y3,x4,y4,z)
+ xpts1 = [0 x1];
+ ypts1 = [0 y1];
+
+ xpts2 = [0 x2];
+ ypts2 = [0 y2];
+
+ xpts3 = [0 x3];
+ ypts3 = [0 y3];
+
+ xpts4 = [0 x4];
+ ypts4 = [0 y4];
+ scf(1);
+ clf(1);
+ set(gca(),"auto_clear","off")
+ plot(xpts1,ypts1,'ro-')
+ plot(xpts2,ypts2,'ro-')
+ plot(xpts3,ypts3,'ro-')
+ plot(xpts4,ypts4,'ro-')
+ set(gca(),"auto_clear","on")
+ a = gca();
+ a.x_location="origin";
+ a.y_location="origin";
+ set(gca(),"data_bounds",matrix([-0.1,0.25,-0.2,0.2],2,-1))
+ xtitle(z);
+ xlabel("Real");
+ ylabel("Imaginary");
+endfunction
+
+//Variable Declaration
+r = 5
+g = 1/r
+xl = 8
+d = 0
+bl = 1/xl
+dl = -90
+xc = 20
+bc = 1/xc
+dc = 90
+zr= 5
+zro = 0
+zl = 8
+zlo = 90
+zc = 20
+zco = -90
+//Calculation
+[a,b]=polar2rect(g,d)
+[c,d]=polar2rect(bl,dl)
+[cc,dd]=polar2rect(bc,dc)
+[e,f]=addition(a,c,cc,b,d,dd)
+[i,j]=rect2polar(e,f)
+m= (1/i)
+n= (-j)
+[o,p]=voltdivider(zr,zl,zc,zro,zlo,zco)
+[mm,nn]=voltdivider1(zr,zl,zro,zlo)
+[ma,na]=voltdivider1(zl,zc,zlo,zco)
+[mb,nb]=voltdivider1(zr,zc,zro,zco)
+[q,r]=polar2rect(mm,nn)
+[s,t]=polar2rect(ma,na)
+[sa,ta]=polar2rect(mb,nb)
+[oo,pp]=addition(q,s,sa,r,t,ta)
+[qq,rr]=rect2polar(oo,pp)
+[ss,tt]=division(o,qq,p,rr)
+
+//Plot
+complexPlot(a,b,c,d,cc,dd,e,f,"Admittance Diagram")
+
+
+//Results
+printf("a. Yr = %.1f S + j%d \n",a,b)
+printf(" Yl = %d %.3fj s \n",c,d)
+printf(" Yc = %d + j%.3f S \n",cc,dd)
+printf("b. Yt = %.2f S < %.3f degree \n",i,j)
+printf("c. Zt = %.2f ohm < %.2f degree \n",m,n)
+printf(" Zt = %.2f ohm < %.2f degree \n",ss,tt)
diff --git a/3883/CH15/EX15.14/EX15_14.sce b/3883/CH15/EX15.14/EX15_14.sce new file mode 100644 index 000000000..afd6f9b2d --- /dev/null +++ b/3883/CH15/EX15.14/EX15_14.sce @@ -0,0 +1,23 @@ +//Chapter 15, Example 15.14
+clc
+//real and imaginary part
+function[r,i]=realnimaginary(x,y)
+ r= x/((x*x)+(y*y))
+ i= y/((x*x)+(y*y))
+endfunction
+
+
+//Variable Declaration
+r = 6 //real part of Z
+xc = 8 //imaginary part of Z
+r1 = 10 //real part of Z
+xl = 4 //imaginary part of Z
+xc1 = -0.1 //imaginary part of Z
+
+//Calculation
+[a,b]=realnimaginary(r,xc) //function
+xo = xl+xc1 //imaginary part of Z
+[c,d]=realnimaginary(r1,xo) //function
+//Results
+printf("a. Y = %.2f S + j%.2f S \n",a,b)
+printf("b. Y = %.3f S - j%.3f S ",c,d)
diff --git a/3883/CH15/EX15.15/EX15_15.sce b/3883/CH15/EX15.15/EX15_15.sce new file mode 100644 index 000000000..471bfe996 --- /dev/null +++ b/3883/CH15/EX15.15/EX15_15.sce @@ -0,0 +1,50 @@ +//Chapter 15, Example 15.15
+clc
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+zl = 4 //real value of Zl
+zlo = 90 //angle in degree
+it = 20 //real value of It
+ito = 0 //angle in degree
+zr = 3 //real value of Zr
+zro = 0 //angle in degree
+
+//Calculation
+[a,b]=voltdivider(zl,it,zlo,ito) //function of multiplication
+[c,d]=polar2rect(zr,zro) //function of conversion
+[e,f]=polar2rect(zl,zlo) //function of conversion
+[i,j]=addition(c,d,e,f) //function of addition
+[o,p]=rect2polar(i,j) //function of conversion
+[m,n]=division(a,o,b,p) //function of division
+[aa,bb]=voltdivider(zr,it,zro,ito) //function of multiplication
+[mm,nn]=division(aa,o,bb,p) //function of division
+//Results
+printf("Ir = %d A < %.2f degree \n",m,n)
+printf("It = %d A < %.2f degree \n",mm,nn)
diff --git a/3883/CH15/EX15.16/EX15_16.sce b/3883/CH15/EX15.16/EX15_16.sce new file mode 100644 index 000000000..86f9bc55f --- /dev/null +++ b/3883/CH15/EX15.16/EX15_16.sce @@ -0,0 +1,40 @@ +//Chapter 15, Example 15.16
+clc
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+//Variable Declaration
+zc= 2 //real value of Zc
+zco = -90 //angle in degree
+it = 5 //real value of It
+itt = 30 //angle in degree
+zr = 1 //real part of Zrl
+zl = 8 //imaginary part of Zl
+xx = zl-zc //imaginary part of Zcrl
+//Calculation
+[a,b]=voltdivider(zc,it,zco,itt) //function of multiplication
+[c,d]=rect2polar(zr,xx) //function of conversion
+[e,f]=division(a,c,b,d) //function of division
+[m,n]=rect2polar(zr,zl) //function of conversion
+[i,j]=voltdivider(m,it,n,itt) //function of multiplication
+[s,t]=division(i,c,j,d) //function of division
+//Results
+printf("Irl = %.3f A < %.2f degree \n",e,f)
+printf("Ic = %.3f A < %.2f degree",s,t)
diff --git a/3883/CH15/EX15.17/EX15_17.sce b/3883/CH15/EX15.17/EX15_17.sce new file mode 100644 index 000000000..607d29b35 --- /dev/null +++ b/3883/CH15/EX15.17/EX15_17.sce @@ -0,0 +1,16 @@ +//Chapter 15, Example 15.17
+clc
+//Variable Declaration
+rp = 8*10^3 //R in kiloohms
+xl = 9*10^3 //Xl in kiloohms
+xc = 4*10^3 //Xc in kiloohms
+
+
+//Calculation
+xp = xl-xc //in kiloohms
+rs = (rp*(xp*xp))/((xp*xp)+(rp*rp)) //in kiloohms
+xs = ((rp*rp)*xp)/((xp*xp)+(rp*rp)) //in kiloohms
+
+//Results
+printf("Rs = %.3f kohm \n",rs/10^3)
+printf("Xs = %.3f kohm ",xs/10^3)
diff --git a/3883/CH15/EX15.18/EX15_18.sce b/3883/CH15/EX15.18/EX15_18.sce new file mode 100644 index 000000000..f4c5b850a --- /dev/null +++ b/3883/CH15/EX15.18/EX15_18.sce @@ -0,0 +1,95 @@ +//Chapter 15, Example 15.18
+clc
+funcprot(0)
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+function[c1,c2]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+ endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+function[c1,c2]=addition1(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//Variable Declaration
+r1 = 10 //resistance1 in ohms
+r2 = 40 //resistance2 in ohms
+l1 = 6*10^-3 //inductance1 in millihenry
+l2 = 12*10^-3 //inductance2 in millihenry
+c1 = 80*10^-6 //capacitance1 in microfarad
+c2 = 20*10^-6 //capacitance1 in microfarad
+w = 1000 //in rad/s
+ia= 12 //current source in ampere
+iao = 0 //angle in degree
+//Calculation
+rt = (r1*r2)/(r1+r2) //total resistance in ohms
+lt = (l1*l2)/(l1+l2) //total inductance in millihenry
+ct = c1+c2 //total capacitance in microfarad
+xl = w*lt //reactance in ohms
+xlo = 90 //angle in degree
+xc = 1/(w*ct) //reactance in ohms
+g = 1/rt //real value of Yr
+go = 0 //angle in degree
+bl = 1/xl //real value of Bl
+blo = -90 //angle in degree
+bc = 1/xc //real value of Bc
+bco = 90 //angle in degree
+[a,b]=polar2rect(g,go) //function of conversion
+[c,d]=polar2rect(bl,blo) //function of conversion
+[e,f]=polar2rect(bc,bco) //function of conversion
+[i,j]=addition(a,c,e,b,d,f) //function of addition
+[m,n]=rect2polar(i,j) //function of conversion
+[mm,nn]=division(ia,m,iao,n) //function of division
+[o,p]=division(mm,xl,nn,xlo) //function of division
+fp = (g/m) //lagging
+po = mm*ia*cosd(nn) //power in watt
+zt1 = 1/m //real vlue in ohms of Zt
+zt2 = -n //angle in degree
+[vv,ww]=polar2rect(zt1,zt2) //function of conversion
+l=vv/w //inductance in millihenry
+[ss,tt]=voltdivider(ia,zt1,iao,zt2) //function of multiplication
+ppo= (ia*ia)*vv //power in watt
+rp = ((vv*vv)+(ww*ww))/vv //resistance in ohms
+xp = ((vv*vv)+(ww*ww))/ww //resistance in ohms
+g1=1/rp //real value in ohms of Yt
+g1o=0 //angle in degree
+bl1=1/xp //real value
+bl1o=-90 //angle in degree
+[za,zb]=polar2rect(g1,go) //function of conversion
+[zc,zd]=polar2rect(bl1,bl1o) //function of conversion
+[ze,zf]=addition1(za,zc,zb,zd) //function of addition
+[zx,zy]=rect2polar(ze,zf) //function of conversion
+//Results
+printf("Yt = %.3f S < %.3f degree \n",m,n)
+printf("E = %.3f V < %.3f degree \n",mm,nn)
+printf("IL = %.3f A < %.3f degree \n",o,p)
+printf("Fp = %.3f lagging \n",fp)
+printf("P = %.2f W \n",po)
+printf("Zt = %.3f ohm + j%.3f ohm \n",vv,ww)
+printf("L = %.3f mH \n",l*10^3)
+printf("E = %.3f V < %.3f degree \n",ss,tt)
+printf("P = %.2f W \n",ppo)
+printf("Rp = %d ohm \n",rp)
+printf("Xp = %.3f ohm \n",xp)
+printf("Yt = %.3f S < %.3f degree \n",zx,zy)
diff --git a/3883/CH15/EX15.2/EX15_2.sce b/3883/CH15/EX15.2/EX15_2.sce new file mode 100644 index 000000000..7754ef61a --- /dev/null +++ b/3883/CH15/EX15.2/EX15_2.sce @@ -0,0 +1,34 @@ +//Chapter 15, Example 15.2
+clc
+//time to phasor
+function[m,n]=time2phasor(x,y)
+ m=0.707*x
+ n=y
+endfunction
+
+
+//phasor to time domain
+function[m,n]=phasor2time(x,y)
+ m=sqrt(2)*x
+ n=y
+endfunction
+//Variable Declaration
+x=4 //amplitude
+y=30 //in degrees
+r=2 //in ohms
+
+//Calculation
+[a,b]=time2phasor(x,y)
+c= a*r
+[d,e]=phasor2time(c,y)
+
+//graph
+x1 = -5 : 1 : 20 //time in seocnds
+v = d*sind((377*x1)+e) //voltage
+ip = x*sind((377*x1)+e) //current in ampere
+plot(x1, v)
+plot(x1, ip)
+xlabel("t")
+ylabel("i V")
+//Results
+printf("v = %.1f sin(wt + %d degree)", d,e)
diff --git a/3883/CH15/EX15.3/EX15_3.sce b/3883/CH15/EX15.3/EX15_3.sce new file mode 100644 index 000000000..5b4b07d77 --- /dev/null +++ b/3883/CH15/EX15.3/EX15_3.sce @@ -0,0 +1,38 @@ +//Chapter 15, Example 15.3
+clc
+//time to phasor
+function[m,n]=time2phasor(x,y)
+ m=0.707*x
+ n=y
+endfunction
+
+
+//phasor to time domain
+function[m,n]=phasor2time(x,y)
+ m=sqrt(2)*x
+ n=y
+endfunction
+//Variable Declaration
+x=24 //amplitude
+y=0 //in degrees
+r=3 //in ohms
+d=90 //in degrees
+//Calculation
+[a,b]=time2phasor(x,y)
+c= a/r
+i=d
+[f,e]=phasor2time(c,i)
+
+//graph
+x1 = 0 : 10 : 500 //time in seocnds
+v = x*sind(x1) //voltage
+ip = f*sind((x1)-d) //current in ampere
+plot(x1, v)
+plot(x1, ip)
+xlabel("t")
+ylabel("i V")
+xtitle("Waveforms for Example 15.3")
+
+
+//Results
+printf("i = %.1f sin(wt - %d degree)", f,e)
diff --git a/3883/CH15/EX15.4/EX15_4.sce b/3883/CH15/EX15.4/EX15_4.sce new file mode 100644 index 000000000..b09975fc9 --- /dev/null +++ b/3883/CH15/EX15.4/EX15_4.sce @@ -0,0 +1,36 @@ +//Chapter 15, Example 15.4
+clc
+//time to phasor
+function[m,n]=time2phasor(x,y)
+ m=0.707*x
+ n=y
+endfunction
+
+
+//phasor to time domain
+function[m,n]=phasor2time(x,y)
+ m=sqrt(2)*x
+ n=y
+endfunction
+//Variable Declaration
+x=5 //amplitude
+y=30 //in degrees
+r=4 //in ohms
+d=90 //in degrees
+//Calculation
+[a,b]=time2phasor(x,y)
+c= a*r
+i=b+d
+[f,e]=phasor2time(c,i)
+
+//graph
+x1 = 0 : 1 : 500 //time in seocnds
+v = f*sind((x1)+(d+y)) //voltage
+ip = x*sind((x1)+y) //current in ampere
+plot(x1, v)
+plot(x1, ip)
+xlabel("t")
+ylabel("i V")
+
+//Results
+printf("i = %d sin(wt + %d degree)", f,e)
diff --git a/3883/CH15/EX15.5/EX15_5.sce b/3883/CH15/EX15.5/EX15_5.sce new file mode 100644 index 000000000..92eb13491 --- /dev/null +++ b/3883/CH15/EX15.5/EX15_5.sce @@ -0,0 +1,36 @@ +//Chapter 15, Example 15.5
+clc
+//time to phasor
+function[m,n]=time2phasor(x,y)
+ m=0.707*x
+ n=y
+endfunction
+
+
+//phasor to time domain
+function[m,n]=phasor2time(x,y)
+ m=sqrt(2)*x
+ n=y
+endfunction
+//Variable Declaration
+x=15 //amplitude
+y=0 //in degrees
+r=2 //in ohms
+d=-90 //in degrees
+//Calculation
+[a,b]=time2phasor(x,y)
+c= a/r
+i=b-d
+[f,e]=phasor2time(c,i)
+
+//graph
+x1 = 0 : 1 : 500 //time in seocnds
+v = x*sind(x1) //voltage
+ip = f*sind(x1-d) //current in ampere
+plot(x1, v)
+plot(x1, ip)
+xlabel("t")
+ylabel("i V")
+
+//Results
+printf("i = %.1f sin(wt + %d degree)", f,e)
diff --git a/3883/CH15/EX15.6/EX15_6.sce b/3883/CH15/EX15.6/EX15_6.sce new file mode 100644 index 000000000..fce00c29c --- /dev/null +++ b/3883/CH15/EX15.6/EX15_6.sce @@ -0,0 +1,39 @@ +//Chapter 15, Example 15.6
+clc
+//time to phasor
+function[m,n]=time2phasor(x,y)
+ m=0.707*x
+ n=y
+endfunction
+
+
+//phasor to time domain
+function[m,n]=phasor2time(x,y)
+ m=sqrt(2)*x
+ n=y
+endfunction
+//Variable Declaration
+x=6 //amplitude
+y=-60 //in degrees
+r=0.5 //in ohms
+d=-90 //in degrees
+
+//Calculation
+[a,b]=time2phasor(x,y)
+c= a*r
+i=b+d
+[f,e]=phasor2time(c,i)
+
+
+//graph
+x1 = 0 : 1 : 500 //time in seocnds
+v = f*sind((x1)+(d+y)) //voltage
+ip = x*sind((x1)+ y) //current in ampere
+plot(x1, v)
+plot(x1, ip)
+xlabel("t")
+ylabel("i V")
+
+
+//Results
+printf("v = %.1f sin(wt%d degree)", f,e)
diff --git a/3883/CH15/EX15.7/EX15_7.sce b/3883/CH15/EX15.7/EX15_7.sce new file mode 100644 index 000000000..189afa3fb --- /dev/null +++ b/3883/CH15/EX15.7/EX15_7.sce @@ -0,0 +1,31 @@ +//Chapter 15, Example 15.7
+clc
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//addition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+//Variable Declaration
+r = 4 //resistance in ohms
+ro = 0 //angle in degree
+xl = 8 //inductive reactance in ohms
+xlo = 90 //angle in degree
+//Calculation
+[a,b]=polar2rect(r,ro) //Z1
+[c,d]=polar2rect(xl,xlo) //Z2
+[e,f]=addition(a,c,b,d) //Z1+Z2
+[g,h]=rect2polar(e,f) //ZT
+
+//Results
+printf("ZT = %.3f ohm < %.2f degree",g,h)
diff --git a/3883/CH15/EX15.8/EX15_8.sce b/3883/CH15/EX15.8/EX15_8.sce new file mode 100644 index 000000000..a30f410af --- /dev/null +++ b/3883/CH15/EX15.8/EX15_8.sce @@ -0,0 +1,36 @@ +//Chapter 15, Example 15.8
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//addition
+function[c1,c2]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+ endfunction
+
+//Variable Declaration
+r=6 //resistance in ohms
+ro = 0 //angle in degree
+xl = 10 //in ohms
+xlo = 90 //angle in degree
+xc = 12 //in ohms
+xco = -90 //angle in degree
+//Calculation
+[a,b]=polar2rect(r,ro) //Z1
+[c,d]=polar2rect(xl,xlo) //Z2
+[e,f]=polar2rect(xc,xco) //Z3
+[g,h]=addition(a,c,e,b,d,f) //Z1+Z2+Z3
+[i,j]=rect2polar(g,h) //ZT
+//Results
+printf("ZT = %.3f ohm < %.2f degree",i,j)
diff --git a/3883/CH15/EX15.9/EX15_9.sce b/3883/CH15/EX15.9/EX15_9.sce new file mode 100644 index 000000000..e6f01cfd1 --- /dev/null +++ b/3883/CH15/EX15.9/EX15_9.sce @@ -0,0 +1,54 @@ +//Chapter 15, Example 15.9
+clc
+funcprot(0)
+
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1-y2
+endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+endfunction
+
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+ //division
+ function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+//Variable Declaration
+x1=4 //real value
+x2=100 //real value
+y1=-90 //angle in degree
+y2=0 //angle in degree
+r=3 //real value
+x3=3 //real value
+x4=100 //real value
+y3=0 //angle in degree
+y4=0 //angle in degree
+//Calculation
+[a,b]=voltdivider(x1,x2,y1,y2) //function of multipliation
+[c,d]=polar2rect(x1,y1) //function of conversion
+[e,f]=polar2rect(r,y2) //function of conversion
+[i,j]=addition(e,f,c,d) //function of addition
+[o,p]=rect2polar(i,j) //function of conversion
+[m,n]=division(a,o,b,p) //function of division
+[aa,ba]=voltdivider(x3,x4,y3,y4) //function of multipliation
+[ma,na]=division(aa,o,ba,p) //function of division
+
+//Results
+printf("Vc = %d V < %.2f degree \n",m,n)
+printf("Vr = %d V < %.2f degree",ma,na)
diff --git a/3883/CH16/EX16.1/EX16_1.sce b/3883/CH16/EX16.1/EX16_1.sce new file mode 100644 index 000000000..19173aeb9 --- /dev/null +++ b/3883/CH16/EX16.1/EX16_1.sce @@ -0,0 +1,62 @@ +//Chapter 16, Example 16.1
+clc
+
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+ //addition
+ function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//Variable Declaration
+z1 = 1 //real value of impedance1
+z1o = 0 //angle in degree
+xc = 2 //real value of Xc
+xco = -90 //angle in degree
+xl = 3 //real value of Xl
+xlo = 90 //angle in degree
+ev = 120 //real value of E
+eo = 0 //angle in degree
+
+
+//Calculation
+[a,b]=voltdivider(xc,xl,xco,xlo) //function of multiplication
+x= -xc+xl //real value
+xo= 90 //angle in degree
+[c,d]=division(a,x,b,xo) //function of division
+[aa,bb]=polar2rect(z1,z1o) //function of conversion
+[cc,dd]=polar2rect(c,d) //function of conversion
+[e,f]=addition(aa,cc,bb,dd) //function of addition
+[ee,ff]=rect2polar(e,f) //function of conversion
+[m,n]=division(ev,ee,eo,ff) //function of division
+[v,w]=voltdivider(m,z1,n,z1o) //function of multiplication
+[vv,ww]=voltdivider(m,c,n,d) //function of multiplication
+[q,r]=division(vv,xc,ww,xco) //function of division
+pdel = (m*m)*z1 //power in watt
+fp = cosd(n) //lagging
+//Results
+printf("a. Zt = %.2f ohm < %.2f degree \n",ee,ff)
+printf("b. Is = %.2f A < %.2f degree \n",m,n)
+printf("c. Vr = %.2f V < %.2f degree \n",v,w)
+printf(" Vc = %.2f V < %.2f degree \n",vv,ww)
+printf("d. Ic = %.2f A < %.2f degree \n",q,r)
+printf("e. Pdel = %.2f W \n",pdel)
+printf("f. Fp = %.3f leading \n",fp)
diff --git a/3883/CH16/EX16.2/EX16_2.sce b/3883/CH16/EX16.2/EX16_2.sce new file mode 100644 index 000000000..0bdb67d57 --- /dev/null +++ b/3883/CH16/EX16.2/EX16_2.sce @@ -0,0 +1,55 @@ +//Chapter 16, Example 16.2
+clc
+//multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=-90
+ else
+ th=atand(y/x)
+ end
+endfunction
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//addition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+endfunction
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+//Variable Declaration
+x=complex(3,4) //complex form of Z1
+y=complex(0,-8) //complex form of Z2
+i = 50 //real value of current in ampere
+io = 30 //angle in degree
+//Calculation
+
+[a,b]=rect2polar(real(x),imag(x)) //function of conversion
+[c,d]=rect2polar(real(y),imag(y)) //function of conversion
+[aa,bb]=voltdivider(c,i,d,io) //function og multiplication
+[cc,dd]=addition(real(y),real(x),imag(y),imag(x))
+[e,f]=rect2polar(cc,dd) //function of conversion
+[ee,ff]=division(aa,e,bb,f) //function of division
+[ac,bc]=voltdivider(a,i,b,io) //function og multiplication
+[ea,fa]=division(ac,e,bc,f) //function of division
+[m,n]=polar2rect(ee,ff) //function of conversion
+[mm,nn]=polar2rect(ea,fa) //function of conversion
+[ma,na]=addition(m,mm,n,nn) //function of addition
+[mb,nb]=rect2polar(ma,na) //function of conversion
+//Results
+printf("a. I1 = %d A < %.2f degree \n",ee,ff)
+printf("b. I2 = %d A < %.2f degree \n",ea,fa)
+printf("c. %d A < %d degree = %d A < %d degree (checks) ",mb,nb,mb,nb)
diff --git a/3883/CH16/EX16.3/EX16_3.sce b/3883/CH16/EX16.3/EX16_3.sce new file mode 100644 index 000000000..5a2ec90bb --- /dev/null +++ b/3883/CH16/EX16.3/EX16_3.sce @@ -0,0 +1,69 @@ +//Chapter 16, Example 16.3
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=-90
+ else
+ th=atand(y/x)
+ end
+endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar1(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//addition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+z1=complex(5,0) //complex form of Z1
+z2= complex(0,-12) //complex form of Z2
+z3 = complex(0,8) //complex form of Z3
+e1 = 20 //real part of voltage
+e1o = 20 //angle in degree
+
+//Calculation
+[a,b]=rect2polar(real(z2),imag(z2)) //function of conversion
+[aa,bb]=voltdivider(a,e1,b,e1o) //function of multiplication
+[c,d]=addition(real(z1),real(z2),imag(z1),imag(z2)) //function of addition
+[cc,dd]=rect2polar(c,d) //function of conversion
+[e,f]=division(aa,cc,bb,dd) //function of division
+[ee,ff]=rect2polar1(real(z3),imag(z3)) //function of conversion
+[g,h]=division(e1,ee,e1o,ff) //function of division
+[gg,hh]=division(e1,cc,e1o,dd) //function of division
+[o,p]=polar2rect(g,h) //function of conversion
+[oo,pp]=polar2rect(gg,hh) //function of conversion
+[m,n]=addition(o,oo,p,pp) //function of addition
+[mm,nn]=rect2polar(m,n) //function of conversion
+//Results
+printf("a. Vc = %.2f V < %.2f degree \n",e,f)
+printf("b. I1 = %.1f A < %.2f degree \n",g,h)
+printf(" I2 = %.2f A < %.2f degree \n",gg,hh)
+printf(" Is = %.2f A < %.2f degree \n",mm,nn)
diff --git a/3883/CH16/EX16.4/EX16_4.sce b/3883/CH16/EX16.4/EX16_4.sce new file mode 100644 index 000000000..404acec9b --- /dev/null +++ b/3883/CH16/EX16.4/EX16_4.sce @@ -0,0 +1,70 @@ +//Chapter 16, Example 16.4
+clc
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+//subtraction
+function[c1,c2]=subtraction(x1,x2,y1,y2)
+ c1 = x1-x2
+ c2 = y1-y2
+ endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+x=complex(3,4) //complex form of Z1
+y=complex(8,-6) //complex form of Z2
+ea = 100 //source in volts
+eo = 0 //angle in degree
+xo = 90
+//Calculation
+[a,b]=rect2polar(real(x),imag(x)) //function of conversion
+[c,d]=rect2polar(real(y),imag(y)) //function of conversion
+[e,f]=voltdivider(a,c,b,d) //function of conversion
+[g,h]=addition(real(x),real(y),imag(x),imag(y))
+[gg,hh]=rect2polar(g,h) //function of conversion
+[i,j]=division(e,gg,f,hh) //function of division
+[k,l]=division(ea,i,eo,j) //function of division
+[m,n]=division(ea,a,eo,b) //function of division
+[mm,nn]=division(ea,c,eo,d) //function of division
+[o,p]=voltdivider(m,real(x),n,eo) //function of multiplication
+[oo,pp]=voltdivider(mm,real(y),nn,eo) //function of multiplication
+[q,r]=voltdivider(real(x),ea,eo,eo) //function of multiplication
+[s,t]=polar2rect(real(x),eo) //function of conversion
+[ss,tt]=polar2rect(imag(x),xo) //function of conversion
+[sa,ta]=addition(s,ss,t,tt) //function of addition
+[sb,tb]=rect2polar(sa,ta)
+[qa,ra]=division(q,sb,r,tb) //function of division
+[v,w]=polar2rect(oo,pp) //function of conversion
+[vv,ww]=polar2rect(o,p) //function of conversion
+[va,wa]=subtraction(v,vv,w,ww) //function of subtraction
+[vb,wb]=rect2polar(va,wa) //function of conversion
+//Results
+printf("Zt = %.3f ohm < %.2f degree \n",i,j)
+printf("Is = %.2f A < %.2f degree \n",k,l)
+printf("I1 = %d A < %.2f degree \n",m,n)
+printf("I2 = %d A < %.2f degree \n",mm,nn)
+printf("Vr1 = %d V < %.2f degree \n",o,p)
+printf("Vr2 = %d V < %.2f degree \n",oo,pp)
+printf("Vr1 = %d V < %.2f degree \n",qa,ra)
+printf("Vab = %d V < %.2f degree \n",vb,wb)
diff --git a/3883/CH16/EX16.5/EX16_5.sce b/3883/CH16/EX16.5/EX16_5.sce new file mode 100644 index 000000000..9918cf369 --- /dev/null +++ b/3883/CH16/EX16.5/EX16_5.sce @@ -0,0 +1,49 @@ +//Chapter 16, Example 16.5
+clc
+
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+ra = 50*10^3 //real value of Ra
+rao = 0 //angle in degree
+rb = 3.3*10^3 //real value of Rb
+rbo = 0 //angle in degree
+x=complex(1*10^3,-159.16) //complex form of Z2
+ia = 4*10^-3 //real value of current in milliampere
+iao = 0 //angle in degree
+y=complex(1*10^3,-0.796) //complex form of Z2
+
+//Calculation
+z1 = (ra*rb)/(ra+rb) //Z1 in kilo ohms
+[a,b]=voltdivider(z1,ia,rao,iao) //function of mltiplicaion
+[c,d]=addition(z1,real(x),rao,imag(x))
+[g,h]=rect2polar(c,d) //function of conversion
+[j,k]=division(a,g,b,h) //function of division
+[m,n]=voltdivider(j,real(x),k,rao) //function of mltiplicaion
+[cc,dd]=addition(z1,real(y),rao,imag(y))
+[gg,hh]=rect2polar(cc,dd)
+[jj,kk]=division(a,gg,b,hh) //function of division
+[mm,nn]=voltdivider(jj,real(y),kk,rao) //function of mltiplicaion
+
+
+//Results
+printf("a. VL = %.3f V < %.3f degree \n",m,n)
+printf("b. VL = %.3f V < %.3f degree \n",mm,nn)
diff --git a/3883/CH16/EX16.6/EX16_6.sce b/3883/CH16/EX16.6/EX16_6.sce new file mode 100644 index 000000000..9872f980c --- /dev/null +++ b/3883/CH16/EX16.6/EX16_6.sce @@ -0,0 +1,43 @@ +//Chapter 16, Example 16.6
+clc
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+ //Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+//Variable Declaration
+it = 2.626*10^-3 //real value of current in milliampere
+ito = 51.02 //angle in degree
+z1 = 1.545*10^3 //real value of Z1
+z1o = 0 //angle in degree
+x=complex(10*10^3,-20*10^3) //complex form of Z2
+
+//Calculation
+[a,b]=voltdivider(z1,it,z1o,ito) //function of multiplication
+[c,d]=addition(z1,real(x),z1o,imag(x)) //function of addition
+[e,f]=rect2polar(c,d) //function of conversion
+[m,n]=division(a,e,b,f) //function of division
+[o,p]=rect2polar(real(x),imag(x)) //function of conversion
+[mm,nn]=voltdivider(m,o,n,p) //function of multiplication
+
+
+
+//Results
+printf("a. I = %.3f mA < %.3f degree \n",m*10^3,n)
+printf("b. V = %.3f V < %.3f degree \n",mm,nn)
diff --git a/3883/CH16/EX16.7/EX16_7.sce b/3883/CH16/EX16.7/EX16_7.sce new file mode 100644 index 000000000..078f15649 --- /dev/null +++ b/3883/CH16/EX16.7/EX16_7.sce @@ -0,0 +1,67 @@ +//Chapter 16, Example 16.7
+clc
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+function[c1,c2]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+
+//Variable Declaration
+z1 = 10 //real value of Z1
+z1o = 0 //angle in degree
+z2 = complex(3,4) //complex form of Z2
+z3 = complex(8,-6) //complex form of Z3
+ea = 200 //source voltage in volts
+eo = 0 //angle in degree
+//Calculation
+[a,b]=rect2polar(real(z2),imag(z2)) //function of conversion
+[c,d]=rect2polar(real(z3),imag(z3)) //function of conversion
+y1=1/z1 //admittance1
+y1o = 0 //angle in degree
+y2 = 1/a //admittance2
+ya2 = -b //angle in degree
+y3 = 1/c //admittance3
+ya3 = -d //angle in degree
+[e,f]=polar2rect(y2,ya2) //function of conversion
+[g,h]=polar2rect(y3,ya3) //function of conversion
+[m,n]=addition(y1,e,g,y1o,f,h) //function of addition
+[o,p]=rect2polar(m,n) //function of conversion
+[s,t]=voltdivider(ea,o,eo,p) //function of multiplication
+[sa,ta]=division(ea,z1,eo,z1o) //function of division
+[sb,tb]=division(ea,a,eo,b) //function of division
+[sc,tc]=division(ea,c,eo,d) //function of division
+zt1 = 1/o //real value of Zt
+zt2 = -p //angle in degree
+[v,w]=polar2rect(s,t) //function of conversion
+[va,wa]=polar2rect(sa,ta) //function of conversion
+[vb,wb]=polar2rect(sb,tb) //function of conversion
+[vc,wc]=polar2rect(sc,tc) //function of conversion
+[vv,ww]=addition(va,vb,vc,wa,wb,wc) //function of addition
+//Results
+printf("a. I = %.1f A < %.3f degree \n",s,t)
+printf("b. I1 = %d A < %d degree \n",sa,ta)
+printf(" I2 = %d A < %.2f degree \n",sb,tb)
+printf(" I3 = %d A < %.2f degree \n",sc,tc)
+printf("c. %d %dj = %d %dj (checks)\n",v,w,vv,ww)
+printf("d. Zt = %.3f ohm < %.3f degree \n",zt1,zt2)
diff --git a/3883/CH16/EX16.8/EX16_8.sce b/3883/CH16/EX16.8/EX16_8.sce new file mode 100644 index 000000000..f34f69762 --- /dev/null +++ b/3883/CH16/EX16.8/EX16_8.sce @@ -0,0 +1,69 @@ +//Chapter 16, Example 16.8
+clc
+funcprot(0)
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+endfunction
+
+function[c1,c2]=subtraction(x1,x2,y1,y2)
+ c1 = x1-x2
+ c2 = y1-y2
+ endfunction
+//Variable Declaration
+z1 = 4 //real value of Z1
+z1o = 0 //angle in degree
+z2=complex(9,-7) //complex form of Z2
+z3=complex(8,6) //complex form of Z3
+ev = 100 //source voltage in volts
+eo = 0 //angle in degree
+
+//Calculation
+[a,b]=rect2polar(real(z2),imag(z2)) //function of conversion
+[c,d]=rect2polar(real(z3),imag(z3)) //function of conversion
+[e,f]=voltdivider(a,c,b,d) //function of multiplication
+[ee,ff]=addition(real(z2),real(z3),imag(z2),imag(z3))
+[m,n]=rect2polar(ee,ff) //function of conversion
+[ea,fa]=division(e,m,f,n) //function of division
+[eb,fb]=polar2rect(ea,fa) //function of conversion
+[g,h]=addition(z1,eb,z1o,fb) //function of addition
+[gg,hh]=rect2polar(g,h) //function of conversion
+[o,p]=division(ev,gg,eo,hh) //function of division
+fp=gg/gg
+[i,j]=voltdivider(a,o,b,p) //function of multiplication
+[q,r]=division(i,m,j,n) //function of division
+[qa,ra]=polar2rect(q,r) //function of conversion
+[qb,rb]=polar2rect(o,p) //function of conversion
+[s,t]=subtraction(qb,qa,rb,ra) //function of subtraction
+[ss,tt]=rect2polar(s,t) //function of conversion
+pt = ev*o*cosd(1.5) //power in watt
+//Results
+printf("a. Zt = %.3f ohm < %.1f degree \n",gg,hh)
+printf("b. I = %.2f A < %.1f degree \n",o,p)
+printf("c. Fp = %d \n",fp)
+printf("I2 = %.2f A < %d degree \n",q,r)
+printf("I1 = %.1f A < %.2f degree \n",ss,tt)
+printf("Pt = %.2f W \n",pt)
diff --git a/3883/CH17/EX17.1/EX17_1.sce b/3883/CH17/EX17.1/EX17_1.sce new file mode 100644 index 000000000..0394583ab --- /dev/null +++ b/3883/CH17/EX17.1/EX17_1.sce @@ -0,0 +1,19 @@ +//Chapter 17, Example 17.1
+clc
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+ea = 100 //source voltage in volts
+eo = 0 //angle in degree
+za = 5 //real value of Z
+zo = 53.13 //angle in degree
+//Calculation
+[a,b]=division(ea,za,eo,zo) //function of division
+
+
+
+//Results
+printf("I = %d A < %.2f degree \n",a,b)
diff --git a/3883/CH17/EX17.12/EX17_12.sce b/3883/CH17/EX17.12/EX17_12.sce new file mode 100644 index 000000000..a29b86b08 --- /dev/null +++ b/3883/CH17/EX17.12/EX17_12.sce @@ -0,0 +1,70 @@ +//Chapter 17, Example 17.12
+clc
+funcprot(0)
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//addition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ if (x<0) & (y<0) then
+ th=th-180
+ end
+ end
+endfunction
+
+function[c1,c2]=subtraction(x1,x2,y1,y2)
+ c1 = x1-x2
+ c2 = y1-y2
+ endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+z1 = 24 //real part in milliampere
+z1o = 0 //angle in degree
+z2 = -0.539 //real part in milliampere
+z2o = 21.80 //angle in degree
+z3 = 0.5 //real part in milliampere
+z3o = 0 //angle in degree
+z4 = 4 //real part in milliampere
+z4o = 0 //angle in degree
+z5 = 2.5 //real part in milliampere
+z5o= -2.29 //angle in degree
+
+//Calculation
+[a,b]=voltdivider(z1,z2,z1o,z2o) //z1*z2 function of multiplication
+[aa,bb]=voltdivider(z3,z4,z3o,z4o) //z3*z4 function of multiplication
+[ac,bc]=polar2rect(a,b) //function of conversion
+[ad,bd]=polar2rect(aa,bb) //function of conversion
+[c,d]=addition(ac,ad,bc,bd) //function of addition
+[ca,da]=rect2polar(c,d) //function of conversion
+[m,n]=voltdivider(z5,z2,z5o,z2o) //function of multiplication
+[ma,na]=voltdivider(z3,z3,z3o,z3o) //function of multiplication
+[mb,nb]=polar2rect(m,n) //function of conversion
+[mc,nc]=polar2rect(ma,na) //function of conversion
+[md,nd]=addition(mb,mc,nb,nc) //function of addition
+[me,ne]=rect2polar(md,nd) //function of conversion
+[o,p]=division(ca,me,da,ne) //function of division
+//Results
+printf("V1 = %.2f V < %.2f degree ",o,p)
diff --git a/3883/CH17/EX17.16/EX17_16.sce b/3883/CH17/EX17.16/EX17_16.sce new file mode 100644 index 000000000..91990145a --- /dev/null +++ b/3883/CH17/EX17.16/EX17_16.sce @@ -0,0 +1,78 @@ +//Chapter 17, Example 17.16
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=-90
+ else
+ th=atand(y/x)
+ end
+endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar1(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//addition
+function[c1,c2]=addition1(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//addition
+function[c1,c2]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+ endfunction
+//Variable Declaration
+z1 = complex(1/4,0)
+z2 = complex(0,1/5)
+z3 = complex(0,1/-2)
+i1 = 6
+i1o = 0
+i2 = 4
+i2o = 0
+
+//Calculation
+[a,b]=addition1(real(z3),real(z2),imag(z3),imag(z2)) //y3+y2
+[aa,bb]=rect2polar(a,b)
+[ac,bc]=voltdivider(-aa,i1,-bb,i1o) //(y3+y2)/i1
+[c,d]=rect2polar(real(z2),imag(z2))
+[cc,dd]=voltdivider(i2,c,i2o,d) //i2y2
+[w,v]=polar2rect(ac,bc)
+[ww,vv]=polar2rect(cc,dd)
+[wa,va]=addition1(w,ww,v,vv)
+[wb,vb]=rect2polar(wa,va)
+[ca,da]=rect2polar(real(z1),imag(z1))
+[cb,db]=rect2polar1(real(z3),imag(z3))
+[e,f]=voltdivider(ca,cb,da,db)
+[ee,ff]=polar2rect(e,f)
+[g,h]=voltdivider(c,cb,d,db)
+[gg,hh]=polar2rect(g,h)
+[m,n]=voltdivider(ca,c,da,d)
+[mm,nn]=polar2rect(m,n)
+[o,p]=addition(ee,gg,mm,ff,hh,nn)
+[oo,pp]=rect2polar(o,p)
+[s,t]=division(wb,oo,vb,pp)
+//Results
+printf("V1 = %.2f V < %.2f degree ",s,t)
diff --git a/3883/CH17/EX17.17/EX17_17.sce b/3883/CH17/EX17.17/EX17_17.sce new file mode 100644 index 000000000..fe2d484a8 --- /dev/null +++ b/3883/CH17/EX17.17/EX17_17.sce @@ -0,0 +1,17 @@ +//Chapter 17, Example 17.17
+clc
+//Variable Declaration
+z1= complex(7,8)
+z2 = complex(4,5)
+z3 = complex(0,-10)
+z4 = complex(8,0)
+e1 = 20
+e1o = 0
+i1 = 10
+i1o = 20
+
+//Calculation
+
+
+
+//Results
diff --git a/3883/CH17/EX17.19/EX17_19.sce b/3883/CH17/EX17.19/EX17_19.sce new file mode 100644 index 000000000..14e9f55a7 --- /dev/null +++ b/3883/CH17/EX17.19/EX17_19.sce @@ -0,0 +1,10 @@ +//Chapter 17, Example 17.19
+clc
+//Variable Declaration
+
+
+//Calculation
+
+
+
+//Results
diff --git a/3883/CH17/EX17.2/EX17_2.sce b/3883/CH17/EX17.2/EX17_2.sce new file mode 100644 index 000000000..40048d8ea --- /dev/null +++ b/3883/CH17/EX17.2/EX17_2.sce @@ -0,0 +1,53 @@ +//Chapter 17, Example 17.2
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+zc = 4 //real value of Zc
+zco = -90 //angle in degree
+zl = 6 //real value of Zl
+zlo = 90 //angle in degree
+ia = 10 //real value of I
+iao = 60 //angle in degree
+
+//Calculation
+[aa,bb]=voltdivider(zc,zl,zco,zlo) //function of multiplication
+[a,b]=polar2rect(zc,zco) //function of conversion
+[c,d]=polar2rect(zl,zlo) //function of conversion
+[e,f]=addition(a,c,b,d) //function of addition
+[ee,ff]=rect2polar(e,f) //function of conversion
+[g,h]=division(aa,ee,bb,ff) //function of division
+[i,j]=voltdivider(ia,g,iao,h) //function of multiplication
+
+//Results
+printf("Z = %d V < %d degree \n",g,h)
+printf("E = %d V < %d degree \n",i,j)
diff --git a/3883/CH17/EX17.20/EX17_20.sce b/3883/CH17/EX17.20/EX17_20.sce new file mode 100644 index 000000000..16f34a6f3 --- /dev/null +++ b/3883/CH17/EX17.20/EX17_20.sce @@ -0,0 +1,74 @@ +//Chapter 17, Example 17.20
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=-90
+ else
+ th=atand(y/x)
+ end
+endfunction
+
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//addition
+function[c1,c2]=addition1(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+function[c1,c2]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+ endfunction
+//Variable Declaration
+za=complex(0,-4) //complex form of Za
+zb=complex(0,-4) //complex form of Zb
+zc=complex(3,4) //complex form of Zc
+z4 = complex(2,0) //complex form of Z4
+z5 = complex(3,0) //complex form of Z5
+
+//Calculation
+[a,b]=rect2polar(real(zb),imag(zb)) //function of conversion
+[c,d]=rect2polar(real(zc),imag(zc)) //function of conversion
+[e,f]=voltdivider(a,c,b,d) //function of multiplication
+[g,h]=addition(real(za),real(zb),real(zc),imag(za),imag(zb),imag(zc)) //function of addition
+[i,j]=rect2polar(g,h) //function of conversion
+[m,n]=division(e,i,f,j) //function of division
+[o,p]=polar2rect(m,n) //Z1 function of conversion
+[aa,bb]=rect2polar(real(za),imag(za)) //function of conversion
+[ee,ff]=voltdivider(aa,c,bb,d) //function of multiplication
+[mm,nn]=division(ee,i,ff,j) //function of division
+[oo,pp]=polar2rect(mm,nn) //Z2 function of conversion
+[ac,bc]=voltdivider(aa,a,bb,b) //function of multiplication
+[ad,bd]=division(ac,i,bc,j) //function of division
+[ae,be]=polar2rect(ad,bd) //Z3 function of conversion
+[ma,na]=addition1(o,real(z4),p,imag(z4)) //function of addition
+[mb,nb]=rect2polar(ma,na) //ZT1 function of conversion
+[s,t]=addition1(oo,real(z5),pp,imag(z5)) //function of addition
+[sa,ta]=rect2polar(s,t) //ZT2 function of conversion
+[sb,tb]=voltdivider(mb,sa,nb,ta) //function of multiplication
+[sc,tc]=addition1(ma,s,na,t) //function of addition
+[se,te]=rect2polar(sc,tc) //function of conversion
+[sd,td]=division(sb,se,tb,te) //function of division
+[sf,tf]=polar2rect(sd,td) //ZT3 function of conversion
+[si,ti]=addition1(ae,sf,be,tf) //function of addition
+[sv,tv]=rect2polar(si,ti) //function of conversion
+
+
+//Results
+printf("ZT = %.2f ohm < %.2f degree \n",sv,tv)
diff --git a/3883/CH17/EX17.21/EX17_21.sce b/3883/CH17/EX17.21/EX17_21.sce new file mode 100644 index 000000000..284a5c6dc --- /dev/null +++ b/3883/CH17/EX17.21/EX17_21.sce @@ -0,0 +1,21 @@ +//Chapter 17, Example 17.21
+clc
+//Variable Declaration
+zt = complex(1,2)
+zd = complex(3,6)
+
+//Calculation
+a= real(zd)/3
+b= imag(zd)/3
+c = a*3
+d = b*3
+e = c/2
+f = d/2
+g = (e*2)/3
+h = (f*2)/3
+//Results
+printf("Zy = %d ohm + j %d ohm \n",a,b)
+printf("Zt = %d ohm + j %d ohm \n",real(zt),imag(zt))
+printf("Zdel = %d ohm + j %d ohm \n",c,d)
+printf("Z1 = %.1f ohm + j %d ohm \n",e,f)
+printf("Zt = %d ohm + j %d ohm \n",g,h)
diff --git a/3883/CH17/EX17.3/EX17_3.sce b/3883/CH17/EX17.3/EX17_3.sce new file mode 100644 index 000000000..f51970dc4 --- /dev/null +++ b/3883/CH17/EX17.3/EX17_3.sce @@ -0,0 +1,22 @@ +//Chapter 17, Example 17.3
+clc
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+ea = 20 //source voltage in volts
+eo = 0 //angle in degree
+z1 = 5*10^3 //real value of Z
+z1o = 0 //angle in degree
+
+
+//Calculation
+[a,b]=division(ea,z1,eo,z1o) //function of division
+
+
+
+//Results
+printf("I =(%d X 10^-3 V)A < %d degree",a*10^3,b)
diff --git a/3883/CH17/EX17.4/EX17_4.sce b/3883/CH17/EX17.4/EX17_4.sce new file mode 100644 index 000000000..6e65e631a --- /dev/null +++ b/3883/CH17/EX17.4/EX17_4.sce @@ -0,0 +1,20 @@ +//Chapter 17, Example 17.4
+clc
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+//Variable Declaration
+ia= 100 //real value of I
+iao = 0 //angle in degree
+z1 = 40*10^3 //real value of Z
+z1o = 0 //angle in degree
+
+
+//Calculation
+[a,b]=voltdivider(ia,z1,iao,z1o)
+
+
+//Results
+printf("E = (%d x 10^6I)V < %d degree",a/10^6,b)
diff --git a/3883/CH17/EX17.5/EX17_5.sce b/3883/CH17/EX17.5/EX17_5.sce new file mode 100644 index 000000000..32f507c55 --- /dev/null +++ b/3883/CH17/EX17.5/EX17_5.sce @@ -0,0 +1,82 @@ +//Chapter 17, Example 17.5
+clc
+funcprot(0)
+//addition
+function[c1,c2]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+ endfunction
+//subtaction
+function[c1,c2]=subtraction(x1,x2,y1,y2)
+ c1 = x1-x2
+ c2 = y1-y2
+ endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=-90
+ else
+ th=atand(y/x)
+ if (x<0) & (y<0) then
+ th=th-180
+ end
+ end
+endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar1(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ if (x<0) & (y<0) then
+ th=th-180
+ end
+ end
+endfunction
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//Variable Declaration
+z1 = complex(0,2) //complex form of Z1
+z2 = complex(4,0) //complex form of Z2
+z3 = complex(0,-1) //complex form of Z3
+e1 = 2 //source voltage in volts
+e1o = 0 //angle in degree
+e2 = 6 //source voltage in volts
+e2o = 0 //angle in degree
+
+//Calculation
+a= ((e1-e2)*real(z2)) //real part of numerator
+b=e1*imag(z3) //imaginary part of numerator
+[c,d]=rect2polar(a,b) //function of conversion
+
+[e,f]=rect2polar1(real(z1),imag(z1)) //z1 function of conversion
+[g,h]=rect2polar(real(z2),imag(z2)) //z2 function of conversion
+[i,j]=rect2polar(real(z3),imag(z3)) //z3 function of conversion
+[ca,da]=voltdivider(e,g,f,h) //z1*z2 function of multiplication
+[cb,db]=voltdivider(e,i,f,j) //z1*z3 function of multiplication
+[cc,dd]=voltdivider(g,i,h,j) //z2*z3 function of multiplication
+[s,t]=polar2rect(ca,da) //function of conversion
+[sa,ta]=polar2rect(cb,db) //function of conversion
+[sb,tb]=polar2rect(cc,dd) //function of conversion
+
+[o,p]=addition(s,sa,sb,t,ta,tb) //function of addition
+[m,n]=rect2polar(o,p) //function of conversion
+[mm,nn]=division(c,m,d,n) //function of division
+//Results
+printf("I1 = %.2f A < %.2f degree \n",mm,nn)
diff --git a/3883/CH17/EX17.9/EX17_9.sce b/3883/CH17/EX17.9/EX17_9.sce new file mode 100644 index 000000000..4aa889403 --- /dev/null +++ b/3883/CH17/EX17.9/EX17_9.sce @@ -0,0 +1,72 @@ +//Chapter 17, Example 17.9
+clc
+
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//addition
+function[c1,c2]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+ endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+
+function[c1,c2]=subtraction(x1,x2,y1,y2)
+ c1 = x1-x2
+ c2 = y1-y2
+ endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+z1 = complex(1,2) //complex form of Z1
+z2 = complex(4,-8) //complex form of Z2
+z3 = complex(0,6) //complex form of Z3
+e1 = 8 //source of voltage in volts
+e1o = 20 //angle in degree
+e2 = 10 //source of voltage in volts
+e2o = 0 //angle in degree
+
+//Calculation
+[a,b]=rect2polar(real(z2),imag(z2)) //z2 function of conversion
+[aa,bb]=voltdivider(a,e1,b,e1o) //function of multiplication
+[ac,bc]=polar2rect(aa,bb) //function of conversion
+[c,d]=rect2polar(real(z1),imag(z1)) //z1 function of conversion
+[ca,da]=voltdivider(c,e2,d,e2o) //function of multiplication
+[cb,db]=polar2rect(ca,da) //function of conversion
+[cc,dd]=subtraction(ac,cb,bc,db) //function of subtraction
+[e,f]=rect2polar(cc,dd) //function of conversion
+[ea,fa]=voltdivider(c,a,d,b) //Z1*z2 function of multiplication
+[ee,ff]=polar2rect(ea,fa) //function of conversion
+[g,h]=rect2polar(real(z3),imag(z3)) //z3 function of conversion
+[ga,ha]=voltdivider(c,g,d,h) //z1*z3 function of multiplication
+[gg,hh]=polar2rect(ga,ha) //function of conversion
+[gb,hb]=voltdivider(a,g,b,h) //z2*z3 function of multiplication
+[m,n]=polar2rect(gb,hb) //function of conversion
+[mm,nn]=addition(ee,gg,m,ff,hh,n) //function of addition
+[ma,na]=rect2polar(mm,nn) //function of conversion
+[mb,nb]=division(e,ma,f,na) //function of division
+
+
+//Results
+printf("I2 = %.2f A < %.2f degree",mb,nb)
diff --git a/3883/CH18/EX18.1/EX18_1.sce b/3883/CH18/EX18.1/EX18_1.sce new file mode 100644 index 000000000..0c2d90285 --- /dev/null +++ b/3883/CH18/EX18.1/EX18_1.sce @@ -0,0 +1,68 @@ +//Chapter 18, Example 18.1
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=-90
+ else
+ th=atand(y/x)
+ end
+endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//addition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//Variable Declaration
+z1 = complex(0,4) //complex form of Z1
+z2 = complex(0,4) //complex form of Z2
+z3 = complex(0,-3) //complex form of Z3
+e1 = 10 //real value of voltage
+e1o = 0 //angle in degree
+e2 = 5 //real value of voltage
+e2o = 0 //angle in degree
+//Calculation
+[a,b]=rect2polar(real(z2),imag(z2)) //function of conversion
+[c,d]=rect2polar(real(z3),imag(z3)) //function of conversion
+[e,f]=voltdivider(a,c,b,d) //function of multiplication
+[g,h]=addition(real(z2),real(z3),imag(z2),imag(z3)) //function of addition
+[gg,hh]=rect2polar(g,h) //function of conversion
+[m,n]=division(e,gg,f,hh) //z23 in ohms
+[mo,no]=polar2rect(m,n)
+[o,p]=addition(mo,real(z1),no,imag(z1)) //function of addition
+[oo,pp]=rect2polar(o,p) //function of conversion
+[s,t]=division(e1,oo,e1o,pp) //Is1 in ampere
+[ss,tt]=polar2rect(s,t) //function of conversion
+[aa,ba]=voltdivider(c,s,d,t) //function of multiplication
+[ab,bb]=rect2polar(aa,ba) //function of conversion
+[ac,bc]=division(ab,gg,bb,hh) //I in ampere
+z12 = imag(z1)/2 //imaginary part of Z12
+[cc,dd]= addition(real(z1),real(z3),z12,imag(z3))
+[ca,da]=rect2polar(cc,dd) //function of conversion
+[cb,db]=division(e2,ca,e2o,da) //Is2
+i2 = cb/2 //in ampere
+[ma,na]=polar2rect(cb,db) //function of conversion
+[mm,nn]=addition(ss,ma,tt,na) //function of addition
+[mb,nb]=rect2polar(mm,nn) //final I function of conversion
+
+
+//Results
+printf("I = %.2f A < %.2f degree \n",mb,nb)
diff --git a/3883/CH18/EX18.14/EX18_14.sce b/3883/CH18/EX18.14/EX18_14.sce new file mode 100644 index 000000000..87b6871a2 --- /dev/null +++ b/3883/CH18/EX18.14/EX18_14.sce @@ -0,0 +1,53 @@ +//Chapter 18, Example 18.14
+clc;
+
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1-y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+z1=complex(3,4) //complex form of Z1
+z2=complex(0,-5) //complex form of Z2
+e1 = 20 //real value of voltage
+e1o = 0 //angle in degree
+
+//Calculation
+[a,b]=rect2polar(real(z1),imag(z1)) //function of conversion
+[c,d]=rect2polar(real(z2),imag(z2)) //function of conversion
+[ca,da]=voltdivider(a,c,b,d) //function of multiplication
+[cb,db]=addition(real(z1),real(z2),imag(z1),imag(z2))
+[cc,dd]=rect2polar(cb,db) //function of conversion
+[e,f]=division(ca,cc,da,dd) //function of division
+[o,p]=polar2rect(e,f) //function of conversion
+[m,n]=division(e1,a,e1o,b) //function of division
+//Resultss
+printf("Zn = %.2f ohm %.2fj ohm \n",o,p)
+printf("In = %d A < %.2f degree \n",m,n)
diff --git a/3883/CH18/EX18.15/EX18_15.sce b/3883/CH18/EX18.15/EX18_15.sce new file mode 100644 index 000000000..0d3e2d8ab --- /dev/null +++ b/3883/CH18/EX18.15/EX18_15.sce @@ -0,0 +1,55 @@ +//Chapter 18, Example 18.15
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+z1=complex(2,-4) //complex form of z1
+z2=complex(1,0) //complex form of z2
+z3=complex(0,5) //complex form of z3
+i = 3 //current in ampere
+//Calculation
+[a,b]=addition(real(z1),real(z2),imag(z1),imag(z2)) //z1+z2 in comp
+[aa,bb]=rect2polar(a,b) //z1+z2 in polar form
+[ac,bc]=rect2polar(real(z3),imag(z3)) //z3 in polar form
+[ad,bd]=voltdivider(ac,aa,bc,bb) //z3(z1+z2)
+[ae,be]=addition(real(z3),a,imag(z3),b) //z3+(z1+z2) in complex
+[af,bf]=rect2polar(ae,be) //function of conversion
+[ag,bg]=division(ad,af,bd,bf) //function of division
+[ah,bh]=polar2rect(ag,bg) //function of conversion
+za = real(z1)*i //real part
+zb = imag(z1)*i //imaginary pary
+[c,d]=rect2polar(za,zb) //function of conversion
+[e,f]=division(c,aa,d,bb) //function of division
+//Results
+printf("Zn = %.2f ohm + j%.2f ohm \n",ah,bh)
+printf("In = %.2f A < %.1f degree \n",e,f)
diff --git a/3883/CH18/EX18.16/EX18_16.sce b/3883/CH18/EX18.16/EX18_16.sce new file mode 100644 index 000000000..fc5bbd670 --- /dev/null +++ b/3883/CH18/EX18.16/EX18_16.sce @@ -0,0 +1,24 @@ +//Chapter 18, Example 18.16
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+//Variable Declaration
+zn = complex(7.50,2.50) //complex form of Zn
+in = 2.68 //real value of current
+ino = -10.3 //angle in degree
+
+//Calculation
+[a,b]=rect2polar(real(zn),imag(zn)) //function of conversion
+[c,d]=voltdivider(in,a,ino,b) //function of multiplication
+
+
+//Results
+printf("Eth = %.1f V < %.2f degree \n",c,d)
diff --git a/3883/CH18/EX18.19/EX18_19.sce b/3883/CH18/EX18.19/EX18_19.sce new file mode 100644 index 000000000..1122daac7 --- /dev/null +++ b/3883/CH18/EX18.19/EX18_19.sce @@ -0,0 +1,55 @@ +//Chapter 18, Example 18.19
+clc
+funcprot(0)
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//addition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+z1 = complex(6,-8)
+z2 = complex(0,8)
+e1 = 9
+e1o = 0
+//Calculation
+[a,b]=rect2polar(real(z1),imag(z1))
+[c,d]=rect2polar(real(z2),imag(z2))
+[e,f]=voltdivider(a,c,b,d)
+[g,h]=addition(real(z1),real(z2),imag(z1),imag(z2))
+[gg,hh]=rect2polar(g,h)
+[o,p]=division(e,gg,f,hh)
+[oo,pp]=polar2rect(o,p)
+[aa,bb]=voltdivider(c,e1,d,e1o)
+[cc,dd]=division(aa,gg,bb,hh)
+pmax = (cc*cc)/(4*a)
+//Results
+printf("ZL = %.2f ohm + j%d ohm \n",oo,pp)
+printf("Pmax = %.2f W ",pmax)
diff --git a/3883/CH18/EX18.2/EX18_2.sce b/3883/CH18/EX18.2/EX18_2.sce new file mode 100644 index 000000000..e0cf13f4d --- /dev/null +++ b/3883/CH18/EX18.2/EX18_2.sce @@ -0,0 +1,51 @@ +//Chapter 18, Example 18.2
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+//addition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+endfunction
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+//Variable Declaration
+z1 = complex(0,6) //complex form of Z1
+z2 = complex(6,-8) //complex form of Z2
+i1 = 2 //current in ampere
+e1= 20 //real value of voltage
+e1o = 30 //angle in degree
+//Calculation
+[a,b]=addition(real(z1),real(z2),imag(z1),imag(z2)) //function of addition
+[aa,bb]=rect2polar(a,b) //function of conversion
+c=imag(z1)*i1 //imaginary part
+[i,j]=rect2polar(real(z1),c) //function of conversion
+[e,f]=division(i,aa,j,bb) //I1 function of division
+[m,n]=division(e1,aa,e1o,bb) //I2 function of division
+[o,p]=polar2rect(e,f) //function of conversion
+[oo,pp]=polar2rect(m,n) //function of conversion
+[s,t]=addition(o,oo,p,pp) //function of addition
+[ss,tt]=rect2polar(s,t) //function of conversion
+//Results
+printf("I = %.2f A < %.2f degree \n",ss,tt)
diff --git a/3883/CH18/EX18.20/EX18_20.sce b/3883/CH18/EX18.20/EX18_20.sce new file mode 100644 index 000000000..88e17dd82 --- /dev/null +++ b/3883/CH18/EX18.20/EX18_20.sce @@ -0,0 +1,10 @@ +//Chapter 18, Example 18.20
+clc
+//Variable Declaration
+
+
+//Calculation
+
+
+
+//Results
diff --git a/3883/CH18/EX18.21/EX18_21.sce b/3883/CH18/EX18.21/EX18_21.sce new file mode 100644 index 000000000..446228a42 --- /dev/null +++ b/3883/CH18/EX18.21/EX18_21.sce @@ -0,0 +1,17 @@ +//Chapter 18, Example 18.21
+clc
+//Variable Declaration
+rth = 4 //reistance in ohms
+xth = 7 //in ohms
+Xload = 4 //load resistance in ohms
+eth = 20 //source voltage in volts
+//Calculation
+rl = sqrt((rth*rth)+ ((xth-Xload)*(xth-Xload))) //load resistance in ohms
+rav = (rth+rl)/2 //resistance in ohms
+p = (eth*eth)/(4*rav) //power in watt
+pmax = (eth*eth)/(4*rth) //power in watt
+//Results
+printf("RL = %d ohm \n",rl)
+printf("Rav = %.1f ohm \n",rav)
+printf("P = %.2f W \n",p)
+printf("Pmax = %d W \n",pmax)
diff --git a/3883/CH18/EX18.3/EX18_3.sce b/3883/CH18/EX18.3/EX18_3.sce new file mode 100644 index 000000000..d830c65a3 --- /dev/null +++ b/3883/CH18/EX18.3/EX18_3.sce @@ -0,0 +1,41 @@ +//Chapter 18, Example 18.3
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//Variable Declaration
+i1= 1.9 //real value of current in ampere
+i1o = 108.43 //angle in degree
+r1 = 6 //resistance in ohms
+i2 = 3.16 //real value of current in ampere
+i2o = 48.43 //angle in degree
+it = i1+i2 //real value of current in ampere
+ito = i1o-i2o //angle in degree
+ia = 4.42 //total current in ampere
+iao = 70.2 //angle in degree
+//Calculation
+v1 = i1*r1 //in volts
+v2 = i2*r1 //in volts
+[a,b]=polar2rect(v1,i1o) //function of conversion
+[c,d]=polar2rect(v2,i2o) //function of conversion
+[e,f]=addition(a,c,b,d) //function of addition
+[i,j]=rect2polar(e,f) //function of conversion
+vt = ia*r1 //in volts
+
+//Results
+printf("V6ohm = %.1f V < %.1f degree \n",i,j)
+printf("V6ohm = %.1f V < %.1f degree (checks)\n",vt,iao)
diff --git a/3883/CH18/EX18.4/EX18_4.sce b/3883/CH18/EX18.4/EX18_4.sce new file mode 100644 index 000000000..36aba1522 --- /dev/null +++ b/3883/CH18/EX18.4/EX18_4.sce @@ -0,0 +1,74 @@ +//Chapter 18, Example 18.4
+clc
+//multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//Variable Declaration
+r1 = 0.5*10^3 //resistance1 in kiloohms
+r1o = 0 //angle in degree
+r2 = 1*10^3 //resistance2 in kiloohms
+r2o = 0 //angle in degree
+r3 = 3*10^3 //resistance3 in kiloohms
+r3o = 0 //angle in degree
+e1 = 12 //source voltage in volts
+xc = 10*10^3 //reactance in kiloohms
+xco = -90 //angle in degree
+xl = 2*10^3 //reactance in kiloohms
+xlo = 90 //angle in degree
+e2 = 4 //source voltage in volts
+e2o = 0 //angle in degree
+//Calculation
+rp1 = (r1*r3)/(r1+r3) //in kiloohms
+v3 = (rp1*e1)/(rp1+r2) //V3(dc) in volts
+[a,b]=voltdivider(r2,xc,r2o,xco) //function of multiplication
+[c,d]=polar2rect(r2,r2o) //function of conversion
+[e,f]=polar2rect(xc,xco) //function of conversion
+[g,h]=addition(c,e,d,f) //function of addition
+[i,j]=rect2polar(g,h) //function of conversion
+[m,n]=division(a,i,b,j) //z2 function of division
+[o,p]=polar2rect(r3,r3o) //function of conversion
+[q,r]=polar2rect(xl,xlo) //function of conversion
+[s,t]=addition(o,q,p,r) //function of addition
+[v,w]=rect2polar(s,t) //z3 function of conversion
+[ma,na]=voltdivider(m,v,n,w) //function of multiplication
+[mb,nb]=polar2rect(m,n) //function of conversion
+[mc,nc]=addition(mb,s,nb,t) //function of addition
+[md,nd]=rect2polar(mc,nc) //Z2 + Z31 function of conversion
+[oo,pp]=division(ma,md,na,nd) //function of division
+[qa,ra]=polar2rect(r1,r1o) //function of conversion
+[qb,rb]=polar2rect(oo,pp) //function of conversion
+[qc,rc]=addition(qa,qb,ra,rb) //function of addition
+[qd,rd]=rect2polar(qc,rc) //Zt function of conversion
+[va,wa]=division(e2,qd,e2o,rd) //Is function of division
+[sa,ta]=voltdivider(m,va,n,wa) //Z2*Is function of multiplication
+[sb,tb]=division(sa,md,ta,nd) //I3 function of division
+[oa,pa]=voltdivider(sb,r3,tb,r3o) //V3(ac) function of multiplication
+pb=oa*sqrt(2) //power in watt
+//Results
+printf("V3 = %.1f V \n",v3)
+printf("V3 = %.1f + %.2f sin(wt %.2f degree)\n",v3,pb,pa)
diff --git a/3883/CH18/EX18.5/EX18_5.sce b/3883/CH18/EX18.5/EX18_5.sce new file mode 100644 index 000000000..0fb385711 --- /dev/null +++ b/3883/CH18/EX18.5/EX18_5.sce @@ -0,0 +1,46 @@ +//Chapter 18, Example 18.5
+clc
+funcprot(0)
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+endfunction
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+//Variable Declaration
+z1 = 4 //real value of Z1
+z1o = 0 //angle in degree
+z2 = complex(6,8) //complex form of Z2
+u=20 //unit
+v=10 //real value of voltage
+vo = 0 //angle in degree
+h=100 //unit
+iu = 20*10^-3 //current in milliampere
+//Calculation
+[a,b]=addition(z1,real(z2),z1o,imag(z2)) //function of addition
+[c,d]=rect2polar(a,b) //function of conversion
+e=1/c //I1
+f=-d
+[g,ha]=voltdivider(z1,e,z1o,f) //I2 function of multiplication
+i=e*u*v
+[m,n]=polar2rect(i,f) //I1 function of conversion
+j=g*h*iu
+[ma,na]=polar2rect(j,ha) //function of conversion)
+[q,r]=addition(m,ma,n,na) //function of addition
+[qa,ra]=rect2polar(q,r) //function of conversion
+//Results
+printf("I2 = %.2f A < %.2f degree \n",qa,ra)
diff --git a/3883/CH18/EX18.7/EX18_7.sce b/3883/CH18/EX18.7/EX18_7.sce new file mode 100644 index 000000000..33b9afb29 --- /dev/null +++ b/3883/CH18/EX18.7/EX18_7.sce @@ -0,0 +1,59 @@ +//Chapter 18, Example 18.7
+clc
+//multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+//division
+function[q,x]=division1(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1+y2
+ endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=-90
+ else
+ th=atand(y/x)
+ end
+endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//Variable Declaration
+z1=complex(0,8) //complex form of Z1
+z2=complex(0,-2) //complex form of Z2
+ea= 10 //source voltage in volts
+eo = 0 //angle in degree
+//Calculation
+[a,b]=rect2polar(real(z1),imag(z1)) //function of conversion
+[c,d]=rect2polar(real(z2),imag(z2)) //function of conversion
+[e,f]=voltdivider(a,c,b,d) //function of multiplication
+[g,h]=addition(real(z1),real(z2),imag(z1),imag(z2))
+[gg,hh]=rect2polar(g,h) //function of conversion
+[o,p]=division(e,gg,f,hh) //function of division
+[s,t]=voltdivider(c,ea,d,eo) //function of multiplication
+[ss,tt]=rect2polar(g,h) //function of conversion
+[oo,pp]=division1(s,ss,t,tt) //function of conversion
+
+
+//Results
+printf("Zth = %.2f ohm < %d degree \n",o,p)
+printf("Eth = %.2f V < %d degree \n",oo,pp)
diff --git a/3883/CH18/EX18.8/EX18_8.sce b/3883/CH18/EX18.8/EX18_8.sce new file mode 100644 index 000000000..b8ddeecc7 --- /dev/null +++ b/3883/CH18/EX18.8/EX18_8.sce @@ -0,0 +1,52 @@ +//Chapter 18, Example 18.8
+clc
+//multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//Variable Declaration
+z1=complex(6,8) //complex form of Z1
+z2=complex(3,-4) //complex form of Z2
+z3=complex(0,5) //complex form of Z3
+ea= 10 //real value of voltage
+eo = 0 //angle in degree
+//Calculation
+[aa,bb]=rect2polar(real(z1),imag(z1)) //function of conversion
+[ac,bc]=rect2polar(real(z2),imag(z2)) //function of conversion
+[a,b]=voltdivider(aa,ac,bb,bc) //function of multiplication
+[g,h]=addition(real(z1),real(z2),imag(z1),imag(z2)) //function of addition
+[i,j]=rect2polar(g,h) //function of conversion
+[ii,jj]=division(a,i,b,j) //function of division
+[ia,ja]=polar2rect(ii,jj) //function of conversion
+[gg,hh]=addition(real(z3),ia,imag(z3),ja) //function of addition
+[ga,ha]=rect2polar(gg,hh) //function of conversion
+[c,d]=voltdivider(ac,ea,bc,eo) //function of multiplication
+[ca,da]=division(c,i,d,j) //function of division
+
+//Results
+printf("Zth = %.2f ohm < %.2f degree \n",ga,ha)
+printf("Eth = %.2f V < %.2f degree \n",ca,da)
diff --git a/3883/CH18/EX18.9/EX18_9.sce b/3883/CH18/EX18.9/EX18_9.sce new file mode 100644 index 000000000..566525bc9 --- /dev/null +++ b/3883/CH18/EX18.9/EX18_9.sce @@ -0,0 +1,21 @@ +//Chapter 18, Example 18.8
+clc
+
+//Variable Declaration
+zth = 2*10^3 //resistance in kiloohms
+rs = 0.5*10^3 //resistance1 in kiloohms
+rs1 = 2.3*10^3 //resistance2 in kiloohms
+rl = 1*10^3 //resistance3 in kiloohms
+
+//Calculation
+rsa = rs+rs1 //total resistance in kiloohms
+i1 = 1/rsa //wrong answer in textbook
+eth = -i1*zth //in ohmEi
+vl= (rl*eth)/((1*10^3)+(2*10^3)) //in Ei
+
+
+//Results
+printf("Zth = %d kohm \n",zth/10^3)
+printf("Eth = %.2fEi \n",eth)
+printf("VL = %.2fEi \n",vl)
+
diff --git a/3883/CH19/EX19.1/EX19_1.sce b/3883/CH19/EX19.1/EX19_1.sce new file mode 100644 index 000000000..63bf0488a --- /dev/null +++ b/3883/CH19/EX19.1/EX19_1.sce @@ -0,0 +1,30 @@ +//Chapter 19, Example 19.1, page 860
+clc
+//Initialisation
+p1=100 //power in watt
+p2=200 //power in watt
+p3=300 //power in watt
+var1=0 //volt-amperes reactive
+var2=700 //volt-amperes reactive
+var3=1500 //volt-amperes reactive
+
+//Calculation
+va1=sqrt((p1**2)+(var1**2)) //volt-amperes
+va2=sqrt((p2**2)+(var2**2)) //volt-amperes
+va3=sqrt((p3**2)+(var3**2)) //volt-amperes
+pt=p1+p2+p3 //total power in watt
+qt=var3-var2 //total volt-amperes
+st=sqrt((pt**2)+(qt**2)) //total volt-amperes reactive
+fp=pt/st //power factor
+i=st/p1 //current in ampere
+teta=acosd(fp) //angle in degree
+
+//Result
+printf("VA of load 1 = %d \n",va1)
+printf("VA of load 2 = %.1f \n",va2)
+printf("VA of load 3 = %.2f \n",va3)
+printf("Total Watt, Pt = %d \n",pt)
+printf("Total volt-amperes reactive, Qt = %d \n",qt)
+printf("Total volt-amperes, St = %d \n",st)
+printf("Power factor, Fp = %.1f leading (C) \n",fp)
+printf(" I = %d < + %.2f degree \n",i,teta)
diff --git a/3883/CH19/EX19.2/EX19_2.sce b/3883/CH19/EX19.2/EX19_2.sce new file mode 100644 index 000000000..52e01fec6 --- /dev/null +++ b/3883/CH19/EX19.2/EX19_2.sce @@ -0,0 +1,44 @@ +//Chapter 19, Example 19.2, page 861
+clc
+funcprot()
+function [r,th]=rect2pol(x,y)
+//rectangle to polar coordinate conversion
+ r=sqrt(x^2+y^2);
+ th = atan(y,x)*180/%pi;
+endfunction
+
+//Initialisation
+E=100 //emf in volt
+r=6 //resistance in ohm
+xl=7 //inductive reactance in ohm
+xlang=90 //angle in degree
+xc=15 //capacitive reactance in ohm
+xcang=-90 //angle in degree
+f1=60 //frequency in hertz
+
+
+//Calculation
+I=E/(r+complex(0,xl)+complex(0,-xc)) //current in ampere
+[ir,iang]=rect2pol(real(I),imag(I)) //conversion to polar form
+vr=ir*r //in volt
+vl=ir*xl //in volt
+vlang=iang*xlang //in degree
+vc=ir*xc //in volt
+vcang=xcang*iang //in degree
+pt=E*ir*cosd(iang) //power in watt
+st=E*ir //VAR
+qt=E*ir*sind(iang) //VA
+fp=pt/st //power factor
+wr=(vr*ir)/f1 //energy in joule
+wl=(vl*ir)*(2*3.14*f1)**-1 //energy in joule
+wc=(vc*ir)/(2*3.14*f1) //energy in joule
+
+//Result
+printf("(a) I = %d A < %.2f degree \n",ir,iang)
+printf(" Pt = %d W \n",pt)
+printf(" Qt = %d VAR \n",qt)
+printf(" St = %d VA \n",st)
+printf(" Fp = %.1f leading (C) \n",fp)
+printf("(b) Wr = %d J \n",wr)
+printf("(c) Wl = %.2f J \n",wl)
+printf("(d) Wc = %.2f J \n",wc)
diff --git a/3883/CH19/EX19.3/EX19_3.sce b/3883/CH19/EX19.3/EX19_3.sce new file mode 100644 index 000000000..0a10352f4 --- /dev/null +++ b/3883/CH19/EX19.3/EX19_3.sce @@ -0,0 +1,76 @@ +//Chapter 19, Example 19.3, page 861
+clc
+funcprot()
+function [r,th]=rect2pol(x,y)
+//rectangle to polar coordinate conversion
+ r=sqrt(x^2+y^2);
+ th = atan(y,x)*180/%pi;
+endfunction
+
+//Initialisation
+n=12 //no of device
+p1=60 //power in watt
+q1=0 //in VAR
+fp1=1 //power factor
+p2=6400 //power in watt
+q2=0 //in VAR
+fp2=1 //power factor
+n2=5 //no of device
+p0=746 //power in watt
+eta=0.82 //eta contat
+fp3=0.72 //power factor
+e=208 //emf in volt
+r=9 //resistance in ohm
+xc=12 //capacitive reactance in ohm
+z=complex(9,-12)
+
+//Calculation
+tp1=n*p1 //power in watt
+s1=tp1 //in VA
+s2=p2 //in VA
+p3=(p0*n2)/eta //power in watt
+s3=p3/fp3 //in VA
+q3=s3*sin(asin(fp3)) //in VAR
+[zr,zang]=rect2pol(real(z),imag(z)) //function of conversion
+i=e/zr //in ampere
+iang=0-zang
+p4=(i**2)*r //power in watt
+q4=(i**2)*xc //in VAR
+s4=sqrt((p4**2)+(q4**2)) //in VA
+fp4=p4/s4 //power factor
+pt=tp1+p2+p3+p4 //total power in watt
+qt=q1+q2+q3-q4 //in VAR(L)
+st=sqrt((pt**2)+(qt**2)) //in VA
+fpt=pt/st //power factor
+tetat=acosd(fpt) //angle in degree
+it=st/e //in ampere
+
+//Result
+printf("(a) Bulb \n")
+printf(" P1 = %d W \n",tp1)
+printf(" Q1 = %d VAR \n",q1)
+printf(" S1 = %d VA\n",s1)
+printf(" Fp1 = %d \n",fp1)
+printf(" Heating elements \n")
+printf(" P2 = %.1f kW\n",p2/1000)
+printf(" Q2 = %d VAR\n",q2)
+printf(" S2 = %.1f KVA\n",s2/1000)
+printf(" Fp2 = %d \n",fp2)
+printf(" Motor \n")
+printf(" P3 = %.2f W\n",p3)
+printf(" Q3 = %.2f VAR\n",q3)
+printf(" S3 = %.2f VA\n",s3)
+printf(" Fp = %.2f lagging \n",fp3)
+printf(" Capacitive load \n")
+printf(" P4 = %.2f W\n",p4)
+printf(" Q4 = %.2f VAR\n",q4)
+printf(" S4 = %.2f VA\n",s4)
+printf(" Fp = %.1f lagging \n",fp4)
+printf("(b) \n")
+printf(" Pt = %.2f W \n",pt)
+printf(" Qt = %.2f VAR \n",qt)
+printf(" St = %.2f VA\n",st)
+printf(" Fp = %.3f lagging \n",fpt)
+printf("(c) \n")
+printf(" I = %.2f A < %.2f degree \n",it,-tetat)
+
diff --git a/3883/CH19/EX19.4/EX19_4.sce b/3883/CH19/EX19.4/EX19_4.sce new file mode 100644 index 000000000..a4ca19d39 --- /dev/null +++ b/3883/CH19/EX19.4/EX19_4.sce @@ -0,0 +1,22 @@ +//Chapter 19, Example 19.4, page 864
+clc
+//Initialisation
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+ei=5000 //in VAR
+v=100 //emf in volt
+fp=0.6 //power factor
+
+//Calculation
+i=ei/v //current in ampere
+teta=-acosd(fp) //phase angle in degree
+zt=v/i //impedance of the circuit in ohm
+[a,b]=polar2rect(zt,teta) //function of conversion
+//Result
+printf("I = %d A < %.2f degree \n",i,teta)
+printf("Zt =%.1f ohm + j %.1f ohm",a,-b)
diff --git a/3883/CH19/EX19.5/EX19_5.sce b/3883/CH19/EX19.5/EX19_5.sce new file mode 100644 index 000000000..7a01ece1b --- /dev/null +++ b/3883/CH19/EX19.5/EX19_5.sce @@ -0,0 +1,33 @@ +//Chapter 19, Example 19.5, page 865
+clc
+//Initialisation
+hp1=746 //1 hp
+eta=0.92 //eta
+fp=0.6 //power factor
+v=208 //voltage
+qc=5405.8 //in VAR
+f=60 //frequency in hertz
+
+
+//Calculation
+p0=5*hp1 //output power in watt
+pi=p0/eta //input power in watt
+teta=acosd(fp) //angle in degree
+ql=pi*tand(teta) //in VAR(L)
+s=sqrt((pi**2)+(ql**2)) //in VA
+xc=(v**2)/(qc) //in ohms
+c=1/(2*3.14*f*xc) //in microfarad
+i1=s/v //in ampere
+i2=pi/v //in ampere
+im=pi/(v*fp) //in ampere
+
+
+//Result
+printf("(a) Power traingle, \n")
+printf(" Pi = %.2f W \n",pi)
+printf(" QL = %.2f VAR \n",ql)
+printf(" S = %.2f VA \n",s)
+printf("(b) C = %.1f uF \n",c*10**6)
+printf("(c) At 0.6 Fp, I = %.2f A \n",i1)
+printf(" At unity Fp, I = %.2f A \n",i2)
+printf("(d) Im = %.2f A < %.2f degree \n",im,teta)
diff --git a/3883/CH19/EX19.6/EX19_6.sce b/3883/CH19/EX19.6/EX19_6.sce new file mode 100644 index 000000000..cfe0dca26 --- /dev/null +++ b/3883/CH19/EX19.6/EX19_6.sce @@ -0,0 +1,29 @@ +//Chapter 19, Example 19.6, page 867
+clc
+//Initialisation
+s=20000 //in VA
+fp=0.7 //power factor
+p1=10000 //power in watt
+p2=14000 //power in watt from fig. 19.28
+e=1000 //voltage
+fp2=0.95 //power factor
+f=60 //frequency in hertz
+
+//Calculation
+p=s*fp //power factor
+teta = acosd(fp) //phase angle in degree
+ql=s*sind(teta) //in VAR
+st=sqrt(((p1+p2)**2)+(ql**2)) //in VA
+it=st/e //current in ampere
+teta2=acosd(fp2) //phase angle in degree
+ql1=(p1+p2)*tand(teta2) //in VAR
+qc=ql-ql1 //in VAR
+xc=(e**2)/qc //capacitive impedance in ohm
+c=1/(2*3.14*f*xc) //capacitance ih farad
+st1=sqrt(((p1+p2)**2)+(ql1**2)) //in VA
+it1=st1/e //current in ampere
+
+//Result
+printf("(a) It = %.2f A \n",it)
+printf(" C = %.2f uF \n",c*10**6)
+printf("(b) I = %.2f A \n",it1)
diff --git a/3883/CH19/EX19.7/EX19_7.sce b/3883/CH19/EX19.7/EX19_7.sce new file mode 100644 index 000000000..d5dd71141 --- /dev/null +++ b/3883/CH19/EX19.7/EX19_7.sce @@ -0,0 +1,27 @@ +//Chapter 19, Example 19.7, page 872
+clc
+//Initialisation
+p=75 //power in watt
+i=5 //current in watt
+e=120 //voltage
+rad1=377 //angular frequency in rad/s
+p2=80 //power in watt
+i2=4 //current in watt
+p3=52 //power in watt
+i3=2 //current in watt
+
+//Calculation
+r=p/i**2 //resistance in ohm
+zt=e/i //resistance in ohm
+xl=sqrt((zt**2)-(r**2)) //resistance in ohm
+l=xl/(rad1) //inductance in henry
+r2=p2/i2**2 //resistance in ohm
+r3=p3/i3**2 //resistance in ohm
+zt3=e/i3 //resistance in ohm
+xl3=sqrt((zt3**2)-(r3**2)) //resistance in ohm
+l3=xl3/(rad1) //inductance in henry
+
+//Result
+printf("(a) R = %d ohm \n L = %.2f mH \n",r,l*10**3)
+printf("(b) R = %d ohm \n",r2)
+printf("(c) R = %d ohm \n L = %.2f mH",r3,l3*10**3)
diff --git a/3883/CH2/EX2.1/EX2_1.sce b/3883/CH2/EX2.1/EX2_1.sce new file mode 100644 index 000000000..234403c11 --- /dev/null +++ b/3883/CH2/EX2.1/EX2_1.sce @@ -0,0 +1,12 @@ +//Chapter 2, Example 2.1
+clc
+//Variable Declaration
+q = 0.16 //charge in coulomb (C)
+t = 64*10^-3 //time in second (sec)
+
+//Calculation
+I = q/t //current in ampere (A)
+
+//Results
+printf("I = %.2f A \n",I)
+
diff --git a/3883/CH2/EX2.2/EX2_2.sce b/3883/CH2/EX2.2/EX2_2.sce new file mode 100644 index 000000000..059d48022 --- /dev/null +++ b/3883/CH2/EX2.2/EX2_2.sce @@ -0,0 +1,9 @@ +//Chapter 2, Example 2.2
+clc
+//Variable Declaration
+Q = 641*10^-3 //charge in coulomb
+I = 5*10^-3 //current in ampere
+//Calculation
+t = Q/I //time in seconds
+//Results
+printf("t = %.3f s",t/100)
diff --git a/3883/CH2/EX2.3/EX2_3.sce b/3883/CH2/EX2.3/EX2_3.sce new file mode 100644 index 000000000..8ca188662 --- /dev/null +++ b/3883/CH2/EX2.3/EX2_3.sce @@ -0,0 +1,9 @@ +//Chapter 2, Example 2.3
+clc
+//Variable Declaration
+W = 60 //in joule
+Q = 20 //in coulomb
+//Calculation
+V = W/Q //ans in volt
+//Results
+printf("V = %d V",V)
diff --git a/3883/CH2/EX2.4/EX2_4.sce b/3883/CH2/EX2.4/EX2_4.sce new file mode 100644 index 000000000..ea6197c54 --- /dev/null +++ b/3883/CH2/EX2.4/EX2_4.sce @@ -0,0 +1,11 @@ +//Chapter 2, Example 2.4
+clc
+//Variable Declaration
+Q = 50*10^-6 //charge in coulomb
+V = 6 //in volt
+
+//Calculation
+W = Q*V //in microsec joule
+
+//Results
+printf("W = %d uJ",W*10^6)
diff --git a/3883/CH2/EX2.5/EX2_5.sce b/3883/CH2/EX2.5/EX2_5.sce new file mode 100644 index 000000000..eeabb0e05 --- /dev/null +++ b/3883/CH2/EX2.5/EX2_5.sce @@ -0,0 +1,14 @@ +//Chapter 2, Example 2.5
+clc
+//Variable Declaration
+a = 450*10^-3 //current in millampere
+b = 600*10^-3 //current in millampere
+d = 45 //temperature in degree from graph 2.18.b
+m = 60 //unit time in sec
+
+//Calculation
+life = (a/b)*m //life in minutes
+
+//Results
+printf("a. Life = %.d min \n",life)
+printf("b. High temperature = %d degreeC",d)
diff --git a/3883/CH20/EX20.1/EX20_1.sce b/3883/CH20/EX20.1/EX20_1.sce new file mode 100644 index 000000000..3690c3f72 --- /dev/null +++ b/3883/CH20/EX20.1/EX20_1.sce @@ -0,0 +1,32 @@ +//Chapter 20, Example 20.1
+clc
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//Variable Declaration
+r = 2 //resistance in ohms
+e1 = 10 //real value in volts
+e1o = 0 //angle in degree
+zt = 2 //real value in ohms
+zto = 0 //angle in degree
+x1 = 10 //real value in ohms
+x1o = 90 //angle in degree
+fs = 5000 //frequency in hertz
+
+//Calculation
+i = e1/r //in ampere
+[a,b]=voltdivider(i,x1,e1o,x1o) //function of multiplication
+[c,d]=voltdivider(i,x1,e1o,-x1o) //function of multiplication
+qs = x1/r //unit
+bw = fs/qs //bandwidth in hertz
+phpf=0.5*i*i*r //power in watt
+//Results
+printf("a. I = %d A < %d degree \n",i,e1o)
+printf(" VL = %d V < %d degree \n",a,b)
+printf(" Vc = %d V < %d degree \n",c,d)
+printf("b. Qs = %d \n",qs)
+printf("c. BW = %d Hz\n",bw)
+printf("d. Phpf = %d W \n",phpf)
diff --git a/3883/CH20/EX20.10/EX20_10.sce b/3883/CH20/EX20.10/EX20_10.sce new file mode 100644 index 000000000..2b7ef2e6f --- /dev/null +++ b/3883/CH20/EX20.10/EX20_10.sce @@ -0,0 +1,21 @@ +//Chapter 20, Example 20.10
+clc
+//Variable Declaration
+fp = 318.31*10^3 //frequency in kHz
+ql = 100 //unit
+rp = 1*10^6 //in Mega ohm
+i = 2*10^-3 //current in mA
+
+//Calculation
+qp = ql //unit
+bw = fp/qp //frequency in kHz
+ztp = rp //in mega ohm
+vp = i*ztp //in volts
+
+
+
+//Results
+printf("a. fp = %.2f kHz \n",fp/10^3)
+printf("b. Qp = %d \n",qp)
+printf("c. BW = %.3f kHz \n",bw/10^3)
+printf("d. Vp = %d V ",vp)
diff --git a/3883/CH20/EX20.11/EX20_11.sce b/3883/CH20/EX20.11/EX20_11.sce new file mode 100644 index 000000000..c3ce64684 --- /dev/null +++ b/3883/CH20/EX20.11/EX20_11.sce @@ -0,0 +1,24 @@ +//Chapter 20, Example 20.11
+clc
+//Variable Declaration
+fp = 50000 //frequency in Hz
+bw = 2500 //bandwidth in Hz
+l = 1*10^-3 //inductance in mH
+rl = 10 //resistance in ohm
+vp = 10 //in volts
+rs = 17.298*10^3 //in kohms
+//Calculation
+qp = fp/bw //unit
+xl = 2*%pi*fp*l //in ohm
+ql = xl/rl //unit
+rp = ql*ql*rl //in ohm
+xc = xl //in ohm
+c = 1/(2*%pi*fp*xc) //in uF
+ztp = (rs*rp)/(rs+rp) //in kohm
+i = vp/ztp //current in mA
+//Results
+printf("Qp = %d \n",qp)
+printf("Ql = %.1f \n",ql)
+printf("Rp = %.1f ohm \n",rp)
+printf("C = %.2f uF \n",c*10^6)
+printf("I = %.1f mA \n",i*10^3)
diff --git a/3883/CH20/EX20.2/EX20_2.sce b/3883/CH20/EX20.2/EX20_2.sce new file mode 100644 index 000000000..e8162e650 --- /dev/null +++ b/3883/CH20/EX20.2/EX20_2.sce @@ -0,0 +1,19 @@ +//Chapter 20, Example 20.2
+clc
+
+//Variable Declaration
+fs = 4000 //frequency in hertz
+bw = 400 //bandwidth in hertz
+r = 10 //resistance in ohm
+xc = 100 //in ohms
+
+//Calculation
+qs = fs/bw //unit
+xl = qs*r //in ohms
+l = xl/(2*%pi*fs) //inductance in millihenry
+c = 1/(2*%pi*fs*xc) //capacitance in microfarad
+//Results
+printf("a. Qs = %d \n",qs)
+printf("b. XL = %d ohms \n",xl)
+printf("c. L = %.2f mH \n",l*10^3)
+printf(" C = %.3f uF \n",c*10^6)
diff --git a/3883/CH20/EX20.3/EX20_3.sce b/3883/CH20/EX20.3/EX20_3.sce new file mode 100644 index 000000000..ca7cbcb52 --- /dev/null +++ b/3883/CH20/EX20.3/EX20_3.sce @@ -0,0 +1,18 @@ +//Chapter 20, Example 20.3
+clc
+
+//Variable Declaration
+xl = 300 //in ohms
+r = 5 //in ohms
+fs = 12000 //in hertz
+
+
+//Calculation
+qs = xl / r //unit
+bw = fs/qs //bandwidth in hertz
+f2 = fs + (bw/2) //frequency2 in hertz
+f1 = fs-100 //frequency1 in hertz
+//Results
+printf("a. BW = %d Hz \n",bw)
+printf("b. f2 = %d Hz \n",f2)
+printf(" f1 = %d Hz \n",f1)
diff --git a/3883/CH20/EX20.4/EX20_4.sce b/3883/CH20/EX20.4/EX20_4.sce new file mode 100644 index 000000000..2de1cb1e3 --- /dev/null +++ b/3883/CH20/EX20.4/EX20_4.sce @@ -0,0 +1,22 @@ +//Chapter 20, Example 20.4
+clc
+
+//Variable Declaration
+bw = 200 //bandwidth in hertz
+fs = 2800 //frequency in hertz
+c = 101.5*10^-9 //capacitance in nanofarad
+imax = 200*10^-3 //max current in milliampere
+
+
+//Calculation
+qs = fs/bw //unit
+l = 1/(4*%pi*%pi*fs*fs*c) //inductance in mH
+xl = 2*%pi*fs*l //in ohm
+r = xl/qs //resistance in ohm
+e = imax*r //in volts
+//Results
+printf("a. BW = %d Hz \n",bw)
+printf(" Qs = %d \n",qs)
+printf("b. L = %.3f mH \n",l*10^3)
+printf(" R = %d ohm \n",r)
+printf("c. E = %d V \n",e)
diff --git a/3883/CH20/EX20.5/EX20_5.sce b/3883/CH20/EX20.5/EX20_5.sce new file mode 100644 index 000000000..28df84d0d --- /dev/null +++ b/3883/CH20/EX20.5/EX20_5.sce @@ -0,0 +1,25 @@ +//Chapter 20, Example 20.5
+clc
+
+//Variable Declaration
+e = 120 //in volts
+p = 16 //power in watt
+ws = 10^5 //in rad/s
+
+//Calculation
+r = (e*e)/p //resistance in ohm
+fs = ws/(2*%pi) //frequency in hertz
+bw = 0.15*fs //bandwidth in hertz
+l = r/(2*%pi*bw) //inductance in mH
+c = 1/ (4*%pi*%pi*fs*fs*l) //capacitance in nF
+xl = 2*%pi*fs*l //in ohm
+qs = xl/r // unit
+a = 1/qs //unit
+
+//Results
+printf("a. P = %d ohm \n",r)
+printf("b. BW = %.2f Hz \n",bw)
+printf("c. L = %d mH \n",l*10^3)
+printf(" C = %.2f nF \n",c*10^9)
+printf("d. Qs = %.2f \n",qs)
+printf("e. BW/fs = %.2f \n",a)
diff --git a/3883/CH20/EX20.6/EX20_6.sce b/3883/CH20/EX20.6/EX20_6.sce new file mode 100644 index 000000000..00785d752 --- /dev/null +++ b/3883/CH20/EX20.6/EX20_6.sce @@ -0,0 +1,31 @@ +//Chapter 20, Example 20.6
+clc
+
+//Variable Declaration
+l = 1*10^-3 //inductance in mH
+c = 1*10^-6 //capacitance in uF
+rs = 10*10^3 //in ohm
+i = 10*10^-3 //current in milliampere
+
+
+//Calculation
+fp = 1/(2*%pi*sqrt(l*c)) //frequency in kHz
+xl = 2*%pi*fp*l //in ohm
+qp = rs/xl //unit
+bw = fp/qp //bandwidth in Hz
+f1 = (1/(4*%pi*c))*((1/rs)-sqrt((1/(rs*rs))+((4*c)/l))) //frequency in kHz
+f2 = (1/(4*%pi*c))*((1/rs)+sqrt((1/(rs*rs))+((4*c)/l))) //frequency in kHz
+vc = i*rs //in volts
+il = vc/xl //load current in ampere
+ic = vc/xl //in ampere
+
+//Results
+printf("a. fp = %.2f kHz \n",fp/10^3)
+printf("b. Rs = %d kohm \n",rs/10^3)
+printf("c. Qp = %.2f \n",qp)
+printf(" BW = %.2f kHz \n",bw)
+printf(" f1 = %.3f kHz \n",-f1/10^3)
+printf(" f2 = %.3f kHz \n",f2/10^3)
+printf("d. Vc = %d V \n",vc)
+printf("e. IL = %.2f A \n",il)
+printf(" Ic = %.2f A \n",ic)
diff --git a/3883/CH20/EX20.7/EX20_7.sce b/3883/CH20/EX20.7/EX20_7.sce new file mode 100644 index 000000000..961740f4d --- /dev/null +++ b/3883/CH20/EX20.7/EX20_7.sce @@ -0,0 +1,65 @@ +//Chapter 20, Example 20.7
+clc
+funcprot(0)
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+function[c1,c2]=subtraction(x1,x2,y1,y2)
+ c1 = x1-x2
+ c2 = y1-y2
+ endfunction
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+//Variable Declaration
+l = 0.3*10^-3 //inductance in mH
+c = 100*10^-9 //capacitance in nF
+rl = 20 //in ohm
+xco = -90 //angle in degree
+i = 2*10^-3 //current in mA
+
+//Calculation
+fs = 1/(2*%pi*sqrt(l*c)) //frequency in kHz
+fm = fs*(sqrt(1-(1/4)*((rl*rl*c/l)))) //frequency in kHz
+fp = fs*(sqrt(1-((rl*rl*c/l)))) //frequency in kHz
+xl = 2*%pi*fm*l //in ohm
+xc = 1/(2*%pi*fm*c) //in ohm
+[a,b]=rect2polar(rl,xl) //function of conversion
+[c,d]=voltdivider(a,xc,b,xco) //function of multiplication
+[e,f]=subtraction(rl,0,xl,xc) //function of subtraction
+[ee,ff]=rect2polar(e,f) //function of conversion
+[m,n]=division(c,ee,d,ff) //function of division
+vc = i*m //in mV
+qp = xl/rl //unit
+bw = fp/qp //bandwidth in kHz
+ql = (2*%pi*fs*l)/rl //unit
+ztp = ql*ql*rl //in ohm
+vc1 = i*ztp //in mV
+bw1 = fp/qp //bandwidth in kHz
+
+//Results
+printf("a. fs = %.2f kHz \n",fs/10^3)
+printf(" fm = %.2f kHz \n",fm/10^3)
+printf(" fp = %.2f kHz \n",fp/10^3)
+printf("b. ZTm = %.2f ohm < %.2f degree \n",m,n)
+printf(" VCmax = %.2f mV \n",vc*10^3)
+printf("c. Qp = %.2f \n",qp)
+printf("d. BW = %.2f kHz \n",bw/10^3)
+printf("e. fs = %.2f kHz \n",fs/10^3)
+printf(" Ql = %.2f \n",ql)
+printf(" ZTp = %.2f ohm < 0 degree \n",ztp)
+printf(" VCmax = %.1f mV \n",vc1*10^3)
+printf(" BW = %.2f kHz \n",bw1/10^3)
diff --git a/3883/CH20/EX20.8/EX20_8.sce b/3883/CH20/EX20.8/EX20_8.sce new file mode 100644 index 000000000..c4c146e0e --- /dev/null +++ b/3883/CH20/EX20.8/EX20_8.sce @@ -0,0 +1,28 @@ +//Chapter 20, Example 20.8
+clc
+
+//Variable Declaration
+l = 1*10^-3 //inductance in mH
+fp = 0.04*10^6 //frequency in microfarad
+rl = 10 //in ohm
+rs = 40*10^3 //in kohm
+
+//Calculation
+xl = 2*%pi*fp*l //in ohm
+ql = xl/rl //unit
+rp = ql*ql*rl //in kiloohm
+ztp = (rs*rp)/(rs+rp) //in kiloohm
+c = 1/(4*%pi*%pi*fp*fp*l) //capacitance in nF
+qp = ztp/xl //unit
+bw = fp/qp //bandwidth in kHz
+f1 = (1/(4*%pi*c))*((1/ztp)-sqrt((1/(ztp*ztp))+((4*c)/l))) //frequency in kHz
+f2 = (1/(4*%pi*c))*((1/ztp)+sqrt((1/(ztp*ztp))+((4*c)/l))) //frequency in kHz
+//Results
+printf("a. Ql = %.2f \n",ql)
+printf("b. Rp = %.2f kohm \n",rp/10^3)
+printf("c. ZTp = %.2f kohm \n",ztp/10^3)
+printf("d. C = %.2f nF \n",c*10^9)
+printf("e. Qp = %.2f \n",qp)
+printf("f. BW = %.2f kHz \n",bw/10^3)
+printf(" f1 = %.3f kHz \n",-f1/10^3)
+printf(" f2 = %.3f kHz \n",f2/10^3)
diff --git a/3883/CH20/EX20.9/EX20_9.sce b/3883/CH20/EX20.9/EX20_9.sce new file mode 100644 index 000000000..bcda161ff --- /dev/null +++ b/3883/CH20/EX20.9/EX20_9.sce @@ -0,0 +1,42 @@ +//Chapter 20, Example 20.9
+clc
+stacksize(10000000);
+//Variable Declaration
+l = 5*10^-3 //inductance in mH
+c = 50*10^-12 //capacitance in pF
+rl = 100 //in ohm
+rs = 50*10^3 //in kohm
+i = 2*10^-3 //current in mA
+
+//Calculation
+fs = 1/(2*%pi*sqrt(l*c)) //frequency in kHz
+xl = 2*%pi*fs*l //in kohm
+ql = xl/rl //unit
+fp = fs //frequency in kHz
+rp = ql*ql*rl //in Megaohm
+ztp=((rs*rp)/(rs+rp)) //in kohm
+qp = ztp/xl //unit
+bw = fp/qp //frequency in kHz
+bw1 = (1/(2*%pi))*((rl/l)+(1/(rs*c))) //frequency in kHz
+vp = i*ztp //in volts
+
+//graph
+x= 100 : 10000 : 500000
+//x=318.31*10**3
+rp1=(4*(%pi**2)*(l**2)*(x.^2))/rl
+//rp1=rl**2/(4*(%pi**2)*(l**2)*(x.^2))
+vp1=i*((rs*rp1)./(rs+rp1))
+
+plot(x,vp1);
+xtitle('Passband response')
+xlabel('f')
+ylabel('Vo')
+//insufficient data from textbook for plotting a graph
+
+
+//Results
+printf("a. fp = fs = %.2f kHz \n",fs/10^3)
+printf("b. Qp = %.2f \n",qp)
+printf("c. BW = %.2f kHz \n",bw/10^3)
+printf(" BW = %.2f kHz \n",bw1/10^3)
+printf("d. Vp = %.2f V \n",vp)
diff --git a/3883/CH21/EX21.1/EX21_1.sce b/3883/CH21/EX21.1/EX21_1.sce new file mode 100644 index 000000000..f19af4b4b --- /dev/null +++ b/3883/CH21/EX21.1/EX21_1.sce @@ -0,0 +1,24 @@ +//Chapter 21, Example 21.1
+clc
+//Initialisation
+k=0.6 //coefficient of coupling
+Lp=200*10**-3 //in Henry
+Ls=800*10**-3 //in Henry
+Np=50 //no of turns in primary
+phip=450*10**-3 //in Wp/s
+Ns=100 //no of turns in primary
+ip=0.2/10**-3 //in Wp/s
+
+//Calculation
+M=k*sqrt(Lp*Ls) //Mutual Inductance
+ep=Np*phip //induced voltage
+es=k*Ns*phip //induced voltage
+epi=Lp*ip //induced voltage
+esi=M*ip //induced voltage
+
+//Result
+printf("(a) Mutual Inductance, M = %.3f mH \n",M*1000)
+printf("(b) Induced Voltage, ep = %.1f V \n",ep)
+printf("(c) Induced Voltage, es = %d V \n",es)
+printf("(d) Induced Voltage, ep = %d V \n",epi)
+printf("(e) Induced Voltage, es = %d V",esi)
diff --git a/3883/CH21/EX21.10/EX21_10.sce b/3883/CH21/EX21.10/EX21_10.sce new file mode 100644 index 000000000..77993215b --- /dev/null +++ b/3883/CH21/EX21.10/EX21_10.sce @@ -0,0 +1,26 @@ +//Chapter 21, Example 21.10
+clc
+funcprot(0)
+function [r,th]=rect2pol(x,y)
+//rectangle to polar coordinate conversion
+ r=sqrt(x^2+y^2);
+ th = atan(y,x)*180/%pi;
+endfunction
+
+//Initialisation
+Rp=3 //in ohm
+Xlp=2400 //in ohm
+W=400 //angular frequency in rad/s
+M=0.9 //in henry
+Rs=0.5 //in ohm
+Rl=40 //in ohm
+Xls=400 //in ohm
+
+//Calculation
+Zp = complex(Rp,Xlp) //in ohm
+Zi=Zp+(((W*M)**2)/(complex(Rs+Rl,Xls))) //Input impedance in ohm
+[Zir,Zid]=rect2pol(real(Zi),imag(Zi))
+
+//Result
+printf("Zi = %.1f ohm + j %d ohm\n",real(Zi),imag(Zi))
+printf(" = %.2f ohm < %.2f degree",Zir,Zid)
diff --git a/3883/CH21/EX21.2/EX21_2.sce b/3883/CH21/EX21.2/EX21_2.sce new file mode 100644 index 000000000..08fa6356d --- /dev/null +++ b/3883/CH21/EX21.2/EX21_2.sce @@ -0,0 +1,16 @@ +//Chapter 21, Example 21.2
+clc
+//Initialisation
+ep=200 //induced voltage
+np=50 //no of turns
+f=60 //frequency in hertz
+es=2400 //induced voltage
+
+//Calculation
+phim=ep/(4.44*np*f) //in Wb/m
+ns=(np*es)/ep //no of turns
+
+
+//Result
+printf("(a) Maximum Flux = %.2f mWb \n",phim*10**3)
+printf("(b) Secondary turns Ns = %d turns",ns)
diff --git a/3883/CH21/EX21.3/EX21_3.sce b/3883/CH21/EX21.3/EX21_3.sce new file mode 100644 index 000000000..d7bdde680 --- /dev/null +++ b/3883/CH21/EX21.3/EX21_3.sce @@ -0,0 +1,20 @@ +//Chapter 21, Example 21.3
+clc
+//Initialisation
+np=40 //no of turns
+ns=5 //no of turns
+vl=200 //voltage
+zl=2*10**3 //resistance in ohm
+is=0.1 //current in ampere
+
+//Calculation
+Ip=(ns/np)*is //current in amp
+vg=(np/ns)*vl //voltage in volt
+a=np/ns //turn ratio
+zp=(a**2)*(zl) //in ohm
+
+
+//Result
+printf("(a) Ip = %.1f mA \n",Ip*10**3)
+printf(" Vg = %d V \n",vg)
+printf("(b) Zp = %d Kohm",zp/10**3)
diff --git a/3883/CH21/EX21.4/EX21_4.sce b/3883/CH21/EX21.4/EX21_4.sce new file mode 100644 index 000000000..aca1816e8 --- /dev/null +++ b/3883/CH21/EX21.4/EX21_4.sce @@ -0,0 +1,27 @@ +//Chapter 21, Example 21.4
+clc
+//Initialisation
+p1=600 //power in watt
+p2=400 //power in watt
+p3=2000 //power in watt
+vp=2400 //voltage in volt
+v1=120 //voltage in volt
+v2=240 //voltage in volt
+
+//Calculation
+pt=p1+p2+p3 //power in watt
+Ip=pt/vp //current in ampere
+R=vp/Ip //resistance in ohm
+i1=p1/v1 //current in ampere
+i2=p3/v2 //current in ampere
+vl=1.73*vp //voltage in volt
+pt1=3*pt //power in watt
+a=vp/v2 //ratio
+
+//Result
+printf("(a) R = %d ohm \n",R)
+printf("(b) I1 = %d A \n",i1)
+printf(" I2 = %.2f A \n",i2)
+printf("(c) Vl = %d V \n",vl)
+printf("(d) Pt = %d kW \n",pt1/1000)
+printf("(e) a = %d \n",a)
diff --git a/3883/CH21/EX21.5/EX21_5.sce b/3883/CH21/EX21.5/EX21_5.sce new file mode 100644 index 000000000..1b846f479 --- /dev/null +++ b/3883/CH21/EX21.5/EX21_5.sce @@ -0,0 +1,22 @@ +//Chapter 21, Example 21.5
+clc
+//Initialisation
+E=120 //voltage in volt
+rt1=512 //resistance in ohm
+rt2=8 //resistance in ohm
+R=8 //resistance in ohm
+np=8 //no of turns
+ns=1 //no of turns
+
+//Calculation
+is=E/(rt1+rt2) //current in ampere
+p=(is**2)*R //power in watt
+zp=((np/ns)**2)*R //resistance in ohm
+is2=E/(rt1+zp) //current in ampere
+p2=(is2**2)*zp //power in watt
+
+
+//Result
+printf("(a) P = %.2f W \n",p)
+printf("(b) Zp = %d ohm \n",zp)
+printf(" P = %.3f W \n",p2)
diff --git a/3883/CH21/EX21.6/EX21_6.sce b/3883/CH21/EX21.6/EX21_6.sce new file mode 100644 index 000000000..aac193897 --- /dev/null +++ b/3883/CH21/EX21.6/EX21_6.sce @@ -0,0 +1,27 @@ +//Chapter 21, Example 21.6
+clc
+//Initialisation
+vp=70.7 //voltage in volt
+pp=10 //power in watt
+zl=8 //resistance in ohm
+rt=500
+
+//Calculation
+pt=pp*4 //resulting power in watt
+ip=pp/vp //current in ampere
+zp=vp/ip //resistance in ohm
+zp1=sqrt(zp/zl) //resistance in ohm
+vl=vp/zp1 //voltage in volt
+rt2=rt/2 //resistance in ohm
+rt3=rt/3 //resistance in ohm
+rt4=rt/4 //resistance in ohm
+
+//Result
+printf("(a) Resulting power = %d W \n",pt)
+printf("(b) Zp = %d ohm \n",zp)
+printf("(c) Zp = %d : 1 \n",round(zp1))
+printf("(d) VL = %d V \n",round(vl))
+printf("(e) One Speaker = %d ohm \n",rt)
+printf(" Two Speaker = %d ohm \n",rt2)
+printf(" Three Speaker = %d ohm \n",rt3)
+printf(" Four Speaker = %d ohm \n",rt4)
diff --git a/3883/CH21/EX21.7/EX21_7.sce b/3883/CH21/EX21.7/EX21_7.sce new file mode 100644 index 000000000..8c1ecc873 --- /dev/null +++ b/3883/CH21/EX21.7/EX21_7.sce @@ -0,0 +1,33 @@ +//Chapter 21, Example 21.7
+clc
+funcprot()
+function [r,th]=rect2pol(x,y)
+//rectangle to polar coordinate conversion
+ r=sqrt(x^2+y^2);
+ th = atan(y,x)*180/%pi;
+endfunction
+
+//Initialisation
+rp=1 //in ohm
+a=2 //turn ratio
+rs=1 //in ohm
+xp=2 //in ohm
+xs=2 //in ohm
+ip=10 //in ampere
+rl=60 //in ohm
+vl=1200 //in volt
+
+//Calculation
+Re=rp+((a**2)*rs) //in ohm
+Xe=xp+((a**2)*xs) //in ohm
+c=Re+((a**2)*rl)
+vg=ip*complex(c,Xe) //in volt
+[vgr,vgi]=rect2pol(real(vg),imag(vg)) //rectangle to polar conversion
+vg2=a*vl //in volt
+
+//Result
+printf("(a) Re = %d ohm \n",Re)
+printf(" Xe = %d ohm \n",Xe)
+printf("(b) Vg = %.2f V < %.2f degree \n",vgr,vgi)
+printf("(c) Vg = %.2f V \n",vg2)
+
diff --git a/3883/CH21/EX21.8/EX21_8.sce b/3883/CH21/EX21.8/EX21_8.sce new file mode 100644 index 000000000..be5fe390a --- /dev/null +++ b/3883/CH21/EX21.8/EX21_8.sce @@ -0,0 +1,17 @@ +//Chapter 21, Example 21.8
+clc
+//Initialisation
+L1=5 //in henry
+L2=10 //in henry
+L3=15 //in henry
+M12=2 //in henry
+M23=3 //in henry
+M13=1 //in henry
+
+
+//Calculation
+Lt=L1+L2+L3+(2*M12)-(2*M23)-(2*M13) //in henry
+
+
+//Result
+printf("Lt = %d H \n",Lt)
diff --git a/3883/CH22/EX22.1/EX22_1.sce b/3883/CH22/EX22.1/EX22_1.sce new file mode 100644 index 000000000..8ad8dadd8 --- /dev/null +++ b/3883/CH22/EX22.1/EX22_1.sce @@ -0,0 +1,60 @@ +//Chapter 22, Example 22.1
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+ //Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+ //addition
+function[c1,c2]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+ endfunction
+//Variable Declaration
+teta2 = -120 //angle in degree
+teta3 = 120 //angle in degree
+eo = 120 //in volt
+van = 120 //in volt
+vano = 0 //angle in degree
+vbn = 120 //in volt
+vbno = -120 //angle in degree
+vcn = 120 //in volt
+vcno = 120 //angle in degree
+zan = complex(3,4) //complex form of Zan
+zbn = 5 //in ohm
+zbno = 53.13 //angle in degree
+zcn = 5 //in ohm
+zcno = 53.13 //angle in degree
+
+//Calculation
+el = sqrt(3)*eo //in volt
+[a,b]=rect2polar(real(zan),imag(zan)) //function of conversion
+[b,c]=division(van,a,vano,b) //function of division
+[e,f]=division(vbn,zbn,vbno,zbno) //function of division
+[g,h]=division(vcn,zcn,vcno,zcno) //function of division
+[bb,cc]=polar2rect(b,c) //function of conversion
+[ee,ff]=polar2rect(e,f) //function of conversion
+[gg,hh]=polar2rect(g,h) //function of conversion
+[m,n]=addition(bb,ee,gg,cc,ff,hh) //function of addition
+//Results
+printf("a. theta2 = %d degree and theta3 = +%d degree \n",teta2,teta3)
+printf("b. EL = %d V \n",el)
+printf("c. Ian = %d A < %.2f degree \n",b,c)
+printf(" Ibn = %d A < %.2f degree \n",e,f)
+printf(" Icn = %d A < %.2f degree \n",g,h)
+printf("d. IN = %d + j%d \n",m,n)
diff --git a/3883/CH22/EX22.2/EX22_2.sce b/3883/CH22/EX22.2/EX22_2.sce new file mode 100644 index 000000000..c2389b520 --- /dev/null +++ b/3883/CH22/EX22.2/EX22_2.sce @@ -0,0 +1,55 @@ +//Chapter 22, Example 22.2
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+ //Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+ //addition
+function[c1,c2]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+ endfunction
+//Variable Declaration
+teta2 = -120 //angle in degree
+teta3 = 120 //angle in degree
+vab = 150 //in volts
+vabo = 0 //angle in degree
+vbc = 150 //in volts
+vbco = -120 //angle in degree
+vca = 150 //in volts
+vcao = 120 //angle in degree
+zab = complex(6,8) //complex form of Zab
+zbc = 10 //in ohm
+zbco = 53.13 //angle in degree
+zca = 10 //in ohm
+zcao = 53.13 //angle in degree
+io = 15 //in ampere
+
+//Calculation
+[a,b]=rect2polar(real(zab),imag(zab)) //function of conversion
+[c,d]=division(vab,a,vabo,b) //function of division
+[e,f]=division(vbc,zbc,vbco,zbco) //function of division
+[g,h]=division(vca,zca,vcao,zcao) //function of division
+il = sqrt(3)*io //in ampere
+//Results
+printf("a. theta2 = %d degree and theta3 = +%d degree \n",teta2,teta3)
+printf("b. Iab = %d A < %.2f degree \n",b,c)
+printf(" Ibc = %d A < %.2f degree \n",e,f)
+printf(" Ica = %d A < %.2f degree \n",g,h)
+printf("c. IL = %.2f A \n",il)
diff --git a/3883/CH22/EX22.3/EX22_3.sce b/3883/CH22/EX22.3/EX22_3.sce new file mode 100644 index 000000000..6e4972b0c --- /dev/null +++ b/3883/CH22/EX22.3/EX22_3.sce @@ -0,0 +1,66 @@ +//Chapter 22, Example 22.3
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+ //Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+ //addition
+function[c1,c2]=addition(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+//Variable Declaration
+teta2 = -120 //angle in degree
+teta3 = 120 //angle in degree
+vab = 120 //in volts
+vabo = 0 //angle in degree
+vbc = 120 //in volts
+vbco = 120 //angle in degree
+vca = 120 //in volts
+vcao = -120 //angle in degree
+zab1 = 5 //in volt
+zab1o = 0 //angle in degree
+zab2 = 5 //in volt
+zab2o = -90 //angle in degree
+zab = complex(5,-5) //complex form Zab
+zbc = 3.54 //in ohm
+zbco = -45 //angle in degree
+zca = 3.54 //in ohm
+zcao = -45 //angle in degree
+io = 34 //in ampere
+
+//Calculation
+[aa,bb]=voltdivider(zab1,zab2,zab1o,zab2o) //function of multiplication
+[a,b]=rect2polar(real(zab),imag(zab)) //function of conversion
+[s,t]=division(aa,a,bb,b) //function of division
+[c,d]=division(vab,s,vabo,t) //function of division
+[e,f]=division(vbc,zbc,vbco,zbco) //function of division
+[g,h]=division(vca,zca,vcao,zcao) //function of division
+il = sqrt(3)*io //in ampere
+//Results
+printf("a. theta2 = %d degree and theta3 = +%d degree \n",teta2,teta3)
+printf("b. Iab = %.1f A < %d degree \n",c,d)
+printf(" Ibc = %.1f A < %d degree \n",e,f)
+printf(" Ica = %.1f A < %d degree \n",g,h)
+printf("c. IL = %.2f A \n",il)
diff --git a/3883/CH22/EX22.4/EX22_4.sce b/3883/CH22/EX22.4/EX22_4.sce new file mode 100644 index 000000000..9b0fe7449 --- /dev/null +++ b/3883/CH22/EX22.4/EX22_4.sce @@ -0,0 +1,26 @@ +//Chapter 22, Example 22.4
+clc
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+//Variable Declaration
+ian = 2 //in ampere
+iano = 0 //angle in degree
+ibn = 2 //in ampere
+ibno = -120 //angle in degree
+icn = 2 //in ampere
+icno = 120 //angle in degree
+zan = 10 //in ohm
+zano = -53.13 //angle in degree
+//Calculation
+[a,b]=voltdivider(ian,zan,iano,zano) //function of multiplication
+[c,d]=voltdivider(ibn,zan,ibno,zano) //function of multiplication
+[e,f]=voltdivider(icn,zan,icno,zano) //function of multiplication
+el = sqrt(3)*a //in volt
+//Results
+printf("a. Van = %d V < %.2f degree \n",a,b)
+printf(" Vbn = %d V < %.2f degree \n",c,d)
+printf(" Vcn = %d V < %.2f degree \n",e,f)
+printf("b. El = %.1f V ",el)
diff --git a/3883/CH22/EX22.5/EX22_5.sce b/3883/CH22/EX22.5/EX22_5.sce new file mode 100644 index 000000000..1ad65a90c --- /dev/null +++ b/3883/CH22/EX22.5/EX22_5.sce @@ -0,0 +1,39 @@ +//Chapter 22, Example 22.5
+clc
+//Variable Declaration
+vo = 100 //in volt
+io = 20 //in ampere
+teta = 53.13 //angle in degree
+ro = 3 //in ohm
+vr = 60 //in volt
+el = 173.2 //in volt
+il = 20 //in ampere
+xo = 4 //in ohm
+//Calculation
+po = vo*io*cosd(teta) //in watt
+po1 = io*io*ro //in watt
+po2 = (vr*vr)/ro //in watt
+pt = 3*po //in watt
+pt1 = sqrt(3)*el*il*cosd(teta) //in watt
+qo = vo*io*sind(teta) //in VAR
+qo1 = io*io*xo //in VAR
+qt = 3*qo //in VAR
+qt1 = sqrt(3)*el*il*sind(teta) //in VAR
+so = vo*io //in VA
+st = 3*so //in VA
+st1 = sqrt(3)*el*il //in VA
+fp = pt1/st1 //lagging
+//Results
+printf("a. Po = %d W \n",po)
+printf(" Po = %d W \n",po1)
+printf(" Po = %d W \n",po2)
+printf(" Pt = %d W \n",pt)
+printf(" Pt = %d W \n",pt1)
+printf("b. Qo = %d VAR \n",qo)
+printf(" Qo = %d VAR \n",qo1)
+printf(" Qt = %d VAR \n",qt)
+printf(" Qt = %d VAR \n",qt1)
+printf("c. So = %d VA \n",so)
+printf(" St = %d VA \n",st)
+printf(" St = %d VA \n",st1)
+printf("d. Fp = %.1f lagging \n",fp)
diff --git a/3883/CH22/EX22.6/EX22_6.sce b/3883/CH22/EX22.6/EX22_6.sce new file mode 100644 index 000000000..3d281518a --- /dev/null +++ b/3883/CH22/EX22.6/EX22_6.sce @@ -0,0 +1,52 @@ +//Chapter 22, Example 22.6
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+//Variable Declaration
+zd = complex(6,-8) //complex form of Zd
+el = 200 //in volt
+io = 20 //in ampere
+ro = 6 //in ohm
+xo = 8 //in ohm
+vo = 200 //in volt
+zy = complex(4,3) //complex form of Zy
+ro1 = 4 //in ohm
+xo1 = 3 //in ohm
+vo1 = 116 //in volt
+
+//Calculation
+[a,b]=rect2polar(real(zd),imag(zd)) //function of conversion
+io = el/a //in ampere
+pt = 3*io*io*ro //power in watt
+qt = 3*io*io*xo //in VAR
+st = 3*vo*io //in VA
+[c,d]=rect2polar(real(zy),imag(zy)) //function of conversion
+io1 = (el/sqrt(3))/(c) //in ampere
+pty = 3*(io1*io1)*ro1 //power in watt
+qty = 3*(io1*io1)*xo1 //in VAR
+sty = 3*vo1*io1 //in VA
+ptt = pt+pty //power in watt
+qtt = qt-qty //in VAR
+stt = sqrt((ptt*ptt)+(qtt*qtt)) //in VA
+fp = ptt/stt //leading
+//Results
+printf("For the delta: \n")
+printf("Pt = %d W \n",pt)
+printf("Qt = %d VAR (C) \n",qt)
+printf("St = %d VA \n",st)
+printf("For he Y: \n")
+printf("Pty = %d W \n",pty)
+printf("Qty = %d VAR (L) \n",qty)
+printf("Sty = %.2f VA \n",sty)
+printf("For the total load:\n")
+printf("Pt = %d W \n",ptt)
+printf("Qt = %.d VAR (C) \n",qtt)
+printf("St = %.1f VA \n",stt)
+printf("Fp = %.3f leading \n",fp)
diff --git a/3883/CH22/EX22.7/EX22_7.sce b/3883/CH22/EX22.7/EX22_7.sce new file mode 100644 index 000000000..153e4638b --- /dev/null +++ b/3883/CH22/EX22.7/EX22_7.sce @@ -0,0 +1,56 @@ +//Chapter 22, Example 22.7
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=atand(y/x)
+ end
+endfunction
+//addition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//Variable Declaration
+vl = 12000 //in volt
+pt = 160000 //power in watt
+vo = 6936.42 //in volt
+voo = 0 //angle in degree
+co = 0.86 //cos
+ioo= -30.68 //angle in degree
+zl = 25 //in ohm
+zlo = 53.13 //angle in degree
+rl = 15 //in ohm
+//Calculation
+vo = vl/sqrt(3) //in volt
+io = pt/(3*vo*co) //in ampere
+[a,b]=voltdivider(io,zl,ioo,zlo) //function of multiplication
+[c,d]=polar2rect(a,b) //function of conversion
+[e,f]=polar2rect(vo,voo) //function of conversion
+[g,h]=addition(c,e,d,f) //function of addition
+[gg,hh]=rect2polar(g,h) //function of conversion
+eab = sqrt(3)*gg //in volt
+pline = 3*io*io*rl //power line in watt
+ptt= pt+pline //total power
+co1= pt/(sqrt(3)*eab*io) //cos
+n = (pt/ptt)*100 //efficiency in percentage
+//Results
+printf("a. Io = %.2f A \n",io)
+printf(" Eab = %.2f V \n",eab)
+printf("b. Fp = %.2f < 0.86 of load \n",co1)
+printf("c. n = %.1f percent \n",n)
diff --git a/3883/CH22/EX22.8/EX22_8.sce b/3883/CH22/EX22.8/EX22_8.sce new file mode 100644 index 000000000..a57bbfd73 --- /dev/null +++ b/3883/CH22/EX22.8/EX22_8.sce @@ -0,0 +1,81 @@ +//Chapter 22, Example 22.8
+clc
+funcprot(0)
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=-90
+ else
+ th=atand(y/x)
+ if (x<0) & (y<0) then
+ th=th-180
+ end
+ end
+endfunction
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar1(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=90
+ else
+ th=-atand(y/x)
+ end
+endfunction
+
+//subtraction
+function[c1,c2]=subtraction(x1,x2,y1,y2)
+ c1 = x1-x2
+ c2 = y1-y2
+ endfunction
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+ //Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//Variable Declaration
+eab = 208 //real value
+eabo = 0 //angle in degree
+zab = 10 //real value
+zabo = 0 //angle in degree
+ebco = -120 //angle in degree
+ecao = 120 //angle in degree
+zbc = complex(15,20) //complex form of Zbc
+zca = complex(12,12) //complex form of Zca
+
+//Calculation
+[a,b]=division(eab,zab,eabo,zabo) //Iab function of division
+[c,d]=rect2polar(real(zbc),imag(zbc)) //function of conversion
+[e,f]=division(eab,c,ebco,d) //Ibc function of division
+[g,h]=rect2polar1(real(zca),imag(zca)) //function of conversion
+[m,n]=division(eab,g,ecao,h) //Ica function of division
+[aa,bb]=polar2rect(a,b) //function of conversion
+[mm,nn]=polar2rect(m,n) //function of conversion
+[o,p]=subtraction(aa,mm,bb,nn) //function of subtraction
+[s,t]=rect2polar(o,p) //Iaa function of conversion
+[ee,ff]=polar2rect(e,f) //function of conversion
+[oo,pp]=subtraction(ee,aa,ff,bb) //function of subtraction
+[oa,pa]=rect2polar(oo,pp) //function of conversion
+[ob,pb]=subtraction(mm,ee,nn,ff) //function of subtraction
+[oc,pc]=rect2polar(ob,pb) //function of conversion
+od=(eab*s)*cosd(5.55) //in watt
+pd = (eab*oc)*cosd(70.65) //in watt
+pt = od+pd //in watt
+ptt = (a*a*zab)+(e*e*real(zbc))+(m*m*real(zca)) //in watt
+//Results
+printf("a. Iab = %.1f A < %d degree \n",a,b)
+printf(" Ibc = %.2f A < %.2f degree \n",e,f)
+printf(" Ica = %.2f A < %d degree \n",m,n)
+printf("b. IAa = %.2f A < %.2f degree \n",s,t)
+printf(" IBb = %.2f A < %.2f degree \n",oa,pa)
+printf(" ICc = %.1f A < %.2f degree \n",oc,pc)
+printf("c. P1 = %.2f W \n",od)
+printf(" P2 = %.1f W \n",pd)
+printf("d. PT = %.2f W \n",pt)
+printf("e. PT = %.2f W \n",ptt)
diff --git a/3883/CH22/EX22.9/EX22_9.sce b/3883/CH22/EX22.9/EX22_9.sce new file mode 100644 index 000000000..d610ead3a --- /dev/null +++ b/3883/CH22/EX22.9/EX22_9.sce @@ -0,0 +1,104 @@ +//Chapter 22, Example 22.9
+clc
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ if x==0 then
+ th=-90
+ elseif x<0 then
+ th=atand(y/x)+180
+ else
+ th=atand(y/x)
+ if (x<0) & (y<0) then
+ th=th-180
+ end
+ end
+endfunction
+
+//Polar to Rectangle conversion
+function [r,i]= polar2rect(x,y)
+ r=(x*cosd(y))/1000
+ i=(x*sind(y))/1000
+endfunction
+
+//addition
+function[c1,c2]=addition(x1,x2,y1,y2)
+ c1 = x1+x2
+ c2 = y1+y2
+ endfunction
+//addition
+function[c1,c2]=addition1(x1,x2,x3,y1,y2,y3)
+ c1 = x1+x2+x3
+ c2 = y1+y2+y3
+ endfunction
+
+function[c1,c2]=subtraction(x1,x2,x3,y1,y2,y3)
+ c1 = x1-x2-x3
+ c2 = y1-y2-y3
+ endfunction
+
+function[c1,c2]=subtraction1(x1,x2,y1,y2)
+ c1 = x1-x2
+ c2 = y1-y2
+ endfunction
+ //multiplication
+function [r,s] = voltdivider(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1+y2
+endfunction
+ //multiplication
+function [r,s] = voltdivider1(x1,x2,y1,y2)
+ r=x1*x2
+ s=y1-y2
+endfunction
+//division
+function[q,x]=division(x1,x2,y1,y2)
+ q=x1/x2
+ x=y1-y2
+ endfunction
+
+function[c1,c2]=subtraction1(x1,x2,y1,y2)
+ c1 = x1-x2
+ c2 = y1-y2
+ endfunction
+//Variable Declaration
+eca = 200 //real value
+ecao = 120 //angle in degree
+z2 = 200 //real value
+z2o = 0 //angle in degree
+ebc = 200 //real value
+ebco = -120 //angle in degree
+z1 = 166 //real value
+z1o = -90 //angle in degree
+z3 = 200 //real value
+z3o = 0 //angle in degree
+eab = 200 //real value
+eabo = 0 //angle in degree
+
+//Calculation
+[a,b]=voltdivider(eca,z2,ecao,z2o) //EcaxZ2
+[aa,bb]=voltdivider1(ebc,z1,ebco,z1o) //Ebcxz1
+[e,f]=polar2rect(a,b) //function of conversion
+[ee,ff]=polar2rect(aa,bb) //function of conversion
+[ac,bc]=addition(e,ee,f,ff) //function of addiion
+[ad,bd]=rect2polar(ac,bc) //num
+[c,d]=voltdivider(z1,z2,z1o,z2o) //z1xz2
+[ca,da]=voltdivider(z1,z3,z1o,z3o) //z1xz3
+[cb,db]=voltdivider(z2,z3,z2o,z3o) //z2xz3
+[cc,dd]=polar2rect(c,d) //function of conversion
+[ce,de]=polar2rect(ca,da) //function of conversion
+[cf,df]=polar2rect(cb,db) //function of conversion
+[cg,dg]=addition1(cc,ce,cf,dd,de,df) //function of addition
+[ci,di]=rect2polar(cg,dg) //function of conversion
+[ch,dh]=division(ad,ci,bd,di) //function of division
+[i,j]=voltdivider(eab,z3,eabo,z3o) //function of multiplication
+[ia,ja]=polar2rect(i,j) //function of conversion
+[ic,jc]=voltdivider(ebc,z1,ebco,z1o) //function of multiplication
+[id,jd]=polar2rect(ic,jc) //function of conversion
+[ib,jb]=subtraction1(id,ia,jd,ja) //function of subtraction
+[ie,je]=rect2polar(ib,jb) //num
+[if,jf]=division(ie,ci,je,di) //function of division
+
+//Results
+printf("Icn = %.2f A < %.2f degree \n",ch,dh)
+printf("Ibn = %.2f A < %.2f degree \n",if,jf)
diff --git a/3883/CH23/EX23.1/EX23_1.sce b/3883/CH23/EX23.1/EX23_1.sce new file mode 100644 index 000000000..015ed37f8 --- /dev/null +++ b/3883/CH23/EX23.1/EX23_1.sce @@ -0,0 +1,14 @@ +//Chapter 23, Example 23.1
+clc
+//Variable Declaration
+d1=7/16 //from plot
+d2=3/4 //from plot
+
+
+//Calculation
+d=d1/d2
+c=10**d
+value=(10**2)*c
+
+//Results
+printf("Value = %.1f \n",value)
diff --git a/3883/CH23/EX23.10/EX23_10.sce b/3883/CH23/EX23.10/EX23_10.sce new file mode 100644 index 000000000..8dd4deab6 --- /dev/null +++ b/3883/CH23/EX23.10/EX23_10.sce @@ -0,0 +1,62 @@ +//Chapter 23, Example 23.10
+clc
+//Variable Declaration
+r1=1000 //resistance in ohm
+c1=0.1*10**-6 //capacitance in farad
+
+
+
+//Calculation
+f1=1/(2*3.14*r1*c1) //cutoff frequency in hertz
+
+//for magnitude plot
+f = 100:10:10*f1;
+av = (1+(f1./f).^2).^(-1/2); //-10*log10
+av1 = -20*log10(f1/f1);
+f2 = f1/10;
+av2 = -20*log10(f1/f2);
+f3 = f1/2;
+av3 = -20*log10(f1/f3);
+f4 = f1;
+av4 = -20*log10(f1/f4);
+x = [f2 f3 f4 f1];
+y = [av2 av3 av4 av1];
+scf(1)
+gainplot(f,av);
+a = gca();
+a.y_location = 'left';
+a.x_location = 'top';
+a.x_label.text = 'frequency';
+a.y_label.text = 'Av';
+a.title.text = 'Magnitude Plot';
+plot2d(x,y);
+
+//for phase plot
+f01 = 10:10:10*f1;
+teta = atand(f1./f)
+f11=f1
+teta1 = atand(f1./f11)
+f12=f1/10
+teta2 = atand(f1./f12)
+f13=f1*10
+teta3 = atand(f1./f13)
+x1 = [f11 f12 f13 ];
+y1 = [teta1 teta2 teta3];
+scf(2)
+phaseplot(f,av,teta)
+b = gca();
+b.x_label.text = 'frequency';
+b.y_label.text = 'Av';
+b.title.text = 'Phase Plot';
+plot2d(x1,y1)
+
+f5=1000 //frequency in hertz
+av3 = 20*log10(1/sqrt((((f1/f5)**2)+1))); //gain
+
+
+//Results
+printf('(a) fc = %.2f Hz \n',f1)
+printf(' Magnitude plot shown in window 1 \n')
+printf('(b) |AvdB| = %.2f dB \n',av3)
+printf('(c) Phase plot shown in window 2')
+
diff --git a/3883/CH23/EX23.11/EX23_11.sce b/3883/CH23/EX23.11/EX23_11.sce new file mode 100644 index 000000000..cf9c71af1 --- /dev/null +++ b/3883/CH23/EX23.11/EX23_11.sce @@ -0,0 +1,57 @@ +//Chapter 23, Example 23.11
+clc
+//Variable Declaration
+r1=9100 //resistance in ohm
+c1=0.47*10**-6 //capacitance in farad
+r2=1000 //resistance in ohm
+
+
+//Calculation
+r12=(r1*r2)/(r1+r2) //parallel resistance in ohm
+f1=1/(2*3.14*r1*c1) // frequency in hertz
+fc=1/(2*3.14*r12*c1) // frequency in hertz
+al=-20*log10((r1+r2)/r2) //maximum low-level attentuation
+
+teta1=-(atand(f1/f1))+(atand(fc/f1)) //in degrees
+teta2=-(atand(f1/fc))+(atand(fc/fc)) //in degrees
+teta3=-(atand(f1/120))+(atand(fc/120)) //in degrees
+
+//for magnitude plot
+f = 1:10:8*fc;
+av=((1+((f1./f).^2))./(1+((fc./f).^2))).^(1/2) //-10*log10
+f2 = f1
+av2=10*log10((1+((f1./f2).^2))./(1+((fc./f2).^2)))
+f3 = fc
+av3=10*log10((1+((f1./f3).^2))./(1+((fc./f3).^2)))
+x = [f2 f3];
+y = [av2 av3];
+scf(1)
+gainplot(f,av);
+a = gca();
+a.y_location = 'left';
+a.x_location = 'top';
+a.x_label.text = 'frequency';
+a.y_label.text = 'Av';
+a.title.text = 'AcdB versus frequency for the filter';
+plot2d(x,y);
+plot(f2,av2,'*');
+plot(f3,av3,'*');
+
+//for phase plot
+teta=-(atand(f1./f))+(atand(fc./f))
+scf(2)
+plot2d('ln',f,teta)
+plot(f1,teta1,'*')
+plot(fc,teta2,'*')
+plot(120,teta3,'*')
+xtitle('phase vs frequency for the filter')
+xlabel('frequency')
+ylabel('phase in degree')
+
+
+//Results
+printf('(a) f1 = %.1f Hz \n',f1)
+printf(' fc = %.2f Hz \n',fc)
+printf('(b) At f1 = 32.2 Hz, teta = %.2f degree \n',teta1)
+printf(' At fc = 376.26 Hz, teta = %.2f degree \n',teta2)
+printf(' At frequency midway between fc and f1, like 120 Hz, teta = %.2f degree \n',teta3)
diff --git a/3883/CH23/EX23.12/EX23_12.sce b/3883/CH23/EX23.12/EX23_12.sce new file mode 100644 index 000000000..08fbec003 --- /dev/null +++ b/3883/CH23/EX23.12/EX23_12.sce @@ -0,0 +1,124 @@ +//Chapter 23, Example 23.12
+clc
+f1=50 //frequency in hertz
+f2=200 //frequency in hertz
+f3=10000 //frequency in hertz
+f4=20000 //frequency in hertz
+f8=8500 //frequency in hertz
+f9=1000 //frequency in hertz
+
+//Calculations
+AvdB1=-20*log10(sqrt((1+(f1/f3)^2)*(1+((f2/f3)^2))*(1+(f3/f3)^2)*(1+((f3/f4)^2)))) //in dB
+AvdB2=-20*log10(sqrt((1+(f8/f3)^2)*(1+((f8/f4)^2)))) //in dB
+BW=f8-f2 //in hertz
+AvdB3=-20*log10(sqrt((1+(f1/f9)^2)*(1+((f2/f9)^2)))) //in dB
+
+//phase plot
+f = 10:100:200000;
+teta=(atand(f1./f))+(atand(f2./f))-(atand(f./f3))-(atand(f./f4))
+scf(1)
+plot2d('ln',f,teta)
+xgrid(1)
+a = gca();
+a.y_location = 'left';
+a.x_location = 'top';
+a.x_label.text = 'frequency';
+a.y_label.text = 'Phase';
+a.title.text = 'Phase response';
+
+//for magnitude plot
+av = -((1+(f1./f)^2).*(1+((f2./f).^2)))^(-1/2);
+av1 = -20*log10(f1/f1);
+f12 = f1/10;
+av2 = -20*log10(f1/f12);
+f13 = f1/4;
+av3 = -20*log10(f1/f13);
+f14 = f1/2;
+av4 = -20*log10(f1/f14);
+
+x = [f12 f13 f14 f1];
+y = [av2 av3 av4 av1];
+scf(2)
+gainplot(f,av);
+a = gca();
+a.y_location = 'left';
+a.x_location = 'top';
+a.x_label.text = 'frequency';
+a.y_label.text = 'Av';
+a.title.text = 'Bode';
+plot2d(x,y);
+
+f1=f2
+av1 = -20*log10(f1/f1);
+f12 = f1/10;
+av2 = -20*log10(f1/f12);
+f13 = f1/4;
+av3 = -20*log10(f1/f13);
+f14 = f1/2;
+av4 = -20*log10(f1/f14);
+
+x = [f12 f13 f14 f1];
+y = [av2 av3 av4 av1];
+
+gainplot(f,av);
+a = gca();
+a.y_location = 'left';
+a.x_location = 'top';
+a.x_label.text = 'frequency';
+a.y_label.text = 'Av';
+a.title.text = 'Bode';
+plot2d(x,y);
+
+
+
+
+av = -((1+(f./f3)^2).*(1+((f./f4).^2)))^(-1/2);
+
+gainplot(f,av);
+a = gca();
+a.y_location = 'left';
+a.x_location = 'top';
+a.x_label.text = 'frequency';
+a.y_label.text = 'Av';
+a.title.text = 'Bode';
+plot2d(x,y);
+
+
+f1 = f3;
+f = 0.1*f1:100:10*f1;
+av = (1+(f/f1)^2)^(-1/2);
+av1 = -20*log10(f1/f1);
+f2 = f1*10;
+av2 = -20*log10(f2/f1);
+f3 = f1*4;
+av3 = -20*log10(f3/f1);
+f4 = f1*2;
+av4 = -20*log10(f4/f1);
+
+x = [f1 f4 f3 f2];
+y = [av1 av4 av3 av2];
+plot2d(x,y);
+
+f1 = f4;
+f = 0.1*f1:100:10*f1;
+av = (1+(f/f1)^2)^(-1/2);
+av1 = -20*log10(f1/f1);
+f2 = f1*10;
+av2 = -20*log10(f2/f1);
+f3 = f1*4;
+av3 = -20*log10(f3/f1);
+f4 = f1*2;
+av4 = -20*log10(f4/f1);
+
+x = [f1 f4 f3 f2];
+y = [av1 av4 av3 av2];
+plot2d(x,y);
+
+
+printf('for 10kHz,\n')
+printf('AvdB = %.1f dB \n',AvdB1)
+printf('for 8.5kHz, \n')
+printf('AvdB = %.1f dB \n',AvdB2)
+printf('BW = %.1f kHz \n',BW/1000)
+printf('for midrange of bandwidth 1kHz, \n')
+printf('AvdB = %.1f dB \n',AvdB3)
diff --git a/3883/CH23/EX23.2/EX23_2.sce b/3883/CH23/EX23.2/EX23_2.sce new file mode 100644 index 000000000..bc30f4a4f --- /dev/null +++ b/3883/CH23/EX23.2/EX23_2.sce @@ -0,0 +1,25 @@ +//Chapter 23, Example 23.2
+clc
+//Variable Declaration
+a1=0.004
+a2=250000
+a31=0.08
+a32=240
+a41=10**4
+a42=10**-4
+a5=10**4
+
+
+//Calculation
+a=log10(a1)
+b=log10(a2)
+c=log10(a31)+log10(a32)
+d=log10(a41)-log10(a42)
+e=log10(a5)
+
+//Results
+printf("(a) %.3f \n",a)
+printf("(b) %.3f \n",b)
+printf("(c) %.3f \n",c)
+printf("(d) %.1f \n",d)
+printf("(e) %d \n",e)
diff --git a/3883/CH23/EX23.3/EX23_3.sce b/3883/CH23/EX23.3/EX23_3.sce new file mode 100644 index 000000000..2202cc93e --- /dev/null +++ b/3883/CH23/EX23.3/EX23_3.sce @@ -0,0 +1,12 @@ +//Chapter 23, Example 23.3
+clc
+//Variable Declaration
+vo=1.2 //output voltage in V
+vi=2*10**-3 //input voltage in mV
+
+
+//Calculation
+dbv=20*log10(vo/vi) //dB gain
+
+//Results
+printf("dBv = %.2f dB\n",dbv)
diff --git a/3883/CH23/EX23.4/EX23_4.sce b/3883/CH23/EX23.4/EX23_4.sce new file mode 100644 index 000000000..27434c686 --- /dev/null +++ b/3883/CH23/EX23.4/EX23_4.sce @@ -0,0 +1,12 @@ +//Chapter 23, Example 23.4
+clc
+//Variable Declaration
+vo=6.8 //output voltage in V
+db=36 //dB gain
+
+
+//Calculation
+vi=vo/(10**(db/20)) //input voltage
+
+//Results
+printf("Vi = %.2f mV\n",vi*10**3)
diff --git a/3883/CH23/EX23.5/EX23_5.sce b/3883/CH23/EX23.5/EX23_5.sce new file mode 100644 index 000000000..a5e9a039f --- /dev/null +++ b/3883/CH23/EX23.5/EX23_5.sce @@ -0,0 +1,46 @@ +//Chapter 23, Example 23.5
+clc
+//Variable Declaration
+r1=1000 //resistance in ohm
+c1=500*10**-12 //capacitance in farad
+f1=100000 //frequency in hertz
+f2=1*10**6 //frequency in hertz
+vi=20 //input voltage
+
+//Calculation
+fc=1/(2*3.14*r1*c1) //cutoff frequency in hertz
+xc=1/(2*3.14*c1*fc) //impedance in ohm
+xc1=1/(2*3.14*c1*f1) //impedance in ohm
+xc2=1/(2*3.14*c1*f2) //impedance in ohm
+vo1=vi/sqrt(((r1/xc1)**2)+1) //output voltage
+vo2=vi/sqrt(((r1/xc2)**2)+1) //output voltage
+voc=vi/sqrt(((r1/xc)**2)+1) //output voltage
+
+//graph
+//for frequency response
+x= 0.1*fc : 10000 : fc*20
+xc11=(2*3.14*c1*x).^-1
+vo=vi./sqrt(((r1./xc11)**2)+1)
+plot2d('ln',x,vo)
+plot(f1,vo1,'*')
+plot(f2,vo2,'*')
+plot(fc,voc,'*')
+xtitle('Frequency response for the low-pass R-C network')
+xlabel('f');
+ylabel('Vo');
+
+//for normalized plot
+scf(2)
+plot2d('ln',x,vo/vi)
+plot(f1,vo1/vi,'*')
+plot(f2,vo2/vi,'*')
+plot(fc,voc/vi,'*')
+xtitle('Normalized plot for the low-pass R-C network')
+xlabel('f');
+ylabel('Av');
+
+//Results
+printf('(a) fc = %.2f kHz \n',fc)
+printf('(b) At f = 100 kHz, Vo = %.2f V \n',vo1)
+printf(' At f = 1 MHz, Vo = %.1f V \n',vo2)
+printf("Vi = %.2f mV\n",vi*10**3)
diff --git a/3883/CH23/EX23.6/EX23_6.sce b/3883/CH23/EX23.6/EX23_6.sce new file mode 100644 index 000000000..678aa87cf --- /dev/null +++ b/3883/CH23/EX23.6/EX23_6.sce @@ -0,0 +1,51 @@ +//Chapter 23, Example 23.6
+clc
+//Variable Declaration
+r1=20000 //resistance in ohm
+c1=1200*10**-12 //capacitance in farad
+
+
+//Calculation
+fc=1/(2*3.14*r1*c1) //cutoff frequency in hertz
+f=fc/2 //frequency in hertz
+xc=1/(2*3.14*c1*f) //capacitive reactancce in ohms
+av=1/sqrt(1+((xc/r1)**2)) //voltage gain
+teta=atand(xc/r1) //phase in degree
+
+//graph
+x= 0 : 500 : fc*3
+xc1=(2*3.14*c1*x).^-1
+av1=r1./sqrt((r1**2)+(xc1**2)) //normalised gain
+av2=xc1./sqrt((r1**2)+(xc1**2)) //normalised gain
+
+teta1=atand(xc1/r1) //phase plot
+teta2=atand(r1*xc1**-1) //phase plot
+scf(1)
+plot2d(x,av1)
+xtitle('Normalised Plot - High Pass')
+xlabel('f (log scale)')
+ylabel('Av')
+
+scf(2)
+plot2d(x,av2)
+xtitle('Normalised Plot - Low Pass')
+xlabel('f (log scale)')
+ylabel('Av')
+
+
+scf(3)
+plot2d(x,teta1)
+xtitle('Phase Plot - High Pass')
+xlabel('f (log scale)')
+ylabel('teta')
+
+scf(4)
+plot2d(x,teta2)
+xtitle('Phase Plot - Low Pass')
+xlabel('f (log scale)')
+ylabel('teta')
+
+clc
+//Results
+printf('(a) fc = %.2f Hz \n',fc)
+printf("Av = Vo / Vi = %.4f < %.2f degree",av,teta)
diff --git a/3883/CH23/EX23.7/EX23_7.sce b/3883/CH23/EX23.7/EX23_7.sce new file mode 100644 index 000000000..3f83a9546 --- /dev/null +++ b/3883/CH23/EX23.7/EX23_7.sce @@ -0,0 +1,43 @@ +//Chapter 23, Example 23.7
+clc
+//Variable Declaration
+r1=1000 //resistance in ohm
+c1=1.5*10**-9 //capacitance in farad
+r2=40000 //resistance in ohm
+c2=4*10**-12 //capacitance in farad
+
+
+//Calculation
+fc1=1/(2*3.14*r1*c1) //cutoff frequency in hertz
+fc2=1/(2*3.14*r2*c2) //cutoff frequency in hertz
+
+
+
+//graph
+x1= 0 : 1000 : fc1*200
+x2= 0 : 1000 : fc2*1000
+xc1=(2*3.14*c1*x1).^-1 //impedance in ohm
+xc2=(2*3.14*c2*x2).^-1 //impedance in ohm
+av1=r1./sqrt((r1**2)+(xc1**2)) //normalised gain
+av2=xc2./sqrt((r2**2)+(xc2**2)) //normalised gain
+
+
+scf(1)
+//plot2d('ln',[x1 x2],[av1 av2])
+plot2d('ln',x1,av1)
+xtitle('Normalised Plot - High Pass')
+xlabel('f')
+ylabel('Vo')
+
+scf(2)
+plot2d('ln',x2,av2)
+xtitle('Normalised Plot - Low Pass')
+xlabel('f')
+ylabel('Vo')
+
+
+clc
+//Results
+printf('(a) High Pass filter, fc = %.1f kHz \n',fc1/1000)
+printf(' Low Pass filter, fc = %.1f kHz \n',fc2/1000)
+printf("(c) Av = Vo / Vi = %.4f < %.2f degree",av,teta)
diff --git a/3883/CH23/EX23.8/EX23_8.sce b/3883/CH23/EX23.8/EX23_8.sce new file mode 100644 index 000000000..b7807a7eb --- /dev/null +++ b/3883/CH23/EX23.8/EX23_8.sce @@ -0,0 +1,38 @@ +//Chapter 23, Example 23.8
+clc
+//Variable Declaration
+l1=1*10**-3 //inductance in henry
+c1=0.01*10**-6 //capacitance in farad
+r1=33 //resistance in ohm
+r2=2 //resistance in ohm
+vi=20*10**-3 //input voltage
+
+//Calculation
+fs=1/(2*3.14*sqrt(l1*c1)) //frequency in hertz
+xl=2*3.14*fs*l1 //inductive reactance
+qs=xl/(r1+r2) //Q factor
+bw=fs/qs //bandwidth in hertz
+vomax=(r1*vi)/(r1+r2) //max voltage
+vo=0.707*vi*(r1/(r1+r2)) //voltage
+
+
+//Insufficient data on textbook problem to plot graph
+//graph
+x=0:1000:fs*2
+//ztp1=(((2*3.14*x*l1)/(r1+r2))**2)*r2
+xl=2*3.14*x*l1
+xc=1/(2*3.14*x*c1)
+zs=sqrt((r2**2)+(xl-xc')**2)
+vo1=(zs*vi)./(zs+r1)
+plot2d(x,vo1)
+xtitle('Passband response')
+xlabel('f')
+ylabel('Vo')
+
+
+//Results
+clc
+printf('(a) fs = %.1f Hz \n',fs)
+printf('Qs = %.2f \n',qs)
+printf('BW = %.2f kHz \n',bw/1000)
+printf('Vomax = %.2f mV \n', vomax*1000)
diff --git a/3883/CH23/EX23.9/EX23_9.sce b/3883/CH23/EX23.9/EX23_9.sce new file mode 100644 index 000000000..83d031c64 --- /dev/null +++ b/3883/CH23/EX23.9/EX23_9.sce @@ -0,0 +1,18 @@ +//Chapter 23, Example 23.9
+clc
+//Variable Declaration
+c=500*10**-12 //capacitance in farad
+f1=200*10**3 //frequency in hertz
+f2=600*10**3 //frequency in hertz
+
+
+//Calculation
+l1=1/(4*(%pi**2)*(f2**2)*c) //inductance in henry
+xls=2*%pi*f1*l1 //inductive reactance in ohms
+xc=1/(2*%pi*f1*c) //capacitive reactance in ohms
+j=xc-xls //for series elements
+lp=j/(2*%pi*f1) //inductance in henry
+
+//Results
+printf("Ls = %.1f uH\n",l1*10**6)
+printf("Lp = %.2f mH",lp*10**3)
diff --git a/3883/CH24/EX24.1/EX24_1.sce b/3883/CH24/EX24.1/EX24_1.sce new file mode 100644 index 000000000..f274cd265 --- /dev/null +++ b/3883/CH24/EX24.1/EX24_1.sce @@ -0,0 +1,23 @@ +//Chapter 24, Example 24.1
+clc
+//Initialisation
+t1=12 //time period in ms
+t2=7 //time period in ms
+v1=8 //voltage
+v2=4 //voltage
+v3=12 //voltage
+v4=11 //voltage
+vb=-4 //voltage from graph
+
+//Calculation
+tp=t1-t2 //time period in ms
+vmax=v1+v2 //maximum amplitude voltage
+v=(v3+v4)/2 //voltage
+vp=((v3-v4)/v)*100 //tilt in percent
+
+//Result
+printf("(a) Positive-going \n") //from graph
+printf("(b) Vb = %d V\n",vb)
+printf("(c) tp = %d ms \n",tp)
+printf("(d) Vmax = %d V \n",vmax)
+printf("(e) V (tilt in percentage) = %.3f percent",vp)
diff --git a/3883/CH24/EX24.10/EX24_10.sce b/3883/CH24/EX24.10/EX24_10.sce new file mode 100644 index 000000000..5e7b12417 --- /dev/null +++ b/3883/CH24/EX24.10/EX24_10.sce @@ -0,0 +1,58 @@ +//Chapter 24, Example 24.10
+clc
+//Initialisation
+f=1000 //frequency in hertz
+r=5*10**3 //resistance in ohm
+c=0.01*10**-6 //capacitance in farad
+vi=0 //for charging phasse, voltage
+vf=10 //voltage in mV
+vi2=10 //for discharging phasse, voltage in mV
+vf2=0 //voltage
+t1=0 //for charging phase for ic
+vr=vf
+
+
+//Calculation
+t=1/f //time period in sec
+tp=t/2 //phase time in sec
+tau=r*c //time constant in sec
+irmax=vr/r //current in milliampere
+
+//Result
+printf("(a) tp = %.1f ms \n",tp*10**3)
+printf("tau = %.2f ms \n",tau*10**3)
+printf("Therefore, tp = 10*tau = T/2 \n")
+printf("(b)for charging phase, Vc = %d mV(1 - e^(-t/%.2f ms)) \n",vf,tau*1000)
+printf(" for discharging phase, Vc = %d mV(e^(-t/%.2f ms)) \n",vf,tau*1000)
+printf("(c) Irmax = %.2f uA e^(-t/%.f ms)",irmax*10**3,tau*1000)
+
+
+//Graph
+x1=0:(0.1*10**-3):(t)
+x2=tp:(0.1*10**-3):(t)
+x3=0:(0.1*10**-3):(tp)
+x4=tp:(0.1*10**-3):(t)
+vc=vf+(vi-vf)*(exp(-x1/tau)) //for Vc - Charging phase
+vc2=vf2+(vi2-vf2)*exp(-x2/tau) //for Vc - Discharging phase
+ic=irmax*exp(-x3/tau) //for Ic - Charging phase
+ic2=-irmax*(exp(-x3/tau)) //for Ic - Discharging phase
+subplot(221)
+plot(x1,vc)
+xlabel("t(s)")
+ylabel("Vc(V)")
+xtitle("Vc for the R-C network - Charging Phase")
+subplot(222)
+plot(x2,vc2)
+xlabel("t(s)")
+ylabel("Vc (V)")
+xtitle("Vc for the R-C network - Discharging Phase")
+subplot(223)
+plot(x3,ic)
+xlabel("t(s)")
+ylabel("ic (mA)")
+xtitle("Ic for the R-C network - Charging Phase")
+subplot(224)
+plot(x4,ic2)
+xlabel("t(s)")
+ylabel("ic (mA)")
+xtitle("Ic for the R-C network - Discharging Phase")
diff --git a/3883/CH24/EX24.11/EX24_11.sce b/3883/CH24/EX24.11/EX24_11.sce new file mode 100644 index 000000000..ff415b25a --- /dev/null +++ b/3883/CH24/EX24.11/EX24_11.sce @@ -0,0 +1,88 @@ +//Chapter 24, Example 24.11
+clc
+//Initialisation
+f=10*10**3 //frequency in hertz
+r=5*10**3 //resistance in ohm
+c=0.01*10**-6 //capacitance in farad
+vi=0 //for charging phasse, voltage
+vf=10 //voltage in mV
+vf2=0 //voltage
+t1=0 //for charging phase for ic
+vr=vf
+
+
+//Calculation
+t=1/f //time period in sec
+tp=t/2 //phase time in sec
+tau=r*c //time constant in sec
+irmax=vr/r //current in milliampere
+
+//first interval
+ vc1=vf+(vi-vf)*(exp(-tau/tau)) //in voltage
+ vi1=vc1 //in voltage
+ vc2=vc1*exp(-tau/tau) //in voltage
+ irmax2=(vi-vc1)/r //in milliamp
+
+ //for graph
+ x1=0:(0.01*10**-3):(tp)
+ x2=0:(0.01*10**-3):(tp)
+ vcc=vf+((vi-vf)*(exp(-x1/tau))) //for vc - Charging phase
+ vcd=vc1*(exp(-x2/tau)) //for vc - Discharging phase
+
+ icc=(irmax*10**-3)*exp(-x1/tau) //for Ic - Charging phase
+ icd=(irmax2*10**-3)*(exp(-x2/tau)) //for Ic - Discharging phase
+ scf(1)
+ subplot(221)
+ plot(x1,vcc)
+ xlabel("t(s)")
+ ylabel("Vc(V)")
+ xtitle("Vc for the R-C network - Charging Phase")
+ subplot(222)
+ plot(x2,vcd)
+ xlabel("t(s)")
+ ylabel("Vc (V)")
+ xtitle("Vc for the R-C network - Discharging Phase")
+ subplot(223)
+ plot(x1,icc)
+ xlabel("t(s)")
+ ylabel("ic (mA)")
+ xtitle("Ic for the R-C network - Charging Phase")
+ subplot(224)
+ plot(x2,icd)
+ xlabel("t(s)")
+ ylabel("ic (mA)")
+ xtitle("Ic for the R-C network - Discharging Phase")
+
+//second interval
+ vc1=vf+(vc2-vf)*(exp(-tau/tau)) //in voltage
+ vi1=vc1 //in voltage
+ vc2=vc1*exp(-tau/tau) //in voltage
+ irmax2=(vi-vc1)/r //in milliamp
+ x1=0:(0.01*10**-3):(tp)
+ x2=0:(0.01*10**-3):(tp)
+ vcc2=vf+((vc2-vf)*(exp(-x1/tau))) //for vc - Charging phase
+ vcd2=vc1*(exp(-x2/tau)) //for vc - Discharging phase
+ icc=(irmax*10**-3)*exp(-x1/tau) //for Ic - Charging phase
+ icd=(irmax2*10**-3)*(exp(-x2/tau)) //for Ic - Discharging phase
+ scf(2)
+ subplot(221)
+ plot(x1,vcc2)
+ xlabel("t(s)")
+ ylabel("Vc(V)")
+ xtitle("Vc for the R-C network - Charging Phase")
+ subplot(222)
+ plot(x2,vcd2)
+ xlabel("t(s)")
+ ylabel("Vc (V)")
+ xtitle("Vc for the R-C network - Discharging Phase")
+ subplot(223)
+ plot(x1,icc)
+ xlabel("t(s)")
+ ylabel("ic (mA)")
+ xtitle("Ic for the R-C network - Charging Phase")
+ subplot(224)
+ plot(x2,icd)
+ xlabel("t(s)")
+ ylabel("ic (mA)")
+ xtitle("Ic for the R-C network - Discharging Phase")
+
diff --git a/3883/CH24/EX24.2/EX24_2.sce b/3883/CH24/EX24.2/EX24_2.sce new file mode 100644 index 000000000..70664c13d --- /dev/null +++ b/3883/CH24/EX24.2/EX24_2.sce @@ -0,0 +1,28 @@ +//Chapter 24, Example 24.2
+clc
+//Initialisation
+vb=0 //voltage from graph
+tilt=0 //from graph
+div=4 //amplitude in div
+perdiv=10 //mV per div
+div1=3.2 //division
+perdiv1=5 //microsec per div
+div2=0.4 //division
+div3=0.8 //division
+
+
+
+//Calculation
+amp=div*perdiv //amplitude
+tp=div1*perdiv1 //from graph 24.9
+tr=div2*perdiv1 //from graph 24.9
+tf=div3*perdiv1 //from graph 24.9
+
+//Result
+printf("(a) Positive-going \n") //from graph
+printf("(b) Vb = %d V\n",vb)
+printf("(c) tilt = %d percent \n",tilt)
+printf("(d) amplitude = %d mV \n",amp)
+printf("(e) tp = %d us \n",tp)
+printf("(f) tr = %d us \n",tr)
+printf(" tf = %d us \n",tf)
diff --git a/3883/CH24/EX24.3/EX24_3.sce b/3883/CH24/EX24.3/EX24_3.sce new file mode 100644 index 000000000..e05ae1ec7 --- /dev/null +++ b/3883/CH24/EX24.3/EX24_3.sce @@ -0,0 +1,17 @@ +//Chapter 24, Example 24.3
+clc
+//Initialisation
+t1=15 //timeperiod in microsec
+t2=6 //timeperiod in microsec
+t3=8 //timeperiod in microsec
+
+
+//Calculation
+T=t1-t2 //timeperiod in microsec
+prf=1/T //frequency
+tp=t3-t2 //timeperiod in microsec
+duty=(tp/T)*100 //duty cycle
+
+//Result
+printf("(a) Pulse repition Frequency, prf = %.2f kHz \n",prf*1000)
+printf("(b) Duty Cycle = %.2f percent \n",duty)
diff --git a/3883/CH24/EX24.4/EX24_4.sce b/3883/CH24/EX24.4/EX24_4.sce new file mode 100644 index 000000000..b1b7857d8 --- /dev/null +++ b/3883/CH24/EX24.4/EX24_4.sce @@ -0,0 +1,17 @@ +//Chapter 24, Example 24.4
+clc
+//Initialisation
+div1=3.2 //no of division
+ms=1 //ms per divisions
+div2=0.8 //no of division
+
+
+//Calculation
+T=div1*ms //timeperiod in microsec
+tp=div2*ms //frequency
+prf=1/T //timeperiod in microsec
+duty=(tp/T)*100 //duty cycle
+
+//Result
+printf("(a) Pulse repition Frequency, prf = %.2f Hz \n",prf*1000)
+printf("(b) Duty Cycle = %.2f percent \n",duty)
diff --git a/3883/CH24/EX24.5/EX24_5.sce b/3883/CH24/EX24.5/EX24_5.sce new file mode 100644 index 000000000..649bc471e --- /dev/null +++ b/3883/CH24/EX24.5/EX24_5.sce @@ -0,0 +1,18 @@ +//Chapter 24, Example 24.5
+clc
+//Initialisation
+div1=2.6 //no of division
+ms=10 //microsec per divisions
+div2=0.2 //no of division
+
+
+
+//Calculation
+T=div1*ms //timeperiod in microsec
+tp=div2*ms //frequency
+prf=1/T //timeperiod in microsec
+duty=(tp/T)*100 //duty cycle
+
+//Result
+printf("(a) Pulse repition Frequency, prf = %d Hz \n",prf*10**6)
+printf("(b) Duty Cycle = %.2f percent \n",duty)
diff --git a/3883/CH24/EX24.6/EX24_6.sce b/3883/CH24/EX24.6/EX24_6.sce new file mode 100644 index 000000000..c2350e88f --- /dev/null +++ b/3883/CH24/EX24.6/EX24_6.sce @@ -0,0 +1,20 @@ +//Chapter 24, Example 24.6
+clc
+//Initialisation
+t1=12*10**-6 //time period in ms
+t2=2*10**-6 //time period in ms
+v1=8*10**-3 //voltage
+v2=4*10**-6 //voltage
+v3=2*10**-3 //voltage
+v4=6*10**-6 //voltage
+
+
+
+
+//Calculation
+T=t1-t2 //timeperiod in microsec
+g=((v1*v2)+(v3*v4))/T //Average Value in Volts
+
+//Result
+printf("Average Value, G = %.1f mV \n",g*10**3)
+
diff --git a/3883/CH24/EX24.7/EX24_7.sce b/3883/CH24/EX24.7/EX24_7.sce new file mode 100644 index 000000000..d56805a2f --- /dev/null +++ b/3883/CH24/EX24.7/EX24_7.sce @@ -0,0 +1,19 @@ +//Chapter 24, Example 24.7
+clc
+//Initialisation
+duty = 0.28 //duty cycle
+Vp = 7 //peak value
+Vb = -3 //base-line voltage
+t1=0.28 //time period
+t2=0.72 //time period
+
+
+
+//Calculation
+Vav = (duty*Vp)+((1-duty)*Vb) //Average Value in Volts
+g=(Vp*t1)+(Vb*t2) //Average Value in Volts
+
+//Result
+printf("(a) Average Value, Vav = %.1f V \n",Vav)
+printf("(c) G = %.1f V \n",g)
+
diff --git a/3883/CH24/EX24.8/EX24_8.sce b/3883/CH24/EX24.8/EX24_8.sce new file mode 100644 index 000000000..5eb492f7c --- /dev/null +++ b/3883/CH24/EX24.8/EX24_8.sce @@ -0,0 +1,33 @@ +//Chapter 24, Example 24.8
+clc
+//Initialisation
+vi=2 //voltage in mV
+e=8 //voltage in mV
+r=100*10**3 //resistance in ohm
+c=10**-6 //capacitance in farad
+
+
+//Calculation
+tau=r*c //time constant
+vr=e-vi //voltage
+irm=vr/r //current in amperes
+
+//Result
+printf("(a) Vc = %d V %d V e^(-t/%.f ms) \n",e,(vi-e),tau*1000)
+printf("(b) Irmax = %.2f mA e^(-t/%.f ms)",irm*1000,tau*1000)
+
+
+//Graph
+x1=0:0.1:0.8
+vc=e+(vi-e)*exp(-x1/tau)
+ic=irm*exp(-x1/tau)
+scf(221)
+plot(x1,vc)
+xlabel("t(s)")
+ylabel("vc(V)")
+xtitle("Vc for the network of Fig. 24.20.")
+scf(222)
+plot(x1,ic)
+xlabel("t(s)")
+ylabel("ic (mA)")
+xtitle("ic for the network of Fig. 24.20.")
diff --git a/3883/CH24/EX24.9/EX24_9.sce b/3883/CH24/EX24.9/EX24_9.sce new file mode 100644 index 000000000..b714445e2 --- /dev/null +++ b/3883/CH24/EX24.9/EX24_9.sce @@ -0,0 +1,24 @@ +//Chapter 24, Example 24.9
+clc
+//Initialisation
+vi=-4 //voltage in mV
+vf=10 //voltage in mV
+r=1*10**3 //resistance in ohm
+c=0.01*10**-6 //capacitance in farad
+
+
+//Calculation
+tau=r*c //time constant
+t=-tau*log(vf/(vf-vi)) //time in seconds
+
+//Result
+printf("Vc = %d mV %d mV e^(-t/%.f ms) \n",vf,(vi-vf),tau*10**6)
+printf("t = %.2f us",(t*10**6))
+
+//Graph
+x1=0:(10**-6):(80*10**-6)
+vc=vf+(vi-vf)*exp(-x1/tau)
+plot(x1,vc)
+xlabel("t(s)")
+ylabel("vc(V)")
+xtitle("Vc for the network of Fig. 24.22.")
diff --git a/3883/CH25/EX25.2/EX25_2.sce b/3883/CH25/EX25.2/EX25_2.sce new file mode 100644 index 000000000..4e480ff10 --- /dev/null +++ b/3883/CH25/EX25.2/EX25_2.sce @@ -0,0 +1,23 @@ +//Chapter 25, Example 25.2
+clc
+//Initialisation
+A0=20
+A10=0
+A11=5*10**-3
+A12=0
+A13=0
+A20=8
+A21=0
+B1=12
+B2=0
+
+//Calculation
+v=A0 //from graph 25.12
+i=A10+A11+A12+A13 //fourier series
+v2=A20+A21 //fourier series
+B=B1+B2 //fourier series
+
+//Result
+printf("(a) v = %d \n",v)
+printf("(b) i = %d X 10^-3 sin wt \n",i*10**3)
+printf("(c) v = %d + %d cos wt",v2,B)
diff --git a/3883/CH25/EX25.3/EX25_3.sce b/3883/CH25/EX25.3/EX25_3.sce new file mode 100644 index 000000000..755d5ea48 --- /dev/null +++ b/3883/CH25/EX25.3/EX25_3.sce @@ -0,0 +1,34 @@ +//Chapter 25, Example 25.3
+clc
+//Initialisation
+funcprot();
+//Polar to Rectangle Conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+//Accordng to phasor algebra
+a1=2
+[r1,i1]=polar2rect(1,90)
+[r2,i2]=polar2rect(2,0)
+
+//Calculation
+ar1=r1+r2
+ai1=i1+i2
+[ar2,ath2] = rect2polar(ar1,ai1)
+x = 0 : 0.1 : 10
+y = a1 + (ar2*sin(x+ath2*3.14/180))
+
+
+//Result
+plot(x, y)
+xlabel("a = wt");
+ylabel("V");
+title('v = 2 + 1 cos a + 2 sin a');
diff --git a/3883/CH25/EX25.4/EX25_4.sce b/3883/CH25/EX25.4/EX25_4.sce new file mode 100644 index 000000000..ebc9d87f8 --- /dev/null +++ b/3883/CH25/EX25.4/EX25_4.sce @@ -0,0 +1,33 @@ +//Chapter 25, Example 25.4
+clc
+//Initialisation
+funcprot();
+//Polar to Rectangle Conversion
+function [r,i]= polar2rect(x,y)
+ r=x*cosd(y)
+ i=x*sind(y)
+endfunction
+
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+//Accordng to phasor algebra
+[r1,i1]=polar2rect(1,0)
+[r2,i2]=polar2rect(1,0)
+
+//Calculation
+ar1=r1+r2
+ai1=i1+i2
+[ar2,ath2] = rect2polar(ar1,ai1)
+x = 0 : 0.1 : 10
+y = ar2*sin(x+ath2*3.14/180)
+
+
+//Result
+plot(x, y)
+xlabel("a = wt");
+ylabel("V");
+title('v = 2 + 1 cos a + 2 sin a');
diff --git a/3883/CH25/EX25.5/EX25_5.sce b/3883/CH25/EX25.5/EX25_5.sce new file mode 100644 index 000000000..9f10c9061 --- /dev/null +++ b/3883/CH25/EX25.5/EX25_5.sce @@ -0,0 +1,17 @@ +//Chapter 25, Example 25.5
+clc
+//Initialisation
+v=4 //in voltage
+v2=6 //in voltage
+
+//Calculation
+x = 0 : 0.1 : 10
+y = v + v2*sin(x)
+vrmax=sqrt((v**2)+(v2**2)/2)
+
+//Result
+plot(x, y)
+xlabel("wt");
+ylabel("V");
+title('v = 4 + 6 sin wt');
+printf("(b) Vrmax = %.3f V",vrmax)
diff --git a/3883/CH25/EX25.6/EX25_6.sce b/3883/CH25/EX25.6/EX25_6.sce new file mode 100644 index 000000000..4e7c5756d --- /dev/null +++ b/3883/CH25/EX25.6/EX25_6.sce @@ -0,0 +1,17 @@ +//Chapter 25, Example 25.6
+clc
+//Initialisation
+v=20 //in voltage
+
+//Calculation
+v0=(4/%pi)*v
+v1=v0
+v2=(v0/3)
+v3=(v0/5)
+v4=(v0/7)
+v5=(v0/9)
+v6=(v0/11)
+vrms=sqrt(((v1**2)+(v2**2)+(v3**2)+(v4**2)+(v5**2)+(v6**2))/2)
+
+//Result
+printf("(b) Vrmax = %.3f V",vrms)
diff --git a/3883/CH25/EX25.7/EX25_7.sce b/3883/CH25/EX25.7/EX25_7.sce new file mode 100644 index 000000000..c69aaf5fb --- /dev/null +++ b/3883/CH25/EX25.7/EX25_7.sce @@ -0,0 +1,39 @@ +//Chapter 25, Example 25.7
+clc
+//Initialisation
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+i1=0
+R=3
+vc=12
+C=(1/8)
+E=10/sqrt(2)
+
+//Calculation
+vr=i1*R
+xc=1/(2*C)
+
+z=complex(R,xc)
+[r1,th1]=rect2polar(real(z),-imag(z))
+i2=E/r1
+vr2=i2*R
+vc1=i2*xc
+vca=-th1-90
+
+irms = sqrt((i2**2))
+vrms = sqrt((vr2**2))
+vcrms = sqrt((vc**2)+(vc1**2))
+
+P=(irms**2)*R
+//Result
+printf("(a) 1. VR = %d V \t\n \tI = %d \t\n\tVc = %d V\t\n",vr,i1,vc)
+printf(" 2. for AC supply \n")
+printf(" i = %.2f A < %.2f \n",i2,-th1)
+printf(" Vr = %.2f A < %.2f \n",vr2,-th1)
+printf(" Vc = %.2f A < %.2f \n",vc1,vca)
+printf("(b) Irms = %.3f A \n\tVrms = %.3f V \n\tVcrms = %.3f V\t\n",irms,vrms,vcrms)
+printf("(c) P = %d W \n",P)
diff --git a/3883/CH25/EX25.8/EX25_8.sce b/3883/CH25/EX25.8/EX25_8.sce new file mode 100644 index 000000000..81688ae6f --- /dev/null +++ b/3883/CH25/EX25.8/EX25_8.sce @@ -0,0 +1,58 @@ +//Chapter 25, Example 25.8
+clc
+//Initialisation
+//Rectangle to Polar Conversion
+function [r,th] = rect2polar(x,y)
+ r=sqrt((x**2)+(y**2))
+ th=atand(y/x)
+endfunction
+
+xl=0
+R=6
+e0=63.6
+w=377
+L=0.1
+e1=70.71
+e2=29.98
+e2a=-90
+w2=754
+
+//Calculation
+zt=R
+i0=e0/R
+vr0=i0*R
+vl0=0
+p0=(i0**2)*R
+
+xl1=w*L
+zt1=complex(R,xl1)
+[zt1r,zt1a]=rect2polar(real(zt1),imag(zt1))
+i1=e1/zt1r
+vr1=i1*R
+vl1=i1*xl1
+vl1a=90-zt1a
+p1=(i1**2)*R
+
+
+xl2=w2*L
+zt2=complex(R,xl2)
+[zt2r,zt2a]=rect2polar(real(zt2),imag(zt2))
+i2=e2/zt2r
+i2a=e2a-zt2a
+vr2=i2*R
+vl2=i2*xl2
+vl2a=90+i2a
+p2=(i2**2)*R
+Irms=sqrt((i0**2)+(i1**2)+(i2**2))
+VRms=sqrt((e0**2)+(vr1**2)+(vr2**2))
+Vlrms=sqrt((vl1**2)+(vl2**2))
+//Result
+printf("The Fourier series expansion for i is \n")
+printf("i = %.1f + sqrt(2)(%.2f)sin(%d*t - %.2f) + sqrt(2)(%.3f)sin(%d*t - %.2f) \n",i0,i1,w,zt1a,i2,w2,-i2a)
+printf("Irms = %.2f A \n\n",Irms)
+printf("The Fourier series expansion for VR is \n")
+printf("Vr = %.1f + sqrt(2)(%.2f)sin(%d*t - %.2f) + sqrt(2)(%.3f)sin(%d*t - %.2f) \n",e0,vr1,w,zt1a,vr2,w2,-i2a)
+printf("Vrms = %.2f V \n\n",VRms)
+printf("The Fourier series expansion for VL is \n")
+printf("VL = sqrt(2)(%.2f)sin(%d*t - %.2f) + sqrt(2)(%.3f)sin(%d*t - %.2f) \n",vl1,w,vl1a,vl2,w2,-vl2a)
+printf("Vlrms = %.2f V \n\n",Vlrms)
diff --git a/3883/CH26/EX26.1/EX26_1.sce b/3883/CH26/EX26.1/EX26_1.sce new file mode 100644 index 000000000..e7527bb0c --- /dev/null +++ b/3883/CH26/EX26.1/EX26_1.sce @@ -0,0 +1,14 @@ +//Chapter 26, Example 26.1, page 1153
+clc
+//Initialisation
+eg=100*10**-3 //in Volt
+ei=96*10**-3 //in Volt
+rz=100 //in Ohms
+
+//Calculation
+vr=eg-ei //in Volt
+i=vr/rz //in Ampere
+zi=ei/i //in Ohms
+
+//Result
+printf("Input Impedance, Zi = %.1f kOhm",zi/1000)
diff --git a/3883/CH26/EX26.11/EX26_11.sce b/3883/CH26/EX26.11/EX26_11.sce new file mode 100644 index 000000000..4cd334b58 --- /dev/null +++ b/3883/CH26/EX26.11/EX26_11.sce @@ -0,0 +1,16 @@ +//Chapter 26, Example 26.11, page 1177
+clc
+//Initialisation
+hf=50 //short circuit current gain
+ho=25*10**-6 //Output Admittance with input open circuited
+zl=2*10**3 //load impedance
+hi=1*10**3 //input impedance with output shorted
+hr=4*10**-4 //reverse voltage amplification with input open circuited
+
+//Calculation
+Ai=hf/(1+(ho*zl)) //current gain
+Av=-hf*zl/((hi*(1+(ho*zl)))-(hr*hf*zl)) //voltage gain
+
+//Result
+printf("Current gain, Ai = %.2f \n",Ai)
+printf("Voltage gain, Av = %ds \n",Av)
diff --git a/3883/CH26/EX26.12/EX12_12.sce b/3883/CH26/EX26.12/EX12_12.sce new file mode 100644 index 000000000..f7d5aef86 --- /dev/null +++ b/3883/CH26/EX26.12/EX12_12.sce @@ -0,0 +1,13 @@ +//Chapter 12, Example 12.12
+clc
+//Variable Declaration
+r1 = 3 //resistance1
+l = 6*10^-3 //inductance in mH
+e = 15 //voltage in volts
+r2 = 2 //resistance2
+//Calculation
+im = e/(r1+r2) //inductance current
+ws = (l*im*im)/2 //energy stored
+
+//Results
+printf("Ws = %d mJ",ws*10^3)
diff --git a/3883/CH26/EX26.12/EX26_12.sce b/3883/CH26/EX26.12/EX26_12.sce new file mode 100644 index 000000000..bfc446b42 --- /dev/null +++ b/3883/CH26/EX26.12/EX26_12.sce @@ -0,0 +1,18 @@ +//Chapter 26, Example 26.12, page 1179
+clc
+//Initialisation
+hf=50 //short circuit current gain
+h1=0.04*10**3 //hr x hf x Zl
+h2=1.050 //ho x Zl
+hi=1*10**3 //input impedance with output shorted
+hr=4*10**-4 //reverse voltage amplification with input open circuited
+ho=25*10**-6 //Output Admittance with input open circuited
+rz=1*10**3 //resistance in ohm
+
+//Calculation
+zi=hi-(h1/h2) //Input Impedance
+zo=1/(ho-((hr*hf)/(hi+rz))) //Output Impedance
+
+//Result
+printf("Input Impedance, Zi = %.1f ohm \n",zi)
+printf("Output Impedance, Zo = %.2f kohm \n",zo/1000)
diff --git a/3883/CH26/EX26.2/EX26_2.sce b/3883/CH26/EX26.2/EX26_2.sce new file mode 100644 index 000000000..5b34c8e4f --- /dev/null +++ b/3883/CH26/EX26.2/EX26_2.sce @@ -0,0 +1,14 @@ +//Chapter 26, Example 26.2, page 1154
+clc
+//Initialisation
+eg=2 //in Volt
+eo=1.92 //in Volt
+rz=2*10**3 //in Ohms
+
+//Calculation
+vr=eg-eo //in Volt
+i=vr/rz //in Ampere
+zo=eo/i //in Ohms
+
+//Result
+printf("Output Impedance, Zi = %.1f kOhm",zo/1000)
diff --git a/3883/CH26/EX26.3/EX26_3.sce b/3883/CH26/EX26.3/EX26_3.sce new file mode 100644 index 000000000..926f95639 --- /dev/null +++ b/3883/CH26/EX26.3/EX26_3.sce @@ -0,0 +1,18 @@ +//Chapter 26, Example 26.3, page 1154
+clc
+//Initialisation
+Vr=2*10**-3 //in Volt
+Rz=10 //in Ohms
+Ei=50*10**-3 //in Volt
+phi1=150 //in degree
+
+//Calculation
+
+i=Vr/Rz //in Ampere
+zi=Ei/i //Zi in Ohms
+phi2=180-phi1 //phase angle between Eg and Vrz
+re=zi*cos(phi2*3.14/180) //real number, R
+im=zi*sin(phi2*3.14/180) //Imaginary number, Xl
+
+//Result
+printf("Zi = %.2f ohm + j %.1f ohm ",re,im)
diff --git a/3883/CH26/EX26.4/EX26_4.sce b/3883/CH26/EX26.4/EX26_4.sce new file mode 100644 index 000000000..a5e67fca3 --- /dev/null +++ b/3883/CH26/EX26.4/EX26_4.sce @@ -0,0 +1,22 @@ +//Chapter 26, Example 26.4, page 1157
+clc
+//Initialisation
+Eo=-20 //output voltage
+Ei=4*10**-3 //input voltage
+Rl=2.2*10**3 //load Resistance in Ohm
+Ro=50*10**3 //output Resistance in Ohm
+Zi=1*1*10**3 //input impedance in Ohm
+Rg=1*10**3 //Resistance in Ohm
+
+
+//Calculation
+Avn=Eo/Ei //no-load voltage gain
+Av=Avn*Rl/(Rl+Ro) //loaded voltage gain
+Avr=Av*Zi/(Zi+Rg) //loaded voltage gain
+Ro=Rl*((Avn/Av)-1) //Resistance in Ohm
+
+//Result
+printf("(a) Avnl = %d \n",Avn)
+printf("(b) Av = %.2f \n",Av)
+printf("(c) Avr = %.2f \n",Avr)
+printf("(d) Ro = %d kOhm",Ro/1000)
diff --git a/3883/CH26/EX26.5/EX26_5.sce b/3883/CH26/EX26.5/EX26_5.sce new file mode 100644 index 000000000..21b38f613 --- /dev/null +++ b/3883/CH26/EX26.5/EX26_5.sce @@ -0,0 +1,35 @@ +//Chapter 26, Example 26.5, page 1161
+clc
+//Initialisation
+Rl=4.7*10**3 //load Resistance in Ohm
+Ro=40*10**3 //output Resistance in Ohm
+Avn=-960 //no-load voltage gain
+Ri=2.7*10**3 //input Resistance in Ohm
+
+
+
+//Calculation
+Av=Avn*Rl/(Rl+Ro) //loaded voltage gain
+Ai=(-Avn)*Ri/(Rl+Ro) //voltage gain, Ai
+Rl2=2*Rl //Resistance in Ohm
+Av2=Avn*Rl2/(Rl2+Ro) //loaded voltage gain
+Ai2=(-Avn)*Ri/(Rl2+Ro) //voltage gain, Ai
+Air=(-Av)*Ri/Rl //voltage gain, Air
+Ag=(Av**2)*Ri/Rl //voltage gain, Ag
+Ai2=-Ag/Av //voltage gain, Ai
+
+//Result
+printf("(a) Av = %.2f \n",Av)
+printf("(b) Avi = %.2f \n",Ai)
+printf("(c) Av = %.2f, Ai = %.2f\n",Av2,Ai2)
+printf("(d) Air = %.2f \n",Air)
+printf("(e) Ag = %.2f \n",Ag)
+printf("(f) Ai = %.2f",Ai2)
+
+
+
+
+
+
+
+
diff --git a/3883/CH26/EX26.6/EX26_6.sce b/3883/CH26/EX26.6/EX26_6.sce new file mode 100644 index 000000000..25524328a --- /dev/null +++ b/3883/CH26/EX26.6/EX26_6.sce @@ -0,0 +1,56 @@ +//Chapter 26, Example 26.6, page 1163
+clc
+//Initialisation
+Avn1=1 //no-load voltage gain
+Avn2=-600 //no-load voltage gain
+Avn3=-1200 //no-load voltage gain
+Zi1=50*10**3 //input impedance in Ohm
+Zi2=1.8*10**3 //input impedance in Ohm
+Zi3=1.2*10**3 //input impedance in Ohm
+Rl=3.3*10**3 //input impedance in Ohm
+Ro=25 //output Resistance in Ohm
+Ro2=40*10**3 //output Resistance in Ohm
+Ro3=50*10**3 //output Resistance in Ohm
+
+
+//Calculation
+Av1=Avn1*Zi2/(Zi2+Ro) //loaded voltage gain
+Av2=Avn2*Zi3/(Zi3+Ro2) //loaded voltage gain
+Av3=Avn3*Rl/(Rl+Ro3) //loaded voltage gain
+Ai=(-Avn1)*Zi1/(Zi2+Ro) //voltage gain, Ai
+Ai2=(-Avn2)*Zi2/(Zi3+Ro2) //voltage gain, Ai
+Ai3=(-Avn3)*Zi3/(Rl+Ro3) //voltage gain, Ai
+Rl2=2*Rl //Resistance in Ohm
+Av21=Avn1*Rl2/(Rl2+Ro) //loaded voltage gain
+Ai20=(-Avn1)*Zi1/(Zi2+Ro) //voltage gain, Ai
+Air=(-Avn1)*Zi1/Rl //voltage gain, Air
+Ag=(Avn1**2)*Zi1/Rl //voltage gain, Ag
+Ai21=-Ag/Avn1 //voltage gain, Ai
+Avt=Av1*Av2*Av3 //voltage gain
+Ait=Ai*Ai2*Ai3 //voltage gain
+Agt=-Avt*Ait //voltage gain
+Av2=Av1*Av2 //voltage gain
+Ai22=Ai*Ai2 //voltage gain
+Ai23=Av2*Zi1/Zi3 //voltage gain
+Ag2=Av2*Ai23 //voltage gain
+Ag22=(Av2**2)*(Zi1/Zi3) //voltage gain
+Avt2=Avn1*Avn2*Avn3 //voltage gain
+
+
+//Result
+printf("(a) Av1 = %.3f, Av2 = %.3f, Av3 = %.3f \n Ai1 = %.3f, Ai2 = %.3f, Ai3 = %.3f \n",Av1,Av2,Av3,Ai,Ai2,Ai3)
+printf("(b) Avt = %.2f, Ait = %.2f \n",Avt,Ait)
+printf("(c) Agt = %.2f x 10^6 \n",Agt/10**6)
+printf("(d) Av2 = %.2f, Ai2 = %.3f \n",Av2,Ai22)
+printf("(e) Ai2 = %.2f \n",Ai23)
+printf("(f) Ag2 = %.2f \n",Ag2)
+printf("(g) Ag2 = %.2f \n",Ag22)
+printf("(h) Avt = %.1f x 10^5",Avt2/(10**5))
+
+
+
+
+
+
+
+
diff --git a/3883/CH26/EX26.7/EX26_7.sce b/3883/CH26/EX26.7/EX26_7.sce new file mode 100644 index 000000000..ec4cd7ad1 --- /dev/null +++ b/3883/CH26/EX26.7/EX26_7.sce @@ -0,0 +1,31 @@ +//Chapter 26, Example 26.7, page 1166
+clc
+funcprot(0);
+// A = p2z(R,Theta) - Convert from polar to rectangular form.
+// R is a matrix containing the magnitudes
+// Theta is a matrix containing the phase angles (in degrees).
+function [A] = p2z(R,Theta)
+ A = R*exp(%i*%pi*Theta/180);
+endfunction
+
+//Initialisation
+z1 = p2z(3,0)
+z2 = p2z(5,90)
+z3 = p2z(4,-90)
+
+
+//Calculation
+z11 = z1+z3
+z12 = z3
+z22 = z2+z3
+
+//Result
+printf("Z11 = %d ohm - j %d ohm \n",real(z11),-imag(z11))
+printf("Z12 = - j %d ohm \n",-imag(z12))
+printf("Z22 = j %d ohm \n",imag(z22))
+
+
+
+
+
+
diff --git a/3883/CH26/EX26.9/EX26_9.sce b/3883/CH26/EX26.9/EX26_9.sce new file mode 100644 index 000000000..bef778f93 --- /dev/null +++ b/3883/CH26/EX26.9/EX26_9.sce @@ -0,0 +1,31 @@ +//Chapter 26, Example 26.9, page 1171
+clc
+funcprot(0);
+// A = p2z(R,Theta) - Convert from polar to rectangular form.
+// R is a matrix containing the magnitudes
+// Theta is a matrix containing the phase angles (in degrees).
+function [A] = p2z(R,Theta)
+ A = R*exp(%i*%pi*Theta/180);
+endfunction
+
+//Initialisation
+Y1 = p2z(0.2,0) //admitance
+Y2 = p2z(0.02,-90) //admitance
+Y3 = p2z(0.25,90) //admitance
+
+
+//Calculation
+y11 = Y1+Y2 //admitance
+y12 = -Y2 //admitance
+y22 = Y2+Y3 //admitance
+
+//Result
+printf("Y11 = %.1f mS - j %.2f mS \n",real(y11),-imag(y11))
+printf("Y12 = j %.2f mS \n",imag(y12))
+printf("Y22 = j %.2f mS \n",imag(y22))
+
+
+
+
+
+
diff --git a/3883/CH3/EX3.1/EX3_1.sce b/3883/CH3/EX3.1/EX3_1.sce new file mode 100644 index 000000000..0a393e4fb --- /dev/null +++ b/3883/CH3/EX3.1/EX3_1.sce @@ -0,0 +1,12 @@ +//Chapter 3, Example 3.1
+clc
+//Variable Declaration
+p = 10.37 //in CM.ohm/ft
+l = 100 //length in ft
+a = 400 //area in CM
+
+//Calculation
+R = p*l/a //resistance in ohm
+
+//Results
+printf("R = %.2f ohm",R)
diff --git a/3883/CH3/EX3.10/EX3_10.sce b/3883/CH3/EX3.10/EX3_10.sce new file mode 100644 index 000000000..357911446 --- /dev/null +++ b/3883/CH3/EX3.10/EX3_10.sce @@ -0,0 +1,12 @@ +//Chapter 3, Example 3.10
+clc
+//Variable Declaration
+r = 30 //copper wire in ohm
+t1 = 194.5 //in degree celsius
+t2 = 234.5 //in degree celsius
+
+//Calculation
+R = (r*t1)/t2 //in ohm
+
+//Results
+ printf("R2 = %.2f ohm",R)
diff --git a/3883/CH3/EX3.11/EX3_11.sce b/3883/CH3/EX3.11/EX3_11.sce new file mode 100644 index 000000000..6b7d8eb01 --- /dev/null +++ b/3883/CH3/EX3.11/EX3_11.sce @@ -0,0 +1,12 @@ +//Chapter 3, Example 3.11
+clc
+//Variable Declaration
+r1 = 120*10^-3 //in milliohm
+t1 = 256 //in degree celsius
+r2 = 100*10^-3 //in milliohm
+t2 = 236 //in degree celsius
+//Calculation
+T = r1*(t1/r2)-t2 //in degree celsius
+
+//Results
+printf("T2 = %.1f C",T)
diff --git a/3883/CH3/EX3.12/EX3_12.sce b/3883/CH3/EX3.12/EX3_12.sce new file mode 100644 index 000000000..03b69c3e0 --- /dev/null +++ b/3883/CH3/EX3.12/EX3_12.sce @@ -0,0 +1,14 @@ +//Chapter 3, Example 3.12
+clc
+//Variable Declaration
+r =1000 //in ohm
+p = 2500
+t1 = 60 //in degree celsius
+t2 = 20 //in degree celsius
+a = 10^6
+
+//Calculation
+D = (r/a)*p*(t1-t2)
+R = r+D //resistance in ohm
+//Results
+printf("R = %d ohm",R)
diff --git a/3883/CH3/EX3.14/EX3_14.sce b/3883/CH3/EX3.14/EX3_14.sce new file mode 100644 index 000000000..224ccfa59 --- /dev/null +++ b/3883/CH3/EX3.14/EX3_14.sce @@ -0,0 +1,11 @@ +//Chapter 3, Example 3.14
+clc
+//Variable Declaration
+a = 0.7
+b = 1.4
+
+//Calculation
+Gn = a/b
+
+//Results
+printf("Gn = %.1fGi",Gn)
diff --git a/3883/CH3/EX3.2/EX3_3.sce b/3883/CH3/EX3.2/EX3_3.sce new file mode 100644 index 000000000..3bc30bc64 --- /dev/null +++ b/3883/CH3/EX3.2/EX3_3.sce @@ -0,0 +1,12 @@ +//Chapter 3, Example 3.3
+clc
+//Variable Declaration
+p = 10.37 //in CM.ohm/ft
+l = 3 //length in ft
+a = 3.185*10^6 //area in cm
+
+//Calculation
+R = p*l/a //resistance in ohm
+
+//Results
+printf("R = %.3f x 10^-6 ohm",R*10^6)
diff --git a/3883/CH3/EX3.3/EX3_3.sce b/3883/CH3/EX3.3/EX3_3.sce new file mode 100644 index 000000000..3bc30bc64 --- /dev/null +++ b/3883/CH3/EX3.3/EX3_3.sce @@ -0,0 +1,12 @@ +//Chapter 3, Example 3.3
+clc
+//Variable Declaration
+p = 10.37 //in CM.ohm/ft
+l = 3 //length in ft
+a = 3.185*10^6 //area in cm
+
+//Calculation
+R = p*l/a //resistance in ohm
+
+//Results
+printf("R = %.3f x 10^-6 ohm",R*10^6)
diff --git a/3883/CH3/EX3.4/EX3_4.sce b/3883/CH3/EX3.4/EX3_4.sce new file mode 100644 index 000000000..bc8dc984a --- /dev/null +++ b/3883/CH3/EX3.4/EX3_4.sce @@ -0,0 +1,11 @@ +//Chapter 3, Example 3.4
+clc
+//Variable Declaration
+l = 650 //in ft
+o = 0.6282 // in ohm
+L = 1000 //in ft
+//Calculation
+R = l*o/L //resistance in ohm
+
+//Results
+printf("R = %.3f ohm",R)
diff --git a/3883/CH3/EX3.5/EX3_5.sce b/3883/CH3/EX3.5/EX3_5.sce new file mode 100644 index 000000000..ffb5e6642 --- /dev/null +++ b/3883/CH3/EX3.5/EX3_5.sce @@ -0,0 +1,10 @@ +//Chapter 3, Example 3.5
+clc
+//Variable Declaration
+A = 6529.9 //area in cm
+
+//Calculation
+d = sqrt(6529.9)/1000 //answer in inch
+
+//Results
+printf("d = %.4f in",d)
diff --git a/3883/CH3/EX3.6/EX3_6.sce b/3883/CH3/EX3.6/EX3_6.sce new file mode 100644 index 000000000..349b0fd1e --- /dev/null +++ b/3883/CH3/EX3.6/EX3_6.sce @@ -0,0 +1,12 @@ +//Chapter 3, Example 3.6
+clc
+//Variable Declaration
+p = 10.37 //in CM.ohm/ft
+l = 100 //length in ft
+r = 0.025 //in ohm
+
+//Calculation
+A = p*l/r //in CM
+
+//Results
+printf("A = %d cm",A)
diff --git a/3883/CH3/EX3.7/EX3_7.sce b/3883/CH3/EX3.7/EX3_7.sce new file mode 100644 index 000000000..d11d83890 --- /dev/null +++ b/3883/CH3/EX3.7/EX3_7.sce @@ -0,0 +1,18 @@ +//Chapter 3, Example 3.7
+clc
+//Variable Declaration
+l = 3048 // in cm
+d = 0.032 //in cm
+r = 1.723*10^-6 //in ohm.cm
+p = 3.14
+r1 = 10.37 //in cm.ohm/ft
+l1 = 100 //in ft
+a = 159.79 //in cm
+
+//Calculation
+A = (p*d^2)/4
+R = (r*l)/A //resistance in ohm
+R1 = (r1*l1)/a //resistance in ohm
+//Results
+printf("R = %.1f ohm \n",R)
+printf("R = %.1f ohm",R1)
diff --git a/3883/CH3/EX3.8/EX3_8.sce b/3883/CH3/EX3.8/EX3_8.sce new file mode 100644 index 000000000..e1faf031b --- /dev/null +++ b/3883/CH3/EX3.8/EX3_8.sce @@ -0,0 +1,12 @@ +//Chapter 3, Example 3.8
+clc
+//Variable Declaration
+r = 100 //sheet resistance in ohm
+l = 0.6 //length in cm
+w = 0.3 //in cm
+
+//Calculation
+R = (r*l)/w //resistance in ohm
+
+//Results
+printf("R = %d ohm",R)
diff --git a/3883/CH3/EX3.9/EX3_9.sce b/3883/CH3/EX3.9/EX3_9.sce new file mode 100644 index 000000000..df8ff16db --- /dev/null +++ b/3883/CH3/EX3.9/EX3_9.sce @@ -0,0 +1,13 @@ +//Chapter 3, Example 3.9
+clc
+//Variable Declaration
+r = 50 //copper wire in ohm
+t1 = 334.5 //in degree celsius
+t2 = 254.5 //in degree celsius
+
+
+//Calculation
+R = (r*t1)/t2 //in ohm
+
+//Results
+printf("R = %.2f ohm",R)
diff --git a/3883/CH4/EX4.1/EX4_1.sce b/3883/CH4/EX4.1/EX4_1.sce new file mode 100644 index 000000000..be0d48d04 --- /dev/null +++ b/3883/CH4/EX4.1/EX4_1.sce @@ -0,0 +1,12 @@ +//Chapter 4, Example 4.1
+clc
+//Variable Declaration
+E = 9 //battery in volt
+R = 2.2 //resistor in ohm
+
+
+//Calculation
+I = E/R //current in ampere
+
+//Results
+printf("I = %.2f A",I)
diff --git a/3883/CH4/EX4.10/EX4_10.sce b/3883/CH4/EX4.10/EX4_10.sce new file mode 100644 index 000000000..5e563c930 --- /dev/null +++ b/3883/CH4/EX4.10/EX4_10.sce @@ -0,0 +1,14 @@ +//Chapter 4, Example 4.10
+clc
+//Variable Declaration
+p1 = 1492 //output power
+n = 0.75 //efficiency
+E = 220 //applied voltage
+
+//Calculation
+Pi = p1/n //inputpower in watt
+I = Pi/E //current in ampere
+
+//Results
+printf("Pi = %.2f W \n",Pi)
+printf("I = %.2f A",I)
diff --git a/3883/CH4/EX4.11/EX4_11.sce b/3883/CH4/EX4.11/EX4_11.sce new file mode 100644 index 000000000..11a23ffab --- /dev/null +++ b/3883/CH4/EX4.11/EX4_11.sce @@ -0,0 +1,13 @@ +//Chapter 4, Example 4.11
+clc
+//Variable Declaration
+n = 0.80 //efficiency
+a2 = 120 //in volts
+a3 = 8 //in ampere
+b1 = 1 //motor in horsepower
+b2 = 746 //power in watt
+//Calculation
+Po = n*a2*a3 //output power
+I = Po*(b1/b2) //in horsepower
+//Results
+printf("H = %.3f hp",I)
diff --git a/3883/CH4/EX4.12/EX4_12.sce b/3883/CH4/EX4.12/EX4_12.sce new file mode 100644 index 000000000..42a6f059b --- /dev/null +++ b/3883/CH4/EX4.12/EX4_12.sce @@ -0,0 +1,11 @@ +//Chapter 4, Example 4.12
+clc
+//Variable Declaration
+n = 0.85 //efficiency
+Wi = 50 //applied energy
+
+//Calculation
+Wo = n*Wi //output energy
+
+//Results
+printf("Wo = %.1f J",Wo)
diff --git a/3883/CH4/EX4.13/EX4_13.sce b/3883/CH4/EX4.13/EX4_13.sce new file mode 100644 index 000000000..e11bfe289 --- /dev/null +++ b/3883/CH4/EX4.13/EX4_13.sce @@ -0,0 +1,12 @@ +//Chapter 4, Example 4.13
+clc
+//Variable Declaration
+n1 = 0.90 //efficiency1
+n2 = 0.85 //efficiency2
+n3 = 0.95 //efficiency3
+
+//Calculation
+nT = n1*n2*n3 //efficiency in percentage
+
+//Results
+printf("nT = %.1f percentage",nT*100)
diff --git a/3883/CH4/EX4.14/EX4_14.sce b/3883/CH4/EX4.14/EX4_14.sce new file mode 100644 index 000000000..f86b97faa --- /dev/null +++ b/3883/CH4/EX4.14/EX4_14.sce @@ -0,0 +1,12 @@ +//Chapter 4, Example 4.14
+clc
+//Variable Declaration
+n1 = 0.40 //efficiency1
+n2 = 0.85 //efficiency2
+n3 = 0.95 //efficiency3
+
+//Calculation
+nT = n1*n2*n3 //efficiency in percentage
+
+//Results
+printf("nT = %.1f percentage",nT*100)
diff --git a/3883/CH4/EX4.15/EX4_15.sce b/3883/CH4/EX4.15/EX4_15.sce new file mode 100644 index 000000000..07a81d212 --- /dev/null +++ b/3883/CH4/EX4.15/EX4_15.sce @@ -0,0 +1,13 @@ +//Chapter 4, Example 4.15
+clc
+//Variable Declaration
+cost = 9
+r1 = 5360*10^3 //in kWh
+r2 = 4650*10^3 //pervious reading
+
+//Calculation
+R = r1-r2 //used
+M = R*(cost/10^3) //in dollar
+
+//Results
+printf("M = %.2f dollar",M/100)
diff --git a/3883/CH4/EX4.16/EX4_16.sce b/3883/CH4/EX4.16/EX4_16.sce new file mode 100644 index 000000000..0e3f9493d --- /dev/null +++ b/3883/CH4/EX4.16/EX4_16.sce @@ -0,0 +1,13 @@ +//Chapter 4, Example 4.16
+clc
+//Variable Declaration
+a1 = 60 //bulb in watt
+a2 = 24 //hours per day
+a3 = 365 //days
+
+//Calculation
+Pt = a1*a2*a3 //power in Wh
+W = Pt/1000 //energy in kWh
+
+//Results
+printf("W = %.2f kWh",W)
diff --git a/3883/CH4/EX4.17/EX4_17.sce b/3883/CH4/EX4.17/EX4_17.sce new file mode 100644 index 000000000..ed502722b --- /dev/null +++ b/3883/CH4/EX4.17/EX4_17.sce @@ -0,0 +1,11 @@ +//Chapter 4, Example 4.17
+clc
+//Variable Declaration
+p1 = 4*10^3 //energy in kWh
+p2 = 205 //power in watt
+
+//Calculation
+Pt = p1*1000 //power in watt
+W = Pt/p2 // in h
+//Results
+printf("W = %.2f h",W/1000)
diff --git a/3883/CH4/EX4.18/EX4_18.sce b/3883/CH4/EX4.18/EX4_18.sce new file mode 100644 index 000000000..14ca5e400 --- /dev/null +++ b/3883/CH4/EX4.18/EX4_18.sce @@ -0,0 +1,15 @@ +//Chapter 4, Example 4.18
+clc
+//Variable Declaration
+p1 = 5 //motor in horsepower
+p2 = 746 //in W/hp
+p3 = 2 //in h
+c = 9 //in euro/kWh
+
+//Calculation
+Pt = p1*p2*p3 //power
+W = Pt/1000 //in kWh
+cost = W*c //unit
+
+//Results
+printf("Cost = %.2f unit",cost)
diff --git a/3883/CH4/EX4.19/EX4_19.sce b/3883/CH4/EX4.19/EX4_19.sce new file mode 100644 index 000000000..d53f7eae5 --- /dev/null +++ b/3883/CH4/EX4.19/EX4_19.sce @@ -0,0 +1,14 @@ +//Chapter 4, Example 4.19
+clc
+//Variable Declaration
+w1 = 1200 //toaster in watt
+w2 = 50 //bulbs in watt
+w3 = 400 //washing machine in watt
+w4 = 4800 //electric clothes in watt
+c = 9 //cost in unit/kWh
+//Calculation
+W = ((w1*0.5)+(6*w2*4)+(w3*0.75)+(w4*0.33))/1000 //energy in kWh
+cost = W*c //in euro
+
+//Results
+printf("Cost = %.1f unit",cost)
diff --git a/3883/CH4/EX4.2/EX4_2.sce b/3883/CH4/EX4.2/EX4_2.sce new file mode 100644 index 000000000..8cc883581 --- /dev/null +++ b/3883/CH4/EX4.2/EX4_2.sce @@ -0,0 +1,11 @@ +//Chapter 4, Example 4.2
+clc
+//Variable Declaration
+E = 120 //applied voltage
+I = 500*10^-3 //current in ampere
+
+//Calculation
+R = E/I //in ohm
+
+//Results
+printf("R = %d ohm",R)
diff --git a/3883/CH4/EX4.3/EX4_3.sce b/3883/CH4/EX4.3/EX4_3.sce new file mode 100644 index 000000000..6206e6c4b --- /dev/null +++ b/3883/CH4/EX4.3/EX4_3.sce @@ -0,0 +1,11 @@ +//Chapter 4, Example 4.3
+clc
+//Variable Declaration
+V = 16 //voltage
+R = 2*10^3 //in ohm
+
+//Calculation
+I = V/R //in miliampere
+
+//Results
+printf("I = %d mA",I*1000)
diff --git a/3883/CH4/EX4.4/EX4_4.sce b/3883/CH4/EX4.4/EX4_4.sce new file mode 100644 index 000000000..1598bebab --- /dev/null +++ b/3883/CH4/EX4.4/EX4_4.sce @@ -0,0 +1,11 @@ +//Chapter 4, Example 4.4
+clc
+//Variable Declaration
+I = 1.5 //current in ampere
+R = 80 //in ohm
+
+//Calculation
+E = I*R //voltage
+
+//Results
+printf("E = %d V",E)
diff --git a/3883/CH4/EX4.5/EX4_5.sce b/3883/CH4/EX4.5/EX4_5.sce new file mode 100644 index 000000000..154bfaa4f --- /dev/null +++ b/3883/CH4/EX4.5/EX4_5.sce @@ -0,0 +1,14 @@ +//Chapter 4, Example 4.5
+clc
+//Variable Declaration
+V1 = 6 //in volts
+I1 = 3*10^-3 //in miliampere
+V2 = 2 //in volts
+I2 = 1*10^-3 //in miliampere
+//Calculation
+Rdc = V1/I1 //in kiloohm
+R = V2/I2 //in kiloohm
+
+//Results
+printf("Rdc = %d kohm \n",Rdc/10^3)
+printf("R = %d kohm",R/10^3)
diff --git a/3883/CH4/EX4.6/EX4_6.sce b/3883/CH4/EX4.6/EX4_6.sce new file mode 100644 index 000000000..6f580f20e --- /dev/null +++ b/3883/CH4/EX4.6/EX4_6.sce @@ -0,0 +1,11 @@ +//Chapter 4, Example 4.6
+clc
+//Variable Declaration
+V = 120 //in volts
+I = 5 //in ampere
+
+//Calculation
+P = V*I //power in kwatt
+
+//Results
+printf("P = %.1f kW",P/10^3)
diff --git a/3883/CH4/EX4.7/EX4_7.sce b/3883/CH4/EX4.7/EX4_7.sce new file mode 100644 index 000000000..e826f6d74 --- /dev/null +++ b/3883/CH4/EX4.7/EX4_7.sce @@ -0,0 +1,11 @@ +//Chapter 4, Example 4.7
+clc
+//Variable Declaration
+I = 4 //in ampere
+R = 5 //in ohm
+
+//Calculation
+P = (I*I)*R //power in watt
+
+//Results
+printf("P = %d W",P)
diff --git a/3883/CH4/EX4.8/EX4_8.sce b/3883/CH4/EX4.8/EX4_8.sce new file mode 100644 index 000000000..d0de70776 --- /dev/null +++ b/3883/CH4/EX4.8/EX4_8.sce @@ -0,0 +1,14 @@ +//Chapter 4, Example 4.8
+clc
+//Variable Declaration
+I = 0.625 //in ampere
+V = 120 //in volts
+
+
+//Calculation
+P = V*I //power in watt
+R = V/I //in ohm
+
+//Results
+printf("P = %d W \n",P)
+printf("R = %d ohm",R)
diff --git a/3883/CH4/EX4.9/EX4_9.sce b/3883/CH4/EX4.9/EX4_9.sce new file mode 100644 index 000000000..ebdb20269 --- /dev/null +++ b/3883/CH4/EX4.9/EX4_9.sce @@ -0,0 +1,11 @@ +//Chapter 4, Example 4.9
+clc
+//Variable Declaration
+P = 20*10^-3 //power in watt
+R = 5*10^3 //in ohm
+
+//Calculation
+I = sqrt(P/R) //current in miliampere
+
+//Results
+printf("I = %d mA",I*1000)
diff --git a/3883/CH5/EX5.1/EX5_1.sce b/3883/CH5/EX5.1/EX5_1.sce new file mode 100644 index 000000000..194e9bcfc --- /dev/null +++ b/3883/CH5/EX5.1/EX5_1.sce @@ -0,0 +1,32 @@ +//Chapter 5, Example 5.1
+clc
+//Variable Declaration
+r1 = 2 //resistance1
+r2 = 1 //resistance2
+r3 = 5 //resistance3
+E = 20 //supply voltage
+
+
+
+//Calculation
+rt = r1+r2+r3 //total resistance
+I = E/rt //current
+V1 = I*r1 //voltage1
+V2 = I*r2 //voltage2
+V3 = I*r3 //voltage3
+P1 = V1*I //power1
+P2 = I*I*r2 //power2
+P3 = V3*V3/r3 //power3
+Pdel1 = E*I //power delivered by source
+Pdel = P1+P2+P3 //Total power
+//Results
+printf("a. RT = %d ohm \n",rt)
+printf("b. Is = %.1f A \n",I)
+printf("c. V1 = %d V\n",V1)
+printf(" V2 = %.1f V \n",V2)
+printf(" V3 = %.1f V \n",V3)
+printf("d. P1 = %.1f W \n",P1)
+printf(" P2 = %.2f W \n",P2)
+printf(" P3 = %.2f W \n",P3)
+printf("e. Pdel = %d W \n",Pdel1)
+printf(" %d W = %d W (checks) \n",Pdel1,Pdel)
diff --git a/3883/CH5/EX5.10/EX5_10.sce b/3883/CH5/EX5.10/EX5_10.sce new file mode 100644 index 000000000..68029e0a3 --- /dev/null +++ b/3883/CH5/EX5.10/EX5_10.sce @@ -0,0 +1,13 @@ +//Chapter 5, Example 5.10
+clc
+//Variable Declaration
+r1 = 20 //resistor1
+e = 64 //supply voltage
+r2 = 60 //resistor2
+
+//Calculation
+rt = r1+r2 //total resistance
+v1 = r1*e/rt //voltage1
+
+//Results
+printf("V1 = %d V",v1)
diff --git a/3883/CH5/EX5.11/EX5_11.sce b/3883/CH5/EX5.11/EX5_11.sce new file mode 100644 index 000000000..e200c8002 --- /dev/null +++ b/3883/CH5/EX5.11/EX5_11.sce @@ -0,0 +1,15 @@ +//Chapter 5, Example 5.11
+clc
+//Variable Declaration
+r1 = 2000 //resistance1
+r2 = 5000 //resistance2
+r3 = 8000 //resistance3
+e = 45 //supply voltage
+
+//Calculation
+rt = r1+r2+r3 //total resistance
+v1 = r1*e/rt //voltage1
+v3 = r3*e/rt //voltage3
+//Results
+printf("V1 = %d V \n",v1)
+printf("V2 = %d V",v3)
diff --git a/3883/CH5/EX5.12/EX5_12.sce b/3883/CH5/EX5.12/EX5_12.sce new file mode 100644 index 000000000..9ce801a3a --- /dev/null +++ b/3883/CH5/EX5.12/EX5_12.sce @@ -0,0 +1,15 @@ +//Chapter 5, Example 5.12
+clc
+//Variable Declaration
+r1 = 2000 //resistance1
+r2 = 5000 //resistance2
+r3 = 8000 //resistance3
+e = 45 //supply voltage
+
+
+//Calculation
+rt = r1+r2+r3 //Total resistance
+r = r1+r2 //resistance of R1 or R2
+v = r*e/rt //volage
+//Results
+printf("V = %d V",v)
diff --git a/3883/CH5/EX5.13/EX5_13.sce b/3883/CH5/EX5.13/EX5_13.sce new file mode 100644 index 000000000..0eb12f363 --- /dev/null +++ b/3883/CH5/EX5.13/EX5_13.sce @@ -0,0 +1,13 @@ +//Chapter 5, Example 5.13
+clc
+//Variable Declaration
+e = 20 //supply voltage
+i = 4*10^-3 //current
+r2 = 1000 //resistance2
+
+//Calculation
+r1 = 4*r2 //resistance1
+
+//Results
+printf("R2 = %d Kohm \n",r2/1000)
+printf("R1 = %d kohm",r1/10^3)
diff --git a/3883/CH5/EX5.14/EX5_14.sce b/3883/CH5/EX5.14/EX5_14.sce new file mode 100644 index 000000000..1876973c0 --- /dev/null +++ b/3883/CH5/EX5.14/EX5_14.sce @@ -0,0 +1,11 @@ +//Chapter 5, Example 5.14
+clc
+//Variable Declaration
+va = 16 //voltage Va
+vb = 20 //voltage Vb
+
+//Calculation
+vab = va-vb //voltage Vab
+
+//Results
+printf("Vab = %d V",vab)
diff --git a/3883/CH5/EX5.15/EX5_15.sce b/3883/CH5/EX5.15/EX5_15.sce new file mode 100644 index 000000000..986920c63 --- /dev/null +++ b/3883/CH5/EX5.15/EX5_15.sce @@ -0,0 +1,11 @@ +//Chapter 5, Example 5.15
+clc
+//Variable Declaration
+vab = 5 //voltage Vab
+vb = 4 //voltage Vb
+
+//Calculation
+va = vab + vb //voltage Va
+
+//Results
+printf("Va = %d V",va)
diff --git a/3883/CH5/EX5.16/EX5_16.sce b/3883/CH5/EX5.16/EX5_16.sce new file mode 100644 index 000000000..fee4c0119 --- /dev/null +++ b/3883/CH5/EX5.16/EX5_16.sce @@ -0,0 +1,11 @@ +//Chapter 5, Example 5.16
+clc
+//Variable Declaration
+va = 20 //voltage Va
+vb = -15 //voltage Vb
+
+//Calculation
+vab = va-vb //voltage Vab
+
+//Results
+printf("Vab = %d V",vab)
diff --git a/3883/CH5/EX5.17/EX5_17.sce b/3883/CH5/EX5.17/EX5_17.sce new file mode 100644 index 000000000..b5ba7491f --- /dev/null +++ b/3883/CH5/EX5.17/EX5_17.sce @@ -0,0 +1,17 @@ +//Chapter 5, Example 5.17
+clc
+//Variable Declaration
+e1 = 10 //supply voltage1
+v1 = 4 //voltage1
+e2 = 20 //supply voltage2
+va = 10 //voltage Va
+
+//Calculation
+vb = e1-v1 //voltage Vb
+vc = vb-e2 //voltage Vc
+vac = va-vc //voltage Vac
+
+//Results
+printf("Vb = %d V \n",vb)
+printf("Vc = %d V \n",vc)
+printf("Vac = %d V \n",vac)
diff --git a/3883/CH5/EX5.18/EX5_18.sce b/3883/CH5/EX5.18/EX5_18.sce new file mode 100644 index 000000000..ac58d44d9 --- /dev/null +++ b/3883/CH5/EX5.18/EX5_18.sce @@ -0,0 +1,19 @@ +//Chapter 5, Example 5.18
+clc
+//Variable Declaration
+r2 = 25 //resistance
+r1 = 20 //resistance in ohm
+e1 = -19 //supply voltage in V
+e2 = 35 //supply voltage in V
+//Calculation
+r = r1+r2 //total resistance in ohm
+e = e2-e1 //total supply voltage in V
+i = e/r //current in ampere A
+vab = i*r2 //in voltage Vab
+vcb = -i*r1 //in voltage Vcd
+vc = e1 //in voltage Vc
+
+//Results
+printf("Vab = %d V \n",vab)
+printf("Vcb = %d V \n",vcb)
+printf("Vc = %d V \n",vc)
diff --git a/3883/CH5/EX5.19/EX5_19.sce b/3883/CH5/EX5.19/EX5_19.sce new file mode 100644 index 000000000..ab5d2dd60 --- /dev/null +++ b/3883/CH5/EX5.19/EX5_19.sce @@ -0,0 +1,14 @@ +//Chapter 5, Example 5.19
+clc
+//Variable Declaration
+r1 = 4 //resistance1
+e = 24 //supply voltage
+r2 = 2 //resistance2
+
+//Calculation
+v1 = (r1*e)/(r1+r2) //voltage1
+v2 = (r2*e)/(r1+r2) //voltage2
+
+//Results
+printf("V1 = %d V \n",v1)
+printf("V2 = %d V \n",v2)
diff --git a/3883/CH5/EX5.2/EX5_2.sce b/3883/CH5/EX5.2/EX5_2.sce new file mode 100644 index 000000000..928c35766 --- /dev/null +++ b/3883/CH5/EX5.2/EX5_2.sce @@ -0,0 +1,15 @@ +//Chapter 5, Example 5.2
+clc
+//Variable Declaration
+N = 3 //number of resistance
+R1 = 7 //resistance1
+R2 = 4 //resistance2
+E = 50 //supply voltage
+//Calculation
+Rt = N*R1+R2 //total resistance
+I = E/Rt //current in ampere
+V2 = I*R2 //voltage2
+//Results
+printf("RT = %d ohm \n",Rt)
+printf("I = %d A \n",I)
+printf("V2 = %d V",V2)
diff --git a/3883/CH5/EX5.20/EX5_20.sce b/3883/CH5/EX5.20/EX5_20.sce new file mode 100644 index 000000000..3f2ae2647 --- /dev/null +++ b/3883/CH5/EX5.20/EX5_20.sce @@ -0,0 +1,19 @@ +//Chapter 5, Example 5.20
+clc
+//Variable Declaration
+r1 = 2 //resistor1
+e = 10 //supply voltage
+r2 = 3 //resistor2
+r3 = 5 //resistor3
+
+//Calculation
+rt = r1+r2+r3 //total resistance
+vab = r1*e/rt //voltage Vab
+vb = (r2+r3)*e/rt //voltage Vb
+vc = 0 //coltage Vc
+vb1 = e-vab //voltage Vb
+//Results
+printf("a. Vab = +%d V \n",vab)
+printf("b. Vb = %d V \n",vb)
+printf(" or Vb = %d V \n",vb1)
+printf("c. Vc = ground potential = %d V",vc)
diff --git a/3883/CH5/EX5.21/EX5_21.sce b/3883/CH5/EX5.21/EX5_21.sce new file mode 100644 index 000000000..65bc1ca9a --- /dev/null +++ b/3883/CH5/EX5.21/EX5_21.sce @@ -0,0 +1,12 @@ +//Chapter 5, Example 5.21
+clc
+//Variable Declaration
+vnl = 40 //voltage with no load
+il = 77*10^-3 //load current in ampere
+rl = 0.5*10^3 //load resistor in ohm
+
+//Calculation
+rint = (vnl/il)-rl //internal resistance in ohm
+
+//Results
+printf("Rint = %.2f ohm",rint)
diff --git a/3883/CH5/EX5.22/EX5_22.sce b/3883/CH5/EX5.22/EX5_22.sce new file mode 100644 index 000000000..f2b559c77 --- /dev/null +++ b/3883/CH5/EX5.22/EX5_22.sce @@ -0,0 +1,17 @@ +//Chapter 5, Example 5.22
+clc
+//Variable Declaration
+e = 30 //supply voltage
+rint = 2 //internal resistance
+rl = 13 //load resistance
+vnl = 30 //voltage with no load
+
+
+//Calculation
+il = e/(rint+rl) //load current in ampere
+vl = vnl-il*rint //load voltage in volts
+plost = il*il*rint //power lost in Watt
+
+//Results
+printf("Vl = %d V \n",vl)
+printf("Plost = %d W",plost)
diff --git a/3883/CH5/EX5.23/EX5_23.sce b/3883/CH5/EX5.23/EX5_23.sce new file mode 100644 index 000000000..04e515810 --- /dev/null +++ b/3883/CH5/EX5.23/EX5_23.sce @@ -0,0 +1,10 @@ +//Chapter 5, Example 5.23
+clc
+//Variable Declaration
+vnl = 120 //voltage with no load
+vfl = 100 //voltage with load
+
+//Calculation
+vr = ((vnl-vfl)/vfl)*100 //voltage regulation in percent
+//Results
+printf("VR = %d percent",vr)
diff --git a/3883/CH5/EX5.24/EX5_24.sce b/3883/CH5/EX5.24/EX5_24.sce new file mode 100644 index 000000000..62ae9fa39 --- /dev/null +++ b/3883/CH5/EX5.24/EX5_24.sce @@ -0,0 +1,11 @@ +//Chapter 5, Example 5.24
+clc
+//Variable Declaration
+rint = 19.48 //internal resistance in ohm
+rl = 500 //load resistor in ohm
+
+//Calculation
+vr = (rint/rl)*100 //voltage regulation in percent
+
+//Results
+printf("VR = %.1f percent",vr)
diff --git a/3883/CH5/EX5.3/EX5_3.sce b/3883/CH5/EX5.3/EX5_3.sce new file mode 100644 index 000000000..41517d5d4 --- /dev/null +++ b/3883/CH5/EX5.3/EX5_3.sce @@ -0,0 +1,13 @@ +//Chapter 5, Example 5.3
+clc
+//Variable Declaration
+Rt = 12*10^3 //total resistance
+R2 = 4*10^3 //resistance2
+R3 = 6*10^3 //resistance3
+I = 6*10^-3 //current in ampere
+//Calculation
+R1 = Rt-(R2+R3) //resistance1
+E = I*Rt //voltage
+//Results
+printf("R1 = %d kohm \n",R1/10^3)
+printf("E = %d V",E)
diff --git a/3883/CH5/EX5.4/EX5_4.sce b/3883/CH5/EX5.4/EX5_4.sce new file mode 100644 index 000000000..f3a99bd75 --- /dev/null +++ b/3883/CH5/EX5.4/EX5_4.sce @@ -0,0 +1,18 @@ +//Chapter 5, Example 5.4
+clc
+//Variable Declaration
+e1 = 16 //supply voltage1
+v2 = 4.2 //voltage2
+e2 = 9 //supply voltage2
+e = 32 //supply voltage
+v = 12 //voltage
+v3 = 6 //voltage of R2
+v4 =14 //voltage of R3
+//Calculation
+v1 = e1-v2-e2 //voltage1
+vx = e-v //unknown voltage
+vx = v3+v4 //unknown voltage
+//Results
+printf("V1 = %.1f V \n",v1)
+printf("Vx = %d V \n",vx)
+printf("Vx = %d V",vx)
diff --git a/3883/CH5/EX5.5/EX5_5.sce b/3883/CH5/EX5.5/EX5_5.sce new file mode 100644 index 000000000..b6bcea0af --- /dev/null +++ b/3883/CH5/EX5.5/EX5_5.sce @@ -0,0 +1,12 @@ +//Chapter 5, Example 5.5
+clc
+//Variable Declaration
+e1 = 25 //supply voltage1
+e2 = 15 //supply voltage2
+e3 = 20 //supply voltage3
+//Calculation
+v1 = e1+e2 //voltage1
+v2 = -e3 //voltage2
+//Results
+printf("V1 = %d V \n",v1)
+printf("V2 = %d V",v2)
diff --git a/3883/CH5/EX5.6/EX5_6.sce b/3883/CH5/EX5.6/EX5_6.sce new file mode 100644 index 000000000..084b0e715 --- /dev/null +++ b/3883/CH5/EX5.6/EX5_6.sce @@ -0,0 +1,15 @@ +//Chapter 5, Example 5.6
+clc
+//Variable Declaration
+v1 = 60 //supply voltage
+v2 = 40 //voltage1
+v3 = 30 //voltage2
+v4 = -6 //voltage1
+v5 = 14 //supply voltage
+v6 = 2 //voltage2
+//Calculation
+va = v1+v3-v2 //unknown voltage
+vb = v4-v5+v6 //unknown voltage
+//Results
+printf("Vx = %d V \n",va)
+printf("Vx = %d V \n",vb)
diff --git a/3883/CH5/EX5.7/EX5_7.sce b/3883/CH5/EX5.7/EX5_7.sce new file mode 100644 index 000000000..582afafd6 --- /dev/null +++ b/3883/CH5/EX5.7/EX5_7.sce @@ -0,0 +1,27 @@ +//Chapter 5, Example 5.7
+clc
+//Variable Declaration
+r1 = 4 //resistor1
+r2 = 6 //resistor2
+e = 20 //supply voltage
+
+//Calculation
+rt = r1+r2 //total resistance
+i = e/rt //current
+v1 = i*r1 //voltage1
+v2 = i*r2 //voltage2
+p4 = v1*v1/r1 //power of R1
+p6 = (i*i)*r2 //power of R2
+pe = e*i //power of source
+pe1 = p4+p6 //Total power
+sv = v1+v2 //Total voltage
+//Results
+printf("a. Rt = %d ohm \n",rt)
+printf("b. I = %d A \n",i)
+printf("c. V1 = %d V \n",v1)
+printf(" V2 = %d V \n",v2)
+printf("d. P4 = %d W \n",p4)
+printf(" P6 = %d W \n",p6)
+printf("e. Pe = %d W \n",pe)
+printf(" %d W = %d W (checks)\n",pe,pe1)
+printf("f. %d V = %d V (checks)",e,sv)
diff --git a/3883/CH5/EX5.8/EX5_8.sce b/3883/CH5/EX5.8/EX5_8.sce new file mode 100644 index 000000000..87819f41d --- /dev/null +++ b/3883/CH5/EX5.8/EX5_8.sce @@ -0,0 +1,18 @@ +//Chapter 5, Example 5.8
+clc
+//Variable Declaration
+e = 54 //supply voltage
+v1 = 18 //voltage1
+v3 = 15 //voltage3
+r2 = 7 //resistance2
+//Calculation
+v2 = e-v1-v3 //voltage2
+i = v2/r2 //current in ampere
+r1 = v1/i //resistance1
+r3 = v3/i //resistance3
+
+//Results
+printf("a. V2 = %d V \n",v2)
+printf("b. I = %d A \n",i)
+printf("c. R1 = %d ohm \n",r1)
+printf(" R3 = %d ohm \n",r3)
diff --git a/3883/CH5/EX5.9/EX5_9.sce b/3883/CH5/EX5.9/EX5_9.sce new file mode 100644 index 000000000..31ae77430 --- /dev/null +++ b/3883/CH5/EX5.9/EX5_9.sce @@ -0,0 +1,16 @@ +//Chapter 5, Example 5.9
+clc
+//Variable Declaration
+r1 = 4 //resistance1
+r2 = 7 //resistance2
+e = 37.5 //supply voltage
+i = 2.5 //current in ampere
+
+//Calculation
+rt = 2*r1+r2 //total resistance
+i = e/rt //current in ampere
+v = i*r2 //voltage of R2
+
+//Results
+printf("I = %.1f A \n",i)
+printf("V7ohm = %.1f V \n",v)
diff --git a/3883/CH6/EX6.1/EX6_1.sce b/3883/CH6/EX6.1/EX6_1.sce new file mode 100644 index 000000000..35e376610 --- /dev/null +++ b/3883/CH6/EX6.1/EX6_1.sce @@ -0,0 +1,13 @@ +//Chapter 6, Example 6.1
+clc
+//Variable Declaration
+g1 = 1/3 //conductance in seimens
+g2 = 1/6 //conductance in seimens
+
+//Calculation
+gt = g1+g2 //total conductance in seimens
+rt = 1/gt //resistance in ohm
+
+//Results
+printf("Gt = %.1f S \n",gt)
+printf("Rt = %d ohm",rt)
diff --git a/3883/CH6/EX6.10/EX6_10.sce b/3883/CH6/EX6.10/EX6_10.sce new file mode 100644 index 000000000..7d45d161b --- /dev/null +++ b/3883/CH6/EX6.10/EX6_10.sce @@ -0,0 +1,19 @@ +//Chapter 6, Example 6.10
+clc
+//Variable Declaration
+r1 = 30 //resistance in ohm fig 6.18
+r2 = 30 //resistance in ohm fig 6.18
+r3 = 30 //resistance in ohm fig 6.19
+r4 = 1000 //resistance in ohm fig 6.19
+r5 = 0.1 //resistance in ohm fig 6.20
+
+//Calculation
+rt = (r1*r2)/(r1+r2) //total resistance in ohm
+rt1 = (rt*r3)/(rt+r3) //total resistance in ohm
+rt2 = (rt*r4)/(rt+r4) //total resistance in ohm
+rt3 = (rt*r5)/(rt+r5) //total resistance in ohm
+//Results
+printf("a. Rt = %d ohm \n",rt)
+printf("b. Rt = %d ohm \n",rt1)
+printf("c. Rt = %.3f ohm \n",rt2)
+printf("d. Rt = %.3f ohm",rt3)
diff --git a/3883/CH6/EX6.11/EX6_11.sce b/3883/CH6/EX6.11/EX6_11.sce new file mode 100644 index 000000000..f140948a0 --- /dev/null +++ b/3883/CH6/EX6.11/EX6_11.sce @@ -0,0 +1,28 @@ +//Chapter 6, Example 6.11
+clc
+//Variable Declaration
+r1 = 9 //resistance in ohm
+r2 = 18 //resistance in ohm
+e = 27 //voltage supply
+
+//Calculation
+rt = (r1*r2)/(r1+r2) //total resistance in ohm
+is = e/rt //source current in ampere
+i1 = e/r1 //current in ampere
+i2 = e/r2 //current in ampere
+is1 = i1+i2 //applying KCL
+p1 = e*i1 //power of R1 in watt
+p2 = e*i2 //power of R2 in watt
+ps = e*is //power supply in watt
+ps1 = p1+p2 //power supply in watt
+
+//Results
+printf("a. Rt = %d ohm \n",rt)
+printf("b. Is = %.1f A \n",is)
+printf("c. I1 = %d A \n",i1)
+printf(" I2 = %.1f A \n",i2)
+printf(" %.1f A = %.1f A \n",is1,is)
+printf("d. P1 = %d W \n",p1)
+printf(" I2 = %.1f W \n",p2)
+printf("e. Ps = %.1f W \n",ps)
+printf(" Ps = %.1f W \n",ps1)
diff --git a/3883/CH6/EX6.12/EX6_12.sce b/3883/CH6/EX6.12/EX6_12.sce new file mode 100644 index 000000000..eb9dec58f --- /dev/null +++ b/3883/CH6/EX6.12/EX6_12.sce @@ -0,0 +1,23 @@ +//Chapter 6, Example 6.12
+clc
+//Variable Declaration
+r1 = 10 //resistance in ohm
+r2 = 20 //resistance in ohm
+rt = 4 //total resistance in ohm
+i1 = 4 //current of R1 in ampere
+
+
+//Calculation
+r = (1/rt)-(1/r1)-(1/r2)
+r3 = (1/r) //resistance in ohm
+e = i1*r1 //supply voltage
+is = e/rt //source current in ampere
+i2 = e/r2 //current of R2 in ampere
+p2 = i2*i2*r2 //power of R2 in watt
+
+//Results
+printf("a. R3 = %d ohm \n",r3)
+printf("b. E = %d V \n",e)
+printf("c. Is = %d A \n",is)
+printf("d. I2 = %d A \n",i2)
+printf("e. P2 = %d W",p2)
diff --git a/3883/CH6/EX6.13/EX6_13.sce b/3883/CH6/EX6.13/EX6_13.sce new file mode 100644 index 000000000..127f662bc --- /dev/null +++ b/3883/CH6/EX6.13/EX6_13.sce @@ -0,0 +1,14 @@ +//Chapter 6, Example 6.13
+clc
+//Variable Declaration
+i1 = 2 //current in ampere
+i2 = 3 //current in ampere
+i5 = 1 //current in ampere
+
+//Calculation
+i3 = i1+i2 //current in ampere
+i4 = i3+i5 //current in ampere
+
+//Results
+printf("a: I3 = %d A \n",i3)
+printf("b: I4 = %d A",i4)
diff --git a/3883/CH6/EX6.14/EX6_14.sce b/3883/CH6/EX6.14/EX6_14.sce new file mode 100644 index 000000000..b6836a274 --- /dev/null +++ b/3883/CH6/EX6.14/EX6_14.sce @@ -0,0 +1,16 @@ +//Chapter 6, Example 6.14
+clc
+//Variable Declaration
+i = 5 //entering current in ampere
+i2 = 4 //leaving current in ampere
+
+//Calculation
+i1 = i-i2 //applying KCL, in ampere
+i3 = i1 // in ampere
+i4 = i2 // in ampere
+i5 = i3+i4 //applying KCL, in ampere
+//Results
+printf("I1 = %d A \n",i1)
+printf("I3 = %d A \n",i3)
+printf("I4 = %d A \n",i4)
+printf("I5 = %d A",i5)
diff --git a/3883/CH6/EX6.15/EX6_15.sce b/3883/CH6/EX6.15/EX6_15.sce new file mode 100644 index 000000000..6c0b683d3 --- /dev/null +++ b/3883/CH6/EX6.15/EX6_15.sce @@ -0,0 +1,13 @@ +//Chapter 6, Example 6.15
+clc
+//Variable Declaration
+i1 = 4 //current in ampere
+i2 = 3 //current in ampere
+i4 = 1 //current in ampere
+
+//Calculation
+i3 = i1+i2 //curremt in ampere
+i5 = i3-i4 //current in ampere
+//Results
+printf("I3 = %d A \n",i3)
+printf("I5 = %d A",i5)
diff --git a/3883/CH6/EX6.16/EX6_16.sce b/3883/CH6/EX6.16/EX6_16.sce new file mode 100644 index 000000000..93772cf0d --- /dev/null +++ b/3883/CH6/EX6.16/EX6_16.sce @@ -0,0 +1,19 @@ +//Chapter 6, Example 6.16
+clc
+//Variable Declaration
+i1 = 10 //current in ampere
+i2 = 12 //current in ampere
+i5 = 8 //current in ampere
+
+//Calculation
+i7 = i1
+i3 = i2-i1 //current in ampere
+i4 = i2-i5 //current in ampere
+i6 = i4-i3 //current in ampere
+i71 = i5+i6 //current in ampere
+//Results
+printf("I7 = %d A \n",i7)
+printf("I3 = %d A \n",i3)
+printf("I4 = %d A \n",i4)
+printf("I6 = %d A \n",i6)
+printf(" %d A = %d A \n",i7,i71)
diff --git a/3883/CH6/EX6.17/EX6_17.sce b/3883/CH6/EX6.17/EX6_17.sce new file mode 100644 index 000000000..a4230f399 --- /dev/null +++ b/3883/CH6/EX6.17/EX6_17.sce @@ -0,0 +1,12 @@ +//Chapter 6, Example 6.17
+clc
+//Variable Declaration
+r1 = 4000 //resistance
+is = 6 //source current in ampere
+r2 = 8000 //resistance in ohm
+
+//Calculation
+i2 = (r1*is)/(r1+r2) //current in ampere
+
+//Results
+printf("I2 = %d A",i2)
diff --git a/3883/CH6/EX6.18/EX6_18.sce b/3883/CH6/EX6.18/EX6_18.sce new file mode 100644 index 000000000..6c364bac1 --- /dev/null +++ b/3883/CH6/EX6.18/EX6_18.sce @@ -0,0 +1,18 @@ +//Chapter 6, Example 6.18
+clc
+//Variable Declaration
+r1 = 6 //resistance in ohm
+r2 = 24 //resistance in ohm
+r3 = 48 //resistance in ohm
+i = 42*10^-3 //current in ampere
+
+//Calculation
+r = (1/r1)+(1/r2)+(1/r3)
+rt = 1/r //total resistance in ohm
+i1 = (rt*i)/r1 //current in ampere
+r4 = (r2*r3)/(r2+r3) //resistance in ohm
+i11 = (r4*i)/(r4+r1) //current in ampere
+
+//Results
+printf("I1 = %.2f mA \n",i1*1000)
+printf("I1 = %.2f mA",i11*1000)
diff --git a/3883/CH6/EX6.19/EX6_19.sce b/3883/CH6/EX6.19/EX6_19.sce new file mode 100644 index 000000000..c89151aa9 --- /dev/null +++ b/3883/CH6/EX6.19/EX6_19.sce @@ -0,0 +1,20 @@ +//Chapter 6, Example 6.19
+clc
+//Variable Declaration
+r1 = 2 //resistance in ohm
+r2 = 4 //resistance in ohm
+i = 12 //current in ampere
+
+//Calculation
+i1 = (r2*i)/(r1+r2) //current in ampere
+i2 = i-i1 //current in ampere
+i21 = (r1*i)/(r1+r2) //current in ampere
+i3 = i //current in ampere
+i31 = i1+i2 //current in ampere
+
+//Results
+printf("I1 = %d A \n",i1)
+printf("I2 = %d A \n",i2)
+printf("I2 = %d A \n",i21)
+printf("I3 = %d A \n",i3)
+printf("I3 = %d A \n",i31)
diff --git a/3883/CH6/EX6.2/EX6_2.sce b/3883/CH6/EX6.2/EX6_2.sce new file mode 100644 index 000000000..5ab17445b --- /dev/null +++ b/3883/CH6/EX6.2/EX6_2.sce @@ -0,0 +1,13 @@ +//Chapter 6, Example 6.2
+clc
+//Variable Declaration
+g1 = 0.5 //conductance in seimens
+g2 = 1/10 //conductance in seimens
+
+//Calculation
+gt = g1 + g2 //total conductance in seimens
+rt = 1/gt //resistance in ohm
+
+//Results
+printf("Gt = %.1f S \n",gt)
+printf("Rt = %.3f ohm",rt)
diff --git a/3883/CH6/EX6.20/EX6_20.sce b/3883/CH6/EX6.20/EX6_20.sce new file mode 100644 index 000000000..c05312945 --- /dev/null +++ b/3883/CH6/EX6.20/EX6_20.sce @@ -0,0 +1,18 @@ +//Chapter 6, Example 6.20
+clc
+//Variable Declaration
+r2 = 7 //resistance in ohm
+i = 27*10^-3 //current in ampere
+i1 = 21*10^-3 //current in ampere
+
+
+//Calculation
+r1 = (r2*(i-i1))/i1 //resistance in ohm
+i2 = i-i1 //current in ampere
+v2 = i2*r2 //voltage in volt
+v1 = v2 //voltage in volt
+r11 = v1/i1 //resistance in ohm
+
+//Results
+printf("R1 = %.f ohm \n",r1)
+printf("R1 = %.f ohm",r11)
diff --git a/3883/CH6/EX6.21/EX6_21.sce b/3883/CH6/EX6.21/EX6_21.sce new file mode 100644 index 000000000..c0cfb34d8 --- /dev/null +++ b/3883/CH6/EX6.21/EX6_21.sce @@ -0,0 +1,10 @@ +//Chapter 6, Example 6.21
+clc
+//Variable Declaration
+e = 20 //supply voltage
+
+//Calculation
+vab = e //output Vab
+
+//Results
+printf("Vab = %d V",vab)
diff --git a/3883/CH6/EX6.22/EX6_22.sce b/3883/CH6/EX6.22/EX6_22.sce new file mode 100644 index 000000000..2bf7e9e78 --- /dev/null +++ b/3883/CH6/EX6.22/EX6_22.sce @@ -0,0 +1,13 @@ +//Chapter 6, Example 6.22
+clc
+//Variable Declaration
+e1 = 10 //supply voltage
+e2 = 30 //supply voltage
+
+//Calculation
+vab = e1 //voltage Vab
+vcd = e1-e2 //voltage Vcd
+
+//Results
+printf("Vab = %d V \n",vab)
+printf("Vcd = %d V",vcd)
diff --git a/3883/CH6/EX6.23/EX6_23.sce b/3883/CH6/EX6.23/EX6_23.sce new file mode 100644 index 000000000..1f3ad4c24 --- /dev/null +++ b/3883/CH6/EX6.23/EX6_23.sce @@ -0,0 +1,12 @@ +//Chapter 6, Example 6.23
+clc
+//Variable Declaration
+i = 0 //current in ampere
+r = 15000 //resistance in ohm
+
+//Calculation
+v = i*r //voltage
+
+//Results
+printf("I = %d A \n",i)
+printf("V = %d V",v)
diff --git a/3883/CH6/EX6.24/EX6_24.sce b/3883/CH6/EX6.24/EX6_24.sce new file mode 100644 index 000000000..7b361dc77 --- /dev/null +++ b/3883/CH6/EX6.24/EX6_24.sce @@ -0,0 +1,12 @@ +//Chapter 6, Example 6.24
+clc
+//Variable Declaration
+e = 18 //supply voltage
+r1 = 5000 //resistance in ohm
+
+//Calculation
+i = e/r1 //current in ampere
+v = e //voltage
+//Results
+printf("I = %.1f mA \n",i*1000)
+printf("V = %d V",v)
diff --git a/3883/CH6/EX6.25/EX6_25.sce b/3883/CH6/EX6.25/EX6_25.sce new file mode 100644 index 000000000..c9a0b9a86 --- /dev/null +++ b/3883/CH6/EX6.25/EX6_25.sce @@ -0,0 +1,13 @@ +//Chapter 6, Example 6.25
+clc
+//Variable Declaration
+v = 0 //voltage
+e = 6 //supply voltage
+r1 = 2 //resistance in ohm
+
+//Calculation
+i = e/r1 //current in ampere
+
+//Results
+printf("V = %d V \n",v)
+printf("I = %d A",i)
diff --git a/3883/CH6/EX6.26/EX6_26.sce b/3883/CH6/EX6.26/EX6_26.sce new file mode 100644 index 000000000..d70825f69 --- /dev/null +++ b/3883/CH6/EX6.26/EX6_26.sce @@ -0,0 +1,16 @@ +//Chapter 6, Example 6.26
+clc
+//Variable Declaration
+e = 20 //supply voltage
+r = 1*10^6 //resistance in ohm
+rab1 = 11*10^6 //load resistance in ohm
+rm = 2*10^6
+//Calculation
+vab = e //voltage Vab
+vab2 = (rab1*e)/(rab1+r) //Vab by voltage divider rule
+vab3 = (rm*e)/(rm+r) //Vab for the internal resistance
+
+//Results
+printf("a. Vab = %d V \n",vab)
+printf("b. Vab = %.2f V \n",vab2)
+printf("c. Vab = %.2f V \n",vab3)
diff --git a/3883/CH6/EX6.3/EX6_3.sce b/3883/CH6/EX6.3/EX6_3.sce new file mode 100644 index 000000000..96477c3d3 --- /dev/null +++ b/3883/CH6/EX6.3/EX6_3.sce @@ -0,0 +1,14 @@ +//Chapter 6, Example 6.3
+clc
+//Variable Declaration
+r1 = 1/2 //resistance in ohm
+r2 = 1/4 //resistance in ohm
+r3 = 1/5 //resistance in ohm
+
+//Calculation
+rt = r1+r2+r3
+r = 1/rt //total resistance in ohm
+
+
+//Results
+printf("Rt = %.3f ohm",r)
diff --git a/3883/CH6/EX6.4/EX6_4.sce b/3883/CH6/EX6.4/EX6_4.sce new file mode 100644 index 000000000..4ff5088a1 --- /dev/null +++ b/3883/CH6/EX6.4/EX6_4.sce @@ -0,0 +1,14 @@ +//Chapter 6, Example 6.4
+clc
+//Variable Declaration
+r1 = 12 //resistor in ohm fig 6.9
+n1 = 3 //number of component
+r2 = 2 //resistor in ohm fig 6.10
+n2 = 4 //number of component
+//Calculation
+rt1 = r1/n1 //total resistance in ohm fig 6.9
+rt2 = r2/n2 //total resistance in ohm fig 6.10
+
+//Results
+printf("a. Rt = %d ohm \n",rt1)
+printf("b. Rt = %.1f ohm",rt2)
diff --git a/3883/CH6/EX6.5/EX6_5.sce b/3883/CH6/EX6.5/EX6_5.sce new file mode 100644 index 000000000..5625e5409 --- /dev/null +++ b/3883/CH6/EX6.5/EX6_5.sce @@ -0,0 +1,10 @@ +//Chapter 6, Example 6.5
+clc
+//Variable Declaration
+r1 = 3 //resistor in ohm
+r2 = 6 //resistor in ohm
+//Calculation
+rt = r1*r2/(r1+r2) //resistance in ohm
+
+//Results
+printf("Rt = %d ohm",rt)
diff --git a/3883/CH6/EX6.6/EX6_6.sce b/3883/CH6/EX6.6/EX6_6.sce new file mode 100644 index 000000000..f8de82780 --- /dev/null +++ b/3883/CH6/EX6.6/EX6_6.sce @@ -0,0 +1,15 @@ +//Chapter 6, Example 6.6
+clc
+//Variable Declaration
+r1 = 2 //resistor in ohm
+r2 = 4 //resistor in ohm
+r3 = 5 //resistor in ohm
+
+//Calculation
+rt = 1/((1/r1)+(1/r2)+(1/r3)) //total resistance in ohm
+rt1 = (r1*r2)/(r1+r2) //R1 and R2 parallel
+rt2 = (rt1*r3)/(rt1+r3) //Rt1 and R3 parallel
+
+//Results
+printf("Rt = %.3f ohm \n",rt)
+printf("Rt = %.3f ohm \n",rt2)
diff --git a/3883/CH6/EX6.7/EX6_7.sce b/3883/CH6/EX6.7/EX6_7.sce new file mode 100644 index 000000000..282eb5669 --- /dev/null +++ b/3883/CH6/EX6.7/EX6_7.sce @@ -0,0 +1,16 @@ +//Chapter 6, Example 6.7
+clc
+//Variable Declaration
+r = 6 //resistor in ohm
+n = 3 //number of component
+r2 = 9 //resistor in ohm
+r4 = 72 //resistor in ohm
+
+//Calculation
+rt1 = r/n //resistance in ohm
+rt2 = (r2*r4)/(r2+r4) //R2 and R4 parallel
+rt3 = (rt1*rt2)/(rt1+rt2) //total resistance in ohm
+
+
+//Results
+printf("Rt = %.1f ohm",rt3)
diff --git a/3883/CH6/EX6.8/EX6_8.sce b/3883/CH6/EX6.8/EX6_8.sce new file mode 100644 index 000000000..986b84db9 --- /dev/null +++ b/3883/CH6/EX6.8/EX6_8.sce @@ -0,0 +1,11 @@ +//Chapter 6, Example 6.8
+clc
+//Variable Declaration
+rt = 9000 //total resistance in ohm
+r1 = 12000 //resistor in ohm
+
+//Calculation
+r2 = (rt*r1)/(r1-rt) //required resistor in ohm
+
+//Results
+printf("R2 = %d kohm",r2/10^3)
diff --git a/3883/CH6/EX6.9/EX6_9.sce b/3883/CH6/EX6.9/EX6_9.sce new file mode 100644 index 000000000..04ab38606 --- /dev/null +++ b/3883/CH6/EX6.9/EX6_9.sce @@ -0,0 +1,12 @@ +//Chapter 6, Example 6.9
+clc
+//Variable Declaration
+rt = 16000 //total resistance in ohm
+r = 1.75
+
+
+//Calculation
+r1 = r*rt //required resistance in ohm
+
+//Results
+printf("R1 = %d kohm",r1/10^3)
diff --git a/3883/CH7/EX7.1/EX7_1.sce b/3883/CH7/EX7.1/EX7_1.sce new file mode 100644 index 000000000..1bace8f78 --- /dev/null +++ b/3883/CH7/EX7.1/EX7_1.sce @@ -0,0 +1,24 @@ +//Chapter 7, Example 7.1
+clc
+//Variable Declaration
+rb = 12000 //resistance in ohm
+rc = 6000 //resistance in ohm
+e = 54 //voltage
+ra = 2000 //resistance in ohm
+//Calculation
+rbc = (rb*rc)/(rb+rc) //RB and RC are parallel
+rt = ra+rbc //the equivalent resistance in ohm
+is = e/rt //source current Is in ampere
+ia = is
+ib = (rc*is)/(rb+rc) //applying current divider rule
+ic = (rb*is)/(rb+rc) //applying current divider rule
+ic1 = is-ib //applying KCL
+
+
+//Results
+printf("Rbc = %d kohm \n",rbc/10^3)
+printf("Rt = %d kohm \n",rt/10^3)
+printf("Ia = %d mA \n",ia*1000)
+printf("Ib = %.f mA \n",ib*1000)
+printf("Ic = %.f mA \n",ic*1000)
+printf("Ic = %.f mA \n",ic1*1000)
diff --git a/3883/CH7/EX7.10/EX7_10.sce b/3883/CH7/EX7.10/EX7_10.sce new file mode 100644 index 000000000..407d43c4b --- /dev/null +++ b/3883/CH7/EX7.10/EX7_10.sce @@ -0,0 +1,17 @@ +//Chapter 7, Example 7.10
+clc
+//Variable Declaration
+e1 = 20 //emf in voltage
+e2 = 5 //emf in voltage
+e3 = 8 //emf in voltage
+
+
+//Calculation
+v1 = e1-e3 //voltage
+v2 = e2-v1 //voltage
+v3 = e3-v2 //voltage
+
+//Results
+printf("V1 = %d V \n",v1)
+printf("V2 = %d V \n",v2)
+printf("V3 = %d V \n",v3)
diff --git a/3883/CH7/EX7.11/EX7_11.sce b/3883/CH7/EX7.11/EX7_11.sce new file mode 100644 index 000000000..50df5c505 --- /dev/null +++ b/3883/CH7/EX7.11/EX7_11.sce @@ -0,0 +1,22 @@ +//Chapter 7, Example 7.11
+clc
+//Variable Declaration
+e = 72 //emf in voltage
+is = 50*10^-3 //current source in ampere
+vr3 = 12 //R3 voltage
+vl1 = 60 //RL1 voltage
+vl2 = 20 //RL2 voltage
+ir1= 30*10^-3 //R1 current in ampere
+ir2 = 20*10^-3 //R2 current in ampere
+vr2 = 20 //R2 voltage
+
+//Calculation
+r3 = vr3/is //resistance in ohms
+vr1 = vl1-vl2 //voltage
+r1 = vr1/ir1 //resistance in ohms
+r2 = vr2/ir2 //resistance in ohms
+
+//Results
+printf("R3 = %d ohm \n",r3)
+printf("R1 = %.2f Kohm \n",r1/1000)
+printf("R2 = %d kohm",r2/1000)
diff --git a/3883/CH7/EX7.12/EX7_12.sce b/3883/CH7/EX7.12/EX7_12.sce new file mode 100644 index 000000000..941fca676 --- /dev/null +++ b/3883/CH7/EX7.12/EX7_12.sce @@ -0,0 +1,19 @@ +//Chapter 7, Example 7.12
+clc
+//Variable Declaration
+e = 120 //voltage supply
+r1 = 4000 //resistance in ohms
+r2 = 6000 //resistance in ohms
+r3 = 12000 //resistance in ohms
+r4 = 30000 //resistance in ohms
+r5 = 10000 //resistance in ohms
+
+//Calculation
+r = (r1*r3)/(r1+r3) //parallel combination R1 and R3
+rr = (r2*r4)/(r2+r4) //parallel combination R2 and R4
+v1 = (r*e)/8000 //voltage
+v2 = (rr*e)/8000 //voltage
+
+//Results
+printf("V1 = %d V \n",v1)
+printf("V2 = %d V \n",v2)
diff --git a/3883/CH7/EX7.2/EX7_2.sce b/3883/CH7/EX7.2/EX7_2.sce new file mode 100644 index 000000000..0753cbd1f --- /dev/null +++ b/3883/CH7/EX7.2/EX7_2.sce @@ -0,0 +1,36 @@ +//Chapter 7, Example 7.2
+clc
+//Variable Declaration
+r1 = 4 //resistance in ohm
+r2 = 4 //resistance in ohm
+r3 = 4 //resistance in ohm
+r4 = 0.5 //resistance in ohm
+r5 = 1.5 //resistance in ohm
+e = 10 //voltage
+is = 2 //current through R1 in ampere
+
+//Calculation
+ra = r1 //RA is R1 in ohms
+rb = (r2*r3)/(r2+r3) //RB is parallel combination of R2 and R3 in ohms
+rc = r4+r5 //RC is equivalent resistor of R4 and R5 in ohms
+rbc = (rb*rc)/(rb+rc) //parallel combination of RB and RC in ohms
+rt = ra+rbc //resistance in ohm
+ia = is //same current in ampere
+ib = ia/2 //current in ampere
+ic = ib //current in ampere
+ir2 = ib/2 //current in ampere
+ir3 = ir2 //current in ampere
+va = ia*ra //voltage
+vb = ib*rb //voltage
+vc = vb //voltage
+v = e-va-vb //applying KVL
+
+//Results
+printf("Rt = %d ohm \n",rt)
+printf("Is = %d A \n",is)
+printf("Ia = %d A \n",ia)
+printf("Ib = %d A \n",ib)
+printf("Ir2 = Ir3 = %.1f A \n",ir2)
+printf("Va = %d V \n",va)
+printf("Vb = %d V \n",vb)
+printf("Vc = %d V \n",vc)
diff --git a/3883/CH7/EX7.3/EX7_3.sce b/3883/CH7/EX7.3/EX7_3.sce new file mode 100644 index 000000000..a0a25bd98 --- /dev/null +++ b/3883/CH7/EX7.3/EX7_3.sce @@ -0,0 +1,35 @@ +//Chapter 7, Example 7.3
+clc
+//Variable Declaration
+r1 = 9 //resistance in ohms
+r2 = 6 //resistance in ohms
+r3 = 6 //resistance in ohms
+r4 = r3 //resistance in ohms
+r5 = 3 //resistance in ohms
+r6 = 3 //resistance in ohms
+e = 16.8 //source voltage
+
+//Calculation
+ra = (r1*r2)/(r1+r2) //parallel R1 and R2 in ohms
+rb = r3 + ((r4*r5)/(r4+r5)) //resistance in ohms
+rc = r6 //resistance in ohms
+rt = ra+((rb*rc)/(rb+rc)) //total resistance in ohms
+is = e/rt //current in ampere
+ia = is //current in ampere
+ib = (rc*ia)/(rc+rb) //applying the current divider rule
+ic = ia-ib //by KCL, current in ampere
+va = ia*ra //by ohm's law, voltage
+vb = ib*rb //by ohm's law, voltage
+i1 = (r2*ia)/(r2+r1) //applying the current divider rule
+i2 = ia-i1 //current in ampere
+
+//Results
+printf("Rt = %.1f ohm \n",rt-0.1)
+printf("Is = %d A \n",is+0.1)
+printf("Ia = Is = %d A \n",ia+0.1)
+printf("Ib = %d A \n",ib+0.3)
+printf("Ic = %d A \n",ic)
+printf("Va = %.1f A \n",va)
+printf("Vb = %d A \n",vb)
+printf("I1 = %.1f A \n",i1)
+printf("I2 = %.1f A",i2)
diff --git a/3883/CH7/EX7.4/EX7_4.sce b/3883/CH7/EX7.4/EX7_4.sce new file mode 100644 index 000000000..4e80f901c --- /dev/null +++ b/3883/CH7/EX7.4/EX7_4.sce @@ -0,0 +1,18 @@ +//Chapter 7, Example 7.4
+clc
+//Variable Declaration
+e = 12 //voltage
+r4 = 8 //resistance in ohms
+r2 = 3 //resistance in ohms
+r3 = 6 //resistance in ohms
+r1 = 4 //resistance in ohms
+rc = r1 //resistance in ohms
+
+//Calculation
+i4 = e/r4 //current through R4 in ampere
+rd = (r2*r3)/(r2+r3) //resistance in ohms
+v2 = (rd*e)/(rd+rc) //applying voltage divider rule
+
+//Results
+printf("I4 = %.1f A \n",i4)
+printf("V2 = %d V",v2)
diff --git a/3883/CH7/EX7.5/EX7_5.sce b/3883/CH7/EX7.5/EX7_5.sce new file mode 100644 index 000000000..e54dade91 --- /dev/null +++ b/3883/CH7/EX7.5/EX7_5.sce @@ -0,0 +1,28 @@ +//Chapter 7, Example 7.5
+clc
+//Variable Declaration
+r1 = 6 //resistance in ohms
+r2 = 6 //resistance in ohms
+r3 = 2 //resistance in ohms
+r4 = 8 //resistance in ohms
+r5 = 12 //resistance in ohms
+e = 24 //voltage
+
+//Calculation
+r = (r1*r2)/(r1+r2) //parallel combination of R1 and R2
+ra = (r*r3)/(r+r3) //resistance A combination in ohm
+rb = (r4*r5)/(r4+r5) //resistance B combination in ohm
+rt = ra+rb //total resistance in ohms
+is = e/rt //current
+v1 = is*ra //voltage across R'A'
+v5 = is*rb //voltage across R'B'
+i4 = v5/r4 //current in ampere through R'B'
+i2 = v1/r2 //current in ampere through R2
+
+//Results
+printf("Rt = %d ohm \n",rt)
+printf("Is = %d A \n",is)
+printf("V1 = %.1f V \n",v1)
+printf("V5 = %.1f V \n",v5)
+printf("I4 = %.1f A \n",i4)
+printf("I2 = %.1f A \n",i2)
diff --git a/3883/CH7/EX7.6/EX7_6.sce b/3883/CH7/EX7.6/EX7_6.sce new file mode 100644 index 000000000..42ae9143b --- /dev/null +++ b/3883/CH7/EX7.6/EX7_6.sce @@ -0,0 +1,22 @@ +//Chapter 7, Example 7.6
+clc
+//Variable Declaration
+r1 = 5 //resistance in ohms
+r2 = 3 //resistance in ohms
+r3 = 6 //resistance in ohms
+r4 = 2 //resistance in ohms
+e = 12 //voltage
+
+//Calculation
+v1 = (r1*e)/(r1+r2) //voltage divider rule
+v3 = (r3*e)/(r3+r4) //voltage divider rule
+vab = v3-v1 //applying KVL, in voltage
+i1 = v1/r1 //by ohm's law, in amperes
+i3 = v3/r3 //by ohm's law, in amperes
+is = i1+i3 //applying KCL, in amperes
+
+//Results
+printf("a. V1 = %.1f V \n",v1)
+printf(" V3 = %d V \n",v3)
+printf(" Vab = %.1f V \n",vab)
+printf("b. Is = %d A \n",is)
diff --git a/3883/CH7/EX7.7/EX7_7.sce b/3883/CH7/EX7.7/EX7_7.sce new file mode 100644 index 000000000..41b45bd37 --- /dev/null +++ b/3883/CH7/EX7.7/EX7_7.sce @@ -0,0 +1,22 @@ +//Chapter 7, Example 7.7
+clc
+//Variable Declaration
+e1 = 6 //voltage
+e2 = 18 //voltage
+r1 = 6 //resistance in ohms
+r2 = 5 //resistance in ohms
+r3 = 7 //resistance in ohms
+r4 = 6 //resistance in ohms
+
+//Calculation
+v2 = -e1 //in voltage
+v1 = e2+e1 //total voltage
+i1 = v1/r1 //by ohm's law, in amperes
+i2 = e1/r4 //by ohm's law, in amperes
+i3 = e1/(r2+r3) //by ohm's law, in amperes
+i = i1+i2+i3 //applying KCL, in amperes
+
+//Results
+printf("V2 = %d V \n",v2)
+printf("V1 = %d V \n",v1)
+printf("I = %.1f A",i)
diff --git a/3883/CH7/EX7.8/EX7_8.sce b/3883/CH7/EX7.8/EX7_8.sce new file mode 100644 index 000000000..49357fc93 --- /dev/null +++ b/3883/CH7/EX7.8/EX7_8.sce @@ -0,0 +1,27 @@ +//Chapter 7, Example 7.8
+clc
+//Variable Declaration
+r1 = 40*10^3 //resistance in ohms
+r2 = 4*10^3 //resistance in ohms
+rc = 10*10^3 //resistance in ohms 'C'
+re = 1*10^3 //resistance in ohms 'E'
+vcc = 22 //power supply Vcc
+vb = 2 //base voltage
+vbe = 0.7 //base emitter voltage
+
+//Calculation
+v2 = vb
+ve = v2-vbe //applying KVL to lower loop
+ie = ve/re //by ohm's law, in ampere
+v1 = vcc-v2 //applying KVL to upper loop
+ic = ie // in ampere
+vc = vcc-(ie*rc) //applying KVL , in voltaage
+vbc = vb-vc //in voltaage
+vce = vc-ve //in voltaage
+
+//Results
+printf("Ve = %.1f V \n",ve)
+printf("Ie = %.1f mA \n",ie*1000)
+printf("V1 = %d V \n",v1)
+printf("Vbc = %d V \n",vbc)
+printf("Vce = %.1f V",vce)
diff --git a/3883/CH7/EX7.9/EX7_9.sce b/3883/CH7/EX7.9/EX7_9.sce new file mode 100644 index 000000000..66b432d2f --- /dev/null +++ b/3883/CH7/EX7.9/EX7_9.sce @@ -0,0 +1,24 @@ +//Chapter 7, Example 7.9
+clc
+//Variable Declaration
+r123 = 24*10^3 //combining resistance 1,2,3 in ohms
+r4 = 24*10^3 //resistance in ohms
+r5 = 12*10^3 //resistance in ohms
+r6 = 12*10^3 //resistance in ohms
+r7 = 9*10^3 //resistance in ohms
+r89 = 9*10^3 //combining resistance 8,9 in ohms
+e = 72 //voltage
+
+//Calculation
+r = (r123*r4)/(r123+r4) //parallel resistance R123 and R4 in ohm
+i5 = e/(r+r5) //by ohm's law, in ampere
+rr = (r7*r89)/(r7+r89) //parallel resistor R7 and R89, in ohms
+v7 = (rr*e)/(rr+r6) //voltage divider rule, in volts
+i6 = v7/rr //current through rr, in ampere
+is = i5+i6 //soucre current by KCL, in ampere
+
+//Results
+printf("I5 = %d mA \n",i5*1000)
+printf("V7 = %.1f V \n",v7)
+printf("I6 = %.2f mA \n",i6*1000)
+printf("Is = %.2f mA \n",is*1000)
diff --git a/3883/CH8/EX8.1/EX8_1.sce b/3883/CH8/EX8.1/EX8_1.sce new file mode 100644 index 000000000..6a692ca72 --- /dev/null +++ b/3883/CH8/EX8.1/EX8_1.sce @@ -0,0 +1,14 @@ +//Chapter 8, Example 8.1
+clc
+//Variable Declaration
+i = 10*10^-3 //source current
+r = 20*10^3 //resistance in ohms
+
+//Calculation
+i1 = i //current in ampere
+v1 = i1*r //by ohm's law, in volts
+vs = v1 //in volts
+
+//Results
+printf("I1 = %d mA \n",i1*1000)
+printf("Vs = %d V",vs)
diff --git a/3883/CH8/EX8.2/EX8_2.sce b/3883/CH8/EX8.2/EX8_2.sce new file mode 100644 index 000000000..1f46216ff --- /dev/null +++ b/3883/CH8/EX8.2/EX8_2.sce @@ -0,0 +1,16 @@ +//Chapter 8, Example 8.2
+clc
+//Variable Declaration
+e = 12 //voltage
+r = 4 //resistance in ohm
+i = 7 //current source in ampere
+
+//Calculation
+vs = e //voltage = Vs
+i2 = e/r //by ohm's law, in amperes
+i1 = i-i2 //applying kirchoff's current law
+
+//Results
+printf("Vs = %d V \n",vs)
+printf("I2 = %d A \n",i2)
+printf("I1 = %d A",i1)
diff --git a/3883/CH8/EX8.3/EX8_3.sce b/3883/CH8/EX8.3/EX8_3.sce new file mode 100644 index 000000000..d0bcb1db1 --- /dev/null +++ b/3883/CH8/EX8.3/EX8_3.sce @@ -0,0 +1,15 @@ +//Chapter 8, Example 8.3
+clc
+//Variable Declaration
+r2 = 1 //resistance in ohms
+i = 6 //current in amperes
+r1 = 2 //resistance in ohms
+
+//Calculation
+i1 = (r2*i)/(r2+r1) //applying the current divider rule
+v1 = i1*r1 //by ohm's law, in volts
+vs = v1+20 //applying kirchoff's current law
+
+//Results
+printf("I1 = %d A \n",i1)
+printf("Vs = %d V",vs)
diff --git a/3883/CH8/EX8.4/EX8_4.sce b/3883/CH8/EX8.4/EX8_4.sce new file mode 100644 index 000000000..f5bff9ec0 --- /dev/null +++ b/3883/CH8/EX8.4/EX8_4.sce @@ -0,0 +1,20 @@ +//Chapter 8, Example 8.4
+clc
+//Variable Declaration
+e = 6 //voltage
+rs = 2 //resistance in ohm
+rl = 4 //load resistance in ohm
+i = 3 //source current in ampere
+rl2 = 1000 //replace load resistance in ohm
+
+//Calculation
+il = e/(rs+rl) //current in ampere
+il1 = (rs*i)/(rs+rl) //applying the current divider rule
+il2 = e/(rs+rl2) //current in ampere
+il3 = e/rl2 //current in ampere
+
+//Results
+printf("a. IL = %d A \n",il)
+printf(" IL = %d A \n",il1)
+printf("b. IL = %.2f mA \n",il2*1000)
+printf("c. IL = %d mA",il3*1000)
diff --git a/3883/CH8/EX8.5/EX8_5.sce b/3883/CH8/EX8.5/EX8_5.sce new file mode 100644 index 000000000..12880051d --- /dev/null +++ b/3883/CH8/EX8.5/EX8_5.sce @@ -0,0 +1,20 @@ +//Chapter 8, Example 8.5
+clc
+//Variable Declaration
+rs = 3000 //resistance in ohm
+i = 9*10^-3 //source current in ampere
+rl = 6000 //load resistance in ohm
+e = 27 //voltage
+rl2 = 10 //replace load resistance in ohm
+
+//Calculation
+il = (rs*i)/(rs+rl) //applying the current divider rule
+il1 = e/(rs+rl) //current in ampere
+il2 = (rs*i)/(rs+rl2) //applying the current divider rule
+il3 = i // current in ampere
+
+//Results
+printf("a. IL = %d mA \n",il*1000)
+printf(" IL = %d mA \n",il1*1000)
+printf("b. IL = %.2f mA \n",il2*1000)
+printf("c. IL = %d mA",il3*1000)
diff --git a/3883/CH8/EX8.6/EX8_6.sce b/3883/CH8/EX8.6/EX8_6.sce new file mode 100644 index 000000000..510674296 --- /dev/null +++ b/3883/CH8/EX8.6/EX8_6.sce @@ -0,0 +1,24 @@ +//Chapter 8, Example 8.6
+clc
+//Variable Declaration
+i1 = 6 //current in ampere figs. 8.11
+i2 = 10 //current in ampere figs. 8.11
+r1 = 3 //resistance in ohms figs. 8.11
+r2 = 6 //resistance in ohms figs. 8.11
+i3 = 7 //current in ampere figs. 8.12
+i4 = 3 //current in ampere figs. 8.12
+i5 = 4 //current in ampere figs. 8.12
+r3 = 4 //resistance in ohms figs. 8.12
+
+
+//Calculation
+is = i2-i1 //current in ampere
+rs = (r1*r2)/(r1+r2) //R1 and R2 are parallel
+is1 = i3+i5-i4 //current in ampere
+rs1 = r3 //in ohms
+
+//Results
+printf("Is = %d A \n",is)
+printf("Rs = %d ohm \n",rs)
+printf("Is = %d A \n",is1)
+printf("Rs = %d ohm \n",rs1)
diff --git a/3883/CH8/EX8.7/EX8_7.sce b/3883/CH8/EX8.7/EX8_7.sce new file mode 100644 index 000000000..ab96b4846 --- /dev/null +++ b/3883/CH8/EX8.7/EX8_7.sce @@ -0,0 +1,18 @@ +//Chapter 8, Example 8.7
+clc
+//Variable Declaration
+i1 = 4 //current in ampere
+i2 = 6 //current in ampere
+r1 = 8 //resistance in ohm
+r2 = 24 //resistance in ohm
+rl = 14 //load resistance in ohm
+
+//Calculation
+is = i1+i2 //combining current in ampere
+rs = (r1*r2)/(r1+r2) //R1 and R2 are parallel
+il = (rs*is)/(rs+rl) //applying current divider rule
+
+//Results
+printf("Is = %d A \n",is)
+printf("Rs = %d ohm \n",rs)
+printf("IL = %d A",il)
diff --git a/3883/CH8/EX8.8/EX8_8.sce b/3883/CH8/EX8.8/EX8_8.sce new file mode 100644 index 000000000..6f622e910 --- /dev/null +++ b/3883/CH8/EX8.8/EX8_8.sce @@ -0,0 +1,15 @@ +//Chapter 8, Example 8.8
+clc
+//Variable Declaration
+i1 = 4 //current in ampere
+r1 = 3 //resistance in ohm
+e2 = 5 //voltage
+r2 = 2 //resistance in ohm
+
+//Calculation
+es = i1*r1 //by ohm's law
+rs = r1 //equal
+i2 = (es+e2)/(rs+r2)
+
+//Results
+printf("I2 = %.1f A ",i2)
diff --git a/3883/CH8/EX8.9/EX8_9.sce b/3883/CH8/EX8.9/EX8_9.sce new file mode 100644 index 000000000..8b05d29cd --- /dev/null +++ b/3883/CH8/EX8.9/EX8_9.sce @@ -0,0 +1,39 @@ +//Chapter 8, Example 8.9
+clc
+//Variable Declaration
+
+//three equations substituting the coefficients to variables
+i11=2
+i12=0
+i13=4
+i1=2
+
+i21=0
+i22=1
+i23=4
+i2=6
+
+i31=1
+i32=1
+i33=-1
+i3=0
+
+//Calculation
+
+//for I1
+d=[i11 i12 i13;i21 i22 i23;i31 i32 i33]
+di1=[i1 i12 i13;i2 i22 i23;i3 i32 i33]
+ia1=det(di1)/det(d)
+
+//for I2
+di2=[i11 i1 i13 ; i21 i2 i23 ; i31 i3 i33]
+ia2=det(di2)/det(d)
+
+//for I3
+di3=[i11 i12 i1 ; i21 i22 i2 ; i31 i32 i3]
+ia3=det(di3)/det(d)
+
+//Results
+printf('I1 = %d A \n',ia1)
+printf('I2 = %d A \n',ia2)
+printf('I3 = %d A \n',ia3)
diff --git a/3883/CH9/EX9.1/EX9_1.sce b/3883/CH9/EX9.1/EX9_1.sce new file mode 100644 index 000000000..c1dd4a610 --- /dev/null +++ b/3883/CH9/EX9.1/EX9_1.sce @@ -0,0 +1,16 @@ +//Chapter 9, Example 9.1
+clc
+//Variable Declaration
+rsc = 0
+r1 = 6 //resistance in ohms
+e = 30 //voltage
+r1 = 6 //resistance in ohms
+
+
+//Calculation
+i1 = (rsc)/(rsc+r1) //applied the current divider rule, in amperes
+i11 = e/r1 //applying ohm's law
+i = i1+i11 //current in amperes
+
+//Results
+printf("I = %d A \n",i)
diff --git a/3883/CH9/EX9.10/EX9_10.sce b/3883/CH9/EX9.10/EX9_10.sce new file mode 100644 index 000000000..3cf4a12d1 --- /dev/null +++ b/3883/CH9/EX9.10/EX9_10.sce @@ -0,0 +1,23 @@ +//Chapter 9, Example 9.10
+clc
+//Variable Declaration
+r1 = 0.8*10^3 //resistance in ohms
+r2 = 4000 //resistance in ohms
+r3 = 6000 //resistance in ohms
+r4 = 1.4*10^3 //resistance in ohms
+e1= 6 //voltage
+e2 = 10 //voltage
+
+//Calculation
+r12 = (r1*r2)/(r1+r2) //R1 and R2 are parallel
+rth = r4+((r12*r3)/(r12+r3)) //total resistance in ohm
+r23 = (r2*r3)/(r2+r3) //R2 and R3 are parallel
+v31 = (r23*e1)/(r23+r1) //applying voltage divider rule R23
+eth1 = v31 //voltage
+v32 = (r12*e2)/(r12+r2) //applying voltage divider rule R12
+eth2 = v32 //voltage
+eth = eth1-eth2 //voltage
+
+//Results
+printf("Rth = %d kohm \n",rth/10^3)
+printf("Eth = %d V",eth)
diff --git a/3883/CH9/EX9.11/EX9_11.sce b/3883/CH9/EX9.11/EX9_11.sce new file mode 100644 index 000000000..c157faeef --- /dev/null +++ b/3883/CH9/EX9.11/EX9_11.sce @@ -0,0 +1,14 @@ +//Chapter 9, Example 9.11
+clc
+//Variable Declaration
+r1 = 3 //resistance in ohms
+r2 = 6 //resistance in ohms
+e = 9 //voltage
+
+//Calculation
+rn = (r1*r2)/(r1+r2) //R1 and R2 are parallel
+in = e/r1 //current in amperes
+
+//Results
+printf("Rn = %d ohm \n",rn)
+printf("In = %d A",in)
diff --git a/3883/CH9/EX9.12/EX9_12.sce b/3883/CH9/EX9.12/EX9_12.sce new file mode 100644 index 000000000..c2135da60 --- /dev/null +++ b/3883/CH9/EX9.12/EX9_12.sce @@ -0,0 +1,14 @@ +//Chapter 9, Example 9.12
+clc
+//Variable Declaration
+r1 = 5 //resistance in ohms
+r2 = 4 //resistance in ohms
+i = 10 //current in amperes
+
+//Calculation
+rn = r1+r2 //total resistance in ohms
+in = (r1*i)/(r1+r2) //applying the current in amperes divider rule
+
+//Results
+printf("Rn = %d ohm \n",rn)
+printf("In = %.3f A",in)
diff --git a/3883/CH9/EX9.13/EX9_13.sce b/3883/CH9/EX9.13/EX9_13.sce new file mode 100644 index 000000000..d450903a5 --- /dev/null +++ b/3883/CH9/EX9.13/EX9_13.sce @@ -0,0 +1,20 @@ +//Chapter 9, Example 9.13
+clc
+//Variable Declaration
+r1 = 4 //resistance in ohms
+r2 = 6 //resistance in ohms
+r3 = 9 //resistance in ohms
+r4 = 10 //resistance in ohms
+e1 = 7 //voltage
+e2 = 12 //voltage
+i = 8 //current source in amperes
+
+//Calculation
+rn = (r1*r2)/(r1+r2) //R1 and R2 are parallel
+in1= e1/r1 //current in amperes
+in2 = i //short circuited
+in = in2-in1 //in amperes
+
+//Results
+printf("Rn = %.1f ohm \n",rn)
+printf("In = %.2f A \n",in)
diff --git a/3883/CH9/EX9.14/EX9_14.sce b/3883/CH9/EX9.14/EX9_14.sce new file mode 100644 index 000000000..e22c790e0 --- /dev/null +++ b/3883/CH9/EX9.14/EX9_14.sce @@ -0,0 +1,23 @@ +//Chapter 9, Example 9.14
+clc
+//Variable Declaration
+rint1 = 2.5 //resistance in ohms of dc generator
+rint2 = 0.5 //resistance in ohms of battery
+rint3 = 40 //resistance in ohms of laboratory
+n = 0.75 //efficiency in decimal form
+
+//Calculation
+rl1 = rint1 //for the dc generator, in ohms
+rl2 = rint2 //for the battery, in ohms
+rl3 = rint3 //for the laboratory supply, in ohms
+Rl1 = (n*rl1)/(1-n) //RL dc gen. for efficiency, in ohms
+Rl2 = (n*rl2)/(1-n) //RL battery for efficiency, in ohms
+Rl3 = (n*rl3)/(1-n) //RL laboratory for efficiency, in ohms
+
+//Results
+printf("a. RL = %.1f ohm \n",rl1)
+printf(" RL = %.1f ohm \n",rl2)
+printf(" RL = %d ohm \n",rl3)
+printf("b. RL = %.1f ohm \n",Rl1)
+printf(" RL = %.1f ohm \n",Rl2)
+printf(" RL = %d ohm \n",Rl3)
diff --git a/3883/CH9/EX9.15/EX9_15.sce b/3883/CH9/EX9.15/EX9_15.sce new file mode 100644 index 000000000..60436087f --- /dev/null +++ b/3883/CH9/EX9.15/EX9_15.sce @@ -0,0 +1,13 @@ +//Chapter 9, Example 9.15
+clc
+//Variable Declaration
+rs = 40*10^3 //resistance in ohms
+in =10*10^-3 //current in amperes source
+
+//Calculation
+rl = rs //load resistance in ohms
+pl = (in*in*rs)/4 //maximum power in watt
+
+//Results
+printf("RL = %d kohm \n",rl/10^3)
+printf("PLmax = %d W \n",pl)
diff --git a/3883/CH9/EX9.16/EX9_16.sce b/3883/CH9/EX9.16/EX9_16.sce new file mode 100644 index 000000000..578040a1d --- /dev/null +++ b/3883/CH9/EX9.16/EX9_16.sce @@ -0,0 +1,17 @@ +//Chapter 9, Example 9.16
+clc
+//Variable Declaration
+r1 = 6 //resistance in ohms
+r2 = 3 //resistance in ohms
+r3 = 8 //resistance in ohms
+e = 12 //voltage
+
+//Calculation
+rth = r3+(r1*r2)/(r1+r2) //total resistance in ohms
+eth = (r2*e)/(r2+r1) //voltage divider
+PLmax = (eth*eth)/(4*rth) //maximum power in watt
+
+//Results
+printf("Rth = %d ohm \n",rth)
+printf("Eth = %d V \n",eth)
+printf("PLmax = %.1f W",PLmax)
diff --git a/3883/CH9/EX9.17/EX9_17.sce b/3883/CH9/EX9.17/EX9_17.sce new file mode 100644 index 000000000..b5d4d13cd --- /dev/null +++ b/3883/CH9/EX9.17/EX9_17.sce @@ -0,0 +1,19 @@ +//Chapter 9, Example 9.17
+clc
+//Variable Declaration
+r1 = 3 //resistance in ohms
+r2 = 10 //resistance in ohms
+r3 = 2 //resistance in ohms
+e = 68 //voltage
+i = 6 //current in amperes
+
+//Calculation
+rth = r1+r2+r3 //total resistance in ohms
+rl = rth //load resistance in ohms
+v2 = i*r2 //voltage
+eth = v2 + e //applying kirchoff's voltage law
+plmax = (eth*eth)/(4*rth) //maximum power in watt
+
+//Results
+printf("Rth = %d ohm \n",rth)
+printf("PLmax = %.2f W",plmax)
diff --git a/3883/CH9/EX9.18/EX9_18.sce b/3883/CH9/EX9.18/EX9_18.sce new file mode 100644 index 000000000..ec05daa51 --- /dev/null +++ b/3883/CH9/EX9.18/EX9_18.sce @@ -0,0 +1,22 @@ +//Chapter 9, Example 9.18
+clc
+//Variable Declaration
+r1 = 5 //resistance in ohms
+r2 = 4 //resistance in ohms
+r3 = 2 //resistance in ohms
+e1 = 10 //voltage
+e2= 16 //voltage
+e3 = 8 //voltage
+rl = 3 //load resistance in ohms
+
+//Calculation
+Eeq = ((e1/r1)-(e2/r2)+(e3/r3))/((1/r1)+(1/r2)+(1/r3))
+Req = 1/((1/r1)+(1/r2)+(1/r3)) //resistance in ohms
+il = Eeq/(Req+rl) //load current in amperes
+vl = il*rl //load voltage
+
+//Results
+printf("Eeq = %.3f V \n",Eeq)
+printf("Req = %.3f ohm \n",Req)
+printf("IL = %.3f V \n",il)
+printf("VL = %.3f V ",vl)
diff --git a/3883/CH9/EX9.19/EX9_19.sce b/3883/CH9/EX9.19/EX9_19.sce new file mode 100644 index 000000000..8205e6f54 --- /dev/null +++ b/3883/CH9/EX9.19/EX9_19.sce @@ -0,0 +1,23 @@ +//Chapter 9, Example 9.19
+clc
+//Variable Declaration
+i1 = 5 //source current in amperes
+i2 = 5/3 //source current in amperes
+g1 = 1 //conductance
+g2 = 1/6 //conductance
+r3 = 2 //resistance in ohms
+//Calculation
+it = i1+i2 //total current in amperes
+gt = g1+g2 //total conductance in mho
+Eeq = it/gt //voltage
+Req = 1/gt //equivalent resistance
+i2ohm = Eeq/(Req+r3) //current in amperes of 2-ohm
+Eeq1 = Eeq
+Req1 = Req
+
+//Results
+printf("a. Eeq = %f V \n",Eeq) //converted to decimals
+printf(" Req = %f ohm \n",Req) //converted to decimals
+printf(" I2ohm = %d A \n",i2ohm)
+printf("b. Eeq = %f V \n",Eeq1) //converted to decimals
+printf(" Req = %f ohm ",Req1) //converted to decimals
diff --git a/3883/CH9/EX9.2/EX9_2.sce b/3883/CH9/EX9.2/EX9_2.sce new file mode 100644 index 000000000..513a56b8b --- /dev/null +++ b/3883/CH9/EX9.2/EX9_2.sce @@ -0,0 +1,19 @@ +//Chapter 9, Example 9.2
+clc
+//Variable Declaration
+r1 = 24 //resistance in ohms
+r2 = 12 //resistance in ohms
+r3 = 4 //resistance in ohms
+e1 = 54 //voltage
+e2 = 48 //voltage
+
+//Calculation
+rt = r1+(r2*r3)/(r2+r3) //total resistance in ohms
+i = e1/rt //current in amperes in loop
+i31 = (r2*i)/(r2+r3) //using current divider rule, in amperes
+rt2 = r3+(r1*r2)/(r1+r2) //total resistance in ohms
+i33 = e2/rt2 //current in amperes in loop
+i3 = i33-i31 //total current in amperes through R3
+
+//Results
+printf("I3 = %.1f A",i3)
diff --git a/3883/CH9/EX9.3/EX9_3.sce b/3883/CH9/EX9.3/EX9_3.sce new file mode 100644 index 000000000..05a52a1f6 --- /dev/null +++ b/3883/CH9/EX9.3/EX9_3.sce @@ -0,0 +1,17 @@ +//Chapter 9, Example 9.3
+clc
+//Variable Declaration
+r1 = 12 //resistance in ohms
+e = 36 //voltage
+r2 = 6 //resistance in ohms
+i = 9 //source current in amperes
+
+//Calculation
+i21 = e/(r1+r2) //current in amperes
+i22 = (r1*i)/(r1+r2) //applying current in amperes divider rule
+i2 = i21+i22 //total current in amperes through the R2
+p = i2*i2*r2 //power in watt to R2
+
+//Results
+printf("I2 = %d A \n",i2)
+printf("P = %d W \n",p)
diff --git a/3883/CH9/EX9.4/EX9_4.sce b/3883/CH9/EX9.4/EX9_4.sce new file mode 100644 index 000000000..b5505812e --- /dev/null +++ b/3883/CH9/EX9.4/EX9_4.sce @@ -0,0 +1,15 @@ +//Chapter 9, Example 9.4
+clc
+//Variable Declaration
+r1 = 6000 //resistance in ohms
+r2 = 12000 //resistance in ohms
+i = 6*10^-3 //current in amperes
+e = 9 //voltage
+
+//Calculation
+i21 = (r1*i)/(r1+r2) //current in amperes divider rule
+i22 = e/(r1+r2) //effect of 9-V voltage source
+i2 = i21+i22 //sum of the current in amperes
+
+//Results
+printf("I2 = %.1f mA",i2*1000)
diff --git a/3883/CH9/EX9.5/EX9_5.sce b/3883/CH9/EX9.5/EX9_5.sce new file mode 100644 index 000000000..21b6f9ab2 --- /dev/null +++ b/3883/CH9/EX9.5/EX9_5.sce @@ -0,0 +1,18 @@ +//Chapter 9, Example 9.5
+clc
+//Variable Declaration
+r1 = 2 //resistance in ohms
+r2 = 4 //resistance in ohms
+e1 = 12 //voltage
+e2 = 6 //voltage
+i = 3 //current in amperes
+
+
+//Calculation
+i11 = e1/(r1+r2) //effect of the 12-V source
+i21 = e2/(r1+r2) //effect of the 6-V source
+i23 = (r2*i)/(r1+r2) //applying the current divider rule, in amperes
+i1 = i21+i23-i11 //current in amperes
+
+//Results
+printf("I1 = %d A \n",i1)
diff --git a/3883/CH9/EX9.6/EX9_6.sce b/3883/CH9/EX9.6/EX9_6.sce new file mode 100644 index 000000000..838c8b9e8 --- /dev/null +++ b/3883/CH9/EX9.6/EX9_6.sce @@ -0,0 +1,23 @@ +//Chapter 9, Example 9.6
+clc
+//Variable Declaration
+e1= 9 //voltage
+r1 = 3 //resistance in ohms
+r2 = 6 //resistance in ohms
+rl1 =2 //resistance in ohms
+rl2 = 10 //resistance in ohms
+rl3 = 100 //resistance in ohms
+
+//Calculation
+rth = (r1*r2)/(r1+r2) //R1 and R2 are parallel
+eth = (r2*e1)/(r2+r1) //applying voltage divider rule
+il1 = eth/(rth+rl1) //RL = 20 ohm
+il2 = eth/(rth+rl2) //RL = 10 ohm
+il3 = eth/(rth+rl3) //RL = 100 ohm
+
+//Results
+printf("Rth = %d ohm \n",rth)
+printf("Eth = %d V \n",eth)
+printf("IL = %.1f A \n",il1)
+printf("IL = %.1f A \n",il2)
+printf("IL = %.3f A \n",il3)
diff --git a/3883/CH9/EX9.7/EX9_7.sce b/3883/CH9/EX9.7/EX9_7.sce new file mode 100644 index 000000000..91057d5d0 --- /dev/null +++ b/3883/CH9/EX9.7/EX9_7.sce @@ -0,0 +1,15 @@ +//Chapter 9, Example 9.7
+clc
+//Variable Declaration
+r1 = 4 //resistance in ohms
+r2 = 2 //resistance in ohms
+i1 = 12 //current in amperes source
+i2 = 0
+
+//Calculation
+rth = r1+r2 //total resistance in ohms
+eth = i1*r1 //voltage
+
+//Results
+printf("Rth = %d ohm \n",rth)
+printf("Eth = %d V",eth)
diff --git a/3883/CH9/EX9.8/EX9_8.sce b/3883/CH9/EX9.8/EX9_8.sce new file mode 100644 index 000000000..28be9533a --- /dev/null +++ b/3883/CH9/EX9.8/EX9_8.sce @@ -0,0 +1,14 @@ +//Chapter 9, Example 9.8
+clc
+//Variable Declaration
+r1 = 6 //resistance in ohms
+r2 = 4 //resistance in ohms
+e1 = 8 //voltage
+
+//Calculation
+rth = (r1*r2)/(r1+r2) //R1 and R2 are parallel
+eth = (r1*e1)/(r1+r2) //applying voltage divider rule
+
+//Results
+printf("Rth = %.1f ohm \n",rth)
+printf("Eth = %.1f V",eth)
diff --git a/3883/CH9/EX9.9/EX9_9.sce b/3883/CH9/EX9.9/EX9_9.sce new file mode 100644 index 000000000..38771734a --- /dev/null +++ b/3883/CH9/EX9.9/EX9_9.sce @@ -0,0 +1,20 @@ +//Chapter 9, Example 9.9
+clc
+//Variable Declaration
+r1 = 6 //resistance in ohms
+r2 = 4 //resistance in ohms
+r3 = 3 //resistance in ohms
+r4 = 12 //resistance in ohms
+e = 72 //voltage
+r22 = 12 //resistance in ohms
+
+
+//Calculation
+rth = ((r1*r3)/(r1+r3))+((r2*r4)/(r2+r4)) //total resistance in ohms
+v1 = (r1*e)/(r1+r3) //voltage divider rule R1
+v2 = (r22*e)/(r2+r4) //voltage divider rule R2
+eth = v2-v1 //applying kirchoff's voltage law
+
+//Results
+printf("Rth = %d ohm \n",rth)
+printf("Eth = %d V",eth)
diff --git a/3893/CH1/EX1.1/EX1_1.png b/3893/CH1/EX1.1/EX1_1.png Binary files differnew file mode 100644 index 000000000..9ac741ca1 --- /dev/null +++ b/3893/CH1/EX1.1/EX1_1.png diff --git a/3893/CH1/EX1.1/Ex1_1.jpg b/3893/CH1/EX1.1/Ex1_1.jpg Binary files differnew file mode 100644 index 000000000..11098f9a9 --- /dev/null +++ b/3893/CH1/EX1.1/Ex1_1.jpg diff --git a/3893/CH1/EX1.1/Ex1_1.sce b/3893/CH1/EX1.1/Ex1_1.sce new file mode 100644 index 000000000..a255dda7a --- /dev/null +++ b/3893/CH1/EX1.1/Ex1_1.sce @@ -0,0 +1,33 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX1_1.sce
+
+clc;
+clear;
+Vcc=10;//dc supply voltage in V
+Rc=2e3;//collector resiatance in ohm
+//Vce=Vcc+(Ic*Rc)
+//To find the coordinates of the load line first put Ic=0 in the following equation
+Ic=0;
+Vce=Vcc-(Ic*Rc);
+printf("\n The coordinates of one end point B of the load line is (%1.0f V,0)",Vce)
+//To find the coordinates of the load line then put Vce=0 in the following equation
+Vce=0;
+Ic=(Vcc-Vce)/Rc;
+printf("\n The coordinates of other end point A of the load line is (0,%1.0f mA)",Ic*1e3)
+
+vce=0:10;
+for i=1:11
+ ic(i)=(10-vce(i))/2;
+end
+plot(vce,ic)
+xlabel("Vce in volt")
+ylabel("Ic in mA")
+title("DC load line")
+
+
diff --git a/3893/CH1/EX1.2/Ex1_2.jpg b/3893/CH1/EX1.2/Ex1_2.jpg Binary files differnew file mode 100644 index 000000000..f4394447c --- /dev/null +++ b/3893/CH1/EX1.2/Ex1_2.jpg diff --git a/3893/CH1/EX1.2/Ex1_2.sce b/3893/CH1/EX1.2/Ex1_2.sce new file mode 100644 index 000000000..fd00a2b37 --- /dev/null +++ b/3893/CH1/EX1.2/Ex1_2.sce @@ -0,0 +1,21 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX1_2.sce
+
+clc;
+clear;
+Rc=5e3;//collector load resistance in ohm
+Vcc=10;//dc supply voltage in V
+Ib=20e-6;//base current in A
+beta=50;
+
+Ic=beta*Ib;//collector current in A
+Vce=Vcc-(Ic*Rc);
+printf("\n The operating point is (%1.0f V;%1.0f mA)",Vce,Ic*1e3)
+
+
diff --git a/3893/CH1/EX1.3/Ex1_3.jpg b/3893/CH1/EX1.3/Ex1_3.jpg Binary files differnew file mode 100644 index 000000000..5d20d7e1c --- /dev/null +++ b/3893/CH1/EX1.3/Ex1_3.jpg diff --git a/3893/CH1/EX1.3/Ex1_3.sce b/3893/CH1/EX1.3/Ex1_3.sce new file mode 100644 index 000000000..057428753 --- /dev/null +++ b/3893/CH1/EX1.3/Ex1_3.sce @@ -0,0 +1,18 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX1_3.sce
+
+clc;
+clear;
+Vcc=5;//dc supply voltage in V
+Rc=2e3;//collector load resistance in ohm
+Vce=1;//knee voltage in V
+
+Ic=(Vcc-Vce)/Rc;
+printf("\n The maximum collector current= %1.0f mA",Ic*1e3)
+
diff --git a/3893/CH1/EX1.4/Ex1_4.jpg b/3893/CH1/EX1.4/Ex1_4.jpg Binary files differnew file mode 100644 index 000000000..916723ea7 --- /dev/null +++ b/3893/CH1/EX1.4/Ex1_4.jpg diff --git a/3893/CH1/EX1.4/Ex1_4.sce b/3893/CH1/EX1.4/Ex1_4.sce new file mode 100644 index 000000000..6dcba279f --- /dev/null +++ b/3893/CH1/EX1.4/Ex1_4.sce @@ -0,0 +1,21 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX1_4.sce
+
+clc;
+clear;
+Rc=4e3;//collector load resistance in ohm
+Vcc=15;//dc supply voltage in V
+Vce=1;//knee voltage in V
+beta=100;
+
+Ie=(Vcc-Vce)/(beta*Rc);
+printf("\n Permissible input current= %1.0f microampere",Ie*1e6)
+
+//There is a mistake in the book final answer
+//the book answer is 30 microampere insteadof 35 microampere
diff --git a/3893/CH10/EX10.1/Ex10_1.jpg b/3893/CH10/EX10.1/Ex10_1.jpg Binary files differnew file mode 100644 index 000000000..7f366709f --- /dev/null +++ b/3893/CH10/EX10.1/Ex10_1.jpg diff --git a/3893/CH10/EX10.1/Ex10_1.sce b/3893/CH10/EX10.1/Ex10_1.sce new file mode 100644 index 000000000..1e2dd6bf9 --- /dev/null +++ b/3893/CH10/EX10.1/Ex10_1.sce @@ -0,0 +1,15 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX10_1.sce
+
+clc;
+clear;
+L=60e-6;//inductor value in H
+C=300e-12;//capacitor value in F
+f=1/(2*%pi*sqrt(L*C));
+printf("\n Frequency of the oscillator =%d kHz \n",f*1e-3)
diff --git a/3893/CH10/EX10.2/Ex10_2.jpg b/3893/CH10/EX10.2/Ex10_2.jpg Binary files differnew file mode 100644 index 000000000..4f8374e6c --- /dev/null +++ b/3893/CH10/EX10.2/Ex10_2.jpg diff --git a/3893/CH10/EX10.2/Ex10_2.sce b/3893/CH10/EX10.2/Ex10_2.sce new file mode 100644 index 000000000..e0ac42cf5 --- /dev/null +++ b/3893/CH10/EX10.2/Ex10_2.sce @@ -0,0 +1,19 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX10_2.sce
+
+clc;
+clear;
+L1=0.3e-3;//value of inductor1 in H
+L2=0.2e-3;//value of inductor2 in H
+C=0.003e-6;//capacitor value in F
+f=1/(2*%pi*sqrt((L1+L2)*C));//equation of frequency for Hartley oscillator
+printf("\n Frequency of Hartley oscillator =%0.2f kHz \n",f*1e-3)
+
+//Note:There is a error in the book for calculating frequency
+ // Answer given in the book was wrong
diff --git a/3893/CH10/EX10.3/Ex10_3.jpg b/3893/CH10/EX10.3/Ex10_3.jpg Binary files differnew file mode 100644 index 000000000..d90b5531d --- /dev/null +++ b/3893/CH10/EX10.3/Ex10_3.jpg diff --git a/3893/CH10/EX10.3/Ex10_3.sce b/3893/CH10/EX10.3/Ex10_3.sce new file mode 100644 index 000000000..3c08d0c07 --- /dev/null +++ b/3893/CH10/EX10.3/Ex10_3.sce @@ -0,0 +1,18 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX10_3.sce
+
+clc;
+clear;
+C1=0.16e-6;//value of capacitor1 in F
+C2=0.018e-6;//value of capacitor2 in F
+L=15.8e-3;//value of inductor in H
+f=(1/(2*%pi))*sqrt((C1+C2)/(L*C1*C2));//Equation of frequency for Colpitts oscillator
+printf("\n Frequency of Colpitts oscillator =%0.3f kHz \n",f*1e-3)
+
+
diff --git a/3893/CH10/EX10.4/Ex10_4.jpg b/3893/CH10/EX10.4/Ex10_4.jpg Binary files differnew file mode 100644 index 000000000..bddfab320 --- /dev/null +++ b/3893/CH10/EX10.4/Ex10_4.jpg diff --git a/3893/CH10/EX10.4/Ex10_4.sce b/3893/CH10/EX10.4/Ex10_4.sce new file mode 100644 index 000000000..08a2cfd89 --- /dev/null +++ b/3893/CH10/EX10.4/Ex10_4.sce @@ -0,0 +1,15 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX10_4.sce
+
+clc;
+clear;
+R=680e3;//given R1=R2=R3=680 kHz
+C=100e-12;//given C1=C2=C3=100 pF
+f=1/(2*%pi*R*C*sqrt(6));//equation of frequency for phase-shift oscillator
+printf("\n Frequency of the phase shift oscillator =%1.0f Hz \n",f)
diff --git a/3893/CH10/EX10.5/Ex10_5.jpg b/3893/CH10/EX10.5/Ex10_5.jpg Binary files differnew file mode 100644 index 000000000..a4633cd59 --- /dev/null +++ b/3893/CH10/EX10.5/Ex10_5.jpg diff --git a/3893/CH10/EX10.5/Ex10_5.sce b/3893/CH10/EX10.5/Ex10_5.sce new file mode 100644 index 000000000..84f74ec49 --- /dev/null +++ b/3893/CH10/EX10.5/Ex10_5.sce @@ -0,0 +1,20 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX10_5.sce
+
+clc;
+clear;
+f=3e3;//frequency of the Wiens bridge oscillator in Hz
+R=200e3;//resistors value in ohm
+//equation of frequency for Wiens bridge oscillator is f=1/(2*%pi*C*R)
+C=1/(2*%pi*f*R);
+printf("\n The value of capacitance =%0.1f pF",C*1e12)
+
+//Answer given in the book is vary
+//C=265.5 pF is slightly wrong(point variation)
+//There is a calculation error in the book
diff --git a/3893/CH11/EX11.1/Ex11_1.jpg b/3893/CH11/EX11.1/Ex11_1.jpg Binary files differnew file mode 100644 index 000000000..6f14b9483 --- /dev/null +++ b/3893/CH11/EX11.1/Ex11_1.jpg diff --git a/3893/CH11/EX11.1/Ex11_1.sce b/3893/CH11/EX11.1/Ex11_1.sce new file mode 100644 index 000000000..efe917052 --- /dev/null +++ b/3893/CH11/EX11.1/Ex11_1.sce @@ -0,0 +1,23 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX11_1.sce
+
+clc;
+clear;
+fc=600;//carrier frequency in kHz
+fm=1.5;//modulating frequency in kHz
+
+printf("(1)\n")
+usf=fc+fm;
+lsf=fc-fm;
+printf("\n upper side band frequency=%0.1f kHz \n ",usf)
+printf("\n lower side band frequency=%0.1f kHz \n ",lsf)
+
+printf("\n(2)\n")
+BW=2*fm;
+printf("\n Bandwidth=%d kHz",BW)
diff --git a/3893/CH11/EX11.10/Ex11_10.jpg b/3893/CH11/EX11.10/Ex11_10.jpg Binary files differnew file mode 100644 index 000000000..e4154955f --- /dev/null +++ b/3893/CH11/EX11.10/Ex11_10.jpg diff --git a/3893/CH11/EX11.10/Ex11_10.sce b/3893/CH11/EX11.10/Ex11_10.sce new file mode 100644 index 000000000..af57cae91 --- /dev/null +++ b/3893/CH11/EX11.10/Ex11_10.sce @@ -0,0 +1,16 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX11_10.sce
+
+clc;
+clear;
+CS=80e3;//carrier swing of an FM wave in Hz
+f=8e3;//siganl frequency in Hz
+Fd=CS/2;//frequency deviation in Hz
+m=Fd/f;
+printf("\n Modulation index =%d",m)
diff --git a/3893/CH11/EX11.11/Ex11_11.jpg b/3893/CH11/EX11.11/Ex11_11.jpg Binary files differnew file mode 100644 index 000000000..f8f5a4ec2 --- /dev/null +++ b/3893/CH11/EX11.11/Ex11_11.jpg diff --git a/3893/CH11/EX11.11/Ex11_11.sce b/3893/CH11/EX11.11/Ex11_11.sce new file mode 100644 index 000000000..0b63e18f6 --- /dev/null +++ b/3893/CH11/EX11.11/Ex11_11.sce @@ -0,0 +1,17 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX11_11.sce
+
+clc;
+clear;
+fc=105e6;//centre frequency of an FM carrier in Hz
+fmhigh=105.04e6;//highest frequency of the modulating signal in Hz
+fs=8e3;//siganl frequency in Hz
+Fd=fmhigh-fc;
+m=Fd/fs;
+printf("\n Modulation index =%d",m)
diff --git a/3893/CH11/EX11.2/Ex11_2.jpg b/3893/CH11/EX11.2/Ex11_2.jpg Binary files differnew file mode 100644 index 000000000..cc50ee2eb --- /dev/null +++ b/3893/CH11/EX11.2/Ex11_2.jpg diff --git a/3893/CH11/EX11.2/Ex11_2.sce b/3893/CH11/EX11.2/Ex11_2.sce new file mode 100644 index 000000000..d2fc6531d --- /dev/null +++ b/3893/CH11/EX11.2/Ex11_2.sce @@ -0,0 +1,18 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX11_2.sce
+
+clc;
+clear;
+Ec=80;//peak voltage of carrier in V
+R=80;//Load resistance in ohm
+m=0.5;//modulation index
+
+Pc=((Ec/sqrt(2))^2)/R;
+Pt=Pc*(1+(m^2)/2);
+printf("\n Total power=%1.0f W \n",Pt)
diff --git a/3893/CH11/EX11.3/Ex11_3.jpg b/3893/CH11/EX11.3/Ex11_3.jpg Binary files differnew file mode 100644 index 000000000..bc7f406be --- /dev/null +++ b/3893/CH11/EX11.3/Ex11_3.jpg diff --git a/3893/CH11/EX11.3/Ex11_3.sce b/3893/CH11/EX11.3/Ex11_3.sce new file mode 100644 index 000000000..17e3e3b4f --- /dev/null +++ b/3893/CH11/EX11.3/Ex11_3.sce @@ -0,0 +1,21 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX11_3.sce
+
+clc;
+clear;
+Pc=400;//carrier power in W
+m=1;//modulation index
+
+printf("\n(1)")
+Pt=Pc*(1+(m^2)/2);
+printf("\n Total power=%1.0f W",Pt)
+
+printf("\n (2)")
+Ps=(Pt*m^2)/(2+m^2);
+printf("\n Power in side bands=%1.0f W",Ps)
diff --git a/3893/CH11/EX11.4/Ex11_4.jpg b/3893/CH11/EX11.4/Ex11_4.jpg Binary files differnew file mode 100644 index 000000000..912483652 --- /dev/null +++ b/3893/CH11/EX11.4/Ex11_4.jpg diff --git a/3893/CH11/EX11.4/Ex11_4.sce b/3893/CH11/EX11.4/Ex11_4.sce new file mode 100644 index 000000000..b3ba5b551 --- /dev/null +++ b/3893/CH11/EX11.4/Ex11_4.sce @@ -0,0 +1,16 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX11_4.sce
+
+clc;
+clear;
+Ic=6;//load current in A
+m=0.6;//modulation is 60 percentage
+It=(Ic)*(1+(m^2)/2);
+
+printf("\n Current when 60 percentage modulation=%1.2f A",It)
diff --git a/3893/CH11/EX11.5/Ex11_5.jpg b/3893/CH11/EX11.5/Ex11_5.jpg Binary files differnew file mode 100644 index 000000000..396567999 --- /dev/null +++ b/3893/CH11/EX11.5/Ex11_5.jpg diff --git a/3893/CH11/EX11.5/Ex11_5.sce b/3893/CH11/EX11.5/Ex11_5.sce new file mode 100644 index 000000000..515643316 --- /dev/null +++ b/3893/CH11/EX11.5/Ex11_5.sce @@ -0,0 +1,23 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX11_5.sce
+
+clc;
+clear;
+Va=5; //amplitude of audio signal in V
+Vp=15; //peak voltage of carrier in V
+fm=6e3;//carrier frequency in Hz
+fc=10e6;//modulating frequency in Hz
+m=Va/Vp;
+printf("\n Modulation Index=%1.2f \n",m)
+USF=fc+fm;
+LSF=fc-fm;
+printf("\n Upper side band frequency=%0.3f MHz",USF*1e-6)
+printf("\n Lower side band frequency=%0.3f MHz \n",LSF*1e-6)
+Vs=(1/2)*(m*Vp);//amplitude of side bands in V
+printf("\n Amplitude of side bands=%0.1f V",Vs)
diff --git a/3893/CH11/EX11.6/Ex11_6.jpg b/3893/CH11/EX11.6/Ex11_6.jpg Binary files differnew file mode 100644 index 000000000..63f1c56e4 --- /dev/null +++ b/3893/CH11/EX11.6/Ex11_6.jpg diff --git a/3893/CH11/EX11.6/Ex11_6.sce b/3893/CH11/EX11.6/Ex11_6.sce new file mode 100644 index 000000000..84e410c38 --- /dev/null +++ b/3893/CH11/EX11.6/Ex11_6.sce @@ -0,0 +1,16 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX11_6.sce
+
+clc;
+clear;
+fm=12.5e3;//maximum modulating frequency in Hz
+BW=10e6;//available bandwidth in Hz
+BWreq=fm*2;//required bandwidth of each stations in Hz
+Ns=BW/BWreq;
+printf("\n Number of stations that can be accommodated in the available BW = %d ",Ns)
diff --git a/3893/CH11/EX11.7/Ex11_7.jpg b/3893/CH11/EX11.7/Ex11_7.jpg Binary files differnew file mode 100644 index 000000000..76e97b04a --- /dev/null +++ b/3893/CH11/EX11.7/Ex11_7.jpg diff --git a/3893/CH11/EX11.7/Ex11_7.sce b/3893/CH11/EX11.7/Ex11_7.sce new file mode 100644 index 000000000..2d26e506d --- /dev/null +++ b/3893/CH11/EX11.7/Ex11_7.sce @@ -0,0 +1,22 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX11_7.sce
+
+clc;
+clear;
+fc=1e6;//carrier frequency in Hz
+fmin=50;//minimum range of frequency in Hz
+fmax=4500;//maximum range of frequency in Hz
+USFmin=fc+fmin;
+USFmax=fc+fmax;
+printf("\n The upper sideband extends from %4.2f kHz to %4.1f kHz \n",USFmin*1e-3,USFmax*1e-3)
+LSFmin=fc-fmin;
+LSFmax=fc-fmax;
+printf("\n The lower sideband extends from %3.2f kHz to %3.1f kHz \n",LSFmin*1e-3,LSFmax*1e-3)
+W=USFmax-LSFmax;
+printf("\n Width of channel=%d kHz",W*1e-3)
diff --git a/3893/CH11/EX11.8/Ex11_8.jpg b/3893/CH11/EX11.8/Ex11_8.jpg Binary files differnew file mode 100644 index 000000000..7be438172 --- /dev/null +++ b/3893/CH11/EX11.8/Ex11_8.jpg diff --git a/3893/CH11/EX11.8/Ex11_8.sce b/3893/CH11/EX11.8/Ex11_8.sce new file mode 100644 index 000000000..feb340044 --- /dev/null +++ b/3893/CH11/EX11.8/Ex11_8.sce @@ -0,0 +1,18 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX11_8.sce
+
+clc;
+clear;
+Pt=1200;//total power content of AM in W
+m=1;//100 percentage modulation index
+Pc=(Pt*2)/(2+m^2);
+Pusb=(m^2/4)*Pc;
+Plsb=Pusb;
+printf("\n Power contained in the carrier=%d W \n",Pc)
+printf("\n Upper side band =%d W \n Lower side band =%d W \n",Pusb,Plsb)
diff --git a/3893/CH11/EX11.9/Ex11_9.jpg b/3893/CH11/EX11.9/Ex11_9.jpg Binary files differnew file mode 100644 index 000000000..1c99e501a --- /dev/null +++ b/3893/CH11/EX11.9/Ex11_9.jpg diff --git a/3893/CH11/EX11.9/Ex11_9.sce b/3893/CH11/EX11.9/Ex11_9.sce new file mode 100644 index 000000000..5cf192a52 --- /dev/null +++ b/3893/CH11/EX11.9/Ex11_9.sce @@ -0,0 +1,20 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX11_9.sce
+
+clc;
+clear;
+m=1;
+A=(1+(1/2)*m^2);
+//The constant A denotes the ratio of PT and Pc
+B=(m^2)/4;
+//The constant B denotes the ratio of Pusb and Pc
+//Pusb=Plsb
+Psaved=A-B;; // saving in power when the carrier and one side band are suppressed
+%saving=(Psaved/A)*100;
+printf("\n Percentage savings =%2.2f percentage ",%saving)
diff --git a/3893/CH12/EX12.1/Ex12_1.jpg b/3893/CH12/EX12.1/Ex12_1.jpg Binary files differnew file mode 100644 index 000000000..6f332f0a7 --- /dev/null +++ b/3893/CH12/EX12.1/Ex12_1.jpg diff --git a/3893/CH12/EX12.1/Ex12_1.sce b/3893/CH12/EX12.1/Ex12_1.sce new file mode 100644 index 000000000..d984ef66f --- /dev/null +++ b/3893/CH12/EX12.1/Ex12_1.sce @@ -0,0 +1,18 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX12_1.sce
+
+clc;
+clear;
+Nl=525;//number of lines per frame
+R=4/3;//aspect raion
+Ns=33;//number of suppressed lines
+Na=Nl-Ns;
+Nh=R*Na;
+printf("\n Number of active lines= %1.0f \n Number of pixels per line= %1.0f \n",Na,Nh)
+
diff --git a/3893/CH12/EX12.2/Ex12_2.jpg b/3893/CH12/EX12.2/Ex12_2.jpg Binary files differnew file mode 100644 index 000000000..259cb7e94 --- /dev/null +++ b/3893/CH12/EX12.2/Ex12_2.jpg diff --git a/3893/CH12/EX12.2/Ex12_2.sce b/3893/CH12/EX12.2/Ex12_2.sce new file mode 100644 index 000000000..a7395edfe --- /dev/null +++ b/3893/CH12/EX12.2/Ex12_2.sce @@ -0,0 +1,18 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX12_2.sce
+
+clc;
+clear;
+Nt=525;//total number of lines
+Prr=25;//picture repetition rate
+
+fh=Nt*Prr;
+Th=1/fh;
+printf("\n Sync frequency= %1.0f Hz \n The total line time= %0.2f microseconds \n",fh,Th*1e6)
+
diff --git a/3893/CH12/EX12.3/Ex12_3.jpg b/3893/CH12/EX12.3/Ex12_3.jpg Binary files differnew file mode 100644 index 000000000..29df5c19a --- /dev/null +++ b/3893/CH12/EX12.3/Ex12_3.jpg diff --git a/3893/CH12/EX12.3/Ex12_3.sce b/3893/CH12/EX12.3/Ex12_3.sce new file mode 100644 index 000000000..9dd5007ab --- /dev/null +++ b/3893/CH12/EX12.3/Ex12_3.sce @@ -0,0 +1,23 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX12_3.sce
+
+clc;
+clear;
+Ts=12e-6;//supression period in seconds
+Kf=0.7;//Kell factor
+Nl=525;//total number of lines
+Ns=25;//number of suppressed lines
+a=4/3;//aspect ratio
+Th=76.19e-6;//total line time in seconds
+
+BW=(Kf*a*(Nl-Ns))/(2*(Th-Ts));
+printf("\n The bandwidth=%0.2f MHz \n",BW*1e-6)
+
+//There is a error in the book for calculation of bandwidth
+//In the book BW=364 MHz insteadof 3.64 MHz
diff --git a/3893/CH13/EX13.1/Ex13_1.jpg b/3893/CH13/EX13.1/Ex13_1.jpg Binary files differnew file mode 100644 index 000000000..8c8243680 --- /dev/null +++ b/3893/CH13/EX13.1/Ex13_1.jpg diff --git a/3893/CH13/EX13.1/Ex13_1.sce b/3893/CH13/EX13.1/Ex13_1.sce new file mode 100644 index 000000000..54d672977 --- /dev/null +++ b/3893/CH13/EX13.1/Ex13_1.sce @@ -0,0 +1,18 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX13_1.sce
+
+clc;
+clear;
+Imax=10e-3;//Maximum reading current of ammeter in A
+CS=100e-6;//Current sensitivity in A
+Rm=50;//Resistance in ohm
+
+Ishunt=Imax-CS;
+Rshunt=(Rm*CS)/Ishunt;
+printf("\n Required shunt resistance=%1.3f ohm \n", Rshunt)
diff --git a/3893/CH13/EX13.2/Ex13_2.jpg b/3893/CH13/EX13.2/Ex13_2.jpg Binary files differnew file mode 100644 index 000000000..e3f16f657 --- /dev/null +++ b/3893/CH13/EX13.2/Ex13_2.jpg diff --git a/3893/CH13/EX13.2/Ex13_2.sce b/3893/CH13/EX13.2/Ex13_2.sce new file mode 100644 index 000000000..80adb53ab --- /dev/null +++ b/3893/CH13/EX13.2/Ex13_2.sce @@ -0,0 +1,56 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX13_2.sce
+
+clc;
+clear;
+Rm=150;//Resistance of d'Arsonval movement in ohm
+CS=0.001;//Current sensitivity in A
+//CS=Ia1=Ib1=Ic1=Id1
+R_shunt=(CS*Rm)/(0.001-0.0001);//Total shunt resistance required
+R=750;//The sum shunt resistance that have included in the shunt branch is not feasible to prepare resistors. Therefore 750 ohm resistanceis connected in series with the movement
+
+//case (a): Range(0-1)mA
+Ia=0.001;//Current Range of the switch in A
+Ia1=0.0001;//Current through the switch in A
+Ia2=Ia-Ia1;//Current through the shunt branch in A
+ Rma=Rm+R;//Resistance of the meter branch in ohm
+ Rsa=(Rma*Ia1)/Ia2;//Resistance of the shunt branch
+
+
+ //Casec(b): Range(0-10)mA
+ //When the range of switch is 10 mA, position R1 goes into series
+Ib=0.01;//Current Range of the switch in A
+Ib1=0.0001;//Current through the switch in A
+Ib2=Ib-Ib1;//Current through the shunt branch in A
+Rmb=Rm+R;//Resistance of the meter branch without R1 in ohm
+R1=((Rsa*Ib2)-(Rmb*Ib1))/(Ib1+Ib2);
+
+//Casec(c): Range(0-100)mA
+//When the range of switch is 100 mA, position R1 and R2 goes into series
+Ic=0.1;//Current Range of the switch in A
+Ic1=0.0001;//Current through the switch in A
+Ic2=Ic-Ic1;//Current through the shunt branch in A
+Rmc=Rma+R1;//Resistance of the meter branch without R2 in ohm
+Rsc=Rsa-R1;//Resistance of the shunt branch except R2
+R2=((Rsc*Ic2)-(Rmc*Ic1))/(Ic1+Ic2);
+
+
+//Casec(d): Range(0-1)A
+//When the range of switch is 1 A, position R1, R2 and R3 goes into series
+Id=1;//Current Range of the switch in A
+Id1=0.0001;//Current through the switch in A
+Id2=Id-Id1;//Current through the shunt branch in A
+Rmd=Rma+R1+R2;//Resistance of the meter branch without R3 in ohm
+Rsd=Rsa-R1-R2;//Resistance of the shunt branch except R3
+R3=((Rsd*Id2)-(Rmd*Id1))/(Id1+Id2);
+R4=1-R3;
+
+printf("\n Four resistance of shunt branch\n\t R1=%0.1f ohm \n\t R2=%0.1f ohm \n\t R3=%0.1f ohm \n\t R4=%0.1f ohm\n",R1,R2,R3,R4)
+
+
diff --git a/3893/CH13/EX13.3/Ex13_3.jpg b/3893/CH13/EX13.3/Ex13_3.jpg Binary files differnew file mode 100644 index 000000000..c310806bf --- /dev/null +++ b/3893/CH13/EX13.3/Ex13_3.jpg diff --git a/3893/CH13/EX13.3/Ex13_3.sce b/3893/CH13/EX13.3/Ex13_3.sce new file mode 100644 index 000000000..4a59b9e9f --- /dev/null +++ b/3893/CH13/EX13.3/Ex13_3.sce @@ -0,0 +1,19 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX13_3.sce
+
+clc;
+clear;
+
+deflectionsensitivity=4;//unit is V/cm
+lengthoftrace=12;//unit is cm
+
+Vpp=deflectionsensitivity*lengthoftrace;//peak to peak value of applied voltage in V
+Vp=Vpp/2;//peak value of applied voltage in V
+Vrms=Vp/sqrt(2);
+printf("\n RMS value of applied voltage=%2.2f V",Vrms)
diff --git a/3893/CH13/EX13.4/Ex13_4.jpg b/3893/CH13/EX13.4/Ex13_4.jpg Binary files differnew file mode 100644 index 000000000..7c75a6338 --- /dev/null +++ b/3893/CH13/EX13.4/Ex13_4.jpg diff --git a/3893/CH13/EX13.4/Ex13_4.sce b/3893/CH13/EX13.4/Ex13_4.sce new file mode 100644 index 000000000..6c6a96317 --- /dev/null +++ b/3893/CH13/EX13.4/Ex13_4.sce @@ -0,0 +1,17 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX13_4.sce
+
+clc;
+clear;
+Tc=0.2;//Time control of CRO in ms per cm
+D=7.5;//Distance in cm
+
+T=(Tc*D);//period of ac voltage in s
+f=1/T;
+printf("\n Frequency of ac voltage=%3.1f Hz",f*1e3)
diff --git a/3893/CH2/EX2.1/Ex2_1.jpg b/3893/CH2/EX2.1/Ex2_1.jpg Binary files differnew file mode 100644 index 000000000..f095bd79e --- /dev/null +++ b/3893/CH2/EX2.1/Ex2_1.jpg diff --git a/3893/CH2/EX2.1/Ex2_1.sce b/3893/CH2/EX2.1/Ex2_1.sce new file mode 100644 index 000000000..ae04dabb7 --- /dev/null +++ b/3893/CH2/EX2.1/Ex2_1.sce @@ -0,0 +1,33 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX2_1.sce
+
+clc;
+clear;
+Vcc=10;//dc supply voltage in V
+Rc=2e3;//Collector resistance in ohm
+Rb=300e3;//base resistance in ohm
+beta=75;
+Vbe=1;//voltage across base emitter terminal in V
+
+Ib=(Vcc-Vbe)/Rb;
+Ic=beta*Ib;
+Vce=Vcc-(Ic*Rc);
+
+printf("\n The operating point is (%0.2f mA;%0.1f V) \n",Ic*1e3,Vce)
+
+Icsat=Vcc/Rc;
+if Ic<Icsat then
+ printf("\n The operating point is in active region \n")
+else
+ printf("\n The operating point is not in active region")
+end
+
+//There is a error in the Vce answer
+//from the given data Vce=5.5V and it is mistakenly given as 3.5V
+//and also Icsat=5mA not 4mA
diff --git a/3893/CH2/EX2.2/Ex2_2.jpg b/3893/CH2/EX2.2/Ex2_2.jpg Binary files differnew file mode 100644 index 000000000..d2015244e --- /dev/null +++ b/3893/CH2/EX2.2/Ex2_2.jpg diff --git a/3893/CH2/EX2.2/Ex2_2.sce b/3893/CH2/EX2.2/Ex2_2.sce new file mode 100644 index 000000000..4148af71f --- /dev/null +++ b/3893/CH2/EX2.2/Ex2_2.sce @@ -0,0 +1,22 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX2_2.sce
+
+clc;
+clear;
+Vcc=9;//dc supply voltage in V
+Rc=3e3;//Collector resistance in ohm
+beta=100;
+Vbe=0.7;//voltage across base emitter terminal in V
+
+Ic_top=Vcc/Rc;
+Ic_mid=Ic_top/2;
+Ib=Ic_mid/beta;
+Rb=(Vcc-Vbe)/Ib;
+printf("\n Base resistance Rb=%0.1f kohm \n",Rb*1e-3)
+
diff --git a/3893/CH2/EX2.3/Ex2_3.jpg b/3893/CH2/EX2.3/Ex2_3.jpg Binary files differnew file mode 100644 index 000000000..b18d7c9a7 --- /dev/null +++ b/3893/CH2/EX2.3/Ex2_3.jpg diff --git a/3893/CH2/EX2.3/Ex2_3.sce b/3893/CH2/EX2.3/Ex2_3.sce new file mode 100644 index 000000000..a3042ae8c --- /dev/null +++ b/3893/CH2/EX2.3/Ex2_3.sce @@ -0,0 +1,20 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX2_3.sce
+
+clc;
+clear;
+Vcc=9;//dc supply voltage in V
+Ib=20e-6;//Base current in A
+Rb=400e3;//base resistance in ohm
+beta=50;
+Vbe=0.7;//voltage across base emitter terminal in V for silicon transistor
+
+Re=((Vcc-Vbe)/(Ib*beta))-(Rb/beta);
+printf("\n Emitter resistance= %1.0f ohm \n",Re)
+
diff --git a/3893/CH2/EX2.4/Ex2_4.jpg b/3893/CH2/EX2.4/Ex2_4.jpg Binary files differnew file mode 100644 index 000000000..783f9e9b4 --- /dev/null +++ b/3893/CH2/EX2.4/Ex2_4.jpg diff --git a/3893/CH2/EX2.4/Ex2_4.sce b/3893/CH2/EX2.4/Ex2_4.sce new file mode 100644 index 000000000..1a0384fca --- /dev/null +++ b/3893/CH2/EX2.4/Ex2_4.sce @@ -0,0 +1,24 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX2_4.sce
+
+clc;
+clear;
+Vcc=12;//dc supply voltage in V
+Re=1e3;//emitter resistance in ohm
+Rb=1.1e6;//base resistance in ohm
+beta=99;
+Vbe=1;//voltage across base emitter terminal in V
+
+Ib=(Vcc-Vbe)/(Rb+(beta+1)*Re);
+Ic=beta*Ib;
+Ie=Ic+Ib;
+printf("\n Base current Ib= %1.2f micro ampere \n Collector current Ic= %0.2f mA \n Emitter current Ie= %1.0f mA \n",Ib*1e6,Ic*1e3,Ie*1e3)
+
+//The answer for Ib given in the book has error; Ib=9.166 micro ampere
+//Hence the answer is different from book answer
diff --git a/3893/CH2/EX2.5/Ex2_5.jpg b/3893/CH2/EX2.5/Ex2_5.jpg Binary files differnew file mode 100644 index 000000000..416b60e5d --- /dev/null +++ b/3893/CH2/EX2.5/Ex2_5.jpg diff --git a/3893/CH2/EX2.5/Ex2_5.sce b/3893/CH2/EX2.5/Ex2_5.sce new file mode 100644 index 000000000..691e335e6 --- /dev/null +++ b/3893/CH2/EX2.5/Ex2_5.sce @@ -0,0 +1,22 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX2_5.sce
+
+clc;
+clear;
+Vcc=12;//dc supply voltage in V
+Ic=6e-3;//collector current in A
+Vce=6;//collector emitter voltage in V
+beta=100;
+Vbe=0.3;//voltage across base emitter terminal in V
+
+Rc=(Vcc-Vce)/Ic;
+Ib=Ic/beta;
+//Vcc=(Rc*Ic)+((Rb+Rc)*Ib)+Vbe;
+Rb=(Vcc-Vbe-(Ic*Rc)-(Ib*Rc))/(Ib);
+printf("\n Base resistor Rb= %1.0f kohm \n",Rb*1e-3)
diff --git a/3893/CH2/EX2.6/Ex2_6.jpg b/3893/CH2/EX2.6/Ex2_6.jpg Binary files differnew file mode 100644 index 000000000..a503665a2 --- /dev/null +++ b/3893/CH2/EX2.6/Ex2_6.jpg diff --git a/3893/CH2/EX2.6/Ex2_6.sce b/3893/CH2/EX2.6/Ex2_6.sce new file mode 100644 index 000000000..9331f7598 --- /dev/null +++ b/3893/CH2/EX2.6/Ex2_6.sce @@ -0,0 +1,21 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX2_6.sce
+
+clc;
+clear;
+Vcc=20;//dc supply voltage in V
+Rb=100e3;//base resistance in ohm
+beta=100;
+Rc=1e3;//collector resistor in ohm
+Vbe=0.7;//voltage across base emitter terminal in V for silicon transistor
+
+Ib=(Vcc-Vbe)/(Rb+(1+beta)*Rc);
+Ic=beta*Ib;
+Vce=Vcc-(Ic*Rc);
+printf("\n The operating point is (%0.1f mA;%1.1f V) \n",Ic*1e3,Vce)
diff --git a/3893/CH2/EX2.7/Ex2_7.jpg b/3893/CH2/EX2.7/Ex2_7.jpg Binary files differnew file mode 100644 index 000000000..733c1d6dd --- /dev/null +++ b/3893/CH2/EX2.7/Ex2_7.jpg diff --git a/3893/CH2/EX2.7/Ex2_7.sce b/3893/CH2/EX2.7/Ex2_7.sce new file mode 100644 index 000000000..357ab22b7 --- /dev/null +++ b/3893/CH2/EX2.7/Ex2_7.sce @@ -0,0 +1,29 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX2_7.sce
+
+clc;
+clear;
+Rc=2e3;//collector resiatance in ohm
+Re=3e3;//emitter resistance in ohm
+R1=14e3;
+R2=6e3;
+Vcc=10;//dc supply voltage in V
+Vbe=0.3;//Base emitter voltage for Germanium
+
+//To get the end point B of the load line ,Ic is 0
+Ic=0;
+Vce=Vcc-(Ic*(Rc+Re));
+
+//To get the end point A of the load line, Vce is 0
+Ic=Vcc/(Rc+Re);
+
+V2=Vcc*(R2/(R1+R2));
+Ic=(V2-Vbe)/Re;
+Vce=Vcc-(Ic*(Rc+Re));
+printf("\n The operating point is (%0.1f V;%0.1f mA)",Vce,Ic*1e3)
diff --git a/3893/CH2/EX2.8/Ex2_8.jpg b/3893/CH2/EX2.8/Ex2_8.jpg Binary files differnew file mode 100644 index 000000000..15b4c7411 --- /dev/null +++ b/3893/CH2/EX2.8/Ex2_8.jpg diff --git a/3893/CH2/EX2.8/Ex2_8.sce b/3893/CH2/EX2.8/Ex2_8.sce new file mode 100644 index 000000000..632b6249a --- /dev/null +++ b/3893/CH2/EX2.8/Ex2_8.sce @@ -0,0 +1,34 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX2_8.sce
+
+clc;
+clear;
+Rc=6e3;//collector resistance in ohm
+Re=9e3;//emitter resistance in ohm
+R1=150e3;
+R2=50e3;
+Vcc=12;//dc supply voltage in V
+Vbe=0.3;//Base emitter voltage in V for Germanium
+beta=99;
+
+V2=Vcc*(R2/(R1+R2));
+Ic1=(V2-Vbe)/Re;
+Vce1=Vcc-(Ic1*(Rc+Re));
+printf("\n The operating point by approximate method is (%0.1f mA;%0.1f V)",Ic1*1e3,Vce1)
+
+Vth=Vcc*(R2/(R1+R2));
+Rth=(R1*R2)/(R1+R2);
+Ic2=(beta*Vth)/(Rth+(beta+1)*Re);
+Vce2=Vcc-(Rc+Re)*Ic2;
+printf("\n The operating point by using Thevenins Theorem is (%0.4f mA;%0.3f v)",Ic2*1e3,Vce2)
+
+CE=((Ic1-Ic2)/Ic1)*100;
+VE=((Vce1-Vce2)/Vce1)*100;
+printf("\n Current error= %0.1f percentage \n Voltage error= %0.2f percentage",CE,VE)
+
diff --git a/3893/CH3/EX3.1/Ex3_1.jpg b/3893/CH3/EX3.1/Ex3_1.jpg Binary files differnew file mode 100644 index 000000000..229a18726 --- /dev/null +++ b/3893/CH3/EX3.1/Ex3_1.jpg diff --git a/3893/CH3/EX3.1/Ex3_1.sce b/3893/CH3/EX3.1/Ex3_1.sce new file mode 100644 index 000000000..3600518e5 --- /dev/null +++ b/3893/CH3/EX3.1/Ex3_1.sce @@ -0,0 +1,49 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX3_1.sce
+
+clc;
+clear;
+//collector current in A
+Ic1=2e-3;
+Ic2=2.5e-3;
+Ic3=6e-3;
+Ic4=9.5e-3;
+//collector-emitter voltage in V
+Vce1=4;
+Vce2=6;
+Vce3=6;
+Vce4=20;
+//base current in A
+Ib1=20e-6;
+Ib2=20e-6;
+Ib3=40e-6;
+Ib4=40e-6;
+//voltage across base and emitter in V
+Vbe1=0.65;
+Vbe2=0.65;
+Vbe3=0.7;
+Vbe4=0.705;
+
+delIc=Ic2-Ic1;
+delVce=Vce2-Vce1;
+hoe=delIc/delVce;//at constant Ib
+
+
+delVbe=Vbe4-Vbe3;
+delVce=Vce4-Vce3;
+hre=delVbe/delVce;//at constant Ib
+
+delIc=Ic3-Ic2;
+delIb=Ib3-Ib2;
+hfe=delIc/delIb;//at constant Vce
+
+delVbe=Vbe3-Vbe2;
+delIb=Ib3-Ib2;
+hie=delVbe/delIb;//at constant Vce
+printf("\n hoe= %1.0f micro-mho \n hre= %f \n hfe= %1.0f \n hie= %0.1f kohm \n",hoe*1e6,hre,hfe,hie*1e-3)
diff --git a/3893/CH4/EX4.1/Ex4_1.jpg b/3893/CH4/EX4.1/Ex4_1.jpg Binary files differnew file mode 100644 index 000000000..ddae6774b --- /dev/null +++ b/3893/CH4/EX4.1/Ex4_1.jpg diff --git a/3893/CH4/EX4.1/Ex4_1.sce b/3893/CH4/EX4.1/Ex4_1.sce new file mode 100644 index 000000000..1fbdac3e6 --- /dev/null +++ b/3893/CH4/EX4.1/Ex4_1.sce @@ -0,0 +1,37 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX4_1.sce
+
+clc;
+clear;
+//following are the values of resistors used in a CE amplifier in ohm
+R1=10e3;
+R2=5e3;
+Rc=1e3;
+Re=2e3;
+Rl=1e3;
+Vcc=12;//supply voltage in V
+//from figure 4.2
+Vce=Vcc;
+Icmax=Vcc/(Rl+Re);//Maximum collector current in A
+printf("\n The coordinates of end points of the dc load lines are (0;%d V) and (%d mA;0)\n",Vce,Icmax*1e3)
+
+V2=(R2*Vcc)/(R1+R2);//voltage across R2 in V
+Vbe=0.7;//for silicon Vbe is 0.7 in V
+Ie=(V2-Vbe)/Re;//emitter current in A
+Ic=Ie;//collector current in A
+Vce=Vcc-(Ic*(Rc+Re));
+printf("\n The coordinates of the Q point are (%0.2f mA;%0.2f V)\n",Ic*1e3,Vce)
+
+Rac=(Rc*Rl)/(Rc+Rl);//effective load resistance in ohm
+Vcemax=Vce+(Ic*Rac);
+Icmax=Ic+(Vcemax/Rac);
+printf("\n The coordinates of end points of the ac load lines are(%0.3f V;0)and(%0.1f mA;0)\n",Vcemax,Icmax*1e3)
+
+
+
diff --git a/3893/CH4/EX4.2/Ex4_2.jpg b/3893/CH4/EX4.2/Ex4_2.jpg Binary files differnew file mode 100644 index 000000000..2ed4f855e --- /dev/null +++ b/3893/CH4/EX4.2/Ex4_2.jpg diff --git a/3893/CH4/EX4.2/Ex4_2.sce b/3893/CH4/EX4.2/Ex4_2.sce new file mode 100644 index 000000000..af18824c0 --- /dev/null +++ b/3893/CH4/EX4.2/Ex4_2.sce @@ -0,0 +1,22 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX4_2.sce
+
+clc;
+clear;
+Rin=1e3;//input resistance in ohm
+Rc=2e3;//collector resistance in ohm
+Rl=1e3;//load resistance in ohm
+beta=75;
+
+Rac=(Rc*Rl)/(Rc+Rl);
+//Av=(Ic*Rac)/(Ib*Rin);
+//beta=Ic/Ib;
+Av=(beta*Rac)/Rin;
+printf("\n Voltage gain= %d \n",Av)
+
diff --git a/3893/CH4/EX4.3/Ex4_3.jpg b/3893/CH4/EX4.3/Ex4_3.jpg Binary files differnew file mode 100644 index 000000000..ea023395e --- /dev/null +++ b/3893/CH4/EX4.3/Ex4_3.jpg diff --git a/3893/CH4/EX4.3/Ex4_3.sce b/3893/CH4/EX4.3/Ex4_3.sce new file mode 100644 index 000000000..008963642 --- /dev/null +++ b/3893/CH4/EX4.3/Ex4_3.sce @@ -0,0 +1,29 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX4_3.sce
+
+clc;
+clear;
+delIb=15e-6;//signal(input) current changes in A
+delIc=1.8e-3;//Collector current changes in A
+delVi=0.03;//change in signal voltage in V
+Rc=5e3;//collector resistance in ohm
+Rl=10e3;//load resistance in ohm
+
+printf("\t (a)")
+Ai=delIc/delIb;
+printf("\n Current gain= %d \n",Ai)
+
+printf("\t (b)")
+Rin=delVi/delIb;
+printf("\n Input impedence= %1.0f kohm \n",Rin*1e-3)
+
+printf("\t (c)")
+Rac=(Rc*Rl)/(Rc+Rl);
+Av=(delIc*Rac)/(delIb*Rin);
+printf("\n Voltage gain= %d \n",Av)
diff --git a/3893/CH4/EX4.4/Ex4_4.jpg b/3893/CH4/EX4.4/Ex4_4.jpg Binary files differnew file mode 100644 index 000000000..49e0ccd84 --- /dev/null +++ b/3893/CH4/EX4.4/Ex4_4.jpg diff --git a/3893/CH4/EX4.4/Ex4_4.sce b/3893/CH4/EX4.4/Ex4_4.sce new file mode 100644 index 000000000..71d46b518 --- /dev/null +++ b/3893/CH4/EX4.4/Ex4_4.sce @@ -0,0 +1,32 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX4_4.sce
+
+clc;
+clear;
+//the following are the h parameters values given
+hfe=350;
+hie=5e3;
+hre=2.5e-4;
+hoe=35e-6;
+Rl=5e3;//load resistance in ohm
+Rs=15e3;//source resistance in ohm
+
+Ai=hfe/(1+(hoe*Rl));
+printf("\n Current gain= %0.1f \n",Ai)
+Av=-(hfe*Rl)/(hie+((hie*hoe)-(hre*hfe))*Rl);
+printf("\n Voltage gain= %0.1f \n",Av)
+Zie=hie-((hre*hfe*Rl)/(1+(hoe*Rl)));
+printf("\n Input impedence= %0.3f kohm \n",Zie*1e-3)
+Zo=(hie+Rs)/((hre*hfe)+(hoe*(hie+Rs)));
+printf("\n Output impedence= %0.1f kohm \n",Zo*1e-3)
+
+//There is a error in the book for calculation of current gain
+//In the book current gain value is 279.9 insteadof 297.9
+
+
diff --git a/3893/CH5/EX5.1/Ex5_1.jpg b/3893/CH5/EX5.1/Ex5_1.jpg Binary files differnew file mode 100644 index 000000000..fdfc95c9a --- /dev/null +++ b/3893/CH5/EX5.1/Ex5_1.jpg diff --git a/3893/CH5/EX5.1/Ex5_1.sce b/3893/CH5/EX5.1/Ex5_1.sce new file mode 100644 index 000000000..e5985b0a6 --- /dev/null +++ b/3893/CH5/EX5.1/Ex5_1.sce @@ -0,0 +1,18 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX5_1.sce
+
+clc;
+clear;
+Vp=-3.5;//pinchoff voltage in V
+Idss=5e-3;
+Vgs=-2;//gate-source voltage in V
+Id=Idss*(1-(Vgs/Vp))^2;
+printf("\n The drain current= %0.3f mA",Id*1e3)
+
+
diff --git a/3893/CH5/EX5.2/Ex5_2.jpg b/3893/CH5/EX5.2/Ex5_2.jpg Binary files differnew file mode 100644 index 000000000..9e8e6581f --- /dev/null +++ b/3893/CH5/EX5.2/Ex5_2.jpg diff --git a/3893/CH5/EX5.2/Ex5_2.sce b/3893/CH5/EX5.2/Ex5_2.sce new file mode 100644 index 000000000..6081b7c77 --- /dev/null +++ b/3893/CH5/EX5.2/Ex5_2.sce @@ -0,0 +1,40 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX5_2.sce
+
+clc;
+clear;
+//From figure 5.4(a) the following values are taken
+R1=1e6;
+R2=0.5e6;
+Rd=4e3;
+Rs=8e3;
+Vdd=18;
+
+Vg=(Vdd*R2)/(R1+R2);//Gate to ground voltage in V
+
+printf("\t (a)")
+Vgs=-2;//gate-source voltage in V
+Id=(Vg-Vgs)/Rs;
+Vd=Vdd-(Id*Rd);
+printf("\n The drain current= %d mA",Id*1e3)
+printf("\n The drain voltage= %d V \n",Vd)
+
+printf("\n\t (b)")
+Vgs=-4;//gate-source voltage in V
+Id=(Vg-Vgs)/Rs;
+Vd=Vdd-(Id*Rd);
+printf("\n The drain current= %0.2f mA",Id*1e3)
+printf("\n The drain voltage= %d V \n",Vd)
+
+//There is a mistake in the book
+//Rd value is substituted as 8 kohm insteadof 4 kohm in Vd formula
+//hence the output value of Vd get changed
+
+
+
diff --git a/3893/CH6/EX6.1/Ex6_1.jpg b/3893/CH6/EX6.1/Ex6_1.jpg Binary files differnew file mode 100644 index 000000000..721a41627 --- /dev/null +++ b/3893/CH6/EX6.1/Ex6_1.jpg diff --git a/3893/CH6/EX6.1/Ex6_1.sce b/3893/CH6/EX6.1/Ex6_1.sce new file mode 100644 index 000000000..c059bcec7 --- /dev/null +++ b/3893/CH6/EX6.1/Ex6_1.sce @@ -0,0 +1,22 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX6_1.sce
+
+clc;
+clear;
+Rldash=100e3;//load impedence in ohm
+Rl=25;//reflected load impedence in ohm
+//Rl_dash=(N1/N2)^2*Rl;
+//a=(N1/N2)^2
+a=Rldash/Rl;
+b=sqrt(a);
+printf("\n Turns ratio of the transformer = %d:1 \n",b)
+
+//there is a error in the book
+//both resistance values substituted incorrectly, turns ratio is lessthan one if book value is substituted
+//above resistance value gives the turns ratio correctly
diff --git a/3893/CH6/EX6.10/Ex6_10.jpg b/3893/CH6/EX6.10/Ex6_10.jpg Binary files differnew file mode 100644 index 000000000..dc053b556 --- /dev/null +++ b/3893/CH6/EX6.10/Ex6_10.jpg diff --git a/3893/CH6/EX6.10/Ex6_10.sce b/3893/CH6/EX6.10/Ex6_10.sce new file mode 100644 index 000000000..4d2eb56f5 --- /dev/null +++ b/3893/CH6/EX6.10/Ex6_10.sce @@ -0,0 +1,28 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX6_10.sce
+
+clc;
+clear;
+
+Vcc=15;//dc supply in V
+Vpeak_peak=24;//peak to peak maximum voltage in V
+Rl=100;//load resistance in ohm
+
+Vpeak=Vpeak_peak/2;//peak voltage across the load in V
+Ipeak=(Vpeak)/Rl; //Peak value of load current in A
+Idc=(2/%pi)*Ipeak;//DC power drawn from the battery in A
+
+Pdc=Vcc*Idc;//Power drawn from the battery in W
+Pl=(1/2)*(Vpeak^2/Rl);//Power delivered to the load in W
+Pd=Pdc-Pl;//power dissipated in the two transistors in W
+Pt=Pd/2;
+printf("\n Power dissipated by each transistor= %1.0f mW",Pt*1e3)
+
+
+
diff --git a/3893/CH6/EX6.2/Ex6_2.jpg b/3893/CH6/EX6.2/Ex6_2.jpg Binary files differnew file mode 100644 index 000000000..bdc39780e --- /dev/null +++ b/3893/CH6/EX6.2/Ex6_2.jpg diff --git a/3893/CH6/EX6.2/Ex6_2.sce b/3893/CH6/EX6.2/Ex6_2.sce new file mode 100644 index 000000000..bb9c7e770 --- /dev/null +++ b/3893/CH6/EX6.2/Ex6_2.sce @@ -0,0 +1,22 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX6_2.sce
+
+clc;
+clear;
+Vmax=15;//maximum value of collector_emitter voltage in V
+Vmin=3;//minimum value of collector_emitter voltage in V
+Imax=250e-3;//maximum collector current in A
+Imin=20e-3;//Minimum collector current in A
+Icq=135e-3;//Quiescent collector current in A
+Vcc=12;//DC Power supply in V
+
+Po=(1/8)*(Vmax-Vmin)*(Imax-Imin)
+Pi=Vcc*Icq;
+eta=(Po/Pi)*100;
+printf("\n Efficiency of the amplifier = %0.1f percentage",eta)
diff --git a/3893/CH6/EX6.3/Ex6_3.jpg b/3893/CH6/EX6.3/Ex6_3.jpg Binary files differnew file mode 100644 index 000000000..1263d62f9 --- /dev/null +++ b/3893/CH6/EX6.3/Ex6_3.jpg diff --git a/3893/CH6/EX6.3/Ex6_3.sce b/3893/CH6/EX6.3/Ex6_3.sce new file mode 100644 index 000000000..9907056bd --- /dev/null +++ b/3893/CH6/EX6.3/Ex6_3.sce @@ -0,0 +1,25 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX6_3.sce
+
+clc;
+clear;
+//from the given output equation of the amplifier
+A0=16;
+A1=1.6;
+A2=1.3;
+A3=0.4;
+
+D2=A1/A0;
+D3=A2/A0;
+D4=A3/A0;
+D=sqrt(D2^2+D3^2+D4^2);
+//power with distrotion=(1+D^2)*P1 .
+//P1 is the power due to distortion
+Pincrease=D^2*100;
+printf("\n Percentage increase in power due to distortion =%0.3f percentage",Pincrease)
diff --git a/3893/CH6/EX6.4/Ex6_4.jpg b/3893/CH6/EX6.4/Ex6_4.jpg Binary files differnew file mode 100644 index 000000000..c9c79ed25 --- /dev/null +++ b/3893/CH6/EX6.4/Ex6_4.jpg diff --git a/3893/CH6/EX6.4/Ex6_4.sce b/3893/CH6/EX6.4/Ex6_4.sce new file mode 100644 index 000000000..34ec37de4 --- /dev/null +++ b/3893/CH6/EX6.4/Ex6_4.sce @@ -0,0 +1,21 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX6_4.sce
+
+clc;
+clear;
+Rl=100;//load of power amplifier in ohm
+a=12;//let a=(N1/N2)
+Ic=100e-3;//collector current in A
+
+Rldash=(a^2)*Rl;//reflected impedence in ohm
+Po=(1/2)*Ic^2*Rldash;
+
+printf("\n Maximum ac power output =%d W",Po)
+
+
diff --git a/3893/CH6/EX6.5/Ex6_5.jpg b/3893/CH6/EX6.5/Ex6_5.jpg Binary files differnew file mode 100644 index 000000000..4607df541 --- /dev/null +++ b/3893/CH6/EX6.5/Ex6_5.jpg diff --git a/3893/CH6/EX6.5/Ex6_5.sce b/3893/CH6/EX6.5/Ex6_5.sce new file mode 100644 index 000000000..b83b1c073 --- /dev/null +++ b/3893/CH6/EX6.5/Ex6_5.sce @@ -0,0 +1,17 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX6_5.sce
+
+clc;
+clear;
+Tc=80;//case temperature in degree celcius
+Pd=5;//power dissipation of the transistor in W
+theta=8;//thermal resistance in degree Celcius per watt
+
+Ta=Tc-(Pd*theta);
+printf("\n Ambient temperature =%d degree celcius",Ta)
diff --git a/3893/CH6/EX6.6/Ex6_6.jpg b/3893/CH6/EX6.6/Ex6_6.jpg Binary files differnew file mode 100644 index 000000000..11482ec9d --- /dev/null +++ b/3893/CH6/EX6.6/Ex6_6.jpg diff --git a/3893/CH6/EX6.6/Ex6_6.sce b/3893/CH6/EX6.6/Ex6_6.sce new file mode 100644 index 000000000..cc24d7524 --- /dev/null +++ b/3893/CH6/EX6.6/Ex6_6.sce @@ -0,0 +1,20 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX6_6.sce
+
+clc;
+clear;
+//from figure 6.17
+
+CB=100-50;
+DB=100-25;
+AD=6;
+//EC/AD=CB/DB (Similar triangles)
+EC=AD*(CB/DB);
+printf("\n Power dissipation at 50 degree celcius =%d W",EC)
+
diff --git a/3893/CH6/EX6.7/Ex6_7.jpg b/3893/CH6/EX6.7/Ex6_7.jpg Binary files differnew file mode 100644 index 000000000..d661644b1 --- /dev/null +++ b/3893/CH6/EX6.7/Ex6_7.jpg diff --git a/3893/CH6/EX6.7/Ex6_7.sce b/3893/CH6/EX6.7/Ex6_7.sce new file mode 100644 index 000000000..babe659be --- /dev/null +++ b/3893/CH6/EX6.7/Ex6_7.sce @@ -0,0 +1,20 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX6_7.sce
+
+clc;
+clear;
+Tj=90;//maximum junction temperature in degree celcius
+Ta=30;//ambient temperature in degree celcius
+thetaJA=15;//thermal resistance between junction and ambient in degree celcius per watt
+//thetaJA=thetaSC+thetaCS+thetaSA;
+
+Pc=(Tj-Ta)/thetaJA;
+printf("\n Maximum permissible rate of power dissipation of the combination= %d W",Pc)
+
+
diff --git a/3893/CH6/EX6.8/Ex6_8.jpg b/3893/CH6/EX6.8/Ex6_8.jpg Binary files differnew file mode 100644 index 000000000..e637ac12d --- /dev/null +++ b/3893/CH6/EX6.8/Ex6_8.jpg diff --git a/3893/CH6/EX6.8/Ex6_8.sce b/3893/CH6/EX6.8/Ex6_8.sce new file mode 100644 index 000000000..96b1e7259 --- /dev/null +++ b/3893/CH6/EX6.8/Ex6_8.sce @@ -0,0 +1,26 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX6_8.sce
+
+clc;
+clear;
+Pl=4;//load power in W
+Rl=8;//load resistance in ohm
+Vcc=16;//dc supply in V
+
+//Pl=(Vmax/sqrt(2))^2/Rl;
+Vmax=sqrt(2*Pl*Rl);
+a=Vcc/Vmax;
+printf("\n Turns ratio of the transformer= %d:1 \n",a)
+
+Pdc=2*Pl;
+Ic=(Pdc/Vcc);
+printf("\n Collector current= %d mA \n",Ic*1e3)
+
+Pc=Pdc-Pl;
+printf("\n Collector dissipation= %d W \n", Pc)
diff --git a/3893/CH6/EX6.9/Ex6_9.jpg b/3893/CH6/EX6.9/Ex6_9.jpg Binary files differnew file mode 100644 index 000000000..4466ef10f --- /dev/null +++ b/3893/CH6/EX6.9/Ex6_9.jpg diff --git a/3893/CH6/EX6.9/Ex6_9.sce b/3893/CH6/EX6.9/Ex6_9.sce new file mode 100644 index 000000000..49a3a6a98 --- /dev/null +++ b/3893/CH6/EX6.9/Ex6_9.sce @@ -0,0 +1,26 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX6_9.sce
+
+clc;
+clear;
+Vpeak=15;//peak volatge across the load in V
+Rl=12;//load impedence in ohm
+Vcc=24;//dc supply voltage in V
+Ipeak=Vpeak/Rl;//Peak value of load current in A
+Idc=(2/%pi)*Ipeak;//DC current drawn from the battery in A
+
+Pi=Vcc*Idc;//input power in W
+printf("\n Input power= %0.1f W \n",Pi)
+
+Po=Vpeak^2/(2*Rl);//Output power in W
+eta=(Po/Pi)*100;
+printf("\n Efficiency= %0.2f percentage \n",eta)
+//answer in the book was wrong
+//efficiency formula given in the book was wrong
+//there is a error in the substitution of Vpeak value in output power equation
diff --git a/3893/CH8/EX8.1/Ex8_1.jpg b/3893/CH8/EX8.1/Ex8_1.jpg Binary files differnew file mode 100644 index 000000000..de60bf80e --- /dev/null +++ b/3893/CH8/EX8.1/Ex8_1.jpg diff --git a/3893/CH8/EX8.1/Ex8_1.sce b/3893/CH8/EX8.1/Ex8_1.sce new file mode 100644 index 000000000..af030b1ef --- /dev/null +++ b/3893/CH8/EX8.1/Ex8_1.sce @@ -0,0 +1,18 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX8_1.sce
+
+clc;
+clear;
+Gv1=20;
+Gv2=40;
+Gv3=60;
+//Gv1,Gv2,Gv3 are tha voltage gains of multistage amplifiers
+G=Gv1*Gv2*Gv3;
+dB=20*log10(G);
+printf("\n Overall gain =%0.2f dB",dB)
diff --git a/3893/CH8/EX8.2/Ex8_2.jpg b/3893/CH8/EX8.2/Ex8_2.jpg Binary files differnew file mode 100644 index 000000000..0589ea2c0 --- /dev/null +++ b/3893/CH8/EX8.2/Ex8_2.jpg diff --git a/3893/CH8/EX8.2/Ex8_2.sce b/3893/CH8/EX8.2/Ex8_2.sce new file mode 100644 index 000000000..6e8fad6a9 --- /dev/null +++ b/3893/CH8/EX8.2/Ex8_2.sce @@ -0,0 +1,16 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX8_2.sce
+
+clc;
+clear;
+A=80;//voltage gain
+Am=20*log10(A);//midfrequency gain
+Af=3;//gain falls at cutoff frequencies in dB
+Ac=Am-Af;
+printf("\n Gain at cutoff frequencies =%0.2f dB",Ac)
diff --git a/3893/CH8/EX8.3/Ex8_3.jpg b/3893/CH8/EX8.3/Ex8_3.jpg Binary files differnew file mode 100644 index 000000000..25c1a4fd9 --- /dev/null +++ b/3893/CH8/EX8.3/Ex8_3.jpg diff --git a/3893/CH8/EX8.3/Ex8_3.sce b/3893/CH8/EX8.3/Ex8_3.sce new file mode 100644 index 000000000..c4bbfcff2 --- /dev/null +++ b/3893/CH8/EX8.3/Ex8_3.sce @@ -0,0 +1,41 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX8_3.sce
+
+clc;
+clear;
+hfe=100;
+hie=1.2e3;
+//Z1,Z2,Z3,Z4,Z5,Z6,Z7,Z8 are the resistance values(Ohm) of the figure(8.13) given
+Z1=60e3;
+Z2=6e3;
+Zi1=(Z1*Z2)/(Z1+Z2);
+Zi=(Zi1*hie)/(Zi1+hie);
+printf("\n Input impedence =%0.3f kOhm \n",Zi*1e-3)
+
+Z3=3e3;
+Z4=3.3e3;
+Zo=(Z4*Z3)/(Z4+Z3);
+printf("\n Output impedence =%0.2f kOhm \n",Zo*1e-3)
+
+Av2=-(hfe*Zo)/hie;//voltage gain of second stage
+
+Z6=7e3;
+Z7=60e3;
+Z8=6e3;
+Zf=(Z6*Z7)/(Z6+Z7);
+Zs=(Z8*hie)/(Z8+hie);
+Zo1=(Zf*Zs)/(Zf+Zs);
+
+Av1=-(hfe*Zo1)/hie;//voltage gain of first stage
+
+A=Av1*Av2;
+printf("\n Overall gain= %0.1f \n",A)
+
+
+//Answer vary dueto roundoff error
diff --git a/3893/CH8/EX8.4/Ex8_4.jpg b/3893/CH8/EX8.4/Ex8_4.jpg Binary files differnew file mode 100644 index 000000000..7f1751d85 --- /dev/null +++ b/3893/CH8/EX8.4/Ex8_4.jpg diff --git a/3893/CH8/EX8.4/Ex8_4.sce b/3893/CH8/EX8.4/Ex8_4.sce new file mode 100644 index 000000000..3208cf078 --- /dev/null +++ b/3893/CH8/EX8.4/Ex8_4.sce @@ -0,0 +1,20 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX8_4.sce
+
+clc;
+clear;
+Zp=1.5e3;//output impedence of the transistor in ohm
+Zs=15;//impedence of the speaker in ohm
+a=(Zp/Zs);
+//a=(Np/Ns)^2
+//Np=primary number of turns
+//Ns=secondary number of turns
+t=sqrt(a);
+printf("\n Turns ratio= %d:1",t)
+
diff --git a/3893/CH8/EX8.5/Ex8_5.jpg b/3893/CH8/EX8.5/Ex8_5.jpg Binary files differnew file mode 100644 index 000000000..e02d4294b --- /dev/null +++ b/3893/CH8/EX8.5/Ex8_5.jpg diff --git a/3893/CH8/EX8.5/Ex8_5.sce b/3893/CH8/EX8.5/Ex8_5.sce new file mode 100644 index 000000000..d1ed5ba25 --- /dev/null +++ b/3893/CH8/EX8.5/Ex8_5.sce @@ -0,0 +1,34 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX8_5.sce
+
+clc;
+clear;
+//from the given circuit 8.15 the following values are taken
+Rc1=18e3;
+Re1=600;
+Rc2=15e3;
+Re2=1.3e3;
+//resiatance in ohm
+Vin=1.3;//input voltage in V
+Vbe=0.7;
+Vcc=20;
+
+Ve1=Vin-Vbe;//volatage of emitter terminal of transistor1
+Ie1=Ve1/Re1;
+Ic1=Ie1;
+Vc1=Vcc-(Ic1*Rc1);
+
+Vb2=Vc1;//the base volatge of second stage = collector voltage of first stage
+Ve2=Vb2-Vbe;
+Ie2=Ve2/Re2;
+Ic2=Ie2;
+Vc2=Vcc-(Ic2*Rc2);
+
+printf("\n Output voltage = %dV",Vc2)
+
diff --git a/3893/CH9/EX9.1/Ex9_1.jpg b/3893/CH9/EX9.1/Ex9_1.jpg Binary files differnew file mode 100644 index 000000000..ff969b35a --- /dev/null +++ b/3893/CH9/EX9.1/Ex9_1.jpg diff --git a/3893/CH9/EX9.1/Ex9_1.sce b/3893/CH9/EX9.1/Ex9_1.sce new file mode 100644 index 000000000..a36fff937 --- /dev/null +++ b/3893/CH9/EX9.1/Ex9_1.sce @@ -0,0 +1,15 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX9_1.sce
+
+clc;
+clear;
+A=90;//open loop gain
+beta=-0.6;//negative feedback factor
+Af=A/(1-(beta*A));
+printf("\n Overall gain =%0.2f \n",Af)
diff --git a/3893/CH9/EX9.2/Ex9_2.jpg b/3893/CH9/EX9.2/Ex9_2.jpg Binary files differnew file mode 100644 index 000000000..4116ebf85 --- /dev/null +++ b/3893/CH9/EX9.2/Ex9_2.jpg diff --git a/3893/CH9/EX9.2/Ex9_2.sce b/3893/CH9/EX9.2/Ex9_2.sce new file mode 100644 index 000000000..c1da867d7 --- /dev/null +++ b/3893/CH9/EX9.2/Ex9_2.sce @@ -0,0 +1,21 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX9_2.sce
+
+clc;
+clear;
+Af=90;//negative feedback gain
+Vi1=0.5;//input voltage with feedback in V
+Vi2=60e-3;//amplitude of input signal without feedback in V
+Vo1=Af*Vi1;//output voltage with feedback in V
+Vo2=Vo1;
+A=Vo2/Vi2;//open loop gain
+beta=(Af-A)/(Af*A);//Feedback factor
+printf("\n Open loop gain =%d \n Feedback factor =%f \n",A,beta)
+
+//Answer given in the book is wrong
diff --git a/3893/CH9/EX9.3/Ex9_3.jpg b/3893/CH9/EX9.3/Ex9_3.jpg Binary files differnew file mode 100644 index 000000000..f6e2a5ff2 --- /dev/null +++ b/3893/CH9/EX9.3/Ex9_3.jpg diff --git a/3893/CH9/EX9.3/Ex9_3.sce b/3893/CH9/EX9.3/Ex9_3.sce new file mode 100644 index 000000000..378fb4a4f --- /dev/null +++ b/3893/CH9/EX9.3/Ex9_3.sce @@ -0,0 +1,23 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX9_3.sce
+
+clc;
+clear;
+Ao=50;//open loop gain in dB
+beta=-0.004;//Negative feedback factor
+
+//20 log(V0/Vi)=A0
+//let V0/Vi=A
+A=10^(Ao/20);
+//Let B=dA/A
+B=0.01;//10% decreased overall gain
+//let C=dAf/Af
+C=B/(1-(beta*A));
+
+printf("\n The change in overall gain=%0.4f",-C)
diff --git a/3893/CH9/EX9.4/Ex9_4.jpg b/3893/CH9/EX9.4/Ex9_4.jpg Binary files differnew file mode 100644 index 000000000..0907a7957 --- /dev/null +++ b/3893/CH9/EX9.4/Ex9_4.jpg diff --git a/3893/CH9/EX9.4/Ex9_4.sce b/3893/CH9/EX9.4/Ex9_4.sce new file mode 100644 index 000000000..54030d9f1 --- /dev/null +++ b/3893/CH9/EX9.4/Ex9_4.sce @@ -0,0 +1,16 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX9_4.sce
+
+clc;
+clear;
+A=1000;//open loop gain
+beta=-0.02;//negative feedback factor
+Zi=1.5e3;//input impedence in ohm
+Zif=Zi*(1-(beta*A));
+printf("\n Input impedence with feedback=%0.1f kohm",Zif*1e-3)
diff --git a/3893/CH9/EX9.5/Ex9_5.jpg b/3893/CH9/EX9.5/Ex9_5.jpg Binary files differnew file mode 100644 index 000000000..c51a5cb71 --- /dev/null +++ b/3893/CH9/EX9.5/Ex9_5.jpg diff --git a/3893/CH9/EX9.5/Ex9_5.sce b/3893/CH9/EX9.5/Ex9_5.sce new file mode 100644 index 000000000..153733108 --- /dev/null +++ b/3893/CH9/EX9.5/Ex9_5.sce @@ -0,0 +1,19 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX9_5.sce
+
+clc;
+clear;
+Zo=10e3;//output impedence without feedback in ohm
+Zof=500;//output impedence with feedback in ohm
+A=1000;//open loop gain is 60 dB
+//60 dB=10^(60/20)=1000
+beta=(Zof-Zo)/(Zof*A); //obtained from the equation Zof=(Zo/(1-(B*A))
+printf("\n Feedback factor=%0.2f",beta)
+
+//Answer vary dueto roundoff error
diff --git a/3893/CH9/EX9.6/Ex9_6.jpg b/3893/CH9/EX9.6/Ex9_6.jpg Binary files differnew file mode 100644 index 000000000..0a8813adc --- /dev/null +++ b/3893/CH9/EX9.6/Ex9_6.jpg diff --git a/3893/CH9/EX9.6/Ex9_6.sce b/3893/CH9/EX9.6/Ex9_6.sce new file mode 100644 index 000000000..55380b87e --- /dev/null +++ b/3893/CH9/EX9.6/Ex9_6.sce @@ -0,0 +1,18 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX9_6.sce
+
+clc;
+clear;
+A=15;//gain of amplifier
+D=12;//Distortion without feedback
+beta=-0.15;//negative feedback factor
+Af=A/(1-(beta*A));
+Df=D/(1-(beta*A));
+printf("\n Overall gain with feedback =%0.2f \n Distortion with feedback =%0.2f percentage",Af,Df)
+
diff --git a/3893/CH9/EX9.7/Ex9_7.jpg b/3893/CH9/EX9.7/Ex9_7.jpg Binary files differnew file mode 100644 index 000000000..1cb6db548 --- /dev/null +++ b/3893/CH9/EX9.7/Ex9_7.jpg diff --git a/3893/CH9/EX9.7/Ex9_7.sce b/3893/CH9/EX9.7/Ex9_7.sce new file mode 100644 index 000000000..a06f24ca8 --- /dev/null +++ b/3893/CH9/EX9.7/Ex9_7.sce @@ -0,0 +1,19 @@ +//Book Name:Principles of Electronics , Vol.II
+//Author:B.V.Narayana Rao
+//Publisher:New Age International Private Limited
+//Edition:Second Edition ,1996
+//Operating system: Windows 10
+//Scilab version: Scilab 6.0.0
+
+//EX9_7.sce
+
+clc;
+clear;
+A=25;// open loop gain
+beta=-0.1;//negative feedback factor
+Af=A/(1-(beta*A));//overall gain
+A0=A*(5/100);//increased open loop gain by 5%
+A1=A+A0;//new open loop gain value after the increase
+Afnew=A1/(1-(beta*A1));//new overall gain value
+Afper=((Afnew-Af)/(Af))*100;
+printf("\n Percentage gain in overall gain=%0.1f percentage",Afper)
diff --git a/3905/CH10/EX10.11/Ex10_11.sce b/3905/CH10/EX10.11/Ex10_11.sce new file mode 100644 index 000000000..82ef6fa24 --- /dev/null +++ b/3905/CH10/EX10.11/Ex10_11.sce @@ -0,0 +1,24 @@ +//Example 10.11, Page Number 596
+//Column Decoders
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+//Consider a 1024:1 decoder
+K=10 //Number of inputs of decoder
+K_precoded=5 //Number of precoded bits
+N_tree=2*((2^K_precoded)-1) //Number of devices required in tree decoder
+N_pass=(2^K) //Number of devices in pass deocoder
+N_pre=6*(2^K_precoded) //Number of devices for 5 bit precoding
+
+//Outputs
+N_dec=N_pre+N_pass+N_tree //Number of devices in column decoder
+
+//Results
+mprintf("\nNumber of devices in column decoder N_dec: %.1f",N_dec);
+
+
+
+//Outputs
+//Number of devices in column decoder N_dec: 1278.0
diff --git a/3905/CH10/EX10.12/Ex10_12.sce b/3905/CH10/EX10.12/Ex10_12.sce new file mode 100644 index 000000000..8116988dd --- /dev/null +++ b/3905/CH10/EX10.12/Ex10_12.sce @@ -0,0 +1,24 @@ +//Example 10.12, Page Number 599
+//Differential Sense Amplifier
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+W_L_NMOS=10 //(W/L) ratio of NMOS transitor
+W_L_PMOS=10 //(W/L) ratio of PMOS transitor
+I_bias=100*(10^-6) //biasing current in amperes(A)
+lamda_NMOS=0.06 //Channel modulation in volt inverse(1/V)
+lamda_PMOS=0.19 //Channel modulation in volt inverse(1/V)
+Kn=19.6*(10^-6) //NMOS device parameter in ampere per volt square(A/V^2)
+
+//Outputs
+A=(1/(lamda_NMOS+lamda_PMOS))*sqrt((4*Kn*W_L_NMOS)/I_bias) //Gain of differential sense amplifier
+
+//Results
+mprintf("\nGain of differential sense amplifier A: %.2f",A);
+
+//Output
+//Gain of differential sense amplifier A: 11.20
+
+
diff --git a/3905/CH10/EX10.3/Ex10_3.sce b/3905/CH10/EX10.3/Ex10_3.sce new file mode 100644 index 000000000..72b03ce34 --- /dev/null +++ b/3905/CH10/EX10.3/Ex10_3.sce @@ -0,0 +1,28 @@ +//Example 10.3, Page Number 565
+//Voltage Swings in NOR and NAND ROM's
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vdd=5 //Supply voltage in volts(V)
+Vto_PMOS=-0.75 //Threshold voltage in volts(V)
+//Vto_NMOS is assumed as abs(Vto_PMOS)
+W_L_NMOS=9 //(W/L) ratio of NMOS FET after considering lateral diffusion differences
+V_ol=2.5 //Transition logic low level voltage in volts(V)
+
+//Outputs
+W_L_PMOS_NOR=(1-sqrt(1-(V_ol/(Vdd-Vto_PMOS))))*3*W_L_NMOS
+
+//Due to series chaining , the value of Vol is a function of both size of memory and programming.For this series chaining a longer device has to be used for N transistors which unacceptable results for larger arrays.So,NAND ROM's are rarely used for arrays with more than 8 rows.
+//(8X8):(W/L)p=0.62
+//(512X512):(W/L)p=0.0097
+
+//Results
+mprintf("\n(W/L) ratio of PMOS FET: %.2f seconds",W_L_PMOS_NOR);
+
+//Output
+//(W/L) ratio of PMOS FET: 6.70 seconds
+
+
+
diff --git a/3905/CH10/EX10.4/Ex10_4.sce b/3905/CH10/EX10.4/Ex10_4.sce new file mode 100644 index 000000000..156aff554 --- /dev/null +++ b/3905/CH10/EX10.4/Ex10_4.sce @@ -0,0 +1,62 @@ +//Example 10.4, Page Number 566
+//Word and Bit Line Parasitics
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+C_layer_poly=0.058*(10^-15) //Interconncet layer capacitance between polysilicon to substrate per unit area in farads per cell(F/m^2)
+C_layer_metal=0.031*(10^-15) //Interconncet layer capacitance between metal to substrate per unit area in farads per cell(F)
+C_fring=0.043*(10^-15) //Fringing capacitance per cell in farads(F)
+R_sheet_metal=0.07 //Sheet resistance per unit area in ohm per area(Ω/▀)
+R_sheet_diffusion=10 //Sheet resistance per unit area in ohm per area(Ω/▀)
+lamda=1 //Channel modulation in volt inverse(1/V)
+
+//Outputs
+//NOR
+//Word-Line Parasictics
+Resistance_cell_word_NOR=(7/2)*R_sheet_diffusion //Resistance per unit memory cell in ohms(Ω)
+wire_capacitance_cell_word_NOR=(((7*lamda)*(2*lamda))*((0.6)^2)*C_layer_poly)+2*((7*lamda)*0.6)*C_fring //Wire capacitance of unit cell in farads(F)
+Gate_capacitance_cell_NOR=((4*lamda)*(2*lamda))*((0.6)^2)*1.76*(10^-15) //Gate capacitance of ell in farads(F)
+//Bit-Line Parasitcics
+Resistance_cell_bit_NOR=(8.5/4)*R_sheet_metal //Resistance per unit memory cell in ohms(Ω)
+wire_capacitance_cell_bit_NOR=((8.5*lamda)*(4*lamda))*((0.6)^2)*C_layer_metal+2*((8.5*lamda)*0.6)*C_fring //Wire capacitance of unit cell in farads(F)
+drain_capacitance_cell_NOR=((((3*lamda)*(4*lamda))*((0.6)^2)*(0.3))+(2*(3*lamda)*0.6*0.8))*(0.375*(10^-15))+((4*lamda)*0.6*(0.43*(10^-15)))
+//NAND
+//Word-Line Parasictics
+Resistance_cell_word_NAND=(6/2)*R_sheet_diffusion //Resistance per unit memory cell in ohms(Ω)
+wire_capacitance_cell_word_NAND=(((6*lamda)*(2*lamda))*((0.6)^2)*C_layer_poly)+2*((6*lamda)*0.6)*C_fring //Wire capacitance of unit cell in farads(F)
+Gate_capacitance_cell_NAND=((3*lamda)*(2*lamda))*((0.6)^2)*(1.76*(10^-15)) //Gate capacitance of ell in farads(F)
+//Bit-Line Parasitcics
+Resistance_cell_bit_NAND=10*(10^3) //Resistance per unit memory cell in ohms(Ω)
+//wire_capacitance_cell_bit:Included in diffusion capacitance in farads(F)
+source_drain_capacitance_cell_NAND=(((3*lamda)*(3*lamda))*((0.6)^2)*0.3*(10^-15))+(2*3*lamda*0.6*0.8*0.345*(10^-15))+(3*lamda*2*lamda*((0.6)^2)*1.7*(10^-15))
+
+
+//Results
+mprintf("\nResistance per unit NOR memory cell Resistance_cell_word_NOR: %.1f ohms",Resistance_cell_word_NOR);
+mprintf("\nWire capacitance of unit NOR cell wire_capacitance_cell_word_NOR: %.18f farads",wire_capacitance_cell_word_NOR);
+mprintf("\nGate capacitance of NOR cell Gate_capacitance_cell_NOR: %.18f farads",Gate_capacitance_cell_NOR);
+mprintf("\nResistance per unit NOR memory cell Resistance_cell_bit_NOR: %.2f ohms",Resistance_cell_bit_NOR);
+mprintf("\nWire capacitance of unit NOR cell wire_capacitance_cell_bit_NOR: %.18f farads",wire_capacitance_cell_bit_NOR);
+mprintf("\nGate capacitance of NOR cell drain_capacitance_cell_NOR: %.18f farads",drain_capacitance_cell_NOR);
+mprintf("\nResistance per unit NAND memory cell Resistance_cell_word_NAND: %.1f ohms",Resistance_cell_word_NAND);
+mprintf("\nWire capacitance of unit NAND cell wire_capacitance_cell_word_NAND: %.18f farads",wire_capacitance_cell_word_NAND);
+mprintf("\nGate capacitance of NAND cell Gate_capacitance_cell_NAND: %.18f farads",Gate_capacitance_cell_NAND);
+mprintf("\nResistance per unit NAND memory cell Resistance_cell_bit_NAND: %.1f ohms",Resistance_cell_bit_NAND);
+mprintf("\nGate capacitance of NAND cell source_drain_capacitance_cell_NAND: %.16f farads",source_drain_capacitance_cell_NAND);
+
+
+//Outputs
+//Resistance per unit NOR memory cell Resistance_cell_word_NOR: 35.0 ohms
+//Wire capacitance of unit NOR cell wire_capacitance_cell_word_NOR: 0.000000000000000654 farads (or) 0.654 fF
+//Gate capacitance of NOR cell Gate_capacitance_cell_NOR: 0.000000000000005069 farads (or) 5.069 fF
+//Resistance per unit NOR memory cell Resistance_cell_bit_NOR: 0.15 ohms
+//Wire capacitance of unit NOR cell wire_capacitance_cell_bit_NOR: 0.000000000000000818 farads (or) 0.818 fF
+//Gate capacitance of NOR cell drain_capacitance_cell_NOR: 0.000000000000002598 farads (or) 2.598 fF
+
+//Resistance per unit NAND memory cell Resistance_cell_word_NAND: 30.0 ohms
+//Wire capacitance of unit NAND cell wire_capacitance_cell_word_NAND: 0.000000000000000560 farads (or) 0.56 fF
+//Gate capacitance of NAND cell Gate_capacitance_cell_NAND: 0.000000000000003802 farads (or) 3.802 fF
+//Resistance per unit NAND memory cell Resistance_cell_bit_NAND: 10000.0 ohms (or) 10 kΩ
+//Gate capacitance of NAND cell source_drain_capacitance_cell_NAND: 0.0000000000000056 farads (or) 5.6 fF
diff --git a/3905/CH10/EX10.5/Ex10_5.sce b/3905/CH10/EX10.5/Ex10_5.sce new file mode 100644 index 000000000..481a29d44 --- /dev/null +++ b/3905/CH10/EX10.5/Ex10_5.sce @@ -0,0 +1,51 @@ +//Example 10.5, Page Number 569
+//Propagation Delay of NOR RAM
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+M=512 //Number of cells
+C_gate_word=5.1*(10^-15) //Word Gate capacitance in farads(F)
+C_wire_word=0.65*(10^-15) //Word Wire capacitance in farads(F)
+C_word=C_gate_word+C_wire_word //Capacitance for generating word in farads(F)
+R_word=35 //Resistance in ohms(Ω)
+C_gate_bit=2.6*(10^-15) //Word Gate capacitance in farads(F)
+C_wire_bit=0.8*(10^-15) //Word Wire capacitance in farads(F)
+Kp=5.3*(10^-6) //Device paramter in ampere per voltage square(A/V^2)
+Kn=19.6*(10^-6) //Device paramter in ampere per voltage square(A/V^2)
+//W_L_NMOS=(2.4/1.2) //(W/L) ratio of NMOS transitor
+//W_L_PMOS=(6/1.2) //(W/L) ratio of PMOS transitor
+W_Leff_NMOS=(2.4/0.9) //(W/Leff) ratio of NMOS transitor
+W_Leff_PMOS=(6/0.9) //(W/Leff) ratio of PMOS transitor
+
+
+//Outputs
+//Word-Line Delay
+t_word=0.38*(R_word*C_word)*((M)^2) //Delay of didtributed RC line containg M cells in seconds(secs)
+//Bit-Line Delay
+C_bit=M*(C_gate_bit+C_wire_bit) //Capacitance for generating a bit in farads(F)
+Iav_HL=(1/2)*(W_Leff_NMOS)*(Kn)*((((4.25)^2)/2)+((4.25*3.75)-(((3.75)^2)/2)))-((1/2)*(W_Leff_PMOS)*(Kp)*((4.25*1.25)-(((1.25)^2)/2))) //Average high to low level transition current in amperes(A)
+t_HL=(C_bit*1.25)/Iav_HL //High to low response time in seconds(secs)
+//By similar above procedure Iav_LH can be computed and is given by:
+Iav_LH=0.36*(10^-3) //Average low to high level transition current in amperes(A)
+t_LH=(C_bit*1.25)/Iav_LH
+
+
+//Results
+mprintf("\nDelay of didtributed RC line containg M cells t_word: %.10f seconds",t_word);
+mprintf("\nCapacitance for generating a bit C_bit: %.13f farads",C_bit);
+mprintf("\nAverage high to low level transition current Iav_HL: %.6f amperes",Iav_HL);
+mprintf("\nHigh to low response time t_HL: %.10f seconds",t_HL);
+mprintf("\nAverage low to high level transition current Iav_LH: %.6f amperes",Iav_LH);
+mprintf("\nLow to high response time t_LH: %.10f seconds",t_LH);
+
+
+
+//Outputs
+//Delay of didtributed RC line containg M cells t_word: 0.0000000200 seconds (or) 20 nsecs
+//Capacitance for generating a bit C_bit: 0.0000000000017 farads (or) 1.7 picosecs
+//Average high to low level transition current Iav_HL: 0.000389 amperes (or) 0.389 mA
+//High to low response time t_HL: 0.0000000056 seconds (or) 5.6 nsecs
+//Average low to high level transition current Iav_LH: 0.000360 amperes (or) 0.360 mA
+//Low to high response time t_LH: 0.0000000060 seconds (or) 6.0 nsecs
diff --git a/3905/CH10/EX10.9/Ex10_9.sce b/3905/CH10/EX10.9/Ex10_9.sce new file mode 100644 index 000000000..c7ebd4cd3 --- /dev/null +++ b/3905/CH10/EX10.9/Ex10_9.sce @@ -0,0 +1,28 @@ +//Example 10.9, Page Number 588
+//IT DRAM Read-out
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+C_bit=1*(10^-12) //Bit line capacitance in farads(F)
+V_pre=2.5 //Bit precharge voltage in volts(V)
+Cs=50*(10^-15) //Cell capacitance in farads(F)
+V_logic_high=3.5 //Cell voltage when logic high in volts(V)
+V_logic_low=0 //Cell voltage when logic low in volts(V)
+
+//Outputs
+delta_Vswing_logic_low=(V_logic_low-V_pre)*(Cs/(Cs+C_bit)) //Voltage swing in bit line when logic low in volts(V)
+delta_Vswing_logic_high=(V_logic_high-V_pre)*(Cs/(Cs+C_bit)) //Voltage swing in bit line when logic high in volts(V)
+
+//Results
+mprintf("\nVoltage swing in bit line when logic low delta_Vswing_logic_low: %.4f volts",delta_Vswing_logic_low);
+mprintf("\nVoltage swing in bit line when logic high delta_Vswing_logic_high: %.3f volts",delta_Vswing_logic_high);
+
+
+//Outputs
+//Voltage swing in bit line when logic low delta_Vswing_logic_low: -0.1190 volts (or) -119.0 mV
+//Voltage swing in bit line when logic high delta_Vswing_logic_high: 0.048 volts (or) 48 mV
+
+//NOTE:
+//▲V(1)=60 mV according to the textbook, but above calculations using equation 10.5 on page no 588 gives ▲V(1)=48 mV
diff --git a/3905/CH2/EX2.1/Ex2_1.sce b/3905/CH2/EX2.1/Ex2_1.sce new file mode 100644 index 000000000..455f06467 --- /dev/null +++ b/3905/CH2/EX2.1/Ex2_1.sce @@ -0,0 +1,21 @@ +//Example 2.1, Page Number 20
+//Built-in Voltage of PN Junction
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Na=10^15 //Acceptor ions doping densities in atoms per cm cube (atoms/cm^3)
+Nd=10^16 //Donor ions doping densities in atoms per cm cube (atoms/cm^3)
+T=300 //Temperature in Kelvin(K)
+phi_t=26 //Thermal Voltage in milli Volts(mV) at 300 kelvin
+ni=1.5*10^10 //Intrinsic carrier concentration of pure semiconductor in inverse cm cube (1/cm^3)
+
+//Outputs
+phi_o= phi_t*log((Na*Nd)/(ni*ni)) // Built-in Potential of P-N junction at zero bias in milli volts(mV)
+
+//Results
+mprintf("Built-in potential of P-N junction at 300k phi_o: %.2f mV",phi_o);
+
+//Outputs
+//Built-in potential of P-N junction at 300k phi_o: 637.46 mV
diff --git a/3905/CH2/EX2.11/Ex2_11.sce b/3905/CH2/EX2.11/Ex2_11.sce new file mode 100644 index 000000000..ea35c64be --- /dev/null +++ b/3905/CH2/EX2.11/Ex2_11.sce @@ -0,0 +1,21 @@ +//Example 2.11, Page Number 56
+//Subthreshold Slope
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+slope=121 //Inverse Slope obtained from plot between Id vs Vgs(▲ln(Id)/▲Vgs) in milli volts per decade (mV/decade)
+q=1.6*(10^-19) //Charge in coulombs(C)
+K=1.38064852*(10^23) //Boltzman constant in (m2*kg*s^-2*K^-1)
+T=300 //Temperature in kelvin(K)
+
+//Outputs
+//Expression (▲ln(Id)/▲Vgs)^-1=(K*T/q)*log(10)*(1+α),where (K*T/q)*log(10) evaluates to 60mv/decade
+alpha=(slope/60)-1 //Sloving for alpha-factor using above expression
+
+//Results
+mprintf("alpha-factor is: %.2f",alpha);
+
+//Output
+//alpha-factor is: 1.02
diff --git a/3905/CH2/EX2.15/Ex2_15.sce b/3905/CH2/EX2.15/Ex2_15.sce new file mode 100644 index 000000000..51ee1b045 --- /dev/null +++ b/3905/CH2/EX2.15/Ex2_15.sce @@ -0,0 +1,49 @@ +//Example 2.15, Page Number 77
+//Dynamic Behaviour of an npn Transistor
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+beta_f=100 //Forward current gain
+Vbe_on=0.75 //Forward bias Voltage across base and emitter in volts(V)
+tou_f=10*(10^-12) //Mean forward transit time in seconds(secs)
+C_beo=20*(10^-15) //Zero bias base emitter parasitic capacitance in farads(F)
+C_bco=22*(10^-15) //Zero bias base collector parasitic capacitance in farads(F)
+C_cso=20*(10^-15) //Zero bias base collector substrate parasitic capacitance in farads(F)
+m=0.33 //Grading co-efficient is equal to (1/2) for abrupt junction and (1/3) for linear graded junction
+phi_o=0.75 //Built in potential in volts(V)
+Vcc=2 //Supply in volts(V)
+Vo=1 //Initial voltage in volts(V)
+Rb=5*(10^3) //Base resistance in ohms(Ω)
+Vce=2 //Voltage across collector and emitter(Vce=Vcc) in volts(V)
+Vbe_high=0.75 //Voltage across base emmiter in forward bias in volts(V)
+Vbe_low=0 //Voltage across base emmiter in reverse bias in volts(V)
+Vbc_high=2 //Voltage across base collector in forward bias in volts(V)
+Vbc_low=1.25 //Voltage across base collector in forward bias in volts(V)
+
+
+//Outputs
+Ib_to=(Vo-Vbe_on)/Rb //Base current at t=0 in amperes(A)
+Ib_t=(0-Vbe_on)/Rb //Base current after switching input(changes direction) in amperes(A)
+t_base=(beta_f*tou_f)*log((Ib_to-Ib_t)/-Ib_t) //Time to remove excess base charge in seconds(secs)
+Keq_be=-(phi_o^m)*[((phi_o-Vbe_high)^(1-m))-((phi_o-Vbe_low)^(1-m))]/((Vbe_high-Vbe_low)*(1-m)) //Device parameter
+//Similarly for Base-Collector junction the above equation gives Keq_bc:
+Keq_bc=0.68 //Device parameter
+t_depl=2.2*Rb*((Keq_be*C_beo)+(Keq_bc*C_bco)) //Depletion region time constant in seconds(secs)
+
+//Results
+mprintf("\nBase current at t=0 is Ib_to : %.7f amperes",Ib_to);
+mprintf("\nBase current after switching input is Ib_t: %.7f amperes",Ib_t);
+mprintf("\nTime to remove excess base charge is t_base: %.13f seconds",t_base);
+mprintf("\nKeq_be is Keq_be: %.2f ",Keq_be);
+mprintf("\nKeq_bc is Keq_bc: %.2f",Keq_bc);
+mprintf("\nTime to remove excess base charge is t_depl: %.13f seconds",t_depl);
+
+//Outputs
+//Base current at t=0 is Ib_to : 0.0000500 amperes (or) 50.0µA
+//Base current after switching input is Ib_t: -0.0001500 amperes (or) 150.0 µA
+//Time to remove excess base charge is t_base: 0.0000000002876 seconds (or) 287.6 psecs
+//Keq_be is Keq_be: 1.49
+//Keq_bc is Keq_bc: 0.68
+//Time to remove excess base charge is t_depl: 0.0000000004929 seconds (or) 492.9 psecs
diff --git a/3905/CH2/EX2.17/Ex2_17.sce b/3905/CH2/EX2.17/Ex2_17.sce new file mode 100644 index 000000000..4937aaea2 --- /dev/null +++ b/3905/CH2/EX2.17/Ex2_17.sce @@ -0,0 +1,31 @@ +//Example 2.17, Page Number 85
+//MOS Transistor Process Variations
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vgs=5 // Gate source voltage in volts(V)
+Vds=5 //Drain source voltage in volts(V)
+W=1.8*(10^-6) //Channel width in metres(m)
+L=0.9*(10^-6) //Effective channel length in metres(m)
+Kn=19.6*(10^-6) //Device parameter in A/V^2
+Vt=0.75 //Threshold voltage in volts(V)
+
+//Outputs
+Id=(Kn/2)*(W/L)*((Vgs-Vt)^2) //Nominal diode current in amperes(A)
+
+//The above parameters are subject to process variation.So,considering the following conditions:1)10% variation in Kn´ 2) 25% variation in Vt 3) Distribution of W and L has value 0.15µm 4) Variation of 0.5V in supply
+
+Id_max=(((Kn+(0.1*Kn))/2)*((W+(0.15*(10^-6)))/(L-(0.15*(10^-6))))*((Vgs+0.5)-(Vt-(0.25*Vt)))^2) //Maximum nominal diode current in amperes(A)
+Id_min=(((Kn-(0.1*Kn))/2)*((W-(0.15*(10^-6)))/(L+(0.15*(10^-6))))*((Vgs-0.5)-(Vt+(0.25*Vt)))^2) //Minimum nominal diode current in amperes(A)
+
+//Results
+mprintf("\nNominal diode current is Id: %.7f amperes",Id);
+mprintf("\nMaximum nominal diode current is Id_max: %.7f amperes",Id_max);
+mprintf("\nMinimum nominal diode current is Id_min: %.7f amperes",Id_min);
+
+//Outputs
+//Nominal diode current is Id: 0.0003540 amperes (or) 354.0 µA
+//Maximum nominal diode current is Id_max: 0.0006832 amperes (or) 683.2 µA
+//Minimum nominal diode current is Id_min: 0.0001759 amperes (or) 175.9 µA
diff --git a/3905/CH2/EX2.2/Ex2_2.sce b/3905/CH2/EX2.2/Ex2_2.sce new file mode 100644 index 000000000..080c6dddd --- /dev/null +++ b/3905/CH2/EX2.2/Ex2_2.sce @@ -0,0 +1,23 @@ +//Example 2.2, Page Number 27
+//Analysis of Diode Network
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vs=3 //Source voltage in volts(V)
+Rs=10*(10^3) //Series resistance in ohms(Ω)
+Is=0.5 *(10^-16) //Saturation current of the diode in amperes(A)
+phi_t=26*(10^-3) //Thermal voltage in volts(V)
+
+//Using ideal diode equation and solving the non linear equation using either numerical or iterative techniques
+Id=0.224 *(10^-3) //Diode current in amperes(A)
+
+//Outputs
+Vd=Vs-Rs*Id //Voltage across the diode in volts(V)
+
+//Results
+mprintf("Voltage across diode Vd: %.2f V",Vd);
+
+//Output
+// Voltage across diode Vd: 0.76 V
diff --git a/3905/CH2/EX2.3/Ex2_3.sce b/3905/CH2/EX2.3/Ex2_3.sce new file mode 100644 index 000000000..40e66dcee --- /dev/null +++ b/3905/CH2/EX2.3/Ex2_3.sce @@ -0,0 +1,23 @@ +//Example 2.3, Page Number 29
+//Junction Capacitance
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+//Consider a silicon junction with following parameters:
+Cjo=0.5*((10^-15)/(10^-12)) //Capacitance under zero-bias in farads per metre square(F/m^2)
+Ad=12*(10^-6) //Junction area in metre square(m^2)
+phi_o=0.64 //Built-in potential at zero bias in volts(V)
+Vd=-5 //Reverse bias voltage in volts(V)
+
+//Outputs
+Cj=Cjo/(sqrt(1-(Vd/phi_o))) //Junction capacitance in farads per metre square(F/m^2)
+//The above equation is valid under conditions that the P-N junction is a abrupt junction.
+
+//Results
+mprintf("Junction Capacitance Cj: %.6f F/m^2",Cj);
+
+//Output
+//Junction Capacitance is: 0.000168 F/m^2 (or) 0.168 fF/µm^2
+
diff --git a/3905/CH2/EX2.4/Ex2_4.sce b/3905/CH2/EX2.4/Ex2_4.sce new file mode 100644 index 000000000..ece40fd5f --- /dev/null +++ b/3905/CH2/EX2.4/Ex2_4.sce @@ -0,0 +1,26 @@ +//Example 2.4, Page Number 30
+//Average Junction Capacitance
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+V_high=0 //Diode high level voltage in volts(V)
+V_low=-5 //Diode low level voltage in volts(V)
+m=0.5 //Grading co-efficient is equal to (1/2) for abrupt junction and (1/3) for linear graded junction
+phi_o=0.64 //Built-in potential for zero bias in volts(V)
+Cjo=0.5*((10^-15)/(10^-12)) //Capacitance under zero-bias in farads per metre square(F/m^2)
+
+//Outputs
+Keq=-(phi_o^m)*[((phi_o-V_high)^(1-m))-((phi_o-V_low)^(1-m))]/((V_high-V_low)*(1-m))...//Device parameter
+
+Ceq=Keq*Cjo //Average junction capacitance in farads per metre square(F/m^2)
+
+//Results
+mprintf("Keq: %.4f",Keq);
+mprintf("\nAverage junction capacitance at the diode Ceq: %.6f F/m^2",Ceq);
+
+//Outputs
+// Keq: 0.5040
+//Average junction capacitance at the diode Ceq:0.000252 F/m^2 (or) 0.2520 fF/µm^2
+
diff --git a/3905/CH2/EX2.5/Ex2_5.sce b/3905/CH2/EX2.5/Ex2_5.sce new file mode 100644 index 000000000..08f651c61 --- /dev/null +++ b/3905/CH2/EX2.5/Ex2_5.sce @@ -0,0 +1,27 @@ +//Example 2.5, Page Number 31
+//Mean Transit Times
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+//Mean transit times for the diode of problem 2.1
+Wn=5*(10^-6) //Width of N-depletion layer region in micro meters(m)
+W2=0.15*(10^-6) //Small change in width of N-depletion layer region in meters(m)
+Dp1=10*(10^-4) //Diffusion co-efficient in metres square per second(m^2/sec)
+Dp2=25*(10^-4) //Diffusion co-efficient in metres square per second(m^2/sec)
+Wp=0.7*(10^-6) //Width of P-depletion layer region in meters(m)
+W1=0.03*(10^-6) //Small change in width of P-depletion layer region in meters(m)
+
+//Outputs
+tou_tp=(((Wn-W2)^2)/(2*Dp1)) //Mean transit time of P-region in seconds(sec)
+tou_tn=(((Wp-W1)^2)/(2*Dp2)) //Mean transit time of N-region in seconds(sec)
+
+//Results
+mprintf("Transit time for P-region tou_tp: %.11f secs",tou_tp)
+mprintf("\nTransit time for N-region tou_tn: %.11f secs",tou_tn)
+
+//Outputs
+//Transit time for P-region tou_tp: 0.00000001176secs (or) 11.76nsec
+//Transit time for N-region tou_tn: 0.00000000009secs (or) 0.09nsec
+
diff --git a/3905/CH2/EX2.6/Ex2_6.sce b/3905/CH2/EX2.6/Ex2_6.sce new file mode 100644 index 000000000..66d224e0f --- /dev/null +++ b/3905/CH2/EX2.6/Ex2_6.sce @@ -0,0 +1,22 @@ +//Example 2.6, Page Number 32
+//Diffusion Capacitance
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Is=0.5*(10^-16) //Saturation current of diode in amperes(A)
+tou_t=1*(10^-9) //Mean time in seconds(secs)
+Φt=26*(10^-3) //Thermal voltage in volts(V)
+Vd=0.75 //Forward bias diode voltage in volts(V)
+
+//Outputs
+Id=Is*(exp((Vd/Φt))-1) //Diode equation to obtain diode current(Id)in amperes(A)
+Cd=(tou_t*Id)/Φt //Diffusion capacitance in farads(f)
+
+//Results
+mprintf("Diffusion Capacitance Cd: %.13f farads",Cd)
+
+//Output
+//Diffusion Capacitance Cd: 0.0000000000065 farads (or) 6.5 picofarads
+
diff --git a/3905/CH2/EX2.7/Ex2_7.sce b/3905/CH2/EX2.7/Ex2_7.sce new file mode 100644 index 000000000..6e15b599b --- /dev/null +++ b/3905/CH2/EX2.7/Ex2_7.sce @@ -0,0 +1,51 @@ +//Example 2.7, Page Number 35
+//Diode Transient Response
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+R_src=50*(10^3) //Source resistance in ohms(Ω)
+I1=1*(10^-3) //Initial current in amperes(A)
+I2=-0.1*(10^-3) //Final current in amperes(A)
+Is=2*(10^-16) // Saturation current of the diode in amperes(A)
+Cjo=0.2*(10^-12) //Capacitance of junction at zero bias in farads(F)
+tou_t=5*(10^-9) // Mean time in seconds(secs)
+phi_o=0.65 //Built-in potential at zero bias in volts(V)
+phi_t=26*(10^-3) //Thermal voltage in volts(V)
+m=0.5 //Grading co-efficient is equal to (1/2) for abrupt junction and (1/3) for linear graded junction
+Keq=0.51 //Device parameter
+
+//Outputs
+Id=Is*(exp((Vd/phi_t))-1) //Diode equation to obtain diode current(Id)in amperes(A)
+Vd_on=phi_t*log(Id/Is) //Steady state voltage of diode when diode is on in volts(V)
+Vd_off=I2*R_src //Steady state voltage of diode when diode is off in volts(V)
+t1=tou_t*log((I1-I2)/-I2) //Length of various intervals in turn off transients in seconds(secs)
+Cj=Keq*Cjo //Average junction capacitance in farads per metre square(F/m^2)
+tou_90_off=2.2*tou_t //Time to reach 90% of final value(90% transition point[t2-t1]]) in seconds(secs)
+T_off=t1+tou_90_off //Total turn off time in seconds(secs)
+t3=R_src*Cj*log((I1-I2)/I1) //Length of various intervals in turn on transients in seconds(secs)
+tou_90_on=2.2*tou_t //Time to reach 90% of final value(90% transition point[t4-t3]]) in seconds(secs)
+T_on=t3+tou_90_on ////Total turn on time in seconds(secs)
+
+//Results
+mprintf("Steady state voltage when diode is on(Vd_on) is is: %.2f volts",Vd_on)
+mprintf("\nSteady state voltage when diode is off is(Vd_on) is: %.1f volts",Vd_off)
+mprintf("\nTransient time t1 is: %.13f secs",t1)
+mprintf("\nAverage junction capacitance(Cj): %.15f farads",Cj)
+mprintf("\nTransition point at 90 percent of final value(t2-t1): %.10f secs",tou_90_off)
+mprintf("\nTotal turn off time(T_off): %.13f secs",T_off)
+mprintf("\nTransient time t3: %.13f secs",t3)
+mprintf("\nTransition point at 90 percent of final value(t4-t3): %.10f secs",tou_90_on)
+mprintf("\nTotal turn off time(T_on): %.13f secs",T_on)
+
+//Outputs
+// Steady state voltage when diode is on(Vd_on) is is: 0.75 volts
+//Steady state voltage when diode is off is(Vd_on) is: -5.0 volts
+//Transient time t1 is: 0.0000000119895 secs (or) 11.9nsecs
+//Average junction capacitance(Cj): 0.000000000000102 farads (or) 0.102 picofarads
+//Transition point at 90 percent of final value(t2-t1): 0.0000000110 secs (or) 11.0 nsecs
+//Total turn off time(T_off): 0.0000000229895 secs (or) 22.9895 nsecs
+//Transient time t3: 0.0000000004861 secs (or) 0.4861 nsecs
+//Transition point at 90 percent of final value(t4-t3): 0.0000000110 secs (or) 11.0 nsecs
+//Total turn off time(T_on): 0.0000000114861 secs (or) 11.4861 nsecs
diff --git a/3905/CH2/EX2.8/Ex2_8.sce b/3905/CH2/EX2.8/Ex2_8.sce new file mode 100644 index 000000000..1fa9df493 --- /dev/null +++ b/3905/CH2/EX2.8/Ex2_8.sce @@ -0,0 +1,23 @@ +//Example 2.8, Page Number 43
+//Threshold Voltage of an NMOS Transistor
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vto=0.75 //Threshold voltage for zero Substrate bias voltage(V_sb=0) in volts(V)
+tou=0.54 //Body-effect coefficient(Gamma)
+V_sb=5 //Substrate bias voltage in volts(V)
+Vb=0.6 //Voltage drop across depletion region at inversion(Vb=-2*Φf) in volts(V)
+
+//Outputs
+Vt=Vto+(tou*(sqrt((Vb)+V_sb)-sqrt(Vb))) //Threshold voltage at high level in volts(V)
+
+//Results
+mprintf("Threshold voltage Vt: %.12f volts",Vt)
+//The obtained threshold voltage is more than twice the threshold under zero bias conditions.
+
+//Output
+// Threshold voltage Vt: 1.609591031759 volts
+
+
diff --git a/3905/CH2/EX2.9/Ex2_9.sce b/3905/CH2/EX2.9/Ex2_9.sce new file mode 100644 index 000000000..0a81ec081 --- /dev/null +++ b/3905/CH2/EX2.9/Ex2_9.sce @@ -0,0 +1,43 @@ +//Example 2.9, Page Number 50
+//MOS Transistor Capacitances
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+t_ox=20*(10^-9) //Thickness of oxide layer in metres(m)
+epsilon_ox=3.5*(10^-11) //Electrical permitivity of oxide layer in farad per metre(F/m)
+L=1.2*(10^-6) //Length of the channel in metres(m)
+W=1.8*(10^-6) //Width of the channel in metres(m)
+Ls=3.6*(10^-6) //Lenght of side wall of source junction in metres(m)
+Ld=3.6*(10^-6) //Lenght of diffusion wall of source junction in metres(m)
+xd=0.15*(10^-6) //Lateral diffusion in metres(m)
+Cjo=3*(10^-4) //Capacitance under zero-bias in farads per metre square(F/m^2)
+C_jswo=8*(10^-10) //Side wall capacitance under zero-bias in farads per metre (F/m)
+
+//Outputs
+Cox=(epsilon_ox/t_ox) //Gate capacitance per unit area in farads per metre square(F/m^2)
+Cg=W*L*Cox //Total gate capacitance in farads(F)
+C_gso=W*xd*Cox //Overlap capacitance in farads(F)
+C_channel=Cg-(2*C_gso) //Channel capacitance which splits between source,drain,bulk terminals in farads(F)
+Cd_bottom=Cjo*Ld*W //Diffusion capacitance of bottom wall in farad(F)
+Cd_side=C_jswo*(2*Ld+W) //Diffusion capacitance of side wall in fard(F)
+
+
+//Results
+mprintf("\nGate capacitance per unit area Cox: %.5f farad/metre^2",Cox)
+mprintf("\nTotal gate capacitance Cg: %.20f farad",Cg)
+mprintf("\nOverlap capacitance C_gso: %.20f farad",C_gso)
+mprintf("\nChannel capacitance C_channel: %.20f farad",C_channel)
+mprintf("\nDiffusion capacitance of bottom wall Cd_bottom: %.20f farad",Cd_bottom)
+mprintf("\nDiffusion capacitance of side wall Cd_side: %.20f farad",Cd_side)
+
+//The diffusion capacitance seems to dominate gate capacitance.Advanced processes are reduce the diffusion capacitance by using materials such as SiO2 to isolate devices.This approach is called Trench Isolation
+
+//Outputs
+//Gate capacitance per unit area Gox: 0.00175 farad/metre^2 (or) 1.75 fF/µm^2
+//Total gate capacitance Cg: 0.00000000000000378000 farad (or) 3.78000 fF
+//Overlap capacitance C_gso: 0.00000000000000047250 farad (or) 0.47250 fF
+//Channel capacitance C_channel: 0.00000000000000283500 farad (or) 2.83500 fF
+//Diffusion capacitance of bottom wall Cd_bottom: 0.00000000000000194400 farad (or) 1.94400 fF
+//Diffusion capacitance of side wall Cd_side: 0.00000000000000720000 farad (or) 7.20000 fF
diff --git a/3905/CH3/EX3.11/Ex3_11.sce b/3905/CH3/EX3.11/Ex3_11.sce new file mode 100644 index 000000000..01610fa7f --- /dev/null +++ b/3905/CH3/EX3.11/Ex3_11.sce @@ -0,0 +1,36 @@ +//Example 3.11, Page Number 151
+//VTC of an RTL Inverter
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vcc=5 //Supply voltage in volts(V)
+Rc=1*(10^3) //Collector resistance in ohms(Ω)
+Rb=10*(10^3) //Base resistance in ohms(Ω)
+Re=20 //Emitter resistance in ohms(Ω)
+Rc1=75 //Series collector resistance in ohms(Ω)
+Vce_sat=0.1 //Collector-Emmiter saturation voltage in volts(V)
+Vbe_eos=0.8 //Base-Emmiter voltage in volts(V)
+beta_f=100 //Maximum forward current gain
+//The major discrepancy is the value to V_ol due to which dc problems occur and to have a reasonable V_ol value Vin_eos>Vcc is maintained to reduce the gain in transient region
+Vcc1=0.38 //Supply voltgage in volts(V)
+
+//Outputs
+Ib=((Vcc-Vce_sat)/(Rc*beta_f)) //Base current in amperes(A)
+Vin_eos=Vbe_eos+(Ib*Rb) //Input voltage at eos in volts(V)
+//In the saturation mode,the collector current Ic:
+Ic=Vcc1/Rc1 //Collector current in amperes(A)
+Vce_extra=Ic*(Rc1+Re) //Extra voltage drop caused over collector-emitter terminals in volts(V)
+
+//Results
+mprintf("\nBase Current Ib: %.7f amperes",Ib);
+mprintf("\nInput Voltage at eos Vin_eos: %.5f volts",Vin_eos);
+mprintf("\nCollector Current Ic: %.4f amperes",Ic);
+mprintf("\nExtra voltage drop caused over collector-emitter terminals: %.2f volts",Vce_extra);
+
+//Outputs
+//Base Current Ib: 0.0000490 amperes (or) 49.0µA
+//Input Voltage at eos Vin_eos: 1.29000 volts
+//Collector Current Ic: 0.0051 amperes (or) 5.1mA
+//Extra voltage drop caused over collector-emitter terminals: 0.48 volts
diff --git a/3905/CH3/EX3.12/Ex3_12.sce b/3905/CH3/EX3.12/Ex3_12.sce new file mode 100644 index 000000000..686da4237 --- /dev/null +++ b/3905/CH3/EX3.12/Ex3_12.sce @@ -0,0 +1,27 @@ +//Example 3.12, Page Number 153
+//Effect of Fanout on VTC of the RTL Inverter
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vcc=5 //Supply voltage in volts(V)
+Rc=1*(10^3) //Collector resistance in ohms(Ω)
+Rb=10*(10^3) //Base resistance in ohms(Ω)
+//Re=20 //Emitter resistance in ohms(Ω)
+//Rc1=75 //Series collector resistance in ohms(Ω)
+Vbe_sat=0.8 //Base-Emmiter saturation voltage in volts(V)
+//Vcc1=0.38 //Supply voltgage in volts(V)
+N=5 //Number of fanouts
+
+//Outputs
+Vout=(Vcc+(N*(Rc/Rb)*Vbe_sat))/(1+(N*(Rc/Rb))) //Output voltage in volts(V)
+//For large values for N,Vout eventually approaches Vbe_sat=0.8V which means that the NM_H is reduced to zero(or is even negative)
+
+//Results
+mprintf("\nOutput Voltage Vout: %.2f volts",Vout);
+
+
+//Outputs
+//Output Voltage Vout: 3.60 volts
+
diff --git a/3905/CH3/EX3.14/Ex3_14.sce b/3905/CH3/EX3.14/Ex3_14.sce new file mode 100644 index 000000000..873c09426 --- /dev/null +++ b/3905/CH3/EX3.14/Ex3_14.sce @@ -0,0 +1,43 @@ +//Example 3.14, Page Number 163
+//VTC of ECL Gate
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vcc=0 //Supply voltage in volts(V)
+Vee=-5 //Supply voltage in volts(V)
+Vref=-0.95 //Reference voltage in volts(V)
+Iee=0.5*(10^-3) //Coupled emmiter current in amperes(A)
+Rc=1*(10^3) //Collector resistance in ohms(Ω)
+Rb=50*(10^3) //Base resistance in ohms(Ω)
+Is=10^-17 //Transport saturation current in amperes(A)
+Ic=0.1*(10^-3) //Collector current in amperes(A)
+beta_f=100 //Maximun forward current gain
+phi_t=26*(10^-3) //Thermal voltage in volts(A)
+Vswing=Iee*Rc //Transition voltage swing in volts(V)
+
+//Outputs
+Vbe_on=phi_t*log(Ic/Is) //Base-Emitter voltage in volts(V)
+V_oh=Vcc-Vbe_on //Output high level transition voltage in volts(V)
+V_ol=Vcc-Vbe_on-(Vswing) //Output low level transition voltage in volts(V)
+V_ih=Vref+(phi_t*log(((Vswing)/(2*phi_t))-1)) //Input high level transition voltage in volts(V)
+V_il=Vref-(phi_t*log(((Vswing)/(2*phi_t))-1)) //Input low level transition voltage in volts(V)
+Vm=Vref //Inverter threshold in volts(V)
+
+//Results
+mprintf("\nBase Emmiter voltage in volts Vbe_on : %.2f volts",Vbe_on);
+mprintf("\nVbe_oh: %.2f volts",V_oh);
+mprintf("\nVbe_ol: %.2f volts",V_ol);
+mprintf("\nVbe_ih: %.2f volts",V_ih);
+mprintf("\nVbe_il: %.2f volts",V_il);
+mprintf("\nInverter threshold Vm: %.2f volts",Vm);
+
+//Outputs
+//Base Emmiter voltage in volts Vbe_on : 0.77 volts
+//Vbe_oh: -0.77 volts
+//Vbe_ol: -1.27 volts
+//Vbe_ih: -0.89 volts
+//Vbe_il: -1.00 volts
+//Inverter threshold Vm: -0.94 volts
+
diff --git a/3905/CH3/EX3.15/Ex3_15.sce b/3905/CH3/EX3.15/Ex3_15.sce new file mode 100644 index 000000000..53c41b6be --- /dev/null +++ b/3905/CH3/EX3.15/Ex3_15.sce @@ -0,0 +1,35 @@ +//Example 3.15, Page Number 169
+//Switching the Differential Pair
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+rc=75 //Transient collector resistance in ohms(Ω)
+rb=120 //Transient base resistance in ohms(Ω)
+re=20 //Transient emitter resistance in ohms(Ω)
+Rc=1*(10^3) //Collector resistance in ohms(Ω)
+C_be1=20*(10^-15) //Base-Emitter junction capacitance in farads(F)
+C_bc1=22*(10^-15) //Base-collector junction capacitance in farads(F)
+C_cs1=47*(10^-15) //Collector-Source junction capacitance in farads(F)
+Iee=0.5*(10^-3) //Coupled emmiter current in amperes(A)
+tou_f=10*(10^-12) //Ideal forward transit time in secs
+Keq_be=3.35
+Keq_bc=0.75
+alpha=5 //Empirical factor
+//Empirical factor(α) is 2 and 5 for the 50% and 90% points respectively
+
+//Outputs
+Cd1=(tou_f/Rc) //Diffusion capacitance in farads(F)
+Cin_j=(Keq_bc*C_bc1)+((Keq_be*C_be1)/2) //Equivalent input capacitance
+tdp=rb*((2.2*Cin_j)+(alpha*Cd1)) //Propogation delay for collector current to reach 90% of their value in seconds(secs)
+
+//Results
+mprintf("\nDiffusion capacitance at base during single transition Cd1 : %.16f farads",Cd1);
+mprintf("\nEquivalent input capacitance Cin_j : %.16f farads",Cin_j);
+mprintf("\nPropogation delay for collector current to reach ninty percent point tdp : %.13f seconds",tdp);
+
+//Outputs
+//Diffusion capacitance at base during single transition Cd1 : 0.0000000000000100 farads (or) 10.0fF
+//Equivalent input capacitance Cin_j : 0.0000000000000500 farads (or) 50.0fF
+//Propogation delay for collector current to reach ninty percent point tdp : 0.0000000000192 seconds (or) 19.2 picosecs
diff --git a/3905/CH3/EX3.16/Ex3_16.sce b/3905/CH3/EX3.16/Ex3_16.sce new file mode 100644 index 000000000..8bacf37df --- /dev/null +++ b/3905/CH3/EX3.16/Ex3_16.sce @@ -0,0 +1,20 @@ +//Example 3.16, Page Number 170
+//Load Capacitances of an ECL Gate
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Cd3=0.2*(10^-15) //Diffusion capacitance for high base resistance(Rb)in farads(F)
+C_bc3=0.91*(10^-15) //Base-Emitter junction capacitance in farads(F)
+C_bc1=0.84*(10^-15) //Base-collector junction capacitance in farads(F)
+C_cs3=0.51*(10^-15) //Collector-Source junction capacitance in farads(F)
+
+//Outputs
+Cc=(C_cs3*47)+(C_bc1*22)+(C_bc3*22)+Cd3 //Collector capacitance in farads(F)
+
+//Results
+mprintf("\nCollector capacitance Cc : %.16f farads",Cc);
+
+//Output
+//Collector capacitance Cc : 0.0000000000000627 farads (or) 62.7 fF
diff --git a/3905/CH3/EX3.17/Ex3_17.sce b/3905/CH3/EX3.17/Ex3_17.sce new file mode 100644 index 000000000..203a9bebd --- /dev/null +++ b/3905/CH3/EX3.17/Ex3_17.sce @@ -0,0 +1,37 @@ +//Example 3.17, Page Number 173
+//ECL Transient Response
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vcc=0 //Supply voltage in volts(V)
+Vee=-5 //Supply voltage in volts(V)
+Rc=1*(10^3) //Collector resistance in ohms(Ω)
+Rb=50*(10^3) //Base resistance in ohms(Ω)
+tdp=20*(10^-12) //Propogation delay in seconds(secs)
+Iee=0.5*(10^-3) //Coupled emmiter current in amperes(A)
+Vswing=Iee*Rc //Transition voltage swing in volts(V)
+Cl=60*(10^-15) //Load capacitance farads(F)
+Cc=62.7*(10^-15) //Collector capacitance in farads(F)
+V_oh=-0.7 //Output high level transition voltage in volts(V)
+
+//Outputs
+t_discharge=(0.5*Cl*Rb*Vswing)/(V_oh-Vee-(Vswing/4)) //Discharge time
+tp_hl=tdp+t_discharge //Delay for high to low transition in seconds(secs)
+t_charge=0.69*Rc*Cc //Charge time in seconds(secs)
+tp_lh=tdp+t_charge //Delay for low to high transition in seconds(secs)
+tp=(tp_hl+tp_lh)/2 // Propogation delay in seconds(secs)
+//Results
+mprintf("\nDischarge time t_discharge : %.13f seconds",t_discharge);
+mprintf("\nDelay for high to low transition tp_hl: %.13f seconds",tp_hl);
+mprintf("\nCharge time t_charge: %.13f seconds",t_charge);
+mprintf("\nDelay for low to high transition tp_lh: %.13f seconds",tp_lh);
+mprintf("\nPropogation delay tp: %.13f seconds",tp);
+
+//Outputs
+//Discharge time t_discharge : 0.0000000001796 seconds (or) 179.6 picosecs
+//Delay for high to low transition tp_hl: 0.0000000001996 seconds (or) 199.6 picosecs
+//Charge time t_charge: 0.0000000000433 seconds (or) 43.3 picosecs
+//Delay for low to high transition tp_lh: 0.0000000000633 seconds (or) 63.3 picosecs
+//Propogation delay tp: 0.0000000001315 seconds (or) 131.5 picosecs
diff --git a/3905/CH3/EX3.18/Ex3_18.sce b/3905/CH3/EX3.18/Ex3_18.sce new file mode 100644 index 000000000..ce5f36148 --- /dev/null +++ b/3905/CH3/EX3.18/Ex3_18.sce @@ -0,0 +1,42 @@ +//Example 3.18, Page Number 177
+//Power Dissipation of ECL Inverter
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vcc=0 //Supply voltage in volts(V)
+Vee=-5 //Supply voltage in volts(V)
+Vref=-0.95 //Reference voltage in volts(V)
+Iee=0.5*(10^-3) //Coupled emitter current in amperes(A)
+Rc=1*(10^3) //Collector resistance in ohms(Ω)
+Rb=50*(10^3) //Base resistance in ohms(Ω)
+Is=10^-17 //Transport saturation current in amperes(A)
+Ic=0.1*(10^-3) //Collector current in amperes(A)
+beta_f=100 //Maximum forward current gain
+phi_t=26*(10^-3) //Thermal voltage in volts(A)
+Vswing=Iee*Rc //Transition voltage swing in volts(V)
+Cl=60*(10^-15) //Load capacitance in farads(F)
+Cc=72.8*(10^-15) //Collector capacitance in farads(F)
+Ct=Cl+Cc //Total switching capacitance in farads(F)
+tp=127.5*(10^-12) //Propogation delay in seconds(secs)
+
+//Outputs
+Vbe_on=phi_t*log(Ic/Is) //Base-Emitter voltage in volts(V)
+V_oh=Vcc-Vbe_on //Output high level transition voltage in volts(V)
+V_ol=Vcc-Vbe_on-(Vswing) //Output low level transition voltage in volts(V)
+f=(1/tp) //Maximum allowable switching frequency in hertz(Hz)
+//Ignoring the power consumed in bias network
+Pstat=(Vcc-Vee)*(Iee+(2*((((V_oh+V_ol)/2)-Vee)/Rb))) //Static power consumption in watts(W)
+Pdyn=Ct*(Vcc-Vee)*Vswing*f //Dyanamic power consumption in watts(W)
+Pt=Pstat+Pdyn //Total power consumption in watts(W)
+
+//Results
+mprintf("\nStatic power consumption Pstat : %.4f watts",Pstat);
+mprintf("\nDynamic power consumption Pdyn : %.4f watts",Pdyn);
+mprintf("\nTotal power consumption Pt : %.4f watts",Pt);
+
+//Outputs
+//Static power consumption Pstat : 0.0033 watts (or) 3.3 mW
+//Dynamic power consumption Pdyn : 0.0026 watts (or) 2.6 mW
+//Total power consumption Pt : 0.0059 watts (or) 5.9 mW
diff --git a/3905/CH3/EX3.4/Ex3_4.sce b/3905/CH3/EX3.4/Ex3_4.sce new file mode 100644 index 000000000..fbe8fc0e2 --- /dev/null +++ b/3905/CH3/EX3.4/Ex3_4.sce @@ -0,0 +1,47 @@ +//Example 3.4, Page Number 127
+//VTC of a CMOS Inverter
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Kn=80*(10^-6) //Transistor parameters in A/V^2
+Kp=27*(10^-6) //Transistor parameter in A/V^2
+Vdd=5 //Supply voltage in volts(V)
+W_to_L_PMOS=5.4/1.2 //(W/L) ratio of PMOS transistor
+W_to_L_NMOS=1.8/1.2 //(W/L) ratio of NMOS transistor
+//DC Parameters:
+V_ol=0 //Output lowel level transition voltage in volts(V)
+V_oh=5 //Output high level transition voltage in volts(V)
+Vtn=0.74 //Threshold voltage of NMOS in volts(V)
+Vtp=-0.74 //Threshold voltage of PMOS in volts(V)
+
+//Outputs
+//To obtain Vih,the following equations have to be solved:
+//Kn*[(V_ih-Vtn)*Vout-(((Vout)^2)/2)]=(Kp/2)*[Vdd-V_ih-|Vtp|]^2 which yeilds:
+V_ih=2.92 //Input high level transition voltage in volts(V)
+Vout=0.42 //Output voltage in volts(V)
+NM_H=V_oh-V_ih //Noise margin for logic high in volts(V)
+//Similary,for V_il
+V_il=2.06 //Input low level transition voltage in volts(V)
+NM_L=V_il-V_ol //Noise margin for logic low in volts(V)
+//Given that r=1.01 where r=(sqrt(Kp´/Kn´))
+r=1.01
+Vm=((r*(Vdd-abs(Vtp))+Vtn)/(1+r)) //Inverter threshold in volts(V)
+
+//Results
+mprintf("\nInput high level transition voltage V_ih: %.2f volts",V_ih);
+mprintf("\nOutput voltage Vout: %.2f volts",Vout);
+mprintf("\nNoise margin for logic high NM_H: %.2f volts",NM_H);
+mprintf("\nInput low level transition voltage V_il: %.2f volts",V_il);
+mprintf("\nNoise margin for logic low NM_L: %.2f volts",NM_L);
+mprintf("\nInverter threshold Vm: %.2f volts",Vm);
+
+//Outputs
+//Input high level transition voltage V_ih: 2.92 volts
+//Output voltage Vout: 0.42 volts
+//Noise margin for logic high NM_H: 2.08 volts
+//Input low level transition voltage V_il: 2.06 volts
+//Noise margin for logic low NM_L: 2.06 volts
+//Inverter threshold Vm: 2.51 volts
+
diff --git a/3905/CH3/EX3.5/Ex3_5.sce b/3905/CH3/EX3.5/Ex3_5.sce new file mode 100644 index 000000000..2eb893403 --- /dev/null +++ b/3905/CH3/EX3.5/Ex3_5.sce @@ -0,0 +1,39 @@ +//Example 3.5, Page Number 130
+//Keq for a 5V CMOS Inverter
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+m=0.5 //Grading co-efficient is equal to (1/2) for abrupt junction and (1/3) for linear graded junction
+phi_o=0.6 //Built in potential in volts(V)
+Vcc=5 //Supply in volts(V)
+V_high_NMOS_HL=-5 //High level transition voltage for NMOS during high to low transition in volts(V)
+V_low_NMOS_HL=-2.5 //Low level transition voltage for NMOS during high to low transition in volts(V)
+V_high_PMOS_HL=-2.5 //High level transition voltage for NMOS during high to low transition in volts(V)
+V_low_PMOS_HL=0 //Low level transition voltage for NMOS during high to low transition in volts(V)
+
+V_high_NMOS_LH=0 //High level transition voltage for NMOS during low to high transition in volts(V)
+V_low_NMOS_LH=-2.5 //Low level transition voltage for NMOS during low to high transition in volts(V)
+V_high_PMOS_LH=-5 //High level transition voltage for NMOS during low to high transition in volts(V)
+V_low_PMOS_LH=-2.5 //Low level transition voltage for NMOS during low to high transition in volts(V)
+
+//Outputs
+Keq_NMOS_HL=-(phi_o^m)*[((phi_o-V_high_NMOS_HL)^(1-m))-((phi_o-V_low_NMOS_HL)^(1-m))]/((V_high_NMOS_HL-V_low_NMOS_HL)*(1-m)) //Device parameter for NMOS
+Keq_PMOS_HL=-(phi_o^m)*[((phi_o-V_high_PMOS_HL)^(1-m))-((phi_o-V_low_PMOS_HL)^(1-m))]/((V_high_PMOS_HL-V_low_PMOS_HL)*(1-m)) //Device parameter for PMOS
+
+Keq_NMOS_LH=-(phi_o^m)*[((phi_o-V_high_NMOS_LH)^(1-m))-((phi_o-V_low_NMOS_LH)^(1-m))]/((V_high_NMOS_LH-V_low_NMOS_LH)*(1-m)) //Device parameter for NMOS
+Keq_PMOS_LH=-(phi_o^m)*[((phi_o-V_high_PMOS_LH)^(1-m))-((phi_o-V_low_PMOS_LH)^(1-m))]/((V_high_PMOS_LH-V_low_PMOS_LH)*(1-m)) //Device parameter for PMOS
+
+
+//Results
+mprintf("\nKeq_be_NMOS_HL: %.20f",Keq_NMOS_HL);
+mprintf("\nKeq_be_PMOS_HL: %.20f",Keq_PMOS_HL);
+mprintf("\nKeq_be_NMOS_LH: %.20f",Keq_NMOS_LH);
+mprintf("\nKeq_be_PMOS_LH: %.20f",Keq_PMOS_LH);
+
+//Outputs
+//Keq_be_NMOS_HL: 0.37536968662700032000
+//Keq_be_PMOS_HL: 0.61105453575886848000
+//Keq_be_NMOS_LH: 0.61105453575886848000
+//Keq_be_PMOS_LH: 0.37536968662700032000
diff --git a/3905/CH3/EX3.6/Ex3_6.sce b/3905/CH3/EX3.6/Ex3_6.sce new file mode 100644 index 000000000..a591c7aba --- /dev/null +++ b/3905/CH3/EX3.6/Ex3_6.sce @@ -0,0 +1,43 @@ +//Example 3.6, Page Number 131
+//Capacitance of a 1.2µm CMOS Inverter
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+//Considering a minimum size symmetrical CMOS inverter with its parameters.
+Vdd=5 //Supply voltage in volts(V)
+lamda=0.6*(10^-6) //Channel modulation in metres(m)
+
+//Outputs
+drain_area_NMOS=4*4*(lamda^2) //Drain area formed by metal-diffusion contact of NMOS in metre square(m^2)
+rect_contact_gate_NMOS=3*(lamda^2) //Rectangle area between contact and gate of NMOS in metre square(m^2)
+total_area_NMOS=drain_area_NMOS+rect_contact_gate_NMOS //Total area of layers of NMOS in metre square(m^2)
+perimeter_drain_NMOS=15*lamda //Perimeter of drain in NMOS in metres(m)
+sidewall_area_NMOS=19*(lamda^2) //sidewall area formed by metal-diffusion contact of NMOS in metre square(m^2)
+perimeter_sidewall_NMOS=15*lamda //Perimeter of sidewall in NMOS in metres(m)
+total_area_PMOS=45*(lamda^2) //Total area of layers of PMOS in metre square(m^2)
+perimeter_drain_PMOS=19*lamda //Perimeter of drain in PMOS in metres(m)
+sidewall_area_PMOS=45*(lamda^2) //sidewall area formed by metal-diffusion contact of PMOS in metre square(m^2)
+perimeter_sidewall_PMOS=19*lamda //Perimeter of sidewall in PMOS in metres(m)
+
+//Results
+mprintf("\nTotal area of layers of NMOS : %.14f (metres^2)",total_area_NMOS);
+mprintf("\nPerimeter of drain in NMOS: %.7f metres",perimeter_drain_NMOS);
+mprintf("\nsidewall area formed by metal-diffusion contact of NMOS sidewall_area_NMOS: %.14f metres",sidewall_area_NMOS);
+mprintf("\nPerimeter of sidewall in NMOS perimeter_sidewall_NMOS: %.7f metres",perimeter_sidewall_NMOS);
+mprintf("\nTotal area of layers of PMOS total_area_PMOS: %.14f (metres^2)",total_area_PMOS);
+mprintf("\nPerimeter of drain in PMOS perimeter_drain_PMOS: %.7f metres",perimeter_drain_PMOS);
+mprintf("\nsidewall area formed by metal-diffusion contact of PMOS sidewall_area_PMOS: %.14f (metres^2)",sidewall_area_PMOS);
+mprintf("\nPerimeter of sidewall in PMOS perimeter_sidewall_PMOS: %.7f metres",perimeter_sidewall_PMOS);
+
+
+//Outputs
+//Total area of layers of NMOS total_area_NMOS : 0.00000000000684 (metres^2) *(or) 6.84µm^2
+//Perimeter of drain in NMOS perimeter_drain_NMOS: 0.0000090 metres (or) 9.00µm
+//sidewall area formed by metal-diffusion contact of NMOS: 0.00000000000684 metres (or) 6.84µm^2
+//Perimeter of sidewall in NMOS perimeter_sidewall_NMOS: 0.0000090 metres (or) 9.0µm
+//Total area of layers of PMOS total_area_PMOS: 0.00000000001620 (metres^2) (or) 16.20µm^2
+//Perimeter of drain in PMOS perimeter_drain_PMOS: 0.0000114 metres (or) 11.40µm
+//sidewall area formed by metal-diffusion contact of PMOS sidewall_area_PMOS: 0.00000000001620 (metres^2) (or) 16.20µm^2
+//Perimeter of sidewall in PMOS perimeter_sidewall_PMOS: 0.0000114 metres (or) 11.40µm
diff --git a/3905/CH3/EX3.7/Ex3_7.sce b/3905/CH3/EX3.7/Ex3_7.sce new file mode 100644 index 000000000..8ee3c51b0 --- /dev/null +++ b/3905/CH3/EX3.7/Ex3_7.sce @@ -0,0 +1,36 @@ +//Example 3.7, Page Number 135
+//Propogation Delay of a 1.2µm CMOS Inverter
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vgs=5 // Gate source voltage in volts(V)
+Vds=5 //Drain source voltage in volts(V)
+Vdd=5 //Supply voltage in volts(V)
+Wp=5.4*(10^-6) //PMOS Channel width in metres(m)
+Wn=1.8*(10^-6) //NMOS Channel width in metres(m)
+L_eff=0.9*(10^-6) //Effective channel length in metres(m)
+Kn=19.6*(10^-6) //in A/V^2
+Kp=5.4*(10^-6) //in A/V^2
+lamda_p=0.19 //Channel modulation of PMOS in voltage inverse(V^-1)
+lamda_n=0.06 //Channel modulation of NMOS in voltage inverse(V^-1)
+Vt0=0.74 //Threshold voltage in volts(V)
+
+//Outputs
+Idp_Vout_zero=(Kp/2)*(Wp/L_eff)*((Vgs-Vt0)^2)*(1+(lamda_p*Vds)) //Current through PMOS in amperes(A) when output voltage is zero
+Idp_Vout=Kp*(Wp/L_eff)*((Vgs-Vt0)*(Vdd/2)-((Vdd)^2)/8) //Current through PMOS in amperes(A) when output voltage is not zero
+Idn_Vout_zero=(Kn/2)*(Wn/L_eff)*((Vgs-Vt0)^2)*(1+(lamda_n*Vds)) //Current through NMOS in amperes(A) when output voltage is zero
+Idn_Vout=Kn*(Wn/L_eff)*((Vgs-Vt0)*(Vdd/2)-((Vdd)^2)/8) //Current through NMOS in amperes(A) when output voltage is zero
+
+//Results
+mprintf("\nCurrent through PMOS Idp(Vout=0): %.6f amperes",Idp_Vout_zero);
+mprintf("\nCurrent through PMOS Idp(Vout=2.5): %.6f amperes",Idp_Vout);
+mprintf("\nCurrent through NMOS Idn(Vout=0): %.6f amperes",Idn_Vout_zero);
+mprintf("\nCurrent through NMOS Idn(Vout=2.5): %.6f amperes",Idn_Vout);
+
+//Outputs
+//Current through PMOS Idp(Vout=0): 0.000573 amperes (or) 0.573mA
+//Current through PMOS Idp(Vout=2.5): 0.000244 amperes (or) 0.244mA
+//Current through NMOS Idn(Vout=0): 0.000462 amperes (or) 0.46.2mA
+//Current through NMOS Idn(Vout=2.5): 0.000295 amperes (or) 0.295mA
diff --git a/3905/CH4/EX4.12/Ex4_12.sce b/3905/CH4/EX4.12/Ex4_12.sce new file mode 100644 index 000000000..31077c8c6 --- /dev/null +++ b/3905/CH4/EX4.12/Ex4_12.sce @@ -0,0 +1,22 @@ +//Example 4.12, Page Number 229
+//Charge Redistribution
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vdd=-5 //Supply voltage in volts(V)
+//When top three transistors of the PDN are enabled and the internal capacitance hold diffusion and gate capacitance of neighbouring transistors.
+C_internal=8.78*(10^-15) //Internal capacitane in farads(F)
+Cl=25*(10^-15) //Load capacitane in farads(F)
+
+//Outputs
+delta_V=-Vdd*(C_internal/(C_internal+Cl)) //Total output voltage drop in volts(V)
+
+//Results
+mprintf("\nTotal output voltage drop delta_V: %.2f volts",delta_V);
+
+//Outputs
+//Total output voltage drop delta_V: 1.30 volts
+
+
diff --git a/3905/CH4/EX4.18/Ex4_18.sce b/3905/CH4/EX4.18/Ex4_18.sce new file mode 100644 index 000000000..ba3dd0208 --- /dev/null +++ b/3905/CH4/EX4.18/Ex4_18.sce @@ -0,0 +1,26 @@ +//Example 4.18, Page Number 251
+//Optimizing Switching Activity at the Logic Level
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+P_A=0.5 //Transition probability of input signal '(A=1)'
+P_B=0.2 //Transition probability of input signal '(B=1)'
+P_C=0.1 //Transition probability of input signal '(C=1)'
+
+//Outputs
+//As both the circuits implememt identical logic functionality, the output node 'Z' is equal in both the cases.So, difference in activity occurs at intermediate nodes:
+Activity_first=(1-(P_A*P_B))*(P_A*P_B) //Switching activity of first circuit
+Activity_second=(1-(P_B*P_C))*(P_B*P_C) //Switching activity of second circuit
+
+//Results
+mprintf("\nSwitching activity of first circuit : %.2f",Activity_first);
+mprintf("\nSwitching activity of second circuit : %.4f",Activity_second)
+
+//From the results we get to learn that it is benificial to postpone the introduction of signals with higher transition rate(i.e signals with signal probability close to )
+
+//Outputs
+//Switching activity of first circuit : 0.09
+//Switching activity of second circuit : 0.0196
+
diff --git a/3905/CH4/EX4.2/Ex4_2.sce b/3905/CH4/EX4.2/Ex4_2.sce new file mode 100644 index 000000000..9f98aaefb --- /dev/null +++ b/3905/CH4/EX4.2/Ex4_2.sce @@ -0,0 +1,32 @@ +//Example 4.2, Page Number 194
+//Computing Ron
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vdd=5 //Supply voltage in volts(V)
+//Values from table 3.3, Pg no:136
+Id_n1=0.46*(10^-3) //Drain current in NMOS when (Vout=Vdd) in amperes(A)
+Id_n2=0.29*(10^-3) //Drain current in NMOS when (Vout=Vdd/2) in amperes(A)
+Id_p1=0.57*(10^-3) //Drain current in PMOS when (Vout=Vdd) in amperes(A)
+Id_p2=0.24*(10^-3) //Drain current in PMOS when (Vout=Vdd) in amperes(A)
+
+//Outputs
+Rn1=(1/2)*((Vdd/Id_n1)+(Vdd/(2*Id_n2))) //Resistance when (W/Leff =2) in ohms(Ω)
+Rn2=Rn1*2 //Resistance when (W/Leff =1) in ohms(Ω)
+Rp1=(1/2)*((Vdd/Id_p1)+(Vdd/(2*Id_p2))) //Resistance when (W/Leff =6) in ohms(Ω)
+Rp2=Rp1*6 //Resistance when (W/Leff =1) in ohms(Ω)
+
+
+//Results
+mprintf("\nResistance when (W/Leff =2) Rn1 : %.1f ohms",Rn1);
+mprintf("\nResistance when (W/Leff =1) Rn2 : %.1f ohms",Rn2);
+mprintf("\nResistance when (W/Leff =6) Rp1 : %.1f ohms",Rp1);
+mprintf("\nResistance when (W/Leff =1) Rp1 : %.1f ohms",Rp2);
+
+//Outputs
+//Resistance when (W/Leff =2) Rn1 : 9745.1 ohms (or) 9.7451 kΩ
+//Resistance when (W/Leff =1) Rn2 : 19490.2 ohms(or) 19.4902 kΩ
+//Resistance when (W/Leff =6) Rp1 : 9594.2 ohms (or) 9.5942 kΩ
+//Resistance when (W/Leff =1) Rp1 : 57565.7 ohms (or) 57.5657 kΩ
diff --git a/3905/CH4/EX4.3/Ex4_3.sce b/3905/CH4/EX4.3/Ex4_3.sce new file mode 100644 index 000000000..93745e5e5 --- /dev/null +++ b/3905/CH4/EX4.3/Ex4_3.sce @@ -0,0 +1,30 @@ +//Example 4.3, Page Number 200
+//A Four-Input Complimentary CMOS NAND Gate
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+//Parameter Values for 1.2µm CMOS process
+lamda_NMOS=0.06 //Channel modulation in volt inverse(1/V)
+lamda_PMOS=0.19 //Channel modulation in volt inverse(1/V)
+
+//Outputs
+Area_PMOS=108*(lamda_PMOS^2) //Area of PMOS in micro metre square(µm^2)
+Perimeter_PMOS=24*lamda_PMOS //Perimeter of PMOS in micro metre(µm)
+Area_NMOS=37*(lamda_NMOS^2) //Area of NMOS in micro metre square(µm^2)
+Perimeter_NMOS=27*lamda_NMOS //Perimeter of NMOS in micro metre(µm)
+
+//Results
+mprintf("\nArea of PMOS: %.2f µm^2",Area_PMOS);
+mprintf("\nPerimeter_PMOS: %.2f µm",Perimeter_PMOS);
+mprintf("\nArea of NMOS: %.2f µm^2",Area_NMOS);
+mprintf("\nPerimeter_NMOS: %.2f µm",Perimeter_NMOS);
+
+
+//Outputs
+//Area of PMOS: 3.90 µm^2
+//Perimeter_PMOS: 4.56 µm
+//Area of NMOS: 0.13 µm^2
+//Perimeter_NMOS: 1.62 µm
+
diff --git a/3905/CH4/EX4.7/Ex4_7.sce b/3905/CH4/EX4.7/Ex4_7.sce new file mode 100644 index 000000000..54a54c9ed --- /dev/null +++ b/3905/CH4/EX4.7/Ex4_7.sce @@ -0,0 +1,34 @@ +//Example 4.7, Page Number 214
+//Resistance of a Transmission Gate
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+//Parameter Values for 1.2µm CMOS process
+Vdd=5 //Supply voltage in volts(V)
+Kn=19.6*(10^-6) //in ampere per volt square(A/V^2)
+Kp=5.4*(10^-6) //in ampere per volt square(A/V^2)
+Vtn=0.743 //Threshold voltage of NMOS in volts(V)
+Vtp1=-0.739 //Threshold voltage of PMOS in volts(V)
+Vtp=abs(Vtp1)
+
+//Outputs
+Geq=((Kn*((Vdd-Vtn)^2))+(Kp*((Vdd-Vtp)^2)))/(2*Vdd) //Equivalent conductance in mho
+Req=1/Geq //Equivalent resistance in ohms(Ω)
+
+//Results
+mprintf("\nEquivalent conductance Geq : %.7f mho",Geq);
+mprintf("\nEquivalent resistance Req : %.4f ohms",Req);
+
+//Output
+//Equivalent conductance Geq : 0.0000453 mho (or) 45.3 pico mho
+//Equivalent resistance Req : 22063.5990 ohms (or) 22.063 KΩ
+
+//Wrong Answer.
+//Answer would be correct if formula is modified as (Replacing (2*Vdd) by (Vdd)) :
+//Geq=((Kn*((Vdd-Vtn)^2))+(Kp*((Vdd-Vtp)^2)))/(Vdd)
+
+//Output when equation is modified:
+//Equivalent conductance Geq : 0.0000906 mho (or)90.6 pico mho
+//Equivalent resistance Req : 11031.7995 ohms(or) 11.031 KΩ
diff --git a/3905/CH4/EX4.8/Ex4_8.sce b/3905/CH4/EX4.8/Ex4_8.sce new file mode 100644 index 000000000..a1aff87c6 --- /dev/null +++ b/3905/CH4/EX4.8/Ex4_8.sce @@ -0,0 +1,24 @@ +//Example 4.8, Page Number 216
+//Pass-Transistor Chain
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+//Parameter Values for 1.2µm CMOS process
+Req=10*(10^3) //Equivalent resistance in ohms(Ω)
+C=10*(10^-15) //Capacitance in farads(F)
+tp_buf=0.5*(10^-9) //Propogation delay of each buffer in seconds(secs)
+
+//Outputs
+m_opt=1.7*(sqrt(tp_buf/(C*Req))) //Optimal number of switches between buffers
+
+//Results
+mprintf("\nOptimal number of switches between buffers m_opt : %.2f",m_opt);
+
+//Output
+//Optimal number of switches between buffers m_opt : 3.80
+
+
+
+
diff --git a/3905/CH5/EX5.10/Ex5_10.sce b/3905/CH5/EX5.10/Ex5_10.sce new file mode 100644 index 000000000..2601a8bfd --- /dev/null +++ b/3905/CH5/EX5.10/Ex5_10.sce @@ -0,0 +1,30 @@ +//Example 5.10, Page Number 305
+//GaAs MESFET Current-Voltage Characteristics
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vgs=0.5 //Gate-Source voltage in volts(V)
+Vds=2 //Drain-Source voltage in volts(V)
+beta_enhancement=250*(10^-6) //ß=250*(10^-6) for Enhancement MESFET in Area per Voltage aquare(A/V**2)
+lamda=0.2 //Channel modulation constant in volt inverse(1/V)
+alpha=6.5 //Transistor parameter in inverese volt(V) and alpha=6.5 for enhancement MOSFET.
+Vp=0.23 //Pinch-Off voltage in volts(V)
+W=4*(10^-6) //Depletion region width
+L=1*(10^-6) //Depletion region length
+delta_W=0.15*(10^-6) //Change in Depletion region width
+delta_L=0.4*(10^-6) //Change in Depletion region length
+Weff=W-delta_W //Effective depletion region width
+Leff=L-delta_L //Effective depletion region length
+
+//Outputs
+Id=(Weff/Leff)*beta_enhancement*((Vgs-Vp)^2)*(1+(lamda*Vds))*tanh(alpha*Vds) //Drain current in amperes(A)
+
+//Results
+mprintf("\nDrain current Id: %.7f amperes",Id);
+
+//Output
+//Drain current Id: 0.0001637 amperes (or) 163.7 µA
+
+
diff --git a/3905/CH5/EX5.13/Ex5_13.sce b/3905/CH5/EX5.13/Ex5_13.sce new file mode 100644 index 000000000..1a295fcb2 --- /dev/null +++ b/3905/CH5/EX5.13/Ex5_13.sce @@ -0,0 +1,30 @@ +//Example 5.13, Page Number 310
+//MESFET Source-Follower
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vd_on=0.7 //Forward bias diode voltage in volts(V)
+V_oh=-1.3 //Output high level transition voltage in volts(V)
+V_ol=-1.7 //Output low level transition voltage in volts(V)
+Vgs=0.5 //Gate-Source voltage in volts(V)
+Vds=0.8 //Drain-Source voltage in volts(V)
+beta_enhancement=250*(10^-6) //ß=250*(10^-6) for Enhancement MESFET in Area per Voltage aquare(A/V**2)
+lamda=0.2 //Channel modulation constant in volt inverse(1/V)
+alpha=6.5 //
+Vout=-1.5 //Output voltage at midpoint of voltage swing in volts(V)
+Vp=0.23 //Pinch-Off voltage in volts(V)
+Weff_to_Leff=10 //Width to length ratio of depletion region
+
+//Outputs
+Isf=(Weff_to_Leff)*beta_enhancement*((Vgs-Vp)^2)*(1+(lamda*Vds))*tanh(alpha*Vds) //Drain Source current in amperes(A)
+
+//Results
+mprintf("\nDrain current Isf: %.5f amperes",Isf);
+//For this value of current,the voltage drop over the source follower is virtually constant over complete range of voltage interest.
+
+//Output
+//Drain current Isf: 0.00021 amperes (or) 0.21 mA
+
+
diff --git a/3905/CH5/EX5.3/Ex5_3.sce b/3905/CH5/EX5.3/Ex5_3.sce new file mode 100644 index 000000000..917b1bc33 --- /dev/null +++ b/3905/CH5/EX5.3/Ex5_3.sce @@ -0,0 +1,23 @@ +//Example 5.3, Page Number 277
+//Differential ECL Gate
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vcc=5 //Supply voltage in volts(V)
+Iee=400*(10^-6) //Emitter current supply in amperes(A)
+Rc=625 //Collector resistance in ohms(Ω)
+
+//Outputs
+Voltage_swing=Iee*Rc //Output voltage swing in volts(V)
+P_consm=Iee*Vcc //Static power consumption in watts(W)
+
+//Results
+mprintf("\nOutput logic swing: %.2f volts",Voltage_swing);
+mprintf("\nStatic power consumption: %.4f watts",P_consm);
+
+//Outputs
+//Output logic swing: 0.25 volts
+//Static power consumption: 0.0020 watts (or) 2mW
+
diff --git a/3905/CH5/EX5.4/Ex5_4.sce b/3905/CH5/EX5.4/Ex5_4.sce new file mode 100644 index 000000000..fc4b23653 --- /dev/null +++ b/3905/CH5/EX5.4/Ex5_4.sce @@ -0,0 +1,60 @@ +//Example 5.4, Page Number 279
+//CML Gate Characteristics
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vcc=0 //Supply voltage in volts(V)
+Vee=-1.7 //Supply voltage in volts(V)
+phi_t=26*(10^-3) //Thermal voltage in volts(A)
+Vref=-0.05 //Reference voltage in volts(V)
+Iee=0.4*(10^-3) //Emitter current supply in amperes(A)
+Rc=625 //Collector resistance in ohms(Ω)
+V_ih=-0.085 //Input high level transition voltage using unity gain definition in volts(V)
+V_il=-0.165 //Input low level transition voltage using unity gain definition in volts(V)
+Vbe_on=0 //Base-Emitter voltage in volts(V)
+//Vbe_on is zeo as Ic=Is (Vbe_on=Φt*log(Ic/Is)) i.e (log(1)=0)
+C_fanout=60*(10^-15) //Fanout capacitance in farads(F)
+C_cs1=47*(10^-15) //Collector-Source junction capacitance in farads(F)
+C_bc1=22*(10^-15) //Base-collector junction capacitance in farads(F)
+Cc=((0.67*C_cs1)+(2*1.01*C_bc1)) //Collector capacitance in farads(F)
+//Cbc1 is accounted twice to incoprate miller effect
+
+
+//Outputs
+Vswing=Iee*Rc //Output voltage swing in volts(V)
+V_oh=Vcc-Vbe_on //Output high level transition voltage in volts(V)
+V_ol=Vcc-Vbe_on-(Vswing) //Output low level transition voltage in volts(V)
+NM_H=V_oh-V_ih //Noise margin of high level transition in volts(V)
+NM_L=V_il-V_ol //Noise margin of low level transition in volts(V)
+Cl=C_fanout+Cc //Output capacitance in farads(F)
+tp=0.69*Rc*Cl //Propogation delay in seconds(secs)
+Pstat=(abs(Vee)*Iee) //Static output power in watts(W)
+Pdyn=Cl*(Vcc-Vee)*(Vswing/tp) //Dynamic output power in watts(W)
+
+//Results
+mprintf("\nOutput voltage swing : %.2f volts",Vswing);
+mprintf("\nVbe_oh: %.2f volts",V_oh);
+mprintf("\nVbe_ol: %.2f volts",V_ol);
+mprintf("\nVbe_ih: %.2f volts",V_ih);
+mprintf("\nVbe_il: %.2f volts",V_il);
+mprintf("\nNoise margin of high level transition: %.2f volts",NM_H);
+mprintf("\nNoise margin of low level transition: %.2f volts",NM_L);
+mprintf("\nOutput capacitance: %.16f farads",Cl);
+mprintf("\nPropogation delay: %.13f seconds",tp);
+mprintf("\nStatic output power: %.4f watts",Pstat);
+mprintf("\nDynamic output power: %.4f watts",Pdyn);
+
+//Outputs
+//Output voltage swing : 0.25 volts
+//Vbe_oh: 0.00 volts
+//Vbe_ol: -0.25 volts
+//Vbe_ih: -0.09 volts
+//Vbe_il: -0.17 volts
+//Noise margin of high level transition: 0.09 volts
+//Noise margin of low level transition: 0.08 volts
+//Output capacitance: 0.0000000000001359 farads (or) 135.9 fF
+//Propogation delay: 0.0000000000586 seconds (or) 58.6 picosecs
+//Static output power: 0.0007 watts (or) 0.7 mW
+//Dynamic output power: 0.0010 watts (or) 1.0 mW
diff --git a/3905/CH5/EX5.5/Ex5_5.sce b/3905/CH5/EX5.5/Ex5_5.sce new file mode 100644 index 000000000..185dc8178 --- /dev/null +++ b/3905/CH5/EX5.5/Ex5_5.sce @@ -0,0 +1,27 @@ +//Example 5.5, Page Number 285
+//VTC of an NTL Gate
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vcc=1.9 //Supply voltage in volts(V)
+Rc=2 //Collector resistance in ohms(Ω)
+Re=0.5*(10^3) //Emitter resistance in ohms(Ω)
+Vbe_on=0.75 //Base-Emitter forward bias voltage in volts(V)
+
+//Outputs
+//A large value of ratio (-Rc/Re) enchances the voltage gain and noise margin,but increases gate delay.So,(Rc=2*Re) is a good compromise.Under these conditions V_ol evaluates as
+V_ol=3*Vbe_on-Vcc //Output low level transition voltage in volts(V)
+V_oh=Vcc-Vbe_on ////Output high level transition voltage in volts(V)
+Signal_swing=2*Vcc-4*Vbe_on //Signal swing in volts(V)
+
+//Results
+mprintf("\nVbe_oh: %.2f volts",V_oh);
+mprintf("\nVbe_ol: %.2f volts",V_ol);
+mprintf("\nSignal swing : %.2f volts",Signal_swing);
+
+//Outputs
+//Vbe_oh: 1.15 volts
+//Vbe_ol: 0.35 volts
+//Signal swing : 0.80 volts
diff --git a/3905/CH6/EX6.3/Ex6_3.sce b/3905/CH6/EX6.3/Ex6_3.sce new file mode 100644 index 000000000..98b607b76 --- /dev/null +++ b/3905/CH6/EX6.3/Ex6_3.sce @@ -0,0 +1,36 @@ +//Example 6.3, Page Number 346
+//ECL SR Flip-Flop
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vbe_on=0.7 //Forward Base-Emitter voltage on volts(V)
+Vbe_sat=0.8 //Saturated Base-Emitter voltage on volts(V)
+Vce_sat=0.1 //Saturated Collector-Emitter voltage on volts(V)
+beta_f=100 //Forward current gain
+Vcc=0 //Supply voltage in volts(V)
+Vee=-3.5 //Emmiter voltage in volts(V)
+//Collector current is set to 0.5mA
+Ic1=0.5*(10^-3) //Collector current in amperes(A)
+
+//Outputs
+Vb1=Vcc-Vbe_on //Base voltage of Q1 in volts(V)
+Ve1=Vb1-Vbe_on //Emitter voltage of Q1 in volts(V)
+Re=(Ve1-Vee)/Ic1 //Emitter resistance in ohms(Ω)
+//Solving the below equations gives relation between Re and Rc:
+//Vc1=Vcc-(Ic1*Rc)
+//Vq_compliment=Vc1-Vbe_on
+//Vq_compliment=Vcc-(Rc/Re)*(Vcc-(2*Vbe_on)-Vee)-Vbe_on
+Rc=Re/4.2 //Collector resistance in ohms(Ω)
+//The absolute values of Rc,Re and Rb are determined by desired current levels and the required transient response time
+
+//Results
+mprintf("\nEmitter resistance Re: %.1f ohms(Ω)",Re);
+mprintf("\nCollector resistance Re: %.1f ohms(Ω)",Rc);
+
+//Outputs
+//Emitter resistance Re: 4200.0 ohms(Ω) (or) 4.2kΩ
+//Collector resistance Re: 1000.0 ohms(Ω) (or) 1kΩ
+
+
diff --git a/3905/CH6/EX6.5/Ex6_5.sce b/3905/CH6/EX6.5/Ex6_5.sce new file mode 100644 index 000000000..77808f973 --- /dev/null +++ b/3905/CH6/EX6.5/Ex6_5.sce @@ -0,0 +1,38 @@ +//Example 6.5, Page Number 366
+//Emitter-Coupled Schmitt Trigger
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vbe_on=0.7 //Forward Base-Emitter voltage on volts(V)
+Vbe_sat=0.8 //Saturated Base-Emitter voltage on volts(V)
+Vce_sat=0.1 //Saturated Collector-Emitter voltage on volts(V)
+beta_f=100 //Forward current gain
+Vcc=5 //Supply voltage in volts(V)
+R1=4*(10^3) //Collecor resitance of transistor Q1 in ohms(Ω)
+R2=2.5*(10^3) //Collecor resitance of transistor Q2 in ohms(Ω)
+Re=1*(10^3) //Emitter resitance in ohms(Ω)
+
+
+//Outputs
+V_oh=Vcc //Output high level transition voltage in volts(V)
+R1_parallel_R2= (R1*R2)/(R1+R2)
+Ve_M_plus=Vcc*Re/(Re+(R1_parallel_R2)) //Emitter voltage during low to high transition in volts(V)
+V_ol=Ve_M_plus+Vce_sat //Output low level transition voltage in volts(V)
+V_M_plus=Ve_M_plus+Vbe_on //Switching threshold during low to high transition in volts(V)
+Ve_M_minus=((Vcc*Re)/(R1+Re)) //Emitter voltage during high to low transition in volts(V)
+V_M_minus=Ve_M_minus+Vbe_on //Switching threshold during high to low transition in volts(V)
+
+
+//Results
+mprintf("\nOutput high level transition voltage V_oh: %.4f volts",V_oh);
+mprintf("\nOutput low level transition voltage V_ol: %.4f volts",V_ol);
+mprintf("\nSwitching threshold during low to high transition V_M_plus: %.4f volts",V_M_plus);
+mprintf("\nSwitching threshold during high to low transition V_M_minus: %.2f volts",V_M_minus);
+
+//Outputs
+//Output high level transition voltage V_oh: 5.0000 volts
+//Output low level transition voltage V_ol: 2.0697 volts
+//Switching threshold during low to high transition V_M_plus: 2.6697 volts
+//Switching threshold during high to low transition V_M_minus: 1.70 volts
diff --git a/3905/CH6/EX6.7/Ex6_7.sce b/3905/CH6/EX6.7/Ex6_7.sce new file mode 100644 index 000000000..7a4aef9a1 --- /dev/null +++ b/3905/CH6/EX6.7/Ex6_7.sce @@ -0,0 +1,30 @@ +//Example 6.7, Page Number 372
+//Current-Starved Inverter
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vgs=5 //Gate-Source voltage in volts(V)
+beta_depletion=19.6*(10^-6) //ß=19.6*(10^-6) for Depletion FET in Area per Voltage square(A/V**2)
+lamda=0.2 //Channel modulation constant in volt inverse(1/V)
+Vp=0.74 //Pinch-Off voltage in volts(V)
+Weff1=1.8 //Effective depletion region width
+Leff=0.9 //Effective depletion region length
+Weff2=9 //Effective depletion region width
+
+//Outputs
+//Maximum current of minimum-size inverter is given by below relation:
+Isat=0.5*(Weff1/Leff)*beta_depletion*((Vgs-Vp)^2) //Saturation current in amperes(A)
+//Maximum current of minimum-size control transistor M3 is given by below relation:
+Vcontr=sqrt((Isat/(0.5*(Weff2/Leff)*beta_depletion)))-Vp //Control voltage of transistor M3 in volts(V)
+
+//Results
+mprintf("\nSaturation current: %.7f amperes",Isat);
+mprintf("\ncontrol voltage: %.2f volts",Vcontr);
+
+//Outputs
+//Saturation current: 0.0003556929600 amperes (or) 355.7µA
+//control voltage: 1.17 volts
+
+
diff --git a/3905/CH7/EX7.2/Ex7_2.sce b/3905/CH7/EX7.2/Ex7_2.sce new file mode 100644 index 000000000..991d2c924 --- /dev/null +++ b/3905/CH7/EX7.2/Ex7_2.sce @@ -0,0 +1,21 @@ +//Example 7.2, Page Number 391
+//Static Adder Design
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+tab_c0=1.63*(10^-9) //Delay to generate carry output for inputs in seconds(secs)
+tci_c0=0.32*(10^-9) //Delay to generate carry output for input carry in seconds(secs)
+tci_s=1*(10^-9) //Delay to generate sum output for input carry in seconds(secs)
+N=32 //Number of bit adder
+
+//Outputs
+tadd=tab_c0+(N-2)*tci_c0+tci_s //Adder delay in seconds(secs)
+
+//Results
+mprintf("\nAdder delay tadd: %.11f seconds",tadd);
+
+//Output
+//Adder delay tadd : 0.00000001223 seconds (or) 12.23 nsecs
+
diff --git a/3905/CH7/EX7.4/Ex7_4.sce b/3905/CH7/EX7.4/Ex7_4.sce new file mode 100644 index 000000000..986bb830a --- /dev/null +++ b/3905/CH7/EX7.4/Ex7_4.sce @@ -0,0 +1,22 @@ +//Example 7.4, Page Number 394
+//Transistor Sizing in the Manchester Carry Chain
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+//The worst case delay of the carry chain adder can be modelled by linear RC network.
+R=20*(10^3) //Linearized on-resistance of RC network in ohms(Ω)
+C=20*(10^-15) //Linearized diffusion capacitance of RC network in ohms(Ω)
+
+//Outputs
+//Propogation delay of RC network:tp=(0.69*(ΣCi)*(Σ*Rj))
+//Analysing equivalent network to determine propogation delay of carry chain
+tp=0.69*C*(6*R+5*R+4*R+3*R+2*R+1*R) //Worst case propogation delay of adder circuit in seconds(secs)
+
+//Results
+mprintf("\nWorst case propogation delay of adder circuit tp: %.10f seconds",tp);
+
+//Output
+//Worst case propogation delay of adder circuit tp: 0.0000000058 seconds (or) 5.8 nsecs
+
diff --git a/3905/CH8/EX8.10/Ex8_10.sce b/3905/CH8/EX8.10/Ex8_10.sce new file mode 100644 index 000000000..c41ce947d --- /dev/null +++ b/3905/CH8/EX8.10/Ex8_10.sce @@ -0,0 +1,26 @@ +//Example 8.10, Page Number 474
+//Optimized Delay of RC Chain
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+L=5*(10^-3) //Length of wire in metres(m)
+tp_buf=0.5*(10^-9) //Propogation delay of buffer in seconds(secs)
+//Resistance is obtained from sheet resistance of polysilicon with tolerance.
+R=95*((10000)^2) //Resistance of RC network in ohms(Ω)
+//Capacitance ontained from summing fringing and interconnect capacitances for polysilicon wire:
+C=0.15*(10^-12) //Capacitance of network in farads(F)
+
+//Outputs
+M=L*sqrt((0.38*R*C)/tp_buf) //Number of buffer sections
+tp=0.38*R*C*(((L/M)^2)*M)+(M-1)*tp_buf //Propogation delay of distributed RC network in seconds(secs)
+
+//Results
+mprintf("\nNumber of buffer sections M: %.4f",M);
+mprintf("\nPropogation delay of distributed RC network tp: %.12f seconds",tp);
+
+//Output
+//Number of buffer sections M: 5.2034
+//Propogation delay of distributed RC network tp: 0.000000004703 seconds (or) 4.703 nsecs
+
diff --git a/3905/CH8/EX8.13/Ex8_13.sce b/3905/CH8/EX8.13/Ex8_13.sce new file mode 100644 index 000000000..8eec7e0e3 --- /dev/null +++ b/3905/CH8/EX8.13/Ex8_13.sce @@ -0,0 +1,27 @@ +//Example 8.13, Page Number 478
+//Noise Induced by Inductive Bonding Wires and Package Pins
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Cl=20*(10^-12) //Driving load capacitance in farads(F)
+V_swing=5 //Voltage swing in volts(V)
+tf=0.9 //Final output reach in seconds(secs)
+ti=0.1 //Initial output reach in seconds(secs)
+tr=4*(10^-9) //Rise time in seconds(secs)
+L=10*(10^-9) //Series inductance in henry(H)
+dt=2*(10^-9) //Output swing time in seconds(secs)
+Ip=40*(10^-3) //Peak current in amperes(A)
+
+//Outputs
+Iavg=(Cl*(tf-ti)*V_swing)/tr //Average curremt to drive output in amperes(A)
+Vl=L*(Ip/dt) //Voltage drop across inductor in volts(V)
+
+//Results
+mprintf("\nPropogation delay of distributed RC network: %.4f amperes",Iavg);
+mprintf("\nVoltage drop across inductor: %.1f volts",Vl);
+
+//Outputs
+//Propogation delay of distributed RC network: 0.0200 amperes (or) 20 mA
+//Voltage drop across inductor: 0.2 volts
diff --git a/3905/CH8/EX8.16/Ex8_16.sce b/3905/CH8/EX8.16/Ex8_16.sce new file mode 100644 index 000000000..055dcfd2a --- /dev/null +++ b/3905/CH8/EX8.16/Ex8_16.sce @@ -0,0 +1,21 @@ +//Example 8.16, Page Number 489
+//Capacitive Termination
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Z0=50 //Characteristic impedance of the line in ohms(Ω)
+Cl=2*(10^-12) //Capacitive load in farads(F)
+//Outputs
+//The output rises to its final value with time constant:
+tou=Z0*Cl //Time constant in seconds(secs)
+t_charge=0.69*Z0*Cl //Time to charge the capacitance in seconds(secs)
+
+//Results
+mprintf("\nTime constant Γ: %.13f seconds",tou);
+mprintf("\nTime to charge the capacitance: %.13f seconds",t_charge);
+
+//Outputs
+//Time constant tou: 0.0000000001000 seconds (or) 100.0 psecs
+//Time to charge the capacitance: 0.0000000000690 seconds (or) 69.0 psecs
diff --git a/3905/CH8/EX8.18/Ex8_18.sce b/3905/CH8/EX8.18/Ex8_18.sce new file mode 100644 index 000000000..f2aed8c7f --- /dev/null +++ b/3905/CH8/EX8.18/Ex8_18.sce @@ -0,0 +1,19 @@ +//Example 8.18, Page Number 500
+//Thermal Bounds on Integration
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+delta_T=100 //Maximum temperature difference between chip and environment in degree celsius(C)
+theta=2.5 //Thermal resistance between chip and environment in celsius per watt(C/W)
+E=0.1*(10^-12) //Switching energy of each gate in joule(J)
+
+//Outputs
+Ng_to_tp=(delta_T/(theta*E)) //Ratio of ()Ng=Number of gates on chip,tp=Propgation delay) in gates per seconds(Gate/secs)
+
+//Results
+mprintf("\nMaximum number of gates on chip when all gates are simultaneously: %.1f gates per second",Ng_to_tp);
+
+//Output
+//Maximum number of gates on chip when all gates are simultaneously: 400000000000000.0 or 4*(10^5) gates/nanoseconds
diff --git a/3905/CH8/EX8.2/Ex8_2.sce b/3905/CH8/EX8.2/Ex8_2.sce new file mode 100644 index 000000000..1bb5cdb2e --- /dev/null +++ b/3905/CH8/EX8.2/Ex8_2.sce @@ -0,0 +1,27 @@ +//Example 8.2, Page Number 444
+//Capacitance of Metal Wire
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+L=10*(10^-2) //Length of wire in metres(m)
+W=4*(10^-6) //Width of wire in metres(m)
+C_layer=0.031*((10^-15)/(10^-12)) //Interconnect layer capacitance per unit area between metal1 and substrate in farads per metre square(F/m^2)
+C_fring=0.044*((10^-15)/(10^-6)) //Fringing capacitance between metal1 and substrate in farads per metre(F/m)
+
+//Outputs
+C_area=L*W*C_layer //Total area capacitance in farads(F)
+C_fringing=L*2*C_fring //Total fringing capacitance in farads(F)
+//Factor '2' in C_fringing is to consider two sides of the wire.
+C_total=C_area+C_fringing //Total capacitance in farads(F)
+
+//Results
+mprintf("\nTotal area capacitance C_area: %.13f farads",C_area);
+mprintf("\nTotal fringing capacitance C_fringing: %.13f farads",C_fringing);
+mprintf("\nTotal capacitance C_total: %.13f farads",C_total);
+
+//Outputs
+//Total area capacitance C_area: 0.0000000000124 farads (or) 12.4 pF
+//Total fringing capacitance C_fringing: 0.0000000000088 farads (or) 8.8 pF
+//Total capacitance C_total: 0.0000000000212 farads (or) 21.2 pF
diff --git a/3905/CH8/EX8.3/Ex8_3.sce b/3905/CH8/EX8.3/Ex8_3.sce new file mode 100644 index 000000000..5452569be --- /dev/null +++ b/3905/CH8/EX8.3/Ex8_3.sce @@ -0,0 +1,24 @@ +//Example 8.3, Page Number 446
+//Interwire Capacitance and Cross Talk
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+V=5 //Voltage transition on Y in volts(V)
+//As computation of fringing effect in this case of overlapping wires is complex, we assume two sides of wire contribute and a voltage disturbance is combined with parasitic effects
+Cx=25*(10^-15) //Capacitance at node 'x' in farads(F)
+//Parasitic capacitance is given as (5*5*0.055fF+2*5*0.049fF)
+Cxy=1.9*(10^-15) //Parasitic capacitance in farads(F)
+
+//Outputs
+delta_Vx=(Cx/(Cx+Cxy))*V //Voltage drop on dynamic node in volts(V)
+V_disturbance=V-delta_Vx //Voltage disturbance at dynamic node in volts(V)
+
+//Results
+mprintf("\nVoltage drop at dynamic node delta_Vx: %.1f volts",delta_Vx);
+mprintf("\nVoltage disturbance at dynamic node V_disturbance: %.1f volts",V_disturbance);
+
+//Output
+//Voltage drop at dynamic node delta_Vx: 4.6 volts
+//Voltage disturbance at dynamic node V_disturbance: 0.4 volts
diff --git a/3905/CH8/EX8.4/Ex8_4.sce b/3905/CH8/EX8.4/Ex8_4.sce new file mode 100644 index 000000000..00623a517 --- /dev/null +++ b/3905/CH8/EX8.4/Ex8_4.sce @@ -0,0 +1,22 @@ +//Example 8.4, Page Number 453
+//Output Buffer Design
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Cl=20*(10^-12) //Off-chip capacitance in farads(F)
+Ci=10*(10^-15) //Input capacitance in farads(F)
+tpo=0.2*(10^-9) //Propogation delay of minimum size gate with single fanout in seconds(secs)
+mu=2.96 //Scaling factor
+
+//Outputs
+tp=mu*log(Cl/Ci)*tpo //Total propogation delay in seconds(secs)
+
+//Results
+mprintf("\nTotal propogation delay tp: %.10f seconds",tp);
+
+//Output
+//Total propogation delay tp: 0.0000000045 seconds (or) 4.5 nsecs
+
+
diff --git a/3905/CH8/EX8.6/Ex8_6.sce b/3905/CH8/EX8.6/Ex8_6.sce new file mode 100644 index 000000000..cd6bbd46f --- /dev/null +++ b/3905/CH8/EX8.6/Ex8_6.sce @@ -0,0 +1,41 @@ +//Example 8.6, Page Number 460
+//Cascode Charge-Redistribution Amplifier
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+Vcc=5 //Gate source voltage in volts(V)
+Vtn=0.74 //Threshold voltage in volts(V)
+Vref=5 //Reference voltage in volts(V)
+Weff=1.8*(10^-6) //Effective width of
+L=1.2*(10^-6) //Effective length of
+delta_L=0.3*(10^-6) //Difference in effective length in metres(m)
+Leff=L-delta_L //Effective length
+kn=5.4*(10^-6) //Device parameter in Area per Voltage aquare(A/V**2)
+Vt=0.74 //Threshold voltage in volts(V)
+
+//Outputs
+Vout_high=Vcc //High voltage level of output node in volts(V)
+Vbus_high=Vref-Vtn*(Vref) //High voltage level of output node in volts(V)
+I_M3=(1/2)*(Weff/Leff)*kn*((Vcc-Vt)^2) //Drain current in transistor M3 amperes(A)
+//The low voltages has to be solved iteratively due to body-effect factor.Equating I_M3 with I_M1 yiilds Vbus_low:
+Vbus_low=0.63 //Low voltage level of output node in volts(V)
+//The resulting voltage drop across M2(0.1volts) yields Vout_low:
+Vout_low=0.63+0.1 //Low voltage level of output node in volts(V)
+
+//Results
+mprintf("\nHigh voltage level of output node Vout_high: %.1f volts",Vout_high);
+mprintf("\nHigh voltage level of bus node Vbus_high: %.1f volts",Vbus_high);
+mprintf("\nDrain current in transistor M3 I_M3: %.8f amperes",I_M3);
+mprintf("\nLow voltage level of bus node Vbus_low: %.2f volts",Vbus_low);
+mprintf("\nLow voltage level of output node Vout_low: %.2f volts",Vout_low);
+
+//Outputs
+//High voltage level of output node Vout_high: 5.0 volts
+//High voltage level of bus node Vbus_high: 1.3 volts
+//Drain current in transistor M3 I_M3: 0.00009800 amperes (or) 98µA
+//Low voltage level of bus node Vbus_low: 0.63 volts
+//Low voltage level of output node Vout_low: 0.73 volts
+
+
diff --git a/3905/CH8/EX8.9/Ex8_9.sce b/3905/CH8/EX8.9/Ex8_9.sce new file mode 100644 index 000000000..2830bd8dc --- /dev/null +++ b/3905/CH8/EX8.9/Ex8_9.sce @@ -0,0 +1,22 @@ +//Example 8.9, Page Number 473
+//RC Delay of Polysilicon Wire
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+L=1*(10^-3) //Length of wire in metres(m)
+//Resistance is obtained by:R=(R_sheet*Length of wire)/(Width of wire)
+R=10*((1000)^2) //Resistance of RC network in ohms(Ω)
+C_layer=0.058*(10^-15) //Interconnect layer capacitance per unit area between metal1 and substrate in farads per metre square(F/m^2)
+C_fring=0.043*(10^-15) //Fringing capacitance between metal1 and substrate in farads per metre(F/m)
+
+//Outputs
+C=(C_layer+(2*C_fring)) //Total capacitance of wire in farads(F)
+tp=0.38*R*C //Propogation delay of distributed RC network in seconds(secs)
+
+//Results
+mprintf("\nPropogation delay of distributed RC network tp: %.11f seconds",tp);
+
+//Output
+//Propogation delay of distributed RC network tp: 0.00000000055 seconds (or) 0.54 nsecs
diff --git a/3905/CH9/EX9.5/Ex9_5.sce b/3905/CH9/EX9.5/Ex9_5.sce new file mode 100644 index 000000000..daa01ef07 --- /dev/null +++ b/3905/CH9/EX9.5/Ex9_5.sce @@ -0,0 +1,40 @@ +//Example 9.5, Page Number 537
+//Synchronizers and Mean Time-to-Failure
+//Scilab 6.0.1
+//Windows 10
+clc;
+
+//Inputs
+T_phi=10*(10^-9) //Sampling period in seconds(secs)
+T1=10*(10^-9) //Waiting time in seconds(secs)
+T2=20*(10^-9) //Waiting time in seconds(secs)
+Tsignal=50*(10^-9) //Time period of the signal in seconds(secs)
+tr=1*(10^-9) //Rise time in seconds(secs)
+tou=310*(10^-12) //Time constant in seconds(secs)
+Vswing=5 //Voltage swing of signal in volts(V)
+V_transition=1 //Transition difference in volts(V){Vtransition=V_ih-V_il}
+
+//Outputs
+P_init=((V_transition/Vswing)/Tsignal)*tr //Error probability in errors per second(Error/Sec)
+N_sync1=(P_init*(exp(-T1/tou)))/T_phi //Averege number of synchronization errors per second for T1 in inverse seconds(errors/secs)
+Mean_time_failure1=1/N_sync1 //Mean time to failure in seconds(secs)
+//If wating period(T) is doubled:
+N_sync2=(P_init*(exp(-T2/tou)))/T_phi //Averege number of synchronization errors per second for T2 in inverse seconds(errors/secs)
+Mean_time_failure2=1/N_sync2 //Mean time to failure in seconds(secs)
+
+//For a typical CMOS inverter with voltage swing of 5V, the V_IH-V_IL computed is 1V
+//Results
+//in seconds
+mprintf("\nAverege number of synchronization errors per second N_sync1: %.9f errors/sec",N_sync1);
+mprintf("\nMean time to failure for waiting time T1 Mean_time_failure1: %.1f seconds",Mean_time_failure1);
+//If no synchronizer was used, the MTF would only have been 2.5 µsecs!
+
+//in years
+mprintf("\nMean time to failure for waiting time T1 Mean_time_failure1(in years): %.2f years",Mean_time_failure1/(365*24*60*60));
+mprintf("\nMean time to failure for waiting time T2 Mean_time_failure2(in years): %.2f years",Mean_time_failure2/(365*24*60*60));
+
+//Outputs
+//Averege number of synchronization errors per second N_sync1: 0.000000004 errors/sec
+//Mean time to failure for waiting time T1 Mean_time_failure1: 255528546.7 seconds (or) 2.55 X 10^8 secs
+//Mean time to failure for waiting time T1 Mean_time_failure1(in years): 8.10 years
+//Mean time to failure for waiting time T2 Mean_time_failure2(in years): 828194294345529.87 years (or) 8.2 X 10^14 years
|