I have designed a system using a minimum realization.
I have the A, B, C matrices and I have assigned closed loop poles for the system.
I used the place command to find my K matrix.
I am wondering if it is possible to use the lsim matlab command to simulate my closed loop system (A-B*K)?
$$x' = Ax+Bu$$ $$u=-Kx$$ $$x' = (A-BK)x$$ $$y=Cx$$
All examples I have found for lsim use the system transfer function or the open loop system.
I have seen examples such as this:
t = 0:0.01:10; % simulation time = 10 seconds
u = zeros(size(T)); % no input
x0 = [0.1 0.1 0.1]; % initial conditions of the three states
sys= ss(A,B,C,D);
lsim(sys,u,t,x0)
But I am not sure how to use this with the closed loop (A-B*K) system.
Any help would be appreciated! Thank you.