summaryrefslogtreecommitdiff
path: root/Working_Examples/3432/CH7/EX7.21
diff options
context:
space:
mode:
authorSiddharth Agarwal2019-09-03 18:27:40 +0530
committerSiddharth Agarwal2019-09-03 18:27:40 +0530
commit8ac15bc5efafa2afc053c293152605b0e6ae60ff (patch)
treee1bc17aae137922b1ee990f17aae4a6cb15b7d87 /Working_Examples/3432/CH7/EX7.21
parent52a477ec613900885e29c4a0b02806a415b4f83a (diff)
downloadXcos_block_examples-master.tar.gz
Xcos_block_examples-master.tar.bz2
Xcos_block_examples-master.zip
Xcos examples from textbooks and for blocksHEADmaster
Diffstat (limited to 'Working_Examples/3432/CH7/EX7.21')
-rwxr-xr-xWorking_Examples/3432/CH7/EX7.21/DEPENDENCIES/fig_settings.sci9
-rwxr-xr-xWorking_Examples/3432/CH7/EX7.21/Ex7_21.sce42
-rwxr-xr-xWorking_Examples/3432/CH7/EX7.21/Ex7_21_f0.pdfbin0 -> 20791 bytes
3 files changed, 51 insertions, 0 deletions
diff --git a/Working_Examples/3432/CH7/EX7.21/DEPENDENCIES/fig_settings.sci b/Working_Examples/3432/CH7/EX7.21/DEPENDENCIES/fig_settings.sci
new file mode 100755
index 0000000..5d5e7d4
--- /dev/null
+++ b/Working_Examples/3432/CH7/EX7.21/DEPENDENCIES/fig_settings.sci
@@ -0,0 +1,9 @@
+//------------------------------------------------------------------
+//figure handel settings
+f=get("current_figure"); //Current figure handle
+f.background=8; //make the figure window background white
+l=f.children(1);
+l.background=8 ;//make the text background white
+id=color('grey');
+xgrid(id);
+//------------------------------------------------------------------
diff --git a/Working_Examples/3432/CH7/EX7.21/Ex7_21.sce b/Working_Examples/3432/CH7/EX7.21/Ex7_21.sce
new file mode 100755
index 0000000..59ceda7
--- /dev/null
+++ b/Working_Examples/3432/CH7/EX7.21/Ex7_21.sce
@@ -0,0 +1,42 @@
+//Example 7.21
+// Symmetric root locus (SRL) for servo speed control
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//------------------------------------------------------------------
+//Transfer function model of the given system
+a=1.5;//assume
+s=poly(0,'s');
+nums=1;
+dens=s+a;
+num_s=1;
+den_s=-s+a;
+G0s=syslin('c',nums/dens); //G0(s)
+G0_s=syslin('c',num_s/den_s); //G0(-s)
+
+evans(G0s)
+evans(G0_s)
+zoom_rect([-3 -0.1 3 0.1])
+f=gca();
+f.x_location = "origin"
+f.y_location = "origin"
+xset("color",2);
+h=legend('');
+h.visible = "off"
+
+//Title, labels and grid to the figure
+exec .\fig_settings.sci; // custom script for setting figure properties
+title('Symmetric root locus for a first order system','fontsize',3);
+//------------------------------------------------------------------
+//Root locus design
+//rho>0; choose rho=2
+rho=2;
+//optimal pole p=-sqrt(a^2+rho)
+p=-sqrt(a^2+rho)
+sig=real(p);
+omega=imag(p);
+plot(sig,omega,'ro')
+xstring(-2.5,0.02,["pole location at";"$\rho=2$"])
+xarrows([-2.2;-2.07],[0.02;0.002],-1.5,1)
+//------------------------------------------------------------------
diff --git a/Working_Examples/3432/CH7/EX7.21/Ex7_21_f0.pdf b/Working_Examples/3432/CH7/EX7.21/Ex7_21_f0.pdf
new file mode 100755
index 0000000..7ae1c59
--- /dev/null
+++ b/Working_Examples/3432/CH7/EX7.21/Ex7_21_f0.pdf
Binary files differ