Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Optimization of Dynamic Systems

Why dynamic optimization is different

In static optimization, the model returns quantities for one design condition. In dynamic optimization, the model generates trajectories over time. Objectives and constraints may depend on the entire trajectory rather than on one scalar state.

Plant and control decisions entering a dynamic model that generates time histories for objectives and trajectory constraints.

Optimization of a dynamic system: design decisions enter the model, whose time histories determine performance and feasibility.

General formulation

A dynamic optimization problem can be written as

minimizex,u(),z()Φ(z(tf),x)+t0tfL(z(t),u(t),x,t)dtsubject toz˙(t)=f(z(t),u(t),x,d(t),t),c(z(t),u(t),x,t)0,b(z(t0),z(tf),x)=0,xLxxU.\begin{aligned} \underset{\mathbf{x},\mathbf{u}(\cdot),\mathbf{z}(\cdot)}{\text{minimize}}\quad &\Phi(\mathbf{z}(t_f),\mathbf{x})+\int_{t_0}^{t_f}L(\mathbf{z}(t),\mathbf{u}(t),\mathbf{x},t)\,dt\\ \text{subject to}\quad &\dot{\mathbf{z}}(t)=\mathbf{f}(\mathbf{z}(t),\mathbf{u}(t),\mathbf{x},\mathbf{d}(t),t),\\ &\mathbf{c}(\mathbf{z}(t),\mathbf{u}(t),\mathbf{x},t)\leq\mathbf{0},\\ &\mathbf{b}(\mathbf{z}(t_0),\mathbf{z}(t_f),\mathbf{x})=\mathbf{0},\\ &\mathbf{x}_L\leq\mathbf{x}\leq\mathbf{x}_U. \end{aligned}

The objective combines a terminal term Φ\Phi, such as final error or energy, and an integral term LL, such as accumulated tracking error, fatigue, energy, or control effort.

Path and boundary constraints

Path constraints must hold throughout the time interval:

c(z(t),u(t),x,t)0,t[t0,tf].\mathbf{c}(\mathbf{z}(t),\mathbf{u}(t),\mathbf{x},t)\leq\mathbf{0}, \qquad t\in[t_0,t_f].

Examples include actuator, displacement, temperature, contact-force, power, and stress limits. A violation may occur between sampled times, so the discretization must be fine enough to detect it.

Boundary constraints apply at the initial or final time, for example

z(t0)=z0,z(tf)ztargetε.\mathbf{z}(t_0)=\mathbf{z}_0, \qquad \|\mathbf{z}(t_f)-\mathbf{z}_{\mathrm{target}}\|\leq\varepsilon.

Simulation-based optimization

A common workflow is to select design variables, simulate the dynamic model, compute objectives and constraints from the resulting trajectories, and return them to the optimizer. This works naturally when control is parameterized by a few variables. Optimizing an entire control trajectory requires specialized optimal-control transcription methods.

A small CCD formulation

For

mq¨+cq˙+kq=u(t)+d(t),m\ddot{q}+c\dot{q}+kq=u(t)+d(t),

let cc, kk, KpK_p, and KdK_d be decisions and use u=KpqKdq˙u=-K_pq-K_d\dot{q}. One possible objective is

J=0T(wqq2+wvq˙2+wuu2)dt+wcc+wkk.J=\int_0^T\left(w_qq^2+w_v\dot{q}^2+w_uu^2\right)dt+w_cc+w_kk.

Possible constraints include q(t)qmax|q(t)|\leq q_{\max}, u(t)umax|u(t)|\leq u_{\max}, and bounds on cc, kk, KpK_p, and KdK_d. This is already a CCD problem because plant and controller variables are optimized together.

Activity 3.6: Discrete Adjoint Sensitivities for Simulation-Based Optimization