Курсовая работа: Проектирование системы автоматического управления
end
Cx=(1/sqrt(N)*H)*f';%спектр эталонного выхода
for k=1:m
a4=Ce(k)*Tm(k)*ta(k);
a3=(Ky(k)*Jp(k)*Kd*ta(k)+Ce(k)*Tm(k)+Ce(k)*ta(k));
a2=(Ce(k)*Ky(k)*Jp(k)^2*K0(k)*ta(k)+Ky(k)*Jp(k)*Kd+Ky(k)*Jp(k)*Kp*ta(k)+Ce(k));
a1=(Ce(k)*Ky(k)*Jp(k)^2*K0(k)*al(k)+Ky(k)*Jp(k)*Ku*ta(k)+Ky(k)*Jp(k)*Kp);
a0=Ky(k)*Jp(k)*Ku;
b3=Ky(k)*Jp(k)*Kd*ta(k);
b2=(Ky(k)*Jp(k)*Kp*ta(k)+Ky(k)*Jp(k)*Kd);
b1=(Ky(k)*Jp(k)*Ku*ta(k)+Ky(k)*Jp(k)*Kp);
b0=Ky(k)*Jp(k)*Ku;
E=(a4*I+a3*Int+a2*Int*Int+a1*Int*Int*Int+a0*Int*Int*Int*Int)*Cx-(b3*Int+b2*Int*Int+b1*Int*Int*Int+b0*Int*Int*Int*Int)*Cy;
E1(k)=E'*E;
end
I=sum(E1(k));
X=[0.05189976146807 0.39467280591765 0.00047228019868];
Kp=X(1);
Ku=X(2);
Kd=X(3);
m=100;
K0=0.2*(0.8+0.4*rand(m,1));
Ky=100*(0.8+0.4*rand(m,1));
Ce=0.0105*(0.8+0.4*rand(m,1));
Jp=165*(0.8+0.4*rand(m,1));
ta=0.05*(0.8+0.4*rand(m,1));
al=0.2*(0.8+0.4*rand(m,1));
Tm=0.25*(0.8+0.4*rand(m,1));
for k=1:m