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

📄 imcmenu.m

📁 Software for design and tuninig of SISO and MIMO contol systems
💻 M
📖 第 1 页 / 共 5 页
字号:
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'HorizontalAlignment','Left',...
 'String','Upper bound:');
uicontrol(f,...
 'Style','text',...
 'Position',[20 90 80 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'HorizontalAlignment','Left',...
 'String','Lower bound:');
uicontrol(f,...
 'Style','text',...
 'Position',[50 60 280 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','r',...
 'HorizontalAlignment','Left',...
 'String','* For multi-input, separate each input bound by space.');
uicontrol(f,...
 'Style','frame',...
 'Position',[100 117 240 24],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k');
uicontrol(f,...
 'Style','edit',...
 'Position',[105 120 230 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'HorizontalAlignment','Center',...
 'String',satubs,...
 'Callback',['JMENU=(5 + 2600);','cback']);
uicontrol(f,...
 'Style','frame',...
 'Position',[100 87 240 24],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k');
uicontrol(f,...
 'Style','edit',...
 'Position',[105 90 230 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'HorizontalAlignment','Center',...
 'String',satlbs,...
 'Callback',['JMENU=(10 + 2600);','cback']);
uicontrol(f,...
  'Style','push',...
  'Position',[135 20 80 25],...
  'String','OK',...
  'Callback',['JMENU=(15 + 2600);','cback']);

case 2700
[f]=crfig(50,20,400,200,'Default Values','w','none','off');
uicontrol(f,...
 'Style','text',...
 'Position',[20 160 200 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'HorizontalAlignment','Left',...
 'String','Noise amplification factor:');
uicontrol(f,...
 'Style','text',...
 'Position',[20 135 200 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'HorizontalAlignment','Left',...
 'String','Frequency range:');
uicontrol(f,...
 'Style','text',...
 'Position',[20 110 200 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'HorizontalAlignment','Left',...
 'String','Number of points per decade:');
uicontrol(f,...
 'Style','text',...
 'Position',[20 85 200 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'HorizontalAlignment','Left',...
 'String','Accuracy of tuning:');
uicontrol(f,...
 'Style','edit',...
 'Position',[215 160 140 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'String',num2str(Na),...
 'Callback','Na=str2num(get(gcbo,''String''));');
uicontrol(f,...
 'Style','edit',...
 'Position',[215 135 140 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'String',[num2str(decade(1)) ' ' num2str(decade(2))],...
 'Callback','decade=str2num(get(gcbo,''String''));');
uicontrol(f,...
 'Style','edit',...
 'Position',[215 110 140 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'String',num2str(numpdec),...
 'Callback','numpdec=str2num(get(gcbo,''String''));');
uicontrol(f,...
 'Style','edit',...
 'Position',[215 85 140 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'String',num2str(Acc),...
 'Callback','Acc=str2num(get(gcbo,''String''));');
uicontrol(f,...
  'Style','push',...
  'Position',[150 30 80 25],...
  'String','OK',...
  'Callback','close');

% Edit Special
case  2710
   if ~iscellempty(Xmnummt) | ~iscellempty(Xmdenmt) | ~iscellempty(Xmdeadmt)
      temp=strvcat('The normally edited control system is detected !!',' ');
      temp=strvcat(temp,'The specially edited system can only be ');
      temp=strvcat(temp,'used only for the frequency domain design.');
      temp=strvcat(temp,'The IMCTUNE cannot simulate the system in the');
      temp=strvcat(temp,'time domain. Instead, it will simulate the existing ');
      temp=strvcat(temp, 'normally edited system. Therefore, may confuse the user.');
      temp=strvcat(temp,' ');
      temp=strvcat(temp,'To avoid the confusion, would you like to clear the existing system?');
      switch questdlg(temp,'Edit Special Warning !!')
      case 'Yes'
         newsession;
         not_save_yet=1;
         set(main_fig,'Name',['Internal Model Control Tuning - [' datadir NAMEFILE '*]']);
      end
   end
[f]=crfig(50,50,520,400,'Edit Special','w','none','off');
uicontrol(f,...
  'Style','push',...
  'Position',[260 20 80 25],...
  'String',' Cancel',...
  'Callback','close; clear sp_handle');
uicontrol(f,...
 'Style','push',...
 'Position',[140 20 80 25],...
 'String','OK',...
 'Callback',['p{1}=get(sp_handle(1),''String'');',...
    'm{1}=get(sp_handle(2),''String'');',...
    'q{1}=get(sp_handle(3),''String'');',...
    'temp=str2num(get(sp_handle(4),''String''));',...
    'temp1=str2num(get(sp_handle(5),''String''));',...
    'if length(temp)~=length(temp1) ',...
    'errordlg(''Size of bounds miss-matched !'');',...
    'elseif any(temp1>temp) ',...
    'errordlg(''Bounds infeasible !'');',...
    'else vub=temp; vlb=temp1;',...
    'close; clear sp_handle; end;']);
uicontrol(f,...
 'Style','text',...
 'Position',[20 325 150 20],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'Horizontalalignment','Left',...
 'String','Process = ');
uicontrol(f,...
 'Style','text',...
 'Position',[20 155 150 20],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'Horizontalalignment','Left',...
 'String','Model = ');
uicontrol(f,...
 'Style','text',...
 'Position',[20 85 150 20],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'Horizontalalignment','Left',...
 'String','Controller = ');
uicontrol(gcf,...
 'Style','frame',...
 'Position',[85 305 410 60],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k');
sp_handle(1)=uicontrol(gcf,...
 'Style','edit',...
 'String',p{1},...
 'Position',[90 310 400 50],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'Callback','');
uicontrol(f,...
 'Style','text',...
 'Position',[20 275 250 20],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'Horizontalalignment','Left',...
 'String','Process uncertainty limits : x(1), x(2), ... ');
uicontrol(f,...
 'Style','text',...
 'Position',[20 250 150 20],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'Horizontalalignment','Left',...
 'String','Upper bound : ');
uicontrol(f,...
 'Style','text',...
 'Position',[20 210 150 20],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'Horizontalalignment','Left',...
 'String','Lower bound :');
uicontrol(gcf,...
 'Style','frame',...
 'Position',[95 245 400 30],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k');
sp_handle(4)=uicontrol(gcf,...
 'Style','edit',...
 'String',num2str(vub),...
 'Position',[100 250 390 20],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'Callback','');
uicontrol(gcf,...
 'Style','frame',...
 'Position',[95 205 400 30],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k');
sp_handle(5)=uicontrol(gcf,...
 'Style','edit',...
 'String',num2str(vlb),...
 'Position',[100 210 390 20],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'Callback','');
uicontrol(gcf,...
 'Style','frame',...
 'Position',[85 135 410 60],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k');
sp_handle(2)=uicontrol(gcf,...
 'Style','edit',...
 'String',m{1},...
 'Position',[90 140 400 50],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'Callback','');
uicontrol(gcf,...
 'Style','frame',...
 'Position',[85 65 410 60],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k');
sp_handle(3)=uicontrol(gcf,...
 'Style','edit',...
 'String',q{1},...
 'Position',[90 70 400 50],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'Callback','');
   
case 3100
   if maxrow==1 & maxcol==1
   	if cascade
   		view_cascade;
   	else
         view_system;
      end
   else
      view_MIMO;%  View of the muitivariable system
   end
   
case 4100 % Single variable 1-DF Tuning
    if maxrow > 1 | maxcol >1
       if any(iscellempty(Xmnummt)) | any(iscellempty(Xmdenmt)) | ...
             any(iscellempty(Xpnummt)) | any(iscellempty(Xpdenmt)) | ...
             any(iscellempty(qnummt)) | any(iscellempty(qdenmt))
          errordlg('Not enough data entered');
          return
       end
       mimo_freq;
       temp=round(64/maxrow/maxcol)-1;
       for i=1:maxcol
          temp(2)=maxcol*(i-1)+i;
          set(M1_handle(temp(2)),'Backgroundcolor',COLOR_MAP(temp(2)*temp(1),:));
       end
      % mimo_tune;
       return
    end
    if  isempty(m{1,1}) | isempty(q{1,1})
      errordlg('Not enough data entered!');
      return
   elseif isempty(vub) | isempty(vlb) | isempty(p{1,1})
      temp='There is no uncertainty limit. Prfect Model is assumed.';
      temp=strvcat(temp,'Filter time constant is set to noise amplification limit.'); 
      [Emin]=noise_amp_e(qnummt{1,1},qdenmt{1,1},order{1,1},Na,y);
      Epsilon{1,1}(1)=Emin;
      temp=strvcat(temp,strcat('   Epsilon =  ',num2str(Emin)));
      msgbox(temp,'Warning');
      return
   end
   
[f]=crfig(250,300,280,120,'Tuning parameters','w','none','off');
uicontrol(f,...
 'Style','text',...
 'Position',[20 80 200 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'HorizontalAlignment','Left',...
 'String','Filter time constant:');
uicontrol(f,...
 'Style','text',...
 'Position',[20 60 200 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',... 
 'HorizontalAlignment','Left',...
 'String','Performance specification (Mp):');
uicontrol(f,...
 'Style','text',...
 'Position',[20 40 220 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'HorizontalAlignment','Left',...
 'String','Maximum peak height:');
uicontrol(f,...
 'Style','text',...
 'Position',[20 100 200 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'HorizontalAlignment','Left',...
 'String','Emin for noise amplification:');
[Emin]=noise_amp_e(qnummt{1,1},qdenmt{1,1},order{1,1},Na,y);
uicontrol(f,...
 'Style','text',...
 'Position',[170 100 100 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'HorizontalAlignment','center',...
 'String',num2str(Emin));

temp=num2str(Epsilon{1,1}(1));
uicontrol(f,...
 'Style','edit',...
 'Position',[170 80 100 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'String',temp,...
 'Callback','Epsilon{1,1}(1)=str2num(get(gcbo,''String''));');

uicontrol(f,...
 'Style','edit',...
 'Position',[170 60 100 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'String',num2str(Mp(1)),...
 'Callback','Mp(1)=str2num(get(gcbo,''String''));');
uicontrol(f,...
 'Style','edit',...
 'Position',[170 40 100 18],...
 'Backgroundcolor','w',...
 'Foregroundcolor','k',...
 'String',num2str(Mp2(1)),...
 'Callback','Mp2(1)=str2num(get(gcbo,''String''));');
uicontrol(f,...
  'Style','push',...
  'Position',[20 10 50 20],...
  'String','OK',...
  'Callback',['close;','JMENU=(4100);','cback']);
uicontrol(f,...
  'Style','push',...
  'Position',[120 10 50 20],...
  'String',' Cancel',...
  'Callback','close');
uicontrol(f,...
 'Style','push',...
 'Position',[210 10 50 20],...
 'String','Help',...
 'Callback','sayhelp(4100)'); 

case 3220
   if iscellempty(diag(pd_prime))
      errordlg('Pd model is not given !');
      return
   end
    for i=1:maxcol

⌨️ 快捷键说明

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