Podwójna inercja z opóźnieniem
te=ScopeData.time;
ue=ScopeData.signals(1).values;
he=ScopeData.signals(2).values;
% subplot(211)
% plot(te,ue);grid
% subplot(212)
% plot(te,he);grid
n=max(find(ue<ue(end)));
t=te(n+1:end)-te(n+1);
u=ue(n+1:end)-ue(n);
h=he(n+1:end)-he(n+1);
plot(t,h);grid
hu=h(end);
uu=u(end);
k=hu/uu
dh=diff(h)./diff(t);
dt=t(1:end-1);
[mdh n]=max(dh);
hp=h(n);
factor=(hp/hu)*100
n10=max(find(h<=0.1*hu));
t10=t(n10);
h10=h(n10);
n90=max(find(h<=0.9*hu));
t90=t(n90);
h90=h(n90);
T=(t90-t10)/3.3
tau=t10-0.53*T
[LpMp]=pade(tau,12);
L=k*Lp;
M=[T 1];
M1=conv(conv(M,M),Mp);
hm=lsim(L,M1,u,t);
plot(t,h,t,hm);grid
kp=0.68*T/(k*tau)
Ti=2*T
Td=Ti/4
tr=7.2*tau
P=kp
I=kp/Ti
D=kp*Td
N=8/Td
Inercja z opóźnieniem
te=ScopeData.time;
ue=ScopeData.signals(1).values;
he=ScopeData.signals(2).values;
% subplot(211)
% plot(te,ue);grid
% subplot(212)
% plot(te,he);grid
n=max(find(ue<ue(end)));
t=te(n+1:end)-te(n+1);
u=ue(n+1:end)-ue(n);
h=he(n+1:end)-he(n+1);
plot(t,h);grid
hu=h(end);
uu=u(end);
k=hu/uu
dh=diff(h)./diff(t);
dt=t(1:end-1);
[mdh n]=max(dh);
hp=h(n);
factor=(hp/hu)*100
n10=max(find(h<=0.1*hu));
t10=t(n10);
h10=h(n10);
n90=max(find(h<=0.9*hu));
t90=t(n90);
h90=h(n90);
T=(t90-t10)/2.2
tau=t10-0.1*T
[LpMp]=pade(tau,12);
L=k*Lp;
M=[T 1];
M1=conv(M,Mp);
hm=lsim(L,M1,u,t);
plot(t,h,t,hm);grid
kp=0.34*T/(k*tau)
Ti=T
Tr=7.2*tau
P=kp
I=kp/Ti
Inercja
te=pawel.time;
ue=pawel.signals(1).values;
he=pawel.signals(2).values;
n=max(find(ue<ue(end)));
t=te(n+1:end)-te(n+1);
u=ue(n+1:end)-ue(n);
h=he(n+1:end)-he(n+1);
plot(t,h);grid
hu=h(end);
uu=u(end);
k=hu/uu
dh=diff(h)./diff(t);
dt=t(1:end-1);
[mdh n]=max(dh);
hp=h(n);
factor=(hp/hu)*100
n10=max(find(h<=0.1*hu));
t10=t(n10);
h10=h(n10);
n90=max(find(h<=0.9*hu));
t90=t(n90);
h90=h(n90);
T=(t90-t10)/2.2
L=k;
M=[T 1];
hm=lsim(L,M,u,t);
plot(t,h,t,hm);grid
tr=60*10
kp=4*T/(k*tr)
Ti=T
P=kp
I=kp/Ti