Chapter 1: Introduction to System Dynamics

Lesson 5: Modeling Workflow, Assumptions, Validation, and Role in Control Engineering

This lesson formalizes the workflow of building dynamic models for engineering systems, clarifies the role of modeling assumptions, develops basic mathematical tools for model validation, and explains how validated models are used within control engineering. We work with continuous- and discrete-time models expressed as differential and difference equations, assuming familiarity with ordinary differential equations (ODEs), linear algebra, and basic numerical concepts.

1. Mathematical View of a Dynamic Model

A dynamic model aims to capture how the internal configuration of a system (its state) evolves in time when subjected to external influences (its inputs). Let the state be \( \mathbf{x}(t) \in \mathbb{R}^n \), the input \( \mathbf{u}(t) \in \mathbb{R}^m \), and the measured output \( \mathbf{y}(t) \in \mathbb{R}^p \). A very general continuous-time state model is

\[ \dot{\mathbf{x}}(t) = \mathbf{f}(\mathbf{x}(t), \mathbf{u}(t), \boldsymbol{\theta}, t), \quad \mathbf{x}(t_0) = \mathbf{x}_0, \quad \mathbf{y}(t) = \mathbf{g}(\mathbf{x}(t), \mathbf{u}(t), \boldsymbol{\theta}, t), \]

where \( \boldsymbol{\theta} \in \mathbb{R}^q \) denotes a parameter vector (masses, resistances, friction coefficients, etc.). A discrete-time model on a sampling grid \( t_k = t_0 + kT_s \) with sampling period \( T_s > 0 \) can be written as

\[ \mathbf{x}_{k+1} = \mathbf{F}(\mathbf{x}_k, \mathbf{u}_k, \boldsymbol{\theta}, k), \quad \mathbf{y}_k = \mathbf{G}(\mathbf{x}_k, \mathbf{u}_k, \boldsymbol{\theta}, k). \]

The pair \( (\mathbf{f}, \mathbf{g}) \) or \( (\mathbf{F}, \mathbf{G}) \), together with initial conditions and parameters, defines a model class. Control engineering uses such models to reason about stability, transient performance, and robustness of feedback systems; the quality of these conclusions depends critically on how the model was constructed and validated.

2. Structural and Parametric Aspects of a Model

It is useful to separate a model into its structure and its parameters. Formally, the structure specifies the functional dependence of \( \mathbf{f}, \mathbf{g} \) (or \( \mathbf{F}, \mathbf{G} \)) on the variables, while the parameters select a particular element within that structure.

For example, a first-order lumped model for a process with input \( u(t) \) and output \( y(t) \) may be

\[ \dot{y}(t) = -a\, y(t) + b\, u(t), \quad a > 0, \]

where the structure is “linear, first order in time, with proportional input effect” and the parameter vector is \( \boldsymbol{\theta} = \begin{bmatrix} a & b \end{bmatrix}^\top \).

More generally, we may consider a family of models

\[ \mathcal{M} = \{ (\mathbf{f}_\lambda, \mathbf{g}_\lambda) : \lambda \in \Lambda \}, \]

where the index \( \lambda \) enumerates possible model structures (for instance, different orders, linear vs. nonlinear, lumped vs. distributed), while \( \boldsymbol{\theta} \) parameterizes a specific structure. Model building then consists of two interlinked tasks:

  • Structural modeling: choose a suitable structure \( \lambda \) based on physics, domain knowledge, and desired accuracy.
  • Parameter selection/estimation: determine \( \boldsymbol{\theta} \) from design specifications and/or measured data.

The distinction between structure and parameters is essential when discussing modeling assumptions and validation errors.

3. Modeling Workflow as an Iterative Process

In control engineering practice, dynamic modeling follows a systematic, iterative workflow. A simplified but widely applicable workflow can be summarized as:

  1. Problem definition: specify the control objectives and performance criteria (e.g., settling time, disturbance rejection, physical constraints).
  2. System boundary and variables: decide which subsystems are inside the model, choose states, inputs, and outputs.
  3. Derive governing equations: apply conservation laws (mass, energy, momentum, charge) and constitutive relations (friction laws, Ohm’s law, etc.).
  4. Choose model class: linear vs. nonlinear, continuous vs. discrete, lumped vs. distributed, order of approximation.
  5. Parameter selection/estimation: determine numerical values for parameters from design data or experiments.
  6. Simulation and comparison: simulate the model under representative inputs and compare with measured responses.
  7. Validation and refinement: judge whether the model is adequate for its intended use; if not, refine assumptions or structure and repeat.
