We can write the system of equations in matrix form as follows:
main.m46 chars3 lines
where x(t)
is the state vector, u(t)
is the input vector, y(t)
is the output vector, and A
, B
, C
, and D
are matrices that define the system.
For the given equations, we have:
main.m33 chars3 lines
We can define the state vector as x = [x1; x2]
. Then, we can write the equations in matrix form as follows:
main.m109 chars3 lines
Therefore, the state-space model in Matlab can be written as:
main.m71 chars7 lines
Finally, we can use the ss2tf
function to convert the state-space model to a transfer function:
main.m55 chars3 lines
gistlibby LogSnag