first rewrite of ovserver
This commit is contained in:
@@ -31,11 +31,12 @@ function motCell=identifyFxFyStage(mode)
|
||||
% loadData reads members currstep,w,mag,phase,meas
|
||||
%
|
||||
% mode bits:
|
||||
% 0 1 : add ss-models and do checks for motor 1 fy
|
||||
% 1 2 : add ss-models and do checks for setup motor 2 fx
|
||||
% 2 4 : identify_currstep
|
||||
% 3 8 : identify_tf2
|
||||
% The default value for mode is 3
|
||||
% 0 1 : select motor 1 fy
|
||||
% 1 2 : select motor 2 fx
|
||||
% 2 4 : add ss-models and do obser/contr checks
|
||||
% 3 8 : identify_currstep
|
||||
% 4 16 : identify_tf (TODO!)
|
||||
% The default value for mode is 7
|
||||
|
||||
|
||||
%References:
|
||||
@@ -67,6 +68,7 @@ function motCell=identifyFxFyStage(mode)
|
||||
opt=tfestOptions;
|
||||
opt.Display='off';
|
||||
tfc = tfest(obj.currstep, 2, 0,opt);
|
||||
s=splitlines(string(evalc('tfc')));disp(join(s(5:7),newline));
|
||||
s=str2ndOrd(tfc);
|
||||
t=(0:199)*50E-6;
|
||||
[y,t]=step(tfc,t);
|
||||
@@ -85,7 +87,7 @@ function motCell=identifyFxFyStage(mode)
|
||||
print(f,sprintf('figures/currstep_%d',obj.id),'-depsc');
|
||||
end
|
||||
|
||||
function tf2=identify_tf2(obj)
|
||||
function tf2=identify_tf(obj)
|
||||
opt=tfestOptions;
|
||||
opt.Display='off';
|
||||
opt.initializeMethod='iv';
|
||||
@@ -351,19 +353,22 @@ function motCell=identifyFxFyStage(mode)
|
||||
for motid= 1:2
|
||||
mot=loadData('/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/python/MXTuning/19_01_29/',motid);
|
||||
mot.id=motid;
|
||||
if bitand(mode,4)
|
||||
%identification of second order transfer function out of the current step recorded data.
|
||||
identify_currstep(mot{motid});
|
||||
end
|
||||
if bitand(mode,8)
|
||||
%identification of second order transfer function out of the position recorded data.
|
||||
identify_tf2(mot);
|
||||
end
|
||||
if motid==1 && bitand(mode,1)
|
||||
mot=fyStage(mot);
|
||||
end
|
||||
if motid==2 && bitand(mode,2)
|
||||
mot=fxStage(mot);
|
||||
if bitand(mode,motid)
|
||||
if bitand(mode,4)
|
||||
if motid==1
|
||||
mot=fyStage(mot);
|
||||
else
|
||||
mot=fxStage(mot);
|
||||
end
|
||||
end
|
||||
if bitand(mode,8)
|
||||
%identification of second order transfer function out of the current step recorded data.
|
||||
identify_currstep(mot);
|
||||
end
|
||||
if bitand(mode,16)
|
||||
%identification of second order transfer function out of the position recorded data.
|
||||
identify_tf(mot);
|
||||
end
|
||||
end
|
||||
motCell{motid}=mot;
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user