Skip to content

Commit

Permalink
Second version
Browse files Browse the repository at this point in the history
  • Loading branch information
dciliberti committed Aug 23, 2019
1 parent 2758e44 commit 05d57d9
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions performanceCharts.m
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
% Calculate the Lehner 2280-40 electric motor map from performance data
% issued by the manufacturer. Plot propeller operating points on the map.
% Version 1. Operating points manually chosen as close as possible to the
% available manufacturer data.
% Version 2. Current calculated from RPM and shaft power assigned by the
% user, which has only to provide the desired propeller advance ratio J,
% the expected shaft power in Watt and the RPM.
close all; clearvars; clc

% Avio engine scaled data
% J Voltage Current Input power rpm Momentum Output power Efficiency
% - V A W /min Ncm W %
% Operative points: J, Power (W), RPM
MXCL = [1.46 403 9801
1.95 174 7351];

MXCL = [1.46 48.9 11.4 557.5 8623 56.8 513 92
1.95 36.3 6.6 239.6 6470 32.4 219.4 91.6];
MXCR = [1.84 39.1 9.8 383.2 6869 48.8 351.2 91.7
2.30 31.15 7.2 224.3 5495 35.6 205.1 91.4
2.76 25.8 5.2 134.2 4579 25.5 122.2 91.1
2.99 23.8 4.6 109.5 4232 22.5 99.5 90.9
3.22 22.1 4.4 97.2 3925 21.5 88.3 90.8];
MXCR = [1.84 300 7807
2.30 159 6246
2.76 96 5205
2.99 77 4804
3.22 63 4461];

% Lehner performance charts
% Current Input power RPM Momentum Output power Efficiency
% A W /min Ncm W %
V1 = csvread('data\V5.csv');
V2 = csvread('data\V10.csv');
V3 = csvread('data\V15.csv');
Expand All @@ -32,12 +29,14 @@
V11 = csvread('data\V55.csv');
V12 = csvread('data\V60.csv');

% Current Input power RPM Momentum Output power Efficiency
% A W /min Ncm W %
x = [V1(:,1); V2(:,1); V3(:,1); V4(:,1); V5(:,1); V6(:,1); V7(:,1); ...
V8(:,1); V9(:,1); V10(:,1); V11(:,1); V12(:,1)];
V8(:,1); V9(:,1); V10(:,1); V11(:,1); V12(:,1)]; % Current
y = [V1(:,3); V2(:,3); V3(:,3); V4(:,3); V5(:,3); V6(:,3); V7(:,3); ...
V8(:,3); V9(:,3); V10(:,3); V11(:,3); V12(:,3)];
V8(:,3); V9(:,3); V10(:,3); V11(:,3); V12(:,3)]; % RPM
z = [V1(:,5); V2(:,5); V3(:,5); V4(:,5); V5(:,5); V6(:,5); V7(:,5); ...
V8(:,5); V9(:,5); V10(:,5); V11(:,5); V12(:,5)];
V8(:,5); V9(:,5); V10(:,5); V11(:,5); V12(:,5)]; % Output power

% Limit curves from data
limCur = [V1(end,1); V2(end,1); V3(end,1); V4(end,1); V5(end,1); V6(end,1); V7(end,1); ...
Expand All @@ -50,7 +49,9 @@
[xq, yq] = meshgrid(0:0.1:15, 0:10:11000);
zq = griddata(x,y,z,xq,yq);

% Purge data outside limits TODO?
% Calculate current from expected output power and RPM (propeller data)
MXCL(:,4) = griddata(z,y,x,MXCL(:,2),MXCL(:,3));
MXCR(:,4) = griddata(z,y,x,MXCR(:,2),MXCR(:,3));

%% Plot section
figure(1)
Expand All @@ -69,8 +70,8 @@
plot3(V11(:,1),V11(:,3),V11(:,5),'k--')
plot3(V12(:,1),V12(:,3),V12(:,5),'k--')
plot3(limCur,limRPM,limPow,'k-','LineWidth',2)
climb = plot3(MXCL(:,3),MXCL(:,5),MXCL(:,7)+20,'or-','LineWidth',1.5);
cruise = plot3(MXCR(:,3),MXCR(:,5),MXCR(:,7)+20,'oy-','LineWidth',1.5);
climb = plot3(MXCL(:,4),MXCL(:,3),MXCL(:,2)+20,'or-','LineWidth',1.5);
cruise = plot3(MXCR(:,4),MXCR(:,3),MXCR(:,2)+20,'oy-','LineWidth',1.5);
hold off, grid on, view(-50,30)
xlabel('Current, A'), ylabel('RPM'), zlabel('Output power, W')
legend([climb,cruise], 'MXCL', 'MXCR','Location','Best','Color','cyan')
Expand All @@ -90,13 +91,13 @@
text(V12(end,1),V12(end,3),V12(end,5),'\leftarrow 60 V')

for i = 1:size(MXCL,1)
text(MXCL(i,3),MXCL(i,5),MXCL(i,7)+20,...
text(MXCL(i,4),MXCL(i,3),MXCL(i,2)+20,...
['J = ',num2str(MXCL(i,1)), ' \rightarrow'], ...
'HorizontalAlignment','right')
end

for i = 1:size(MXCR,1)
text(MXCR(i,3),MXCR(i,5),MXCR(i,7)+20,...
text(MXCR(i,4),MXCR(i,3),MXCR(i,2)+20,...
['J = ',num2str(MXCR(i,1)), ' \rightarrow'], ...
'HorizontalAlignment','right')
end
Expand All @@ -118,8 +119,8 @@
plot(V11(:,1),V11(:,3),'k--')
plot(V12(:,1),V12(:,3),'k--')
plot(limCur,limRPM,'k-','LineWidth',2)
climb = plot(MXCL(:,3),MXCL(:,5),'or-','LineWidth',1.5);
cruise = plot(MXCR(:,3),MXCR(:,5),'oy-','LineWidth',1.5);
climb = plot(MXCL(:,4),MXCL(:,3),'or-','LineWidth',1.5);
cruise = plot(MXCR(:,4),MXCR(:,3),'oy-','LineWidth',1.5);
hold off
clabel(C,H,'FontSize',15,'Color','white')
xlabel('Current, A'), ylabel('RPM'), title('Output power contour, W')
Expand All @@ -140,13 +141,13 @@
text(V12(end,1),V12(end,3),'\leftarrow 60 V')

for i = 1:size(MXCL,1)
text(MXCL(i,3),MXCL(i,5),...
text(MXCL(i,4),MXCL(i,3),...
['J = ',num2str(MXCL(i,1)), ' \rightarrow'], ...
'HorizontalAlignment','right')
end

for i = 1:size(MXCR,1)
text(MXCR(i,3),MXCR(i,5),...
text(MXCR(i,4),MXCR(i,3),...
['J = ',num2str(MXCR(i,1)), ' \rightarrow'], ...
'HorizontalAlignment','right')
end

0 comments on commit 05d57d9

Please sign in to comment.