diff options
author | Siddharth Agarwal | 2019-09-03 18:27:40 +0530 |
---|---|---|
committer | Siddharth Agarwal | 2019-09-03 18:27:40 +0530 |
commit | 8ac15bc5efafa2afc053c293152605b0e6ae60ff (patch) | |
tree | e1bc17aae137922b1ee990f17aae4a6cb15b7d87 /Completed Simulations/Control Systems by Nagrath and Gopal/Scilab | |
parent | 52a477ec613900885e29c4a0b02806a415b4f83a (diff) | |
download | Xcos_block_examples-master.tar.gz Xcos_block_examples-master.tar.bz2 Xcos_block_examples-master.zip |
Diffstat (limited to 'Completed Simulations/Control Systems by Nagrath and Gopal/Scilab')
17 files changed, 132 insertions, 0 deletions
diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.1 b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.1 new file mode 100644 index 0000000..b900e97 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.1 @@ -0,0 +1,5 @@ +function y=locus2(z) +s=%s +H=syslin('c',(s+1)*(s+2)/(s*(s+3)*(s+4))) +evans(H,z) +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.2.sci b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.2.sci new file mode 100644 index 0000000..d00e38b --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.2.sci @@ -0,0 +1,8 @@ +function y=locus1(z) +s=%s +H=syslin('c',1+(1/(s*(s+1)*(s+2)))); +evans(H,z) +printf("The branches of root locus starts with K=0 and poles s=0,-1,-2") +printf("Since there is no open loop zero the branches terminate at infinity") +y=0; +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.3.sci b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.3.sci new file mode 100644 index 0000000..7d32f04 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.3.sci @@ -0,0 +1,10 @@ +function y=locus3(z) +s=%s +H=syslin('c',1+(1/(s*(s+1)*(s+2)))) +evans(H,z) +d=derivat(H) +p=numer(d) +a=roots(p) +disp(a,"breakaway point=") +y=0; +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.4.sci b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.4.sci new file mode 100644 index 0000000..5c9efa2 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.4.sci @@ -0,0 +1,7 @@ +function y=locus4(z) +s=%s +H=syslin('c',1/(s*(s+4)*(s^2+(4*s)+20))) +evans(H,z) +y=0 +printf("Since there are no open loop zeros all branches terminate at infinity") +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.6.sci b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.6.sci new file mode 100644 index 0000000..f7898b8 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.6.sci @@ -0,0 +1,6 @@ +function y=locus6(z) +s=%s +H=syslin('c',1/(s*(s+3)*(s^2+(2*s)+2))) +evans(H,z) +y=0; +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.9.sci b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.9.sci new file mode 100644 index 0000000..6154ef6 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7.9.sci @@ -0,0 +1,12 @@ +function y=locus9(z) +s=%s +G=syslin('c',(s+4/3)/(s^2*(s+12))) +evans(G,z) +d=derivat(G) +p=numer(d) +a=roots(p) +disp(a,"Breakaway points=") +printf("Equal roots are at s=-4") +printf("/n Value of K at s=-4=") +y=0; +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7_1.sci b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7_1.sci new file mode 100644 index 0000000..24647b7 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex7_1.sci @@ -0,0 +1,6 @@ +function y=locus2(z) +s=%s +H=syslin('c',(s+1)*(s+2)/(s*(s+3)*(s+4))) +evans(H,z) +y=0; +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.10 b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.10 new file mode 100644 index 0000000..c1391b9 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.10 @@ -0,0 +1,9 @@ +function y=nqst10(z) +s=%s +H=syslin('c',1/(s*(0.2*s+1)*(0.05*s+1))) +nyquist(H) +show_margins(H,'nyquist') +mtlb_axis([-1 1 -5 1]) +gm=g_margin(H) +pm=p_margin(H) +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.2 b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.2 new file mode 100644 index 0000000..4edfd62 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.2 @@ -0,0 +1,6 @@ +function y=nqst1(z) +s=%s +H=syslin('c',(s+2)/((s+1)*(s-1))) +nyquist(H) +show_margins(H,'nyquist') +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.3 b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.3 new file mode 100644 index 0000000..7d544ce --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.3 @@ -0,0 +1,6 @@ +function y=nqst3(z) +s=%s +H=syslin('c',1/(s*(s+1))) +nyquist(H) +show_margins(H,'nyquist') +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.4 b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.4 new file mode 100644 index 0000000..69b507b --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.4 @@ -0,0 +1,7 @@ +function y=nqst4(z) +s=%s +H=syslin('c',(4*s+1)/(s^2*(s+1)*(2*s+1))) +nyquist(H) +show_margins(H,'nyquist') + +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.6 b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.6 new file mode 100644 index 0000000..45154aa --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9.6 @@ -0,0 +1,9 @@ +function y=nqst6(z) +s=%s +H=syslin('c',(s-2)/(s+1)^2) +nyquist(H) +show_margins(H,'nyquist') +printf("P=0(poles in RHP)") +printf("N=-1,hence Z=1") +printf("Therefore,System is unstable") +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_10.sci b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_10.sci new file mode 100644 index 0000000..8dd16c1 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_10.sci @@ -0,0 +1,10 @@ +function y=nqst10(z) +s=%s +H=syslin('c',1/(s*(0.2*s+1)*(0.05*s+1))) +nyquist(H) +show_margins(H,'nyquist') +mtlb_axis([-1 1 -5 1]) +gm=g_margin(H) +pm=p_margin(H) +y=0; +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_2.sci b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_2.sci new file mode 100644 index 0000000..1af4a85 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_2.sci @@ -0,0 +1,7 @@ +function y=nqst1(z) +s=%s +H=syslin('c',(s+2)/((s+1)*(s-1))) +nyquist(H) +show_margins(H,'nyquist') +y=0; +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_3.sci b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_3.sci new file mode 100644 index 0000000..6e327f5 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_3.sci @@ -0,0 +1,7 @@ +function y=nqst3(z) +s=%s +H=syslin('c',1/(s*(s+1))) +nyquist(H) +show_margins(H,'nyquist') +y=0; +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_4.sci b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_4.sci new file mode 100644 index 0000000..dd90553 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_4.sci @@ -0,0 +1,7 @@ +function y=nqst4(z) +s=%s +H=syslin('c',(4*s+1)/(s^2*(s+1)*(2*s+1))) +nyquist(H) +show_margins(H,'nyquist') +y=0 +endfunction diff --git a/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_6.sci b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_6.sci new file mode 100644 index 0000000..5d47081 --- /dev/null +++ b/Completed Simulations/Control Systems by Nagrath and Gopal/Scilab/Ex9_6.sci @@ -0,0 +1,10 @@ +function y=nqst6(z) +s=%s +H=syslin('c',(s-2)/(s+1)^2) +nyquist(H) +y=0; +show_margins(H,'nyquist') +printf("P=0(poles in RHP)") +printf("N=-1,hence Z=1") +printf("Therefore,System is unstable") +endfunction |