better observer

This commit is contained in:
2018-11-13 15:29:20 +01:00
parent 1e676bcd18
commit 7e867b9316
7 changed files with 58 additions and 10 deletions

View File

@@ -18,13 +18,14 @@ function [pb]=simFxFyStage(mot)
else
%!motor_servo(mot=2,ctrl='ServoCtrl',Kp=22,Kvfb=350,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000)
%!motor(mot=2,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=5,IpfGain=8,IpbGain=8,JogSpeed=10.,numPhase=3,invDir=True,servo=None,PhasePosSf=1./81250,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=200,WarnFeLimit=100,InPosBand=2,homing='enc-index')
Kp=22;Kvfb=350;Ki=0.02;Kvff=240;Kaff=1500;MaxInt=1000;
%Kp=22;Kvfb=350;Ki=0.02;Kvff=240;Kaff=1500;MaxInt=1000;
Kp=22;Kvfb=350;Ki=0.02;Kvff=240;Kaff=3500;MaxInt=1000;
mot_num=mot.tf_mdl.Numerator;
mot_den=mot.tf_mdl.Denominator;
end
mdlName='stage_closed_loop';
open(mdlName)
%open(mdlName)
%ServoDeltaTau_z(motid)
[A,B,C,D]=tf2ss(mot_num,mot_den);
@@ -32,4 +33,5 @@ function [pb]=simFxFyStage(mot)
pb=struct();
for k=["Kp","Kvfb","Ki","Kvff","Kaff","MaxInt","mot_num","mot_den","Ts","MaxDac","MaxPosErr","A","B","C","D"]
pb=setfield(pb,k,eval(k));
end
end