flowchart TD
  A["Problem and control requirements"] --> B["Define system boundary and variables"]
  B --> C["Derive governing equations"]
  C --> D["Choose model class and order"]
  D --> E["Select or estimate parameters"]
  E --> F["Simulate and compare with data"]
  F --> G{"Adequate for purpose?"}
  G -->|Yes| H["Document and use model"]
  G -->|No| I["Refine assumptions or structure"]
  I --> B
        

Notice the feedback from validation back to modeling. A key message of this lesson is that modeling is never a one-shot activity; it is an iterative negotiation between physics, mathematics, data, and control objectives.

4. Types of Modeling Assumptions

Assumptions are unavoidable simplifications introduced to make modeling tractable. For dynamic systems, typical assumption categories include:

  • Structural assumptions: constraints on the functional form, for example:
    • Linearity: \( \mathbf{f}(\mathbf{x}, \mathbf{u}, \boldsymbol{\theta}, t) = \mathbf{A}(\boldsymbol{\theta})\mathbf{x} + \mathbf{B}(\boldsymbol{\theta})\mathbf{u} \).
    • Time-invariance: \( \partial \mathbf{f} / \partial t = \mathbf{0} \), i.e., the equations do not depend explicitly on time.
    • Lumped parameters: spatial heterogeneity is neglected so that the dynamics can be represented by ODEs instead of partial differential equations.
  • Parametric assumptions: parameter values are assumed constant and known, e.g., constant mass, constant damping coefficient, constant resistance.
  • Disturbance and noise assumptions: unmodeled influences are treated as disturbances or measurement noise with assumed properties (e.g., zero mean, bounded magnitude).

Assumptions can be expressed mathematically as restrictions on admissible models. For instance, the assumption of linearity and time-invariance for a continuous model with no explicit time dependence can be written as

\[ \mathbf{f}(\mathbf{x}, \mathbf{u}, \boldsymbol{\theta}) = \mathbf{A}(\boldsymbol{\theta}) \mathbf{x} + \mathbf{B}(\boldsymbol{\theta}) \mathbf{u}, \quad \mathbf{g}(\mathbf{x}, \mathbf{u}, \boldsymbol{\theta}) = \mathbf{C}(\boldsymbol{\theta}) \mathbf{x} + \mathbf{D}(\boldsymbol{\theta}) \mathbf{u}, \]

where \( \mathbf{A}, \mathbf{B}, \mathbf{C}, \mathbf{D} \) are parameter matrices. Many control design techniques in later chapters require such structural assumptions; hence, their validity must be checked against physical knowledge and experimental data.

From a modeling perspective, we can decompose the true system dynamics as

\[ \dot{\mathbf{x}}(t) = \mathbf{f}_{\text{true}}(\mathbf{x}(t), \mathbf{u}(t), t) = \mathbf{f}(\mathbf{x}(t), \mathbf{u}(t), \boldsymbol{\theta}^\star, t) + \boldsymbol{\Delta}_{\text{struct}}(t), \]

where \( \boldsymbol{\theta}^\star \) is the best-fitting parameter vector within the chosen structure and \( \boldsymbol{\Delta}_{\text{struct}}(t) \) denotes the structural modeling error. This term cannot be removed by parameter tuning; changing parameters only influences the part of the model within the chosen structure.

5. Model Validation and Error Measures

After selecting a structure and parameters, we must evaluate how well the model describes observed system behavior. Consider a discrete-time sequence of measured inputs and outputs: \( \{ (\mathbf{u}_k, \mathbf{y}_k^{\text{meas}}) \}_{k=0}^{N} \). Given a candidate model \( \mathcal{M}(\boldsymbol{\theta}) \), we can simulate to obtain model-predicted outputs \( \mathbf{y}_k^{\text{mod}}(\boldsymbol{\theta}) \).

