diff options
Diffstat (limited to '3885/CH6/EX6.12/Ex6_12.sci')
-rw-r--r-- | 3885/CH6/EX6.12/Ex6_12.sci | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/3885/CH6/EX6.12/Ex6_12.sci b/3885/CH6/EX6.12/Ex6_12.sci new file mode 100644 index 000000000..b76533c30 --- /dev/null +++ b/3885/CH6/EX6.12/Ex6_12.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.12
+
+clc;
+clear;
+s=poly(0,'s')
+//given tranfer function g(s)=100/(s+1)*(s+2)*(s+5)
+h=syslin('c',100/(s+1)*(s+2)*(s+5))
+pm=60//given phase margin
+w=0.5//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=8.63
+phi=-46//in degrees
+theta=pm-134//desired pm -pm of uncompensated system
+ki=(-w)*sind(theta)/A1//integral constant
+kp=cosd(theta)/A1//proportional constant
+disp(ki,kp,'the values of integral constant and proportional constant are')
+//transfer function of PI controller is (kp+ki/s)
+hc=syslin('c', 0.056*(1+0.57*s)/s)
+disp(hc,'the transfer function of PD controller is')
+hcmp=syslin('c', h*hc)
+disp(hcmp,'the transfer function of compensated system is')
|