summaryrefslogtreecommitdiff
path: root/1151/CH3/EX3.4/example4.sce
blob: 09c3505fb760a0cc2fb302a73c383b44d4844777 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
s=%s
p= poly([0 0 20],'s','coeff');
q= poly([1 2 22 4 40 0], 's','coeff');
 disp (M,"M( s )=")
 H =1;
 R =1;
 b= coeff (p)
a= coeff (q)
// s t e p input
if (a(1 ,1) ==b(1 ,1)) then
     printf (" f o r u n i t s t e p input Ess=0 \nn" )
 else
     Ess =1/ H*(1 -(b(1 ,1)*H/a(1 ,1)))*R;
     kp=(1-Ess)/Ess;
disp (Ess ," f o r u n i t s t e p input Ess=")
disp(kp,"Kp=")
 end
// ramp input
 c=0
 for i =1:2
if(a(1,i)-b(1,i)*H ==0) then
c=c+1
 end
end
if(c ==2)
printf (" f o r u n i t ramp input Ess=0 \nn")
else if(c ==1) then
Ess =(a(1 ,2) -b(1 ,2)*H)/a(1 ,1)*H;
kv=1/Ess;
disp (Ess ," for unit ramp input Ess=")
disp(kv,"Kv=")
 else printf (" for unit ramp input Ess=infinite \nn")
 end
 end
// p a r a b o l i c input
c=0
for i =1:3
if(a(1,i)-b(1,i)*H ==0) then
c=c+1
end
end
if(c ==3)
printf (" for unit parabolic input Ess=0 \nn")
 else if(c ==2) then
Ess =(a(1 ,3) -b(1 ,3)*H)/a(1 ,1)*H;
ka=1/Ess;
 disp (Ess ," for unit parabolic input Ess=")
 diisp(ka,"Ka=")
 else printf (" for unit parabolic input Ess=infinite\nn")
 end
 end