summaryrefslogtreecommitdiff
path: root/3793/CH11/EX11.4/exp_11_4.sce
blob: d3d458f24a218cba1e0968d4ab7fc50e61c21084 (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
clear;
clc;
function [deltam]=stabnr (tolr);
    itr=0;
    ndeltam=0;
    deltam=input('Initial estimate of deltam');
    difff=abs(ndeltam-deltam);
    while difff>tolr;
        itr=itr+1;
        fdeltam=2.7202*cos(deltam)+.8*deltam-2.8247;
        dfdeltam=2.7202*sin(deltam);
        ndeltam=deltam+fdeltam/dfdeltam;
        difff=abs(ndeltam-deltam);
        deltam=ndeltam;
        
    end
    deltam=deltam*180/%pi;
    mprintf("Maximum swing of the rotor angle is %.4f degree, since it is less than(pi-delta0) therefore system will remain stable\n",deltam);
endfunction
phi=-acosd(.8);
S=complex(.8,.6);
pu=.8;
V=1;
I=conj(S)/conj(V);
Xtot=.5;
E=V+%i*I*Xtot;
E=abs(E);
delta0=asin(pu*Xtot/(E*V));
mprintf("Deta0=%.4f radian\n",delta0);
tolr=.001;
[deltam]=stabnr (tolr);
deltac=acos(-.0866/(2.7202));
H=6;
M=H/(%pi*50);
pi=.8;
t=sqrt(2*M*(deltac-delta0)/pi);
mprintf("Critical angle is %.4f radian and time is %.4f seconds",deltac,t);