The residuals are defined as

\[ \mathbf{e}_k(\boldsymbol{\theta}) = \mathbf{y}_k^{\text{meas}} - \mathbf{y}_k^{\text{mod}}(\boldsymbol{\theta}), \quad k = 0, \dots, N. \]

A common scalar validation cost is the sum of squared residuals:

\[ J(\boldsymbol{\theta}) = \frac{1}{2} \sum_{k=0}^{N} \left\| \mathbf{e}_k(\boldsymbol{\theta}) \right\|_2^2. \]

In the special case of a linear-in-parameters model \( \mathbf{y}_k^{\text{mod}} = \boldsymbol{\Phi}_k \boldsymbol{\theta} \) with known regression matrices \( \boldsymbol{\Phi}_k \in \mathbb{R}^{p \times q} \), we can collect all data into \( \mathbf{y} \in \mathbb{R}^{(N+1)p} \) and \( \boldsymbol{\Phi} \in \mathbb{R}^{(N+1)p \times q} \) to write

\[ J(\boldsymbol{\theta}) = \frac{1}{2} \left\| \mathbf{y} - \boldsymbol{\Phi} \boldsymbol{\theta} \right\|_2^2. \]

Derivation of the least-squares solution. The gradient of \( J(\boldsymbol{\theta}) \) is

\[ \nabla_{\boldsymbol{\theta}} J(\boldsymbol{\theta}) = - \boldsymbol{\Phi}^\top \left( \mathbf{y} - \boldsymbol{\Phi} \boldsymbol{\theta} \right). \]

Setting the gradient to zero for optimality yields the normal equations

\[ \boldsymbol{\Phi}^\top \boldsymbol{\Phi} \, \hat{\boldsymbol{\theta}} = \boldsymbol{\Phi}^\top \mathbf{y}. \]

If \( \boldsymbol{\Phi}^\top \boldsymbol{\Phi} \) is invertible (full column rank), the unique least-squares minimizer is

\[ \hat{\boldsymbol{\theta}} = \left( \boldsymbol{\Phi}^\top \boldsymbol{\Phi} \right)^{-1} \boldsymbol{\Phi}^\top \mathbf{y}. \]

The Hessian of \( J \) is

\[ \nabla_{\boldsymbol{\theta}}^2 J(\boldsymbol{\theta}) = \boldsymbol{\Phi}^\top \boldsymbol{\Phi}, \]

which is symmetric positive semidefinite and positive definite when \( \boldsymbol{\Phi} \) has full column rank. Therefore the least-squares solution is a global minimizer. This is a fundamental tool in parameter estimation and model validation for control systems.

Beyond scalar measures such as \( J(\boldsymbol{\theta}) \), engineers also inspect the shape of residuals in time: if the model is adequate, residuals should be small and qualitatively consistent with assumed disturbance and noise models (for example, no obvious trends that would reveal unmodeled dynamics).

6. Role of Models in Control Engineering

Dynamic models occupy a central role in control engineering, even when the controller is ultimately tuned by experimentation. Conceptually, the control workflow can be summarized as:

  • Use the model to analyze how the system reacts to inputs and disturbances.
  • Use the model to synthesize control laws that achieve performance objectives.
  • Use the model to simulate the closed-loop behavior before implementing it on the real system.
  • Update the model if discrepancies between predicted and observed behavior are significant.
flowchart TD
  RQ["Control requirements"] --> MOD["Dynamic modeling"]
  MOD --> ANA["Analysis of trajectories"]
  ANA --> SYN["Controller design"]
  SYN --> SIM["Simulation and prediction"]
  SIM --> IMP["Implementation on real system"]
  IMP --> DATA["Experimental data"]
  DATA --> VAL["Model and controller validation"]
  VAL -->|Need improvement| MOD
        

Mathematically, if the model predicts that the state obeys \( \dot{\mathbf{x}}(t) = \mathbf{f}(\mathbf{x}(t), \mathbf{u}(t), \boldsymbol{\theta}) \), then any control law \( \mathbf{u}(t) = \mathbf{k}(\mathbf{x}(t), t) \) will lead to a closed-loop system

