Error using acker System must be single input.How can I solve this problem ?

A=[0.0002 0.039 0 -9.8
-0.07 -0.317 250 0
0.00006 -0.003 -0.339 0
0 0 1 0] %matricea de stabilitate
B=[ 0.44 0.000003434
-5.46 -0.00000015
-1.16 0.000000067
0 0 ]
Ctheta=[0 0 0 1];
% Etapa I
Arond=[A zeros(4,1);-Ctheta 0];%formam matricea Arond si Brond
Brond=[B;0 0];
j=sqrt(-1);
S=[-0.07+0.03*j,-0.07-0.03*j,-1+3*j,-1-3*j,-10];%alegem polii doriti,primii doi mai apropiati de axa imaginara
%urmatorii 2 mai indepartati si al 5-lea corespunzator elementului integrator
Krond=-acker(Arond,Brond,S);
K=-Krond(1:4);
K0=Krond(5);
% Determinare estimator de stare
%Poli estimator
Se=[-3,-3,-3,-3];
C=[0 1 0 0;0 0 1 0;0 0 0 1];
%Determinare amplificare estimator stare
a=A';b=C';
F0=zeros(3,4); g=ones(3,1); %Vezi Curs problema alocarii polilor cazul m>1
f=acker(a,b*g,[-3,-3,-3,-3]);
L=(g*f)';
% Sistemul rezultant
Arez=[A B*K0 -B*K;-Ctheta 0 zeros(1,4);L*C B*K0 A-L*C-B*K];
Brez=[zeros(4,1);1;zeros(4,1)];
Crez=[0 0 0 1 0 0 0 0 0];
Drez=0;
t=0:0.1:200;
sysrez=ss(Arez,Brez,Crez,Drez);
% theta=step(sysrez,t);
% plot(t,theta)
tau=15;
filtru=ss(-1/tau,1/tau,1,0);
thetacom=step(filtru,t);
theta=lsim(sysrez,thetacom,t);
plot(t,theta)
shg

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by