0.3 Differential Equations and State-Space Models
Dynamic systems are modeled with differential equations because their rates of change depend on current states, inputs, time, and physical parameters. CCD uses these equations both to predict system behavior and to constrain the optimization problem.
Ordinary differential equations¶
What is a differential equation?¶
A differential equation relates a function to one or more of its derivatives. A first-order ordinary differential equation (ODE) can be written
while a second-order ODE can be written
The derivative order refers to the highest derivative appearing in the equation.
Mass–spring–damper example¶
A standard engineering model is
where
is mass,
is the damping coefficient,
is spring stiffness, and
is an external force or control input.
In a CCD problem, , , and could be plant design variables, while or the parameters of a feedback law could be control design variables.
Initial conditions¶
The differential equation alone does not determine a unique trajectory. A second-order initial-value problem normally also requires displacement and velocity at the initial time:
Converting a higher-order ODE to first-order form¶
First-order state-space form is central to simulation, control, and optimal control. Define
The first state equation is
Solving the original mass–spring–damper equation for acceleration gives
so the second state equation is

Second-order engineering models are commonly rewritten as systems of first-order state equations.
Example: state conversion¶
Collect the two states in a vector:
The dynamics can then be written compactly as
This representation reappears in Chapter 2 and in later optimal-control formulations.
Introductory state-space notation¶
Nonlinear state-space form¶
A general nonlinear dynamic system is often written
where
is the state vector,
is the input vector,
is the output vector,
defines the state dynamics, and
maps states and inputs to outputs.
Linear state-space form¶
For a linear time-invariant system,
The matrices have compatible dimensions:
| Matrix | Role |
|---|---|
| State or system matrix | |
| Input matrix | |
| Output matrix | |
| Direct-feedthrough matrix |
State-space notation is compact, supports multiple states and inputs, and works naturally with vector and matrix operations. It is therefore widely used in control theory and CCD.
Activity 0.4: Exact State-Space Response of a Forced Dynamic System¶
Activity 0.4: Exact State-Space Response of a Forced Dynamic System
Consider
where is a constant input. Use
Define
and derive
Compute the eigenvalues of and classify the response as underdamped, critically damped, or overdamped.
Compute the equilibrium state associated with the constant input.
Define
and derive the homogeneous shifted system.
Derive
Obtain explicit scalar expressions for and .
Compute the first time at which the displacement reaches its steady-state value.
Compute the maximum displacement over .
Verify the analytical solution using a numerical ODE integrator.
Repeat the numerical solution using forward Euler with
Estimate the observed global convergence order.