summaryrefslogtreecommitdiff
path: root/3885/CH6/EX6.11/Ex6_11.sci
diff options
context:
space:
mode:
Diffstat (limited to '3885/CH6/EX6.11/Ex6_11.sci')
-rw-r--r--3885/CH6/EX6.11/Ex6_11.sci26
1 files changed, 26 insertions, 0 deletions
diff --git a/3885/CH6/EX6.11/Ex6_11.sci b/3885/CH6/EX6.11/Ex6_11.sci
new file mode 100644
index 000000000..2d6ae51eb
--- /dev/null
+++ b/3885/CH6/EX6.11/Ex6_11.sci
@@ -0,0 +1,26 @@
+//control systems by Nagoor Kani A
+//Edition 3
+//Year of publication 2015
+//Scilab version 6.0.0
+//operating systems windows 10
+// Example 6.11
+
+clc;
+clear;
+s=poly(0,'s')
+//given tranfer function g(s)=10/(s*(1+2*s)*(1+s))
+h=syslin('c',10/(s*(1+2*s)*(1+s)))
+pm=30//given phase margin
+w=6.2//given gain cross over frequency in rad/sec
+//put s=jw in G(s) magnitude of G(jw) gives A1 and angle of G(jw) gives phi1 at w
+A1=2.052
+phi=-207.5//in degrees
+theta=30-(-27.5)//desired pm -pm of uncompensated system
+kd=sind(theta)/w*A1//derivative constant
+kp=cosd(theta)/A1//proportional constant
+disp(kd,kp,'the values of derivative constant and proportional constant are')
+//transfer function of PD controller is (kp+kd*s)
+hc=syslin('c', s*((0.343/s)+0.262))
+disp(hc,'the transfer function of PD controller is')
+hcmp=syslin('c', h*hc)
+disp(hcmp,'the transfer function of compensated system is')