Step Response curves for x1,x1,x31050-500.511.522.53 回目录
例8_33
不含积分环节的类型1伺服系统设计。对车载倒立摆系统实现控制,使小车位置作为输出的闭环系统具有极点:?1?j3,-5,-5,-5,-5。 根据牛顿第二定律,可得线性化模型:
???(M?m)g??u?Ml? ???Mx?u?mg??
Tsign of inverted pendulum control system %
% Using pole placement Ackermann %
%Modelling
a=[0,1,0,0;20.601,0,0,0;0,0,0,1;-0.4905,0,0,0]; b=[0;-1;0;0.5]; c=[0,0,1,0]; d=[0];
a1=[a,zeros(4,1);-c,0]; b1=[b;0];
%Check the controllability
disp('The rank of controllability matrix'); rc=rank(ctrb(a1,b1))
p=[-1+sqrt(3)*i,-1-sqrt(3)*i,-5,-5,-5]; k=acker(a1,b1,p) %Step Response k1=k(1:4); ki=-k(5);
ac=[a-b*k1,b*ki;-c,0]; bc=[0,0,0,0,1]'; cc=[c,0]; dc=[0]; figure(1);
v=[0,5,-0.4,1.4]; step(ac,bc,cc,dc); axis(v);
title('Step Response of inverted pendulum System'); xlabel('Sec');
ylabel('Output y=x3'); figure(2);
[y,x,t]=step(ac,bc,cc,dc); plot(t,x);
legend('x1','x2','x3','x4','x5');
title('Step Response curves for x1,x1,x3,x4,x5'); xlabel('Sec');
ylabel('x1,x2,x3,x4,x5'); grid on;
The rank of controllability matrix rc = 5 k =
-157.6336 -35.3733 -56.0652 -36.7466 50.9684
Step Response curves for x1,x1,x3,x4,x51.41.210.8x1,x2,x3,x4,x5x1x2x3x4x50.60.40.20-0.2-0.40123Sec456 回目录
例8_34
开环系统
??ax?bu?x ?y?cx?其中
?0??0?,c??100? ????1??设计全阶状态观测器,使观测器得闭环极点为?2?j23,-5。
Tsign of full-order state observer %
a=[0,1,0;0,0,1;-6,-11,-6]; b=[0;0;1]; c=[1,0,0]; d=[0];
%Check the controllability
disp('The rank of observability matrix'); rc=rank(obsv(a,c))
% Constrt the dual system (a1,b1,c1) a1=a'; b1=c'; c1=b';
%Silve K using poles placement -Ackermann p=[-2+2*sqrt(3)*i,-2-2*sqrt(3)*i,-5]; k=acker(a1,b1,p);
%Obtain the state of obser gain ke
ke=k'
The rank of observability matrix rc = 3 ke =
3.0000 7.0000 -1.0000 回目录
10??0a??001?,b??????6?11?6??
例8_35
被控对象
1??0?0?x???x??1?u
20.60????y??10?x设计调节器使闭环极点为?1.8?j2.4,而起状态不可测,因此设计状态观测器使其闭环极点
为-8,-8。
Tsign of regulator and state observer %
a=[0,1;20.6,0]; b=[0;1]; c=[1,0]; d=[0];
%Check the controllability and observability disp('The rank of controllability matrix'); rc=rank(ctrb(a,b))
disp('The rank of observability matrix'); ro=rank(obsv(a,c)) Tsign the regulator
p=[-1.8+2.4*i,-1.8-2.4*i]; k=acker(a,b,p)
Tsign the state observer a1=a';b1=c';c1=b'; p1=[-8,-8];
k1=acker(a1,b1,p1);
ke=k1'
The rank of controllability matrix rc = 2
The rank of observability matrix ro = 2 k =
29.6000 3.6000 ke =
16.0000
84.6000 回目录