summaryrefslogtreecommitdiff
path: root/29/CH11
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /29/CH11
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 '29/CH11')
-rwxr-xr-x29/CH11/EX11.1/exa11_1.jpgbin0 -> 40330 bytes
-rwxr-xr-x29/CH11/EX11.1/exa11_1.sce9
-rwxr-xr-x29/CH11/EX11.10.a/exa11_10_a.sce21
-rwxr-xr-x29/CH11/EX11.10.b/exa11_10_b.sce30
-rwxr-xr-x29/CH11/EX11.11/exa11_11.sce17
-rwxr-xr-x29/CH11/EX11.12/exa11_12.sce15
-rwxr-xr-x29/CH11/EX11.13/exa11_13.sce7
-rwxr-xr-x29/CH11/EX11.14/exa11_14.sce31
-rwxr-xr-x29/CH11/EX11.15/exa11_15.sce42
-rwxr-xr-x29/CH11/EX11.16/exa11_16.sce16
-rwxr-xr-x29/CH11/EX11.17/exa11_17.sce16
-rwxr-xr-x29/CH11/EX11.18/exa11_18.sce30
-rwxr-xr-x29/CH11/EX11.19/exa11_19.sce8
-rwxr-xr-x29/CH11/EX11.2/exa11_2.sce13
-rwxr-xr-x29/CH11/EX11.21.a/exa11_21_a.sce17
-rwxr-xr-x29/CH11/EX11.21.b/exa11_21_b.jpgbin0 -> 48983 bytes
-rwxr-xr-x29/CH11/EX11.21.b/exa11_21_b.sce16
-rwxr-xr-x29/CH11/EX11.22/exa11_22.jpgbin0 -> 49859 bytes
-rwxr-xr-x29/CH11/EX11.22/exa11_22.sce18
-rwxr-xr-x29/CH11/EX11.24/exa11_24.jpgbin0 -> 28443 bytes
-rwxr-xr-x29/CH11/EX11.24/exa11_24.sce22
-rwxr-xr-x29/CH11/EX11.25/exa11_25.jpgbin0 -> 25327 bytes
-rwxr-xr-x29/CH11/EX11.25/exa11_25.sce14
-rwxr-xr-x29/CH11/EX11.26.i/exa11_26_i.jpgbin0 -> 33952 bytes
-rwxr-xr-x29/CH11/EX11.26.i/exa11_26_i.sce22
-rwxr-xr-x29/CH11/EX11.26.ii/exa11_26_ii.jpgbin0 -> 34493 bytes
-rwxr-xr-x29/CH11/EX11.26.ii/exa11_26_ii.sce21
-rwxr-xr-x29/CH11/EX11.27/exa11_27.jpgbin0 -> 42996 bytes
-rwxr-xr-x29/CH11/EX11.27/exa11_27.sce9
-rwxr-xr-x29/CH11/EX11.28/exa11_28.jpgbin0 -> 36955 bytes
-rwxr-xr-x29/CH11/EX11.28/exa11_28.sce9
-rwxr-xr-x29/CH11/EX11.29/exa11_29.jpgbin0 -> 35198 bytes
-rwxr-xr-x29/CH11/EX11.29/exa11_29.sce8
-rwxr-xr-x29/CH11/EX11.3/exa11_3.sce15
-rwxr-xr-x29/CH11/EX11.30/exa11_30.jpgbin0 -> 48271 bytes
-rwxr-xr-x29/CH11/EX11.30/exa11_30.sce8
-rwxr-xr-x29/CH11/EX11.31/exa11_31.sce38
-rwxr-xr-x29/CH11/EX11.31/exa11_31_compensated.jpgbin0 -> 47620 bytes
-rwxr-xr-x29/CH11/EX11.31/exa11_31_uncompensated.jpgbin0 -> 48178 bytes
-rwxr-xr-x29/CH11/EX11.32/exa11_32.jpgbin0 -> 48844 bytes
-rwxr-xr-x29/CH11/EX11.32/exa11_32.sce12
-rwxr-xr-x29/CH11/EX11.33/exa11_33.sce11
-rwxr-xr-x29/CH11/EX11.34/exa11_34.sce11
-rwxr-xr-x29/CH11/EX11.35/exa11_35.sce11
-rwxr-xr-x29/CH11/EX11.36/exa11_36.sce21
-rwxr-xr-x29/CH11/EX11.37/exa11_37.sce13
-rwxr-xr-x29/CH11/EX11.38/exa11_38.sce13
-rwxr-xr-x29/CH11/EX11.39/exa11_39.sce13
-rwxr-xr-x29/CH11/EX11.4/exa11_4.sce25
-rwxr-xr-x29/CH11/EX11.5/exa11_6.sce22
-rwxr-xr-x29/CH11/EX11.7/exa11_7.sce20
-rwxr-xr-x29/CH11/EX11.8/exa11_8.sce28
-rwxr-xr-x29/CH11/EX11.9/exa11_9.sce20
53 files changed, 692 insertions, 0 deletions
diff --git a/29/CH11/EX11.1/exa11_1.jpg b/29/CH11/EX11.1/exa11_1.jpg
new file mode 100755
index 000000000..a12212ed2
--- /dev/null
+++ b/29/CH11/EX11.1/exa11_1.jpg
Binary files differ
diff --git a/29/CH11/EX11.1/exa11_1.sce b/29/CH11/EX11.1/exa11_1.sce
new file mode 100755
index 000000000..7a9f5b62b
--- /dev/null
+++ b/29/CH11/EX11.1/exa11_1.sce
@@ -0,0 +1,9 @@
+//Caption:pole_zero_plot
+// example 11_1
+//page 468
+//transfer function:G(s)=((8*(s+3)*(s+4))/(s*(s+2)*(s^2+2*s+2)))
+s=%s;
+G=syslin('c',((8*(s+3)*(s+4))/(s*(s+2)*(s^2+2*s+2))));
+disp(G,"G(s)=");
+x=plzr(G)
+xgrid(2) \ No newline at end of file
diff --git a/29/CH11/EX11.10.a/exa11_10_a.sce b/29/CH11/EX11.10.a/exa11_10_a.sce
new file mode 100755
index 000000000..9016f0db2
--- /dev/null
+++ b/29/CH11/EX11.10.a/exa11_10_a.sce
@@ -0,0 +1,21 @@
+//Caption:calculate_tr,Tp,Mp
+//example 11_10_a
+//page 478
+s=%s;
+G=16/(s^2+1.6*s)
+H=1;
+CL=G/.H
+disp(CL,"C(s)/R(s)=");
+b=denom(CL)
+c=coeff(b)
+//Wn^2=c(1,1)
+Wn=sqrt(c(1,1))//natural frequency
+//2*zeta*Wn=c(1,2)
+zeta=c(1,2)/(2*Wn)//damping ratio
+Wd=Wn*sqrt(1-zeta^2)//damped frequency
+Mp=(exp(-(zeta*%pi)/sqrt(1-zeta^2)))*100//max. overshoot
+tr=(%pi-atan(sqrt(1-zeta^2)/zeta))/(Wn*sqrt(1-zeta^2))//rise time
+Tp=%pi/Wd//peak time
+disp(Tp,"peak time=");
+disp(Mp,"max. peak overshoot=")
+disp(tr,"rise time=") \ No newline at end of file
diff --git a/29/CH11/EX11.10.b/exa11_10_b.sce b/29/CH11/EX11.10.b/exa11_10_b.sce
new file mode 100755
index 000000000..c6ee7d48f
--- /dev/null
+++ b/29/CH11/EX11.10.b/exa11_10_b.sce
@@ -0,0 +1,30 @@
+//Caption:calculate_Td,tr,Tp,Mp
+//example 11_10_b
+//page 478
+s=%s;
+syms Td
+G=16/(s^2+1.6*s)
+G1=1+s*Td
+H=1;
+a=G*G1
+CL=a/.H
+CL=simple(CL)
+disp(CL,"C(s)/R(s)=");
+zeta=0.8//given
+//since zeta=0.8 so 2*zeta*Wn=1.6+16*Td
+Wn=sqrt(16)
+//so on solving
+Td=0.3
+//so transfer function takes the form:
+CL1=(16+4.8*s)/(s^2+6.4*s+6)
+disp(CL1,"C(s)/R(s)=");
+Wn1=sqrt(16)
+//2*zeta1*Wn1=6.4
+zeta1=6.4/(2*Wn1)//damping ratio
+Wd=Wn1*sqrt(1-zeta1^2)//damped frequency
+Mp=(exp(-(zeta1*%pi)/sqrt(1-zeta1^2)))*100//max. overshoot
+tr=(%pi-atan(sqrt(1-zeta1^2)/zeta1))/(Wn1*sqrt(1-zeta1^2))//rise time
+Tp=%pi/Wd//peak time
+disp(Tp,"peak time=");
+disp(Mp,"max. peak overshoot=")
+disp(tr,"rise time=")
diff --git a/29/CH11/EX11.11/exa11_11.sce b/29/CH11/EX11.11/exa11_11.sce
new file mode 100755
index 000000000..969992909
--- /dev/null
+++ b/29/CH11/EX11.11/exa11_11.sce
@@ -0,0 +1,17 @@
+//Caption:expression_for_unit_step_response
+// example 11_11
+//page 481
+syms G1 G2 G3 H1 t;
+s=%s;
+G1=s+1;
+G2=1/(s+2);
+H2=1/(s*(s+1));
+H1=1/(s+2);
+a=G1/(1+G1*H1);
+b=a/(1+a*H2)
+y=b*G2;
+disp(y,"C(s)/R(s)=")
+//for unit step response R(s)=1/s;
+C=y*(1/s)
+c=ilaplace(C,s,t)
+disp(c,"expression_for_unit_step_response_is=") \ No newline at end of file
diff --git a/29/CH11/EX11.12/exa11_12.sce b/29/CH11/EX11.12/exa11_12.sce
new file mode 100755
index 000000000..d08167d37
--- /dev/null
+++ b/29/CH11/EX11.12/exa11_12.sce
@@ -0,0 +1,15 @@
+//Caption:unit_step_and_impulse_response
+//example 11_12
+//page 482
+s=%s;
+syms t;
+G=(4*s+1)/(4*s^2)
+H=1;
+CL=G/.H
+disp(CL,"C(s)/R(s)=")
+y=ilaplace(CL,s,t);
+disp(y,"unit impulse response,c(t)=");
+//for unit step response R(s)=1/s;
+C=CL*(1/s)
+c=ilaplace(C,s,t)
+disp(c,"expression_for_unit_step_response_is=") \ No newline at end of file
diff --git a/29/CH11/EX11.13/exa11_13.sce b/29/CH11/EX11.13/exa11_13.sce
new file mode 100755
index 000000000..7298b0815
--- /dev/null
+++ b/29/CH11/EX11.13/exa11_13.sce
@@ -0,0 +1,7 @@
+//Caption:determine_transfer_function
+//example 11_13
+//page 483
+syms t;
+f=exp(-t)*(1-cos(2*t))
+F=laplace(f,t,s);
+disp(F,"F(s)=") \ No newline at end of file
diff --git a/29/CH11/EX11.14/exa11_14.sce b/29/CH11/EX11.14/exa11_14.sce
new file mode 100755
index 000000000..5dd2a2c1b
--- /dev/null
+++ b/29/CH11/EX11.14/exa11_14.sce
@@ -0,0 +1,31 @@
+//caption:determine_Wn,Wd,Tp,zeta_and_steady_state_error
+//example 11_14
+//page 484
+s=%s;
+syms t;
+G=20/((s+5)*(s+1))
+H=1;
+CL=G/.H
+disp(CL,"C(s)/R(s)=")
+b=denom(CL)
+disp(0,b,"=","the char. eq is:",)
+Wn=sqrt(25)//natural_frequency
+//2*zeta*Wn=6
+zeta=6/(2*Wn);//damping ratio
+d=zeta*Wn;//damping_factor
+z=sqrt(1-zeta^2);
+Wd=Wn*z;//damped_frequency_of_oscillation
+Mp=exp((-zeta*%pi)/z)*100;//%_max.peak_overshoot
+Tp=%pi/Wd//peak time
+tfirst=(2*%pi)/Wd //time for first under shoot
+period=(2*%pi)/Wd //period of oscillation
+ts=4/(zeta*Wn)//settling time
+N=(Wd/(2*%pi))*ts//no. of oscillations completed before reaching steady state
+disp(Wn,"natural frequency=");
+disp(zeta,"damping ratio=");
+disp(Wd,"damped frequency of oscillation=");
+disp(Tp,"peak time=");
+disp(Mp,"%_max.peak overshoot=");
+disp(tfirst,"time for first under shoot=");
+disp(period,"period of oscillation=");
+disp(N,"no. of oscillations completed before reaching steady state="); \ No newline at end of file
diff --git a/29/CH11/EX11.15/exa11_15.sce b/29/CH11/EX11.15/exa11_15.sce
new file mode 100755
index 000000000..eed6c5763
--- /dev/null
+++ b/29/CH11/EX11.15/exa11_15.sce
@@ -0,0 +1,42 @@
+//caption:determine_Wn,Wd,zeta_and_steady_state_error
+//example 11_15
+//page 484
+s=%s;
+G=sym('25/(s*(s+5))');
+G=simple(G);
+H=1;
+CL=G/.H;
+CL=simple(CL);
+disp(CL,"C(s)/R(s)=");
+printf("the char. eq is:")
+disp("s^2+5*s+25")
+Wn=sqrt(25)//natural_frequency
+//2*zeta*Wn=5
+zeta=5/(2*Wn);//damping ratio
+d=zeta*Wn;//damping_factor
+z=sqrt(1-zeta^2);
+Wd=Wn*z;//damped_frequency_of_oscillation
+Mp=exp((-zeta*%pi)/z)*100;//%_max.peak_overshoot
+//steady state error for unit ramp input is:Ess= (2*zeta/Wn)
+Ess=(2*zeta/Wn);//steady state error
+disp("part(a):")
+disp(Wn,"natural_frequency=");
+disp(zeta,"damping ratio=");
+disp(Wd,"damped_frequency_of_oscillation=");
+disp(Mp,"%_max.peak_overshoot=");
+disp(Ess,"steady state error=");
+//if damping ratio is increased from 0.5 to 0.75 by incorporating tachometer feedback
+zeta=0.75;
+H1=sym('s*Kt')//tachometer_feedback
+CL1=G/(1+G*H1);
+CL1=simple(CL1);
+CL2=CL1/(1+H*CL1);
+CL2=simple(CL2);
+disp(CL2,"C(s)/R(s)=");
+Wn=sqrt(25);
+//2*zeta*Wn=25*Kt+5;
+Kt=(2*zeta*Wn-5)/25;//tachometer_gain
+Mp1=exp((-zeta*%pi)/sqrt(1-zeta^2))*100;//%_peak_overshoot
+disp("After applying tachometer feedback:")
+disp(Kt,"tachometer_gain=");
+disp(Mp1,"%_peak_overshoot=");
diff --git a/29/CH11/EX11.16/exa11_16.sce b/29/CH11/EX11.16/exa11_16.sce
new file mode 100755
index 000000000..d4fdcb636
--- /dev/null
+++ b/29/CH11/EX11.16/exa11_16.sce
@@ -0,0 +1,16 @@
+//caption:determine_Kp_Kv_Ka
+//example 11_16
+//page 485
+s=%s;
+syms t;
+num=10
+den=sym('s^2+6*s+10');
+GH=num/den;
+GH=simple(GH);
+disp(GH,"G(s)H(s)=");
+Kp=limit(GH,s,0);//static positional error coefficient
+disp(Kp,"static positional error coefficient=");
+Kv=limit(s*GH,s,0);//static velocity error coefficient
+disp(Kv,"static velocity error coefficient=");
+Ka=limit(s^2*GH,s,0);//static acceleration error coefficient
+disp(Ka,"static acceleration error coefficient=");
diff --git a/29/CH11/EX11.17/exa11_17.sce b/29/CH11/EX11.17/exa11_17.sce
new file mode 100755
index 000000000..6ae2d6118
--- /dev/null
+++ b/29/CH11/EX11.17/exa11_17.sce
@@ -0,0 +1,16 @@
+//caption:determine_Kp_Kv_Ka
+//example 11_16
+//page 485
+s=%s;
+syms t;
+num=sym('100*(s+2)*(s+40)');
+den=sym('(s^3*(s^2+4*s+200))');
+GH=num/den;
+GH=simple(GH);
+disp(GH,"G(s)H(s)=");
+Kp=limit(GH,s,0);//static positional error coefficient
+disp(Kp,"static positional error coefficient=");
+Kv=limit(s*GH,s,0);//static velocity error coefficient
+disp(Kv,"static velocity error coefficient=");
+Ka=limit(s^2*GH,s,0);//static acceleration error coefficient
+disp(Ka,"static acceleration error coefficient=");
diff --git a/29/CH11/EX11.18/exa11_18.sce b/29/CH11/EX11.18/exa11_18.sce
new file mode 100755
index 000000000..d7dc190ce
--- /dev/null
+++ b/29/CH11/EX11.18/exa11_18.sce
@@ -0,0 +1,30 @@
+//caption:determine_Kp_Kv_Ka
+//example 11_18
+//page 488
+s=%s;
+syms t;
+num=sym('2*(s^2+3*s+20)');
+den=sym('s*(s+2)*(s^2+4*s+10)');
+GH=num/den;
+GH=simple(GH);
+disp(GH,"G(s)H(s)=");
+input1=5;
+Kp=limit(GH,s,0);//static positional error coefficient
+Ess=5*(1/(1+Kp));//steady state error
+e=(1/(%inf+1));
+e=0;
+Ess=e;
+disp(Kp,"static positional error coefficient=");
+disp(Ess,"steady state error=");
+input2=4*t;
+Kv=limit(s*GH,s,0);//static velocity error coefficient
+Ess=(1/Kv)*4;//steady state error
+disp(Kv,"static velocity error coefficient=");
+disp(Ess,"steady state error=");
+input3=(4*t^2)/2;
+Ka=limit(s^2*GH,s,0);//static acceleration error coefficient
+Ess=(1/Ka)*4;//steady state error
+disp(Ka,"static acceleration error coefficient=");
+disp("steady state error=");
+disp("infinity")
+
diff --git a/29/CH11/EX11.19/exa11_19.sce b/29/CH11/EX11.19/exa11_19.sce
new file mode 100755
index 000000000..4f36c748c
--- /dev/null
+++ b/29/CH11/EX11.19/exa11_19.sce
@@ -0,0 +1,8 @@
+//Caption:determine_transfer_function
+//example 11_19
+//page 489
+syms t;
+s=%s;
+c=0.5+(1.25*exp(-t))-(1.75*exp(-12*t));
+C=laplace(c,t,s);
+disp(C,"C(s)=") \ No newline at end of file
diff --git a/29/CH11/EX11.2/exa11_2.sce b/29/CH11/EX11.2/exa11_2.sce
new file mode 100755
index 000000000..f0cc432e2
--- /dev/null
+++ b/29/CH11/EX11.2/exa11_2.sce
@@ -0,0 +1,13 @@
+//Caption:transfer_function
+// example 11_2
+//page 469
+syms G1 G2 G3 H1;
+s=%s;
+G1=4/(s*(s+4));
+G2=s+1.2;
+G3=s+0.8;
+H1=1;
+H2=(G2+G3);
+a=G1/.H1;
+y=a/(1+a*H2)
+disp(y,"C(s)/R(s)=") \ No newline at end of file
diff --git a/29/CH11/EX11.21.a/exa11_21_a.sce b/29/CH11/EX11.21.a/exa11_21_a.sce
new file mode 100755
index 000000000..8d455ff5a
--- /dev/null
+++ b/29/CH11/EX11.21.a/exa11_21_a.sce
@@ -0,0 +1,17 @@
+//Caption:roots_of_characterstics_equation
+//example 11_21_a
+//page 491
+s=%s;
+num=210
+den=sym('s*(s+2)*(s^2+12*s+6)');
+G=num/den;
+G=simple(G);
+H=1;
+n1=poly([210],'s',"coeff");
+d1=poly([210 192 390 44 1],'s',"coeff");
+CL=syslin('c',n1,d1)
+disp(CL,"C(s)/R(s)=")
+b=denom(CL)
+disp(0,"=",b,"the char. eq is:",)
+r=roots(b);
+disp(r,"roots of char. eq. are=");
diff --git a/29/CH11/EX11.21.b/exa11_21_b.jpg b/29/CH11/EX11.21.b/exa11_21_b.jpg
new file mode 100755
index 000000000..88c73dff9
--- /dev/null
+++ b/29/CH11/EX11.21.b/exa11_21_b.jpg
Binary files differ
diff --git a/29/CH11/EX11.21.b/exa11_21_b.sce b/29/CH11/EX11.21.b/exa11_21_b.sce
new file mode 100755
index 000000000..b7567a3d7
--- /dev/null
+++ b/29/CH11/EX11.21.b/exa11_21_b.sce
@@ -0,0 +1,16 @@
+//Caption:bode_plot
+//example 11_21_b
+//page 491
+s=%s;
+num=210
+den=(s*(s+2)*(s^2+12*s+6));
+g=num/den;
+G=syslin('c',g)
+fmin=0.01;
+fmax=100;
+bode(G, fmin, fmax)
+show_margins(G)
+gm=g_margin(G)
+pm=p_margin(G)
+disp(gm,"gain_margin=");
+disp(pm,"phase_margin="); \ No newline at end of file
diff --git a/29/CH11/EX11.22/exa11_22.jpg b/29/CH11/EX11.22/exa11_22.jpg
new file mode 100755
index 000000000..fcab09709
--- /dev/null
+++ b/29/CH11/EX11.22/exa11_22.jpg
Binary files differ
diff --git a/29/CH11/EX11.22/exa11_22.sce b/29/CH11/EX11.22/exa11_22.sce
new file mode 100755
index 000000000..a447467f0
--- /dev/null
+++ b/29/CH11/EX11.22/exa11_22.sce
@@ -0,0 +1,18 @@
+//caption:gain_margin_and_phase_margin
+//example 11_22
+//page 493
+s=%s;
+g=((2*(s+0.25))/(s^2*(s+1)*(s+0.5)));
+G=syslin('c',g)
+fmin=0.1;
+fmax=100;
+bode(G, fmin, fmax)
+[gm,freqGM]=g_margin(G);
+[pm,freqPM]=p_margin(G);
+show_margins(G);
+disp(gm,"gain_margin=");
+disp((freqGM*2*%pi),"gain_margin_freq=");
+disp(pm,"phase_margin=");
+disp((freqPM*2*%pi),"phase_margin_freq=");
+show_margins(G);
+disp("since gain and phase margin are both negative so system is unstable")
diff --git a/29/CH11/EX11.24/exa11_24.jpg b/29/CH11/EX11.24/exa11_24.jpg
new file mode 100755
index 000000000..d03e674ba
--- /dev/null
+++ b/29/CH11/EX11.24/exa11_24.jpg
Binary files differ
diff --git a/29/CH11/EX11.24/exa11_24.sce b/29/CH11/EX11.24/exa11_24.sce
new file mode 100755
index 000000000..5dde825b9
--- /dev/null
+++ b/29/CH11/EX11.24/exa11_24.sce
@@ -0,0 +1,22 @@
+//caption:stability_using_Nyquist_criterion
+//example 11_24
+//page 496
+clf;
+s=%s;
+s1=-s;
+g=50/((s+1)*(s+2));
+g1=50/((s1+1)*(s1+2));
+GH=syslin('c',g)
+GH1=syslin('c',g1)
+nyquist(GH);
+nyquist(GH1);
+mtlb_axis([-5 30 -20 20]);
+xtitle('Nyquist plot of 50/((s+1)*(s+2))')
+figure;
+show_margins(GH,'nyquist')
+disp("since the point(-1+%i0) is not encircled by Nyquist plot ,so N=0 and P=0(given)")
+N=0;//no. of encirclement of -1+%i0 by G(s)H(s) plot
+P=0;//no. of poles of G(s)H(s) with positive real part
+Z=P-N;//np.of zeros of 1+G(s)H(s)=0 with positive real part
+disp(Z,"Z=")
+disp("as Z=0,there are no roots of closed loop characterstics eq having positive real part, hence system is stable.") \ No newline at end of file
diff --git a/29/CH11/EX11.25/exa11_25.jpg b/29/CH11/EX11.25/exa11_25.jpg
new file mode 100755
index 000000000..b2eccce6c
--- /dev/null
+++ b/29/CH11/EX11.25/exa11_25.jpg
Binary files differ
diff --git a/29/CH11/EX11.25/exa11_25.sce b/29/CH11/EX11.25/exa11_25.sce
new file mode 100755
index 000000000..796050712
--- /dev/null
+++ b/29/CH11/EX11.25/exa11_25.sce
@@ -0,0 +1,14 @@
+//caption:stability_using_Nyquist_criterion
+//example 11_25
+//page 497
+clf();
+s=%s;
+s1=-s;
+g=(2.2/(s*(s+1)*(s^2+2*s+2)))
+g1=(2.2/(s1*(s1+1)*(s1^2+2*s1+2)))
+GH=syslin('c',g);
+GH1=syslin('c',g1);
+nyquist(GH);
+nyquist(GH1);
+mtlb_axis([-2.5 0.2 -75 75]);
+disp("as the nyquist plot passes through the point -1+%i*0, so system is marginally stable and output represents sustained oscillations.") \ No newline at end of file
diff --git a/29/CH11/EX11.26.i/exa11_26_i.jpg b/29/CH11/EX11.26.i/exa11_26_i.jpg
new file mode 100755
index 000000000..6716f0a49
--- /dev/null
+++ b/29/CH11/EX11.26.i/exa11_26_i.jpg
Binary files differ
diff --git a/29/CH11/EX11.26.i/exa11_26_i.sce b/29/CH11/EX11.26.i/exa11_26_i.sce
new file mode 100755
index 000000000..1b8222b22
--- /dev/null
+++ b/29/CH11/EX11.26.i/exa11_26_i.sce
@@ -0,0 +1,22 @@
+//caption:stability_using_Nyquist_criterion
+//example 11_26_i
+//page 497
+clf();
+s=%s;
+s1=-s;
+disp("for K=10")
+g=(10*(s-1))/((s+2)*(s+3));
+g1=(10*(s1-1))/((s1+2)*(s1+3));
+GH=syslin('c',g);
+GH1=syslin('c',g1);
+nyquist(GH);
+nyquist(GH1);
+mtlb_axis([-2 2 -2.5 2.5]);
+xtitle('Nyquist plot of (10*(s-1))/((s+2)*(s+3));')
+disp("since the point(-1+%i0) is encircled clockwise by Nyquist plot ,so N=-1 and P=1(given)")
+N=-1;//no. of encirclement of -1+%i0 by G(s)H(s) plot anticlockwise
+P=0;//no. of poles of G(s)H(s) with positive real part
+Z=P-N;//np.of zeros of 1+G(s)H(s)=0 with positive real part
+disp(Z,"Z=")
+disp("as Z=1,there is one roots of closed loop characterstics eq having positive real part, hence system is unstable.")
+
diff --git a/29/CH11/EX11.26.ii/exa11_26_ii.jpg b/29/CH11/EX11.26.ii/exa11_26_ii.jpg
new file mode 100755
index 000000000..5dd6a5001
--- /dev/null
+++ b/29/CH11/EX11.26.ii/exa11_26_ii.jpg
Binary files differ
diff --git a/29/CH11/EX11.26.ii/exa11_26_ii.sce b/29/CH11/EX11.26.ii/exa11_26_ii.sce
new file mode 100755
index 000000000..42b1ba732
--- /dev/null
+++ b/29/CH11/EX11.26.ii/exa11_26_ii.sce
@@ -0,0 +1,21 @@
+//caption:stability_using_Nyquist_criterion
+//example 11_26_ii
+//page 497
+clf();
+s=%s;
+s1=-s;
+disp("for K=4")
+g=(4*(s-1))/((s+2)*(s+3));
+g1=(4*(s1-1))/((s1+2)*(s1+3));
+GH=syslin('c',g);
+GH1=syslin('c',g1);
+nyquist(GH);
+nyquist(GH1);
+mtlb_axis([-1 1 -1 1]);
+xtitle('Nyquist plot of (2.5*(s+1))/((s+0.5)*(s-2))')
+disp("since the point(-1+%i0) is encircled anticlockwise by Nyquist plot ,so N=1 and P=1(given)")
+N=0;//no. of encirclement of -1+%i0 by G(s)H(s) plot anticlockwise
+P=0;//no. of poles of G(s)H(s) with positive real part
+Z=P-N;//np.of zeros of 1+G(s)H(s)=0 with positive real part
+disp(Z,"Z=")
+disp("as Z=0,there are no roots of closed loop characterstics eq having positive real part, hence system is stable.")
diff --git a/29/CH11/EX11.27/exa11_27.jpg b/29/CH11/EX11.27/exa11_27.jpg
new file mode 100755
index 000000000..9df94c382
--- /dev/null
+++ b/29/CH11/EX11.27/exa11_27.jpg
Binary files differ
diff --git a/29/CH11/EX11.27/exa11_27.sce b/29/CH11/EX11.27/exa11_27.sce
new file mode 100755
index 000000000..92db16f7b
--- /dev/null
+++ b/29/CH11/EX11.27/exa11_27.sce
@@ -0,0 +1,9 @@
+//caption:root_locus
+//example 11_27
+//page 499
+s=%s;
+clf();
+g=((s^2+4)/(s*(s+1)));
+G=syslin('c',g)
+evans(g,200)
+xgrid(2)
diff --git a/29/CH11/EX11.28/exa11_28.jpg b/29/CH11/EX11.28/exa11_28.jpg
new file mode 100755
index 000000000..6349acdae
--- /dev/null
+++ b/29/CH11/EX11.28/exa11_28.jpg
Binary files differ
diff --git a/29/CH11/EX11.28/exa11_28.sce b/29/CH11/EX11.28/exa11_28.sce
new file mode 100755
index 000000000..7d271c3ca
--- /dev/null
+++ b/29/CH11/EX11.28/exa11_28.sce
@@ -0,0 +1,9 @@
+//caption:root_locus
+//example 11_28
+//page 501
+s=%s;
+clf();
+g=1/(s*(s+2)*(s^2+2*s+2));
+G=syslin('c',g)
+evans(g,200)
+xgrid(2)
diff --git a/29/CH11/EX11.29/exa11_29.jpg b/29/CH11/EX11.29/exa11_29.jpg
new file mode 100755
index 000000000..ee14900a3
--- /dev/null
+++ b/29/CH11/EX11.29/exa11_29.jpg
Binary files differ
diff --git a/29/CH11/EX11.29/exa11_29.sce b/29/CH11/EX11.29/exa11_29.sce
new file mode 100755
index 000000000..ffbaa88e8
--- /dev/null
+++ b/29/CH11/EX11.29/exa11_29.sce
@@ -0,0 +1,8 @@
+//caption:root_locus
+//example 11_29
+//page 502
+s=%s;
+g=1/(s*(s+1)*(s+3));
+G=syslin('c',g)
+evans(g,200)
+xgrid(2) \ No newline at end of file
diff --git a/29/CH11/EX11.3/exa11_3.sce b/29/CH11/EX11.3/exa11_3.sce
new file mode 100755
index 000000000..96746dbea
--- /dev/null
+++ b/29/CH11/EX11.3/exa11_3.sce
@@ -0,0 +1,15 @@
+//Caption:transfer_function
+// example 11_3
+//page 470
+syms G1 G2 G3 H1;
+s=%s;
+G1=4;
+G2=s
+G3=1/(s*(s+2));
+H1=0.5;
+H2=1;
+a=(G1+G2);
+b=(a*G3);
+c=b/.H1;
+y=c/(1+c*H2)
+disp(y,"C(s)/R(s)=") \ No newline at end of file
diff --git a/29/CH11/EX11.30/exa11_30.jpg b/29/CH11/EX11.30/exa11_30.jpg
new file mode 100755
index 000000000..53e64a179
--- /dev/null
+++ b/29/CH11/EX11.30/exa11_30.jpg
Binary files differ
diff --git a/29/CH11/EX11.30/exa11_30.sce b/29/CH11/EX11.30/exa11_30.sce
new file mode 100755
index 000000000..0d914079e
--- /dev/null
+++ b/29/CH11/EX11.30/exa11_30.sce
@@ -0,0 +1,8 @@
+//caption:root_locus
+//example 11_30
+//page 503
+s=%s;
+g=1/(s*(s+4)*(s^2+4*s+13));
+G=syslin('c',g)
+evans(g,200)
+xgrid(2) \ No newline at end of file
diff --git a/29/CH11/EX11.31/exa11_31.sce b/29/CH11/EX11.31/exa11_31.sce
new file mode 100755
index 000000000..a1ed17813
--- /dev/null
+++ b/29/CH11/EX11.31/exa11_31.sce
@@ -0,0 +1,38 @@
+//caption:design_lead_compensator
+//example 11_31
+//page 339
+s=%s;
+clf();
+syms K;
+g=(K/(s*(1+0.2*s)));
+Kv=limit(s*g,s,0);//static velocity error coefficient
+//since Kv=10
+K=10;
+g=(10/(s*(1+0.2*s)));
+G=syslin('c',g)
+fmin=0.01;
+fmax=100;
+bode(G, fmin, fmax)
+show_margins(G)
+[gm,freqGM]=g_margin(G);
+[pm,freqPM]=p_margin(G);
+disp(gm,"gain_margin=");
+disp((freqGM*2*%pi),"gain_margin_freq=");
+disp(pm,"phase_margin=");
+disp((freqPM*2*%pi),"phase_margin_freq_or_gain_cross_over_frequency=");
+disp("since P.M is less than desired value so we need phase lead network ")
+disp("selecting zero of lead compensating network at w=5.5rad/sec and pole at w=13.8rad/sec and applying gain to account attenuatin factor .")
+gc=(1+0.18*s)/(1+0.072*s)
+Gc=syslin('c',gc)
+disp(Gc,"transfer function of lead compensator=");
+G1=G*Gc
+disp(G1,"overall transfer function=");
+fmin=0.01;
+fmax=100;
+figure();
+bode(G1, fmin, fmax);
+show_margins(G1)
+[gm,freqGM]=g_margin(G1);
+[pm,freqPM]=p_margin(G1);
+disp(pm,"phase_margin_of_compensated_system=");
+disp((freqPM*2*%pi),"gain_cross_over_frequency="); \ No newline at end of file
diff --git a/29/CH11/EX11.31/exa11_31_compensated.jpg b/29/CH11/EX11.31/exa11_31_compensated.jpg
new file mode 100755
index 000000000..8d5c8ae82
--- /dev/null
+++ b/29/CH11/EX11.31/exa11_31_compensated.jpg
Binary files differ
diff --git a/29/CH11/EX11.31/exa11_31_uncompensated.jpg b/29/CH11/EX11.31/exa11_31_uncompensated.jpg
new file mode 100755
index 000000000..50b40a888
--- /dev/null
+++ b/29/CH11/EX11.31/exa11_31_uncompensated.jpg
Binary files differ
diff --git a/29/CH11/EX11.32/exa11_32.jpg b/29/CH11/EX11.32/exa11_32.jpg
new file mode 100755
index 000000000..3f9e2f71f
--- /dev/null
+++ b/29/CH11/EX11.32/exa11_32.jpg
Binary files differ
diff --git a/29/CH11/EX11.32/exa11_32.sce b/29/CH11/EX11.32/exa11_32.sce
new file mode 100755
index 000000000..b145d6288
--- /dev/null
+++ b/29/CH11/EX11.32/exa11_32.sce
@@ -0,0 +1,12 @@
+//caption:nicholas_chart
+//example 11_32
+//page 507
+s=%s;
+num=20;
+den=(s*(s+2)*(s+5))
+g=num/den
+G=syslin('c',g)
+fmin=0.01
+fmax=100
+black(G,fmin,fmax)
+xgrid(2)
diff --git a/29/CH11/EX11.33/exa11_33.sce b/29/CH11/EX11.33/exa11_33.sce
new file mode 100755
index 000000000..69358878b
--- /dev/null
+++ b/29/CH11/EX11.33/exa11_33.sce
@@ -0,0 +1,11 @@
+//caption:obtain_state_matrix
+//example 11_33
+//page 509
+s=%s;
+g=(s+2)/((s+1)*(s+3));
+CL=syslin('c',g);
+disp(CL,"C(s)/R(s)=");
+SS=tf2ss(CL)
+[Ac,Bc,U,ind]=canon(SS(2),SS(3))
+disp(SS,"state space matrix=")
+disp(Ac,"Ac",Bc,"Bc",U,"U",ind,"ind") \ No newline at end of file
diff --git a/29/CH11/EX11.34/exa11_34.sce b/29/CH11/EX11.34/exa11_34.sce
new file mode 100755
index 000000000..40344a3e4
--- /dev/null
+++ b/29/CH11/EX11.34/exa11_34.sce
@@ -0,0 +1,11 @@
+//caption:obtain_state_matrix
+//example 11_34
+//page 509
+s=%s;
+g=(s^2+s+2)/(s^3+9*s^2+26*s+24);
+CL=syslin('c',g);
+disp(CL,"C(s)/R(s)=");
+SS=tf2ss(CL)
+[Ac,Bc,U,ind]=canon(SS(2),SS(3))
+disp(SS,"state space matrix=")
+disp(Ac,"Ac",Bc,"Bc",U,"U",ind,"ind") \ No newline at end of file
diff --git a/29/CH11/EX11.35/exa11_35.sce b/29/CH11/EX11.35/exa11_35.sce
new file mode 100755
index 000000000..78c235041
--- /dev/null
+++ b/29/CH11/EX11.35/exa11_35.sce
@@ -0,0 +1,11 @@
+//caption:obtain_state_matrix
+//example 11_35
+//page 510
+s=%s;
+g=1/(s^2+2*s+5);
+CL=syslin('c',g);
+disp(CL,"C(s)/R(s)=");
+SS=tf2ss(CL)
+[Ac,Bc,U,ind]=canon(SS(2),SS(3))
+disp(SS,"state space matrix=")
+disp(Ac,"Ac",Bc,"Bc",U,"U",ind,"ind") \ No newline at end of file
diff --git a/29/CH11/EX11.36/exa11_36.sce b/29/CH11/EX11.36/exa11_36.sce
new file mode 100755
index 000000000..4ae1383d8
--- /dev/null
+++ b/29/CH11/EX11.36/exa11_36.sce
@@ -0,0 +1,21 @@
+//caption:state_transition_matrix
+//example 11_36
+//page 511
+s=%s;
+syms t
+A=[1 4;-2 -5]
+[r c]=size(A);//size of matrix A
+p=s*eye(r,c)-A;//s*I-A where I is identity matrix
+q=det(p)//determinant of sI-A
+r=inv(p)//inverse of sI-A
+//for calculating state transistion matrix
+ip=[0 0;0 0]
+i=1;j=1;
+for i=1:2
+ for j=1:2
+ ip(i,j)=ilaplace(r(i,j),s,t);
+ j=j+1;
+ end
+ i=i+1;
+end
+disp(ip,"state transistion matrix,ip(t)="); \ No newline at end of file
diff --git a/29/CH11/EX11.37/exa11_37.sce b/29/CH11/EX11.37/exa11_37.sce
new file mode 100755
index 000000000..14abd3a88
--- /dev/null
+++ b/29/CH11/EX11.37/exa11_37.sce
@@ -0,0 +1,13 @@
+//caption:check_for_contrallability_of_system
+//example 11_37
+//page 512
+A=[1 1;0 -1]
+B=[1;0]
+P=cont_mat(A,B);
+disp(P,"Controllability Matrix=");
+d=determ(P)
+if d==0
+ printf("matrix is singular, so system is uncontrollable");
+else
+ printf("system is controllable");
+end; \ No newline at end of file
diff --git a/29/CH11/EX11.38/exa11_38.sce b/29/CH11/EX11.38/exa11_38.sce
new file mode 100755
index 000000000..7ab10215a
--- /dev/null
+++ b/29/CH11/EX11.38/exa11_38.sce
@@ -0,0 +1,13 @@
+//caption:determine_transfer_function
+//example 11_38
+//page 513
+s=%s
+A=[-5 1;-6 0]
+B=[1;2]
+C=[2 1]
+D=0;
+[r c]=size(A);//size of matrix A
+p=s*eye(r,c)-A;//s*I-A where I is identity matrix
+r=inv(p)//inverse of sI-A
+G=C*r*B+D//transfer matrix
+disp(G,"transfer matrix=")
diff --git a/29/CH11/EX11.39/exa11_39.sce b/29/CH11/EX11.39/exa11_39.sce
new file mode 100755
index 000000000..93a54ce28
--- /dev/null
+++ b/29/CH11/EX11.39/exa11_39.sce
@@ -0,0 +1,13 @@
+//caption:determine_transfer_matrix
+//example 11_39
+//page 513
+s=%s
+A=[0 1;-6 -5]
+B=[0;1]
+C=[2 1]
+D=0;
+[r c]=size(A);//size of matrix A
+p=s*eye(r,c)-A;//s*I-A where I is identity matrix
+r=inv(p)//inverse of sI-A
+G=C*r*B+D//transfer matrix
+disp(G,"transfer matrix=")
diff --git a/29/CH11/EX11.4/exa11_4.sce b/29/CH11/EX11.4/exa11_4.sce
new file mode 100755
index 000000000..b8eda80c9
--- /dev/null
+++ b/29/CH11/EX11.4/exa11_4.sce
@@ -0,0 +1,25 @@
+//caption:determine_Wn,zeta_and_Mp
+//example 11_4
+//page 471
+s=%s;
+num=1;
+den=sym('s*(1+0.5*s)*(1+0.2*s)');
+c=num/den;
+c=simple(c);
+disp(c,"C(s)/E(s)=");
+G=c;
+H=1;
+CL=G/(1+G*H);
+CL=simple(CL);
+disp(CL,"C(s)/R(s)=");
+A=pfss((10/(s^3+7*s^2+10*s+10)));
+d=denom(A(1));
+b=coeff(denom(A(1)))
+printf("for oscillatory roots:")
+Wn=sqrt(b(1,1));//natural_frequency
+//2*zeta*Wn=1.5;
+zeta=1.5/(2*Wn);//damping ratio
+Mp=exp((-zeta*%pi)/sqrt(1-zeta^2))*100;//%_peak_overshoot
+disp(Wn,"natural_frequency,Wn=");
+disp(zeta,"damping ratio,zeta=");
+disp(Mp,"%_peak_overshoot,Mp="); \ No newline at end of file
diff --git a/29/CH11/EX11.5/exa11_6.sce b/29/CH11/EX11.5/exa11_6.sce
new file mode 100755
index 000000000..63e92b1d5
--- /dev/null
+++ b/29/CH11/EX11.5/exa11_6.sce
@@ -0,0 +1,22 @@
+//Caption:time_response_for_unit_step_function
+//example 11_6
+//page 474
+s=%s;
+syms t;
+G=(s+2)/(s*(s+1))
+H=1;
+CL=G/.H
+disp(CL,"C(s)/R(s)=")
+y=ilaplace(CL,s,t);
+disp(y,"c(t)=");
+b=denom(CL)
+c=coeff(b)
+//Wn^2=c(1,1)
+Wn=sqrt(c(1,1))//natural frequency
+//2*zeta*Wn=c(1,2)
+zeta=c(1,2)/(2*Wn)//damping ratio
+Wd=Wn*sqrt(1-zeta^2)//damped frequency
+tr=(%pi-atan(sqrt(1-zeta^2)/zeta))/(Wn*sqrt(1-zeta^2))
+Mp=(exp(-(zeta*%pi)/sqrt(1-zeta^2)))*100//max. overshoot
+disp(tr,"rise time=");
+disp(Mp,"max. peak overshoot="); \ No newline at end of file
diff --git a/29/CH11/EX11.7/exa11_7.sce b/29/CH11/EX11.7/exa11_7.sce
new file mode 100755
index 000000000..ee1900a1b
--- /dev/null
+++ b/29/CH11/EX11.7/exa11_7.sce
@@ -0,0 +1,20 @@
+//Caption:time_response_for_unit_step_function
+//example 11_7
+//page 475
+s=%s;
+syms t;
+CL=(s+2)/(s^2+2*s+2)
+disp(CL,"C(s)/R(s)=")
+y=ilaplace(CL,s,t);
+disp(y,"c(t)=");
+b=denom(CL)
+c=coeff(b)
+//Wn^2=c(1,1)
+Wn=sqrt(c(1,1))//natural frequency
+//2*zeta*Wn=c(1,2)
+zeta=c(1,2)/(2*Wn)//damping ratio
+Wd=Wn*sqrt(1-zeta^2)//damped frequency
+Tp=%pi/Wd//peak time
+Mp=(exp(-(zeta*%pi)/sqrt(1-zeta^2)))*100//max. overshoot
+disp(Tp,"peak time=");
+disp(Mp,"max. peak overshoot=") \ No newline at end of file
diff --git a/29/CH11/EX11.8/exa11_8.sce b/29/CH11/EX11.8/exa11_8.sce
new file mode 100755
index 000000000..2bd7e7fef
--- /dev/null
+++ b/29/CH11/EX11.8/exa11_8.sce
@@ -0,0 +1,28 @@
+//Caption:time_response_for_unit_step_function
+//example 11_8
+//page 476
+s=%s;
+syms t;
+G=(20)/((s+1)*(s+5))
+H=1;
+CL=G/.H
+disp(CL,"C(s)/R(s)=")
+y=ilaplace(CL,s,t);
+disp(y,"c(t)=");
+b=denom(CL)
+c=coeff(b)
+//Wn^2=c(1,1)
+Wn=sqrt(c(1,1))//natural frequency
+//2*zeta*Wn=c(1,2)
+zeta=c(1,2)/(2*Wn)//damping ratio
+Wd=Wn*sqrt(1-zeta^2)//damped frequency
+Mp=(exp(-(zeta*%pi)/sqrt(1-zeta^2)))*100//max. overshoot
+Tp=%pi/Wd//peak time
+t=(2*%pi)/(Wn*sqrt(1-zeta^2))//period of oscillation
+ts=4/(zeta*Wn)//settling time
+N=Wd/(2*%pi)*ts//no. of oscillations completed before reaching steady state
+disp(Tp,"peak time=");
+disp(Mp,"max. peak overshoot=");
+disp(t,"period of oscillation");
+disp(N,"no. of oscillations completed before reaching steady state=");
+disp(ts,"settling time=")
diff --git a/29/CH11/EX11.9/exa11_9.sce b/29/CH11/EX11.9/exa11_9.sce
new file mode 100755
index 000000000..bb18bf5f5
--- /dev/null
+++ b/29/CH11/EX11.9/exa11_9.sce
@@ -0,0 +1,20 @@
+//Caption:time_response_for_unit_step_function
+//example 11_9
+//page 476
+s=%s;
+syms t;
+CL=(4*s+4)/(s^2+2*s+5)
+disp(CL,"C(s)/R(s)=")
+y=ilaplace(CL,s,t);
+disp(y,"c(t)=");
+b=denom(CL)
+c=coeff(b)
+//Wn^2=c(1,1)
+Wn=sqrt(c(1,1))//natural frequency
+//2*zeta*Wn=c(1,2)
+zeta=c(1,2)/(2*Wn)//damping ratio
+Wd=Wn*sqrt(1-zeta^2)//damped frequency
+Mp=(exp(-(zeta*%pi)/sqrt(1-zeta^2)))*100//max. overshoot
+Tp=%pi/Wd//peak time
+disp(Tp,"peak time=");
+disp(Mp,"max. peak overshoot="); \ No newline at end of file