-
Notifications
You must be signed in to change notification settings - Fork 3
/
plotStuff.m
70 lines (62 loc) · 1.63 KB
/
plotStuff.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
function plotStuff(~)
clf
close
maxAoA = 2;
% Acc = 99;
% TWR = zeros(Acc, 2);
% rpm = zeros(Acc, 2);
% torque = zeros(Acc, 2);
% motorpower = zeros(Acc, 2);
% PowerInduced = zeros(Acc, 2);
% motorElectricalPower = zeros(Acc, 2);
Acc = 20;
j = 1;
increment = (2/Acc);
%this loops through AoA
for l = 0:1:maxAoA
%this loops through TWR
i = 1;
for k=0.1:increment:2;
%if i >0.1
[TWR(i, j), rpm(i, j), torque(i, j), motorpower(i, j), PowerInduced(i, j), motorElectricalPower(i, j)] = rpmRequiredQuiet(k,l);
i = i + 1;
%end
end
j = j + 1
end
j = 1;
%for l = 0:1:maxAoA
figure(1)
hold on;
plot(TWR, motorpower);
title('Motor Power vs. Thrust to Weight Ratio')
xlabel('Thrust to Weight Ratio')
ylabel('Power (Watts)')
figure(2)
hold on;
plot(TWR, PowerInduced, '--');
title('Power Induced vs. Thrust to Weight Ratio')
xlabel('Thrust to Weight Ratio')
ylabel('Power (Watts)')
%legend(['Motor Power, AoA: ', num2str(j)], ['Power Induced, AoA: ', num2str(j)], ['Electrical Power, AoA: ', num2str(j)])
figure(3)
hold on;
plot(TWR, motorElectricalPower, ':');
title('Electrical Power vs. Thrust to Weight Ratio')
xlabel('Thrust to Weight Ratio')
ylabel('Power (Watts)')
figure(4)
hold on;
plot(TWR, (torque*1000));
title('Torque vs. Thrust to Weight Ratio')
xlabel('Thrust to Weight Ratio')
ylabel('Torque (Nmm)')
figure(5)
hold on;
plot(TWR, rpm);
title('RPM Required vs. Thrust to Weight Ratio')
xlabel('Thrust to Weight Ratio')
ylabel('RPM Required')
%j = j + 1;
%end
end