No BSD License  

Highlights from
Techniques of Model Based Control

Techniques of Model Based Control

by

 

01 May 2003 (Updated )

Software for design and tuninig of SISO and MIMO contol systems.

add_remove2(index)
function add_remove2(index)
% Add & Remove responses 2DF
%--------------------------
global d_through_p K TauI TauD PID2lagden PID_FIden  keps a2 a1 b2 b1 PID_APXden 
global PI_lagden PI_deng PID_realden KI time st_size plot_setpoint plot_disturb keep
global plot_effort setpoint_Enable disturb_Enable effort_Enable plot_IMC PI_Enable
global plot_real_PID plot_lag_PID plot_FI plot_PID_APX plot_PI_lag plot_PI PI_lag_Enable
global IMC_Enable real_PID_Enable lag_PID_Enable FI_Enable PID_APX_Enable old_handle

keep=0; %clear keepimg existimg plot
switch index
case 'main'
fam=crfig(370,200,220,330,'Add&Remove Responses','w','none','off');

uicontrol(fam,...
  'Style','checkbox',...
  'Position',[60 180 120 20],...
  'String','IMC',...
  'Value',plot_IMC,...
  'Enable',IMC_Enable,...
  'BackgroundColor',[1 1 1],...
  'Callback','add_remove2(''IMC'');');
uicontrol(fam,...
  'Style','checkbox',...
  'Position',[60 160 120 20],...
  'String','Realizable PID',...
  'Value',plot_real_PID,...
  'Enable',real_PID_Enable,...
  'BackgroundColor',[1 1 1],...
  'Callback','add_remove2(''Realizable PID'');');
uicontrol(fam,...
  'Style','checkbox',...
  'Position',[60 140 120 20],...
  'String','2nd order lag*PID',...
  'Value',plot_lag_PID,...
  'Enable',lag_PID_Enable,...
  'BackgroundColor',[1 1 1],...
  'Callback','add_remove2(''2nd order lag*PID'');');
uicontrol(fam,...
  'Style','checkbox',...
  'Position',[60 120 120 20],...
  'String','Floating Integral',...
  'Value',plot_FI,...
  'Enable',FI_Enable,...
  'BackgroundColor',[1 1 1],...
  'Callback','add_remove2(''Floating Integral'');');
uicontrol(fam,...
  'Style','checkbox',...
  'Position',[60 100 120 20],...
  'String','1st order lag*PID',...
  'Value',plot_PID_APX,...
  'Enable',PID_APX_Enable,...
  'BackgroundColor',[1 1 1],...
  'Callback','add_remove2(''1st order lag*PID'');');
uicontrol(fam,...
  'Style','checkbox',...
  'Position',[60 80 120 20],...
  'String','PI*lag',...
  'Value',plot_PI_lag,...
  'Enable',PI_lag_Enable,...
  'BackgroundColor',[1 1 1],...
  'Callback','add_remove2(''PI*lag'');');
uicontrol(fam,...
  'Style','checkbox',...
  'Position',[60 60 120 20],...
  'String','PI',...
  'Value',plot_PI,...
  'Enable',PI_Enable,...
  'BackgroundColor',[1 1 1],...
  'Callback','');
uicontrol(fam,...
  'Style','push',...
  'Position',[40 20 50 30],...
  'String','OK',...
  'Callback',['close;JMENU=IMENU;cback;']);
uicontrol(fam,...
  'Style','push',...
  'Position',[120 20 50 30],...
  'String','Cancel',...
  'Callback','close');
uicontrol(fam,...
  'Style','checkbox',...
  'Position',[35 240 150 20],...
  'String','Setpoint Responses',...
  'Value',plot_setpoint,...
  'Enable',setpoint_Enable,...
  'BackgroundColor',[1 1 1],...
  'Callback','add_remove(''Setpoint Responses'');');
uicontrol(fam,...
  'Style','checkbox',...
  'Position',[35 220 150 20],...
  'String','Disturbance Responses',...
  'Value',plot_disturb,...
  'Enable',disturb_Enable,...
  'BackgroundColor',[1 1 1],...
  'Callback','add_remove(''Disturbance Responses'');');
uicontrol(fam,...
  'Style','checkbox',...
  'Position',[35 200 150 20],...
  'String','Control Efforts',...
  'Value',plot_effort,...
  'Enable',effort_Enable,...
  'BackgroundColor',[1 1 1],...
  'Callback','add_remove(''Control Efforts'');');
uicontrol(fam,...
  'Style','text',...
  'Position',[35 265 120 50],...
  'String','To add control effort first uncheck set point or disturbance!',...
  'BackgroundColor',[1 1 1]);
case 'Time'
   old_handle=gcf; change_time('main');
   
case 'add'
   old_handle=gcf; add_remove2('main');
   
case 'IMC'
   plot_IMC=get(gcbo,'Value');
   
case 'Realizable PID'
   plot_real_PID=get(gcbo,'Value');
   
case '2nd order lag*PID'
   plot_lag_PID=get(gcbo,'Value');
   
case 'Floating Integral'
   plot_FI=get(gcbo,'Value');
   
case '1st order lag*PID'
   plot_PID_APX=get(gcbo,'Value');
   
case 'PI*lag'
   plot_PI_lag=get(gcbo,'Value');
   
case 'PI'
   plot_PI=get(gcbo,'Value');
   
end

Contact us