Two-Cart System

Applying Newton’s second law to the two carts gives:
and
In matrix form:
In state-space form:
And:
Which then lets us write our system as

Applying Newton’s second law to the two carts gives:
and
In matrix form:
In state-space form:
And:
Which then lets us write our system as