三维火柴杆图(`stem3`)
三维火柴杆图(stem3)
06_极坐标与特殊 5 张 MATLAB R2023b 100 mm 宽 @ 300 dpi
这个方法适合什么
两个分类维度加一个幅值,用竖杆表达。适合:谐波次数×测点的幅值矩阵、多时段多测点的离散测量值。
电气场景
1 谐波次数测点幅值火柴杆

2 三相谐波幅值火柴杆

3 杆塔时间温度火柴杆

4 馈线时段负荷火柴杆

5 通道频段噪声火柴杆

代码
脚本 p6_polar_special.m 中对应 stem3 的一段,SEL 用于选择只跑某几个方法。
% ---- 7-1 谐波次数 × 测点 × 幅值 ----
try
nh = 1:13; npt = 1:4;
[H,P] = meshgrid(nh,npt);
A = [412 96 58 32 18 11 7.5 5.2 3.6 2.6 1.9 1.4 1.0; ...
398 88 51 29 16 10 6.8 4.7 3.3 2.4 1.7 1.3 0.9; ...
405 92 55 30 17 10.4 7.0 4.9 3.4 2.5 1.8 1.3 0.95; ...
386 84 48 27 15 9.2 6.2 4.3 3.0 2.2 1.6 1.2 0.85];
f = ml_fig(PP,100,90); ax = ax3(f,false);
h = stem3(ax,H,P,A,'filled','Color',C(1,:),'LineWidth',1.0);
try, h.MarkerFaceColor = C(1,:); catch, end
xlabel(ml_tx('谐波次数 <i>n</i>'));
ylabel(ml_tx('测点编号 <i>k</i>'));
zlabel(ml_tx('谐波幅值 <i>I_n</i> / A'));
xlim(ax,[0 14]); ylim(ax,[0.5 4.5]); zlim(ax,[0 470]);
save_png(f,FIGD,'谐波次数测点幅值火柴杆');
catch ME, fprintf('[FAIL] 7-1 %s\n',ME.message); close all; end
% ---- 7-2 三相 × 谐波次数 × 幅值 ----
try
nh = 1:9;
[H,PH] = meshgrid(nh,[0 -2*pi/3 2*pi/3]);
base = [412 0 96 0 58 0 32 0 18];
A = repmat(base,3,1).*[1.00;0.98;1.01];
f = ml_fig(PP,100,90); ax = ax3(f,false);
h = stem3(ax,H,PH,A,'filled','Color',C(3,:),'LineWidth',1.0);
try, h.MarkerFaceColor = C(3,:); catch, end
xlabel(ml_tx('谐波次数 <i>n</i>'));
ylabel(ml_tx('相角 <i>\phi</i> / rad'));
zlabel(ml_tx('谐波幅值 <i>I_n</i> / A'));
xlim(ax,[0 10]); ylim(ax,[-2.6 2.6]); zlim(ax,[0 460]);
yticks(ax,[-2*pi/3 0 2*pi/3]);
yticklabels(ax,{'-2\pi/3','0','2\pi/3'});
save_png(f,FIGD,'三相谐波幅值火柴杆');
catch ME, fprintf('[FAIL] 7-2 %s\n',ME.message); close all; end
% ---- 7-3 杆塔 × 时间 × 温度 ----
try
nt = 1:6; ntm = 1:8;
[T,Mt] = meshgrid(nt,ntm);
TT = 38 + 6.5*sin((Mt-1)/7*pi) + 2.6*cos((T-3.5)*0.7) + 0.8*randn(8,6);
f = ml_fig(PP,100,90); ax = ax3(f,false);
h = stem3(ax,T,Mt,TT,'filled','Color',C(2,:),'LineWidth',0.9);
try, h.MarkerFaceColor = C(2,:); catch, end
xlabel(ml_tx('杆塔编号 <i>k</i>'));
ylabel(ml_tx('时刻 <i>t</i> / h'));
zlabel(ml_tx('导线温度 <i>T</i> / °C'));
xlim(ax,[0.5 6.5]); ylim(ax,[0.5 8.5]); zlim(ax,[30 50]);
save_png(f,FIGD,'杆塔时间温度火柴杆');
catch ME, fprintf('[FAIL] 7-3 %s\n',ME.message); close all; end
% ---- 7-4 馈线 × 时段 × 负荷 ----
try
nf = 1:5; nt = 1:8;
[Fd,Td] = meshgrid(nf,nt);
prof = [0.62 0.58 0.55 0.60 0.66];
Ld = 6.5*(0.55 + 0.45*sin((Td-2)/7*2*pi/2.2)).*repmat(prof,8,1);
f = ml_fig(PP,100,90); ax = ax3(f,false);
h = stem3(ax,Fd,Td,Ld,'filled','Color',C(4,:),'LineWidth',0.9);
try, h.MarkerFaceColor = C(4,:); catch, end
xlabel(ml_tx('馈线编号 <i>m</i>'));
ylabel(ml_tx('时段 <i>t</i> / h'));
zlabel(ml_tx('有功负荷 <i>P</i> / MW'));
xlim(ax,[0.5 5.5]); ylim(ax,[0.5 8.5]); zlim(ax,[0 8]);
save_png(f,FIGD,'馈线时段负荷火柴杆');
catch ME, fprintf('[FAIL] 7-4 %s\n',ME.message); close all; end
% ---- 7-5 频段 × 通道 × 噪声幅值 ----
try
nch = 1:6; nfr = 1:6;
[Ch,Fr] = meshgrid(nch,[0.15 0.5 1.0 2.0 4.0 8.0]);
Nz = [12 8 6 5 4 3; 15 10 7 6 5 4; 9 6 5 4 3 2.4; ...
14 9 7 5.5 4.5 3.4; 11 7.5 5.8 4.6 3.8 2.9; 8 5.6 4.4 3.6 3.0 2.3];
f = ml_fig(PP,100,90); ax = ax3(f,false);
h = stem3(ax,Ch,log2(Fr*10),Nz,'filled','Color',C(6,:),'LineWidth',0.9);
try, h.MarkerFaceColor = C(6,:); catch, end
xlabel(ml_tx('检测通道 <i>j</i>'));
ylabel(ml_tx('频段序号 <i>i</i>'));
zlabel(ml_tx('噪声幅值 <i>A_n</i> / mV'));
xlim(ax,[0.5 6.5]); ylim(ax,[0.5 6.5]); zlim(ax,[0 17]);
yticks(ax,1:6); yticklabels(ax,{'0.15','0.5','1','2','4','8'});
save_png(f,FIGD,'通道频段噪声火柴杆');
catch ME, fprintf('[FAIL] 7-5 %s\n',ME.message); close all; end

浙公网安备 33010602011771号