How to create a state space model with constant term and do feedback.
63 views (last 30 days)
Show older comments
I have the discrete time system -
x(k+1) = [A]*x(k) + [B]*u(k) + c
y(k) = [C]*x(k)
I have read online that I can merge the constant term into B by doing [B 1] * [u1(k) ; u2(k)] with u2(k) = c ( I have no control over this input). ie the system becomes
x(k+1) = [A]*x(k) + [B 1]*[u1(k) ; c]
y(k) = [C]*x(k).
However, when I do state feed back, how can I ensure that u2(k) = c?
3 Comments
Sam Chak
on 16 Oct 2024 at 5:05
You appear to have used the continuous-time linear system to place the discrete-time closed-loop pole inside the unit circle (stable region of discrete-time linear system), which is considered incorrect.
Accepted Answer
More Answers (1)
Aquatris
on 15 Oct 2024 at 7:50
You can define which inputs and outputs are connected to your controller. Checkout the feedback function page and look at the 'Specify Input and Output Connections in a Feedback Loop' section.
First try it yourself to figure it out, cause it is a nice exercise to understand documentation and how to search for things. If you get stuck while doing it, provide what you have done and we can guide you.
3 Comments
Aquatris
on 15 Oct 2024 at 9:43
Edited: Aquatris
on 15 Oct 2024 at 9:56
It is a general representation. State feedback essentially means your observation matrix C is identity matrix with a size of nxn where n is the number of states.
So in addition to your actual output, you can create another output for your feedback controller that would have the state information, something like:
Then you need to connect the y_states as an input to your feedback controller and connect u1 to the output of your feedback controller
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!