\[ \dot{\mathbf{x}}(t) = \mathbf{f}(\mathbf{x}(t), \mathbf{k}(\mathbf{x}(t), t), \boldsymbol{\theta}). \]

All conclusions drawn about stability, transient response, or constraint satisfaction from this equation are only as reliable as the underlying model. Thus, modeling and validation are not auxiliary activities: they are foundational to the entire control design process.

7. Python Example — Simple First-Order Model and Parameter Fit

We implement the modeling and validation of a simple first-order system \( \dot{x}(t) = -a x(t) + u(t) \) with unit step input \( u(t) = 1 \) for \( t \ge 0 \). We generate synthetic “measurements” and then estimate \( a \) by minimizing a least-squares cost over a parameter grid. The implementation uses NumPy and SciPy, which are central libraries for system dynamics work in Python.


import numpy as np
from scipy.integrate import solve_ivp

# Right-hand side of the ODE: x_dot = -a * x + u(t)
def rhs(t, x, a):
    # unit step input
    u = 1.0 if t >= 0.0 else 0.0
    return -a * x + u

# Generate synthetic "experimental" data
a_true = 0.8
t0, tf = 0.0, 10.0
t_eval = np.linspace(t0, tf, 201)

sol_true = solve_ivp(lambda t, x: rhs(t, x, a_true),
                     (t0, tf), [0.0], t_eval=t_eval)

y_clean = sol_true.y[0]
rng = np.random.default_rng(1)
noise = 0.02 * rng.standard_normal(size=y_clean.shape)
y_meas = y_clean + noise

# Forward simulation for a candidate parameter value
def simulate(a):
    sol = solve_ivp(lambda t, x: rhs(t, x, a),
                    (t0, tf), [0.0], t_eval=t_eval)
    return sol.y[0]

# Least-squares cost function J(a)
def cost(a):
    y_model = simulate(a)
    e = y_meas - y_model
    return np.mean(e**2)

# Coarse grid search over a
a_grid = np.linspace(0.1, 2.0, 200)
J_vals = np.array([cost(a) for a in a_grid])
a_hat = a_grid[np.argmin(J_vals)]

print("True a:", a_true)
print("Estimated a_hat:", a_hat)
      

This simple script instantiates several key modeling concepts: a mathematical structure, a parameter (\( a \)), a simulation operator, a residual-based cost, and a numerical search for the parameter that best explains the data according to that cost.

8. C++ Example — Explicit Euler Simulation

In C++, it is common to implement numerical integration manually for simple problems, and to use libraries such as Eigen (for linear algebra) and Boost.Numeric.Odeint (for ODE integration) in more advanced settings. The snippet below illustrates a basic explicit Euler simulation of \( \dot{x}(t) = -a x(t) + u(t) \) with \( u(t) = 1 \).


#include <iostream>
#include <vector>
#include <cmath>

double input(double /*t*/) {
    // Unit step input
    return 1.0;
}

// Simulate x_dot = -a * x + u(t) using explicit Euler
void simulate(double a, double dt, int N,
              std::vector<double> &t,
              std::vector<double> &x) {
    t.resize(N);
    x.resize(N);
    t[0] = 0.0;
    x[0] = 0.0;

    for (int k = 0; k < N - 1; ++k) {
        t[k + 1] = t[k] + dt;
        double u = input(t[k]);
        double dx = -a * x[k] + u;
        x[k + 1] = x[k] + dt * dx;
    }
}

int main() {
    double a = 0.8;
    double dt = 0.01;
    int N = static_cast<int>(10.0 / dt) + 1;

    std::vector<double> t, x;
    simulate(a, dt, N, t, x);

    // Print a few samples
    for (int k = 0; k < N; k += 100) {
        std::cout << "t = " << t[k]
                  << ", x = " << x[k] << std::endl;
    }
    return 0;
}
      

For multi-dimensional systems and more sophisticated solvers, one can replace the scalar \( x \) by Eigen::VectorXd and employ boost::numeric::odeint to integrate vector-valued ODEs while preserving the same modeling ideas.

