blob: 37acfe21dc7163dbdbf109cbe8888c361aebcc56 (
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
52
53
54
55
56
57
|
// To Determine the rotor angle and angular frequency using runga kutta and euler`s modified method
clc
clear
Pm=3;
r1Pm=1.2;
r2Pm=2;
H=3;
f=60;
Dt=.02;
Pe=1.5;
Do=asind(1.5/3);
do=Do/57.33;
wo=0;
d=0;
K10=0;
l10=62.83*(1.5-1.2*sin(do))*.02;
K20=(377.5574-376.992)*.02;
l20=62.83*(1.5-1.2*sin(do))*.02;
K30=(377.5574-376.992)*.02;
l30=62.83*(1.5-1.2*sin(.5296547))*.02;
K40=l30*0.02;
l40=62.83*(1.5-1.2*sin(.5353094))*.02;
d1=.53528;
Dwo=(3*1.13094+2*1.123045+1.115699)/6;
w1=wo+Dwo;
d1=.53528;
mprintf("Runga-Kutta method-\n")
mprintf("w1=%.6f \nd1=%.5f\n",w1,d1);
d7=1.026;
w7=6.501;
wp=376.992+6.501;
K17=(wp-376.992)*0.02;
l17=62.83*(1.5-1.2*sin(1.026))*.02;
K27=(6.501+.297638)*0.02;
l27=62.83*(1.5-1.2*sin(1.09101))*.02;
K37=(6.501+.2736169)*0.02;
l37=62.83*(1.5-1.2*sin(1.0939863))*.02;
K47=(6.501+.545168)*0.02;
l47=62.83*(1.5-1.2*sin(1.16149))*.02;
Dd7=(K17+2*K27+2*K37+K47)/6;
d8=d7+Dd7;
Dw7=(l17+2*l27+2*l37+l47)/6;
w8=w7+Dw7;
mprintf("d8=%.5f rad.\nw8=%.4frad/sec\n\n",d8,w8)
mprintf("using Euler`s Modified Method-\n");
d0=0;
d10=.524;
w=62.83*(1.5-1.2*sin(.524));
d11=d10+0;
w11=w*.02;
d=1.13094;
dav=(0+d)/2;
wav=(56.547+56.547)/2;
d01=.524+.56547*.02;
w11=0+56.547*0.02;
mprintf("d01=%.4f\nw11=%.5f",d01,w11);
|