Sei sulla pagina 1di 19

Final Exam

Project
ECE 830

Department of Electrical Engineering


Student Name: Naveed Mazhar

Table of Contents
List of Figures.........................................................................................3
Non Linear Equations.............................................................................4
System Linearization..............................................................................5
Matrices of State Space..........................................................................9
Open Loop Eigen Values.......................................................................10
Controllability and Observability..........................................................10
Calculations and Methodology Used....................................................10
Feedback matrices, K and K for each case..........................................11
Closed-loop eigenvalues for each case................................................11
Observer matrix L & observer eigenvalues..........................................12
Results for your best design with minimal inputs and outputs.............13
Summary discussion of your process and results.................................14
References...........................................................................................15
Appendix..............................................................................................15

List of Figures
Figure 1(Outputs Plot using all inputs and outputs).............................13
Figure 2(Output Plot with minimum Inputs & Outputs)........................14
Figure 3 (SIMULINK Implementation of minimum I/O's System)...........18

Non Linear Equations


The non-linear equations of the two generators are given below.

1 1 s

2 2 s
D1

2
s Pm1 1 [V1 G11 V1V2{G12cos (1 2 ) B12 sin(1 2 )}
s
1

2 H1
V1V3{G13cos (1 3 ) B13 sin(1 3 )}]

D2

2
s Pm 2 2 [V2 G22 V2V1{G21cos ( 2 1 ) B21 sin( 2 1 )}
s
2

2H 2
V2V3{G23cos ( 2 3 ) B23 sin( 2 3 )}]

In these equations and represent the rotational angle and speed respectively. The
static VAR compensator (SVC) equation is as follows:

B SVC

1
K
K
BSVC R V3 R Vref
TR
TR
TR

This whole system has three inputs Pm1, Pm2 and Vref and three outputs 1, 2 and V3. The
third output V3 is defined by following equation:

V3

Y31V1{cos(1 ) j sin(1 )} Y32V2{cos( 2 ) j sin( 2 )}


G33 j[ B33 BSVC ]

By putting the value of V3 in above equations, we get following system of non-linear


equations:

1 1 s

2 2 s

D1
2
Pm1 1 [V1 G11 V1V2{G12cos(1 2 ) B12 sin(1 2 )}

1 s
2 H1

Y31V1{cos(1 ) j sin(1 )} Y32V2{cos( 2 ) j sin( 2 )}


{G13cos(1 3 ) B13 sin(1 3 )} ]
V1
G33 j[ B33 BSVC ]

D2

2 [V2 2G22 V2V1{G21cos( 2 1 ) B21 sin( 2 1 )}


m
2

2 s

2H 2
Y V {cos(1 ) j sin(1 )} Y32V2{cos( 2 ) j sin( 2 )}
{G23cos ( 2 3 ) B23 sin( 2 3 )} ]
V2 31 1
G33 j[ B33 BSVC ]

B SVC

K Y31V1{cos(1 ) j sin(1 )} Y32V2{cos( 2 ) j sin( 2 )} K R


1
BSVC R

Vref
TR
TR
G33 j[ B33 BSVC ]
TR

System Linearization
As the non-linear system is very complex to understand and analyze, so it will be
linearized now. First, the output V3 equation will be simplified.

V3

V3

Y31V1{cos(1 ) j sin(1 )} Y32V2{cos( 2 ) j sin( 2 )}


G33 j[ B33 BSVC ]
1 (G31 jB31 )V1{cos(1 ) j sin(1 )} (G32 jB32 )V2{cos( 2 ) j sin( 2 )}
G33 j[ B33 BSVC ]

V1 G31 cos x1 B31 sin x1 V2 G32 cos x2 B32 sin x2

j V1 B31 cos x1 G31 sin x1 V2 B32 cos x2 G32 sin x2


V3
G332 ( B33 x5 )2
Let

V3 R jS R 2 S 2
Where

G332 ( B33 x5 )2
1

G332 ( B33 x5 ) 2

V1 G31 cos x1 B31 sin x1 V2 G32 cos x2 B32 sin x2

V1 B31 cos x1 G31 sin x1 V2 B32 cos x2 G32 sin x2

Also we define variables RR,SS and GG for further use to provide simplicity.
RR V1 G31 cos x1 B31 sin x1 V2 G32 cos x2 B32 sin x2

SS V1 B31 cos x1 G31 sin x1 V2 B32 cos x2 G32 sin x2


GG G332 ( B33 x5 )2

The partial derivative of V3 can be defined as follows:


V3 R 2 S 2
V3

S
S
S
Z
Z

R S
V3 1 S
S
R
S
Z V3 Z
Z
2

Now, let us describe the system by state variables x 1, x2, x3, x4 and x5 instead of 1, 2, 1,
2 and BSVC. Also, the system inputs will be defined by u 1, u2 and u3 replacing Pm1, Pm2
and Vref. Hence, after these change of variables, the system transforms to following:

f1 x1 x3 s

f 2 x2 x4 s

f 3 x3 s
2 H1

D1
2
u1 x3 [V1 G11 V1V2 {G12 cos( x1 x2 ) B12 sin( x1 x2 )}

V1

Y31V1{cos( x1 ) j sin( x1 )} Y32V2{cos( x2 ) j sin( x2 )}


{G13cos ( x1 3 ) B13 sin( x1 3 )}]
G33 j[ B33 x5 ]

f 4 x4 s
2H 2

f5 x5

D2
2
u2 x4 [V2 G22 V2V1{G21cos ( x2 x1 ) B21 sin( x2 x1 )}

Y31V1{cos( x1 ) j sin( x1 )} Y32V2{cos( x2 ) j sin( x2 )}


{G23cos( x2 3 ) B23 sin( x2 3 )}]
V2
G33 j[ B33 x5 ]

1
K Y31V1{cos( x1 ) j sin( x1 )} Y32V2 {cos( x2 ) j sin( x2 )} K R
x5 R

u3
TR
TR
G33 j[ B33 x5 ]
TR

The linear system can be achieved by:


f1
x
1

f1
x2

f1
x3

f1
x4

f 2
x
1

f 2
x2

f 2
x3

f 2
x4

f
A 3
x1
f 4

x1
f 5

x1

f 3
x2

f3
x3

f3
x4

f 4
x2

f 4
x3

f 4
x4

f 5
x2

f5
x3

f5
x4

f1

x1

f1
x2

f1
x3

f1
x4

f 2
x2

f 2
x3

f 2
x4

f 3
x2

f 3
x3

f 3
x4

f 2
x1

f 3

x1

f1
x5

f 2
x5

f3

x5
f 4

x5
f5

x5

[ X ,U ,Y ][ X ,U ,Y ]

f1

x5
f 2

x5
f 3

x5

[ X ,U ,Y ][ X ,U ,Y ]

f1
u
1

f1
u2

f 2
u
1

f 2
u2

f 3
u1

f3
u2

f 5

u1

f5
u2

f 4

u1
~

~ ~

~ ~

f 4
u2

f1
u3

f 2
u3

f3

u3
f 4

u3
f5

u3

~ ~

[ X ,U ,Y ][ X ,U ,Y ]

V3
1
R V1G31 sin x1 V1 B31 cos x1 S V1 B31 sin x1 V1G31 cos x1

x1 GG.V3
V3
1
R V2G32 sin x2 V2 B32 cos x2 S V2 B32 sin x2 V2 G32 cos x2

x2 GG.V3
V3 V3

0
x3 x4
3

V3 1
2
2 2
R RR S SS ( B33 x5 ) G33 ( B33 x5 )
x5 V3

f1 f1 f1 f1

0
x1 x2 x4 x5
f1
1
x3
f 2 f 2 f 2 f 2

0
x1 x2 x3 x5
f 2
1
x4

V1V2 {G12 sin( x1 x2 ) B12 cos( x1 x2 )}

V R V1G31 sin x1 V1 B31 cos x1 S V1B31 sin x1 V1G31 cos x1


3

V1

[G13 cos( x1 3 ) B12 sin( x1 3 )]


V3[G13 sin( x1 3 ) B12 cos( x1 3 )]

f 3

s
x1
2 H1

V1V2 {G12 sin( x1 x2 ) B12 cos( x1 x2 )}

f 3

x2
2 H1 V1

f 3
D
1
x3
2 H1
f 3
0
x4

V R V2G32 sin x2 V2 B32 cos x2 S V2 B32 sin x2 V2G32 cos x2


3

[G cos( x ) B sin( x )]

1
3
12
1
3
13

3
f 3

( R * RR S * SS )
2
2 2
s V1

(
B

x
)
G

(
B

x
)

33
5
33
33
5

{G13cos ( x1 3 ) B13 sin( x1 3 )}


x5 2 H1
V3

f 4
0
x3
f 4
D
2
x4
2H 2
3

f 4
( R * RR S * SS )
2
2 2
s V2

(
B

x
)
G

(
B

x
)

33
5
33
33
5

{G23cos( x2 3 ) B23 sin( x2 3 )}


x5 2 H 2
V3

f 5
K 1
R R V1G31 sin x1 V1 B31 cos x1 S V1 B31 sin x1 V1G31 cos x1
x1
TR V3
f 5
K 1
R R V2G32 sin x2 V2 B32 cos x2 S V2 B32 sin x2 V2 G32 cos x2
x2
TR V3
f 5 f 5

0
x3 x4
3
f 5
1 K R ( R * RR S * SS )
2
2 2

( B33 x5 ) G33 ( B33 x5 )
x5
TR TR
V3

Similarly the B matrix becomes as follows:

0
0

0
0

s
2H 2

0
0
s
2 H1

K R

TR

~ ~

[ X ,U ,Y ][ X ,U ,Y ]

C 0

V3
x1

0
0
V3
x2

1 0
0 1
0 0

V3
x5

~ ~

[ X ,U ,Y ][ X ,U ,Y ]

Matrices of State Space


The above equations were implemented in MATLAB. The complete code is given in
Appendix A. Following state space matrices were attained in result.

0
0
1
0
0
0
0
0
1
0

-20.0834
6.7781
-0.0740
0
1.0695

42.3090 115.7154
0
0.01 9.3304
-3.3126
3.3126
0
0
-43.4178

0
0
0
0
0
0

5.5769
0
0

0
37.7
0
0
0 112.5
0
0
1 0
0
0
0
0 1
0

0.0294 0.0294 0 0 0.2748

Open Loop Eigen Values


By using MATLAB, the eigenvalues of open loop system are as follows:
eig(A)

>>
-43.4314 + 0.0000i
0.0017 +10.9218i
0.0017 -10.9218i

10

-0.0369 + 4.1353i
-0.0369 - 4.1353i

Controllability and Observability


In MATLAB the controllability and observability were checked by use of respective built
in command. The results are given by:
rank(ctrb(A,B))
>>
5
rank(obsv(A,C))
>>
5

As the rank of controllability and observability matrix is 5, the system


is both controllable and observable.

Calculations and Methodology Used


Eigen values of A matrix were found using
eig(A)

Then the controllability and observability was checked using


rank(ctrb(A,B))
rank(obsv(A,C))

It was found that the system was controllable and observable.


Then a state feedback matrix K was found which placed closed loop
poles at
poles1=[-2 -3 -4 -5 -6];

by the command

K=place(A,B,poles1)

Then a full order observer was designed which was used with state
feedback matrix.
The observer poles were placed at
poles2=[-10 -12 -13 -16 -18];

by the command

L=place(A',C',poles2').

The minimum order observer was designed by first checking how many
minmimum inputs/outputs were sufficient to maintain controllability
and observability.
rank(ctrb(A,B(:,1)))
>>
5
rank(obsv(A,C(1,:)))
>>
5

11

It showed that system was both controllable and observable with single
input and single outout.
And the state feedback control with minimum order observer was
deisgned by the following code
B=B(:,1);
C=C(1,:);
poles1=[-2 -3 -4 -5 -6];
rank(ctrb(A,B))
rank(obsv(A,C))
K=place(A,B,poles1)
eig(A-B*K)
poles2=[-10 -12 -13 -16 -18];
L=place(A',C',poles2')
L=L';
eig(A-L*C)
eig([A -B*K;L*C A-B*K-L*C])

The complete matlab code for this is given in Appendix B.

Feedback matrices, K and K for each case


Feedback matrix for B full order

0.1199 0.3920 1.5978 0.1825 0.1918


K 1.0053 2.5499 0.0261 0.2389 0.2475
0.0294 0.0294
0
0
0.3682
Feedback matrix for B minimum order

K ' (1.02 03) * 0.1858 -0.1697 -0.0042 0.0036 2.623

Closed-loop eigenvalues for each case


Closeloop eigen values for B full order
-3.0000
-6.0000
-4.0000
-5.0000
-2.0000
Closeloop eigen values for B minimum order
-6.0000
12

-5.0000
-4.0000
-3.0000
-2.0000

Observer matrix L & observer eigenvalues


Observer gain matrix for full order observer

-11.0867 -3.5095 30.0254 -6.2244 0.1366


L -0.7145 -0.6277 0.2994 26.0503 0.0129
-5.0406 -3.6812 -0.3995 -13.4010 -111.1265
Eigen values of observer
-18.0000
-16.0000
-10.0000
-13.0000
-12.0000
Observer gain matrix for minimum order observer

L' -4.0708 45.7599 25.4982 -43.6726 -229.3613


Eigen values of observer
-18.0000
-16.0000
-13.0000
-12.0000
-10.0000

13

Results for your best design with minimal inputs and


outputs

Figure 1(Outputs Plot using all inputs and outputs)

14

Figure 2(Output Plot with minimum Inputs & Outputs)

The Figure 1 shows the output plot while dealing the minimum input minimum output
system. It can be observed that the system stabilizes to its equilibrium with output
feedback control, whatever initial condition is applied.

Summary discussion of your process and results


First of all the non-linear complex system was linearized using
conventional Taylor Series technique. Then the system was stabilized
using the output feedback control technique. After that the inputs and
outputs were reduced such that the system is still controllable and
observable. The system was both controllable and observable with one
input and one output. The Similar output feedback control was
implemented for reduced SISO system. The results were implemented
using MATLAB/Simulink and system was found to be stabilizing to its
equilibrium values of states.

15

References
[1] Linear System Theory by W.J. Rugh
[2] Non-Linear System Theory by Hassan K. Khalil

Appendix
Appendix A
clc;clear all;close all;
%% Given Constants
H1=26*1.3;
D1=5;
H2=5;
D2=0.1;
Kr=9;
Tr=0.08;
ws=377;
G11=0.7096; B11=-3.4484;
G12=0.1610; B12=1.0999;
G13=0.1614; B13=2.1754;
G21=0.1610; B21=1.0999;
G22=0.2990; B22=-3.0905;
G23=0.1931; B23=1.9327;
G31=0.1614; B31=2.1754;
G32=0.1931; B32=1.9327;
G33=0.8212; B33=-4.0607;
%Nominal Equlibria
V1=1.0481;
V2=1.0256;
V3o=1.0958;
delta1=0.0870;
delta2=0.2204;
delta3=-0.1491;
u1=1.5584;
u2=1.63;
x1=delta1;x2=delta2;
x3=ws;x4=ws;
x5=0.2498;

%% Equations
GG=sqrt(G33^2+(B33+x5)^2);
R=(V1*(G31*cos(x1)-B31*sin(x1))+V2*(G32*cos(x2)-B32*sin(x2)))/GG;
S=(V1*(B31*cos(x1)+G31*sin(x1))+V2*(B32*cos(x2)+G32*sin(x2)))/GG;
V3=sqrt(R^2+S^2);
RR=R*GG;
SS=S*GG;
C=[0 0 1 0 0;0 0 0 1 0;0 0 0 0 0];

16

C(3,1)=(1/V3o)*(R*(-V1*G31*sin(x1)-V1*B31*cos(x1))+S*(-V1*B31*sin(x1)...
+V1*G31*cos(x1)))/GG;
C(3,2)=(1/V3o)*(R*(-V2*G32*sin(x2)-V2*B32*cos(x2))+S*(-V2*B32*sin(x2)...
+V2*G32*cos(x2)))/GG;
C(3,5)=-(1/V3o)*(R*RR+S*SS)*((B33+x5)*((G33^2+(B33+x5)^2)^(-3/2)));

A=zeros(5,5);
A(1,1)=0;
A(1,2)=0;
A(1,3)=1;
A(1,4)=0;
A(1,5)=0;
A(2,1)=0;
A(2,2)=0;
A(2,3)=0;
A(2,4)=1;
A(2,5)=0;
A(3,1)=-(ws/(2*H1))*(V1*V2*(-G12*sin(x1-x2)+B12*cos(x1-x2))
+V1*((C(3,1)...
*(G13*cos(x1-delta3)+B13*sin(x1-delta3)))+...
(V3o*(-G13*sin(x1-delta3)+B13*cos(x1-delta3)))));
A(3,2)=(ws/(2*H1))*-(V1*V2*(G12*sin(x1-x2)-B12*cos(x1-x2))
+V1*((C(3,2)...
*(G13*cos(x1-delta3)+B13*sin(x1-delta3)))));
A(3,3)=-D1/(2*H1);
A(3,4)=0;
A(3,5)=(ws/(2*H1))*(-V1*C(3,5))*(G13*cos(x1-delta3)+B13*sin(x1-delta3));
A(4,1)=(ws/(2*H2))*-(V2*V1*(G21*sin(x2-x1)-B21*cos(x2-x1))
+V2*((C(3,1)...
*(G23*cos(x2-delta3)+B23*sin(x2-delta3)))));
A(4,2)=(ws/(2*H2))*-(V2*V1*(-G21*sin(x2-x1)+B21*cos(x2-x1))
+V2*((C(3,2)...
*(G23*cos(x2-delta3)+B23*sin(x2-delta3)))...
+(V3o*(-G23*sin(x2-delta3)+B23*cos(x2-delta3)))));
A(4,3)=0;
A(4,4)=-D2/(2*H2);
A(4,5)=(ws/(2*H2))*(-V2*C(3,5))*(G23*cos(x2-delta3)+B23*sin(x2-delta3));
A(5,1)=-Kr/Tr*C(3,1);
A(5,2)=-Kr/Tr*C(3,2);
A(5,3)=0;
A(5,4)=0;
A(5,5)=-(1/Tr)-(Kr/Tr)*C(3,5);
B=[zeros(2,3);ws/(2*H1) 0 0;0 ws/(2*H2) 0;0 0 Kr/Tr];
D=zeros(3,3);
disp('A=');disp(A);disp('B=');disp(B);
disp('C=');disp(C);disp('D=');disp(D);

17

Appendix B
clc;clear all;close all;
%%
A=[0 0 1 0 0;
0 0 0 1 0
-20.0834 6.7781 -0.0740 0 -1.0695
42.3090 -115.7154 0 -0.01 -9.3304
-3.3126 3.3126 0 0 -43.4178];
B=[0 0 0;0 0 0;5.5769 0 0;0 37.7 0;0 0 112.5];
C=[0 0 1.0000 0 0;
0 0 0 1.0000 0;
0.0294 -0.0294 0 0 0.2748]
D=zeros(3,3);
%%
eig(A)
rank(ctrb(A,B))
rank(obsv(A,C))
%%
poles1=[-2 -3 -4 -5 -6];
K=place(A,B,poles1)
eig(A-B*K)
poles2=[-10 -12 -13 -16 -18];
L=place(A',C',poles2')
L=L';
eig(A-L*C)
eig([A -B*K;L*C A-B*K-L*C])
%%
rank(ctrb(A,B(:,1)))
rank(obsv(A,C(1,:)))
Bmin=B(:,1);
Cmin=C(1,:);
poles1=[-2 -3 -4 -5 -6];
K=place(A,Bmin,poles1)
eig(A-Bmin*K)
poles2=[-10 -12 -13 -16 -18];
L=place(A',Cmin',poles2')
L=L';
eig(A-L*Cmin)
eig([A -Bmin*K;L*Cmin A-Bmin*K-L*Cmin])
sys=ss(([A -Bmin*K;L*Cmin A-Bmin*K-L*Cmin]),[Bmin;0;0;0;0;0],[[Cmin 0 0
0 0 0];[0 0 0 0 0 0 0 0 0 0]],[0;0])
step(sys)

Appendix C

18

Figure 3 (SIMULINK Implementation of minimum I/O's System)

19

Potrebbero piacerti anche