-
Notifications
You must be signed in to change notification settings - Fork 1
/
initialize1.m
129 lines (116 loc) · 3.61 KB
/
initialize1.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
tic
clear;
clc;
prj.name = 'Ñîþç-2.1â';
prj.pn = 2175;
prj.mode = 'Íîìèíàëüíûé';
%'C:\Users\admin\Documents\MATLAB\',
prj.id = ['\',prj.name...
' ÏÍ = ' num2str(prj.pn)];
dm.T0 = 0.03; %ïåðèîä äèñêðåòèçàöèè,ñ
%% Ñ÷èòûâàåì äàííûå èç EXCEL
trj.data = xlsread([prj.id,' ÈÄ.xls'],'Òðàåêòîðèÿ');
% Ïàðàìåòðû òðàåêòîðèè
% 1: t,c - âðåìÿ
% 2: V, m/s - ñêîðîñòü
% 3: m, ò - ìàññà
% 4: P, òñ - ñóììàðíàÿ òÿãà
% 5: H, êì - âûñîòà
% 6: q, êãñ/ì2 - ñêîðîñòíîé íàïîð
% 7: Ì, á/ð - ÷èñëî Ìàõà
% 2: theta, ãðàä - ïðîãðàììíûé òàíãàæ
trj.massdata = xlsread([prj.id,' ÈÄ.xls'],'Ìàññîâûå öåíòðîâî÷íûå õàð-êè');
% Ìàññîâûå öåíòðîâî÷íûå õàðàêòåðèñòèêè
% 1: m, êã - ìàññà
% 2: Jzz, êã ì2 - îñåâîé ìîìåíò èíåðöèè
% 3: Cm, % - îòíîñèòåëüíîå ïîëîýåíèå öåíòðà ìàññ
trj.aerodata = xlsread([prj.id,' ÈÄ.xls'],'Àýðîäèíàìè÷åñêèå õàð-êè');
% Ìàññîâûå öåíòðîâî÷íûå õàðàêòåðèñòèêè
% 1: Ì, á/ð - ÷èñëî Ìàõà
% 2: cya, 1/ãðàä
% 3: ñyaalpha, 1/ãðàä
% 4: Cd, % - îòíîñèòåëüíîå ïîëîæåíèå öåíòðà äàâëåíèÿ
%% Âûáèðàåì ðàêåòó è ïîëåçíóþ íàãðóçêó
switch prj.name
case 'Ñîþç-2.1â'
par.Jupr = 298.3 * 9.81; % Í * ñ / êã
par.Sm = 6.82; % ì^2
par.mo = 62.306; % kg/s
par.mf = 28.398; % kg/s
par.Supr = pi * (0.32 ^ 2) / 4; % m^2
par.Xupr = 0.175; % m
par.nuo = 2;% ×èñëî óïðàâëÿþùèõ îðãàíîâ â êàíàëå òàíãàæà(ðûñêàíèÿ)
par.xgp = 32.4215;
otherwise
clear;
clc;
error('Íåïðàâèëüíàÿ ðàêåòà');
end;
% switch prj.pn
% case 2175
par.L = 43.14;% m
par.t12 = 196.94;% c
% otherwise
% clear;
% clc;
% error('Íåïðàâèëüíàÿ ïîëåçíàÿ íàãðóçêà');
% end;
t = [0:dm.T0:par.t12]';
%% Ñ÷èòûâàåì äàííûå èç data
trj.H = 1000 * interp1(trj.data(:,1),trj.data(:,5),t);
trj.t = trj.data(:,1);
trj.V = interp1(trj.data(:,1),trj.data(:,2),t);
trj.m = 1000 .* interp1(trj.data(:,1),trj.data(:,3),t);
trj.P = interp1(trj.data(:,1),trj.data(:,4),t) .* 1000 * 9.81;
trj.M = interp1(trj.data(:,1),trj.data(:,7),t);
trj.q = interp1(trj.data(:,1),trj.data(:,6),t) * 9.81;
trj.cya = interp1(trj.aerodata(:,1),trj.aerodata(:,2),trj.M) * 180 / pi;
trj.cyaalpha = interp1(trj.aerodata(:,1),trj.aerodata(:,3),trj.M) * 180 / pi;
trj.Jz = interp1(trj.massdata(:,1),trj.massdata(:,2),trj.m);
trj.Cm = interp1(trj.massdata(:,1),trj.massdata(:,3),trj.m) / 100;
trj.Cd = interp1(trj.aerodata(:,1),trj.aerodata(:,4),trj.M) / 100;
trj.l = par.xgp - par.L * trj.Cm;
%% Ðàññ÷èòûâàåì íåêîòîðûå ïàðàìåòðû
[~,~,trj.Pa,~] = atmoscoesa(trj.H);
trj.Pupr = par.Jupr * (par.mo + par.mf) / 4 - trj.Pa * par.Supr;
%% Ðàññ÷èòûâàåì êîýôôèöèåíòû
trj.Cthetatheta = trj.cya .* trj.q .* par.Sm .* par.L ...
.* (trj.Cm - trj.Cd) ./ trj.Jz;
trj.CthetaVy = -trj.Cthetatheta ./ trj.V;
trj.Cthetadelta = par.nuo * trj.Pupr .* (trj.Cm .* par.L - par.Xupr) ./ trj.Jz;
trj.CVytheta = - (trj.P + trj.cyaalpha .* trj.q .* par.Sm) ./ trj.m;
trj.CVyVy = trj.cya .* trj.q .* par.Sm ./ (trj.m .* trj.V);
trj.CVydelta = - par.nuo * trj.Pupr ./ trj.m;
%% Ñòðîèì ãðàôèêè
title('Ãðàôèêè èçìåíåíèÿ êîýôôèöèåíòîâ óðàâíåíèé âîçìóùåííîãî äâèæåíèÿ')
subplot(2,3,1);
plot(t,trj.Cthetatheta);
xlabel('t,c');
ylabel('C_{{\vartheta}\vartheta}, 1/c^2');
grid on;
subplot(2,3,2);
plot(t,trj.CthetaVy);
xlabel('t,c');
ylabel('C_{\varthetaV_y}, (ì*ñ)^{-1}');
grid on;
subplot(2,3,3);
plot(t,trj.Cthetadelta);
xlabel('t,c');
ylabel('C_{\vartheta\delta},1/c^2');
grid on;
subplot(2,3,4);
plot(t,trj.CVytheta);
xlabel('t,c');
ylabel('C_{V_y\vartheta}, 1/c^2');
grid on;
subplot(2,3,5);
plot(t,trj.CVyVy);
xlabel('t,c');
ylabel('C_{V_yV_y}, (ì*ñ)^{-1}');
grid on;
subplot(2,3,6);
plot(t,trj.CVydelta);
xlabel('t,c');
ylabel('C_{V_y\delta}, 1/c^2');
grid on;
toc;