📄 ltr_rec.m
字号:
function ltr_rec;
% LTR_REC : finestra per il recupero nel controllo LQG\LTR
%
% In base alla posizione dell'incertezza (ingresso o uscita)
% viene creata la finestra relativa al recuper KFB o LQ
%
% Massimo Davini 20/10/99
global stack;
watchon;
delete(get(gca,'title'));
delete(findobj('tag','plot_Trol'));
delete(findobj('tag','plot_Tfol'));
set(stack.temp.handles,'visible','off');
drawnow;
if strcmp(stack.temp.incer,'in') tipo=1;else tipo=2;end;
set(gca,'drawmode','fast','nextplot','add');
if tipo==1
semilogx(stack.temp.w,stack.temp.sv_Tlq,'r','tag','plot_Tlq');
titolo=' KFB RECOVERY with Qf = Qo + q*q*B*V*B'' and Rf = r*I';
else
semilogx(stack.temp.w,stack.temp.sv_Tkf,'r','tag','plot_Tkf');
titolo=' LQE RECOVERY with Qf = Qo + q*q*C''*V*C and Rf = r*I';
end;
set(gca,'nextplot','replace');
title(titolo,'color',[0 0 0],'fontsize',9,'fontweigh','demi')
szt=.65;
if tipo==1
str='Qo = BB'' , V = I';
str1='K*G ( Open Loop tf matrix )';
str2='Tlq = Kc*inv(sI-A)*B';
str3='Impossible to find Kf';
else str='Qo = C''C , V = I';
str1='G*K ( Open Loop tf matrix )';
str2='Tkf = C*inv(sI-A)*Kf';
str3='Impossible to find Kc';
end;
ltr_2(1)=uicontrol('style','edit','units','normalized','position',[0.12 0.315 0.27 0.06],...
'fontunits','normalized','fontsize',.5,'fontweight','bold',...
'backgroundcolor',[0.752941 0.752941 0.752941],...
'HorizontalAlignment','center','enable','inactive',...
'visible','off','string',str,'tag','ltr_12');
ltr_2(2)=uicontrol('style','slider','unit','normalized','position',[0.12 0.21 0.55 0.05],...
'tag','barra_rec','callback','ltr_rec1;','value',0,'sliderstep',[0.01 0.10],...
'max',3,'min',0,'visible','off');
ltr_2(3)=uicontrol('style','text','units','normalized','position',[0.67 0.32 0.07 0.05],...
'fontunits','normalized','fontsize',szt,'fontweight','bold',...
'backgroundcolor',[.6 .7 .9],'HorizontalAlignment','right',...
'visible','off','string','10^: ','tag','ltr_12');
ltr_2(4)=uicontrol('style','edit','units','normalized','position',[0.74 0.32 0.07 0.05],...
'fontunits','normalized','fontsize',.5,'fontweight','bold',...
'backgroundcolor','yellow','HorizontalAlignment','left',...
'visible','off','string','0','tag','rangemink');
ltr_2(5)=uicontrol('style','edit','units','normalized','position',[0.83 0.32 0.07 0.05],...
'fontunits','normalized','fontsize',.5,'fontweight','bold',...
'backgroundcolor','yellow','HorizontalAlignment','left',...
'visible','off','string','3','tag','rangemaxk');
ltr_2(6)=uicontrol('style','text','units','normalized','position',[0.735 0.27 0.08 0.05],...
'fontunits','normalized','fontsize',.5,'fontweight','bold',...
'backgroundcolor',[.6 .7 .9],'HorizontalAlignment','center',...
'visible','off','string','q min','tag','ltr_12');
ltr_2(7)=uicontrol('style','text','units','normalized','position',[0.825 0.27 0.08 0.05],...
'fontunits','normalized','fontsize',.5,'fontweight','bold',...
'backgroundcolor',[.6 .7 .9],'HorizontalAlignment','center',...
'visible','off','string','q max','tag','ltr_12');
ltr_2(8)=uicontrol('style','text','units','normalized','position',[0.67 0.21 0.07 0.05],...
'fontunits','normalized','fontsize',szt,'fontweight','bold',...
'backgroundcolor',[.6 .7 .9],'HorizontalAlignment','right',...
'visible','off','string','q = ','tag','ltr_12');
ltr_2(9)=uicontrol('style','edit','units','normalized','position',[0.74 0.21 0.16 0.05],...
'fontunits','normalized','fontsize',.5,'fontweight','bold',...
'backgroundcolor','yellow','HorizontalAlignment','left','enable','off',...
'visible','off','string',num2str(1),'tag','editq');
ltr_2(10)=uicontrol('style','checkbox','units','normalized','position',[0.36 0.11 0.38 0.05],...
'fontunits','normalized','fontsize',szt,'fontweight','bold','enable','inactive',...
'backgroundcolor',[.6 .7 .9],'HorizontalAlignment','left','value',1,...
'visible','off','string',str1,'tag','ltr_12');
ltr_2(11)=uicontrol('style','text','units','normalized','position',[0.74 0.115 0.05 0.04],...
'backgroundcolor',[0 0 1],'visible','off','tag','ltr_12');
ltr_2(12)=uicontrol('style','checkbox','units','normalized','position',[0.36 0.05 0.38 0.05],...
'fontunits','normalized','fontsize',szt,'fontweight','bold','enable','inactive',...
'backgroundcolor',[.6 .7 .9],'HorizontalAlignment','left','value',1,...
'visible','off','string',str2,'tag','ltr_12');
ltr_2(13)=uicontrol('style','text','units','normalized','position',[0.74 0.055 0.05 0.04],...
'backgroundcolor',[1 0 0],'visible','off','tag','ltr_12');
ltr_2(14)=uicontrol('style','text','units','normalized','position',[0.43 0.32 0.07 0.05],...
'fontunits','normalized','fontsize',szt,'fontweight','bold',...
'backgroundcolor',[.6 .7 .9],'HorizontalAlignment','right',...
'visible','off','string','r = ','tag','ltr_12');
ltr_2(15)=uicontrol('style','edit','units','normalized','position',[0.5 0.32 0.1 0.05],...
'fontunits','normalized','fontsize',.5,'fontweight','bold',...
'backgroundcolor','yellow','HorizontalAlignment','left',...
'visible','off','string','1','enable','on','tag','editr');
ltr_12(1)=uicontrol('style','push','unit','normalized','position',[0.05 0.05 0.14 0.12],...
'fontunits','normalized','fontsize',.35,'fontweight','bold',...
'string','BACK','Horizontalalignment','center','tag','ltr_12',...
'TooltipString','Back to the previous window',...
'callback',sprintf('back_syn(''ltr_1'',%u);',length(stack.temp.handles)));
campiclose=['''integratori'',''plant'',''sys'',''edit'',''incer'',',...
'''param'',''gates'',''H'',''W'',''w'',''sv_Trol'',''sv_Tfol'',',...
'''Kc'',''Kf'',''sv_Tlq'',''sv_Tkf'',''GK_KG'',''sv_GKKG'',''K'''];
ltr_12(2)=uicontrol('style','push','unit','normalized','position',[0.2 0.05 0.14 0.12],...
'fontunits','normalized','fontsize',.35,'fontweight','bold',...
'string','CLOSE','Horizontalalignment','center','tag','ltr_12',...
'TooltipString','Back to the main SYNTHESIS window',...
'callback',sprintf('back_syn(''syn0'',0,%s);',campiclose));
ltr_12(3)=uicontrol('style','push','unit','normalized','position',[0.81 0.05 0.14 0.12],...
'fontunits','normalized','fontsize',.35,'fontweight','bold','enable','off',...
'Horizontalalignment','center','string','NEXT','tag','BNext12',...
'TooltipString','Go to the next window','callback','ltr2;');
info=uicontrol('style','text','units','normalized','position',[0.4 0.32 0.26 0.05],...
'fontunits','normalized','fontsize',szt,'fontweight','bold',...
'backgroundcolor',[.6 .7 .9],'HorizontalAlignment','center',...
'foregroundcolor','yellow','visible','off','string',str3,'tag','inf2');
set(ltr_12,'visible','on');drawnow;
set(ltr_2,'visible','on');drawnow;
stack.temp.handles=[stack.temp.handles,ltr_2,ltr_12,info];
watchoff;
ltr_rec1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -