散点边缘直方图(`scatterhist`)

散点边缘直方图(scatterhist)

03_统计与矩阵 5 张 MATLAB R2023b 100 mm 宽 @ 300 dpi

这个方法适合什么

主图散点、边上挂两个单变量分布,联合与边际一次看完。适合:负荷与气温、风速与出力、线损率与负载率的关系分析。

电气场景

1 负荷率与气温散点边缘直方

2 风电出力与风速散点边缘直方

3 线损率与负载率散点边缘直方

4 电压偏差与无功散点边缘直方

5 循环寿命与放电深度散点边缘直方

代码

脚本 p3_stats_matrix.m 中对应 scatterhist 的一段,SEL 用于选择只跑某几个方法。

if any(SEL==7)
    rng(707);

    % ---- 7.1 负荷率与气温 ----
    Tt = 16 + 10*randn(400,1);
    K  = 0.74 + 0.006*(Tt-16) + 0.055*randn(400,1);
    f  = ml_fig(PP,100,95);
    figure(f);
    scatterhist(K,Tt);
    ax = gca;
    xlabel(ax,ml_tx('负荷率 <i>K</i>_{L} / p.u.'));
    ylabel(ax,ml_tx('气温 <i>T</i> / °C'));
    layout_scatterhist(f,PP);
    save_png(f,FIGD,'负荷率与气温散点边缘直方');

    % ---- 7.2 风电出力与风速 ----
    v  = wblrnd(8.5,2.4,400,1);
    Pw = 1.0./(1 + exp(-(v-6.4)/0.9)) + 0.05*randn(400,1);
    f  = ml_fig(PP,100,95);
    figure(f);
    scatterhist(v,Pw);
    ax = gca;
    xlabel(ax,ml_tx('风速 <i>v</i> / (m·s^{-1})'));
    ylabel(ax,ml_tx('风电出力 <i>P</i>_{w} / p.u.'));
    layout_scatterhist(f,PP);
    save_png(f,FIGD,'风电出力与风速散点边缘直方');

    % ---- 7.3 线损率与负载率 ----
    KL = 0.40 + 0.55*betarnd(2.2,1.9,400,1);
    LL = 0.60 + 3.0*KL.^2 + 0.22*randn(400,1);
    f  = ml_fig(PP,100,95);
    figure(f);
    scatterhist(KL,LL);
    ax = gca;
    xlabel(ax,ml_tx('负载率 <i>K</i>_{L} / p.u.'));
    ylabel(ax,ml_tx('线损率 Δ<i>P</i> / %'));
    layout_scatterhist(f,PP);
    save_png(f,FIGD,'线损率与负载率散点边缘直方');

    % ---- 7.4 电压偏差与无功 ----
    Q  = 14*randn(400,1);
    dU = -0.0021*Q + 0.30*randn(400,1);
    f  = ml_fig(PP,100,95);
    figure(f);
    scatterhist(dU,Q);
    ax = gca;
    xlabel(ax,ml_tx('电压偏差 Δ<i>U</i> / %'));
    ylabel(ax,ml_tx('无功功率 <i>Q</i> / Mvar'));
    layout_scatterhist(f,PP);
    save_png(f,FIGD,'电压偏差与无功散点边缘直方');

    % ---- 7.5 循环寿命与放电深度 ----
    dod = 0.25 + 0.65*betarnd(1.7,2.0,400,1);
    cyc = 6800*exp(-3.1*dod) + 220*randn(400,1);
    f  = ml_fig(PP,100,95);
    figure(f);
    scatterhist(dod,cyc);
    ax = gca;
    xlabel(ax,ml_tx('放电深度 <i>D</i>_{OD} / p.u.'));
    ylabel(ax,ml_tx('循环寿命 <i>N</i> / 次'));
    layout_scatterhist(f,PP);
    save_png(f,FIGD,'循环寿命与放电深度散点边缘直方');
end
posted @ 2026-11-09 00:05  小青蛙电气  阅读(1)  评论(0)    收藏  举报