柱状图(`bar`)
柱状图(bar)
02_柱与散点 5 张 MATLAB R2023b 100 mm 宽 @ 300 dpi
这个方法适合什么
分类之间的数值比较,柱高即数值。适合:各方案指标对比、各次谐波含量、分时段电量、各馈线负载率。
电气场景
1 各治理方案谐波电压畸变率

2 分时段电量构成

3 各次谐波电流含量

4 主变压器夏冬负载率

5 补偿装置投切前后功率因数

代码
脚本 p2_bar_scatter.m 中对应 bar 的一段,SEL 用于选择只跑某几个方法。
if any(SEL==1)
% ---- 1.1 各治理方案谐波电压畸变率 ----
nm = {'无治理','单调谐','双调谐','有源滤波','混合治理'};
Y = [9.8 6.1 3.9 2.4
6.4 4.0 2.6 1.7
4.9 3.2 2.0 1.3
3.1 1.9 1.2 0.8
2.2 1.4 0.9 0.6];
f = ml_fig(PP,100,80);
ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
hb = bar(ax,Y,'grouped');
for k = 1:4, set(hb(k),'FaceColor',C(k,:),'EdgeColor','none'); end
set(ax,'XTick',1:5,'XTickLabel',ml_tx(nm),'XTickLabelRotation',0);
xlabel(ml_tx('谐波治理方案'));
ylabel(ml_tx('谐波电压畸变率 <i>U</i>_{THD} / %'));
xlim(ax,[0.4 5.6]); ylim(ax,[0 15.2]);
lg = legend(ax,hb,ml_tx({'5 次','7 次','11 次','13 次'}), ...
'Location','northeast','Orientation','horizontal','NumColumns',2);
ml_style_legend(lg,PP);
save_png(f,FIGD,'各治理方案谐波电压畸变率');
% ---- 1.2 分时段电量构成 ----
nm = {'尖峰','高峰','平段','低谷'};
Y = [3.2 5.6 12.8
5.1 9.4 21.6
4.2 8.1 17.3
2.4 5.2 11.5]; % 10^4 kWh
f = ml_fig(PP,100,80);
ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
hb = bar(ax,Y,'grouped');
for k = 1:3, set(hb(k),'FaceColor',C(k,:),'EdgeColor','none'); end
set(ax,'XTick',1:4,'XTickLabel',ml_tx(nm),'XTickLabelRotation',0);
xlabel(ml_tx('负荷时段'));
ylabel(ml_tx('用电量 / 10^{4} kW·h'));
xlim(ax,[0.4 4.6]); ylim(ax,[0 30]);
lg = legend(ax,hb,ml_tx({'居民','商业','工业'}), ...
'Location','northeast','Orientation','horizontal');
ml_style_legend(lg,PP);
save_png(f,FIGD,'分时段电量构成');
% ---- 1.3 各次谐波电流含量 ----
nm = {'3 次','5 次','7 次','9 次','11 次','13 次'};
Y = [18.4 9.2 4.6
31.5 15.8 7.2
14.2 6.4 3.1
5.8 3.2 1.6
3.4 2.1 1.1
2.1 1.3 0.7];
f = ml_fig(PP,100,80);
ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
hb = bar(ax,Y,'grouped');
for k = 1:3, set(hb(k),'FaceColor',C(k,:),'EdgeColor','none'); end
set(ax,'XTick',1:6,'XTickLabel',ml_tx(nm),'XTickLabelRotation',0);
xlabel(ml_tx('谐波次数 <i>h</i>'));
ylabel(ml_tx('谐波电流含有率 <i>I</i>_{h} / %'));
xlim(ax,[0.4 6.6]); ylim(ax,[0 44]);
lg = legend(ax,hb,ml_tx({'变频泵','六脉整流','电弧炉'}), ...
'Location','northeast');
ml_style_legend(lg,PP);
save_png(f,FIGD,'各次谐波电流含量');
% ---- 1.4 主变压器夏冬负载率 ----
nm = {'1 号主变','2 号主变','3 号主变','4 号主变'};
Y = [78.5 84.2
62.3 71.6
91.4 88.7
55.2 48.9];
f = ml_fig(PP,100,80);
ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
hb = bar(ax,Y,'grouped');
set(hb(1),'FaceColor',C(2,:),'EdgeColor','none');
set(hb(2),'FaceColor',C(1,:),'EdgeColor','none');
set(ax,'XTick',1:4,'XTickLabel',ml_tx(nm),'XTickLabelRotation',0);
xlabel(ml_tx('变电站主变编号'));
ylabel(ml_tx('最大负载率 <i>\beta</i> / %'));
xlim(ax,[0.4 4.6]); ylim(ax,[0 128]);
lg = legend(ax,hb,ml_tx({'夏季典型日','冬季典型日'}), ...
'Location','northeast','Orientation','horizontal');
ml_style_legend(lg,PP);
save_png(f,FIGD,'主变压器夏冬负载率');
% ---- 1.5 补偿装置投切前后功率因数 ----
nm = {'并联电容','SVG','SVG + 电容'};
Y = [0.76 0.94
0.79 0.98
0.74 0.99];
f = ml_fig(PP,100,80);
ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
hb = bar(ax,Y,'grouped');
set(hb(1),'FaceColor',[0.65 0.65 0.65],'EdgeColor','none');
set(hb(2),'FaceColor',C(3,:),'EdgeColor','none');
set(ax,'XTick',1:3,'XTickLabel',ml_tx(nm),'XTickLabelRotation',0);
xlabel(ml_tx('无功补偿装置'));
ylabel(ml_tx('功率因数 cos<i>\phi</i>'));
xlim(ax,[0.4 3.6]); ylim(ax,[0 1.32]);
lg = legend(ax,hb,ml_tx({'投切前','投切后'}), ...
'Location','northeast','Orientation','horizontal');
ml_style_legend(lg,PP);
save_png(f,FIGD,'补偿装置投切前后功率因数');
end

浙公网安备 33010602011771号