⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smss1a.m

📁 关于电机的.m程序
💻 M
字号:
%                     Synchronous machine steady-state operation
% 
clc,clear,close all
h0 = figure('Units','normalized', ...
    'Color',[0.8 0.8 0.8], ...
   'Name','Synchronous Machine Parameters',...
   'NumberTitle','off',...
	'Position',[.041 .05 .4 .59], ...
   'ToolBar','none');
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
    'BackgroundColor',[.3 .3 .8], ...
   'FontSize',12, ...
	'FontWeight','bold', ...
	'ForegroundColor','y', ...
	'Position',[0.05 0.92 0.8 0.06], ...
	'String','SYNCHRONOUS MACHINE PARAMETERS', ...
    'Style','text');
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',[0.76 0.76 0.76], ...
	'FontWeight','bold', ...
	'ForegroundColor',[0 0 0.6], ...
	'HorizontalAlignment','left', ...
	'Position',[0.05 0.8 0.4 0.06], ...
	'String','Armature resistance Ra =', ...
	'Style','text');
hRa = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',[1 1 1], ...
	'Position',[0.45 .8 .13 .06], ...
	'String','0.018', ...
	'Style','edit', ...
	'tag','R_a', ...
   'TooltipString','Armature resistance');
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',[0.76 0.76 0.76], ...
	'FontWeight','bold', ...
	'ForegroundColor',[0 0 0.6], ...
	'HorizontalAlignment','left', ...
	'Position',[0.05 0.7 0.4 0.06], ...
   'String','Direct-axis reactance Xd=', ...
   'Style','text');
 hXd = uicontrol('Parent',h0, ...waves
   'Units','normalized', ...
	'BackgroundColor',[1 1 1], ...
	'Position',[0.45 .7 .13 .06], ...
	'String','1.15', ...
	'Style','edit', ...
	'tag','X_d', ...
   'TooltipString','Direct-axis reactance');
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',[0.76 0.76 0.76], ...
	'FontWeight','bold', ...
	'ForegroundColor',[0 0 0.6], ...
	'HorizontalAlignment','left', ...
	'Position',[0.05 0.6 0.4 0.06], ...
	'String','Quadrature-axis reactance Xq =', ...
	'Style','text');
hXq = uicontrol('Parent',h0, ...
   'Units','normalized', ...
	'BackgroundColor',[1 1 1], ...
	'Position',[0.45 .6 .13 .06], ...
	'String','0.75', ...
	'Style','edit', ...
	'tag','X_q', ...
   'TooltipString','Quadrature-axis reactance');
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',[0.76 0.76 0.76], ...
	'FontWeight','bold', ...
	'ForegroundColor',[0 0 0.6], ...
	'HorizontalAlignment','left', ...
	'Position',[0.05 0.5 0.45 0.06], ...
	'String','Armature leakage reactance Xal =', ...
	'Style','text');
hXal = uicontrol('Parent',h0, ...
   'Units','normalized', ...
	'BackgroundColor',[1 1 1], ...
	'Position',[0.45 .5 .13 .06], ...
	'String','0.15', ...
	'Style','edit', ...
	'tag','X_al', ...
   'TooltipString','Armature leakage reactance');
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',[0.76 0.76 0.76], ...
	'FontWeight','bold', ...
	'ForegroundColor',[0 0 0.6], ...
	'HorizontalAlignment','left', ...
	'Position',[0.05 0.35 0.4 0.06], ...
	'String','Armature voltage V =', ...
	'Style','text');
 hVs = uicontrol('Parent',h0, ...
   'Units','normalized',... 
   'BackgroundColor',[1 1 1], ...
	'Position',[0.45 .35 .13 .06], ...
	'String','1.0', ...
	'Style','edit', ...
	'tag','V_s', ...
   'TooltipString','Stator voltage');
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',[0.76 0.76 0.76], ...
	'FontWeight','bold', ...
	'ForegroundColor',[0 0 0.6], ...
	'HorizontalAlignment','left', ...
	'Position',[0.05 0.25 0.4 0.06], ...
	'String','Armature current I =', ...
	'Style','text');
 hIs = uicontrol('Parent',h0, ...
   'Units','normalized',... 
   'BackgroundColor',[1 1 1], ...
	'Position',[0.45 .25 .13 .06], ...
	'String','1.0', ...
	'Style','edit', ...
	'tag','I_s', ...
   'TooltipString','Stator current');
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
	'BackgroundColor',[0.76 0.76 0.76], ...
	'FontWeight','bold', ...
	'ForegroundColor',[0 0 0.6], ...
	'HorizontalAlignment','left', ...
	'Position',[0.05 0.15 0.4 0.06], ...
	'String','Power factor pf =', ...
	'Style','text');
 hpf = uicontrol('Parent',h0, ...
   'Units','normalized',... 
   'BackgroundColor',[1 1 1], ...
	'Position',[0.45 .15 .13 .06], ...
	'String','0.90', ...
	'Style','edit', ...
	'tag','pf_s', ...
   'TooltipString','Power factor');
h1 = uicontrol('Parent',h0, ...
	'Units','normalized', ...
   'BackgroundColor',[.7 .6 .7], ...
   'FontSize',10, ...
	'FontWeight','bold', ...
	'ForegroundColor',[0 0 0.82], ...
	'Position',[0.05 0.05 0.8 0.05], ...
	'String','Specify parameter values in per unit (VA rating base)', ...
   'Style','text');
hpop=uicontrol('Units','normalized', ...
   'style','Popup',...
	'BackgroundColor',[.3 .5 .8], ...
	'Callback','popsm', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 1 1], ...
	'Position',[0.61 0.5 .38 0.4], ...
	'String','Under-excited motor|Over-excited motor|Over-excited generator|Under-excited generator', ...
	'TooltipString','Ref');
h1 = uicontrol('Parent',h0, ...
   'Units','normalized', ...
   'Style','pushbutton',...
	'BackgroundColor',[.3 .3 .8], ...
	'Callback','smss1b', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 1 1], ...
	'Position',[0.75 0.25 0.15 0.08], ...
	'String','RUN', ...
	'TooltipString','Run');
h1 = uicontrol('Parent',h0, ...
   'Units','normalized', ...
   'Style','pushbutton',...
	'BackgroundColor',[.3 .3 .8], ...
	'Callback','close all,clc', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 1 1], ...
	'Position',[0.75 0.15 0.15 0.08], ...
	'String','CLOSE', ...
	'TooltipString','Close');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -