# Applying base excitation to a MATLAB state-space

I have a state space model that was provided to me by exporting it from an external FEA program. The model can be described as

$\dot x = Ax + Bu$

$y = Cx + Du$

This model assumes forces and moments for the input vector $u$. However, that is not realistic to the actual inputs I would hope to simulate, for instance through lsim(). As a result, I would like to be able to modify my matrices to allow for directly inputting the displacements and rotations at the base node.

It seems like a possible solution would be to change $A$ and $B$ so that, when applying a displacement input vector, instead of a force input vector, it would directly change the states. However, it seems like I would have to differentiate my displacement inputs to be velocities. Then, I set those rows in $A$ to $0$ and $I$ in $B$ which correspond to the derivative of the positions in $\dot x$. That would make the update of those states in line with the actual motion described in the input. It seems as though I'd have to also do something similar with acceleration.

The other option which occurs to me is to just set the relevant entries of the state vector $x$ to the known input values after each time step. This would require me doing my simulation by hand, to some degree.

Is this line of thinking correct, and is one approach superior to the other?

EDIT: I've rewritten the question and description to hopefully be more clear.

• Would you please clarify what do you mean by "convert to a state space form"? I suppose that you are interested in a transfer function of some kind … but it is not clear. – nicoguaro Apr 30 '18 at 14:33
• @nicoguaro I have edited the question to try and make it more clear. – shlady May 3 '18 at 23:26