lsim closed controlled loop confusion
Show older comments
Hey, I am a bit confused regarding lsim inputs. I wish to simulate a closed loop feedback full state controller
I am using 'space state' dynamic representation
and calculated K value to ensure Controllability
basically:
x'=Ax+Bu , y=Cx
u=-Kx
when defining the ss model:
sys_cl = ss(A-B*K,B,C,0);
but for the lsim function I need to define an already known input vector u to satisfy:
lsim(sys_cl,u,t,x0);
So on one hand I wish "u" to be defined as -Kx (adjust itself depending on the output).
on the other hand - I define a pre-known u value for the simulation
what am I missing...?
Accepted Answer
More Answers (0)
Categories
Find more on Time-Domain Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!