diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3432/CH6/EX6.16 | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '3432/CH6/EX6.16')
-rw-r--r-- | 3432/CH6/EX6.16/Ex6_16.sce | 55 | ||||
-rw-r--r-- | 3432/CH6/EX6.16/Ex6_16_f0.pdf | bin | 0 -> 33525 bytes |
2 files changed, 55 insertions, 0 deletions
diff --git a/3432/CH6/EX6.16/Ex6_16.sce b/3432/CH6/EX6.16/Ex6_16.sce new file mode 100644 index 000000000..a21196a34 --- /dev/null +++ b/3432/CH6/EX6.16/Ex6_16.sce @@ -0,0 +1,55 @@ +//Example 6.16 +//Lead compensation for Servomechanism System. + +xdel(winsid())//close all graphics Windows +clear; +clc; +//------------------------------------------------------------------ +//System transfer function +s=poly(0,'s'); +numG=10; +denG=s*(s/2.5+1)*(s/6+1); +G=numG/denG; +//Dc gain +K=1; + +KGs=syslin('c',K*G); + +//Lead compensator 1 +numD=s/2+1; +denD=s/20+1; +D1=numD/denD; +D1s=syslin('c',D1); + +KGD1s=D1s*KGs; //compensated system + +//Lead compensator 2 +numD=s/4+1; +denD=s/40+1; +D2=D1*numD/denD; //double compensator +D2s=syslin('c',D2); + + +KGD2s=D2s*KGs; //compensated system + +//The bode plot of the system with K +bode([KGs;KGD1s;KGD2s],0.1/2/%pi,100/2/%pi,['KG';'KGD1';'KGD2'],"rad"); +exec .\fig_settings.sci; //custom script for setting figure properties +title('Bode plot for lead compensation design','fontsize',3) +//------------------------------------------------------------------ +//Margins of uncompensated and compensated systems +[gm1,wcg1]=g_margin(KGs); +[pm1,wcp1]=p_margin(KGs); +disp(wcp1*2*%pi,"Wcp",wcg1*2*%pi,"Wcg",pm1,... +"Phase margin",gm1,"Gain margin","Uncompensated system :") + +[gm2,wcg2]=g_margin(KGD1s); +[pm2,wcp2]=p_margin(KGD1s); +disp(wcp2*2*%pi,"Wcp",wcg2*2*%pi,"Wcg",pm2,... +"Phase margin",gm2,"Gain margin","System with D1 compensator :") + +[gm3,wcg3]=g_margin(KGD2s); +[pm3,wcp3]=p_margin(KGD2s); +disp(wcp3*2*%pi,"Wcp",wcg3*2*%pi,"Wcg",pm3,... +"Phase margin",gm3,"Gain margin","System with D2 compensator :") +//------------------------------------------------------------------ diff --git a/3432/CH6/EX6.16/Ex6_16_f0.pdf b/3432/CH6/EX6.16/Ex6_16_f0.pdf Binary files differnew file mode 100644 index 000000000..b236af65f --- /dev/null +++ b/3432/CH6/EX6.16/Ex6_16_f0.pdf |