diff options
author | Siddharth Agarwal | 2019-09-03 18:27:40 +0530 |
---|---|---|
committer | Siddharth Agarwal | 2019-09-03 18:27:40 +0530 |
commit | 8ac15bc5efafa2afc053c293152605b0e6ae60ff (patch) | |
tree | e1bc17aae137922b1ee990f17aae4a6cb15b7d87 /Working_Examples/3432/CH3/EX3.29 | |
parent | 52a477ec613900885e29c4a0b02806a415b4f83a (diff) | |
download | Xcos_block_examples-master.tar.gz Xcos_block_examples-master.tar.bz2 Xcos_block_examples-master.zip |
Diffstat (limited to 'Working_Examples/3432/CH3/EX3.29')
-rwxr-xr-x | Working_Examples/3432/CH3/EX3.29/DEPENDENCIES/fig_settings.sci | 9 | ||||
-rwxr-xr-x | Working_Examples/3432/CH3/EX3.29/Ex3_29.sce | 40 | ||||
-rwxr-xr-x | Working_Examples/3432/CH3/EX3.29/Ex3_29_f0.pdf | bin | 0 -> 35252 bytes |
3 files changed, 49 insertions, 0 deletions
diff --git a/Working_Examples/3432/CH3/EX3.29/DEPENDENCIES/fig_settings.sci b/Working_Examples/3432/CH3/EX3.29/DEPENDENCIES/fig_settings.sci new file mode 100755 index 0000000..5d5e7d4 --- /dev/null +++ b/Working_Examples/3432/CH3/EX3.29/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/CH3/EX3.29/Ex3_29.sce b/Working_Examples/3432/CH3/EX3.29/Ex3_29.sce new file mode 100755 index 0000000..2f18710 --- /dev/null +++ b/Working_Examples/3432/CH3/EX3.29/Ex3_29.sce @@ -0,0 +1,40 @@ +//Example 3.29
+//Stability versus parameter range
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//------------------------------------------------------------------
+//Stability versus parameter range
+
+numT=[-1];//zeros
+denT=[1 0 -6];//poles
+Ns=poly(numT,'s','roots');
+Ds=poly(denT,'s','roots');
+Gfs=syslin('c',Ns/Ds); //forward transfer function block
+
+num=[1];
+den=[1 0];
+Ns=poly(num,'s','coeff');
+Ds=poly(den,'s','coeff');
+Hs=syslin('c',Ns/Ds); //feedback transfer function block
+
+//check the step responses with the forward path gain K=7.5, 13, 25
+t=0:0.02:12;
+i=1;
+
+for K=[7.5, 13, 25]
+ sysT= (K * Gfs) /. Hs;
+ yt(i,:)=csim('step',t,sysT);
+ i=i+1;
+end
+//Step response
+plot(t',yt')
+exec .\fig_settings.sci; //custom script for setting figure properties
+title("Transient response for different values of K",'fontsize',3);
+xlabel('Time t (sec.)','fontsize',2)
+ylabel('y(t)','fontsize',2)
+h=legend('K=7.5','K=13', 'K=25')
+h.legend_location = "in_upper_right"
+h.fill_mode='off'
+//------------------------------------------------------------------
diff --git a/Working_Examples/3432/CH3/EX3.29/Ex3_29_f0.pdf b/Working_Examples/3432/CH3/EX3.29/Ex3_29_f0.pdf Binary files differnew file mode 100755 index 0000000..1dcf459 --- /dev/null +++ b/Working_Examples/3432/CH3/EX3.29/Ex3_29_f0.pdf |