9 | State-Space Modeling

By the end of this section, you should be able to

  1. Understand benefits/drawbacks of state-space (SS) models versus transfer functions (TF)

    • Know when each may be appropriate to use

  2. Create SS models for linear mechanical systems and identify state vector and matrices that describe system

    • Do this for SISO, SIMO, MISO and MIMO systems

  3. Convert SS model to TF and vice-versa in MATLAB

  4. Numerically solve SS models using MATLAB (ode45)

State Space Form

  1. Draw all FBDs

  2. Write EOM(s) for each FBD in the time domain

  3. Identify state and input variables

    • Create input vector (u) and state vector (x)

      • State variables include one less than the highest derivative for each dependent variable

    • Rewrite equations using state variables such that there is only one first derivative in any one equation

    • If a variable can be replaced by a state variable, it must be

  4. Isolate all first derivatives on LHS of equations

  5. Group coefficients in front of state and input variables on RHS

  6. Add “mapping” equations to relate derivatives of state variables

  7. Put system of equations into matrix form

    • Create A and B

  8. Create the output matrix, C, and feedthrough matrix, D

    • Outputs of the system will be state variables themselves, combinations of state variables or scaled versions of state variables

    • Often matrices of zeros and ones for this course

    • C can be complicated by using sensors with relative measurements

If there are state variable, inputs and outputs/observables

  • A will be

  • B will be

  • C will be

  • D will be


State-Space and Transfer Functions

Numeric Solutions

Runge-Kutta

Using ODE45

MATLAB Resources