summaryrefslogtreecommitdiff
path: root/29/CH12/EX12.7/exa12_7.sce
diff options
context:
space:
mode:
Diffstat (limited to '29/CH12/EX12.7/exa12_7.sce')
-rwxr-xr-x29/CH12/EX12.7/exa12_7.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/29/CH12/EX12.7/exa12_7.sce b/29/CH12/EX12.7/exa12_7.sce
new file mode 100755
index 000000000..4f918bd5a
--- /dev/null
+++ b/29/CH12/EX12.7/exa12_7.sce
@@ -0,0 +1,23 @@
+//Caption:determine_peak_time_and_peak_overshoot
+//example 12.7
+//page 520
+s=%s;
+syms t;
+G=sym('(s+2)/(s*(s+1))')//G(s)
+H=1;
+CL=G/(1+G*H);
+disp(CL,"C(s)/R(s)=");
+//for unit step response R(s)=1/s;
+d=CL*(1/s);
+a=s*d;
+disp(d,"C(s)=");
+c=ilaplace(d,s,t);
+disp(c,"c(t)=");
+//for peak time we get tp=3*%pi/4
+tp=3*%pi/4
+Cmax=1-(exp(-tp)*cos(tp));
+Css=limit(a,s,0);
+disp(Css,"Css=");
+Mp=((Cmax-Css)/Css)*100
+Mp=float(Mp)
+disp(Mp,"peak_overshoot=")