summaryrefslogtreecommitdiff
path: root/Working_Examples/3885/CH4
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/3885/CH4
parent52a477ec613900885e29c4a0b02806a415b4f83a (diff)
downloadXcos_block_examples-8ac15bc5efafa2afc053c293152605b0e6ae60ff.tar.gz
Xcos_block_examples-8ac15bc5efafa2afc053c293152605b0e6ae60ff.tar.bz2
Xcos_block_examples-8ac15bc5efafa2afc053c293152605b0e6ae60ff.zip
Xcos examples from textbooks and for blocksHEADmaster
Diffstat (limited to 'Working_Examples/3885/CH4')
-rwxr-xr-xWorking_Examples/3885/CH4/EX4.1/Ex4_1.sce16
-rwxr-xr-xWorking_Examples/3885/CH4/EX4.2/Ex4_2.sce16
-rwxr-xr-xWorking_Examples/3885/CH4/EX4.3/Ex4_3.sce18
-rwxr-xr-xWorking_Examples/3885/CH4/EX4.4/Ex4_4.sce14
-rwxr-xr-xWorking_Examples/3885/CH4/EX4.5/Ex4_5.sce15
-rwxr-xr-xWorking_Examples/3885/CH4/EX4.6/Ex4_6.sce13
6 files changed, 92 insertions, 0 deletions
diff --git a/Working_Examples/3885/CH4/EX4.1/Ex4_1.sce b/Working_Examples/3885/CH4/EX4.1/Ex4_1.sce
new file mode 100755
index 0000000..391fddc
--- /dev/null
+++ b/Working_Examples/3885/CH4/EX4.1/Ex4_1.sce
@@ -0,0 +1,16 @@
+//control systems by Nagoor Kani A
+//Edition 3
+//Year of publication 2015
+//Scilab version 6.0.0
+//operating systems windows 10
+// Example 4.1
+clc;
+clear;
+s=poly(0,'s')//defines s as poly nomial variable
+h=syslin('c',(s^2)/((1+0.2*s)*(1+0.02*s)))//the given transfer function assigned to variable h .Assume the value of K as 1
+scf(1)
+bode(h,0.1,100)//frequency range
+show_margins(h)
+//calculation of system gain K
+K=10^(-28/20)//value of K is calculated by equating 20logK to -28db
+disp(K,'the value of gain')
diff --git a/Working_Examples/3885/CH4/EX4.2/Ex4_2.sce b/Working_Examples/3885/CH4/EX4.2/Ex4_2.sce
new file mode 100755
index 0000000..a308fe8
--- /dev/null
+++ b/Working_Examples/3885/CH4/EX4.2/Ex4_2.sce
@@ -0,0 +1,16 @@
+//control systems by Nagoor Kani A
+//Edition 3
+//Year of publication 2015
+//Scilab version 6.0.0
+//operating systems windows 10
+// Example 4.2
+clc;
+clear;
+s=poly(0,'s')//defines s as poly nomial variable
+h=syslin('c',(75*(1+0.2*s))/(s*(s^2+16*s+100)))//the given transfer function assigned to variable h
+scf(1)
+bode(h,0.1,100)//frequency range
+show_margins(h)
+a=g_margin(h)
+b=p_margin(h)
+disp(a,b,'the gain margin and phase margin are')
diff --git a/Working_Examples/3885/CH4/EX4.3/Ex4_3.sce b/Working_Examples/3885/CH4/EX4.3/Ex4_3.sce
new file mode 100755
index 0000000..cabb1b9
--- /dev/null
+++ b/Working_Examples/3885/CH4/EX4.3/Ex4_3.sce
@@ -0,0 +1,18 @@
+//control systems by Nagoor Kani A
+//Edition 3
+//Year of publication 2015
+//Scilab version 6.0.0
+//operating systems windows 10
+// Example 4.3
+clc;
+clear;
+s=poly(0,'s')//defines s as poly nomial variable
+h=syslin('c',(%e*(0.2*s)/(s*(s+2)*(s+8))))//the given transfer function assiganed to variable h assume K=1
+scf(1)
+bode(h,0.1,100)//frequency range
+show_margins(h)
+//calculation of K
+K1=10^(30/20)
+disp(K1 ,'when gain margin =2db ' )
+K2=10^(24/20)
+disp(K2,'the value of K when phase margin is 45')
diff --git a/Working_Examples/3885/CH4/EX4.4/Ex4_4.sce b/Working_Examples/3885/CH4/EX4.4/Ex4_4.sce
new file mode 100755
index 0000000..b2e71f4
--- /dev/null
+++ b/Working_Examples/3885/CH4/EX4.4/Ex4_4.sce
@@ -0,0 +1,14 @@
+//control systems by Nagoor Kani A
+//Edition 3
+//Year of publication 2015
+//Scilab version 6.0.0
+//operating systems windows 10
+// Example 4.4
+clc;
+clear;
+s=poly(0,'s')//defines s as poly nomial variable
+h=syslin('c',(10)/(s*(1+0.4*s)*(1+0.1*s)))//the given transfer function assigned to variable h
+scf(1)
+bode(h,0.1,100)//frequency range
+show_margins(h)
+
diff --git a/Working_Examples/3885/CH4/EX4.5/Ex4_5.sce b/Working_Examples/3885/CH4/EX4.5/Ex4_5.sce
new file mode 100755
index 0000000..5a0abd2
--- /dev/null
+++ b/Working_Examples/3885/CH4/EX4.5/Ex4_5.sce
@@ -0,0 +1,15 @@
+//control systems by Nagoor Kani A
+//Edition 3
+//Year of publication 2015
+//Scilab version 6.0.0
+//operating systems windows 10
+// Example 4.5
+clc;
+clear;
+s=poly(0,'s')////defines s as poly nomial variable
+h=syslin('c',(20)/(s*(1+3*s)*(1+4*s)))//the given transfer function assigned to variable h
+scf()
+bode(h,0.1,100)
+show_margins(h)
+//calculation of gain cross over frequency
+disp('from the plot the value of gain cross over frequency is :1.1rad/sec')
diff --git a/Working_Examples/3885/CH4/EX4.6/Ex4_6.sce b/Working_Examples/3885/CH4/EX4.6/Ex4_6.sce
new file mode 100755
index 0000000..70be9cc
--- /dev/null
+++ b/Working_Examples/3885/CH4/EX4.6/Ex4_6.sce
@@ -0,0 +1,13 @@
+//control systems by Nagoor Kani A
+//Edition 3
+//Year of publication 2015
+//Scilab version 6.0.0
+//operating systems windows 10
+// Example 4.6
+clc;
+clear;
+s=poly(0,'s')//defines s as polynomial variable
+h=syslin('c',(5*(1+2*s))/(1+4*s)*(4+0.25*s))//the given transfer function assigned to variable h
+scf(1)
+bode(h,0.1,100)//frequency range
+show_margins(h)