Simulating State Response with Disturbance via Multivariable Integral Control

10 visualizaciones (últimos 30 días)
I have a state space model with disturbance that I have to reduce the steady state error to zero. I am using the integral control method and seem to be getting stuck on the very end. I do not know if I am missing something or I do not know how to simulate my final product.
System:
A=[0 1;0 0];
B=[0;1];
Bw=[1;1]; %Disturbance added to make Ax+Bu+B_w*w
C=[1 0];
D=0;
Calculating the augmented system:
Abar=[A;-C];
zc=zeros(size(Abar,1),1);
Abar=[Abar,zc];
Bbar=[B;0];
Bwbar=[Bw,;0];
Brbar=[0;0;1];
Cbar=[C,0];
Finding the gain matrix K using LQR:
Q=eye(3);
R=1;
K = lqr(Abar,Bbar,Q,R);
Ana=[(Abar-Bbar*K)];
sys_Ka=ss(Ana,Bbar,Cbar,D) %This part seems to be correct, but the error value needs to be corrected to zero
Calculating the resultant feedback system:
AbarC=[A-B*K(1) -B*K(2); -C 0];
sys_F=ss(Abar,Bwbar,Cbar,AbarC)
The system (with disturbance and augmented matrices) should have zero steady state error for sys_F, but it doesn't. Doing it by hand, the sytem should be:
x_dot_bar=AbarC*(x v)+(Bw;0)u+(0;I)r
y=[C 0](x v)
I have the correct matrices (I would like to believe), but do not know how to plot the new system. I used lsim and ss for other models without disturbance.
So, I think I am making a mistake when plotting the final system, do not know how to convert the new system into the Ax+Bu form, or I am overlooking something. Attached is the correct plot of the system that I cannot simulate.
Any would would be greatly appreciated!

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by