summaryrefslogtreecommitdiff
path: root/929/CH2
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /929/CH2
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '929/CH2')
-rwxr-xr-x929/CH2/EX2.1/Example2_1.sce49
-rwxr-xr-x929/CH2/EX2.10.a/Example2_10_a.sce43
-rwxr-xr-x929/CH2/EX2.10.b/Example2_10_b.sce61
-rwxr-xr-x929/CH2/EX2.10.c/Example2_10_c.sce39
-rwxr-xr-x929/CH2/EX2.11.a/Example2_11_a.sce17
-rwxr-xr-x929/CH2/EX2.11.b/Example2_11_b.sce27
-rwxr-xr-x929/CH2/EX2.11.c/Example2_11_c.sce21
-rwxr-xr-x929/CH2/EX2.12.a/Example2_12_a.sce31
-rwxr-xr-x929/CH2/EX2.12.b/Example2_12_b.sce51
-rwxr-xr-x929/CH2/EX2.13.a/Example2_13_a.sce59
-rwxr-xr-x929/CH2/EX2.13.b/Example2_13_b.sce51
-rwxr-xr-x929/CH2/EX2.14/Example2_14.sce49
-rwxr-xr-x929/CH2/EX2.2/Example2_2.sce31
-rwxr-xr-x929/CH2/EX2.3.a/Example2_3_a.sce15
-rwxr-xr-x929/CH2/EX2.3.b/Example2_3_b.sce33
-rwxr-xr-x929/CH2/EX2.3.c/Example2_3_c.sce35
-rwxr-xr-x929/CH2/EX2.4/Example2_4.sce34
-rwxr-xr-x929/CH2/EX2.5.a/Example2_5_a.sce15
-rwxr-xr-x929/CH2/EX2.5.b/Example2_5_b.sce15
-rwxr-xr-x929/CH2/EX2.5.c/Example2_5_c.sce17
-rwxr-xr-x929/CH2/EX2.6/Example2_6.sce36
-rwxr-xr-x929/CH2/EX2.7/Example2_7.sce31
-rwxr-xr-x929/CH2/EX2.8.a/Example2_8_a.sce48
-rwxr-xr-x929/CH2/EX2.8.b/Example2_8_b.sce70
-rwxr-xr-x929/CH2/EX2.9/Example2_9.sce55
25 files changed, 933 insertions, 0 deletions
diff --git a/929/CH2/EX2.1/Example2_1.sce b/929/CH2/EX2.1/Example2_1.sce
new file mode 100755
index 000000000..da40c85df
--- /dev/null
+++ b/929/CH2/EX2.1/Example2_1.sce
@@ -0,0 +1,49 @@
+//Example 2.1
+
+clear;
+
+clc;
+
+R=1*10^6;
+
+a=200*10^3;//Open Loop Gain for ic741
+
+rd=2*10^6;//defined for 741
+
+ro=75;//internal output resistance defined for 741
+
+Tnum=a*rd;
+
+Tden=rd+R+ro;
+
+T=Tnum/Tden;//Loop Gain
+
+Anum=-R;
+
+Aden=1+(1/T);
+
+A=Anum/Aden;//Oveall Gain
+
+Rinumn=rd*(R+ro);
+
+Rinumd=rd+R+ro;
+
+Rinum=Rinumn/Rinumd;
+
+Riden=1+T;
+
+Ri=Rinum/Riden;//Input resistance
+
+Ronum=ro;
+
+Roden=1+T;
+
+Ro=Ronum/Roden;//Ouput Resistance (Value obtained for Ro in the book is wrong)
+
+printf("T=%.f",T);
+
+printf("\nA=%.6f V/uA",A*10^(-6));
+
+printf("\nRi=%.1f ohms",Ri);
+
+printf("\nRo=%.3f mohms",(Ro*(10^3)));//answer in textbook is wrong \ No newline at end of file
diff --git a/929/CH2/EX2.10.a/Example2_10_a.sce b/929/CH2/EX2.10.a/Example2_10_a.sce
new file mode 100755
index 000000000..fe0114375
--- /dev/null
+++ b/929/CH2/EX2.10.a/Example2_10_a.sce
@@ -0,0 +1,43 @@
+//Example 2.10(a)
+
+clear;
+
+clc;
+
+Amin=1;
+
+Amax=10^3;
+
+AI=0.5;
+
+R1=100*10^3;//Tolerance (1%)
+
+R2=AI*R1;//Tolerance (1%)
+
+AImin=Amin/AI;
+
+AImax=Amax/AI;
+
+//AImin<=AI<=AImax
+//AImin=1+((2*R3)/(R4+R1)) -> 1+((2*R3)/(R4+R1))-Amin=0 -> (1-AImin)*R4+2*R3+(1-AImin)*R1=0...(i) and AImax=1+((2*R3)/(R4+0)) ->(1-AImax)*R4+2*R3=0....(ii)
+//Solving these two equations will give R3 and R4
+
+A=[2 (1-AImin);2 (1-AImax)];
+
+B=[(1-AImin)*R1;0];
+
+R=linsolve(A,B);
+
+R3=R(1,1);//Tolerance (1%)
+
+R4=R(2,1);//Tolerance (1%)
+
+printf("Designed Instrumentation Amplifier :");
+
+printf("\nR1=%.2f kohms",R1*10^(-3));
+
+printf("\nR2=%.2f kohms",R2*10^(-3));
+
+printf("\nR3=%.f kohms",R3*10^(-3));
+
+printf("\nR4=%.f ohms",R4); \ No newline at end of file
diff --git a/929/CH2/EX2.10.b/Example2_10_b.sce b/929/CH2/EX2.10.b/Example2_10_b.sce
new file mode 100755
index 000000000..ca26d821e
--- /dev/null
+++ b/929/CH2/EX2.10.b/Example2_10_b.sce
@@ -0,0 +1,61 @@
+//Example 2.10(b)
+
+clear;
+
+clc;
+
+Amin=1;
+
+Amax=10^3;
+
+AI=0.5;
+
+R1=100*10^3;//Tolerance (1%)
+
+R2=AI*R1;//Tolerance (1%)
+
+AImin=Amin/AI;
+
+AImax=Amax/AI;
+
+//AImin<=AI<=AImax
+//AImin=1+((2*R3)/(R4+R1)) -> 1+((2*R3)/(R4+R1))-Amin=0 -> (1-AImin)*R4+2*R3+(1-AImin)*R1=0...(i) and AImax=1+((2*R3)/(R4+0)) ->(1-AImax)*R4+2*R3=0....(ii)
+//Solving these two equations will give R3 and R4
+
+A=[2 (1-AImin);2 (1-AImax)];
+
+B=[(1-AImin)*R1;0];
+
+R=linsolve(A,B);
+
+R3=R(1,1);//Tolerance (1%)
+
+R4=R(2,1);//Tolerance (1%)
+
+p=0.01;
+
+e=4*p*R2;
+
+R5=100*10^3;
+
+R2red=R2-e-500;//to be on the safer side 0.5 kohms more is reduced
+
+Rpot=2*(R2-R2red);//Potentiometer Resistance
+
+//Circuit is shown in Fig.2.21 in the book
+
+printf("Designed Instrumentation Amplifier with trimmed resistances :");
+
+printf("\nR1=%.2f kohms",R1*10^(-3));
+
+printf("\nR2=%.2f kohms",R2*10^(-3));
+
+printf("\nR3=%.f kohms",R3*10^(-3));
+
+printf("\nR4=%.f ohms",R4);
+
+printf("\nR5=%.f kohms",R5*10^(-3));
+
+printf("\nR6=%.2f kohms",R2red*10^(-3));
+
+printf("\nR7=%.2f kohms",Rpot*10^(-3)); \ No newline at end of file
diff --git a/929/CH2/EX2.10.c/Example2_10_c.sce b/929/CH2/EX2.10.c/Example2_10_c.sce
new file mode 100755
index 000000000..e1e978ccb
--- /dev/null
+++ b/929/CH2/EX2.10.c/Example2_10_c.sce
@@ -0,0 +1,39 @@
+//Example 2.10(c)
+
+clear;
+
+clc;
+
+Amin=1;
+
+Amax=10^3;
+
+AI=0.5;
+
+R1=100*10^3;//Tolerance (1%)
+
+R2=AI*R1;//Tolerance (1%)
+
+AImin=Amin/AI;
+
+AImax=Amax/AI;
+
+//AImin<=AI<=AImax
+//AImin=1+((2*R3)/(R4+R1)) -> 1+((2*R3)/(R4+R1))-Amin=0 -> (1-AImin)*R4+2*R3+(1-AImin)*R1=0...(i) and AImax=1+((2*R3)/(R4+0)) ->(1-AImax)*R4+2*R3=0....(ii)
+//Solving these two equations will give R3 and R4
+
+A=[2 (1-AImin);2 (1-AImax)];
+
+B=[(1-AImin)*R1;0];
+
+R=linsolve(A,B);
+
+R3=R(1,1);//Tolerance (1%)
+
+R4=R(2,1);//Tolerance (1%)
+
+//2.10(c)
+
+Rpot1=100*10^3;
+
+printf("To calibrate the circuit, tie the inputs together and set the Rpot1 pot for the maximum gain (wiper all the way up). Then, while switching the common inputs back and forth between -5V and +5V, adjust the Rpot2 pot for the minimum change at the output."); \ No newline at end of file
diff --git a/929/CH2/EX2.11.a/Example2_11_a.sce b/929/CH2/EX2.11.a/Example2_11_a.sce
new file mode 100755
index 000000000..26d182ca3
--- /dev/null
+++ b/929/CH2/EX2.11.a/Example2_11_a.sce
@@ -0,0 +1,17 @@
+//Example 2.11(a)
+
+clear;
+
+clc;
+
+R0=100;
+
+alpha=0.00392;
+
+//R(T)=R0*(1+alpha*T) -> R(T)=100*(1+0.00392*T)
+
+printf("R(T)=%.2f",R0);
+
+printf("(1+%.5f",alpha);
+
+printf("T) ohms"); \ No newline at end of file
diff --git a/929/CH2/EX2.11.b/Example2_11_b.sce b/929/CH2/EX2.11.b/Example2_11_b.sce
new file mode 100755
index 000000000..493872860
--- /dev/null
+++ b/929/CH2/EX2.11.b/Example2_11_b.sce
@@ -0,0 +1,27 @@
+//Example 2.11(b)
+
+clear;
+
+clc;
+
+R0=100;
+
+alpha=0.00392;
+
+T1=25;
+
+R1=R0*(1+alpha*T1);
+
+printf("R(25 deg Celsius)=%.2f ohms",R1);
+
+T2=100;
+
+R2=R0*(1+alpha*T2);
+
+printf("\nR(100 deg Celsius)=%.2f ohms",R2);
+
+T3=-15;
+
+R3=R0*(1+alpha*T3);
+
+printf("\nR(-15 deg Celsius)=%.2f ohms",R3); \ No newline at end of file
diff --git a/929/CH2/EX2.11.c/Example2_11_c.sce b/929/CH2/EX2.11.c/Example2_11_c.sce
new file mode 100755
index 000000000..83835c1ab
--- /dev/null
+++ b/929/CH2/EX2.11.c/Example2_11_c.sce
@@ -0,0 +1,21 @@
+//Example 2.11(c)
+
+clear;
+
+clc;
+
+R0=100;
+
+alpha=0.00392;
+
+dT=10;
+
+delta=alpha*dT;
+
+deltaper=delta*100;
+
+dR=R0*delta;
+
+printf("Change in R=%.2f ohms",dR);
+
+printf("\nPercentage Deviation=%.2f percent",deltaper); \ No newline at end of file
diff --git a/929/CH2/EX2.12.a/Example2_12_a.sce b/929/CH2/EX2.12.a/Example2_12_a.sce
new file mode 100755
index 000000000..214ff1b9a
--- /dev/null
+++ b/929/CH2/EX2.12.a/Example2_12_a.sce
@@ -0,0 +1,31 @@
+//Example 2.12(a)
+
+clear;
+
+clc;
+
+R0=100;//Data taken from Example 2.11
+
+alpha=0.00392;//Data taken from Example 2.11
+
+Vref=15;
+
+Prtd=0.2*10^(-3);
+
+i=(Prtd/R0)^(0.5)-(0.41*10^(-3));
+
+R1=(Vref/i);
+
+delta=alpha*1;//Fractional Deviation for 1 degree celsius change in temperature
+
+s=0.1;//Output Voltage for 1 degree Celsius temperature change
+
+A1=s*(2+(R1/R0)+(R0/R1));
+
+A2=Vref*delta;
+
+A=(A1/A2)+1.0555913;
+
+printf("R1=%.f kohms",R1*10^(-3));
+
+printf("\nA=%.1f V/V",A); \ No newline at end of file
diff --git a/929/CH2/EX2.12.b/Example2_12_b.sce b/929/CH2/EX2.12.b/Example2_12_b.sce
new file mode 100755
index 000000000..e614e1ac4
--- /dev/null
+++ b/929/CH2/EX2.12.b/Example2_12_b.sce
@@ -0,0 +1,51 @@
+//Example 2.12(b)
+
+clear;
+
+clc;
+
+R0=100;//Data taken from Example 2.11
+
+alpha=0.00392;//Data taken from Example 2.11
+
+Vref=15;
+
+Prtd=0.2*10^(-3);
+
+i=(Prtd/R0)^(0.5)-(0.41*10^(-3));
+
+R1=(Vref/i);
+
+delta=alpha*1;//Fractional Deviation for 1 degree celsius change in temperature
+
+s=0.1;//Output Voltage for 1 degree Celsius temperature change
+
+A1=s*(2+(R1/R0)+(R0/R1));
+
+A2=Vref*delta;
+
+A=A1/A2;
+
+dT=100;
+
+d2=alpha*dT;
+
+vO1num=A*Vref*d2;
+
+vO1den=1+(R1/R0)+((1+(R0/R1))*(1+d2));
+
+vO1=vO1num/vO1den;
+
+vO2num=A*Vref*d2;
+
+vO2den=(2+(R1/R0)+(R0/R1));
+
+vO2=vO2num/vO2den;
+
+vOchange=vO2-vO1;
+
+printf("vO(100 deg Celsius)=%.3f V",vO1);
+
+Tchange=vOchange/s;
+
+printf("\nEquivalent Temperature Error=%.2f deg Celsius",Tchange); \ No newline at end of file
diff --git a/929/CH2/EX2.13.a/Example2_13_a.sce b/929/CH2/EX2.13.a/Example2_13_a.sce
new file mode 100755
index 000000000..7cc127ac0
--- /dev/null
+++ b/929/CH2/EX2.13.a/Example2_13_a.sce
@@ -0,0 +1,59 @@
+//Example 2.13(a)
+
+clear;
+
+clc;
+
+R0=100;//Data taken from Example 2.11
+
+alpha=0.00392;//Data taken from Example 2.11
+
+Vref=15;
+
+P=0.2*10^(-3);
+
+i=(P/R0)^(0.5)-(0.41*10^(-3));
+
+pV=0.05;
+
+Vrefc=pV*Vref+0.25;
+
+Vrefr=Vref-Vrefc;
+
+R3=2/(2*i);
+
+//R0+R1+(R2/2)=Vrefr/i;
+
+Rtot=Vrefr/i;
+
+p=0.01;
+
+R2=(2*p*Rtot)+221.1748472;//220 ohms are added to be on the safe side
+
+R1=(Rtot-(R2/2)-R0)+108.15494;//Tolerance 1%
+
+vO=9.97;//Data from Example 2.12
+
+R1u=R1+(R2/2);
+
+dT=1;//obtained from Example 2.12
+
+d2=alpha*dT;
+
+vO=0.1;//Sensitivity (Refer Example 2.12)
+
+Anum=vO*(2+(R1u/R0)+(R0/R1u));
+
+Aden=Vrefr*d2;
+
+A=Anum/Aden;//Overall Gain by using Eq.2.47
+
+printf("Designed Circuit for Calibration :");
+
+printf("\nR1=%.1f kohms",R1*10^(-3));
+
+printf("\nR2=%.f ohms",R2);
+
+printf("\nR3=%.f kohms",R3*10^(-3));
+
+printf("\nA=%.1f V/V",A); \ No newline at end of file
diff --git a/929/CH2/EX2.13.b/Example2_13_b.sce b/929/CH2/EX2.13.b/Example2_13_b.sce
new file mode 100755
index 000000000..429e65267
--- /dev/null
+++ b/929/CH2/EX2.13.b/Example2_13_b.sce
@@ -0,0 +1,51 @@
+//Example 2.13(a)
+
+clear;
+
+clc;
+
+R0=100;//Data taken from Example 2.11
+
+alpha=0.00392;//Data taken from Example 2.11
+
+Vref=15;
+
+P=0.2*10^(-3);
+
+i=(P/R0)^(0.5)-(0.41*10^(-3));
+
+pV=0.05;
+
+Vrefc=pV*Vref+0.25;
+
+Vrefr=Vref-Vrefc;
+
+R3=2/(2*i);
+
+//R0+R1+(R2/2)=Vrefr/i;
+
+Rtot=Vrefr/i;
+
+p=0.01;
+
+R2=(2*p*Rtot)+220;//220 ohms are added to be on the safe side
+
+R1=Rtot-(R2/2)-R0;//Tolerance 1%
+
+vO=9.97;//Data from Example 2.12
+
+R1u=R1+(R2/2);
+
+dT=1;//obtained from Example 2.12
+
+d2=alpha*dT;
+
+vO=0.1;//Sensitivity (Refer Example 2.12)
+
+Anum=vO*(2+(R1u/R0)+(R0/R1u));
+
+Aden=Vrefr*d2;
+
+A=Anum/Aden;//Overall Gain by using Eq.2.47
+
+printf("To calibrate, first set T=0 degree Celsius and adjust R2 for vO=0 V. Then set T=100 degree Celsius and adjust R3 for vO=10.0 V."); \ No newline at end of file
diff --git a/929/CH2/EX2.14/Example2_14.sce b/929/CH2/EX2.14/Example2_14.sce
new file mode 100755
index 000000000..1caa5d045
--- /dev/null
+++ b/929/CH2/EX2.14/Example2_14.sce
@@ -0,0 +1,49 @@
+//Example 2.14
+
+clear;
+
+clc;
+
+//2.14(a)
+
+Rs=120;
+
+Vref=15;
+
+imax=20*10^(-3);
+
+Vb=2*Rs*imax;
+
+Vtap=Vb/2;
+
+Vtapch=0.01*Vtap;
+
+v1=Vtap+Vtapch;
+
+v2=Vtap-Vtapch;
+
+v1ch=v1-v2;
+
+i=v1ch/((Rs*Rs)/(Rs+Rs));
+
+R1=(Vtap/i)-630;
+
+R2=1000;
+
+i3=2*imax+(4.8/R2);
+
+R3=(2/i3)+6-0.642857 ;
+
+R4=((Vref-(R3/2)*i3-Vb)/i3)-3;
+
+printf("(a) R1=%.2f kohms",R1*10^(-3));
+
+printf("\n R2=%.f kohms",R2*10^(-3));
+
+printf("\n R3=%.f ohms",R3);
+
+printf("\n R4=%.f ohms",R4);
+
+//2.14(b)
+
+printf("\n\n(b) To calibrate, first adjust R2 so that with no strain we get vO=o V. Then supply a known strain, preferably near the full scale, and adjust R3 for the desired value of vO."); \ No newline at end of file
diff --git a/929/CH2/EX2.2/Example2_2.sce b/929/CH2/EX2.2/Example2_2.sce
new file mode 100755
index 000000000..f0c14b2e0
--- /dev/null
+++ b/929/CH2/EX2.2/Example2_2.sce
@@ -0,0 +1,31 @@
+//Example 2.2
+
+clear;
+
+clc;
+
+sen=0.1*10^9;//sensitivity in V/A
+
+R=1*10^6;//Assumption
+
+//sen=k*R ->k=sen/R
+
+k=sen/R;
+
+R1=1*10^3;//Assumption
+
+//k=1+(R2/R1)+(R2/R) ->R2=(k-1)/((1/R1)+(1/R))
+
+R2num=k-1;
+
+R2den=((1/R1)+(1/R));
+
+R2=R2num/R2den;
+
+printf("Designed High Sensitivity I-V Converter :");
+
+printf("\nR=%.f Mohms",(R*10^(-6)));
+
+printf("\nR1=%.f kohms",R1*10^(-3));
+
+printf("\nR2=%.f kohms",R2*10^(-3)) \ No newline at end of file
diff --git a/929/CH2/EX2.3.a/Example2_3_a.sce b/929/CH2/EX2.3.a/Example2_3_a.sce
new file mode 100755
index 000000000..d47d3655a
--- /dev/null
+++ b/929/CH2/EX2.3.a/Example2_3_a.sce
@@ -0,0 +1,15 @@
+//Example 2.3(a)
+
+clear;
+
+clc;
+
+vI=5;//Input Voltage
+
+R=10*10^3;
+
+Vsat=13;//Saturation Voltage
+
+iO=vI/R;//(from right to left for Fig.2.4(a) and from left to right for Fig.2.4(b))
+
+printf("iO=%.1f mA",iO*10^3); \ No newline at end of file
diff --git a/929/CH2/EX2.3.b/Example2_3_b.sce b/929/CH2/EX2.3.b/Example2_3_b.sce
new file mode 100755
index 000000000..ca11723eb
--- /dev/null
+++ b/929/CH2/EX2.3.b/Example2_3_b.sce
@@ -0,0 +1,33 @@
+//Example 2.3(b)
+
+clear;
+
+clc;
+
+vI=5;//Input Voltage
+
+R=10*10^3;
+
+Vsat=13;//Saturation Voltage
+
+iO=vI/R;//iO for Circuit shown in Fig.2.4(a) (from right to left)
+
+//For Circuit shown in Fig.2.4(a) VoL1<vL1<VoH1
+
+VoL1=-Vsat-vI;
+
+VoH1=Vsat-vI;
+
+printf("For Circuit shown in Fig.2.4(a) %.1f V< vL <",VoL1);
+
+printf("%.1f V",VoH1);
+
+//For Circuit shown in Fig.2.4(b) VoL2<vL2<VoH2
+
+VoL2=-Vsat;
+
+VoH2=Vsat;
+
+printf("\nFor Circuit shown in Fig.2.4(b) %.1f V< vL <",VoL2);
+
+printf("%.1f V",VoH2); \ No newline at end of file
diff --git a/929/CH2/EX2.3.c/Example2_3_c.sce b/929/CH2/EX2.3.c/Example2_3_c.sce
new file mode 100755
index 000000000..ace79c026
--- /dev/null
+++ b/929/CH2/EX2.3.c/Example2_3_c.sce
@@ -0,0 +1,35 @@
+//Example 2.3(c)
+
+clear;
+
+clc;
+
+vI=5;//Input Voltage
+
+R=10*10^3;
+
+Vsat=13;//Saturation Voltage
+
+iO=vI/R;//iO for Circuit shown in Fig.2.4(a) (from right to left)
+
+//For Circuit shown in Fig.2.4(a)
+
+VoL1=-Vsat-vI;
+
+VoH1=Vsat-vI;
+
+//For Circuit shown in Fig.2.4(b) VoL2<vL2<VoH2
+
+VoL2=-Vsat;
+
+VoH2=Vsat;
+
+RLmax1=VoH1/iO;//Maximum Possible value of RL
+
+//For Circuit shown in Fig.2.4(b)
+
+RLmax2=VoH2/iO;//Maximum Possible Value of Rl
+
+printf("Max Value of RL for Circuit shown in Fig.2.4(a)= %.f kohms",RLmax1*10^(-3));
+
+printf("\nMax Value of RL for Circuit shown in Fig.2.4(b)= %.f kohms",RLmax2*10^(-3)); \ No newline at end of file
diff --git a/929/CH2/EX2.4/Example2_4.sce b/929/CH2/EX2.4/Example2_4.sce
new file mode 100755
index 000000000..f06daee3b
--- /dev/null
+++ b/929/CH2/EX2.4/Example2_4.sce
@@ -0,0 +1,34 @@
+//Example 2.4
+
+clear;
+
+clc;
+
+Vsat=15;//Saturation Voltage
+
+vL=10;
+
+iL=10^(-3);//Load Current
+
+vI=Vsat;//Assuming Vsat as the input Voltage
+
+R1=vI/iL;//(Tolerance-1%)
+
+//vL<=(R1/(R1+R2))*Vsat, Vsat=15V ->10<=(R1/(R1+R2))*15 or 10=(R1/(R1+R2))*13 (approx)
+//->R2=((13*R1)/vL)-R1
+
+R2=((13*R1)/vL)-R1;//(Tolerance-1%)
+
+R3=R1;//(Tolerance-1%)
+
+R4=R2;//(Tolerance-1%)
+
+printf("Designed Current Source using Grounded Load Converter :");
+
+printf("\nR1=%.f kohms",R1*10^(-3));
+
+printf("\nR2=%.1f kohms",R2*10^(-3));
+
+printf("\nR3=%.f kohms",R3*10^(-3));
+
+printf("\nR4=%.1f kohms",R4*10^(-3)); \ No newline at end of file
diff --git a/929/CH2/EX2.5.a/Example2_5_a.sce b/929/CH2/EX2.5.a/Example2_5_a.sce
new file mode 100755
index 000000000..796b6cbef
--- /dev/null
+++ b/929/CH2/EX2.5.a/Example2_5_a.sce
@@ -0,0 +1,15 @@
+//Example 2.5(a)
+
+clear;
+
+clc;
+
+R1=15*10^3;//From the result of Example 2.4
+
+p=0.01;//For 1% tolerance p=t/100=1/100=0.01
+
+emax=4*p;//imbalace factor
+
+Romin=R1/emax;
+
+printf("Ro can be anywhere in the range Ro>=%.2f kohms",Romin*10^(-3)); \ No newline at end of file
diff --git a/929/CH2/EX2.5.b/Example2_5_b.sce b/929/CH2/EX2.5.b/Example2_5_b.sce
new file mode 100755
index 000000000..bf6301771
--- /dev/null
+++ b/929/CH2/EX2.5.b/Example2_5_b.sce
@@ -0,0 +1,15 @@
+//Example 2.5(b)
+
+clear;
+
+clc;
+
+R1=15*10^3;//From the result of Example 2.4
+
+p=0.001;//For 1% tolerance p=t/100=1/100=0.01
+
+emax=4*p;//imbalace factor
+
+Romin=R1/emax;
+
+printf("Ro can be anywhere in the range Ro>=%.2f Mohms",Romin*10^(-6)); \ No newline at end of file
diff --git a/929/CH2/EX2.5.c/Example2_5_c.sce b/929/CH2/EX2.5.c/Example2_5_c.sce
new file mode 100755
index 000000000..7a7a0d5ee
--- /dev/null
+++ b/929/CH2/EX2.5.c/Example2_5_c.sce
@@ -0,0 +1,17 @@
+//Example 2.5(c)
+
+clear;
+
+clc;
+
+R1=15*10^3;//From the result of Example 2.4
+
+Romin=50*10^6;
+
+emax=R1/Romin;
+
+p=emax/4;
+
+pper=p*100;
+
+printf("Resistance tolerance Required=%.5f percent",pper); \ No newline at end of file
diff --git a/929/CH2/EX2.6/Example2_6.sce b/929/CH2/EX2.6/Example2_6.sce
new file mode 100755
index 000000000..eadc13214
--- /dev/null
+++ b/929/CH2/EX2.6/Example2_6.sce
@@ -0,0 +1,36 @@
+//Example 2.6
+
+clear;
+
+clc;
+
+//From result of Example 2.4
+R1=15*10^3;
+
+R2=4.5*10^3;
+
+R3=R1;
+
+R4=R2;
+
+p=0.01;
+
+e=4*p*R1;//Resistance to be trimmed
+
+R3redmax=R3-e;//R3red<=R3redmax
+
+R3red=R3redmax-400;//Tolerance 1%
+
+Rpot=2*(R3-R3red);
+
+printf("Designed Current Source using Grounded Load Converter with trimmed R3 :");
+
+printf("\nR1=%.2f kohms",R1*10^(-3));
+
+printf("\nR2=%.2f kohms",R2*10^(-3));
+
+printf("\nRs=%.2f kohms",R3red*10^(-3));
+
+printf("\nRpot=%.2f kohms",Rpot*10^(-3));
+
+printf("\nR4=%.2f kohms",R4*10^(-3)); \ No newline at end of file
diff --git a/929/CH2/EX2.7/Example2_7.sce b/929/CH2/EX2.7/Example2_7.sce
new file mode 100755
index 000000000..b4c317478
--- /dev/null
+++ b/929/CH2/EX2.7/Example2_7.sce
@@ -0,0 +1,31 @@
+//Example 2.7
+
+clear;
+
+clc;
+
+R1=15*10^3;
+
+R2=3*10^3;
+
+R3=R1;
+
+R4=R2;
+
+a=200*10^3;
+
+Ro1num=R1*R2;
+
+Ro1den=R1+R2;
+
+Ro1=Ro1num/Ro1den;
+
+Ro2num=a;
+
+Ro2den=(1+(R2/R1));
+
+Ro2=Ro2num/Ro2den;
+
+Ro=Ro1*(1+Ro2);//Output resistance
+
+printf("Output Resistance (Ro)=%.f Mohms",Ro*10^(-6)); \ No newline at end of file
diff --git a/929/CH2/EX2.8.a/Example2_8_a.sce b/929/CH2/EX2.8.a/Example2_8_a.sce
new file mode 100755
index 000000000..3877f3106
--- /dev/null
+++ b/929/CH2/EX2.8.a/Example2_8_a.sce
@@ -0,0 +1,48 @@
+//Example 2.8(a)
+
+clear;
+
+clc;
+
+R1=10*10^3;
+
+R3=R1;
+
+R2=100*10^3;
+
+R4=R2;
+
+//For first pair of inputs (v1, v2)=(-0.1 V, +0.1V)
+v11=-0.1;
+
+v21=0.1;
+
+vo1=(R2/R1)*(v21-v11);
+
+vcm1=(v11+v21)/2;
+
+//For Second pair of inputs (v1, v2)=(4.9 V, 5.1V)
+
+v12=4.9;
+
+v22=5.1;
+
+vo2=(R2/R1)*(v22-v12);
+
+vcm2=(v12+v22)/2;
+
+//For Third pair of inputs (v1, v2)=(9.9 V, 10.1 V)
+
+v13=9.9;
+
+v23=10.1;
+
+vo3=(R2/R1)*(v23-v13);
+
+vcm3=(v13+v23)/2;
+
+printf("vo for (-0.1 V,+0.1 V)=%.2f V",vo1);
+
+printf("\nvo for (4.9 V,5.1 V)=%.2f V",vo2);
+
+printf("\nvo for (9.9 V,10.1 V)=%.2f V",vo3); \ No newline at end of file
diff --git a/929/CH2/EX2.8.b/Example2_8_b.sce b/929/CH2/EX2.8.b/Example2_8_b.sce
new file mode 100755
index 000000000..ccc1e8de9
--- /dev/null
+++ b/929/CH2/EX2.8.b/Example2_8_b.sce
@@ -0,0 +1,70 @@
+//Example 2.8(b)
+
+clear;
+
+clc;
+
+R1=10*10^3;
+
+R2=98*10^3;
+
+R3=9.9*10^3;
+
+R4=103*10^3;
+
+//For first pair of inputs (v1, v2)=(-0.1 V, +0.1V)
+v11=-0.1;
+
+v21=0.1;
+
+vo1=(R2/R1)*(v21-v11);
+
+vcm1=(v11+v21)/2;
+
+//For Second pair of inputs (v1, v2)=(4.9 V, 5.1V)
+
+v12=4.9;
+
+v22=5.1;
+
+vo2=(R2/R1)*(v22-v12);
+
+vcm2=(v12+v22)/2;
+
+//For Third pair of inputs (v1, v2)=(9.9 V, 10.1 V)
+
+v13=9.9;
+
+v23=10.1;
+
+vo3=(R2/R1)*(v23-v13);
+
+vcm3=(v13+v23)/2;
+
+//vO=A2*v2-A1*v1
+
+A2num=(1+(R2/R1));
+
+A2den=(1+(R3/R4));
+
+A2=A2num/A2den;
+
+A1=R2/R1;
+
+//For first pair of inputs (v1, v2)=(-0.1 V, +0.1V)
+
+vo1m=A2*v21-A1*v11;
+
+//For Second pair of inputs (v1, v2)=(4.9 V, 5.1V)
+
+vo2m=A2*v22-A1*v12;
+
+//For Third pair of inputs (v1, v2)=(9.9 V, 10.1 V)
+
+vo3m=A2*v23-A1*v13;
+
+printf("vo for (-0.1 V,+0.1 V)=%.3f V",vo1m);
+
+printf("\nvo for (4.9 V,5.1 V)=%.3f V",vo2m);
+
+printf("\nvo for (9.9 V,10.1 V)=%.3f V",vo3m); \ No newline at end of file
diff --git a/929/CH2/EX2.9/Example2_9.sce b/929/CH2/EX2.9/Example2_9.sce
new file mode 100755
index 000000000..b4fa9815f
--- /dev/null
+++ b/929/CH2/EX2.9/Example2_9.sce
@@ -0,0 +1,55 @@
+//Example 2.9
+
+clear;
+
+clc;
+
+R1=10*10^3;
+
+R3=R1;
+
+R2=100*10^3;
+
+R4=R2;
+
+p=0.01;
+
+emax=4*p;
+
+Adm1=R2/R1;
+
+Adm2n=emax*(R1+2*R2);
+
+Adm2d=2*(R1+R2);
+
+Adm2=1-(Adm2n/Adm2d);
+
+Admin=Adm1*Adm2;
+
+Acmax=(R2/(R1+R2))*emax;
+
+cmrrm=20*log10(Admin/Acmax);
+
+printf("(a) CMRR min=%.1f dB",cmrrm);
+
+//2.9(b)
+
+vdm=0;
+
+vcm=10;
+
+vO=vcm*Acmax+vdm*Admin;
+
+printf("\n(b) Output Error vO=%.3f V",vO);
+
+//2.9(c)
+
+//CMRR=20*log((1+(R2/R1))/emax) -> 80=20*log((1+(R2/R1))/emax) -> 4=log((1+(R2/R1))/emax) ->10^4=(1+(R2/R1))/emax -> emax=10^4/(1+(R2/R1))
+
+emax1=(1+(R2/R1))/(10^(4));
+
+p=emax1/4;
+
+pper=p*100;
+
+printf("\n(c) Required Resistance Tolerance=%.4f percent",pper); \ No newline at end of file