diff options
Diffstat (limited to '46/CH16')
-rwxr-xr-x | 46/CH16/EX16.1/Example16_1.sce | 14 | ||||
-rwxr-xr-x | 46/CH16/EX16.2/Example16_2.sce | 16 | ||||
-rwxr-xr-x | 46/CH16/EX16.4/Example16_4.sce | 12 | ||||
-rwxr-xr-x | 46/CH16/EX16.4/figure16_4.jpg | bin | 0 -> 73248 bytes | |||
-rwxr-xr-x | 46/CH16/EX16.5/Example16_5.sce | 9 | ||||
-rwxr-xr-x | 46/CH16/EX16.5/figure16_5.jpg | bin | 0 -> 59036 bytes |
6 files changed, 51 insertions, 0 deletions
diff --git a/46/CH16/EX16.1/Example16_1.sce b/46/CH16/EX16.1/Example16_1.sce new file mode 100755 index 000000000..fc4d8ddd7 --- /dev/null +++ b/46/CH16/EX16.1/Example16_1.sce @@ -0,0 +1,14 @@ +//Example 16.1
+clc
+s=%s;
+j=%i;
+f=10/%pi;
+w=2*%pi*f;
+G=1/(0.1*s+1);
+s=w*j;
+Gs=horner(G,s);
+disp(Gs,'G(20j)=')
+[r,theta]=polar(Gs)
+theta=theta*180/%pi;
+disp('degrees',theta,'theta=')
+
diff --git a/46/CH16/EX16.2/Example16_2.sce b/46/CH16/EX16.2/Example16_2.sce new file mode 100755 index 000000000..5dcd03dbb --- /dev/null +++ b/46/CH16/EX16.2/Example16_2.sce @@ -0,0 +1,16 @@ +//Example 16.2
+clc
+syms tau s zeta w;
+j=%i;
+n=1;
+d=tau^2*s^2+2*zeta*tau*s+1;
+G=n/d
+s=j*w;
+G=1/(2*s*tau*zeta+s^2*tau^2+1)
+[num den]=numden(G)
+d=abs(den)
+cof_a_0=coeffs(den,'%i',0)
+cof_a_1=coeffs(den,'%i',1)
+AR=1/d
+theta=AR*atan(-cof_a_1/cof_a_0);
+disp(theta,'Phase angle=')
\ No newline at end of file diff --git a/46/CH16/EX16.4/Example16_4.sce b/46/CH16/EX16.4/Example16_4.sce new file mode 100755 index 000000000..d4f104071 --- /dev/null +++ b/46/CH16/EX16.4/Example16_4.sce @@ -0,0 +1,12 @@ +//Example 16.4 +clc +s=%s; +H=1/(s+1); +Hs=syslin('c',H) +J=1/(s+5); +Js=syslin('c',J) +G=Hs*Js; +Gs=syslin('c',G) +clf +bode([Hs;Js;Gs;]) +legend(['1/(s+1)';'1/(s/5+1)';'1/(5*(s+1)*(s/5+1))']) diff --git a/46/CH16/EX16.4/figure16_4.jpg b/46/CH16/EX16.4/figure16_4.jpg Binary files differnew file mode 100755 index 000000000..2b7cf5a80 --- /dev/null +++ b/46/CH16/EX16.4/figure16_4.jpg diff --git a/46/CH16/EX16.5/Example16_5.sce b/46/CH16/EX16.5/Example16_5.sce new file mode 100755 index 000000000..d9e951dce --- /dev/null +++ b/46/CH16/EX16.5/Example16_5.sce @@ -0,0 +1,9 @@ +//Example 16.5 +clc +s=poly(0,'s'); +disp("G=10*(0.5*s+1)*exp(-s/10)/(((s+1)^2)*(0.1*s+1))") +printf("exp(-0.1*s)=(2-0.1*s)/(2+0.1*s)\n)") +G=10*(0.5*s+1)*(2-0.1*s)/(((s+1)^2)*(0.1*s+1)*(2+0.1*s)); +Gs=syslin('c',G) +clf +bode(Gs) diff --git a/46/CH16/EX16.5/figure16_5.jpg b/46/CH16/EX16.5/figure16_5.jpg Binary files differnew file mode 100755 index 000000000..7388a021a --- /dev/null +++ b/46/CH16/EX16.5/figure16_5.jpg |