9. Java Example — Simple Simulation Class

Java does not include ODE solvers in the standard library, but explicit schemes can be implemented easily. For larger projects, libraries such as Apache Commons Math provide ODE solvers that can be integrated into a modeling workflow. The following class uses explicit Euler for our first-order model.


public class FirstOrderModel {

    private static double input(double t) {
        // Unit step
        return 1.0;
    }

    public static double[] simulate(double a, double dt, int N) {
        double[] t = new double[N];
        double[] x = new double[N];

        t[0] = 0.0;
        x[0] = 0.0;

        for (int k = 0; k < N - 1; ++k) {
            t[k + 1] = t[k] + dt;
            double u = input(t[k]);
            double dx = -a * x[k] + u;
            x[k + 1] = x[k] + dt * dx;
        }

        // Here we return only the state trajectory; t can be returned as well
        return x;
    }

    public static void main(String[] args) {
        double a = 0.8;
        double dt = 0.01;
        int N = (int)(10.0 / dt) + 1;

        double[] x = simulate(a, dt, N);

        for (int k = 0; k < N; k += 100) {
            double t = k * dt;
            System.out.println("t = " + t + ", x = " + x[k]);
        }
    }
}
      

The same structure appears again: a right-hand side implementing the modeling assumptions, a numerical scheme, and a trajectory that can be compared with measured data for validation.

10. MATLAB/Simulink Implementation

MATLAB is one of the most widely used environments in control engineering for simulation of dynamic systems. Its ODE solvers (ode45, ode15s, etc.) and Simulink block-diagram environment are tightly integrated with modeling workflows. The script below implements the same first-order model and plots the simulated trajectory.


% Parameters
a = 0.8;
tspan = [0 10];
x0 = 0;

% ODE right-hand side
f = @(t,x) -a * x + 1.0; % unit step input

% Numerical integration
[t, x] = ode45(f, tspan, x0);

% Plot result
figure;
plot(t, x, 'LineWidth', 1.5);
xlabel('t');
ylabel('x(t)');
title('First-order model: dx/dt = -a x + u(t), u(t) = 1');
grid on;
      

In Simulink, the same model can be represented as an integrator block fed by the sum of a negative feedback path -a * x and a step source. This tight graphical representation is central to later chapters, where more complex multi-domain systems are modeled.

11. Wolfram Mathematica Implementation

Wolfram Mathematica provides powerful symbolic and numerical tools for system dynamics. The following code uses NDSolve to simulate the first-order system and Manipulate to explore the effect of the parameter \( a \).


aTrue = 0.8;

sol = NDSolve[
   {
     x'[t] == -aTrue x[t] + 1, (* unit step input *)
     x[0] == 0
   },
   x, {t, 0, 10}
];

Plot[Evaluate[x[t] /. sol], {t, 0, 10},
  AxesLabel -> {"t", "x(t)"},
  PlotLabel -> "First-order model with a = 0.8"
]

Manipulate[
  solParam = NDSolve[
    {
      x'[t] == -a x[t] + 1,
      x[0] == 0
    },
    x, {t, 0, 10}
  ];
  Plot[Evaluate[x[t] /. solParam], {t, 0, 10},
    PlotRange -> {0, 2},
    AxesLabel -> {"t", "x(t)"},
    PlotLabel -> Row[{"Response for a = ", a}]
  ],
  { {a, 0.8}, 0.1, 2.0 }
]
      

Such interactive explorations are especially helpful when studying how modeling assumptions and parameter choices affect dynamic behavior, which is fundamental for informed control design.

12. Problems and Solutions

Problem 1 (Convexity of the Least-Squares Cost): Consider the linear-in-parameters model setup from Section 5, with \( J(\boldsymbol{\theta}) = \tfrac{1}{2} \left\| \mathbf{y} - \boldsymbol{\Phi} \boldsymbol{\theta} \right\|_2^2 \). Prove that \( J(\boldsymbol{\theta}) \) is a convex function of \( \boldsymbol{\theta} \) and that, if \( \boldsymbol{\Phi} \) has full column rank, the minimizer is unique.

