(Need Help) How to generate state-space model in Matlab?
2 views (last 30 days)
I have a below state-space equation.
--- eq. (1)
where A,B,C,D is coefficient, x is control variable, u is control input, and y is control output.
I want to generate the state-space model from the above equation (1).
For this reason, I tried to convert the equation (1) to state-space model using the matlab command ('ss').
However, It seems that the matlab command ('ss') can be only applied the following form.
--- eq. (2)
(The coefficient A to D in Eqs. (1) and (2) are different values. It was just used for the explanation)
How to generate state-space model of Eq. (1)?
Paul on 31 Oct 2021
The output in eq (2) should be:
y = C*x + D*u
i.e., D multiplies the input. It's not a constant in the output.
To your question, the short answer is, no you can't, at least with the built-in functionality of the Control System Toolbox. The system as shown is (in general) not LTI, which is a key property of systems that toolbox is intended to be used for.
However, is it possible a term is missing from eq (1)? That is, should C multiply another input vector, maybe something like:
xdot = A*x + B*u + C*w ?