State-Space Representation
Why state space?¶
Single differential equations and transfer functions are useful, but state-space representation is more general and more natural for CCD. It handles:
multi-input and multi-output systems;
systems with many states;
nonlinear dynamics;
time-varying parameters;
state constraints and modern controller design methods; and
optimization formulations used in control and CCD.
The general nonlinear continuous-time state-space model is
For a linear time-invariant (LTI) system, this becomes
The state-space viewpoint separates internal dynamic variables from control inputs, disturbances, and measured outputs.
When the model does not start in this form¶
The explicit state-space forms in (1) and (2) assume that every derivative can be written directly as a function of the states, inputs, and disturbances. That assumption is convenient, but it is not automatic. As introduced in the previous section, coupling two energy domains through multidisciplinary analysis, or activating a path constraint on stress, position, or actuator force, can introduce an algebraic variable tied to the states and inputs through an algebraic equation rather than a differential one, producing an index-1 differential-algebraic equation (DAE) instead of a plain ODE.
Getting from a DAE to the state-space form used in this chapter requires eliminating — solving the algebraic constraint for in terms of and , then substituting the result back into the differential equation. For an index-1 DAE this elimination is always possible in principle, but it can be algebraically involved, and it must be redone whenever the constraint that generated changes (for example, when a different inequality constraint becomes the active one). Some numerical and optimization methods used later in this course work with the DAE directly rather than performing this elimination, which is one reason the distinction between an ODE model and a DAE model matters beyond bookkeeping.
Converting the mass–spring–damper model¶
Start from (4) and define
Then
Therefore,
If the output is displacement only,
If the output includes displacement and velocity, then and .
The plant design variables , , and appear directly in the system and input matrices. This is why state-space models are so useful for CCD: changing design variables changes the matrices.
Example: a DC motor¶
Let be shaft angle, shaft speed, and armature current. A basic armature-controlled DC motor model is
where is inertia, is viscous friction, is inductance, is resistance, and are motor constants, is applied voltage, and is load torque.
With ,
This model naturally combines mechanical and electrical physics.
Linearization¶
Many real systems are nonlinear. Control design is often performed around an operating point using a linearized model. If
and is an equilibrium or operating point, a first-order Taylor expansion gives
where
Linearization matters in CCD because plant design variables can change both the operating point and the local dynamics.
Activity 2.2: Nonlinear Pendulum Modeling, Linearization, and Local Feedback¶
Activity 2.2: Nonlinear Pendulum Modeling, Linearization, and Local Feedback
A torque-actuated pendulum is described by
where is the downward equilibrium and is the upright equilibrium. Use
with the actuator limit
Define
and derive the nonlinear state-space model
Determine all equilibrium pairs for
Linearize the system about the downward equilibrium and derive the matrices and .
Linearize the system about the upright equilibrium and derive the matrices and .
Compute the open-loop eigenvalues of both linearized systems and classify their local stability.
Design the upright state-feedback law
so that the linearized closed-loop poles are located at
Derive the resulting closed-loop linearized matrix and verify its eigenvalues analytically.
Simulate both the nonlinear and linearized closed-loop systems for
with
Determine the largest tested perturbation for which the linearized model predicts the nonlinear response with less than normalized root-mean-square error over the first five seconds.
Repeat the nonlinear simulations with actuator saturation and explain why local pole placement does not guarantee large-angle stabilization.
Activity 2.3: Exact State Transition of a Mass–Spring–Damper System¶
Activity 2.3: Exact State Transition of a Mass–Spring–Damper System
Consider
with
Use the state vector
Derive the state matrix .
Derive the characteristic polynomial and the two eigenvalues as functions of .
Determine the damping values corresponding to:
underdamped motion;
critical damping; and
overdamped motion.
For the underdamped case, derive a closed-form expression for
using the Cayley–Hamilton theorem.
Use the result to derive exact expressions for and .
Repeat the derivation for the critically damped case, taking care of the repeated eigenvalue.
For
compute
For each damping value, determine analytically or numerically:
the first zero-crossing time;
the time of the first displacement extremum after ; and
the settling time.
Verify the analytical state-transition solution using a high-accuracy numerical ODE solver.
Explain why increasing beyond critical damping can make the slowest mode slower even though the system contains more damping.