散点图(`scatter`)
散点图(scatter)
02_柱与散点 5 张 MATLAB R2023b 100 mm 宽 @ 300 dpi
这个方法适合什么
两量关系的散点,可再按第三量调色或调大小。适合:负载率与效率、功率与温度、电压与不平衡度的相关性初筛。
电气场景
1 负载率与逆变器效率散点

2 输出功率与绕组温升散点

3 电压偏差与三相不平衡度散点

4 辐照度与光伏出力散点

5 循环次数与电池健康度散点

代码
脚本 p2_bar_scatter.m 中对应 scatter 的一段,SEL 用于选择只跑某几个方法。
if any(SEL==5)
rng(11);
% ---- 5.1 负载率 - 逆变器效率 ----
L = linspace(15,100,45)';
e1 = 93.6 + 5.4*(1-exp(-(L-10)/26)) - 0.0016*max(L-82,0).^2 + 0.10*randn(size(L));
e2 = 94.8 + 4.1*(1-exp(-(L-10)/32)) - 0.0012*max(L-86,0).^2 + 0.09*randn(size(L));
e3 = 92.4 + 6.2*(1-exp(-(L-10)/20)) - 0.0020*max(L-78,0).^2 + 0.12*randn(size(L));
f = ml_fig(PP,100,80);
ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
h1 = scatter(ax,L,e1,20,C(1,:),'filled'); hold(ax,'on');
h2 = scatter(ax,L,e2,20,C(2,:),'filled');
h3 = scatter(ax,L,e3,20,C(3,:),'filled');
set([h1 h2 h3],'MarkerFaceAlpha',0.65,'MarkerEdgeColor','none');
xlabel(ml_tx('负载率 <i>\beta</i> / %'));
ylabel(ml_tx('效率 <i>\epsilon</i> / %'));
xlim(ax,[10 105]); ylim(ax,[92 106]);
lg = legend(ax,[h1 h2 h3],ml_tx({'组串式','集中式','高频隔离'}), ...
'Location','northeast','Orientation','horizontal');
ml_style_legend(lg,PP);
save_png(f,FIGD,'负载率与逆变器效率散点');
% ---- 5.2 输出功率 - 绕组温升 ----
P = linspace(5,100,42)';
T1 = 8 + 0.42*P + 0.0022*P.^2 + 0.9*randn(size(P));
T2 = 6 + 0.30*P + 0.0016*P.^2 + 0.8*randn(size(P));
T3 = 5 + 0.22*P + 0.0011*P.^2 + 0.7*randn(size(P));
f = ml_fig(PP,100,80);
ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
h1 = scatter(ax,P,T1,20,C(4,:),'filled'); hold(ax,'on');
h2 = scatter(ax,P,T2,20,C(1,:),'filled');
h3 = scatter(ax,P,T3,20,C(3,:),'filled');
set([h1 h2 h3],'MarkerFaceAlpha',0.65,'MarkerEdgeColor','none');
xlabel(ml_tx('输出功率 <i>P</i> / kW'));
ylabel(ml_tx('绕组温升 <i>\Delta T</i> / K'));
xlim(ax,[0 108]); ylim(ax,[0 92]);
lg = legend(ax,[h1 h2 h3],ml_tx({'自然冷却','强迫风冷','油浸自冷'}), ...
'Location','northeast','Orientation','horizontal');
ml_style_legend(lg,PP);
save_png(f,FIGD,'输出功率与绕组温升散点');
% ---- 5.3 电压偏差 - 三相不平衡度 ----
dU = -5.2 + 10.4*rand(60,1);
ub1 = 0.18 + 0.075*abs(dU+0.6) + 0.10*rand(60,1);
ub2 = 0.42 + 0.135*abs(dU+0.9) + 0.14*rand(60,1);
ub3 = 0.26 + 0.098*abs(dU-0.4) + 0.11*rand(60,1);
f = ml_fig(PP,100,80);
ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
h1 = scatter(ax,dU,ub1,20,C(1,:),'filled'); hold(ax,'on');
h2 = scatter(ax,dU,ub2,20,C(2,:),'filled');
h3 = scatter(ax,dU,ub3,20,C(5,:),'filled');
set([h1 h2 h3],'MarkerFaceAlpha',0.65,'MarkerEdgeColor','none');
xlabel(ml_tx('母线电压偏差 <i>\delta U</i> / %'));
ylabel(ml_tx('三相不平衡度 <i>\epsilon</i> / %'));
xlim(ax,[-6 6]); ylim(ax,[0 1.55]);
lg = legend(ax,[h1 h2 h3],ml_tx({'居民','工业','商业'}), ...
'Location','northeast','Orientation','horizontal');
ml_style_legend(lg,PP);
save_png(f,FIGD,'电压偏差与三相不平衡度散点');
% ---- 5.4 辐照度 - 光伏出力 ----
G = 20 + 960*rand(70,1);
p1 = 0.49*G.*(1-0.00028*(G-500)) .* (1 + 0.04*randn(70,1));
p2 = 0.44*G.*(1-0.00036*(G-480)) .* (1 + 0.05*randn(70,1));
p3 = 0.52*G.*(1-0.00021*(G-520)) .* (1 + 0.03*randn(70,1));
f = ml_fig(PP,100,80);
ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
h1 = scatter(ax,G,p1,18,C(3,:),'filled'); hold(ax,'on');
h2 = scatter(ax,G,p2,18,C(6,:),'filled');
h3 = scatter(ax,G,p3,18,C(1,:),'filled');
set([h1 h2 h3],'MarkerFaceAlpha',0.60,'MarkerEdgeColor','none');
xlabel(ml_tx('辐照度 <i>G</i> / (W/m^{2})'));
ylabel(ml_tx('光伏出力 <i>P</i> / kW'));
xlim(ax,[0 1000]); ylim(ax,[0 640]);
lg = legend(ax,[h1 h2 h3],ml_tx({'组串 A','组串 B','组串 C'}), ...
'Location','northwest');
ml_style_legend(lg,PP);
save_png(f,FIGD,'辐照度与光伏出力散点');
% ---- 5.5 循环次数 - SOH ----
N = 0:60:3000;
s1 = 100 - 0.0042*N - 1.4*randn(size(N)); s1 = s1 - 0.35*max(N-1800,0)/100;
s2 = 100 - 0.0061*N - 1.6*randn(size(N));
s3 = 100 - 0.0028*N - 1.2*randn(size(N)); s3 = s3 - 0.28*max(N-2400,0)/100;
f = ml_fig(PP,100,80);
ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
h1 = scatter(ax,N,s1,16,C(1,:),'filled'); hold(ax,'on');
h2 = scatter(ax,N,s2,16,C(2,:),'filled');
h3 = scatter(ax,N,s3,16,C(3,:),'filled');
set([h1 h2 h3],'MarkerFaceAlpha',0.60,'MarkerEdgeColor','none');
xlabel(ml_tx('循环次数 <i>N</i> / 次'));
ylabel(ml_tx('健康度 SOH / %'));
xlim(ax,[-100 3100]); ylim(ax,[70 108]);
lg = legend(ax,[h1 h2 h3],ml_tx({'25 ℃','35 ℃','45 ℃'}), ...
'Location','northeast','Orientation','horizontal');
ml_style_legend(lg,PP);
save_png(f,FIGD,'循环次数与电池健康度散点');
end

浙公网安备 33010602011771号