diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /773/CH9/EX9.10/9_10.sci | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '773/CH9/EX9.10/9_10.sci')
-rwxr-xr-x | 773/CH9/EX9.10/9_10.sci | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/773/CH9/EX9.10/9_10.sci b/773/CH9/EX9.10/9_10.sci new file mode 100755 index 000000000..9a7c7cb56 --- /dev/null +++ b/773/CH9/EX9.10/9_10.sci @@ -0,0 +1,40 @@ +//calculates//
+s=%s;
+printf("1)without controller")
+G=64*syslin('c',1/(s*(s+4)));
+disp(G,"G(s)=")
+H=1;
+CL=G/.H;
+disp(CL,"C(s)/R(s)=")
+//Extracting the denominator of CL
+y=denom(CL)
+//Extracting the coefficients of the denominator polynomial
+z=coeff(y)
+//Wn^2=z(1,1) ,comparing the coefficients
+Wn=sqrt(z(1,1));
+//Wn=natural frequency
+disp(Wn,"Wn=")
+printf("2) with controller')
+syms K;
+sys1=syslin('c',1/(s*(s+4)));
+sys2=sys1 /.(s*K);
+G=64*sys2
+disp(G,"G(s)=")
+
+sys=G/.H;
+sys=simple(sys);
+disp(sys,"C(s)/R(s)=")
+[num,den]=numden(sys)
+//Coeff of den of symbolic function CL
+cof_a_0 = coeffs(den,'s',0)
+cof_a_1 = coeffs(den,'s',1)
+//Wn^2= cof_a_0,comparing the coefficients
+Wn=sqrt(cof_a_0)
+Wn=dbl(Wn);
+//Wn=natural frequency
+disp(Wn,"natural frequency Wn=")
+//cof_a_1=2*zeta*Wn
+zeta=cof_a_1/(2*Wn)
+zeta=0.6;
+k=(16*zeta)-4
+disp(k,"K=")
|