summaryrefslogtreecommitdiff
path: root/29/CH6/EX6.10.5
diff options
context:
space:
mode:
Diffstat (limited to '29/CH6/EX6.10.5')
-rwxr-xr-x29/CH6/EX6.10.5/exa6_10_5.sce30
1 files changed, 30 insertions, 0 deletions
diff --git a/29/CH6/EX6.10.5/exa6_10_5.sce b/29/CH6/EX6.10.5/exa6_10_5.sce
new file mode 100755
index 000000000..34107206d
--- /dev/null
+++ b/29/CH6/EX6.10.5/exa6_10_5.sce
@@ -0,0 +1,30 @@
+//Caption:calculate_Wn,zeta,Wd,tp,Mp
+//example 6.10.5
+//page 174
+//given G(s)=20/(s+1)*(s+2)
+clc;
+s=%s;
+G=syslin('c',[20/((s+1)*(s+5))])//G(s):transfer function in forward path
+H=1;//backward path transfer function
+a=G/.H //closed loop transfer function
+b=denom(a)
+c=coeff(b)
+//Wn^2=c(1,1)
+Wn=sqrt(c(1,1))//natural frequency
+disp(Wn,"natural frequency,Wn=")
+//2*zeta*Wn=c(1,2)
+zeta=c(1,2)/(2*Wn)//damping ratio
+disp(zeta,"damping ratio,zeta=")
+Wd=Wn*sqrt(1-zeta^2)//damped frequency
+disp(Wd,"damping ratio,Wd=")
+Tp=%pi/Wd//peak time
+disp(Tp,"peak time,Tp=")
+Mp=(exp(-(zeta*%pi)/sqrt(1-zeta^2)))*100//max. overshoot
+disp(Mp,"max overshoot,Mp=")
+t=(2*%pi)/(Wn*sqrt(1-zeta^2))//period of oscillation
+disp(t,'time at which first overshoot occurs=')
+disp(t,"period of oscillation,t=")
+ts=4/(zeta*Wn)//settling time
+disp(ts,"settling time,ts=")
+N=Wd/(2*%pi)*ts//no. of oscillations completed before reaching steady state
+disp(N,"no. of oscillations completed before reaching steady state,N=") \ No newline at end of file