Solution: Expanding \( J \) yields

\[ J(\boldsymbol{\theta}) = \frac{1}{2} \left( \mathbf{y}^\top \mathbf{y} - 2 \mathbf{y}^\top \boldsymbol{\Phi} \boldsymbol{\theta} + \boldsymbol{\theta}^\top \boldsymbol{\Phi}^\top \boldsymbol{\Phi} \boldsymbol{\theta} \right). \]

The Hessian is \( \nabla_{\boldsymbol{\theta}}^2 J(\boldsymbol{\theta}) = \boldsymbol{\Phi}^\top \boldsymbol{\Phi} \), which is symmetric and positive semidefinite since \( \mathbf{v}^\top \boldsymbol{\Phi}^\top \boldsymbol{\Phi} \mathbf{v} = \left\| \boldsymbol{\Phi} \mathbf{v} \right\|_2^2 \ge 0 \) for all \( \mathbf{v} \). Therefore, \( J(\boldsymbol{\theta}) \) is convex. If \( \boldsymbol{\Phi} \) has full column rank, then \( \boldsymbol{\Phi}^\top \boldsymbol{\Phi} \) is positive definite: \( \mathbf{v}^\top \boldsymbol{\Phi}^\top \boldsymbol{\Phi} \mathbf{v} > 0 \) for all nonzero \( \mathbf{v} \), and thus \( J \) is strictly convex and admits a unique minimizer given by the normal equations.

Problem 2 (Analytic Solution of the First-Order Model): Consider the continuous-time model \( \dot{x}(t) = -a x(t) + 1 \) with \( x(0) = 0 \) and \( a > 0 \). Derive the analytic solution \( x(t) \) and discuss how \( a \) affects the time scale of the response.

Solution: The ODE is linear and can be solved using the integrating factor method. We rewrite it as

\[ \dot{x}(t) + a x(t) = 1. \]

Multiply both sides by the integrating factor \( \mathrm{e}^{a t} \):

\[ \mathrm{e}^{a t} \dot{x}(t) + a \mathrm{e}^{a t} x(t) = \mathrm{e}^{a t}. \]

The left-hand side is the derivative of \( \mathrm{e}^{a t} x(t) \), hence

\[ \frac{\mathrm{d}}{\mathrm{d} t} \left( \mathrm{e}^{a t} x(t) \right) = \mathrm{e}^{a t}. \]

Integrating from \( 0 \) to \( t \) and using \( x(0) = 0 \) gives

\[ \mathrm{e}^{a t} x(t) - x(0) = \int_{0}^{t} \mathrm{e}^{a s} \, \mathrm{d}s = \frac{1}{a} \left( \mathrm{e}^{a t} - 1 \right). \]

Thus

\[ x(t) = \frac{1}{a} \left( 1 - \mathrm{e}^{-a t} \right). \]

As \( a \) increases, the exponential term \( \mathrm{e}^{-a t} \) decays faster, so the system settles more rapidly to its steady-state value \( x_{\text{ss}} = 1 / a \). This illustrates how a single parameter controls both the time scale and the steady-state gain of the model.

Problem 3 (Effect of Structural Assumptions): A lightly damped mechanical system is modeled either as:

  • Model A: first-order ODE \( \dot{x}(t) = -a x(t) + u(t) \),
  • Model B: second-order ODE \( \ddot{x}(t) + 2 \zeta \omega_n \dot{x}(t) + \omega_n^2 x(t) = u(t) \).

Assume a lightly damped system with \( \zeta \ll 1 \). Give a qualitative argument why Model A may systematically fail to reproduce observed oscillations in \( x(t) \), regardless of the parameter choice \( a \).

Solution: The first-order model has solutions of the form \( x(t) = x_{\text{ss}} + c \mathrm{e}^{-a t} \), i.e., a monotone exponential transient without oscillations. In contrast, the second-order system with \( \zeta \ll 1 \) admits underdamped responses of the approximate form

\[ x(t) \approx A \, \mathrm{e}^{-\zeta \omega_n t} \cos\left( \omega_d t + \varphi \right), \quad \omega_d = \omega_n \sqrt{1 - \zeta^2}, \]

