-
Notifications
You must be signed in to change notification settings - Fork 0
/
Micro_Sat_Closed_Loop.m
69 lines (69 loc) · 1.61 KB
/
Micro_Sat_Closed_Loop.m
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
58
59
60
61
62
63
64
65
66
67
68
69
%%
constants;
[A,B,C,D] = linmod('Modal_Control_Open');
sys = ss(A,B,C,D);
pole(sys)
%% Eigenstructure
constants;
sys = linmod('Modal_Control_Open');
delta = 0.7;
omega = 0.2;
lambda = roots([1 2*delta*omega omega^2]);
VW1 = null([sys.a-lambda(1)*eye(7) sys.b]);
VW2 = null([sys.a-lambda(2)*eye(7) sys.b]);
V = [VW1(1:7) VW2(1:7)];
W = [VW1(8) VW2(8)];
K = -real(W/(sys.c*V))
damp(sys.a-sys.b*K*sys.c);
%% Close Bode
constants;
[A,B,C,D] = linmod('Modal_Control_Closed');
sys = ss(A,B,C,D);
bode(sys)
%%
constants;
[A,B,C,D] = linmod('Modal_Control_Open_Integ');
sys = ss(A,B,C,D);
pole(sys)
%% Eigenstructure Integral
constants;
sys = linmod('Modal_Control_Open_Integ');
delta = 0.7;
omega = 0.13;
lambda = [roots([1 2*delta*omega omega^2 ]); -omega]
VW1 = null([sys.a-lambda(1)*eye(8) sys.b]);
VW2 = null([sys.a-lambda(2)*eye(8) sys.b]);
VW3 = null([sys.a-lambda(3)*eye(8) sys.b]);
V = [VW1(1:8) VW2(1:8) VW3(1:8)];
W = [VW1(9) VW2(9) VW3(9)];
Kint = real(W/(sys.c*V))
damp(sys.a+sys.b*Kint*sys.c);
%% Close Bode INteg
constants;
[A,B,C,D] = linmod('Modal_Control_Closed_Integ');
sys = ss(A,B,C,D);
bode(sys)
%% Phase-lead siso q32
constants;
[A,B,C,D] = linmod('Phase_Control_Open');
G = ss(A,B,C,D);
bode(G)
sisotool (G);
%% Q33
constants;
[A,B,C,D] = linmod('Phase_Control_K1');
sys = ss(A,B,C,D);
%bode(sys)
dcgain(sys)
%% Q35
constants;
[A,B,C,D] = linmod('Phase_Control_Open');
G = ss(A,B,C,D);
K1 = tf([18.9*1.33*0.23 0.23],[1.33 1]);
sisotool(G,K1)
%% Q39
constants;
t2 = 67;
[A,B,C,D] = linmod('Phase_Control_K2');
sys = ss(A,B,C,D);
bode(sys)