折线图(`plot`)

折线图(plot)

01_二维线图 5 张 MATLAB R2023b 100 mm 宽 @ 300 dpi

这个方法适合什么

时序波形是电气研究最基础的表达。潮流、电压、电流、温度随时间变化,或任意两组数据之间的趋势关系,都优先用它。适合:负荷曲线、三相波形、温升曲线、效率随工况变化。

电气场景

1 三相电流波形

2 日负荷曲线

3 母线电压偏差

4 变压器温升曲线

5 逆变器效率曲线

代码

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

if any(SEL==1)
    % ---- 1.1 三相电流波形 ----
    f0 = 50; w = 2*pi*f0; t = linspace(0,0.04,1600); Im = 320;
    ia = Im*sin(w*t); ib = Im*sin(w*t-2*pi/3); ic = Im*sin(w*t+2*pi/3);
    f  = ml_fig(PP,100,80);
    ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
    h1 = plot(ax,t,ia,'Color',C(1,:),'LineWidth',1.0); hold(ax,'on');
    h2 = plot(ax,t,ib,'Color',C(2,:),'LineWidth',1.0);
    h3 = plot(ax,t,ic,'Color',C(3,:),'LineWidth',1.0);
    xlabel(ml_tx('时间 <i>t</i> / s'));
    ylabel(ml_tx('相电流 <i>i</i> / A'));
    xlim(ax,[0 0.04]); ylim(ax,[-400 560]);
    lg = legend(ax,[h1 h2 h3],ml_tx({'<i>A</i> 相','<i>B</i> 相','<i>C</i> 相'}), ...
                'Location','northeast','Orientation','horizontal');
    ml_style_legend(lg,PP);
    save_png(f,FIGD,'三相电流波形');

    % ---- 1.2 日负荷曲线 ----
    t  = 0:0.25:24;
    L1 = 1.05 + 1.05*exp(-((t-10)/2.6).^2) + 0.85*exp(-((t-15.5)/3.0).^2);
    L2 = 0.62 + 0.55*exp(-((t-9)/2.2).^2)  + 0.50*exp(-((t-19)/2.4).^2);
    L3 = 0.30 + 0.34*exp(-((t-20)/2.8).^2);
    f  = ml_fig(PP,100,80);
    ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
    h1 = plot(ax,t,L1,'Color',C(1,:),'LineWidth',1.0); hold(ax,'on');
    h2 = plot(ax,t,L2,'Color',C(2,:),'LineWidth',1.0);
    h3 = plot(ax,t,L3,'Color',C(3,:),'LineWidth',1.0);
    xlabel(ml_tx('时刻 <i>t</i> / h'));
    ylabel(ml_tx('有功负荷 <i>P</i> / MW'));
    xlim(ax,[0 24]); ylim(ax,[0 3.05]);
    lg = legend(ax,[h1 h2 h3],ml_tx({'馈线 1','馈线 2','馈线 3'}),'Location','northeast');
    ml_style_legend(lg,PP);
    save_png(f,FIGD,'日负荷曲线');

    % ---- 1.3 10 kV 母线电压偏差 ----
    t  = 0:0.25:24;
    V1 = 10.22 - 0.09*sin(2*pi*t/24 + 0.4) + 0.03*sin(2*pi*t/6);
    V2 = 10.12 - 0.07*sin(2*pi*t/24 + 1.1) + 0.02*sin(2*pi*t/8);
    V3 = 10.30 - 0.11*sin(2*pi*t/24 - 0.2);
    f  = ml_fig(PP,100,80);
    ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
    h1 = plot(ax,t,V1,'Color',C(1,:),'LineWidth',1.0); hold(ax,'on');
    h2 = plot(ax,t,V2,'Color',C(2,:),'LineWidth',1.0);
    h3 = plot(ax,t,V3,'Color',C(3,:),'LineWidth',1.0);
    xlabel(ml_tx('时刻 <i>t</i> / h'));
    ylabel(ml_tx('母线电压 <i>U</i> / kV'));
    xlim(ax,[0 24]); ylim(ax,[9.95 10.68]);
    lg = legend(ax,[h1 h2 h3],ml_tx({'母线 I','母线 II','母线 III'}),'Location','northeast');
    ml_style_legend(lg,PP);
    save_png(f,FIGD,'母线电压偏差');

    % ---- 1.4 变压器温升 ----
    t  = 0:0.1:24;
    dT = max(t-8,0);
    Tw = 55*(1-exp(-dT/2.5));        % 绕组温升
    To = 38*(1-exp(-dT/4.0));        % 顶层油温升
    f  = ml_fig(PP,100,80);
    ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
    h1 = plot(ax,t,Tw,'Color',C(4,:),'LineWidth',1.1); hold(ax,'on');
    h2 = plot(ax,t,To,'Color',C(1,:),'LineWidth',1.1);
    xlabel(ml_tx('运行时间 <i>t</i> / h'));
    ylabel(ml_tx('温升 / K'));
    xlim(ax,[0 24]); ylim(ax,[0 78]);
    lg = legend(ax,[h1 h2],ml_tx({'绕组温升','顶层油温升'}),'Location','northeast');
    ml_style_legend(lg,PP);
    save_png(f,FIGD,'变压器温升曲线');

    % ---- 1.5 逆变器效率曲线 ----
    P  = 5:5:100;
    e1 = 96.2 + 2.1*(1-exp(-P/28));
    e2 = 96.8 + 1.2*(1-exp(-P/35));
    e3 = 95.5 + 2.6*(1-exp(-P/22));
    f  = ml_fig(PP,100,80);
    ax = axes('Parent',f,'Position',[0.175 0.190 0.770 0.755]);
    h1 = plot(ax,P,e1,'Color',C(1,:),'LineWidth',1.1); hold(ax,'on');
    h2 = plot(ax,P,e2,'Color',C(2,:),'LineWidth',1.1);
    h3 = plot(ax,P,e3,'Color',C(3,:),'LineWidth',1.1);
    xlabel(ml_tx('输出功率 <i>P</i> / % 额定'));
    ylabel(ml_tx('效率 <i>\epsilon</i> / %'));
    xlim(ax,[5 100]); ylim(ax,[94.5 100.4]);
    lg = legend(ax,[h1 h2 h3],ml_tx({'组串式','集中式','高频隔离'}),'Location','southeast');
    ml_style_legend(lg,PP);
    save_png(f,FIGD,'逆变器效率曲线');
end
posted @ 2026-11-09 00:02  小青蛙电气  阅读(3)  评论(0)    收藏  举报