which are oscillatory. No choice of \( a \) in Model A can produce sustained oscillations, because the first-order dynamics have a single real mode. This is a structural modeling error: the order of the model is insufficient to capture the qualitative physics.

Problem 4 (Parameter Estimation from Sampled Data): Suppose you measure the response of the system \( \dot{x}(t) = -a x(t) + 1 \), \( x(0) = 0 \), at discrete times \( t_k = k T_s \) with \( T_s = 1 \) s and obtain

\[ x^{\text{meas}}(0) = 0.0, \quad x^{\text{meas}}(1) = 0.63, \quad x^{\text{meas}}(2) = 0.86, \quad x^{\text{meas}}(3) = 0.95. \]

Use the analytic solution \( x(t) = \tfrac{1}{a} (1 - \mathrm{e}^{-a t}) \) and a least-squares approach on the four points to derive a scalar equation for the estimate \( \hat{a} \) (you may not obtain a closed-form solution, but show how to set up the equation).

Solution: For a candidate value \( a \), the model prediction at time \( t_k \) is

\[ x^{\text{mod}}(t_k; a) = \frac{1}{a} \left( 1 - \mathrm{e}^{-a t_k} \right). \]

The residual at sample \( k \) is

\[ e_k(a) = x^{\text{meas}}(t_k) - x^{\text{mod}}(t_k; a). \]

The least-squares cost is

\[ J(a) = \frac{1}{2} \sum_{k=0}^{3} e_k(a)^2. \]

Explicitly,

\[ J(a) = \frac{1}{2} \sum_{k=0}^{3} \left[ x^{\text{meas}}(t_k) - \frac{1}{a} \left( 1 - \mathrm{e}^{-a t_k} \right) \right]^2. \]

Setting \( \tfrac{\mathrm{d}}{\mathrm{d} a} J(a) = 0 \) provides a nonlinear equation in \( a \). Although the derivative is algebraically complicated, the resulting scalar equation can be solved numerically (for instance, with a root-finding method). This illustrates how even very simple dynamic models can lead to nonlinear parameter estimation problems.

13. Summary

In this lesson, we formalized dynamic models as mappings from inputs, initial conditions, and parameters to trajectories in time. We distinguished between structural and parametric aspects of a model, classified common modeling assumptions, and defined residual-based cost functions for validation, including least-squares formulations with clear convexity properties. We emphasized that modeling is an iterative process driven by physical insight, data, and control goals, and we illustrated the central role of validated models in the control engineering workflow. The multi-language implementations (Python, C++, Java, MATLAB/Simulink, Mathematica) showed how the same abstract model translates into different computational environments that will be used in later chapters.

14. References

  1. Kalman, R. E. (1960). Contributions to the theory of optimal control. Bol. Soc. Mat. Mexicana, 5(2), 102–119.
  2. Zadeh, L. A. (1962). From circuit theory to system theory. Proceedings of the IRE, 50(5), 856–865.
  3. Åström, K. J., & Eykhoff, P. (1971). System identification – A survey. Automatica, 7(2), 123–162.
  4. Ljung, L. (1978). Convergence analysis of parametric identification methods. IEEE Transactions on Automatic Control, 23(5), 770–783.
  5. Goodwin, G. C., & Payne, R. L. (1977). On the choice of models in dynamic systems. International Journal of Control, 26(1), 1–20.
  6. Eykhoff, P. (1974). System identification: Parameter and state estimation. International Journal of Control, 20(4), 627–652.
  7. Ljung, L. (1985). Asymptotic variance expressions for identified black-box transfer function models. IEEE Transactions on Automatic Control, 30(9), 834–844.
  8. Söderström, T., & Stoica, P. (1989). On the robustness properties of least squares estimators for linear systems. International Journal of Control, 50(1), 1–24.
  9. Astrom, K. J. (1980). Maximum likelihood and prediction-error methods. Automatica, 16(5), 551–574.
  10. Gu, D. W., Petkov, P. H., & Konstantinov, M. M. (1993). A survey of recent results on robust control and system modelling. Annual Reviews in Control, 17(1), 43–53.